Skip to content

blenessy/zig-wots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zig Tutorial: Wienernitz One Time Signature

The W-OTS primitives including implemented in Zig including:

  • DRNG
  • PrivatKey
  • PublicKey
  • Signature

DRNG Braindump

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.

About

W-OTS primitives implemented in Zig

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages