1.2.11.4.10 AES_Wrapper_UnwrapKey Function

C

void AES_Wrapper_UnwrapKey(uint8_t *key, uint32_t keyLen, 
                         uint8_t *in, uint32_t inLen, 
                         uint8_t *out)

Summary

Unwraps a key with AES Key Wrap Algorithm.

Description

This function unwraps a key using AES Key Wrap Algorithm.

Precondition

None.

Parameters

ParamDescription
keyPointer to buffer holding the AES key for the algorithm
keyLenLength of key in bytes
inPointer to buffer where the wrapped key is located
inLenLength in bytes of the key to unwrap
outPointer to buffer to store the unwrapped key

Returns

None.

Example

uint8_t in1[16];
uint8_t out1[24];
uint8_t key[] = { some 16, 24, or 32 byte key };

AES_Wrapper_UnwrapKey(key, sizeof(key), in1, sizeof(in1), out1);

Remarks

The unwrapped key is one byte shorter than the wrapped key.