Repository navigation
feat(threshold): add context-bound derivation and FullIdent wrapping - #482
Merged
Merged
Conversation
Details: TC-2219
Details: TC-2219
Details: TC-2219
samgbafa
marked this pull request as ready for review
October 29, 2026 20:46
Details: TC-2219
Merged
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.
Change
Adds the unwired
tinycloud-thresholdworkspace member for TC-2219 / TC-2092: canonical encodings, typed identities, FullIdent wrapping, context-bound encrypted member shares, individual verification, interpolation and reader unmasking. No workspace crate depends on it; default-members is unchanged; publishing and release-plz releases are disabled.SPEC.md records §§3.0–3.12 and marks §§3.1–3.6 frozen. Approved §3.6 amendment: encoded shares include the request digest, also explicit in the response signing preimage, so identity/tpk transplants return
ContextMismatchbefore algebra. The named S6 test isrequest_transplants_fail_before_algebra.Local verification (Rust 1.97.1)
cargo test --locked -p tinycloud-threshold: 44 passed, 0 failed; 0 doctests.cargo test -p tinycloud-threshold checkpoint_2of3 -- --nocapture: one test printed and passed outcomes 1–9.PROPTEST_CASES=1024 cargo test --locked -p tinycloud-threshold --release: 44 passed, 0 failed; 0 doctests.cargo clippy -p tinycloud-threshold --all-targets -- -D warnings: passed.cargo fmt --all -- --check: passed.cargo deny --manifest-path tinycloud-threshold/Cargo.toml --locked --config tinycloud-threshold/deny.toml check licenses bans advisories sources: all four checks passed using 0.20.2. The CLI places--configbeforecheck.Named coverage includes
checkpoint_2of3,request_transplants_fail_before_algebra,both_share_equations_and_deduplication,all_threshold_subsets_and_zero_aggregate_masks,fullident_integrity_degenerate_randomness_and_redacted_secrets,decoded_structures_enforce_roles_lengths_and_network, random/structured reject-or-canonical decoder properties, and identity roundtrip/injectivity properties.RFC tests:
rfc9380_appendix_j_g1_sswu_ro,rfc9380_appendix_j_g2_sswu_ro,rfc9380_appendix_k1_expand_xmd_sha256. Vector files:primitives.json,rfc9380-g1.json,rfc9380-g2.json,rfc9380-k1.jsonundertinycloud-threshold/vectors/v1/. The primitive fixture regenerated byte-for-byte in both complete suites.CI and separate-session checker
The
thresholdjob defines the full 1024-case release suite, selected dependency policy and unconditionalbun install --frozen-lockfile && bun run checkstep invectors/check/. Existing workspace build/test/clippy/fmt jobs also cover the crate.Draft handoff: acceptance item 10 (the separate-session checker) and its CI result are pending that session's contribution. The checker step is not conditionally skipped. No checker result or green full-CI result is claimed here.
Dependencies and licence
The crate uses the workspace EGPL v1.5 through
license-file = "../LICENSE.md"andpublish = false. The crate-scoped cargo-deny policy includes development/build dependencies and restricts the EGPL clarification to this package with licence-file hash0x2a86e8e4.Clean-room statement
PROVENANCE
f701d2be11bc525395ecfde7cc8c9c09bdde51ba56b88b476900090d605b4d14: protocol equations, domains, field roles, frozen encodings, context boundaries and acceptance scenarios. SPEC.md carries §3, with neutral wording and the explicit request-digest amendment.hashliband integer arithmetic, following RFC 9380: independent scalar reduction/H2/H3/H4/tagged-hash known answers and off-curve fixture arithmetic; no other curve/scheme implementation.request_transplants_fail_before_algebracovers its S6 behavior.Details: TC-2219
Signing helper API update
At
d91c16c8e9e4b43006f1a8942952f935a7005c51,EncryptedKeyShare::signing_preimagereturnsResult<Vec<u8>, Error>and requires the supplied request digest to equal the digest carried by the share. Valid signing-preimage bytes and all committed vectors are unchanged. Changes are limited tosrc/derive.rs,src/checkpoint.rsand the necessary valid-call migration insrc/vectors.rs.The focused changed-record-nonce regression passed. The affected crate suite passed 45 tests; crate-scoped clippy with
-D warningsand formatting passed. A standalone public-API executable matched all three committed valid preimages and exercised the request-match result.test-ruling: TC-2219
This ruling covers only the mechanical updates to existing test callers for the new
Resultreturn. No assertion changed.