Conversation
The merged specification (trustoverip/tswg-tsp-specification f5b8668) moved the vectors to YTSP-AAC, changing every message and the control vectors' SAID digests. Replace the pre-merge YTSP-ABA fixture, fix the tests that asserted MINOR 64, and pin one pre-merge ABA message so reading it stays covered. Comment and changelog text only; library behaviour is unchanged. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
Add a test-only ./unsafe-testing subpath whose __unsafeDeterministicPack* functions derive the HPKE-Base ephemeral from a caller-fixed ikmE (RFC 9180 DeriveKeyPair) and can write the NULL VID in the ESSR sender field. The main entry point's packers are unchanged and never forward either knob; a fixed ephemeral key breaks confidentiality, and the subpath exists only to reproduce published vectors. All six HPKE-Base vectors (direct-hpke-base, control-rfi-direct, control-rfa-direct, control-rfd, nested-direct, routed) now re-pack byte for byte, with every input derived from the vector's printed payload. The sealed-box, signed-only and post-quantum vectors are named with the reason they cannot be. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
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.
This PR targets
feat/tsp-rev2-rev3-dual-handler, like #249, #250 and #251.1. Vectors move to the merged spec.
tests/fixtures/spec-rev3-vectors.jsonheld the pre-mergeYTSP-ABAvectors. It now holds the Appendix A vectors from trustoverip/tswg-tsp-specification@f5b8668 (YTSP-AAC), which changed every message and the control-message digests.2. Byte-exact re-pack. tsp-js could open the vectors but not reproduce them, so an encoder bug that two implementations share went undetected. A new subpath,
@openvtc/vti-tsp-js/unsafe-testing, exports__unsafeDeterministic*packers.ikmE(RFC 9180 DeriveKeyPair).Reviewer decision: the subpath is listed in
package.jsonexports, so it ships in the published package, clearly named. If you'd rather it not ship at all, the alternative is a test-only import fromdist/.Results:
direct-hpke-base,control-rfi-direct,control-rfa-direct,control-rfd,nested-direct,routed.direct-sealed-box,control-rfi-sealed-boxanddirect-signed-onlyaren't covered, because tsp-js has no packer for those schemes.direct-hpke-base-pqpublishes no ephemeral material.Tests:
npm test: 124 pass.tests/tsp.*.mjs: 33 pass.pack-exactcases pass for tsp-js on the same six vectors.