[openssl-users] i2d_ d2i_ b2i_ i2b_ functions and EVP_PKEY
rasjv at yandex.com
Tue Feb 3 10:18:20 UTC 2015
I see many functions have prefixes: i2d_ d2i_ b2i_ i2b_
I think these letters: 'i', 'd', 'b' have some meaning. Can somebody help me to understand what they are mean?
And one more question.
In accordance to: https://www.openssl.org/docs/crypto/EVP_PKEY_new.html, EVP_PKEY structure is used by OpenSSL to store private keys. But there are above functions which use as parameters pointer to EVP_PKEY structure and as they are named they can work with both public and private keys. So the questions are:
1. can we save to EVP_PKEY structure public key not private?
2. can we save to EVP_PKEY structure public and private keys at once?
EVP_PKEY * pkey;
pkey = EVP_PKEY_new();
RSA * rsa;
rsa = RSA_generate_key(...)
What key or keys will be in pkey after that?
More information about the openssl-users