x/crypto: edwards25519.go has unnecessary code that does not appear in reference or other implementations #37536
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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:
https://github.com/floodyberry/supercop/blob/a351f2c29235512a042d4b6989d241a67e86ad23/crypto_sign/ed25519/ref10/ge_frombytes.c#L42
Perhaps this was debugging code that was left in on accident? Or is there some real utility that I am just not seeing?
The text was updated successfully, but these errors were encountered: