Open
Description
Currently it seems some curves are using compressed, while other are using uncompressed format, but since the field elements are not exported, one cannot do compressed decoding manually if they want to.
E.g. bn254 is using uncompressed formatting, and there is no easy way to do decoding from compressed points using kyber at the moment.
We should support both compressed and uncompressed formats in our UnmarshalBinary implementation, IMO.
Typically encoding is dictated by the first 2 most significant bits in the binary encoding:
// 00 -> uncompressed
// 10 -> compressed, use smallest lexicographically square root of Y^2
// 11 -> compressed, use largest lexicographically square root of Y^2
// 01 -> compressed infinity point
// the "uncompressed infinity point" will just have 00 (uncompressed) followed by zeroes (infinity = 0,0 in affine coordinates)
Metadata
Metadata
Assignees
Labels
No labels