mirror of
https://github.com/nspcc-dev/neofs-crypto.git
synced 2026-03-01 04:29:00 +00:00
The sign method panics with go1.19 #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @KirillovDenis on GitHub (Aug 8, 2022).
With go1.19 this
nspcc-dev/neofs-crypto@357aa98aa2/ecdsa.go (L217)panics now: https://tip.golang.org/doc/go1.19#minor_library_changesThis affects neofs-api-go
nspcc-dev/neofs-api-go@882c4ab76c/go.mod (L6)and then neofs-sdk-go, neofs-http-gw and so on.Code to reproduce:
Panic message:
@roman-khimov commented on GitHub (Aug 8, 2022):
This
Sign()is very strange to me:ecdsa.Sign()(https://pkg.go.dev/crypto/ecdsa#Sign) is not X and Y, but R and S. No wonder they're not on the curve.Consider serializing the result like this:
nspcc-dev/neo-go@41613cd631/pkg/crypto/keys/private_key.go (L155-L163)