Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove eddsa library in favor of standard Java Security classes #993

Merged
merged 2 commits into from
Mar 19, 2025

Conversation

exceptionfactory
Copy link
Contributor

This pull request removes the dependency on the eddsa library and replaces Key and Signature references with standard Java Security classes.

The Bouncy Castle framework supports the Ed25519 algorithm for keys and signatures, allowing the direct dependency on eddsa to be removed.

JEP 339 added direct support for Ed25519 in Java 15, so the changes in this pull request enable integration on Java 15 or later without requiring the Bouncy Castle framework.

These changes align with the general goal of reducing dependencies on Bouncy Castle by building the implementation using standard Java Security classes.

The new Ed25519KeyFactory class enables generating Java PublicKey and PrivateKey instances from raw key material by building a PKCS8 Key Specification for Private Keys and building an X509 Key Specification for Public Keys.

- Bouncy Castle provides Ed25519 support using standard Java Security classes
- Removed net.i2p.crypto:eddsa:0.3.0 dependency
- Removed Ed25519PublicKey extension of EdDSAPublicKey class from eddsa library
- Added Ed25519KeyFactory for generating Java PublicKey and PrivateKey objects from raw encoded key byte arrays
- Refactored key parsing to use Ed25519KeyFactory
- Refactored SignatureEdDSA to use Java Signature class with Ed25519
@hierynomus hierynomus merged commit cea67fe into hierynomus:master Mar 19, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants