-
Notifications
You must be signed in to change notification settings - Fork 256
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
Adds From<iXXX>
implementations to fields
#263
Conversation
From<iXXX>
implementations to quadratic / field extensionsFrom<iXXX>
implementations to quadratic / cubic field extensions
f71d213
to
fc60ad5
Compare
Should we add these |
From<iXXX>
implementations to quadratic / cubic field extensionsFrom<iXXX>
implementations to prime / quadratic / cubic field extensions
@ValarDragon Good question. It breaks compatibility of the libraries out there which may implement an |
0845db3
to
133b54a
Compare
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.
This looks good to me! Thanks for adding it to fields.
I've never seen / used paste before, but from looking at the docs this seems right to me.
cref #226, but I think its fine to assume that the ordering -(p-1)/2..0..(p-1)/2
would be implied for signed ints here
@ValarDragon FYI, you can inspect the output with cargo expand |
From<iXXX>
implementations to prime / quadratic / cubic field extensionsFrom<iXXX>
implementations to prime / quadratic / cubic field (extensions)
Those delegate to the respective, existing `From<uXXX>` implementations for `XXX` in `[8, 16, 32, 64, 128]`
133b54a
to
433ce13
Compare
From<iXXX>
implementations to prime / quadratic / cubic field (extensions)From<iXXX>
implementations to fields
…lize` (#265) * Implements hashing as a blanket trait for instances of `CanonicalSerialize` - this saves an alllocation w.r.t the suggested approach by implementing `io::Write` on the input instance of `digest::Digest`, - note that most instances of `digest::Digest` [already](https://gist.github.com/huitseeker/e827161413063e347ce5a496b66ff287) have an [`io::Write` instance](https://github.com/rustcrypto/hashes#hashing-readable-objects), but `CanonicalSerialize` consuming its `io::Write` argument prevents its usage, - this hence implements `io::Write` on a [cheap newtype wrapper](https://rust-unofficial.github.io/patterns/patterns/behavioural/newtype.html) Fixes #86 * Adjust post review - rename Hash -> CanonicalSerialize Ext according to [extension trait best practices](https://rust-lang.github.io/rfcs/0445-extension-trait-conventions.html#the-convention) - add the same structure for hashing uncompressed bytes * Changelog entries for #263, #265 * Update CHANGELOG.md Co-authored-by: Weikeng Chen <w.k@berkeley.edu>
Those delegate to the respective, existing
From<uXXX>
implementations forXXX
in[8, 16, 32, 64, 128]