{"id":15429478,"url":"https://github.com/jedisct1/rust-ed25519-compact","last_synced_at":"2026-05-17T13:11:14.313Z","repository":{"id":37856736,"uuid":"274510657","full_name":"jedisct1/rust-ed25519-compact","owner":"jedisct1","description":"Small, wasm-friendly, zero-dependencies Ed25519 and X25519 implementation for Rust.","archived":false,"fork":false,"pushed_at":"2024-12-31T14:02:17.000Z","size":114,"stargazers_count":126,"open_issues_count":1,"forks_count":23,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-07T02:08:28.200Z","etag":null,"topics":["crypto","curve25519","ed25519","eddsa","rust","x25519"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jedisct1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-23T21:17:14.000Z","updated_at":"2025-03-24T02:10:52.000Z","dependencies_parsed_at":"2023-01-23T07:00:21.379Z","dependency_job_id":"3a03187e-35ce-4227-a42e-8f377b9b31a7","html_url":"https://github.com/jedisct1/rust-ed25519-compact","commit_stats":{"total_commits":126,"total_committers":6,"mean_commits":21.0,"dds":0.07936507936507942,"last_synced_commit":"00af8ee6778da59f57ecbe799a02ae5eb95495d9"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Frust-ed25519-compact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Frust-ed25519-compact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Frust-ed25519-compact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedisct1%2Frust-ed25519-compact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedisct1","download_url":"https://codeload.github.com/jedisct1/rust-ed25519-compact/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248852112,"owners_count":21171839,"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":["crypto","curve25519","ed25519","eddsa","rust","x25519"],"created_at":"2024-10-01T18:10:37.910Z","updated_at":"2026-05-17T13:11:09.261Z","avatar_url":"https://github.com/jedisct1.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub CI](https://github.com/jedisct1/rust-ed25519-compact/workflows/GitHub%20CI/badge.svg)\n\n# A compact Ed25519 and X25519 implementation for Rust\n\n* Formally-verified Curve25519 field arithmetic\n* `no_std`-friendly\n* WebAssembly-friendly\n* Fastly Compute-friendly\n* Lightweight\n* Zero dependencies if randomness is provided by the application\n* Only one portable dependency (`getrandom`) if not\n* Supports incremental signatures (streaming API)\n* Safe and simple Rust interface\n\n## [API documentation](https://docs.rs/ed25519-compact)\n\n## Example usage\n\n`cargo.toml`:\n\n```toml\n[dependencies]\ned25519-compact = \"2\"\n```\n\nExample code:\n\n```rust\n// A message to sign and verify.\nlet message = b\"test\";\n\n// Generates a new key pair using a random seed.\n// A given seed will always produce the same key pair.\nlet key_pair = KeyPair::from_seed(Seed::default());\n\n// Computes a signature for this message using the secret part of the key pair.\nlet signature = key_pair.sk.sign(message, Some(Noise::default()));\n\n// Verifies the signature using the public part of the key pair.\nkey_pair\n    .pk\n    .verify(message, \u0026signature)\n    .expect(\"Signature didn't verify\");\n\n// Verification of a different message using the same signature and public key fails.\nkey_pair\n    .pk\n    .verify(b\"A different message\", \u0026signature)\n    .expect_err(\"Signature shouldn't verify\");\n\n// All these structures can be viewed as raw bytes simply by dereferencing them:\nlet signature_as_bytes: \u0026[u8] = signature.as_ref();\nprintln!(\"Signature as bytes: {:?}\", signature_as_bytes);\n```\n\n## Incremental API example usage\n\nMessages can also be supplied as multiple parts (streaming API) in order to handle large messages without using much memory:\n\n```rust\n/// Creates a new key pair.\nlet kp = KeyPair::generate();\n\n/// Creates a state for an incremental signer.\nlet mut st = kp.sk.sign_incremental(Noise::default());\n\n/// Feeds the message as any number of chunks, and sign the concatenation.\nst.absorb(\"mes\");\nst.absorb(\"sage\");\nlet signature = st.sign();\n\n/// Creates a state for an incremental verifier.\nlet mut st = kp.pk.verify_incremental(\u0026signature)?;\n\n/// Feeds the message as any number of chunks, and verify the concatenation.\nst.absorb(\"mess\");\nst.absorb(\"age\");\nst.verify()?;\n```\n\n## Cargo features\n\n* `self-verify`: after having computed a new signature, verify that is it valid. This is slower, but improves resilience against fault attacks. It is enabled by default on WebAssembly targets.\n* `std`: disables `no_std` compatibility in order to make errors implement the standard `Error` trait.\n* `random` (enabled by default): adds `Default` implementations to the `Seed` and `Noise` objects, in order to securely create random keys and noise.\n* `traits`: add support for the traits from the `ed25519` and `signature` crates.\n* `pem`: add support for importing/exporting keys as OpenSSL-compatible PEM files.\n* `blind-keys`: add support for key blinding.\n* `opt_size`: Enable size optimizations (based on benchmarks, 8-15% size reduction at the cost of 6.5-7% performance).\n* `x25519`: Enable support for the X25519 key exchange system.\n* `disable-signatures`: Disable support for signatures, and only compile support for X25519.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Frust-ed25519-compact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedisct1%2Frust-ed25519-compact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedisct1%2Frust-ed25519-compact/lists"}