{"id":16170901,"url":"https://github.com/tougee/curve25519","last_synced_at":"2026-03-09T07:31:39.929Z","repository":{"id":47009275,"uuid":"344825985","full_name":"Tougee/curve25519","owner":"Tougee","description":"Dart port of x25519 from Go Cryptography curve25519","archived":false,"fork":false,"pushed_at":"2021-11-01T03:22:40.000Z","size":49,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-28T13:18:22.144Z","etag":null,"topics":["cryptography","curve25519","x25519"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/x25519","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tougee.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-05T13:53:01.000Z","updated_at":"2024-09-10T17:25:45.000Z","dependencies_parsed_at":"2022-09-16T10:41:32.383Z","dependency_job_id":null,"html_url":"https://github.com/Tougee/curve25519","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tougee%2Fcurve25519","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tougee%2Fcurve25519/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tougee%2Fcurve25519/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tougee%2Fcurve25519/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tougee","download_url":"https://codeload.github.com/Tougee/curve25519/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955755,"owners_count":20374373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptography","curve25519","x25519"],"created_at":"2024-10-10T03:19:55.379Z","updated_at":"2026-03-09T07:31:39.866Z","avatar_url":"https://github.com/Tougee.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Curve25519\n\nDart port of [Curve25519](https://github.com/golang/crypto/tree/master/curve25519)\n\n[Pub package](https://pub.dev/packages/x25519)\n\n## Usage\n```dart\n\nimport 'package:x25519/x25519.dart';\n\nvoid genKeyAndX25519() {\n  var aliceKeyPair = generateKeyPair();\n  var bobKeyPair = generateKeyPair();\n\n  var aliceSharedKey = X25519(aliceKeyPair.privateKey, bobKeyPair.publicKey);\n  var bobSharedKey = X25519(bobKeyPair.privateKey, aliceKeyPair.publicKey);\n\n  assert(ListEquality().equals(aliceSharedKey, bobSharedKey));\n}\n\nvoid useX25519() {\n  const expectedHex =\n      '89161fde887b2b53de549af483940106ecc114d6982daa98256de23bdf77661a';\n  var x = List\u003cint\u003e.filled(32, 0);\n  x[0] = 1;\n\n  for (var i = 0; i \u003c 200; i++) {\n    x = X25519(x, basePoint);\n  }\n  assert(HEX.encode(x) == expectedHex);\n}\n```\n\n## Benchmark\n\nSimulate from [pinenacl-dart Benchmark](https://github.com/ilap/pinenacl-dart/blob/master/benchmark/README.md)\n\nMacBook Pro (16-inch, 2019), macOS Big Sur, with 2.4GHz i9 32GB\n\n#### JiT (Dart VM) Benchmark\n\n\u003e dart test test/benchmark/curve25519_benchmark.dart\n\n| type | iterations    |   time  |\n|:----------:|:----------:|---------------|\n| generateKeyPair | 1259 iterations | 5001 ms\n| X25519 | 1745 iterations | 5001 ms\n\n#### AoT (native binary)\n\n\u003e dart2native test/benchmark/curve25519_benchmark.dart -o curve25519_benchmark  \n\u003e ./curve25519_benchmark\n\n| type | iterations    |   time  |\n|:----------:|---------------|:-------:|\n| generateKeyPair | 1751 iterations | 5002 ms\n| X25519 | 2266 iterations | 5000 ms\n\n\n#### JS (Dart2JS) benchmark\n\n\u003e dart test test/benchmark/curve25519_benchmark.dart -p chrome\n\n| type | iterations    |   time  |\n|:----------:|:---------------|:-------:|\n| generateKeyPair | 242 iterations | 5022 ms\n| X25519 | 244 iterations | 5013 ms\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftougee%2Fcurve25519","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftougee%2Fcurve25519","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftougee%2Fcurve25519/lists"}