{"id":17279743,"url":"https://github.com/str4d/ed25519-java","last_synced_at":"2025-05-15T05:08:13.401Z","repository":{"id":15664953,"uuid":"18402376","full_name":"str4d/ed25519-java","owner":"str4d","description":"Pure Java implementation of EdDSA","archived":false,"fork":false,"pushed_at":"2023-08-12T17:39:42.000Z","size":6147,"stargazers_count":222,"open_issues_count":30,"forks_count":76,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-05-10T06:35:52.463Z","etag":null,"topics":["crypto-library","ed25519","eddsa","java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/str4d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2014-04-03T12:34:54.000Z","updated_at":"2025-05-04T16:07:16.000Z","dependencies_parsed_at":"2024-06-21T03:26:39.148Z","dependency_job_id":null,"html_url":"https://github.com/str4d/ed25519-java","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/str4d%2Fed25519-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/str4d%2Fed25519-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/str4d%2Fed25519-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/str4d%2Fed25519-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/str4d","download_url":"https://codeload.github.com/str4d/ed25519-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276447,"owners_count":22043867,"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-library","ed25519","eddsa","java"],"created_at":"2024-10-15T09:18:29.981Z","updated_at":"2025-05-15T05:08:08.391Z","avatar_url":"https://github.com/str4d.png","language":"Java","readme":"EdDSA-Java\n==========\n\n[![Build Status](https://travis-ci.org/str4d/ed25519-java.svg?branch=master)](https://travis-ci.org/str4d/ed25519-java)\n\nThis is an implementation of EdDSA in Java. Structurally, it is based on the ref10 implementation in SUPERCOP\n(see https://ed25519.cr.yp.to/software.html).\n\nThere are two internal implementations:\n- A port of the radix-2^51 operations in ref10 - fast and constant-time, but only useful for Ed25519.\n- A generic version using BigIntegers for calculation - a bit slower and not constant-time, but compatible\n  with any EdDSA parameter specification.\n\n\nTo use\n------\n\nDownload the latest .jar from the releases tab and place it in your classpath.\n\nGradle users:\n\n```\ncompile 'net.i2p.crypto:eddsa:0.3.0'\n```\n\nJava 7 and above are supported.\n\nThe JUnit4 tests require the Hamcrest library `hamcrest-all.jar`.\n\nThis code is released to the public domain and can be used for any purpose. See `LICENSE.txt` for details.\n\nDisclaimer\n----------\n\nThere are **no** guarantees that this is secure for all cases, and users should\nreview the code themselves before depending on it. PRs that fix bugs or improve\nreviewability are very welcome. Additionally:\n\n- The unit test suite includes tests against\n  [the data from the original Python implementation](https://ed25519.cr.yp.to/python/sign.input).\n- The code (as of 97cea3f0d910fc627c7b57b1bc4d783cdd0c2a4a) was reviewed by\n  [an independent developer](https://github.com/BloodyRookie).\n- The code (as of dc9f58f2c874463c15465326efc040d17a627b3a) was audited by an independent third party,\n  and the one issue found [was fixed](https://github.com/str4d/ed25519-java/pull/31).\n\nCode comparison\n---------------\n\nFor ease of following, here are the main methods in ref10 and their equivalents in this codebase:\n\n| EdDSA Operation | ref10 function | Java function |\n| --------------- | -------------- | ------------- |\n| Generate keypair | `crypto_sign_keypair` | `EdDSAPrivateKeySpec` constructor |\n| Sign message | `crypto_sign` | `EdDSAEngine.engineSign` |\n| Verify signature | `crypto_sign_open` | `EdDSAEngine.engineVerify` |\n\n| EdDSA point arithmetic | ref10 function | Java function |\n| ---------------------- | -------------- | ------------- |\n| `R = b * B` | `ge_scalarmult_base` | `GroupElement.scalarMultiply` |\n| `R = a*A + b*B` | `ge_double_scalarmult_vartime` | `GroupElement.doubleScalarMultiplyVariableTime` |\n| `R = 2 * P` | `ge_p2_dbl` | `GroupElement.dbl` |\n| `R = P + Q` | `ge_madd`, `ge_add` | `GroupElement.madd`, `GroupElement.add` |\n| `R = P - Q` | `ge_msub`, `ge_sub` | `GroupElement.msub`, `GroupElement.sub` |\n\n\nImportant changes\n-----------------\n\n### 0.3.0\n\n- The library has been extensively profiled for contention issues in a multi-threaded environment.  The only\n  remaining potential contention is in `EdDSANamedCurveTable.defineCurve()`, which will be rarely called.\n- The public constant for the curve name has returned as `ED_25519`, and the curve specification has a public\n  constant `ED_25519_CURVE_SPEC` to avoid repeated lookups when converting to and from encoded form for the\n  public or private keys.\n- `GroupElement` is now completely immutable, and all fields final, to avoid the need for `synchronized`\n  blocks over mutable fields. This required some new constructors and paths to construction.\n- `EdDSAPublicKeySpec.getNegativeA()` and `EdDSAPublicKey.getNegativeA()` now evaluate lazily, taking\n  advantage of the immutability of `GroupElement.negate()`. This boosts the performance of the public key\n  constructor when the key is just being passed around rather than used.\n- Support for X509Key wrapped EdDSA public keys.\n\n### 0.2.0\n\n- Ed25519 is now named `Ed25519` in `EdDSANamedCurveTable`, and the previous public constant (containing the\n  older inaccurate name) has been removed.\n\nCredits\n-------\n\n- The Ed25519 class was originally ported by k3d3 from\n  [the Python Ed25519 reference implementation](https://ed25519.cr.yp.to/python/ed25519.py).\n- Useful comments and tweaks were found in\n  [the GNUnet implementation of Ed25519](https://gnunet.org/svn/gnunet-java/src/main/java/org/gnunet/util/crypto/)\n  (based on k3d3's class).\n- [BloodyRookie](https://github.com/BloodyRookie) reviewed the code, adding many useful comments, unit tests\n  and literature.\n","funding_links":[],"categories":["安全"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstr4d%2Fed25519-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstr4d%2Fed25519-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstr4d%2Fed25519-java/lists"}