1212package 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 );
0 commit comments