charm icon indicating copy to clipboard operation
charm copied to clipboard

Why is there an extra byte in relic's binary representation of field elements?

Open nikitaborisov opened this issue 11 years ago • 2 comments

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?

nikitaborisov avatar Sep 17 '13 14:09 nikitaborisov

No good enough reason. Prototype code that wasn't cleaned up but will be removed shortly.

jakinyele avatar Sep 17 '13 14:09 jakinyele

Thanks for the quick response! I was trying to understand the code and wondered if I was missing something.

nikitaborisov avatar Sep 17 '13 14:09 nikitaborisov