relic-toolkit / relic

Code
Other
452 stars 179 forks source link

BLS signatures with point compression #272

Closed xATI-researcher closed 1 year ago

xATI-researcher commented 1 year ago

Hello. I have tested BLS signatures with the curve B12-P381 for research purposes and I have noticed that the output signature size is 96 bytes having the signature in the G1 group. Is there a way to use the point compression option in order to reduce the size of the resulted signature?

dfaranha commented 1 year ago

Hi,

It's not visible in the API for BLS signatures, but you can request a compressed G1 element when serializing it to a byte buffer using the function g1_write_bin. There is a specific flag there for compression.

Hope it helps!

xATI-researcher commented 1 year ago

Hello. It works using g1_write_bin and g1_read_bin for compressing and deserializing a G1 element. Thank you very much for the fast answer.