The W-OTS primitives including implemented in Zig including:
DRNG
PrivatKey
PublicKey
Signature
I'm using the AEAD primitives
(ChaCha20Poly1305
) to generate a fast and portable deterministic random numbers.
With this primitive, it should be possible to implement a WOTS with constant disk space,
as we only need to persist the last used nonce
.
The 12-byte nonce, facilitates 2^96 key generations. We need to invoke the DRNG 64-times,
to generate key material for each Signature
in the default (128-bit security) setting.
This means that 2^90 (2^96 / 2^6) Signatures can be produced from each seed.
Key reuse is the weekness of the this DRNG. The probability of key re-use is equivalent to the ChaCha20-Poly1305 cipher in TLS. TODO: link to relevant security analysis.