{"id":16170899,"url":"https://github.com/tougee/ed25519","last_synced_at":"2025-03-19T00:30:34.968Z","repository":{"id":46831292,"uuid":"286402340","full_name":"Tougee/ed25519","owner":"Tougee","description":"Dart port of ed25519 from Go Cryptography ed25519 ","archived":false,"fork":false,"pushed_at":"2021-11-01T03:10:14.000Z","size":155,"stargazers_count":18,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-17T01:04:09.256Z","etag":null,"topics":["cryptography","ed25519","eddsa"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/ed25519_edwards","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":"2020-08-10T07:08:10.000Z","updated_at":"2023-05-30T08:23:23.000Z","dependencies_parsed_at":"2022-08-20T15:51:24.289Z","dependency_job_id":null,"html_url":"https://github.com/Tougee/ed25519","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%2Fed25519","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tougee%2Fed25519/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tougee%2Fed25519/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tougee%2Fed25519/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tougee","download_url":"https://codeload.github.com/Tougee/ed25519/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244331549,"owners_count":20435957,"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","ed25519","eddsa"],"created_at":"2024-10-10T03:19:55.312Z","updated_at":"2025-03-19T00:30:34.690Z","avatar_url":"https://github.com/Tougee.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ed25519\n\nDart port of ed25519 from [Golang ed25519](https://github.com/golang/crypto/tree/master/ed25519)\n\n\n[Pub package](https://pub.dev/packages/ed25519_edwards)\n\n## Usage\n```dart\n\nimport 'package:ed25519_edwards/ed25519_edwards.dart' as ed;\n\n    void signAndVerify() {\n      var keyPair = ed.generateKey();\n      var privateKey = keyPair.privateKey;\n      var publicKey = keyPair.publicKey;\n      var message = utf8.encode('test message');\n      var sig = ed.sign(privateKey, message as Uint8List);\n      var result = ed.verify(publicKey, message, sig);\n      assert(result == true);\n    \n      var wrongMessage = utf8.encode('wrong message');\n      var wrongResult = ed.verify(publicKey, wrongMessage as Uint8List, sig);\n      assert(wrongResult == false);\n    }\n```\n\n\n## APIs\n| Ed25519 |\n| :---: |\n| public |\n| seed |\n| newKeyFromSeed |\n| generateKey |\n| sign |\n| verify |\n\n| Edwards25519 |\n| :---: |\n| FeZero |\n| FeOne  |\n| FeAdd |\n| FeSub |\n| FeCopy |\n| FeCMove |\n| FeFromBytes |\n| FeToBytes |\n| FeIsNegative |\n| FeIsNonZero |\n| FeNeg |\n| FeCombine |\n| FeMul |\n| FeSqaure |\n| FeSquare2 |\n| FeInvert |\n| GeDoubleScalarMultVartime |\n| PreComputedGroupElementCMove |\n| GeScalarMultBase |\n| ScMulAdd |\n| ScReduce |\n| ScMinimal |\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/ed25519_benchmark.dart\n\n| type |    rate    | iterations    |   time  | data throughput |\n|----------|:----------:|---------------|:-------:|:---------------:|\n| Ed25519 - sign | 50.54 MB/s | 254 iterations | 5025 ms | 254.00 MB |\n| Ed25519 - verify | 97.38 MB/s | 487 iterations | 5001 ms | 487.00 MB |\n\n#### AoT (native binary)\n\n\u003e dart2native test/benchmark/ed25519_benchmark.dart -o ed25519_benchmark  \n\u003e ./ed25519_benchmark\n\n| type |    rate    | iterations    |   time  | data throughput |\n|----------|:----------:|---------------|:-------:|:---------------:|\n| Ed25519 - sign | 21.64 MB/s | 109 iterations | 5036 ms | 109.00 MB |\n| Ed25519 - verify | 37.20 MB/s | 187 iterations | 5027 ms | 187.00 MB |\n\n#### JS (Dart2JS) benchmark (too slow, suggest using other libs for dart2js and flutter web)\n\n\u003e dart test test/benchmark/ed25519_benchmark.dart -p chrome\n\n| type |    rate    | iterations    |   time  | data throughput |\n|----------|:----------:|---------------|:-------:|:---------------:|\n| Ed25519 - sign | 797.03 KB/s | 4 iterations | 5139 ms | 4.00 MB |\n| Ed25519 - verify | 1.53 MB/s | 8 iterations | 5231 ms | 8.00 MB |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftougee%2Fed25519","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftougee%2Fed25519","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftougee%2Fed25519/lists"}