| Modifier and Type | Field and Description |
|---|---|
private BigIntegerLittleEndianEncoding |
enc |
private java.math.BigInteger |
l |
| Constructor and Description |
|---|
BigIntegerScalarOps(Field f,
java.math.BigInteger l) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
multiplyAndAdd(byte[] a,
byte[] b,
byte[] c)
$r = (a * b + c) \bmod l$
|
byte[] |
reduce(byte[] s)
Reduce the given scalar mod $l$.
|
private final java.math.BigInteger l
private final BigIntegerLittleEndianEncoding enc
public BigIntegerScalarOps(Field f, java.math.BigInteger l)
public byte[] reduce(byte[] s)
ScalarOps
From the Ed25519 paper:
Here we interpret $2b$-bit strings in little-endian form as integers in
$\{0, 1,..., 2^{(2b)}-1\}$.
public byte[] multiplyAndAdd(byte[] a,
byte[] b,
byte[] c)
ScalarOpsmultiplyAndAdd in interface ScalarOpsa - a scalarb - a scalarc - a scalar