gost-engine / engine

A reference implementation of the Russian GOST crypto algorithms for OpenSSL
Apache License 2.0
379 stars 174 forks source link

Added support for raw public key export and import #453

Open arx11 opened 8 months ago

arx11 commented 8 months ago

In total there are 3 new functions to export/import raw values of public and private keys.

Public key functions are used to handle ASN1_PKEY_CTRL_GET1_TLS_ENCPT and ASN1_PKEY_CTRL_SET1_TLS_ENCPT control codes used by SSL stack during key exchange.

Private key export function is just a convenient way to get the key value (EVP_PKEY_new_raw_private_key does not provide paramset to use for key import).