Firstly, I tried a search first and saw some topics that were related but
nothing directly addressing what I am looking for. If my search skills are
sub-par, I apologize :-D.

I am using openssl and have an AES_KEY structure (AES 256-bit) in memory
that is used for encrypting some data. I would very much like to store the
AES key to a file. While I can do that pretty easily by hand in an ad hoc
manner, I was wondering if there was a standard way of storing this to a
file and encrypting them with a passphrase. I was under the impression that
PKCS#12 supported the storing of private (symmetric) keys, but all
references to storing pkcs12 (e.g. the PKCS12_create() function) seem to
want an EVP_PKEY structure, which I think only works with public
(asymmetric) key types. So my question has two parts:

1. Is there any way to go from AES_KEY to EVP_PKEY or some other overload of
the PKCS12_create() that can take AES_KEYs?

2. Is there another standard file format that I can store an AES_KEY in, and
that openssl supports?

3. Bonus question: if the answer to #2 is no, any suggestions on how to do
this while still using an aes256 key (32-byte/256-bit) would be appreciated
whether that means using another lib for the key storage part of it.

Thanks!
-- 
View this message in context: 
http://old.nabble.com/Encapsulation-of-AES_KEY-tp26293712p26293712.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to