All Projects → str4d → Ed25519 Java

str4d / Ed25519 Java

Licence: other
Pure Java implementation of EdDSA

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Ed25519 Java

Gokey
A simple vaultless password manager in Go
Stars: ✭ 305 (+76.3%)
Mutual labels:  ed25519
Rbnacl
Ruby FFI binding to the Networking and Cryptography (NaCl) library (a.k.a. libsodium)
Stars: ✭ 910 (+426.01%)
Mutual labels:  ed25519
Sshremotekeys
Managing SSH keys remotely to control access to hosts
Stars: ✭ 70 (-59.54%)
Mutual labels:  ed25519
Jwt
Go JWT signing, verifying and validating
Stars: ✭ 394 (+127.75%)
Mutual labels:  ed25519
Sodium compat
Pure PHP polyfill for ext/sodium
Stars: ✭ 736 (+325.43%)
Mutual labels:  ed25519
Sigtool
Ed25519 signing, verification and encryption, decryption for arbitary files; like OpenBSD signifiy but with more functionality and written in Golang - only easier and simpler
Stars: ✭ 49 (-71.68%)
Mutual labels:  ed25519
libcose
Constrained node COSE library
Stars: ✭ 16 (-90.75%)
Mutual labels:  ed25519
Signatory
Multi-provider digital signature library for Rust
Stars: ✭ 136 (-21.39%)
Mutual labels:  ed25519
Halite
High-level cryptography interface powered by libsodium
Stars: ✭ 933 (+439.31%)
Mutual labels:  ed25519
Exonum Client
JavaScript client for Exonum blockchain
Stars: ✭ 62 (-64.16%)
Mutual labels:  ed25519
Mkp224o
vanity address generator for tor onion v3 (ed25519) hidden services
Stars: ✭ 399 (+130.64%)
Mutual labels:  ed25519
Keys
Key management is hard
Stars: ✭ 733 (+323.7%)
Mutual labels:  ed25519
Minisign
A dead simple tool to sign files and verify digital signatures.
Stars: ✭ 1,105 (+538.73%)
Mutual labels:  ed25519
Ed25519 Dalek
Fast and efficient ed25519 signing and verification in Rust.
Stars: ✭ 383 (+121.39%)
Mutual labels:  ed25519
Tweetnacl Js
Port of TweetNaCl cryptographic library to JavaScript
Stars: ✭ 1,176 (+579.77%)
Mutual labels:  ed25519
zax
NaCl-based Cryptographic Relay
Stars: ✭ 62 (-64.16%)
Mutual labels:  ed25519
Joeecc
Elliptic Curve Cryptography playground/toolkit written in pure Python
Stars: ✭ 46 (-73.41%)
Mutual labels:  ed25519
Wasm Crypto
A WebAssembly (via AssemblyScript) set of cryptographic primitives for building authentication and key exchange protocols.
Stars: ✭ 146 (-15.61%)
Mutual labels:  ed25519
Signatures
Cryptographic signature algorithms: ECDSA, Ed25519
Stars: ✭ 135 (-21.97%)
Mutual labels:  ed25519
Stellar Hd Wallet
🔐 Key derivation for Stellar (SEP-0005) 🚀
Stars: ✭ 60 (-65.32%)
Mutual labels:  ed25519

EdDSA-Java

Build Status

This is an implementation of EdDSA in Java. Structurally, it is based on the ref10 implementation in SUPERCOP (see https://ed25519.cr.yp.to/software.html).

There are two internal implementations:

  • A port of the radix-2^51 operations in ref10 - fast and constant-time, but only useful for Ed25519.
  • A generic version using BigIntegers for calculation - a bit slower and not constant-time, but compatible with any EdDSA parameter specification.

To use

Download the latest .jar from the releases tab and place it in your classpath.

Gradle users:

compile 'net.i2p.crypto:eddsa:0.3.0'

Java 7 and above are supported.

The JUnit4 tests require the Hamcrest library hamcrest-all.jar.

This code is released to the public domain and can be used for any purpose. See LICENSE.txt for details.

Disclaimer

There are no guarantees that this is secure for all cases, and users should review the code themselves before depending on it. PRs that fix bugs or improve reviewability are very welcome. Additionally:

Code comparison

For ease of following, here are the main methods in ref10 and their equivalents in this codebase:

EdDSA Operation ref10 function Java function
Generate keypair crypto_sign_keypair EdDSAPrivateKeySpec constructor
Sign message crypto_sign EdDSAEngine.engineSign
Verify signature crypto_sign_open EdDSAEngine.engineVerify
EdDSA point arithmetic ref10 function Java function
R = b * B ge_scalarmult_base GroupElement.scalarMultiply
R = a*A + b*B ge_double_scalarmult_vartime GroupElement.doubleScalarMultiplyVariableTime
R = 2 * P ge_p2_dbl GroupElement.dbl
R = P + Q ge_madd, ge_add GroupElement.madd, GroupElement.add
R = P - Q ge_msub, ge_sub GroupElement.msub, GroupElement.sub

Important changes

0.3.0

  • The library has been extensively profiled for contention issues in a multi-threaded environment. The only remaining potential contention is in EdDSANamedCurveTable.defineCurve(), which will be rarely called.
  • The public constant for the curve name has returned as ED_25519, and the curve specification has a public constant ED_25519_CURVE_SPEC to avoid repeated lookups when converting to and from encoded form for the public or private keys.
  • GroupElement is now completely immutable, and all fields final, to avoid the need for synchronized blocks over mutable fields. This required some new constructors and paths to construction.
  • EdDSAPublicKeySpec.getNegativeA() and EdDSAPublicKey.getNegativeA() now evaluate lazily, taking advantage of the immutability of GroupElement.negate(). This boosts the performance of the public key constructor when the key is just being passed around rather than used.
  • Support for X509Key wrapped EdDSA public keys.

0.2.0

  • Ed25519 is now named Ed25519 in EdDSANamedCurveTable, and the previous public constant (containing the older inaccurate name) has been removed.

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].