[Feature] Check the RFC 3161 nonce echo on import #563
Labels
No labels
accepted
bug
declined
docs
duplicate
enhancement
good first issue
in-progress
needs-info
privacy
security
triage
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
LibreKAT/Ocideck#563
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The request already carries a random nonce, and RFC 3161 §2.4.2 obliges the TSA to echo it back. That echo binds one request to one token and defeats replay of an older token for the same imprint. OciDeck sends it but never checks it: the deck does not keep the nonce, so after a restart the other half is gone.
The reason originally recorded for not keeping it — that a new key would clash with the seal's in-flight move to a sidecar — has lapsed. That move landed, and
<name>.seal.jsonis now exactly where an opaque, document-scoped value like this belongs.rfc3161_timestamp.dartsays so itself; what is left is the decision to build it.Shape:
SealRecordgains the pending request nonce (hex). Additive key in.seal.json, no version bump — older builds must keep ignoring it rather than refusing the whole sidecar._exportTsqstores the nonce it generated;_importTsrcalls the existingtimeStampEchoesNonceand refuses a token that does not echo it.Explicitly NOT in scope: CMS signature and certificate-chain verification of the token. That reasoning is recorded in
rfc3161_timestamp.dartand SECURITY_DESIGN §9 and still holds — X.509 path validation means a new dependency plus a bundled trust-anchor list that ages by definition, in an application that makes no network connection and promises tamper-evidence, not tamper-proofing.Split out of #516 so that issue can close once its remaining items are done.