Package net.i2p.crypto.eddsa.math.bigint
Class BigIntegerScalarOps
java.lang.Object
net.i2p.crypto.eddsa.math.bigint.BigIntegerScalarOps
- All Implemented Interfaces:
Serializable,ScalarOps
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]multiplyAndAdd(byte[] a, byte[] b, byte[] c) $r = (a * b + c) \bmod l$byte[]reduce(byte[] s) Reduce the given scalar mod $l$.
-
Constructor Details
-
BigIntegerScalarOps
-
-
Method Details
-
reduce
public byte[] reduce(byte[] s) Description copied from interface:ScalarOpsReduce 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) \bmod l$- Specified by:
multiplyAndAddin interfaceScalarOps- Parameters:
a- a scalarb- a scalarc- a scalar- Returns:
- $(a*b + c) \bmod l$
-