Package net.i2p.crypto.eddsa.math.bigint
Class BigIntegerScalarOps
- java.lang.Object
-
- net.i2p.crypto.eddsa.math.bigint.BigIntegerScalarOps
-
-
Constructor Summary
Constructors Constructor Description BigIntegerScalarOps(Field f, BigInteger l)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
multiplyAndAdd(byte[] a, byte[] b, byte[] c)
r = (a * b + c) mod lbyte[]
reduce(byte[] s)
Reduce the given scalar mod l.
-
-
-
Constructor Detail
-
BigIntegerScalarOps
public BigIntegerScalarOps(Field f, BigInteger l)
-
-
Method Detail
-
reduce
public byte[] reduce(byte[] s)
Description copied from interface:ScalarOps
Reduce the given scalar mod l.From the Ed25519 paper:
Here we interpret 2b-bit strings in little-endian form as integers in {0, 1,..., 2^(2b)-1}.
-
multiplyAndAdd
public byte[] multiplyAndAdd(byte[] a, byte[] b, byte[] c)
Description copied from interface:ScalarOps
r = (a * b + c) mod l- Specified by:
multiplyAndAdd
in interfaceScalarOps
- Returns:
- (a*b + c) mod l
-
-