Skip to content

Commit

Permalink
Merge pull request #59 from str4d/release-0.3
Browse files Browse the repository at this point in the history
Release 0.3.0
  • Loading branch information
str4d authored May 5, 2018
2 parents ffd0b9b + 3cffbfc commit c0e4e29
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 26 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ jdk:

matrix:
include:
- env: JDK='OpenJDK 10'
before_install: wget https://github.com/sormuras/bach/raw/master/install-jdk.sh
install:
- . ./install-jdk.sh -F 10 -L GPL
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgpg.skip=true -B -V
- addons:
apt:
packages:
Expand Down
41 changes: 24 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ EdDSA-Java

[![Build Status](https://travis-ci.org/str4d/ed25519-java.svg?branch=master)](https://travis-ci.org/str4d/ed25519-java)

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).
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.
- 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
Expand Down Expand Up @@ -66,25 +68,30 @@ 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()` which boosts the performance of the public key constructor when the key is just
being passed around rather than used.
- 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.
- Ed25519 is now named `Ed25519` in `EdDSANamedCurveTable`, and the previous public constant (containing the
older inaccurate name) has been removed.

Credits
-------

* The Ed25519 class was originally ported by k3d3 from [the Python Ed25519 reference implementation](https://ed25519.cr.yp.to/python/ed25519.py).
* Useful comments and tweaks were found in [the GNUnet implementation of Ed25519](https://gnunet.org/svn/gnunet-java/src/main/java/org/gnunet/util/crypto/) (based on k3d3's class).
* [BloodyRookie](https://github.com/BloodyRookie) reviewed the code, adding many useful comments, unit tests and literature.
- The Ed25519 class was originally ported by k3d3 from
[the Python Ed25519 reference implementation](https://ed25519.cr.yp.to/python/ed25519.py).
- Useful comments and tweaks were found in
[the GNUnet implementation of Ed25519](https://gnunet.org/svn/gnunet-java/src/main/java/org/gnunet/util/crypto/)
(based on k3d3's class).
- [BloodyRookie](https://github.com/BloodyRookie) reviewed the code, adding many useful comments, unit tests
and literature.
28 changes: 20 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@
<target>1.6</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
<version>3.1</version>
<version>3.7.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<version>2.21.0</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<version>3.5.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
Expand All @@ -86,7 +86,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -99,7 +99,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<version>3.0.0</version>
<configuration>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
Expand Down Expand Up @@ -129,7 +129,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -143,7 +143,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -163,7 +163,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<version>4.12</version>
<type>maven-plugin</type>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -197,5 +197,17 @@
<name>Ilya Maykov</name>
<email>[email protected]</email>
</contributor>
<contributor>
<name>Mark Raynsford</name>
<email>[email protected]</email>
</contributor>
<contributor>
<name>rick.parker</name>
<email>[email protected]</email>
</contributor>
<contributor>
<name>Christian Sailer</name>
<email>[email protected]</email>
</contributor>
</contributors>
</project>
2 changes: 1 addition & 1 deletion src/net/i2p/crypto/eddsa/EdDSASecurityProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class EdDSASecurityProvider extends Provider {
public static final String PROVIDER_NAME = "EdDSA";

public EdDSASecurityProvider() {
super(PROVIDER_NAME, 0.2 /* should match POM major.minor version */, "str4d " + PROVIDER_NAME + " security provider wrapper");
super(PROVIDER_NAME, 0.3 /* should match POM major.minor version */, "str4d " + PROVIDER_NAME + " security provider wrapper");

AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
Expand Down

0 comments on commit c0e4e29

Please sign in to comment.