microsoft / go-crypto-openssl

Go crypto backend for Linux using OpenSSL
MIT License
55 stars 14 forks source link

Implement ECDH #43

Closed qmuntal closed 1 year ago

qmuntal commented 1 year ago

This is almost a clean port from the Boring bindings made by Google (src).

I've changed a few bits to account for the API differences between OpenSSL and Boring, but the logic is the same.

I plan to improve this ECDH implementation by making use of the EVP interface in a follow up PR. Haven't done it as part of this PR because this is good enough to be used in go1.20 and using the EVP interface poses some difficulties to keep compatibility with OpenSSL 1.0.2.

dagood commented 1 year ago

the Boring bindings made by Google (src).

Seems like the wrong link, or I'm missing the intent. 😄 That's the public crypto/ecdh package, and the internal Boring bindings are at https://github.com/golang/go/blob/master/src/crypto/internal/boring/ecdh.go.