-
Notifications
You must be signed in to change notification settings - Fork 173
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
Scalar::pow not ergonomic between two Scalars #11
Comments
Perhaps instead we could implement |
That implementation will apply the montg. reduction I assume no? pub const fn from_raw(val: [u64; 4]) -> Self {
(&Scalar(val)).mul(&R2)
} We could mabe call it What about implement |
For the It might still be useful for it to also accept same-typed field elements (or perhaps elements implementing a specific |
…kcrypto#11) * wip: Remove unnecessary copies in miller loop * finish zkvm version of addition_step (zkcrypto#10) * remove even more copies in Fp::sum_of_products * fix: Remove debug cycle-tracking prints --------- Co-authored-by: Arthur Paulino <[email protected]>
Exponentiation between two scalars is currently difficult because exponentiation is implemented as
fn pow(&self, by: &[u64; 4]) -> Self
. WhilstScalar::to_bytes
converts to a little endian byte encoded integer, it is not directly usable for pow as it does not yield an array of[u64; 4]
.Consider adding a variant of pow that directly accepts Scalars.
The text was updated successfully, but these errors were encountered: