Verifies deliveries from one sender with one key. Construct it once, next to
the route it protects. Holds no state between deliveries; replay memory is
yours, through rememberReplayKey.
Every delivery goes through the same steps, and the first that fails is the
refusal:
Step
Refusal
signature header present, once
missing-header, malformed-header
header parses, signatures decode
malformed-header
timestamp and id present and well formed
missing-header, malformed-header
one candidate signature verifies over the signed bytes
bad-signature
signed timestamp within the tolerance, edges included
timestamp-out-of-range
rememberReplayKey says the key is new
replayed
The signature is checked before the timestamp so that a forged delivery is
always bad-signature, and keys are remembered only for deliveries that
passed, so a forger cannot fill your replay store.
Verifies deliveries from one sender with one key. Construct it once, next to the route it protects. Holds no state between deliveries; replay memory is yours, through
rememberReplayKey.Every delivery goes through the same steps, and the first that fails is the refusal:
missing-header,malformed-headermalformed-headermissing-header,malformed-headerbad-signaturetimestamp-out-of-rangerememberReplayKeysays the key is newreplayedThe signature is checked before the timestamp so that a forged delivery is always
bad-signature, and keys are remembered only for deliveries that passed, so a forger cannot fill your replay store.