Skip to content

Commit caec686

Browse files
committed
Render all maths with MathJax
1 parent c37dd96 commit caec686

File tree

11 files changed

+273
-247
lines changed

11 files changed

+273
-247
lines changed

src/net/i2p/crypto/eddsa/math/Curve.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
/**
1717
* A twisted Edwards curve.
18-
* Points on the curve satisfy -x^2 + y^2 = 1 + d x^2y^2
18+
* Points on the curve satisfy $-x^2 + y^2 = 1 + d x^2y^2$
1919
* @author str4d
2020
*
2121
*/

src/net/i2p/crypto/eddsa/math/Encoding.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
package net.i2p.crypto.eddsa.math;
1313

1414
/**
15-
* Common interface for all (b-1)-bit encodings of elements
15+
* Common interface for all $(b-1)$-bit encodings of elements
1616
* of EdDSA finite fields.
1717
* @author str4d
1818
*
@@ -27,25 +27,25 @@ public synchronized void setField(Field f) {
2727
}
2828

2929
/**
30-
* Encode a FieldElement in its (b-1)-bit encoding.
31-
* @return the (b-1)-bit encoding of this FieldElement.
30+
* Encode a FieldElement in its $(b-1)$-bit encoding.
31+
* @return the $(b-1)$-bit encoding of this FieldElement.
3232
*/
3333
public abstract byte[] encode(FieldElement x);
3434

3535
/**
36-
* Decode a FieldElement from its (b-1)-bit encoding.
36+
* Decode a FieldElement from its $(b-1)$-bit encoding.
3737
* The highest bit is masked out.
38-
* @param in the (b-1)-bit encoding of a FieldElement.
38+
* @param in the $(b-1)$-bit encoding of a FieldElement.
3939
* @return the FieldElement represented by 'val'.
4040
*/
4141
public abstract FieldElement decode(byte[] in);
4242

4343
/**
4444
* From the Ed25519 paper:<br>
45-
* x is negative if the (b-1)-bit encoding of x is lexicographically larger
46-
* than the (b-1)-bit encoding of -x. If q is an odd prime and the encoding
47-
* is the little-endian representation of {0, 1,..., q-1} then the negative
48-
* elements of F_q are {1, 3, 5,..., q-2}.
45+
* $x$ is negative if the $(b-1)$-bit encoding of $x$ is lexicographically larger
46+
* than the $(b-1)$-bit encoding of -x. If $q$ is an odd prime and the encoding
47+
* is the little-endian representation of $\{0, 1,\dots, q-1\}$ then the negative
48+
* elements of $F_q$ are $\{1, 3, 5,\dots, q-2\}$.
4949
* @return true if negative
5050
*/
5151
public abstract boolean isNegative(FieldElement x);

src/net/i2p/crypto/eddsa/math/FieldElement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public FieldElement(Field f) {
2929
}
3030

3131
/**
32-
* Encode a FieldElement in its (b-1)-bit encoding.
33-
* @return the (b-1)-bit encoding of this FieldElement.
32+
* Encode a FieldElement in its $(b-1)$-bit encoding.
33+
* @return the $(b-1)$-bit encoding of this FieldElement.
3434
*/
3535
public byte[] toByteArray() {
3636
return f.getEncoding().encode(this);

0 commit comments

Comments
 (0)