Repository navigation
feat(tsp-js)!: TSP 1.0 (YTSP-BAA) — refuse the Rev 2 and Rev 3 drafts, require the sender VID - #374
Merged
Merged
Conversation
…, require the sender VID Moves @openvtc/vti-tsp-js to the released TSP 1.0 specification (trustoverip/tswg-tsp-specification ccda6b3, PR #86), in step with affinidi-tsp 0.3.0 and tsp_sdk 0.16.0. - Packs YTSP-BAA (1.0). unpack, decodeEnvelope and peekRevision refuse every MAJOR but 1 as E_TSP_REVISION, naming the version found — Rev 3 (AAC), its pre-merge draft (ABA) and Rev 2 (AAB) included. - A payload whose ESSR sender field is the NULL VID is refused (spec 3.2, 3.7 step 7). Packing unchanged: the sender VID was always written. - The Rev 2 reader and its dispatcher arm are deleted, with UnpackKeys.senderEncryptionKey, the revision field and type, and the Rev 2 cesr constants. src/rev3/ is src/v1/. KNOWN_MINORS is KNOWN_VERSIONS; describeVersion added. - Appendix A vectors replaced with 1.0's (identical to affinidi-tsp 0.3.0's); control-rfi-referral opened and Signature_new verified. The Rust interop vector is now packed by affinidi-tsp 0.3.0, and a message packed here was opened by that crate with a matching thread digest. - 0.3.0 -> 0.4.0. core: takes ^0.4.0; unpack no longer passes the Rev 2-only sender X25519 key. CLAUDE.md: the TSP Rev 2 exception is gone. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves
@openvtc/vti-tsp-jsto the released TSP 1.0 specification (tswg-tsp-specification#86,ccda6b3), in step withaffinidi-tsp0.3.0 (affinidi/affinidi-tdk-rs#967, published) and the referencetsp_sdk0.16.0.The change
YTSP-BAA(1.0), wasYTSP-AAC(Rev 3).unpack,decodeEnvelopeandpeekRevisionrefuse every MAJOR but 1 asE_TSP_REVISION, naming the version found — Rev 3 (AAC), its pre-merge draft (ABA) and Rev 2 (AAB) included, all of which this package used to read.rm" CLAUDE.md anticipated), with its dispatcher arm,UnpackKeys.senderEncryptionKey, therevisionfield/type and the Rev 2cesrconstants.src/rev3/→src/v1/.KNOWN_MINORS→KNOWN_VERSIONS;describeVersionadded. CLAUDE.md's "TSP Rev 2 exception" paragraph now says the exception is gone and why.^0.4.0and stops passing the Rev 2-only sender X25519 key.Not backwards compatible on the wire. The wallet and any VTA it talks TSP to must both be on 1.0 — VTA on
affinidi-tsp0.3 /affinidi-messaging-sdk0.39. A VTA on 0.2.x is refused by name (E_TSP_REVISION), and refuses ours.Evidence
tests/fixtures/spec-v1-vectors.json, identical to affinidi-tsp 0.3.0's, checked against the spec text andtsp_sdk0.16.0's JSON): all HPKE-Base vectors open; the six we can pack re-pack byte for byte; newcontrol-rfi-referralopened and itsSignature_newverified.affinidi-tsp0.3.0: a message it packed opens here with a matching thread digest (tests/interop.rust-vector.mjs), and a message packed here with the same fixed keys was opened by itsdirect::unpack— payload, sender, receiver, digest all match.npm run lint,npm run build,npm testall green across workspaces: tsp-js 123/123, core 1070 pass / 0 fail (2 pre-existing schema skips), extension 1308/1308.Release:
@openvtc/vti-tsp-js0.3.0 → 0.4.0 (needs publishing for core's^0.4.0to resolve outside the workspace).@openvtc/pnm-corehas an Unreleased CHANGELOG entry.Pre-merge checklist
E_TSP_REVISIONlike any other refused frame