Buka kunci dengan CLOUDHSM-AES-GCM menggunakan Cloud HSM CLI - AWS CloudHSM

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

Buka kunci dengan CLOUDHSM-AES-GCM menggunakan Cloud HSM CLI

Gunakan key unwrap cloudhsm-aes-gcm perintah di Cloud HSM CLI untuk membuka kunci payload ke dalam AWS CloudHSM cluster menggunakan kunci pembungkus dan mekanisme AES unwrapping. CLOUDHSM-AES-GCM

Kunci yang tidak dibungkus dapat digunakan dengan cara yang sama seperti kunci yang dihasilkan oleh AWS CloudHSM. Untuk menunjukkan bahwa mereka tidak dihasilkan secara lokal, local atribut mereka disetel kefalse.

Untuk menggunakan key unwrap cloudhsm-aes-gcm perintah, Anda harus memiliki kunci AES pembungkus di AWS CloudHSM cluster Anda dan unwrap atributnya harus disetel ketrue.

Jenis pengguna

Jenis pengguna berikut dapat menjalankan perintah ini.

  • Pengguna Crypto (CUs)

Persyaratan

  • Untuk menjalankan perintah ini, Anda harus masuk sebagai CU.

Sintaks

aws-cloudhsm > help key unwrap cloudhsm-aes-gcm Usage: key unwrap cloudhsm-aes-gcm [OPTIONS] --filter [<FILTER>...] --tag-length-bits <TAG_LENGTH_BITS> --key-type-class <KEY_TYPE_CLASS> --label <LABEL> <--data-path <DATA_PATH>|--data <DATA>> Options: --cluster-id <CLUSTER_ID> Unique Id to choose which of the clusters in the config file to run the operation against. If not provided, will fall back to the value provided when interactive mode was started, or error --filter [<FILTER>...] Key reference (e.g. key-reference=0xabc) or space separated list of key attributes in the form of attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE to select a key to unwrap with --data-path <DATA_PATH> Path to the binary file containing the wrapped key data --data <DATA> Base64 encoded wrapped key data --attributes [<UNWRAPPED_KEY_ATTRIBUTES>...] Space separated list of key attributes in the form of KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE for the unwrapped key --share-crypto-users [<SHARE_CRYPTO_USERS;...] Space separated list of Crypto User usernames to share the unwrapped key with --manage-key-quorum-value <MANAGE_KEY_QUORUM_VALUE; The quorum value for key management operations for the unwrapped key --use-key-quorum-value <USE_KEY_QUORUM_VALUE; The quorum value for key usage operations for the unwrapped key --aad <AAD> Aes GCM Additional Authenticated Data (AAD) value, in hex --tag-length-bits <TAG_LENGTH_BITS> Aes GCM tag length in bits --key-type-class <KEY_TYPE_CLASS> Key type and class of wrapped key [possible values: aes, des3, ec-private, generic-secret, rsa-private] --label <LABEL> Label for the unwrapped key --session Creates a session key that exists only in the current session. The key cannot be recovered after the session ends --approval <APPROVAL> Filepath of signed quorum token file to approve operation -h, --help Print help

Contoh

Contoh-contoh ini menunjukkan cara menggunakan key unwrap cloudhsm-aes-gcm perintah menggunakan AES kunci dengan nilai unwrap atribut yang disetel ketrue.

contoh Contoh: Buka kunci payload dari data kunci dibungkus yang dikodekan Base64
aws-cloudhsm > key unwrap cloudhsm-aes-gcm --key-type-class aes --label aes-unwrapped --filter attr.label=aes-example --tag-length-bits 64 --aad 0x10 --data 6Rn8nkjEriDYlnP3P8nPkYQ8hplOEJ899zsrF+aTB0i/fIlZ { "error_code": 0, "data": { "key": { "key-reference": "0x00000000001408e8", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "key-quorum-values": { "manage-key-quorum-value": 0, "use-key-quorum-value": 0 }, "cluster-coverage": "full" }, "attributes": { "key-type": "aes", "label": "aes-unwrapped", "id": "0x", "check-value": "0x8d9099", "class": "secret-key", "encrypt": false, "decrypt": false, "token": true, "always-sensitive": false, "derive": false, "destroyable": true, "extractable": true, "local": false, "modifiable": true, "never-extractable": false, "private": true, "sensitive": true, "sign": true, "trusted": false, "unwrap": false, "verify": true, "wrap": false, "wrap-with-trusted": false, "key-length-bytes": 16 } } } }
contoh Contoh: Buka kunci payload yang disediakan melalui jalur data
aws-cloudhsm > key unwrap cloudhsm-aes-gcm --key-type-class aes --label aes-unwrapped --filter attr.label=aes-example --tag-length-bits 64 --aad 0x10 --data-path payload-key.pem { "error_code": 0, "data": { "key": { "key-reference": "0x00000000001408e8", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "key-quorum-values": { "manage-key-quorum-value": 0, "use-key-quorum-value": 0 }, "cluster-coverage": "full" }, "attributes": { "key-type": "aes", "label": "aes-unwrapped", "id": "0x", "check-value": "0x8d9099", "class": "secret-key", "encrypt": false, "decrypt": false, "token": true, "always-sensitive": false, "derive": false, "destroyable": true, "extractable": true, "local": false, "modifiable": true, "never-extractable": false, "private": true, "sensitive": true, "sign": true, "trusted": false, "unwrap": false, "verify": true, "wrap": false, "wrap-with-trusted": false, "key-length-bytes": 16 } } } }

Pendapat

<CLUSTER_ID>

ID cluster untuk menjalankan operasi ini pada.

Wajib: Jika beberapa cluster telah dikonfigurasi.

<FILTER>

Referensi kunci (misalnya,key-reference=0xabc) atau daftar atribut kunci yang dipisahkan spasi dalam bentuk attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE untuk memilih kunci yang akan dibuka.

Wajib: Ya

<DATA_PATH>

Path ke file biner yang berisi data kunci dibungkus.

Diperlukan: Ya (kecuali disediakan melalui data yang disandikan Base64)

<DATA>

Base64 mengkodekan data kunci yang dibungkus.

Wajib: Ya (kecuali disediakan melalui jalur data)

<ATTRIBUTES>

Spasi dipisahkan daftar atribut kunci dalam bentuk KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE untuk kunci dibungkus.

Wajib: Tidak

<AAD>

Nilai Data Terautentikasi GCM Tambahan (AAD) Aes, dalam hex.

Wajib: Tidak

<TAG_LENGTH_BITS>

Panjang GCM tag Aes dalam bit.

Wajib: Ya

<KEY_TYPE_CLASS>

Jenis kunci dan kelas kunci yang dibungkus [nilai yang mungkin:aes,des3,ec-private,generic-secret,rsa-private].

Wajib: Ya

<LABEL>

Label untuk kunci yang tidak dibungkus.

Wajib: Ya

<SESSION>

Membuat kunci sesi yang hanya ada di sesi saat ini. Kunci tidak dapat dipulihkan setelah sesi berakhir.

Wajib: Tidak

<APPROVAL>

Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi. Hanya diperlukan jika nilai kuorum layanan manajemen kunci dari kunci unwrapping lebih besar dari 1.

Topik terkait