-
Notifications
You must be signed in to change notification settings - Fork 2
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: add u32 related hash functions #27
Conversation
// Perform rejection sampling over the uniform range (0..log2_ceil(p)) | ||
let sample_base = |inner: &mut Inner| loop { | ||
let log_size = log2_ceil_u64(F::ORDER_U64).saturating_sub(1); | ||
let bound = (1 << log_size) - 1; |
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.
The plonky3 sampling uses rejection sampling (probably changes since the last time you update the branch), so we should keep that in our versions as well
blake3/src/lib.rs
Outdated
@@ -35,3 +35,35 @@ impl CryptographicHasher<u8, [u8; 32]> for Blake3 { | |||
hasher.finalize().into() | |||
} | |||
} | |||
|
|||
impl CryptographicHasher<u32, [u32; 8]> for Blake3 { |
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 think that we should have another struct Blake3zk
or something that uses our precompiles, it could even be in the sp1 recursion crate. The reason is that we would eventually want the normal Blake3 to implement hashing on u32
(this might be useful for SIMD utilization. of the prover)
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
- succinctlabs/plonky3#27 updated `SerializingChallenger32` to take a type parameter for an initial `HashChallenger` state, - Updates the `Challenger` type definition in the `baby_bear_keccak` and `baby_bear_blake3` modules to reflect what typed is used there (u8).
No description provided.