

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

# Buka kunci dengan AES-NO-PAD menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-unwrap-aes-no-pad"></a>

Gunakan **key unwrap aes-no-pad** perintah di CloudHSM CLI untuk membuka kunci payload ke AWS CloudHSM dalam cluster menggunakan kunci pembungkus AES dan mekanisme unwrapping. `AES-NO-PAD`

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 ke`false`.

Untuk menggunakan **key unwrap aes-no-pad** perintah, Anda harus memiliki kunci pembungkus AES di AWS CloudHSM cluster Anda, dan `unwrap` atributnya harus disetel ke. `true`

## Jenis pengguna
<a name="cloudhsm_cli-key-unwrap-aes-no-pad-userType"></a>

Jenis pengguna berikut dapat menjalankan perintah ini.
+ Pengguna Crypto (CUs)

## Persyaratan
<a name="cloudhsm_cli-key-unwrap-aes-no-pad-requirements"></a>
+ Untuk menjalankan perintah ini, Anda harus masuk sebagai CU.

## Sintaksis
<a name="cloudhsm_cli-key-unwrap-aes-no-pad-syntax"></a>

```
aws-cloudhsm > help key unwrap aes-no-pad
Usage: key unwrap aes-no-pad [OPTIONS] --filter [<FILTER>...] --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
      --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
<a name="cloudhsm_cli-key-unwrap-aes-no-pad-examples"></a>

Contoh-contoh ini menunjukkan cara menggunakan **key unwrap aes-no-pad** perintah menggunakan kunci AES dengan nilai `unwrap` atribut yang disetel ke`true`.

**Example Contoh: Buka kunci payload dari data kunci dibungkus yang dikodekan Base64**  

```
aws-cloudhsm > key unwrap aes-no-pad --key-type-class aes --label aes-unwrapped --filter attr.label=aes-example --data eXK3PMAOnKM9y3YX6brbhtMoC060EOH9
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000001c08ec",
      "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
      }
    }
  }
}
```

**Example Contoh: Buka kunci payload yang disediakan melalui jalur data**  

```
aws-cloudhsm > key unwrap aes-no-pad --key-type-class aes --label aes-unwrapped --filter attr.label=aes-example --data-path payload-key.pem
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000001c08ec",
      "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
<a name="cloudhsm_cli-key-unwrap-aes-no-pad-arguments"></a>

***<CLUSTER\$1ID>***  
ID cluster untuk menjalankan operasi ini pada.  
Diperlukan: Jika beberapa cluster telah [dikonfigurasi](cloudhsm_cli-configs-multi-cluster.md).

***<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\$1PATH>***  
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.  
Diperlukan: 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\$1TYPE\$1CLASS>***  
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
<a name="cloudhsm_cli-key-unwrap-aes-no-pad-seealso"></a>
+ [Perintah bungkus kunci di CloudHSM CLI](cloudhsm_cli-key-wrap.md)
+ [Perintah buka kunci di CloudHSM CLI](cloudhsm_cli-key-unwrap.md)