-
Notifications
You must be signed in to change notification settings - Fork 245
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
Customizable serialization for SWCurveConfig
and TECurveConfig
#467
Conversation
let zero = Self::BaseField::zero(); | ||
match compress { | ||
Compress::Yes => zero.serialized_size_with_flags::<TEFlags>(), | ||
Compress::No => zero.uncompressed_size() + zero.uncompressed_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.
I changed this from x.uncompressed_size() + y.uncompressed_size()
to zero.uncompressed_size() + zero.uncompressed_size()
. Is there a difference? Aren't they all the same field? With this change this function is independent of the affine element.
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 tests passed after this change, though I'm not sure how well serialize size is tested
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.
It's the same right now, but if it's simpler we can keep the old behaviour.
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 new behavior is simpler. In the new behavior the size doesn't depend on the curve element, in the old behavior it referenced the curve values. So should we keep the behavior in this PR right now?
944f338
to
b4ffbe1
Compare
b4ffbe1
to
6796e72
Compare
SWCurveConfig
and TECurveConfig
Description
closes: #308
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
Pending
section inCHANGELOG.md
Files changed
in the GitHub PR explorer