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.
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.
The tests passed after this change, though I'm not sure how well serialize size is tested
There was a problem hiding this comment.
It's the same right now, but if it's simpler we can keep the old behaviour.
There was a problem hiding this comment.
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.
Pendingsection inCHANGELOG.mdFiles changedin the GitHub PR explorer