Skip to content

Cannot perform RFC 5649 compatible CKM_AES_KEY_WRAP_PAD with the openssl cli #10605

@drebes

Description

@drebes

I'm trying to perform an RFC 5649 compatible key wrap using openssl cli. The operation fails with EVP_CipherInit_ex:wrap mode not allowed

$ openssl version
OpenSSL 1.1.1d  10 Sep 2019
$ openssl enc -id-aes256-wrap-pad -K $( hexdump -v -e '/1 "%02x"' < ephemeral.bin ) -iv A65959A6 -in secret.bin -out secret-wrapped.pem
Error setting cipher id-aes256-wrap-pad
140629772141696:error:0607B0AA:digital envelope routines:EVP_CipherInit_ex:wrap mode not allowed:../crypto/evp/evp_enc.c:161:

An old openssl-users thread suggests that this is a lack of passing the flag EVP_CIPHER_CTX_FLAG_WRAP_ALLOW, but this doesn't seem to be passed by the CLI, including in the latest versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    inactiveThis label should not be applied to open issues anymore.triaged: featureThe issue/pr requests/adds a feature

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions