Re: Accessing bignums of a RSA key with OpenSSL 3.0?

2021-07-30 Thread Matt Caswell
Note that the names are also documented here: https://www.openssl.org/docs/manmaster/man7/EVP_KEYMGMT-RSA.html On 30/07/2021 14:29, Olivier Mascia via openssl-users wrote: Thanks! BIGNUM* n; BIGNUM* e; BIGNUM* d; EVP_PKEY_get_bn_param(cert.key(), OSSL_PKEY_PARAM

Re: Accessing bignums of a RSA key with OpenSSL 3.0?

2021-07-30 Thread Olivier Mascia via openssl-users
Thanks! BIGNUM* n; BIGNUM* e; BIGNUM* d; EVP_PKEY_get_bn_param(cert.key(), OSSL_PKEY_PARAM_RSA_N, &n); EVP_PKEY_get_bn_param(cert.key(), OSSL_PKEY_PARAM_RSA_E, &e); EVP_PKEY_get_bn_param(cert.key(), OSSL_PKEY_PARAM_RSA_D, &d); Now, the reverse exerc

Re: Accessing bignums of a RSA key with OpenSSL 3.0?

2021-07-30 Thread Dr Paul Dale
Try: include/openssl/core_names.h The names are "n", "e" and "d" in this case. Pauli On 30/7/21 10:57 pm, Olivier Mascia via openssl-users wrote: Dear all, Testing migration to OpenSSL 3.0. Got to update some code building a JWK (in relation to ACME LetsEncrypt protocols). Having an EVP_PK

Accessing bignums of a RSA key with OpenSSL 3.0?

2021-07-30 Thread Olivier Mascia via openssl-users
Dear all, Testing migration to OpenSSL 3.0. Got to update some code building a JWK (in relation to ACME LetsEncrypt protocols). Having an EVP_PKEY which happens to be a RSA key, I proceeded this way (1.1.1) to extract the bignums needed for inclusion into the JWK: // Access the numeric