sub static method
Subtracts one scalar value from another and returns the result as a List<int>
.
This method subtracts scalar2
from scalar1
and stores the result in the out
List<int>
.
The subtraction is performed according to Ristretto255 scalar operations.
Parameters:
- scalar1: The scalar value to subtract from.
- scalar2: The scalar value to subtract.
Returns:
A List<int>
representing the result of the subtraction.
Implementation
static List<int> sub(List<int> scalar1, List<int> scalar2) {
final out = List<int>.filled(32, 0);
CryptoOps.scMulAdd(out, CryptoOpsConst.scMinusOne, scalar2, scalar1);
return BytesUtils.toBytes(out);
}