Package net.i2p.crypto.eddsa.math
Interface ScalarOps
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
BigIntegerScalarOps
,Ed25519ScalarOps
public interface ScalarOps extends Serializable
- Since:
- 0.9.15
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
reduce
byte[] reduce(byte[] s)
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}.- Parameters:
s
-- Returns:
- s mod l
-
multiplyAndAdd
byte[] multiplyAndAdd(byte[] a, byte[] b, byte[] c)
r = (a * b + c) mod l- Parameters:
a
-b
-c
-- Returns:
- (a*b + c) mod l
-
-