-
Notifications
You must be signed in to change notification settings - Fork 248
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
Split pedersen
into stark_curve
and stark_hash
#282
Conversation
6198629
to
2a2d44e
Compare
pedersen
into stark_curve
and pedersen_hash
pedersen
into stark_curve
and stark_hash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Just a minor update to the doc comment needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate to see the reference impl go but the risk probably isn't there. U32 -> NonZeroU8 could be spread more.
c8292f3
to
0ffbd29
Compare
stark_curve contains the math parts of the curve, and pedersen hash contains the code implementing the hash function. This will make it possible to move the pre-computation of values used by the hash function into a build script in pedersen_hash.
Instead of having the code run as an ignored unit test.
Keep the generator in case we need signatures later.
It was only being used by the benchmark.
cargo bench output: pedersen_hash time: [44.102 us 44.112 us 44.123 us] change: [-49.728% -49.555% -49.414%] (p = 0.00 < 0.05) Performance has improved.
0ffbd29
to
e32e249
Compare
This allows us to remove
curve_consts.rs
and generate it from a build script instead.