clearmatics / libff

C++ library for Finite Fields and Elliptic Curves (forked from scipr-lab/libff)

Home Page:https://clearmatics.github.io/libff/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

serialization parameter(s) to control safe / unsafe deserialization

dtebbs opened this issue · comments

The current generic serialization routine group_read do not check that the group element is on the curve (in the uncompressed case), and a member of the correct subgroup. Similarly, In the compressed case, group_read does not check that the x-coordinate is valid.

These checks add to the cost of deserialization and may be undesirable where incoming data in known to be valid (e.g. some MSM experiments where intermediate values are cached to disk), but it would be convenient (and in some cases, necessary) to be able to enable/disable checks with a parameter similar to compressed/uncompressed.