Go 1.20 will come with a new crypto package: crypto/ecdh.
The boring bindings are still WIP, see CL 423363, but we better start supporting it sooner than later, so we are on par with upstream once the release is cut.
This PR adds the necessary ECDH CNG bindings, and a couple of refactors to reuse RSA/ECDSA code, with the following caveats:
The ecdh.ECDH() function requires a CNG capability, BCRYPT_KDF_RAW_SECRET, that is only available starting on Windows 10.
Go 1.20 will come with a new crypto package: crypto/ecdh.
The boring bindings are still WIP, see CL 423363, but we better start supporting it sooner than later, so we are on par with upstream once the release is cut.
This PR adds the necessary ECDH CNG bindings, and a couple of refactors to reuse RSA/ECDSA code, with the following caveats:
ecdh.ECDH()
function requires a CNG capability, BCRYPT_KDF_RAW_SECRET, that is only available starting on Windows 10.