Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/crypto: edwards25519.go has unnecessary code that does not appear in reference or other implementations #37536
The following code located at https://github.com/golang/crypto/blob/2aa609cf4a9d7d1126360de73b55b6002f9e052a/ed25519/internal/edwards25519/edwards25519.go#L750 is unnecessary and is not in the reference or many other widely used implementations:
While FeToBytes does change the form of p.X, but it does not impact the point represented by p.
tmpX and tmp2 are never used for anything beyond this snippet.
Obviously, the declaration of the variables at line 738 is also not needed.
See the following to verify this code is not present in the ref10 implementation:
Perhaps this was debugging code that was left in on accident? Or is there some real utility that I am just not seeing?