math/big: ModSqrt returns wrong value when aliasing parameters #22265
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?go 1.9
What operating system and processor architecture are you using (
go env
)?What did you do?
Aliased
z
andx
inModSqrt
, as allowed by the package docs and not disallowed by the function docs.https://play.golang.org/p/MsOief8jlg
What did you expect to see?
The same result as
new(big.Int).ModSqrt(y, p.P)
.What did you see instead?
An incorrect value is computed.
The text was updated successfully, but these errors were encountered: