signWithScalarAndPublic function
Implementation
List<int> signWithScalarAndPublic(List<int> scalar, List<int> noncePrefix,
List<int> public, List<int> message,
{ED448_XOF xof = shake_256}) {
if (noncePrefix.length != 57) {
throw FormatException("Bad size of nonce prefix");
}
if (public.length != 57) {
throw FormatException("Bad public key length");
}
final a = _asLE(_clampedScalarBytes(scalar));
final r = _xofModQ(xof, MARKER + [0] + [0] + noncePrefix + message, 114);
final R = _pointMultiply(r, _G);
final Rs = _pointCompress(R);
final h = _xofModQ(xof, MARKER + [0] + [0] + Rs + public + message, 114);
final s = (r + h * a) % q;
return Uint8List.fromList(Rs + _toLE(s, 57));
}