miracl / amcl

33 stars 20 forks source link

Point compression for ECP2 #16

Closed lovesh closed 5 years ago

lovesh commented 5 years ago

ECP supports getting bytes of a compressed point in the tobytes method but ECP2 does not. What would be the challenges of doing so?

mcarrickscott commented 5 years ago

Certainly doable in principle. In ECP we follow the standard and the first byte encodes the compression (0x4 for no compression, 0x2 for compression to just x and sign of y is 0, 0x3 for compression to just x and sign of y is 1). There is no standard for ECP2 AFAIK. Decompression has a significant cost. I don't see a compelling case for it.