-
Notifications
You must be signed in to change notification settings - Fork 21
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
Consume gridiron 0.4 #21
Conversation
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 NonAdjacentForm trait isn't actually non adjacent form anymore. It's just the bit form of the value. We should change that name.
src/api.rs
Outdated
y * x | ||
} | ||
} | ||
// ///Duplicated here for the generate plaintext test |
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.
Delete this, if you would.
src/api.rs
Outdated
let rth_pow = pow_for_square(fp12, curve_order); | ||
assert_eq!(rth_pow, Fp12Elem::one()); | ||
} | ||
// #[test] |
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.
We should just delete this.
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.
Added a comment about rth roots for plaintext to gen_plaintext
/// | ||
/// Arguments: | ||
/// `hex_str` - need to be 63 or 64 bytes. Do not include a leading '0x' | ||
pub fn fp256_unsafe_from(hex_str: &str) -> fp_256::Fp256 { |
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.
Should we call this fp256_unsafe_from_hex
?
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 the param name hex_str
is a good enough hint.
* renamed NonAdjacentForm to BitRepr
Brings in the gridiron 0.4 and it's 31-bit (constant time!) implementations.
There are no changes to the public interface and bulk of the changes were switching over to hex for constants and test values from limbs.
Other changes
TODO