If you set the Origin parameter to EXTERNAL when you create a customer master key (CMK) for a dedicated Key Management Service (KMS) instance of the Standard edition, Dedicated KMS does not generate symmetric key material in your hardware security module (HSM) cluster. You must import external symmetric key material for the CMK. This topic describes how to import external symmetric key material.
Background information
You can call the DescribeKey operation to view the source of the symmetric key material of an existing CMK. If the value of the Origin parameter is EXTERNAL, the symmetric key material is imported from an external source. In this case, the CMK is considered an external CMK.
- Make sure that the source of randomness from which the symmetric key material is generated meets the requirements.
- The symmetric key material is imported to your HSM cluster. You cannot delete the symmetric key material by calling the DeleteKeyMaterial operation. However, you can call the ScheduleKeyDeletion operation to schedule a CMK deletion task and specify a waiting period for the detection. When the CMK is deleted, the symmetric key material is also deleted.
- A CMK can have only one piece of symmetric key material. After you import symmetric key material for a CMK, the CMK is bound to the symmetric key material. You can no longer import other symmetric key material for the CMK.
- The symmetric key material must be a 128-, 192-, or 256-bit symmetric key.
Step 1: Create an external CMK
Step 2: Obtain the parameters that are used to import symmetric key material
The parameters include a public key and an import token. The public key is used to encrypt the symmetric key material.Step 3: Encrypt symmetric key material
The following section describes how to use OpenSSL to encrypt symmetric key material. The encryption algorithm must be the same as the algorithm that you specify when you obtain the parameters that are used to import the symmetric key material. The public key is encoded in Base64. Before you can use the public key, you must decode the public key.
Step 4: Import the symmetric key material
Each import token is bound to a public key that is used to encrypt symmetric key material. A CMK is specified when an import token is generated. An import token can be used to import symmetric key material only for the CMK that is specified. The validity period of an import token is 24 hours. The token can be repeatedly used within this period. After the token expires, you must obtain a new import token and a new public key.