You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/key-vault/keys/hsm-protected-keys-byok.md
+16-14Lines changed: 16 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,9 @@ For added assurance when you use Azure Key Vault, you can import or generate a k
21
21
Use the information in this article to help you plan for, generate, and transfer your own HSM-protected keys to use with Azure Key Vault.
22
22
23
23
> [!NOTE]
24
-
> This functionality is not available for Azure China 21Vianet.
25
-
>
26
-
> This import method is available only for [supported HSMs](#supported-hsms).
24
+
> This functionality is not available for Azure China 21Vianet.
25
+
>
26
+
> This import method is available only for [supported HSMs](#supported-hsms).
27
27
28
28
For more information, and for a tutorial to get started using Key Vault (including how to create a key vault for HSM-protected keys), see [What is Azure Key Vault?](../general/overview.md).
29
29
@@ -34,7 +34,7 @@ Here's an overview of the process. Specific steps to complete are described late
34
34
* In Key Vault, generate a key (referred to as a *Key Exchange Key* (KEK)). The KEK must be an RSA-HSM key that has only the `import` key operation. Only Key Vault Premium and Managed HSM support RSA-HSM keys.
35
35
* Download the KEK public key as a .pem file.
36
36
* Transfer the KEK public key to an offline computer that is connected to an on-premises HSM.
37
-
* In the offline computer, use the BYOK tool provided by your HSM vendor to create a BYOK file.
37
+
* In the offline computer, use the BYOK tool provided by your HSM vendor to create a BYOK file.
38
38
* The target key is encrypted with a KEK, which stays encrypted until it is transferred to the Key Vault HSM. Only the encrypted version of your key leaves the on-premises HSM.
39
39
* A KEK that's generated inside a Key Vault HSM is not exportable. HSMs enforce the rule that no clear version of a KEK exists outside a Key Vault HSM.
40
40
* The KEK must be in the same key vault where the target key will be imported.
@@ -82,12 +82,12 @@ The following table lists prerequisites for using BYOK in Azure Key Vault:
82
82
83
83
To generate and transfer your key to a Key Vault Premium or Managed HSM:
84
84
85
-
*[Step 1: Generate a KEK](#step-1-generate-a-kek)
86
-
*[Step 2: Download the KEK public key](#step-2-download-the-kek-public-key)
87
-
*[Step 3: Generate and prepare your key for transfer](#step-3-generate-and-prepare-your-key-for-transfer)
88
-
*[Step 4: Transfer your key to Azure Key Vault](#step-4-transfer-your-key-to-azure-key-vault)
85
+
*[Step 1: Generate a KEK](#generate-a-kek)
86
+
*[Step 2: Download the KEK public key](#download-the-kek-public-key)
87
+
*[Step 3: Generate and prepare your key for transfer](#generate-and-prepare-your-key-for-transfer)
88
+
*[Step 4: Transfer your key to Azure Key Vault](#transfer-your-key-to-azure-key-vault)
89
89
90
-
### Step 1: Generate a KEK
90
+
### Generate a KEK
91
91
92
92
A KEK is an RSA key that's generated in a Key Vault Premium or Managed HSM. The KEK is used to encrypt the key you want to import (the *target* key).
93
93
@@ -99,7 +99,7 @@ The KEK must be:
99
99
> [!NOTE]
100
100
> The KEK must have 'import' as the only allowed key operation. 'import' is mutually exclusive with all other key operations.
101
101
102
-
Use the [az keyvault key create](/cli/azure/keyvault/key#az-keyvault-key-create) command to create a KEK that has key operations set to `import`. Record the key identifier (`kid`) that's returned from the following command. (You will use the `kid` value in [Step 3](#step-3-generate-and-prepare-your-key-for-transfer).)
102
+
Use the [az keyvault key create](/cli/azure/keyvault/key#az-keyvault-key-create) command to create a KEK that has key operations set to `import`. Record the key identifier (`kid`) that's returned from the following command. (You will use the `kid` value in [Step 3](#generate-and-prepare-your-key-for-transfer).)
Use [az keyvault key download](/cli/azure/keyvault/key#az-keyvault-key-download) to download the KEK public key to a .pem file. The target key you import is encrypted by using the KEK public key.
Transfer the KEKforBYOK.publickey.pem file to your offline computer. You will need this file in the next step.
128
128
129
-
### Step 3: Generate and prepare your key for transfer
129
+
### Generate and prepare your key for transfer
130
130
131
-
Refer to your HSM vendor's documentation to download and install the BYOK tool. Follow instructions from your HSM vendor to generate a target key, and then create a key transfer package (a BYOK file). The BYOK tool will use the `kid` from [Step 1](#step-1-generate-a-kek) and the KEKforBYOK.publickey.pem file you downloaded in [Step 2](#step-2-download-the-kek-public-key) to generate an encrypted target key in a BYOK file.
131
+
Refer to your HSM vendor's documentation to download and install the BYOK tool. Follow instructions from your HSM vendor to generate a target key, and then create a key transfer package (a BYOK file). The BYOK tool will use the `kid` from [Step 1](#generate-a-kek) and the KEKforBYOK.publickey.pem file you downloaded in [Step 2](#download-the-kek-public-key) to generate an encrypted target key in a BYOK file.
132
132
133
133
Transfer the BYOK file to your connected computer.
134
134
@@ -137,14 +137,16 @@ Transfer the BYOK file to your connected computer.
137
137
>
138
138
> **Known issue**: Importing an RSA 4K target key from Luna HSMs is only supported with firmware 7.4.0 or newer.
139
139
140
-
### Step 4: Transfer your key to Azure Key Vault
140
+
### Transfer your key to Azure Key Vault
141
141
142
142
To complete the key import, transfer the key transfer package (a BYOK file) from your disconnected computer to the internet-connected computer. Use the [az keyvault key import](/cli/azure/keyvault/key#az-keyvault-key-import) command to upload the BYOK file to the Key Vault HSM.
143
143
144
144
To import an RSA key use following command. Parameter --kty is optional and defaults to 'RSA-HSM'.
145
+
145
146
```azurecli
146
147
az keyvault key import --vault-name ContosoKeyVaultHSM --name ContosoFirstHSMkey --byok-file KeyTransferPackage-ContosoFirstHSMkey.byok
0 commit comments