Skip to content

Commit 6dae789

Browse files
committed
Fix HTML errors in JavaDocs
1 parent 852e02e commit 6dae789

File tree

5 files changed

+27
-21
lines changed

5 files changed

+27
-21
lines changed

src/net/i2p/crypto/eddsa/EdDSAEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ protected void engineSetParameter(AlgorithmParameterSpec spec) throws InvalidAlg
435435
}
436436

437437
/**
438-
* @deprecated replaced with <a href="#engineSetParameter(java.security.spec.AlgorithmParameterSpec)">
438+
* @deprecated
439439
*/
440440
@Override
441441
protected void engineSetParameter(String param, Object value) {

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ public class GroupElement implements Serializable {
3636

3737
/**
3838
* Available representations for a group element.
39-
* <p><ul>
39+
* <ul>
4040
* <li>P2: Projective representation $(X:Y:Z)$ satisfying $x=X/Z, y=Y/Z$.
4141
* <li>P3: Extended projective representation $(X:Y:Z:T)$ satisfying $x=X/Z, y=Y/Z, XY=ZT$.
4242
* <li>P1P1: Completed representation $((X:Z), (Y:T))$ satisfying $x=X/Z, y=Y/T$.
4343
* <li>PRECOMP: Precomputed representation $(y+x, y-x, 2dxy)$.
4444
* <li>CACHED: Cached representation $(Y+X, Y-X, Z, 2dT)$
45+
* </ul>
4546
*/
4647
public enum Representation {
4748
/** Projective ($P^2$): $(X:Y:Z)$ satisfying $x=X/Z, y=Y/Z$ */
@@ -223,12 +224,13 @@ public GroupElement(
223224
* <p>
224225
* A point $(x,y)$ is encoded by storing $y$ in bit 0 to bit 254 and the sign of $x$ in bit 255.
225226
* $x$ is recovered in the following way:
226-
* <p><ul>
227+
* </p><ul>
227228
* <li>$x = sign(x) * \sqrt{(y^2 - 1) / (d * y^2 + 1)} = sign(x) * \sqrt{u / v}$ with $u = y^2 - 1$ and $v = d * y^2 + 1$.
228229
* <li>Setting $β = (u * v^3) * (u * v^7)^{((q - 5) / 8)}$ one has $β^2 = \pm(u / v)$.
229230
* <li>If $v * β = -u$ multiply $β$ with $i=\sqrt{-1}$.
230231
* <li>Set $x := β$.
231232
* <li>If $sign(x) \ne$ bit 255 of $s$ then negate $x$.
233+
* </ul>
232234
*
233235
* @param curve The curve.
234236
* @param s The encoded point.
@@ -864,7 +866,7 @@ GroupElement select(final int pos, final int b) {
864866
* Constant time.
865867
* <p>
866868
* Preconditions: (TODO: Check this applies here)
867-
* $a[31] <= 127$
869+
* $a[31] \le 127$
868870
* @param a $= a[0]+256*a[1]+\dots+256^{31} a[31]$
869871
* @return the GroupElement
870872
*/

src/net/i2p/crypto/eddsa/math/ed25519/Ed25519FieldElement.java

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,14 @@ public boolean isNonZero() {
6262
* TODO-CR BR: $h$ is allocated via new, probably not a good idea. Do we need the copying into temp variables if we do that?
6363
* <p>
6464
* Preconditions:
65-
* <p><ul>
65+
* </p><ul>
6666
* <li>$|f|$ bounded by $1.1*2^{25},1.1*2^{24},1.1*2^{25},1.1*2^{24},$ etc.
6767
* <li>$|g|$ bounded by $1.1*2^{25},1.1*2^{24},1.1*2^{25},1.1*2^{24},$ etc.
6868
* </ul><p>
6969
* Postconditions:
70-
* <p><ul>
70+
* </p><ul>
7171
* <li>$|h|$ bounded by $1.1*2^{26},1.1*2^{25},1.1*2^{26},1.1*2^{25},$ etc.
72+
* </ul>
7273
*
7374
* @param val The field element to add.
7475
* @return The field element this + val.
@@ -90,13 +91,14 @@ public FieldElement add(FieldElement val) {
9091
* TODO-CR BR: See above.
9192
* <p>
9293
* Preconditions:
93-
* <p><ul>
94+
* </p><ul>
9495
* <li>$|f|$ bounded by $1.1*2^{25},1.1*2^{24},1.1*2^{25},1.1*2^{24},$ etc.
9596
* <li>$|g|$ bounded by $1.1*2^{25},1.1*2^{24},1.1*2^{25},1.1*2^{24},$ etc.
9697
* </ul><p>
9798
* Postconditions:
98-
* <p><ul>
99+
* </p><ul>
99100
* <li>$|h|$ bounded by $1.1*2^{26},1.1*2^{25},1.1*2^{26},1.1*2^{25},$ etc.
101+
* </ul>
100102
*
101103
* @param val The field element to subtract.
102104
* @return The field element this - val.
@@ -116,12 +118,13 @@ public FieldElement subtract(FieldElement val) {
116118
* TODO-CR BR: see above.
117119
* <p>
118120
* Preconditions:
119-
* <p><ul>
121+
* </p><ul>
120122
* <li>$|f|$ bounded by $1.1*2^{25},1.1*2^{24},1.1*2^{25},1.1*2^{24},$ etc.
121123
* </ul><p>
122124
* Postconditions:
123-
* <p><ul>
125+
* </p><ul>
124126
* <li>$|h|$ bounded by $1.1*2^{25},1.1*2^{24},1.1*2^{25},1.1*2^{24},$ etc.
127+
* </ul>
125128
*
126129
* @return The field element (-1) * this.
127130
*/
@@ -139,14 +142,14 @@ public FieldElement negate() {
139142
* Can overlap $h$ with $f$ or $g$.
140143
* <p>
141144
* Preconditions:
142-
* <p><ul>
145+
* </p><ul>
143146
* <li>$|f|$ bounded by
144147
* $1.65*2^{26},1.65*2^{25},1.65*2^{26},1.65*2^{25},$ etc.
145148
* <li>$|g|$ bounded by
146149
* $1.65*2^{26},1.65*2^{25},1.65*2^{26},1.65*2^{25},$ etc.
147150
* </ul><p>
148151
* Postconditions:
149-
* <p><ul>
152+
* </p><ul>
150153
* <li>$|h|$ bounded by
151154
* $1.01*2^{25},1.01*2^{24},1.01*2^{25},1.01*2^{24},$ etc.
152155
* </ul><p>
@@ -390,11 +393,11 @@ public FieldElement multiply(FieldElement val) {
390393
* Can overlap $h$ with $f$.
391394
* <p>
392395
* Preconditions:
393-
* <p><ul>
396+
* </p><ul>
394397
* <li>$|f|$ bounded by $1.65*2^{26},1.65*2^{25},1.65*2^{26},1.65*2^{25},$ etc.
395398
* </ul><p>
396399
* Postconditions:
397-
* <p><ul>
400+
* </p><ul>
398401
* <li>$|h|$ bounded by $1.01*2^{25},1.01*2^{24},1.01*2^{25},1.01*2^{24},$ etc.
399402
* </ul><p>
400403
* See {@link #multiply(FieldElement)} for discussion
@@ -546,11 +549,11 @@ public FieldElement square() {
546549
* Can overlap $h$ with $f$.
547550
* <p>
548551
* Preconditions:
549-
* <p><ul>
552+
* </p><ul>
550553
* <li>$|f|$ bounded by $1.65*2^{26},1.65*2^{25},1.65*2^{26},1.65*2^{25},$ etc.
551554
* </ul><p>
552555
* Postconditions:
553-
* <p><ul>
556+
* </p><ul>
554557
* <li>$|h|$ bounded by $1.01*2^{25},1.01*2^{24},1.01*2^{25},1.01*2^{24},$ etc.
555558
* </ul><p>
556559
* See {@link #multiply(FieldElement)} for discussion

src/net/i2p/crypto/eddsa/math/ed25519/Ed25519LittleEndianEncoding.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ public class Ed25519LittleEndianEncoding extends Encoding {
2626
* <li>Convert the field element to the 32 byte representation.
2727
* </ol><p>
2828
* The idea for the modulo $p$ reduction algorithm is as follows:
29-
* <p>
29+
* </p>
3030
* <h2>Assumption:</h2>
31-
* <p><ul>
31+
* <ul>
3232
* <li>$p = 2^{255} - 19$
3333
* <li>$h = h_0 + 2^{25} * h_1 + 2^{(26+25)} * h_2 + \dots + 2^{230} * h_9$ where $0 \le |h_i| \lt 2^{27}$ for all $i=0,\dots,9$.
3434
* <li>$h \cong r \mod p$, i.e. $h = r + q * p$ for some suitable $0 \le r \lt p$ and an integer $q$.
3535
* </ul><p>
3636
* Then $q = [2^{-255} * (h + 19 * 2^{-25} * h_9 + 1/2)]$ where $[x] = floor(x)$.
37-
* <p>
37+
* </p>
3838
* <h2>Proof:</h2>
3939
* <p>
4040
* We begin with some very raw estimation for the bounds of some expressions:
@@ -242,8 +242,9 @@ public FieldElement decode(byte[] in) {
242242
* Return false if $x$ is in $\{0,2,4,\dots,q-1\}$
243243
* <p>
244244
* Preconditions:
245-
* <p><ul>
245+
* </p><ul>
246246
* <li>$|x|$ bounded by $1.1*2^{26},1.1*2^{25},1.1*2^{26},1.1*2^{25}$, etc.
247+
* </ul>
247248
*
248249
* @return true if $x$ is in $\{1,3,5,\dots,q-2\}$, false otherwise.
249250
*/

src/net/i2p/crypto/eddsa/math/ed25519/Ed25519ScalarOps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ public byte[] reduce(byte[] s) {
327327
* $(ab+c) \bmod q$
328328
* <p>
329329
* Input:
330-
* <p><ul>
330+
* </p><ul>
331331
* <li>$a[0]+256*a[1]+\dots+256^{31}*a[31] = a$
332332
* <li>$b[0]+256*b[1]+\dots+256^{31}*b[31] = b$
333333
* <li>$c[0]+256*c[1]+\dots+256^{31}*c[31] = c$

0 commit comments

Comments
 (0)