Skip to content

Commit 9dd0ef1

Browse files
committed
Merge pull request #1 from str4d/ref10
Ref10 scalar multiplication and JCA
2 parents 5941885 + 1a16dfa commit 9dd0ef1

37 files changed

+5178
-328
lines changed

.classpath

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
<classpathentry kind="src" path="src"/>
44
<classpathentry kind="src" path="test"/>
55
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
6-
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
6+
<classpathentry kind="lib" path="hamcrest-all.jar"/>
7+
<classpathentry kind="lib" path="junit4.jar"/>
8+
<classpathentry kind="output" path="bin"/>
79
</classpath>

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
bin/
2+
*.class

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
ed25519-java
22
============
33

4-
Ed25519 ported to Java
4+
This is an implementation of Ed25519 in Java. Structurally, it is based on the ref10 implementation in SUPERCOP (see http://ed25519.cr.yp.to/software.html). Internally, it uses BigIntegers for calculation.
55

6-
This class was ported from the Python Ed25519 reference implementation, located at http://ed25519.cr.yp.to/python/ed25519.py
6+
There are no guarantees that this is secure for use. Tests against [the data from the Python implementation](http://ed25519.cr.yp.to/python/sign.input) are passing, but this has not yet been audited by a professional cryptographer. In particular, this implementation is unlikely to have the constant-time properties of ref10 (for now).
77

8-
It is not meant to be a proper OOP Java class, but rather a (mostly) direct translation from the Python code.
9-
10-
Compile and run test.java, and compare the output to validtest.txt - if it matches, you have a working Ed25519 library.
8+
The JUnit4 tests require the Hamcrest library `hamcrest-all.jar`.
119

1210
This code is released to the public domain and can be used for any purpose.
11+
12+
Credits
13+
-------
14+
15+
* The Ed25519 class was originally ported by k3d3 from [the Python Ed25519 reference implementation](http://ed25519.cr.yp.to/python/ed25519.py).
16+
* 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).

src/Ed25519.java

Lines changed: 0 additions & 256 deletions
This file was deleted.

0 commit comments

Comments
 (0)