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

refactor!: expose random public parameter generation #207

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

Dustin-Ray
Copy link
Contributor

@Dustin-Ray Dustin-Ray commented Oct 2, 2024

Rationale for this change

If PublicParameters are generated within sxtDB and not an argument passed in via protobuf, then we need a way to randomly generate the setup within external crates such as sxtdb. This PR exposes a trait bounded method requiring a CSRNG which generates the public parameters securely.

What changes are included in this PR?

  • exposes a crpytographically secure method for public parameter generation
  • rename existing rand to test_rand
  • refactor feature gates

Are these changes tested?

existing tests pass

@Dustin-Ray Dustin-Ray changed the title refactor: random g1 vecs for public parameters refactor: random G1 and G2 vecs for public parameters Oct 2, 2024
@Dustin-Ray Dustin-Ray changed the title refactor: random G1 and G2 vecs for public parameters refactor: expose random G1 and G2 vec method for public parameters Oct 2, 2024
@Dustin-Ray Dustin-Ray force-pushed the refactor/random-g1-vecs-for-public-parameters branch from 261cc7d to b9d5aba Compare October 2, 2024 20:54
@Dustin-Ray Dustin-Ray force-pushed the refactor/random-g1-vecs-for-public-parameters branch 2 times, most recently from ea42e51 to 78b4c33 Compare October 2, 2024 23:24
@Dustin-Ray Dustin-Ray marked this pull request as ready for review October 3, 2024 04:05
@Dustin-Ray Dustin-Ray force-pushed the refactor/random-g1-vecs-for-public-parameters branch from fc883da to 86791dc Compare October 3, 2024 04:29
@Dustin-Ray Dustin-Ray changed the title refactor: expose random G1 and G2 vec method for public parameters refactor: expose random public parameter generation Oct 3, 2024
@Dustin-Ray Dustin-Ray force-pushed the refactor/random-g1-vecs-for-public-parameters branch 2 times, most recently from 0ffe3df to f4264d7 Compare October 3, 2024 04:33
@Dustin-Ray Dustin-Ray changed the title refactor: expose random public parameter generation refactor!: expose random public parameter generation Oct 3, 2024
… sxt-db

fmt

revert function name change

rand impl for public parameters

refactor

fix! rename rand functions

test feature flag
@Dustin-Ray Dustin-Ray force-pushed the refactor/random-g1-vecs-for-public-parameters branch from f7c5f97 to 644022e Compare October 3, 2024 04:57
Copy link
Contributor

@JayWhite2357 JayWhite2357 left a comment

Choose a reason for hiding this comment

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

LGTM

@Dustin-Ray Dustin-Ray merged commit 88e09d0 into main Oct 3, 2024
11 checks passed
@Dustin-Ray Dustin-Ray deleted the refactor/random-g1-vecs-for-public-parameters branch October 3, 2024 05:35
Copy link

github-actions bot commented Oct 3, 2024

🎉 This PR is included in version 0.26.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants