Skip to content

Comments

Prepare ecdsa code for Go 1.26 deprecations#423

Draft
Foxboron wants to merge 4 commits intogoogle:mainfrom
Foxboron:morten/nistec
Draft

Prepare ecdsa code for Go 1.26 deprecations#423
Foxboron wants to merge 4 commits intogoogle:mainfrom
Foxboron:morten/nistec

Conversation

@Foxboron
Copy link
Contributor

@Foxboron Foxboron commented Jan 7, 2026

Go 1.26 is going to deprecate the X, Y and D fields in ecdsa keys. So these are some patches to start moving things over. The goal is to get some early feedback on approaches or issues with the proposed changes.

Most notably I've moved ECCPoints from returning *big.Int to []byte which is what the new APIs are going to expect when dealing with raw bytes. This also simplifies the handling of our ECC points.

I haven't looked at the legacy/tpm2 usage yet, but if the approach is fine I'll add some patches there as well.

Copy link
Member

@chrisfenner chrisfenner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for the proactive fix! I see no big issues here, just a couple minor comments. WDYT about making the breaking change non-breaking by renaming the function?

The Go crypto APIs for ECC is moving away from using big.Int to pure
byte arrays. Deprecate ECCPoint in favour of ECCBytes.

Removed the duplicate internal getXY function.

Signed-off-by: Morten Linderud <morten@linderud.pw>
Go 1.26 is going to deprecate the X/Y/D fields. Move all usage of this
into the new byte handling and new functions.

Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
Signed-off-by: Morten Linderud <morten@linderud.pw>
@Foxboron
Copy link
Contributor Author

Foxboron commented Jan 9, 2026

Okay, I do not understand why golangci-lint starts complaining about dotted imports when running under 1.25 😕

The code should be fine though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants