Commit graph

1 commit

Author SHA1 Message Date
randogoth
9d5908104e feat: add protocol test vectors generated from the reference implementation
Known-answer tests for every part of the protocol that produces bytes: key
derivation, sealed envelopes with their intermediate values, accept tokens,
session and registration frames, rotation certificates, frontmatter parsing,
and the inputs a conformant implementation must refuse.

vectors.py derives every value by calling smolmail.py, so the vectors cannot
drift from the code, and verifies each one from the opposite side before
emitting it. --check regenerates and diffs against the committed files.

Verified independently: a checker written against SPEC.md and libsodium alone,
without importing the reference, reproduces all 81 values.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-14 16:06:08 +03:00