Remove unnecessary checks from CompressedEdwardsY::decompress()#1336
Remove unnecessary checks from CompressedEdwardsY::decompress()#1336daxpedda wants to merge 1 commit intoRustCrypto:masterfrom
CompressedEdwardsY::decompress()#1336Conversation
That doesn't mean a prospective y-coordinate will be a valid solution to the curve equation. However, as far as I can tell |
6740ef7 to
ed7bd0d
Compare
I see, thanks!
I went ahead and adjusted the implementation to follow RFC 8032 and left comments here and there. If we assume that the RFC algorithm only produces points on the curve, our current implementation must be fine then. |
d40ae44 to
a5e43d6
Compare
|
I went ahead and removed the check for torsion-freeness as well, following the RFC. |
cab2ef7 to
e77c9a4
Compare
e77c9a4 to
7ccafd3
Compare
Currently
CompressedEdwardsY::decompress()checks if the point is on the curve. This PR removes this check.Please correct me if I'm wrong here, but I believe this check can never fail because we don't allow invalid y-coordinates (we reduce the input) and the x-coordinate is derived.