Implemented EdwardPoint::compress method that packs X coordinate and the sign of Y in 32 bytes.
Implemented EdwardPoint::decompress_unchecked method that restores the point serialized with the previous method without checking that the point is in the prime subgroup.
Implemented EdwardPoint::is_in_prime_subgroup method that checks that the point is in the prime subgroup.
Added unit tests that check the aforementioned methods work properly.
In this PR, the following was done:
EdwardPoint::compress method
that packs X coordinate and the sign of Y in 32 bytes.EdwardPoint::decompress_unchecked
method that restores the point serialized with the previous method without checking that the point is in the prime subgroup.EdwardPoint::is_in_prime_subgroup
method that checks that the point is in the prime subgroup.The reason why it could be useful is described at https://github.com/zkBob/zkbob-pool-storage/issues/2.