Skip to content

Patch11#7

Open
lovesh wants to merge 6 commits into
mainfrom
patch11
Open

Patch11#7
lovesh wants to merge 6 commits into
mainfrom
patch11

Conversation

@lovesh

@lovesh lovesh commented May 25, 2026

Copy link
Copy Markdown
Contributor
  • Add missing relation for asset-id for public auditor keys
  • Add missing check in split proof
  • Fix bug in mediator enc key index
  • Remove potentially problematic relation
  • Use newer branch of curve tree containing fixes
  • Update specs and build script
  • Update serialized objects for testing

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the dart-bp proof system to better align implementation and specifications around leg encryption/proofs (including public auditor keys and asset-id handling), and expands documentation of the W1/W2/W3 workflow splits across protocols.

Changes:

  • Refactors parts of LegCreationProof to adjust/streamline key relations and transcript contributions (including adding an r_4 component for public encryption keys when asset-id is encrypted).
  • Updates account/common verification plumbing around the encryption-key generator index naming, and adds additional verification-length checks.
  • Significantly expands/updates the protocol specs in dart-bp/docs/*.md, plus minor CI/README/test-invocation updates.

Reviewed changes

Copilot reviewed 15 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/serialized_objects_test/main.rs Updates command comment for regenerating serialized vectors.
README.md Updates nextest invocation for running ignored tests for vector generation.
dart-bp/src/util.rs Updates verification logic to use renamed encryption-key generator index constant.
dart-bp/src/leg/leg_proof.rs Refactors leg creation proof relations/transcript contributions; adjusts public enc key handling and removes some prior relations.
dart-bp/src/key_distribution.rs Adds explicit length validation for response vectors during verification.
dart-bp/src/account/state.rs Renames encryption generator index constant and updates indexing.
dart-bp/src/account/common/balance.rs Adds Zeroize derives for split prover and adjusts iteration to avoid ownership issues.
dart-bp/src/account_registration.rs Adds clarifying comment about an unwrap() safety condition.
dart-bp/docs/6.md Adds detailed split-prover (W2/W3) variants for registration/top-up/fee flows.
dart-bp/docs/5.md Adds leg configuration documentation and expands split-prover details for affirmations / proof-of-balance.
dart-bp/docs/4.md Reworks leg encryption + leg-creation proof spec details (ephemeral key relations, public auditors, mediator proof).
dart-bp/docs/3.md Updates minting protocol spec to include encryption key handling and split-prover variants.
dart-bp/docs/2.md Adds split-prover variant section and corrects heading spelling.
dart-bp/docs/1.md Adds “Workflows” section describing W1/W2/W3 and their binding.
.github/workflows/dart-bp-tests.yml Updates nextest negative-test invocation to include mocking_tests.
Comments suppressed due to low confidence (1)

dart-bp/src/leg/leg_proof.rs:649

  • asset_id_point_blinding, l, and k (the re-randomization blindings for the asset leaf points) are not being zeroized anymore. These blindings can be sensitive: if leaked, they allow recovering the hidden asset encryption/mediator keys from re_randomized_points (and can deanonymize the asset). The previous Zeroize::zeroize(&mut blindings_for_points) covered them, but that call was removed during the refactor.

Consider explicitly zeroizing these values after they’re no longer needed (after the protocols are built).

        Zeroize::zeroize(&mut asset_id_blinding);
        Zeroize::zeroize(&mut at);

        Zeroize::zeroize(&mut l_blindings);
        Zeroize::zeroize(&mut l_r_1_blindings);
        Zeroize::zeroize(&mut m_blindings);
        Zeroize::zeroize(&mut m_r_1_inv_blindings);
        Zeroize::zeroize(&mut k_blindings);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dart-bp/src/account/common/balance.rs Outdated
Comment thread dart-bp/src/account/state.rs
Comment thread dart-bp/docs/1.md Outdated
Comment thread dart-bp/src/key_distribution.rs Outdated
Comment thread dart-bp/src/leg/leg_proof.rs Outdated
)?;
p_3.challenge_contribution(
&public_enc_keys[i],
leg_enc.eph_pk_public_enc_keys[i].r4.as_ref().unwrap(),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No unwraps.

@lovesh lovesh force-pushed the patch11 branch 4 times, most recently from 3cd5dee to 999ceca Compare June 1, 2026 09:53
@lovesh lovesh changed the title Add missing relation for asset-id for public auditor keys, remove un-… Patch11 Jun 1, 2026
@lovesh lovesh force-pushed the patch11 branch 4 times, most recently from be0046b to 79cdf0e Compare June 9, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants