kunci buka rsa-aes - AWS CloudHSM

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

kunci buka rsa-aes

key unwrap rsa-aesPerintah membuka kunci payload menggunakan kunci pribadi RSA dan mekanisme unwrapping. RSA-AES

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 menggunakankey unwrap rsa-aes, Anda harus memiliki kunci pribadi RSA dari kunci pembungkus publik RSA di AWS CloudHSM cluster Anda, dan unwrap atributnya harus disetel ke. true

Jenis pengguna

Jenis pengguna berikut dapat menjalankan perintah ini.

  • Pengguna Crypto (CU)

Persyaratan

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

Sintaksis

aws-cloudhsm > help key unwrap rsa-aes Usage: key unwrap rsa-aes [OPTIONS] --filter [<FILTER>...] --hash-function <HASH_FUNCTION> --mgf <MGF> --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 --hash-function <HASH_FUNCTION> Hash algorithm [possible values: sha1, sha224, sha256, sha384, sha512] --mgf <MGF> Mask Generation Function algorithm [possible values: mgf1-sha1, mgf1-sha224, mgf1-sha256, mgf1-sha384, mgf1-sha512] --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 -h, --help Print help

Contoh

Contoh-contoh ini menunjukkan bagaimana menggunakan key unwrap rsa-aes perintah menggunakan kunci pribadi RSA dengan nilai unwrap atribut yang disetel ketrue.

contoh Contoh: Buka kunci payload dari data kunci dibungkus yang dikodekan Base64
aws-cloudhsm > key unwrap rsa-aes --key-type-class aes --label aes-unwrapped --filter attr.label=rsa-private-key-example --hash-function sha256 --mgf mgf1-sha256 --data HrSE1DEyLjIeyGdPa9R+ebiqB5TIJGyamPker31ZebPwRA+NcerbAJO8DJ1lXPygZcI21vIFSZJuWMEiWpe1R9D/5WSYgxLVKex30xCFqebtEzxbKuv4DOmU4meSofqREYvtb3EoIKwjyxCMRQFgoyUCuP4y0f0eSv0k6rSJh4NuCsHptXZbtgNeRcR4botN7LlzkEIUcq4fVHaatCwd0J1QGKHKyRhkol+RL5WGXKe4nAboAkC5GO7veI5yHL1SaKlssSJtTL/CFpbSLsAFuYbv/NUCWwMY5mwyVTCSlw+HlgKK+5TH1MzBaSi8fpfyepLT8sHy2Q/VRl6ifb49p6m0KQFbRVvz/OWUd6l4d97BdgtaEz6ueg== { "error_code": 0, "data": { "key": { "key-reference": "0x00000000001808e2", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "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 rsa-aes --key-type-class aes --label aes-unwrapped --filter attr.label=rsa-private-key-example --hash-function sha256 --mgf mgf1-sha256 --data-path payload-key.pem { "error_code": 0, "data": { "key": { "key-reference": "0x00000000001808e2", "key-info": { "key-owners": [ { "username": "cu1", "key-coverage": "full" } ], "shared-users": [], "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

<KEY_TYPE_CLASS>

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

Wajib: Ya

<HASH_FUNCTION>

Menentukan fungsi hash.

Nilai valid:

  • sha1

  • sha224

  • sha256

  • sha384

  • sha512

Wajib: Ya

<MGF>

Menentukan fungsi pembuatan topeng.

catatan

Fungsi hash fungsi pembuatan topeng harus sesuai dengan fungsi hash mekanisme penandatanganan.

Nilai valid:

  • mgf1-sha1

  • mgf1-sha224

  • mgf1-sha256

  • mgf1-sha384

  • mgf1-sha512

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

Topik terkait