javadoc fixes and package.html files

This commit is contained in:
zzz
2014-08-29 13:21:14 +00:00
parent 629eff20dd
commit c318760398
9 changed files with 55 additions and 7 deletions

View File

@@ -22,7 +22,7 @@ public abstract class Encoding {
/**
* Decode a FieldElement from its (b-1)-bit encoding.
* The highest bit is masked out.
* @param val the (b-1)-bit encoding of a FieldElement.
* @param in the (b-1)-bit encoding of a FieldElement.
* @return the FieldElement represented by 'val'.
*/
public abstract FieldElement decode(byte[] in);
@@ -33,7 +33,7 @@ public abstract class Encoding {
* than the (b-1)-bit encoding of -x. If q is an odd prime and the encoding
* is the little-endian representation of {0, 1,..., q-1} then the negative
* elements of F_q are {1, 3, 5,..., q-2}.
* @return
* @return true if negative
*/
public abstract boolean isNegative(FieldElement x);
}

View File

@@ -489,7 +489,7 @@ public class GroupElement implements Serializable {
*
* @param pos = i/2 for i in {0, 2, 4,..., 62}
* @param b = r_i
* @return
* @return the GroupElement
*/
GroupElement select(int pos, int b) {
// Is r_i negative?
@@ -522,7 +522,7 @@ public class GroupElement implements Serializable {
* Preconditions: (TODO: Check this applies here)
* a[31] <= 127
* @param a = a[0]+256*a[1]+...+256^31 a[31]
* @return
* @return the GroupElement
*/
public GroupElement scalarMultiply(byte[] a) {
GroupElement t;
@@ -603,7 +603,7 @@ public class GroupElement implements Serializable {
* @param A in P3 representation.
* @param a = a[0]+256*a[1]+...+256^31 a[31]
* @param b = b[0]+256*b[1]+...+256^31 b[31]
* @return
* @return the GroupElement
*/
public GroupElement doubleScalarMultiplyVariableTime(GroupElement A, byte[] a, byte[] b) {
byte[] aslide = slide(a);
@@ -645,7 +645,6 @@ public class GroupElement implements Serializable {
/**
* Verify that a point is on its curve.
* @param P The point to check.
* @return true if the point lies on its curve.
*/
public boolean isOnCurve() {

View File

@@ -65,7 +65,7 @@ public class BigIntegerLittleEndianEncoding extends Encoding implements Serializ
* than the (b-1)-bit encoding of -x. If q is an odd prime and the encoding
* is the little-endian representation of {0, 1,..., q-1} then the negative
* elements of F_q are {1, 3, 5,..., q-2}.
* @return
* @return true if negative
*/
public boolean isNegative(FieldElement x) {
return ((BigIntegerFieldElement)x).bi.testBit(0);

View File

@@ -0,0 +1,6 @@
<html><body>
<p>
Low-level, non-optimized implementation using BigIntegers for any curve.
Unused. See the <a href="../ed25519/package-summary.html">ed25519</a> implementation for Curve 25519.
</p>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>
<p>
Low-level, optimized implementation using Radix 2^51 for Curve 25519.
See the <a href="../bigint/package-summary.html">bigint</a> implementation for other curves.
</p>
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>
<p>
Data structures that definie curves and fields, and
the mathematical operaions on them.
</p><p>
Low-level implementation is in <a href="bigint/package-summary.html">bigint</a> for any curve using BigIntegers,
and in <a href="ed25519/package-summary.html">ed25519</a> for Curve 25519 using Radix 2^51.
</p>
</body></html>

View File

@@ -0,0 +1,11 @@
<html><body>
<p>
Java implementation of EdDSA, a digital signature scheme using
a variant of elliptic curve cryptography based on Twisted Edwards curves.
</p><p>
Contains a generic implementation for any curve using BigIntegers,
and an optimized implementation for Curve 25519 using Radix 2^51.
</p><p>
Since 0.9.15.
</p>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>
<p>
Specifications for curves and keys, and a table for named curves,
initially containing only the 25519 curve "ed25519-sha-512".
</p>
</body></html>

View File

@@ -0,0 +1,11 @@
<html><body>
<p>
I2P implementation of java.security.Provider for EdDSA.
</p><p>
This should only be required when
using runtime registration of the provider with the
<code>Security.addProvider()</code> mechanism.
</p><p>
Since 0.9.15. Other I2P algorithms may be added later.
</p>
</body></html>