-
Notifications
You must be signed in to change notification settings - Fork 208
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
Serialize and Deserialize Uncompressed #99
Conversation
algebra/src/serialize/mod.rs
Outdated
&self, | ||
output_buf: &mut [u8], | ||
) -> Result<(), crate::serialize::SerializationError> { | ||
let len = <Self as CanonicalSerialize>::buffer_size(); |
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.
What about using the field buffer size here instead?
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.
Good idea, fixed: 3039fc1#diff-40da71ffac4550ada607d2de65a09100R164
Also seems like it needs |
aa27a82
to
3039fc1
Compare
What do you think about adding these as new methods on the |
This would mean we'd need to implement the uncompressed methods for Fields as well which I wanted to avoid since I did not need it anywhere (and did not see when it'd be used). When would (de)serializing uncompressed fields be useful? |
This PR defines a new serialization trait which directly serializes a group element in its uncompressed form. In addition, I found it reasonable to add the serialization trait bounds in the
AffineCurve
trait.