Changeset d7d1dcb5
- Timestamp:
- Mar 12, 2019 12:55:58 PM (23 months ago)
- Branches:
- master
- Children:
- 1f861c1
- Parents:
- 91c59df
- Location:
- core/java/src/net/i2p/crypto/eddsa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
core/java/src/net/i2p/crypto/eddsa/EdDSABlinding.java
r91c59df rd7d1dcb5 22 22 private static final byte[] ONE = Utils.hexToBytes("0100000000000000000000000000000000000000000000000000000000000000"); 23 23 private static final Field FIELD = EdDSANamedCurveTable.getByName("Ed25519").getCurve().getField(); 24 p rivatestatic final BigInteger ORDER = new BigInteger("2").pow(252).add(new BigInteger("27742317777372353535851937790883648493"));24 public static final BigInteger ORDER = new BigInteger("2").pow(252).add(new BigInteger("27742317777372353535851937790883648493")); 25 25 26 26 private EdDSABlinding() {} -
core/java/src/net/i2p/crypto/eddsa/EdDSAEngine.java
r91c59df rd7d1dcb5 2 2 3 3 import java.io.ByteArrayOutputStream; 4 import java.math.BigInteger; 4 5 import java.nio.ByteBuffer; 5 6 import java.security.InvalidAlgorithmParameterException; … … 19 20 import net.i2p.crypto.eddsa.math.GroupElement; 20 21 import net.i2p.crypto.eddsa.math.ScalarOps; 22 import net.i2p.crypto.eddsa.math.bigint.BigIntegerLittleEndianEncoding; 21 23 22 24 /** … … 301 303 302 304 byte[] Sbyte = Arrays.copyOfRange(sigBytes, b/8, b/4); 305 // RFC 8032 306 BigInteger Sbigint = (new BigIntegerLittleEndianEncoding()).toBigInteger(Sbyte); 307 if (Sbigint.compareTo(EdDSABlinding.ORDER) >= 0) 308 return false; 309 303 310 // R = SB - H(Rbar,Abar,M)A 304 311 GroupElement R = key.getParams().getB().doubleScalarMultiplyVariableTime(
Note: See TracChangeset
for help on using the changeset viewer.