wotsSign static method
void
wotsSign()
Signs a message using WOTS
Implementation
static void wotsSign(
Uint8List sig,
Uint8List msg,
Uint8List seed,
Uint8List pubSeed,
int offset,
Uint8List addr,
) {
if (msg.length < PARAMSN) {
throw ArgumentError('WOTS message must be $PARAMSN bytes');
}
final lengths = List<int>.filled(WOTSLEN, 0);
chainLengths(msg, lengths);
expandSeed(sig, seed);
final seed32 = pubSeed.sublist(offset, offset + PARAMSN);
final bbaddr = addressBuffer(addr);
for (int i = 0; i < WOTSLEN; i++) {
WOTSHash.setChainAddr(bbaddr, i);
genChain(
sig, i * PARAMSN, sig, i * PARAMSN, 0, lengths[i], seed32, bbaddr);
}
}