Repository navigation
test(e2ee-core): independent Python cloud-machines v1 base format vectors (3R-1) - #3890
Merged
Merged
Conversation
… vectors (3R-1) Add independent Python generator and deterministic JSON vectors for the v1 cloud-machine registry (specs/e2ee/formats-v1.md from PR #3859, feat/e2ee-cloud-machines-v1-base @ 64d3fef), leaving existing non-cloud-machine ledger vectors untouched: - Positive 11-record chain (pos 0..10): genesis, cap [1,2], member/admin, personal machine, tag 14 initial admission + possess-cloud/v1, tag 14 in-place rekey preserving generationId, tag 15 revoke, and tag 16 revoke + epoch 1 rotation (with real XChaCha20-Poly1305 historyPacket). - 12-element stateDigestInput with cloudMachinesRoot and 23-element SnapshotV7 ([18..22]) + SnapshotManifestV7 at pos 0 (empty) and pos 10. - Quota boundary SnapshotV7 scenarios: 64 active (in-place rekey allowed, 65th initial rejected) and 512 lifetime (both initial and rekey rejected). - 15 additional negative cases: bidirectional machineId conflicts, cross-table component key reuse (ML-DSA-65, P-384, retired X-Wing, active Ed25519 transport), cloud machine signing tag 13, nonexistent / already-revoked / regular-device targets for tags 15 & 16, unauthorized machine signer, rekey machineId mismatch, and possess-cloud/v1 digest mismatch. Model: gemini-4-neon
…vector Verify all 11 records, state digests, SnapshotV7/ManifestV7, possess-cloud/v1 evidence, 64/512 quota boundaries, and all 15 counterexamples against main's @lody/e2ee-core implementation. Also adjust synthetic quota base snapshot positions (128 -> 130, 515 -> 517) so appended test records do not land on mandatory 129*k tag-13 checkpoint positions, and update specRevision to main. Model: gemini-4-neon
zxch3n
marked this pull request as ready for review
December 5, 2026 12:44
… vector - Unify possess-cloud-digest-mismatch expectedError to bad-proof (matching @lody/e2ee-core since formats-v1 §5 does not mandate an error code) and read expectedError from the vector in the TS test. - Compute the true position-128 stateDigest (44d083d9...) for the cloud-machine-signs-tag-13 counterexample so it fails solely on unauthorized. - Build the lifetime512 base snapshot from a legal 511-step in-place rekey chain sharing one machineId and generationId. Model: gemini-4-neon
…ries Replace synthetic cloud-machine rows and heads in quotaScenarios with full signed ledger replays from genesis (real ML-DSA-65/P-384/X-Wing/Ed25519 key bundles, real possess-cloud/v1 evidences, and real tag-13 checkpoints at positions 129, 258, 387, 516 for lifetime512; 66 records for active64). Store seed scheme, checkpoint summaries, and final snapshots in JSON and verify the final head, state digest, and 512-row rekey chain in the TS test. Model: gemini-4-neon
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.
Summary
specs/e2ee/formats-v1.mdonmain(post-feat(e2ee): cloud-machine registry in the v1 base ledger (tags 14–16) #3859):packages/e2ee-core/test/generate-cloud-machines-v1-vector.pypackages/e2ee-core/test/cloud-machines-v1-vector.json(SHA-256:d56bbe7f28fe259786d0de7d043230b8d6c9740a38a905df1c0b3fc41bf3de2e, reproducible byte-for-byte)packages/e2ee-core/test/ledger/cloud-machines-v1-vector.test.ts(TS byte-for-byte verifier against@lody/e2ee-core)Coverage
[1, 2], tag 1 Bob, tag 3 Bob→Admin, tag 4 personal machinemachine/é.cloud/alpha-é) withpossess-cloud/v1evidence, tag 14 in-place rekey by Admin Bob preservinggenerationId, tag 15 revoke (cloud/beta, settingrotationRequired = true), and tag 16 atomic revoke + epoch 1 publication (cloud/gamma, clearingrotationRequired, with XChaCha20-Poly1305historyPacketand staging recipients excluding cloud machines).stateDigestInput(withcloudMachinesRoot) and 23-elementSnapshotV7+SnapshotManifestV7at pos 0 (emptycloudMachines) and pos 10.device-quota-exceeded).machineIdandgenerationId+ 4 real tag 13 checkpoints at129, 258, 387, 516): both initial and in-place rekey rejected (device-quota-exceeded).machineIdconflicts (devices↔cloudMachines), 4 cross-table component key reuse cases (replay), cloud machine signing tag 13 with the exact pos-128stateDigest(44d083d9…, rejected solely asunauthorized), tag 15/16 nonexistent/already-revoked/regular-device targets (invalid-operation), non-personal machine signing tag 14 (unauthorized), rekeymachineIdmismatch (invalid-operation), andpossess-cloud/v1digest mismatch (bad-proof).Spec Note
specs/e2ee/formats-v1.md§5 does not specify a concrete error code for off-ledger possession evidence digest mismatch;possess-cloud-digest-mismatchadopts@lody/e2ee-core'sbad-proofand the TS test readsexpectedErrordirectly from the vector.