1.2.11.4.9 AES_Wrapper_WrapKey Function
C
void AES_Wrapper_WrapKey(uint8_t *key, uint32_t keyLen,
uint8_t *in, uint32_t inLen,
uint8_t *out)
Summary
Wraps a key with AES Key Wrap Algorithm.
Description
This function wraps a key using AES Key Wrap Algorithm.
Precondition
None.
Parameters
Param | Description |
---|---|
key | Pointer to buffer holding the AES key for the algorithm |
keyLen | Length of key in bytes |
in | Pointer to buffer where the key to wrap is located |
inLen | Length in bytes of the key to wrap |
out | Pointer to buffer to store the wrapped key |
Returns
None.
Example
uint8_t in1[16]; uint8_t out1[24]; uint8_t key[] = { some 16, 24, or 32 byte key }; AES_Wrapper_WrapKey(key, sizeof(key), in1, sizeof(in1), out1);
Remarks
The wrapped key is one byte longer than the plain key.