charm
charm copied to clipboard
Why is there an extra byte in relic's binary representation of field elements?
In relic_interface.h, G2_BYTES is defined as (FP_BYTES * 4) + 4. In relic_interface.c, g2_read_bin and g2_write_bin read/write FP_BYTES for each coordinate using fp_read_bin and then appear to skip over the following byte, leaving it unread/uninitialized. Is there any reason for those extra bytes to be there?
No good enough reason. Prototype code that wasn't cleaned up but will be removed shortly.
Thanks for the quick response! I was trying to understand the code and wondered if I was missing something.