Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: move RNGs into RangeProofTranscript #111

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

AaronFeickert
Copy link
Contributor

@AaronFeickert AaronFeickert commented Jan 12, 2024

Recent work in #109 uses Merlin's TranscriptRng functionality to improve handling of random number generation, and also refactors transcript operations for safer use through a RangeProofTranscript wrapper.

A suggestion by @sdbondi recommends moving the TranscriptRng into RangeProofTranscript so the prover and verifier aren't responsible for it. This PR adds such a change.

It also updates RangeProofTranscript to hold a mutable reference to the external random number generator. This ensures that the prover and verifier can't accidentally use it instead of the TranscriptRng.

@AaronFeickert AaronFeickert marked this pull request as ready for review January 12, 2024 18:00
@AaronFeickert AaronFeickert changed the title feat: move TranscriptRng into RangeProofTranscript feat: move RNGs into RangeProofTranscript Jan 12, 2024
Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

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

ACK

src/transcripts.rs Outdated Show resolved Hide resolved
Copy link
Member

@sdbondi sdbondi left a comment

Choose a reason for hiding this comment

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

Looks great!

@hansieodendaal hansieodendaal merged commit 854dd88 into tari-project:main Jan 15, 2024
7 checks passed
@AaronFeickert AaronFeickert deleted the transcript-rng branch January 15, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants