[openssl-users] EVP AES Wrap
Luís Martins
luis.pinto.martins at gmail.com
Wed May 16 17:55:57 UTC 2018
Hi,
I'm trying to use the EVP AES wrap implementations from openssl (e.g.
EVP_aes_128/192/256_wrap()) but I'm getting the following error in
EVP_EncryptInit_ex() f:
error:0607B0AA:digital envelope routines:EVP_CipherInit_ex:wrap mode
not allowed
I've search the documentation for examples or guidance but I couldn't
find anything related to this.
Any experienced the same issue ?
My pseudo code is:
EVP_CIPHER_CTX ctx;
EVP_CIPHER_CTX_init(&ctx);
if (EVP_EncryptInit_ex(&ctx, EVP_aes_128_wrap(), 0,
keyEncriptionKey, iv) != 1)
// process error
if ( EVP_EncryptUpdate(&ctx, bufferOut, &processedSize, plaintext,
plaintextSize) != 1)
// process error
if (EVP_EncryptFinal_ex(&ctx, bufferOut + processedSize, &tmpSize)
!= 1)
// process error
EVP_CIPHER_CTX_cleanup(&ctx);
Regards,
Luís
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20180516/84ba4e50/attachment.html>
More information about the openssl-users
mailing list