java.lang.Object
net.i2p.crypto.eddsa.math.bigint.BigIntegerScalarOps
- All Implemented Interfaces:
Serializable, ScalarOps
BigInteger-based implementation of scalar operations for EdDSA cryptography.
This class provides fundamental scalar arithmetic operations required for EdDSA signature schemes, including modular reduction and scalar multiplication with addition. All operations are performed modulo the subgroup order l, ensuring results remain within the valid scalar range for EdDSA operations.
- See Also:
Constructor Summary
ConstructorsMethod Summary
All MethodsModifier and TypeMethodDescriptionbyte[]multiplyAndAdd(byte[] a, byte[] b, byte[] c) Multiply a by b, add c, and reduce modulo the group order.byte[]reduce(byte[] s) Reduce the given scalar modulo the group order.
Constructor Details
BigIntegerScalarOps
Create a BigIntegerScalarOps.- Parameters:
f- the finite fieldl- the group order (subgroup size)
Method Details
reduce
multiplyAndAdd
public byte[] multiplyAndAdd(byte[] a, byte[] b, byte[] c) Multiply a by b, add c, and reduce modulo the group order.- Specified by:
multiplyAndAddin interfaceScalarOps- Parameters:
a- The first scalar.b- The second scalar.c- The third scalar.- Returns:
- the reduced product-plus-sum, encoded