What version of Go are you using (go version)?
Latest Go development branch
Does this issue reproduce with the latest release?
No. Tested latest using latest binary releases of Go 1.19 and 1.20; not affected, hence I'm creating a public bug report for this.
What operating system and processor architecture are you using (go env)?
Linux x64
What did you do?
package main
import (
"crypto/elliptic"
"fmt"
"math/big"
)
func main() {
curve := elliptic.P256()
priv, _ := new(big.Int).SetString("115792089210356248762697446949407573529996955224135760342422259061068512044335", 10)
x, y := curve.ScalarBaseMult(priv.Bytes())
fmt.Println(x, ",", y)
}
https://go.dev/play/p/aTrVUdp0SkH?v=gotip
What did you expect to see?
21538630073048560509735576007149539115526969787353231629118474871518563178910 , 60188232952792585766986390787318113745120282298037326219660563054891997721808
What did you see instead?
0, 0
What version of Go are you using (
go version)?Latest Go development branch
Does this issue reproduce with the latest release?
No. Tested latest using latest binary releases of Go 1.19 and 1.20; not affected, hence I'm creating a public bug report for this.
What operating system and processor architecture are you using (
go env)?Linux x64
What did you do?
https://go.dev/play/p/aTrVUdp0SkH?v=gotip
What did you expect to see?
21538630073048560509735576007149539115526969787353231629118474871518563178910 , 60188232952792585766986390787318113745120282298037326219660563054891997721808What did you see instead?
0, 0