This troubleshooting topic helps you determine if your application generates irrecoverable wrapped keys. If you are impacted by this issue, use this topic to address the problem.
Topics
Determine whether your code generates irrecoverable
wrapped keys
You are impacted only if you meet all the conditions below:
Condition | How do I know? |
---|---|
Your application uses PKCS #11 library |
The PKCS #11 library is installed as the |
Your application specifically uses version 3.0.0 of the PKCS #11 library |
If you received an email from the AWS CloudHSM team, you are likely using version 3.0.0 of the PKCS #11 library. To check the software version on your application instances, use this command:
|
You wrap keys using AES key wrapping |
AES key wrapping means you use an AES key to wrap out some other key. The corresponding
mechanism name is |
You specify a custom IV when calling AES key wrapping, and the length of this IV is shorter than 8 |
AES key wrap is generally initialized using a
This issue applies to you only if:
|
If you do not meet all the conditions above, you may stop reading now. Your wrapped keys can be unwrapped properly, and this issue does not impact you. Otherwise, see Actions you must take if your code generates irrecoverable wrapped keys.
Actions you must take if your code generates
irrecoverable wrapped keys
You should take the following three steps:
-
Immediately upgrade your PKCS #11 library to a newer version
-
Update your software to use a standards-compliant IV
We strongly recommend you follow our sample code and simply specify a NULL IV, which causes the HSM to utilize the standards-compliant default IV. Alternatively, you may explicitly specify the IV as
0xA6A6A6A6A6A6A6A6
with a corresponding IV length of8
. We do not recommend using any other IV for AES key wrapping, and will explicitly disable custom IVs for AES key wrapping in a future version of the PKCS #11 library.Sample code for properly specifying the IV appears in aes_wrapping.c
on GitHub. -
Identify and recover existing wrapped keys
You should identify any keys you wrapped using version 3.0.0 of the PKCS #11 library, and then contact support for assistance (https://aws.amazon.com/support
) in recovering these keys.
Important
This issue only impacts keys wrapped with version 3.0.0 of the PKCS #11 library. You can wrap keys using earlier versions (2.0.4 and lower-numbered packages) or later versions (3.0.1 and higher-numbered packages) of the PKCS #11 library.