Repository navigation
fix(core): G1 round 1 fixes for tablepro-keys vectors and hardening - #4568
Merged
Merged
Conversation
… opens every object
…s, keep nonce sealers private
…erts each bad object's code
datlechin
enabled auto-merge (squash)
November 26, 2026 01:59
datlechin
added a commit
that referenced
this pull request
Nov 26, 2026
…l the reveal, and a restart before it ends the session K5 draws r_N and r_A inside Comparison, so the row keeps a step's values only once the step is taken. A session read back without its comparison before the reveal ends with this side's cancel, and N asks again. The approval vectors read the keys crate's flows.json now that #4568 is 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.
Summary
verifyrefuses. A unit test fails if the small-order check goes.keys.signature, 160-180 verify.flows.jsonexports every fixture device's DEK and DSK, and P from C.givenand checks each signature itsverifynames. It opens every wrap, ring, recovery blob and envelope through the recipient's own path, and checks request commitments and reveals against real SAS values.verifyhaserrormust fail with exactly that code.sas_words_differcomparesother_words,history_entrycompares the opened entry, and the ring walk verifies each version record and gives every ring's frame.keys.not_compared(0059).limits.json, the secondtoo_large;words_differ;json.rs:push_stringwrites\u00XXwithoutformat!.TrustPlaintext::encodewrites into a buffer sized by a counting pass, andseal_trustkeeps it inZeroizing.parseholds its tree inZeroizing.JsonValue::encoded_lenandstring_lenuse that counting pass.EnvelopeId::parsechecks the id's length first.newchecks the parent id and a plugin or AI key name before copying either.check_record_idstops counting past 255 UTF-16 units.Ring::seal_with_nonce,RecoveryKey::seal_blob_with_nonce,seal_envelope_plaintextandseal_history_plaintextarepub(crate). The rest of the public surface is unchanged.trust.jsonandlimits.jsonstate the account-id step.encoding.jsonsays how the 65,535 and 65,536 byteLPcases expand.KeysError's comment cites 0059's amended Errors table.keys.signature. Dropping either form check fails them.library_takes_itis nowaws_lc_rs_takes_it, given only for the canonical points of small order, since AWS-LC's Windows build also takes the x = 0 sign-bit encodings.Wrap::seal_trustand opens the result.TrustPlaintext::encode()returnsZeroizing<String>.JsonValue's zeroize wipes booleans. The trust types'Debugprints no account, IK or digest.Comparison::new_deviceandComparison::approverdraw r_N and r_A themselves, andComparison::nonce()gives r_A. The explicit forms anddpop::proof_with_jtiarepub(crate).fieldspast 1 MiB are refused before parsing.limits.jsongainsread.checksthe checker runs through the crate: 7keys.stale, 2keys.conflict, 1keys.session. The checker's base64 length andsas_words_differcodes come fromdecode_exactandComparison::words_differ.keys.not_holder,keys.retired_ik,keys.restart_held, the own-device-pinkeys.not_comparedand the replace-during-sessionkeys.sessionare the flows' to decide, with no crate function.fit_recordwalks the pins once.KeysError::RestartHeld,keys.restart_held.key.accountbody with noreplace_sigis a malformed body under 0051's body rule:keys.encoding, serverbad_statement. Its case now sits under the encoding row. Row 442 keeps the well-formed wrong-endorser case,keys.unendorsed. 0059's "or that has none" gets its wording fix in the next amendment.Test plan
cargo test -p tablepro-keys: 76 pass, includingevery_negative_row_of_adr_0056_has_a_case,the_vectors_are_what_the_generator_writesandevery_committed_case_holds. The vectors were generated twice, byte for byte the same.small_orderremoved fromverify, the forgery test fails;ik_changeandopen_checked, two unit tests andevery_committed_case_holdsfail.cargo clippy -p tablepro-keys --all-targets -D warningsandcargo fmt --checkare clean.verify.sh --platform linux --jobs 4 test tablepro-keyson df000be: PASS, 76 of 76.