kunci menghasilkan aes simetris - AWS CloudHSM

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

kunci menghasilkan aes simetris

key generate-symmetric aesPerintah menghasilkan kunci AES simetris di cluster Anda AWS CloudHSM .

Jenis pengguna

Jenis pengguna berikut dapat menjalankan perintah ini.

  • Pengguna Crypto (CU)

Persyaratan

Untuk menjalankan perintah ini, Anda harus masuk sebagai CU.

Sintaks

aws-cloudhsm > help key generate-symmetric aes Generate an AES key Usage: key generate-symmetric aes [OPTIONS] --label <LABEL> --key-length-bytes <KEY_LENGTH_BYTES> 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 --label <LABEL> Label for the key --session Creates a session key that exists only in the current session. The key cannot be recovered after the session ends --key-length-bytes <KEY_LENGTH_BYTES> Key length in bytes --attributes [<KEY_ATTRIBUTES>...] Space separated list of key attributes to set for the generated AES key in the form of KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE -h, --help Print help

Contoh

Contoh-contoh ini menunjukkan cara menggunakan key generate-symmetric aes perintah untuk membuat kunci AES.

contoh Contoh: Buat kunci AES
aws-cloudhsm > key generate-symmetric aes \ --label example-aes \ --key-length-bytes 24 { "error_code": 0, "data": { "key": { "key-reference": "0x00000000002e06bf", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "cluster-coverage": "session" }, "attributes": { "key-type": "aes", "label": "example-aes", "id": "", "check-value": "0x9b94bd", "class": "secret-key", "encrypt": false, "decrypt": false, "token": false, "always-sensitive": true, "derive": false, "destroyable": true, "extractable": true, "local": true, "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": 24 } } } }
contoh Contoh: Buat kunci AES dengan atribut opsional
aws-cloudhsm > key generate-symmetric aes \ --label example-aes \ --key-length-bytes 24 \ --attributes decrypt=true encrypt=true { "error_code": 0, "data": { "key": { "key-reference": "0x00000000002e06bf", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "cluster-coverage": "session" }, "attributes": { "key-type": "aes", "label": "example-aes", "id": "", "check-value": "0x9b94bd", "class": "secret-key", "encrypt": true, "decrypt": true, "token": true, "always-sensitive": true, "derive": false, "destroyable": true, "extractable": true, "local": true, "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": 24 } } } }

Pendapat

<CLUSTER_ID>

ID cluster untuk menjalankan operasi ini pada.

Wajib: Jika beberapa cluster telah dikonfigurasi.

<KEY_ATTRIBUTES>

Menentukan daftar spasi dipisahkan atribut kunci untuk mengatur kunci AES yang dihasilkan dalam bentuk KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE (misalnya,token=true).

Untuk daftar atribut kunci yang didukung, lihatAtribut kunci untuk CloudHSM CLI.

Wajib: Tidak

<KEY-LENGTH-BYTES>

Menentukan panjang kunci dalam byte.

Nilai valid:

  • 16, 24, dan 32

Wajib: Ya

<LABEL>

Menentukan label yang ditetapkan pengguna untuk kunci AES. Ukuran maksimum yang diizinkan label adalah 127 karakter untuk Client SDK 5.11 dan setelahnya. Klien SDK 5.10 dan sebelumnya memiliki batas 126 karakter.

Wajib: Ya

<SESSION>

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

Gunakan parameter ini ketika Anda memerlukan kunci hanya sebentar, seperti kunci pembungkus yang mengenkripsi, dan kemudian dengan cepat mendekripsi, kunci lain. Jangan gunakan kunci sesi untuk mengenkripsi data yang mungkin perlu Anda dekripsi setelah sesi berakhir.

Secara default, kunci yang dihasilkan adalah kunci persisten (token). Melewati <SESSION>perubahan ini, memastikan kunci yang dihasilkan dengan argumen ini adalah kunci sesi (singkat).

Wajib: Tidak

Topik terkait