

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

# Kategori kunci dalam CloudHSM CLI
<a name="cloudhsm_cli-key"></a>

Dalam CloudHSM **key** CLI, adalah kategori induk untuk sekelompok perintah yang, ketika dikombinasikan dengan kategori induk, membuat perintah khusus untuk kunci. Saat ini, kategori ini terdiri dari perintah berikut:
+ [hapus](cloudhsm_cli-key-delete.md)
+ [menghasilkan file](cloudhsm_cli-key-generate-file.md)
+ [kunci generate-asymmetric-pair](cloudhsm_cli-key-generate-asymmetric-pair.md)
  + [kunci generate-asymmetric-pair rsa](cloudhsm_cli-key-generate-asymmetric-pair-rsa.md)
  + [kunci generate-asymmetric-pair ec](cloudhsm_cli-key-generate-asymmetric-pair-ec.md)
+ [kunci menghasilkan-simetris](cloudhsm_cli-key-generate-symmetric.md)
  + [kunci menghasilkan aes simetris](cloudhsm_cli-key-generate-symmetric-aes.md)
  + [kunci menghasilkan rahasia-generik simetris](cloudhsm_cli-key-generate-symmetric-generic-secret.md)
+ [impor pem](cloudhsm_cli-key-import-pem.md)
+ [daftar](cloudhsm_cli-key-list.md)
+ [mereplikasi](cloudhsm_cli-key-replicate.md)
+ [set-atribut](cloudhsm_cli-key-set-attribute.md)
+ [berbagi](cloudhsm_cli-key-share.md)
+ [unshare](cloudhsm_cli-key-unshare.md)
+ [membuka bungkusnya](cloudhsm_cli-key-unwrap.md)
+ [bungkus](cloudhsm_cli-key-wrap.md)

# Hapus kunci dengan CloudHSM CLI
<a name="cloudhsm_cli-key-delete"></a>

Gunakan **key delete** perintah di CloudHSM CLI untuk menghapus kunci dari cluster. AWS CloudHSM Anda hanya dapat menghapus satu item dalam satu waktu. Menghapus satu kunci pada pasangan kunci tidak berpengaruh pada kunci lainnya pada pasangan. 

Hanya CU yang membuat kunci dan akibatnya memilikinya yang dapat menghapus kunci. Pengguna yang berbagi kunci, tetapi tidak memilikinya, dapat menggunakan kunci dalam operasi kriptografi, tetapi tidak dapat menghapusnya.

## Jenis pengguna
<a name="key-delete-userType"></a>

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

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

## Sintaksis
<a name="key-delete-syntax"></a>

```
aws-cloudhsm > help key delete
Delete a key in the HSM cluster

Usage: key delete [OPTIONS] --filter [<FILTER>...]

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 matching key for deletion
  -h, --help                     Print help
```

## Contoh
<a name="key-delete-examples"></a>

```
aws-cloudhsm > key delete --filter attr.label="ec-test-public-key"
{
  "error_code": 0,
  "data": {
    "message": "Key deleted successfully"
  }
}
```

## Pendapat
<a name="key-delete-arguments"></a>

***<CLUSTER\$1ID>***  
ID cluster untuk menjalankan operasi ini pada.  
Wajib: 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 cocok untuk dihapus.  
Untuk daftar atribut kunci CloudHSM CLI yang didukung, lihat [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)  
Wajib: Ya

## Topik terkait
<a name="key-delete-seealso"></a>
+ [Daftar kunci untuk pengguna dengan CloudHSM CLI](cloudhsm_cli-key-list.md)
+ [Ekspor kunci asimetris dengan CloudHSM CLI](cloudhsm_cli-key-generate-file.md)
+ [Hapus berbagi kunci menggunakan CloudHSM CLI](cloudhsm_cli-key-unshare.md)
+ [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)
+ [Tombol filter menggunakan CloudHSM CLI](manage-keys-cloudhsm-cli-filtering.md)

# Ekspor kunci asimetris dengan CloudHSM CLI
<a name="cloudhsm_cli-key-generate-file"></a>

Gunakan **key generate-file** perintah di CloudHSM CLI untuk mengekspor kunci asimetris dari modul keamanan perangkat keras (HSM). Jika targetnya adalah kunci pribadi, maka referensi ke kunci pribadi akan diekspor dalam format PEM palsu. Jika targetnya adalah kunci publik, maka byte kunci publik akan diekspor dalam format PEM.

File PEM palsu, yang tidak berisi materi kunci pribadi yang sebenarnya tetapi merujuk kunci pribadi di HSM, dapat digunakan untuk membuat SSL/TLS pembongkaran dari server web Anda ke. AWS CloudHSM Untuk informasi lebih lanjut, lihat pembongkaran [SSL/TLS](ssl-offload.md).

## Jenis pengguna
<a name="key-generate-file-user-type"></a>

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

## Persyaratan
<a name="key-generate-file-requirements"></a>

Untuk menjalankan perintah ini, Anda harus masuk sebagai CU.

## Sintaksis
<a name="key-generate-file-syntax"></a>

```
aws-cloudhsm > help key generate-file
Generate a key file from a key in the HSM cluster. This command does not export any private key data from the HSM

Usage: key generate-file --encoding <ENCODING> --path <PATH> --filter [<FILTER>...]

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
      --encoding <ENCODING>
          Encoding format for the key file

          Possible values:
          - reference-pem: PEM formatted key reference (supports private keys)
          - pem:           PEM format (supports public keys)

      --path <PATH>
          Filepath where the key file will be written

      --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 matching key for file generation

  -h, --help
          Print help (see a summary with '-h')
```

## Contoh
<a name="key-generate-file-examples"></a>

Contoh ini menunjukkan cara menggunakan **key generate-file** untuk menghasilkan file kunci di AWS CloudHSM cluster Anda.

**Example**  

```
aws-cloudhsm > key generate-file --encoding reference-pem --path /tmp/ec-private-key.pem --filter attr.label="ec-test-private-key"
{
  "error_code": 0,
  "data": {
    "message": "Successfully generated key file"
  }
}
```

## Pendapat
<a name="key-generate-file-arguments"></a>

***<CLUSTER\$1ID>***  
ID cluster untuk menjalankan operasi ini pada.  
Wajib: 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 cocok untuk dihapus.  
Untuk daftar atribut kunci CloudHSM CLI yang didukung, lihat [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)  
Wajib: Tidak

***<ENCODING>***  
Menentukan format encoding untuk file kunci  
Wajib: Ya

***<PATH>***  
Menentukan path file di mana file kunci akan ditulis  
Wajib: Ya

## Menghasilkan referensi kunci KSP (Windows)
<a name="key-generate-ksp-key-reference"></a>

**catatan**  
Fitur ini hanya ada di SDK versi 5.16.0 dan yang lebih baru.

### Prasyarat
<a name="key-generate-ksp-key-reference-requirements"></a>
+ Anda dapat menghasilkan referensi kunci KSP hanya pada platform Windows.
+ Anda harus masuk sebagai pengguna kripto (CU).

### Lokasi berkas
<a name="key-generate-ksp-key-reference-options"></a>

Secara default, AWS CloudHSM menyimpan file yang dihasilkan di: `C:\Users\Default\AppData\Roaming\Microsoft\Crypto\CaviumKSP\GlobalPartition`

Untuk menentukan lokasi yang berbeda, gunakan `--path` parameter.

### Sintaksis
<a name="key-generate-ksp-key-reference-syntax"></a>

```
aws-cloudhsm > help key generate-file --encoding ksp-key-reference 
Generate a key file from a key in the HSM cluster. This command does not export any private key data from the HSM

Usage: key generate-file --encoding <ENCODING> --path <PATH> --filter [<FILTER>...]

Options:
      --encoding <ENCODING>
        Encoding format for the key file

        Possible values:
        - reference-pem:     PEM formatted key reference (supports private keys)
        - pem:               PEM format (supports public keys)
        - ksp-key-reference: KSP key reference format

      --cluster-id <CLUSTER_ID>
        Unique Id to choose which of the clusters in the config file to run the operation against. If not provided with multiple clusters configured, will error

      --path <PATH>
        Directory path where the key file will be written

      --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 matching key for file generation

      --all
        Generate ksp key reference for all available key pairs in HSM

  -h, --help
        Print help (see a summary with '-h')
```

### Contoh - Menghasilkan referensi kunci KSP menggunakan filter atribut dari kunci pribadi
<a name="key-generate-ksp-key-reference-example1"></a>

Contoh berikut menghasilkan referensi kunci KSP untuk kunci pribadi dengan label tertentu.

**Example**  

```
aws-cloudhsm > key generate-file --encoding ksp-key-reference --path  --filter attr.label="ec-test-private-key"
{
  "error_code": 0,
  "data": {
    "message": "Successfully generated key file"
  }
}
```

### Contoh - Menghasilkan referensi kunci KSP untuk semua pasangan kunci
<a name="key-generate-ksp-key-reference-example2"></a>

Contoh berikut menghasilkan referensi kunci KSP untuk semua pasangan kunci di cluster Anda.

**Example**  

```
aws-cloudhsm > key generate-file --encoding ksp-key-reference --all
{
  "error_code": 0,
  "data": {
    "message": "Successfully generated key file"
  }
}
```

## Topik terkait
<a name="key-generate-file-seealso"></a>
+ [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)
+ [Tombol filter menggunakan CloudHSM CLI](manage-keys-cloudhsm-cli-filtering.md)
+ [generate-asymmetric-pairKategori di CloudHSM CLI](cloudhsm_cli-key-generate-asymmetric-pair.md)
+ [Kategori generate-simetris di CloudHSM CLI](cloudhsm_cli-key-generate-symmetric.md)

# generate-asymmetric-pairKategori di CloudHSM CLI
<a name="cloudhsm_cli-key-generate-asymmetric-pair"></a>

Dalam CloudHSM **key generate-asymmetric-pair** CLI, adalah kategori induk untuk sekelompok perintah yang, ketika dikombinasikan dengan kategori induk, membuat perintah yang menghasilkan pasangan kunci asimetris. Saat ini, kategori ini terdiri dari perintah berikut:
+ [kunci generate-asymmetric-pair ec](cloudhsm_cli-key-generate-asymmetric-pair-ec.md)
+ [kunci generate-asymmetric-pair rsa](cloudhsm_cli-key-generate-asymmetric-pair-rsa.md)

# Hasilkan key pair EC asimetris dengan CloudHSM CLI
<a name="cloudhsm_cli-key-generate-asymmetric-pair-ec"></a>

Gunakan **key asymmetric-pair ec** perintah di CloudHSM CLI untuk menghasilkan key pair elliptic-curve (EC) asimetris di cluster Anda. AWS CloudHSM 

## Jenis pengguna
<a name="key-generate-asymmetric-pair-ec-user-type"></a>

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

## Persyaratan
<a name="key-generate-asymmetric-pair-ec-requirements"></a>

Untuk menjalankan perintah ini, Anda harus masuk sebagai CU.

## Sintaksis
<a name="key-generate-asymmetric-pair-ec-syntax"></a>

```
aws-cloudhsm > help key generate-asymmetric-pair ec
Generate an Elliptic-Curve Cryptography (ECC) key pair

Usage: key generate-asymmetric-pair ec [OPTIONS] --public-label <PUBLIC_LABEL> --private-label <PRIVATE_LABEL> --curve <CURVE>

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
      --public-label <PUBLIC_LABEL>
          Label for the public key
      --private-label <PRIVATE_LABEL>
          Label for the private key
      --session
          Creates a session key pair that exists only in the current session. The key cannot be recovered after the session ends
      --curve <CURVE>
          Elliptic curve used to generate the key pair [possible values: prime256v1, secp256r1, secp224r1, secp384r1, secp256k1, secp521r1, ed25519]
      --public-attributes [<PUBLIC_KEY_ATTRIBUTES>...]
          Space separated list of key attributes to set for the generated EC public key in the form of KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE
      --private-attributes [<PRIVATE_KEY_ATTRIBUTES>...]
          Space separated list of key attributes to set for the generated EC private key in the form of KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE
      --share-crypto-users [<SHARE_CRYPTO_USERS>...]
          Space separated list of Crypto User usernames to share the EC private key with
      --manage-private-key-quorum-value <MANAGE_PRIVATE_KEY_QUORUM_VALUE>
          The quorum value for key management operations for the private key
      --use-private-key-quorum-value <USE_PRIVATE_KEY_QUORUM_VALUE>
          The quorum value for key usage operations for the private key
  -h, --help
          Print help
```

## Contoh
<a name="key-generate-asymmetric-pair-ec-examples"></a>

Contoh-contoh ini menunjukkan cara menggunakan **key generate-asymmetric-pair ec** perintah untuk membuat key pair EC.

**Example Contoh: Membuat key pair EC**  

```
aws-cloudhsm > key generate-asymmetric-pair ec \
    --curve secp224r1 \
    --public-label ec-public-key-example \
    --private-label ec-private-key-example
{
  "error_code": 0,
  "data": {
    "public_key": {
      "key-reference": "0x000000000012000b",
      "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": "ec",
        "label": "ec-public-key-example",
        "id": "",
        "check-value": "0xd7c1a7",
        "class": "public-key",
        "encrypt": false,
        "decrypt": false,
        "token": true,
        "always-sensitive": false,
        "derive": false,
        "destroyable": true,
        "extractable": true,
        "local": true,
        "modifiable": true,
        "never-extractable": false,
        "private": true,
        "sensitive": false,
        "sign": false,
        "trusted": false,
        "unwrap": false,
        "verify": false,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 57,
        "ec-point": "0x047096513df542250a6b228fd9cb67fd0c903abc93488467681974d6f371083fce1d79da8ad1e9ede745fb9f38ac8622a1b3ebe9270556000c",
        "curve": "secp224r1"
      }
    },
"private_key": {
      "key-reference": "0x000000000012000c",
      "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": "ec",
        "label": "ec-private-key-example",
        "id": "",
        "check-value": "0xd7c1a7",
        "class": "private-key",
        "encrypt": false,
        "decrypt": false,
        "token": true,
        "always-sensitive": true,
        "derive": false,
        "destroyable": true,
        "extractable": true,
        "local": true,
        "modifiable": true,
        "never-extractable": false,
        "private": true,
        "sensitive": true,
        "sign": false,
        "trusted": false,
        "unwrap": false,
        "verify": false,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 122,
        "ec-point": "0x047096513df542250a6b228fd9cb67fd0c903abc93488467681974d6f371083fce1d79da8ad1e9ede745fb9f38ac8622a1b3ebe9270556000c",
        "curve": "secp224r1"
      }
    }
  }
}
```

**Example Contoh: Buat key pair EC dengan atribut opsional**  

```
aws-cloudhsm > key generate-asymmetric-pair ec \
    --curve secp224r1 \
    --public-label ec-public-key-example \
    --private-label ec-private-key-example \
    --public-attributes encrypt=true \
    --private-attributes decrypt=true
{
  "error_code": 0,
  "data": {
    "public_key": {
      "key-reference": "0x00000000002806eb",
      "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": "ec",
        "label": "ec-public-key-example",
        "id": "",
        "check-value": "0xedef86",
        "class": "public-key",
        "encrypt": true,
        "decrypt": false,
        "token": true,
        "always-sensitive": false,
        "derive": false,
        "destroyable": true,
        "extractable": true,
        "local": true,
        "modifiable": true,
        "never-extractable": false,
        "private": true,
        "sensitive": false,
        "sign": false,
        "trusted": false,
        "unwrap": false,
        "verify": false,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 57,
        "ec-point": "0x0487af31882189ec29eddf17a48e8b9cebb075b7b5afc5522fe9c83a029a450cc68592889a1ebf45f32240da5140d58729ffd7b2d44262ddb8",
        "curve": "secp224r1"
      }
    },
    "private_key": {
      "key-reference": "0x0000000000280c82",
      "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": "ec",
        "label": "ec-private-key-example",
        "id": "",
        "check-value": "0xedef86",
        "class": "private-key",
        "encrypt": false,
        "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": false,
        "trusted": false,
        "unwrap": false,
        "verify": false,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 122,
        "ec-point": "0x0487af31882189ec29eddf17a48e8b9cebb075b7b5afc5522fe9c83a029a450cc68592889a1ebf45f32240da5140d58729ffd7b2d44262ddb8",
        "curve": "secp224r1"
      }
    }
  }
}
```

**Example Contoh: Buat key pair EC dengan nilai kuorum**  
Saat membuat kunci dengan kontrol kuorum, kunci harus dikaitkan dengan jumlah minimum pengguna yang sama dengan nilai kuorum kunci terbesar. Pengguna terkait termasuk pemilik kunci dan Pengguna Crypto dengan siapa kunci tersebut dibagikan. Untuk menentukan jumlah pengguna minimum untuk berbagi kunci, dapatkan nilai kuorum terbesar antara nilai kuorum penggunaan kunci dan nilai kuorum manajemen kunci dan kurangi 1 untuk memperhitungkan pemilik kunci, yang secara default dikaitkan dengan kunci. Untuk berbagi kunci dengan lebih banyak pengguna, gunakan **[Bagikan kunci menggunakan CloudHSM CLI](cloudhsm_cli-key-share.md)** perintah.  

```
aws-cloudhsm > key generate-asymmetric-pair ec \
    --curve secp224r1 \
    --public-label ec-public-key-example \
    --private-label ec-private-key-example \
    --public-attributes verify=true \
    --private-attributes sign=true
    --share-crypto-users cu2 cu3 cu4 \
    --manage-private-key-quorum-value 4 \
    --use-private-key-quorum-value 2
{
  "error_code": 0,
  "data": {
    "public_key": {
      "key-reference": "0x00000000002806eb",
      "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": "ec",
        "label": "ec-public-key-example",
        "id": "",
        "check-value": "0xedef86",
        "class": "public-key",
        "encrypt": false,
        "decrypt": false,
        "token": true,
        "always-sensitive": false,
        "derive": false,
        "destroyable": true,
        "extractable": true,
        "local": true,
        "modifiable": true,
        "never-extractable": false,
        "private": true,
        "sensitive": false,
        "sign": false,
        "trusted": false,
        "unwrap": false,
        "verify": true,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 57,
        "ec-point": "0x0487af31882189ec29eddf17a48e8b9cebb075b7b5afc5522fe9c83a029a450cc68592889a1ebf45f32240da5140d58729ffd7b2d44262ddb8",
        "curve": "secp224r1"
      }
    },
    "private_key": {
      "key-reference": "0x0000000000280c82",
      "key-info": {
        "key-owners": [
          {
            "username": "cu1",
            "key-coverage": "full"
          }
        ],
        "shared-users": [
          {
            "username": "cu2",
            "key-coverage": "full"
          },
          {
            "username": "cu3",
            "key-coverage": "full"
          },
          {
            "username": "cu4",
            "key-coverage": "full"
          },
        ],
        "key-quorum-values": {
          "manage-key-quorum-value": 4,
          "use-key-quorum-value": 2
        },
        "cluster-coverage": "full"
      },
      "attributes": {
        "key-type": "ec",
        "label": "ec-private-key-example",
        "id": "",
        "check-value": "0xedef86",
        "class": "private-key",
        "encrypt": false,
        "decrypt": false,
        "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": false,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 122,
        "ec-point": "0x0487af31882189ec29eddf17a48e8b9cebb075b7b5afc5522fe9c83a029a450cc68592889a1ebf45f32240da5140d58729ffd7b2d44262ddb8",
        "curve": "secp224r1"
      }
    }
  }
}
```

## Pendapat
<a name="key-generate-asymmetric-pair-ec-arguments"></a>

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

***<CURVE>***  
Menentukan pengenal untuk kurva elips.  
+ primer256v1
+ secp256r1
+ secp224r1
+ secp384r1
+ secp256k1
+ secp521r1
+ ed25519 (hanya didukung pada instance hsm2m.medium dalam mode non-FIPS)
Wajib: Ya

***<PUBLIC\$1KEY\$1ATTRIBUTES>***  
Menentukan daftar spasi dipisahkan atribut kunci untuk mengatur untuk kunci publik EC dihasilkan dalam bentuk `KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` (misalnya,`verify=true`)  
Untuk daftar atribut kunci yang didukung, lihat[Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md).  
Wajib: Tidak

***<PUBLIC\$1LABEL>***  
Menentukan label yang ditetapkan pengguna untuk public-key. 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

***<PRIVATE\$1KEY\$1ATTRIBUTES>***  
Menentukan daftar spasi dipisahkan atribut kunci untuk mengatur untuk kunci pribadi EC dihasilkan dalam bentuk `KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` (misalnya,`sign=true`)  
Untuk daftar atribut kunci yang didukung, lihat[Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md).  
Wajib: Tidak

***<PRIVATE\$1LABEL>***  
Menentukan label yang ditetapkan pengguna untuk kunci pribadi. 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

***<SHARE\$1CRYPTO\$1USERS>***  
Menentukan daftar nama pengguna Crypto User yang dipisahkan spasi untuk berbagi kunci pribadi EC  
Wajib: Tidak

***<MANAGE\$1PRIVATE\$1KEY\$1QUORUM\$1VALUE>***  
Nilai kuorum untuk operasi manajemen kunci privat. Nilai ini harus kurang dari atau sama dengan jumlah pengguna yang terkait dengan kunci tersebut. Ini termasuk pengguna dengan siapa kunci dibagikan dan pemilik kunci. Nilai maks 8.  
Wajib: Tidak

***<USE\$1PRIVATE\$1KEY\$1QUORUM\$1VALUE>***  
Nilai kuorum untuk operasi penggunaan kunci privat. Nilai ini harus kurang dari atau sama dengan jumlah pengguna yang terkait dengan kunci tersebut. Ini termasuk pengguna dengan siapa kunci dibagikan dan pemilik kunci. Nilai maks 8.  
Wajib: Tidak

## Topik terkait
<a name="key-generate-asymmetric-pair-ec-seealso"></a>
+ [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)
+ [Tombol filter menggunakan CloudHSM CLI](manage-keys-cloudhsm-cli-filtering.md)

# Hasilkan key pair RSA asimetris dengan CloudHSM CLI
<a name="cloudhsm_cli-key-generate-asymmetric-pair-rsa"></a>

Gunakan **key generate-asymmetric-pair rsa** perintah di CloudHSM CLI untuk menghasilkan key pair RSA asimetris di cluster Anda. AWS CloudHSM 

## Jenis pengguna
<a name="key-generate-asymmetric-pair-rsa-userType"></a>

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

## Persyaratan
<a name="key-generate-asymmetric-pair-rsa-requirements"></a>

Untuk menjalankan perintah ini, Anda harus masuk sebagai CU.

## Sintaksis
<a name="key-generate-asymmetric-pair-rsa-syntax"></a>

```
aws-cloudhsm > help key generate-asymmetric-pair rsa
Generate an RSA key pair

Usage: key generate-asymmetric-pair rsa [OPTIONS] --public-label <PUBLIC_LABEL> --private-label <PRIVATE_LABEL> --modulus-size-bits <MODULUS_SIZE_BITS> --public-exponent <PUBLIC_EXPONENT>

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
      --public-label <PUBLIC_LABEL>
          Label for the public key
      --private-label <PRIVATE_LABEL>
          Label for the private key
      --session
          Creates a session key pair that exists only in the current session. The key cannot be recovered after the session ends
      --modulus-size-bits <MODULUS_SIZE_BITS>
          Modulus size in bits used to generate the RSA key pair
      --public-exponent <PUBLIC_EXPONENT>
          Public exponent used to generate the RSA key pair
      --public-attributes [<PUBLIC_KEY_ATTRIBUTES>...]
          Space separated list of key attributes to set for the generated RSA public key in the form of KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE
      --private-attributes [<PRIVATE_KEY_ATTRIBUTES>...]
          Space separated list of key attributes to set for the generated RSA private key in the form of KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE
      --share-crypto-users [<SHARE_CRYPTO_USERS>...]
          Space separated list of Crypto User usernames to share the RSA key with
      --manage-private-key-quorum-value <MANAGE_PRIVATE_KEY_QUORUM_VALUE>
          The quorum value for key management operations for the private key
      --use-private-key-quorum-value <USE_PRIVATE_KEY_QUORUM_VALUE>
          The quorum value for key usage operations for the private key
  -h, --help
          Print help
```

## Contoh
<a name="key-generate-asymmetric-pair-rsa-examples"></a>

Contoh-contoh ini menunjukkan cara menggunakan `key generate-asymmetric-pair rsa` untuk membuat key pair RSA.

**Example Contoh: Membuat key pair RSA**  

```
aws-cloudhsm > key generate-asymmetric-pair rsa \
--public-exponent 65537 \
--modulus-size-bits 2048 \
--public-label rsa-public-key-example \
--private-label rsa-private-key-example
{
  "error_code": 0,
  "data": {
    "public_key": {
      "key-reference": "0x0000000000160010",
      "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": "rsa",
        "label": "rsa-public-key-example",
        "id": "",
        "check-value": "0x498e1f",
        "class": "public-key",
        "encrypt": false,
        "decrypt": false,
        "token": true,
        "always-sensitive": false,
        "derive": false,
        "destroyable": true,
        "extractable": true,
        "local": true,
        "modifiable": true,
        "never-extractable": false,
        "private": true,
        "sensitive": false,
        "sign": false,
        "trusted": false,
        "unwrap": false,
        "verify": false,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 512,
        "public-exponent": "0x010001",
        "modulus": "0xdfca0669dc8288ed3bad99509bd21c7e6192661407021b3f4cdf4a593d939dd24f4d641af8e4e73b04c847731c6dbdff3385818e08dd6efcbedd6e5b130344968c
e89a065e7d1a46ced96b46b909db2ab6be871ee700fd0a448b6e975bb64cae77c49008749212463e37a577baa57ce3e574cb057e9db131e119badf50c938f26e8a5975c61a8ba7ffe7a1115a
bcebb7d20bd6df1948ae336ae23b52d73b7f3b6acc2543edb6358e08d326d280ce489571f4d34e316a2ea1904d513ca12fa04075fc09ad005c81b7345d7804ff24c45117f0a1020dca7794df037a10aadec8653473b2088711f7b7d8b58431654e14e31af0e00511da641058fb7475ffdbe60f",
        "modulus-size-bits": 2048
      }
    },
"private_key": {
      "key-reference": "0x0000000000160011",
      "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": "rsa",
        "label": "rsa-private-key-example",
        "id": "",
        "check-value": "0x498e1f",
        "class": "private-key",
        "encrypt": false,
        "decrypt": false,
        "token": true,
        "always-sensitive": true,
        "derive": false,
        "destroyable": true,
        "extractable": true,
        "local": true,
        "modifiable": true,
        "never-extractable": false,
        "private": true,
        "sensitive": true,
        "sign": false,
        "trusted": false,
        "unwrap": false,
        "verify": false,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 1217,
        "public-exponent": "0x010001",
        "modulus": "0xdfca0669dc8288ed3bad99509bd21c7e6192661407021b3f4cdf4a593d939dd24f4d641af8e4e73b04c847731c6dbdff3385818e08dd6efcbedd6e5b130344968ce89a065e7d1a46ced96b46b909db2ab6be871ee700fd0a448b6e975bb64cae77c49008749212463e37a577baa57ce3e574cb057e9db131e119badf50c938f26e8a5975c61a8ba7ffe7a1115abcebb7d20bd6df1948ae336ae23b52d73b7f3b6acc2543edb6358e08d326d280ce489571f4d34e316a2ea1904d513ca12fa04075fc09ad005c81b7345d7804ff24c45117f0a1020dca7794df037a10aadec8653473b2088711f7b7d8b58431654e14e31af0e00511da641058fb7475ffdbe60f",
        "modulus-size-bits": 2048
      }
    }
  }
}
```

**Example Contoh: Buat key pair RSA dengan atribut opsional**  

```
aws-cloudhsm > key generate-asymmetric-pair rsa \
--public-exponent 65537 \
--modulus-size-bits 2048 \
--public-label rsa-public-key-example \
--private-label rsa-private-key-example \
--public-attributes encrypt=true \
--private-attributes decrypt=true
{
  "error_code": 0,
  "data": {
    "public_key": {
      "key-reference": "0x0000000000280cc8",
      "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": "rsa",
        "label": "rsa-public-key-example",
        "id": "",
        "check-value": "0x01fe6e",
        "class": "public-key",
        "encrypt": true,
        "decrypt": false,
        "token": true,
        "always-sensitive": false,
        "derive": false,
        "destroyable": true,
        "extractable": true,
        "local": true,
        "modifiable": true,
        "never-extractable": false,
        "private": true,
        "sensitive": false,
        "sign": false,
        "trusted": false,
        "unwrap": false,
        "verify": false,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 512,
        "public-exponent": "0x010001",
        "modulus": "0xb1d27e857a876f4e9fd5de748a763c539b359f937eb4b4260e30d1435485a732c878cdad9c72538e2215351b1d41358c9bf80b599c
73a80fdb457aa7b20cd61e486c326e2cfd5e124a7f6a996437437812b542e3caf85928aa866f0298580f7967ee6aa01440297d7308fdd9b76b70d1b67f12634d
f6e6296d6c116d5744c6d60d14d3bf3cb978fe6b75ac67b7089bafd50d8687213b31abc7dc1bad422780d29c851d5102b56f932551eaf52a9591fd8c43d81ecc
133022653225bd129f8491101725e9ea33e1ded83fb57af35f847e532eb30cd7e726f23910d2671c6364092e834697ec3cef72cc23615a1ba7c5e100156ae0ac
ac3160f0ca9725d38318b7",
        "modulus-size-bits": 2048
      }
    },
    "private_key": {
      "key-reference": "0x0000000000280cc7",
      "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": "rsa",
        "label": "rsa-private-key-example",
        "id": "",
        "check-value": "0x01fe6e",
        "class": "private-key",
        "encrypt": false,
        "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": false,
        "trusted": false,
        "unwrap": false,
        "verify": false,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 1217,
        "public-exponent": "0x010001",
        "modulus": "0xb1d27e857a876f4e9fd5de748a763c539b359f937eb4b4260e30d1435485a732c878cdad9c72538e2215351b1d41358c9bf80b599c73a80fdb457aa7b20cd61e486c326e2cfd5e124a7f6a996437437812b542e3caf85928aa866f0298580f7967ee6aa01440297d7308fdd9b76b70d1b67f12634df6e6296d6c116d5744c6d60d14d3bf3cb978fe6b75ac67b7089bafd50d8687213b31abc7dc1bad422780d29c851d5102b56f932551eaf52a9591fd8c43d81ecc133022653225bd129f8491101725e9ea33e1ded83fb57af35f847e532eb30cd7e726f23910d2671c6364092e834697ec3cef72cc23615a1ba7c5e100156ae0acac3160f0ca9725d38318b7",
        "modulus-size-bits": 2048
      }
    }
  }
}
```

**Example Contoh: Buat key pair RSA dengan nilai kuorum**  
Saat membuat kunci dengan kontrol kuorum, kunci harus dikaitkan dengan jumlah minimum pengguna yang sama dengan nilai kuorum kunci terbesar. Pengguna terkait termasuk pemilik kunci dan Pengguna Crypto dengan siapa kunci tersebut dibagikan. Untuk menentukan jumlah pengguna minimum untuk berbagi kunci, dapatkan nilai kuorum terbesar antara nilai kuorum penggunaan kunci dan nilai kuorum manajemen kunci dan kurangi 1 untuk memperhitungkan pemilik kunci, yang secara default dikaitkan dengan kunci. Untuk berbagi kunci dengan lebih banyak pengguna, gunakan **[Bagikan kunci menggunakan CloudHSM CLI](cloudhsm_cli-key-share.md)** perintah.  

```
aws-cloudhsm > key generate-asymmetric-pair rsa \
--public-exponent 65537 \
--modulus-size-bits 2048 \
--public-label rsa-public-key-example \
--private-label rsa-private-key-example \
--public-attributes verify=true \
--private-attributes sign=true
--share-crypto-users cu2 cu3 cu4 \
--manage-private-key-quorum-value 4 \
--use-private-key-quorum-value 2
{
  "error_code": 0,
  "data": {
    "public_key": {
      "key-reference": "0x0000000000280cc8",
      "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": "rsa",
        "label": "rsa-public-key-example",
        "id": "",
        "check-value": "0x01fe6e",
        "class": "public-key",
        "encrypt": false,
        "decrypt": false,
        "token": true,
        "always-sensitive": false,
        "derive": false,
        "destroyable": true,
        "extractable": true,
        "local": true,
        "modifiable": true,
        "never-extractable": false,
        "private": true,
        "sensitive": false,
        "sign": true,
        "trusted": false,
        "unwrap": false,
        "verify": true,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 512,
        "public-exponent": "0x010001",
        "modulus": "0xb1d27e857a876f4e9fd5de748a763c539b359f937eb4b4260e30d1435485a732c878cdad9c72538e2215351b1d41358c9bf80b599c
73a80fdb457aa7b20cd61e486c326e2cfd5e124a7f6a996437437812b542e3caf85928aa866f0298580f7967ee6aa01440297d7308fdd9b76b70d1b67f12634d
f6e6296d6c116d5744c6d60d14d3bf3cb978fe6b75ac67b7089bafd50d8687213b31abc7dc1bad422780d29c851d5102b56f932551eaf52a9591fd8c43d81ecc
133022653225bd129f8491101725e9ea33e1ded83fb57af35f847e532eb30cd7e726f23910d2671c6364092e834697ec3cef72cc23615a1ba7c5e100156ae0ac
ac3160f0ca9725d38318b7",
        "modulus-size-bits": 2048
      }
    },
    "private_key": {
      "key-reference": "0x0000000000280cc7",
      "key-info": {
        "key-owners": [
          {
            "username": "cu1",
            "key-coverage": "full"
          }
        ],
        "shared-users": [
          {
            "username": "cu2",
            "key-coverage": "full"
          },
          {
            "username": "cu3",
            "key-coverage": "full"
          },
          {
            "username": "cu4",
            "key-coverage": "full"
          },
        ],
        "key-quorum-values": {
          "manage-key-quorum-value": 4,
          "use-key-quorum-value": 2
        },
        "cluster-coverage": "full"
      },
      "attributes": {
        "key-type": "rsa",
        "label": "rsa-private-key-example",
        "id": "",
        "check-value": "0x01fe6e",
        "class": "private-key",
        "encrypt": false,
        "decrypt": false,
        "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": false,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 1217,
        "public-exponent": "0x010001",
        "modulus": "0xb1d27e857a876f4e9fd5de748a763c539b359f937eb4b4260e30d1435485a732c878cdad9c72538e2215351b1d41358c9bf80b599c73a80fdb457aa7b20cd61e486c326e2cfd5e124a7f6a996437437812b542e3caf85928aa866f0298580f7967ee6aa01440297d7308fdd9b76b70d1b67f12634df6e6296d6c116d5744c6d60d14d3bf3cb978fe6b75ac67b7089bafd50d8687213b31abc7dc1bad422780d29c851d5102b56f932551eaf52a9591fd8c43d81ecc133022653225bd129f8491101725e9ea33e1ded83fb57af35f847e532eb30cd7e726f23910d2671c6364092e834697ec3cef72cc23615a1ba7c5e100156ae0acac3160f0ca9725d38318b7",
        "modulus-size-bits": 2048
      }
    }
  }
}
```

## Pendapat
<a name="key-generate-asymmetric-pair-rsa-arguments"></a>

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

***<MODULUS\$1SIZE\$1BITS>***  
 Menentukan panjang modulus dalam bit. Nilai minimum adalah 2048.   
Wajib: Ya

***<PRIVATE\$1KEY\$1ATTRIBUTES>***  
Menentukan daftar spasi dipisahkan atribut kunci untuk mengatur untuk kunci pribadi RSA dihasilkan dalam bentuk `KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` (misalnya,) `sign=true`  
Untuk daftar atribut kunci yang didukung, lihat[Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md).  
Wajib: Tidak

***<PRIVATE\$1LABEL>***  
 Menentukan label yang ditetapkan pengguna untuk kunci pribadi. 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

***<PUBLIC\$1EXPONENT>***  
Menentukan eksponen publik. Nilai harus angka ganjil yang lebih besar dari atau sama dengan 65537.  
Wajib: Ya

***<PUBLIC\$1KEY\$1ATTRIBUTES>***  
Menentukan daftar spasi dipisahkan atribut kunci untuk mengatur untuk kunci publik RSA dihasilkan dalam bentuk `KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` (misalnya,) `verify=true`  
Untuk daftar atribut kunci yang didukung, lihat[Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md).  
Wajib: Tidak

***<PUBLIC\$1LABEL>***  
 Menentukan label yang ditetapkan pengguna untuk public-key. 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

***<SHARE\$1CRYPTO\$1USERS>***  
Menentukan daftar nama pengguna Crypto User yang dipisahkan spasi untuk berbagi kunci pribadi RSA  
Wajib: Tidak

***<MANAGE\$1PRIVATE\$1KEY\$1QUORUM\$1VALUE>***  
Nilai kuorum untuk operasi manajemen kunci privat. Nilai ini harus kurang dari atau sama dengan jumlah pengguna yang terkait dengan kunci tersebut. Ini termasuk pengguna dengan siapa kunci dibagikan dan pemilik kunci. Nilai maks 8.  
Wajib: Tidak

***<USE\$1PRIVATE\$1KEY\$1QUORUM\$1VALUE>***  
Nilai kuorum untuk operasi penggunaan kunci privat. Nilai ini harus kurang dari atau sama dengan jumlah pengguna yang terkait dengan kunci tersebut. Ini termasuk pengguna dengan siapa kunci dibagikan dan pemilik kunci. Nilai maks 8.  
Wajib: Tidak

## Topik terkait
<a name="key-generate-asymmetric-pair-rsa-seealso"></a>
+ [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)
+ [Tombol filter menggunakan CloudHSM CLI](manage-keys-cloudhsm-cli-filtering.md)

# Kategori generate-simetris di CloudHSM CLI
<a name="cloudhsm_cli-key-generate-symmetric"></a>

Dalam CloudHSM **key generate-symmetric** CLI, adalah kategori induk untuk sekelompok perintah yang, ketika dikombinasikan dengan kategori induk, membuat perintah yang menghasilkan kunci simetris. Saat ini, kategori ini terdiri dari perintah berikut:
+ [kunci menghasilkan aes simetris](cloudhsm_cli-key-generate-symmetric-aes.md)
+ [kunci menghasilkan rahasia-generik simetris](cloudhsm_cli-key-generate-symmetric-generic-secret.md)

# Hasilkan kunci AES simetris dengan CloudHSM CLI
<a name="cloudhsm_cli-key-generate-symmetric-aes"></a>

Gunakan **key generate-symmetric aes** perintah di CloudHSM CLI untuk menghasilkan kunci AES simetris di cluster Anda. AWS CloudHSM 

## Jenis pengguna
<a name="key-generate-symmetric-aes-userType"></a>

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

## Persyaratan
<a name="key-generate-symmetric-aes-requirements"></a>

Untuk menjalankan perintah ini, Anda harus masuk sebagai CU.

## Sintaksis
<a name="key-generate-symmetric-aes-syntax"></a>

```
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
      --share-crypto-users [<SHARE_CRYPTO_USERS>...]
          Space separated list of Crypto User usernames to share the AES key with
      --manage-key-quorum-value <MANAGE_KEY_QUORUM_VALUE>
          The quorum value for key management operations
      --use-key-quorum-value <USE_KEY_QUORUM_VALUE>
          The quorum value for key usage operations
  -h, --help
          Print help
```

## Contoh
<a name="key-generate-symmetric-aes-examples"></a>

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

**Example 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": [],
        "key-quorum-values": {
          "manage-key-quorum-value": 0,
          "use-key-quorum-value": 0
        },
        "cluster-coverage": "full"
      },
      "attributes": {
        "key-type": "aes",
        "label": "example-aes",
        "id": "",
        "check-value": "0x9b94bd",
        "class": "secret-key",
        "encrypt": false,
        "decrypt": false,
        "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
      }
    }
  }
}
```

**Example 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": [],
        "key-quorum-values": {
          "manage-key-quorum-value": 0,
          "use-key-quorum-value": 0
        },
        "cluster-coverage": "full"
      },
      "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
      }
    }
  }
}
```

**Example Contoh: Buat kunci AES dengan nilai kuorum**  
Saat membuat kunci dengan kontrol kuorum, kunci harus dikaitkan dengan jumlah minimum pengguna yang sama dengan nilai kuorum kunci terbesar. Pengguna terkait termasuk pemilik kunci dan Pengguna Crypto dengan siapa kunci tersebut dibagikan. Untuk menentukan jumlah pengguna minimum untuk berbagi kunci, dapatkan nilai kuorum terbesar antara nilai kuorum penggunaan kunci dan nilai kuorum manajemen kunci dan kurangi 1 untuk memperhitungkan pemilik kunci, yang secara default dikaitkan dengan kunci. Untuk berbagi kunci dengan lebih banyak pengguna, gunakan **[Bagikan kunci menggunakan CloudHSM CLI](cloudhsm_cli-key-share.md)** perintah.  

```
aws-cloudhsm > key generate-symmetric aes \
--label example-aes \
--key-length-bytes 24 \
--attributes decrypt=true encrypt=true
--share-crypto-users cu2 cu3 cu4 \
--manage-key-quorum-value 4 \
--use-key-quorum-value 2
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000002e06bf",
      "key-info": {
        "key-owners": [
          {
            "username": "cu1",
            "key-coverage": "full"
          }
        ],
        "shared-users": [
          {
            "username": "cu2",
            "key-coverage": "full"
          },
          {
            "username": "cu3",
            "key-coverage": "full"
          },
          {
            "username": "cu4",
            "key-coverage": "full"
          },
        ],
        "key-quorum-values": {
          "manage-key-quorum-value": 4,
          "use-key-quorum-value": 2
        },
        "cluster-coverage": "full"
      },
      "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
<a name="key-generate-symmetric-aes-arguments"></a>

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

***<KEY\$1ATTRIBUTES>***  
Menentukan daftar spasi dipisahkan atribut kunci untuk mengatur kunci AES dihasilkan dalam bentuk `KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` (misalnya,`sign=true`).  
Untuk daftar atribut kunci yang didukung, lihat[Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md).  
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

***<SHARE\$1CRYPTO\$1USERS>***  
Menentukan daftar nama pengguna Crypto User yang dipisahkan spasi untuk berbagi kunci AES dengan  
Wajib: Tidak

***<MANAGE\$1KEY\$1QUORUM\$1VALUE>***  
Nilai kuorum untuk operasi manajemen kunci. Nilai ini harus kurang dari atau sama dengan jumlah pengguna yang terkait dengan kunci tersebut. Ini termasuk pengguna dengan siapa kunci dibagikan dan pemilik kunci. Nilai maks 8.  
Wajib: Tidak

***<USE\$1KEY\$1QUORUM\$1VALUE>***  
Nilai kuorum untuk operasi penggunaan kunci. Nilai ini harus kurang dari atau sama dengan jumlah pengguna yang terkait dengan kunci tersebut. Ini termasuk pengguna dengan siapa kunci dibagikan dan pemilik kunci. Nilai maks 8.  
Wajib: Tidak

## Topik terkait
<a name="key-generate-symmetric-aes-seealso"></a>
+ [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)
+ [Tombol filter menggunakan CloudHSM CLI](manage-keys-cloudhsm-cli-filtering.md)

# Hasilkan kunci Rahasia Generik simetris dengan CloudHSM CLI
<a name="cloudhsm_cli-key-generate-symmetric-generic-secret"></a>

Gunakan **key generate-symmetric generic-secret** perintah di CloudHSM CLI untuk menghasilkan kunci Rahasia Generik simetris di cluster Anda. AWS CloudHSM 

## Jenis pengguna
<a name="key-generate-symmetric-generic-secret-userType"></a>

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

## Persyaratan
<a name="key-generate-symmetric-generic-secret-requirements"></a>

Untuk menjalankan perintah ini, Anda harus masuk sebagai CU.

## Sintaksis
<a name="key-generate-symmetric-generic-secret-syntax"></a>

```
aws-cloudhsm > key help generate-symmetric generic-secret
Generate a generic secret key

Usage: key generate-symmetric generic-secret [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 generic secret key in the form of KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE
      --share-crypto-users [<SHARE_CRYPTO_USERS>...]
          Space separated list of Crypto User usernames to share the generic secret key with
      --manage-key-quorum-value <MANAGE_KEY_QUORUM_VALUE>
          The quorum value for key management operations
      --use-key-quorum-value <USE_KEY_QUORUM_VALUE>
          The quorum value for key usage operations
  -h, --help
          Print help
```

## Contoh
<a name="key-generate-symmetric-generic-secret-examples"></a>

Contoh-contoh ini menunjukkan cara menggunakan **key generate-symmetric generic-secret** perintah untuk membuat kunci rahasia generik.

**Example Contoh: Buat kunci rahasia generik**  

```
aws-cloudhsm > key generate-symmetric generic-secret \
--label example-generic-secret \
--key-length-bytes 256
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000002e08fd",
      "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": "generic-secret",
        "label": "example-generic-secret",
        "id": "",
        "class": "secret-key",
        "encrypt": false,
        "decrypt": false,
        "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": 256
      }
    }
  }
}
```

**Example Contoh: Buat kunci rahasia generik dengan atribut opsional**  

```
aws-cloudhsm > key generate-symmetric generic-secret \
--label example-generic-secret \
--key-length-bytes 256 \
--attributes encrypt=true
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000002e08fd",
      "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": "generic-secret",
        "label": "example-generic-secret",
        "id": "",
        "class": "secret-key",
        "encrypt": true,
        "decrypt": false,
        "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": 256
      }
    }
  }
}
```

**Example Contoh: Buat kunci rahasia generik dengan nilai kuorum**  
Saat membuat kunci dengan kontrol kuorum, kunci harus dikaitkan dengan jumlah minimum pengguna yang sama dengan nilai kuorum kunci terbesar. Pengguna terkait termasuk pemilik kunci dan Pengguna Crypto dengan siapa kunci tersebut dibagikan. Untuk menentukan jumlah pengguna minimum untuk berbagi kunci, dapatkan nilai kuorum terbesar antara nilai kuorum penggunaan kunci dan nilai kuorum manajemen kunci dan kurangi 1 untuk memperhitungkan pemilik kunci, yang secara default dikaitkan dengan kunci. Untuk berbagi kunci dengan lebih banyak pengguna, gunakan **[Bagikan kunci menggunakan CloudHSM CLI](cloudhsm_cli-key-share.md)** perintah.  

```
aws-cloudhsm > key generate-symmetric generic-secret \
--label example-generic-secret \
--key-length-bytes 256 \
--attributes encrypt=true
--share-crypto-users cu2 cu3 cu4 \
--manage-key-quorum-value 4 \
--use-key-quorum-value 2
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000002e08fd",
      "key-info": {
        "key-owners": [
          {
            "username": "cu1",
            "key-coverage": "full"
          }
        ],
        "shared-users": [
          {
            "username": "cu2",
            "key-coverage": "full"
          },
          {
            "username": "cu3",
            "key-coverage": "full"
          },
          {
            "username": "cu4",
            "key-coverage": "full"
          },
        ],
        "key-quorum-values": {
          "manage-key-quorum-value": 4,
          "use-key-quorum-value": 2
        },
        "cluster-coverage": "full"
      },
      "attributes": {
        "key-type": "generic-secret",
        "label": "example-generic-secret",
        "id": "",
        "class": "secret-key",
        "encrypt": true,
        "decrypt": false,
        "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": 256
      }
    }
  }
}
```

## Argumen
<a name="key-generate-symmetric-generic-secret-arguments"></a>

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

***<KEY\$1ATTRIBUTES>***  
Menentukan daftar spasi dipisahkan atribut kunci untuk mengatur kunci AES yang dihasilkan dalam bentuk `KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` (misalnya,`sign=true`).  
Untuk daftar atribut kunci yang didukung, lihat[Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md).  
Wajib: Tidak

***<KEY-LENGTH-BYTES>***  
Menentukan panjang kunci dalam byte.  

Nilai valid:
+ 1 hingga 800
Wajib: Ya

***<LABEL>***  
Menentukan label yang ditetapkan pengguna untuk kunci rahasia generik. 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

***<SHARE\$1CRYPTO\$1USERS>***  
Daftar nama pengguna Crypto User yang dipisahkan ruang untuk berbagi kunci rahasia umum dengan  
Wajib: Tidak

***<MANAGE\$1KEY\$1QUORUM\$1VALUE>***  
Nilai kuorum untuk operasi manajemen kunci. Nilai ini harus kurang dari atau sama dengan jumlah pengguna yang terkait dengan kunci tersebut. Ini termasuk pengguna dengan siapa kunci dibagikan dan pemilik kunci. Nilai maks 8.  
Wajib: Tidak

***<USE\$1KEY\$1QUORUM\$1VALUE>***  
Nilai kuorum untuk operasi penggunaan kunci. Nilai ini harus kurang dari atau sama dengan jumlah pengguna yang terkait dengan kunci tersebut. Ini termasuk pengguna dengan siapa kunci dibagikan dan pemilik kunci. Nilai maks 8.  
Wajib: Tidak

## Topik terkait
<a name="key-generate-symmetric-generic-secret-seealso"></a>
+ [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)
+ [Tombol filter menggunakan CloudHSM CLI](manage-keys-cloudhsm-cli-filtering.md)

# Impor kunci format PEM dengan CloudHSM CLI
<a name="cloudhsm_cli-key-import-pem"></a>

Gunakan **key import pem** perintah AWS CloudHSM untuk mengimpor kunci format PEM ke modul keamanan perangkat keras (HSM). Anda dapat menggunakannya untuk mengimpor kunci privat yang dihasilkan di luar HSM.

**catatan**  
Gunakan [Ekspor kunci asimetris dengan CloudHSM CLI](cloudhsm_cli-key-generate-file.md) perintah untuk membuat file PEM standar dari kunci publik atau untuk membuat file PEM referensi dari kunci pribadi.

## Jenis pengguna
<a name="cloudhsm_cli-key-import-pem-user-type"></a>

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

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

## Sintaksis
<a name="cloudhsm_cli-key-import-pem-syntax"></a>

```
aws-cloudhsm > help key import pem
Import key from a PEM file

Usage: key import pem [OPTIONS] --path <PATH> --label <LABEL> --key-type-class <KEY_TYPE_CLASS>
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
      --path <PATH>
          Path where the key is located in PEM format
      --label <LABEL>
          Label for the imported key
      --key-type-class <KEY_TYPE_CLASS>
          Key type and class of the imported key [possible values: ec-public, rsa-public]
      --attributes [<IMPORT_KEY_ATTRIBUTES>...]
          Space separated list of key attributes in the form of KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE for the imported key
  -h, --help
          Print help
```

## Contoh
<a name="cloudhsm_cli-key-import-pem-examples"></a>

Contoh ini menunjukkan bagaimana menggunakan **key import pem** perintah untuk mengimpor kunci publik RSA dari file dalam format PEM.

**Example Contoh: Impor kunci publik RSA**  

```
aws-cloudhsm > key import pem --path /home/example --label example-imported-key --key-type-class rsa-public
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000001e08e3",
      "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": "rsa",
        "label": "example-imported-key",
        "id": "0x",
        "check-value": "0x99fe93",
        "class": "public-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": false,
        "sign": false,
        "trusted": false,
        "unwrap": false,
        "verify": false,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 512,
        "public-exponent": "0x010001",
        "modulus": "0x8e9c172c37aa22ed1ce25f7c3a7c936dadc532201400128b044ebb4b96│··3e4930ab910df5a2896eaeb8853cfea0e341227654a8337a7864cc8a87d136f006cfba9e68d0b329│··746c1ad60941668b18699fc8169ff1ec363d0d18292845b2454d6a0b8c5d111b79c047619d460cdf│··be59debbacb66b7abeaf3f3d35dd2b9cfa6b6b7b1258b6866cb4085ac749e9d8552b3a4509e1b86c│··828cc794e22767b4f6b5bc6ff5c96f4b7e60eab305d669cfa2197e85379cb35c659bb58fcd246d48│··d9f6a7f36063b42da025459275aa8e3abedad775387086bd6c198ded868403f4b87ffda5a2d455ac│··aa6cbd00003c31d8d2f51d10cd272b31cf0c4037791f48ad51fb35",
        "modulus-size-bits": 2048
      }
    },
    "message": "Successfully imported key"
  }
}
```

**Example Contoh: Impor kunci publik RSA dengan atribut opsional**  

```
aws-cloudhsm > key import pem --path /home/example --label example-imported-key-with-attributes --key-type-class rsa-public --attributes verify=true
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000001e08e3",
      "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": "rsa",
        "label": "example-imported-key-with-attributes",
        "id": "0x",
        "check-value": "0x99fe93",
        "class": "public-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": false,
        "sign": false,
        "trusted": false,
        "unwrap": false,
        "verify": true,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 512,
        "public-exponent": "0x010001",
        "modulus": "0x8e9c172c37aa22ed1ce25f7c3a7c936dadc532201400128b044ebb4b96│··3e4930ab910df5a2896eaeb8853cfea0e341227654a8337a7864cc8a87d136f006cfba9e68d0b329│··746c1ad60941668b18699fc8169ff1ec363d0d18292845b2454d6a0b8c5d111b79c047619d460cdf│··be59debbacb66b7abeaf3f3d35dd2b9cfa6b6b7b1258b6866cb4085ac749e9d8552b3a4509e1b86c│··828cc794e22767b4f6b5bc6ff5c96f4b7e60eab305d669cfa2197e85379cb35c659bb58fcd246d48│··d9f6a7f36063b42da025459275aa8e3abedad775387086bd6c198ded868403f4b87ffda5a2d455ac│··aa6cbd00003c31d8d2f51d10cd272b31cf0c4037791f48ad51fb35",
        "modulus-size-bits": 2048
      }
    },
    "message": "Successfully imported key"
  }
}
```

## Pendapat
<a name="cloudhsm_cli-key-import-pem-arguments"></a>

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

***<PATH>***  
Menentukan path file di mana file kunci berada.  
Wajib: Ya

***<LABEL>***  
Menentukan label yang ditetapkan pengguna untuk kunci yang diimpor. Ukuran maksimum yang diijinkan `label` adalah 126 karakter.  
Wajib: Ya

***<KEY\$1TYPE\$1CLASS>***  
Jenis kunci dan kelas kunci yang dibungkus.  
Kemungkinan nilai:  
+ ec-publik
+ rsa-publik
Wajib: Ya

***<IMPORT\$1KEY\$1ATTRIBUTES>***  
Menentukan daftar spasi dipisahkan atribut kunci untuk mengatur untuk kunci diimpor dalam bentuk `KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` (misalnya,`sign=true`). Untuk daftar atribut kunci yang didukung, lihat[Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md).  
Wajib: Tidak

## Topik terkait
<a name="cloudhsm_cli-key-import-pem-seealso"></a>
+ [Kategori tanda kripto di CloudHSM CLI](cloudhsm_cli-crypto-sign.md)
+ [Kategori verifikasi kripto di CloudHSM CLI](cloudhsm_cli-crypto-verify.md)

# Daftar kunci untuk pengguna dengan CloudHSM CLI
<a name="cloudhsm_cli-key-list"></a>

Gunakan **key list** perintah di CloudHSM CLI untuk menemukan semua kunci untuk pengguna saat ini yang ada di cluster Anda. AWS CloudHSM Outputnya mencakup kunci yang dimiliki dan dibagikan pengguna, serta semua kunci publik di klaster CloudHSM.

## Jenis pengguna
<a name="chsm-cli-key-list-user-type"></a>

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

## Sintaksis
<a name="chsm-cli-key-list-syntax"></a>

```
aws-cloudhsm > help key list
List the keys the current user owns, shares, and all public keys in the HSM cluster

Usage: key list [OPTIONS]

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 matching key(s) to list
      --max-items <MAX_ITEMS>
          The total number of items to return in the command's output. If the total number of items available is more than the value specified, a next-token is provided in the command's output. To resume pagination, provide the next-token value in the starting-token argument of a subsequent command [default: 10]
      --starting-token <STARTING_TOKEN>
          A token to specify where to start paginating. This is the next-token from a previously truncated response
  -v, --verbose
          If included, prints all attributes and key information for each matched key. By default each matched key only displays its key-reference and label attribute. This flag when used by Admins has no effect
  -h, --help
          Print help
```

## Contoh
<a name="chsm-cli-key-list-examples"></a>

Contoh berikut menunjukkan berbagai cara Anda menjalankan **key list** perintah. Contoh berikut menunjukkan output sebagai pengguna crypto.

**Example Contoh: Temukan semua kunci — default**  
Perintah ini mencantumkan kunci pengguna yang masuk yang ada di AWS CloudHSM cluster.  
Secara default, hanya 10 kunci dari pengguna yang saat ini masuk ditampilkan, dan hanya `key-reference` dan `label` ditampilkan sebagai output. Gunakan opsi pagination yang sesuai untuk menampilkan lebih banyak atau lebih sedikit tombol sebagai output.

```
aws-cloudhsm > key list
{
  "error_code": 0,
  "data": {
    "matched_keys": [
      {
        "key-reference": "0x00000000000003d5",
        "attributes": {
          "label": "test_label_1"
        }
      },
      {
        "key-reference": "0x0000000000000626",
        "attributes": {
          "label": "test_label_2"
        }
      },.
      ...8 keys later...
    ],
    "total_key_count": 56,
    "returned_key_count": 10,
    "next_token": "10"
  }
}
```

**Example Contoh: Temukan semua kunci — verbose**  
Outputnya mencakup kunci yang dimiliki dan dibagikan pengguna, serta semua kunci publik di HSMs.  
Catatan: Secara default, hanya 10 kunci dari pengguna yang sedang masuk yang ditampilkan. Gunakan opsi pagination yang sesuai untuk menampilkan lebih banyak atau lebih sedikit tombol sebagai output.

```
aws-cloudhsm > key list --verbose
{
  "error_code": 0,
  "data": {
    "matched_keys": [
      {
        "key-reference": "0x000000000012000c",
        "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": "ec",
          "label": "ec-test-private-key",
          "id": "",
          "check-value": "0x2a737d",
          "class": "private-key",
          "encrypt": false,
          "decrypt": false,
          "token": true,
          "always-sensitive": true,
          "derive": false,
          "destroyable": true,
          "extractable": true,
          "local": true,
          "modifiable": true,
          "never-extractable": false,
          "private": true,
          "sensitive": true,
          "sign": false,
          "trusted": false,
          "unwrap": false,
          "verify": false,
          "wrap": false,
          "wrap-with-trusted": false,
          "key-length-bytes": 122,
          "ec-point": "0x0442d53274a6c0ec1a23c165dcb9ccdd72c64e98ae1a9594bb5284e752c746280667e11f1e983493c1c605e0a8071ede47ca280f94c6b2aa33",
          "curve": "secp224r1"
        }
      },
      {
        "key-reference": "0x000000000012000d",
        "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": "ec",
          "label": "ec-test-public-key",
          "id": "",
          "check-value": "0x2a737d",
          "class": "public-key",
          "encrypt": false,
          "decrypt": false,
          "token": true,
          "always-sensitive": false,
          "derive": false,
          "destroyable": true,
          "extractable": true,
          "local": true,
          "modifiable": true,
          "never-extractable": false,
          "private": true,
          "sensitive": false,
          "sign": false,
          "trusted": false,
          "unwrap": false,
          "verify": false,
          "wrap": false,
          "wrap-with-trusted": false,
          "key-length-bytes": 57,
          "ec-point": "0x0442d53274a6c0ec1a23c165dcb9ccdd72c64e98ae1a9594bb5284e752c746280667e11f1e983493c1c605e0a8071ede47ca280f94c6b2aa33",
          "curve": "secp224r1"
        }
      }
    ],
      ...8 keys later...
    "total_key_count": 1580,
    "returned_key_count": 10
  }
}
```

**Example Contoh: Pengembalian paginasi**  
Contoh berikut menampilkan subset paginasi tombol yang hanya menampilkan dua tombol. Contoh kemudian memberikan panggilan berikutnya untuk menampilkan dua tombol berikutnya.  

```
aws-cloudhsm > key list --verbose --max-items 2
{
  "error_code": 0,
  "data": {
    "matched_keys": [
      {
        "key-reference": "0x0000000000000030",
        "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": "98a6688d1d964ed7b45b9cec5c4b1909",
          "id": "",
          "check-value": "0xb28a46",
          "class": "secret-key",
          "encrypt": false,
          "decrypt": false,
          "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": 32
        }
      },
      {
        "key-reference": "0x0000000000000042",
        "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": "4ad6cdcbc02044e09fa954143efde233",
          "id": "",
          "check-value": "0xc98104",
          "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": true,
          "verify": true,
          "wrap": true,
          "wrap-with-trusted": false,
          "key-length-bytes": 16
        }
      }
    ],
    "total_key_count": 1580,
    "returned_key_count": 2,
    "next_token": "2"
  }
}
```
Untuk menampilkan 2 tombol berikutnya, panggilan berikutnya dapat dilakukan:  

```
aws-cloudhsm > key list --verbose --max-items 2 --starting-token 2
{
  "error_code": 0,
  "data": {
    "matched_keys": [
      {
        "key-reference": "0x0000000000000081",
        "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": "6793b8439d044046982e5b895791e47f",
          "id": "",
          "check-value": "0x3f986f",
          "class": "secret-key",
          "encrypt": false,
          "decrypt": false,
          "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": 32
        }
      },
      {
        "key-reference": "0x0000000000000089",
        "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": "56b30fa05c6741faab8f606d3b7fe105",
          "id": "",
          "check-value": "0xe9201a",
          "class": "secret-key",
          "encrypt": false,
          "decrypt": false,
          "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": 32
        }
      }
    ],
    "total_key_count": 1580,
    "returned_key_count": 2,
    "next_token": "4"
  }
}
```
Untuk contoh lebih lanjut yang menunjukkan cara kerja mekanisme filtrasi kunci di CloudHSM CLI, lihat. [Tombol filter menggunakan CloudHSM CLI](manage-keys-cloudhsm-cli-filtering.md)

## Pendapat
<a name="key-list-arguments"></a>

***<CLUSTER\$1ID>***  
ID cluster untuk menjalankan operasi ini pada.  
Wajib: 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 cocok untuk daftar.  
Untuk daftar atribut kunci CloudHSM CLI yang didukung, lihat [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)  
Wajib: Tidak

***<MAX\$1ITEMS>***  
Jumlah total item yang akan dikembalikan dalam output perintah. Jika jumlah total item yang tersedia lebih dari nilai yang ditentukan, token berikutnya disediakan dalam output perintah. Untuk melanjutkan pagination, berikan nilai next-token dalam argumen starting-token dari perintah berikutnya.  
Wajib: Tidak

***<STARTING\$1TOKEN>***  
Token untuk menentukan di mana harus memulai paginating. Ini adalah token berikutnya dari respons yang sebelumnya terpotong.  
Wajib: Tidak

***<VERBOSE>***  
Jika disertakan, mencetak semua atribut dan informasi kunci untuk setiap kunci yang cocok. Secara default setiap kunci yang cocok hanya menampilkan atribut kunci-referensi dan label. Bendera ini saat digunakan oleh Admin tidak berpengaruh.  
Wajib: Tidak

## Topik terkait
<a name="chsm-key-list-seealso"></a>
+ [Hapus kunci dengan CloudHSM CLI](cloudhsm_cli-key-delete.md)
+ [Ekspor kunci asimetris dengan CloudHSM CLI](cloudhsm_cli-key-generate-file.md)
+ [Hapus berbagi kunci menggunakan CloudHSM CLI](cloudhsm_cli-key-unshare.md)
+ [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)
+ [Tombol filter menggunakan CloudHSM CLI](manage-keys-cloudhsm-cli-filtering.md)

# Replikasi kunci dengan CloudHSM CLI
<a name="cloudhsm_cli-key-replicate"></a>

Gunakan **key replicate** perintah di CloudHSM CLI untuk mereplikasi kunci dari AWS CloudHSM cluster sumber ke cluster tujuan. AWS CloudHSM 

## Jenis pengguna
<a name="chsm-cli-key-replicate-user-type"></a>

Jenis pengguna berikut dapat menjalankan perintah ini.
+ Admin () COs
+ Pengguna Crypto (CUs)
**catatan**  
Pengguna Crypto harus memiliki kunci untuk menggunakan perintah ini.

## Persyaratan
<a name="cloudhsm_cli-key-replicate-requirements"></a>
+ Cluster sumber dan tujuan harus klon. Ini berarti satu dibuat dari cadangan yang lain, atau keduanya dibuat dari cadangan umum. Untuk informasi selengkapnya, lihat [Membuat cluster dari backup](create-cluster-from-backup.md).
+ Pemilik kunci harus ada di cluster tujuan. Selain itu, jika kunci dibagikan dengan pengguna mana pun, pengguna tersebut juga harus ada di cluster tujuan.
+ Untuk menjalankan perintah ini, Anda harus masuk sebagai pengguna kripto atau admin di cluster sumber dan tujuan.
  +  Dalam mode perintah tunggal, perintah akan menggunakan variabel lingkungan CLOUDHSM\$1PIN dan CLOUDHSM\$1ROLE untuk mengautentikasi pada cluster sumber. Untuk informasi selengkapnya, lihat [Mode Perintah Tunggal](cloudhsm_cli-modes.md#cloudhsm_cli-mode-single-command). Untuk memberikan kredensi untuk klaster tujuan, Anda perlu menyetel dua variabel lingkungan tambahan: DESTINATION\$1CLOUDHSM\$1PIN dan DESTINATION\$1CLOUDHSM\$1ROLE:

    ```
    $ export DESTINATION_CLOUDHSM_ROLE=<role>
    ```

    ```
    $ export DESTINATION_CLOUDHSM_PIN=<username:password>
    ```
  +  Dalam mode interaktif, pengguna harus secara eksplisit masuk ke cluster sumber dan tujuan.

## Sintaksis
<a name="chsm-cli-key-replicate-syntax"></a>

```
aws-cloudhsm > help key replicate
Replicate a key from a source to a destination cluster

Usage: key replicate --filter [<FILTER>...] --source-cluster-id <SOURCE_CLUSTER_ID> --destination-cluster-id <DESTINATION_CLUSTER_ID>

Options:
      --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 matching key on the source cluster
      --source-cluster-id <SOURCE_CLUSTER_ID>
          Source cluster ID
      --destination-cluster-id <DESTINATION_CLUSTER_ID>
          Destination cluster ID
  -h, --help
          Print help
```

## Contoh
<a name="chsm-cli-key-replicate-examples"></a>

**Example Contoh: Kunci replikasi**  
Perintah ini mereplikasi kunci dari cluster sumber dengan ke klaster tujuan kloning. Contoh di bawah ini menunjukkan output saat masuk sebagai pengguna kripto di kedua cluster.  

```
crypto-user-1@cluster-1234abcdefg > key replicate \
      --filter attr.label=example-key \
      --source-cluster-id cluster-1234abcdefg \
      --destination-cluster-id cluster-2345bcdefgh
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x0000000000300006",
      "key-info": {
        "key-owners": [
          {
            "username": "crypto-user-1",
            "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": "example-key",
        "id": "0x",
        "check-value": "0x5e118e",
        "class": "secret-key",
        "encrypt": false,
        "decrypt": false,
        "token": true,
        "always-sensitive": true,
        "derive": false,
        "destroyable": true,
        "extractable": true,
        "local": true,
        "modifiable": true,
        "never-extractable": true,
        "private": true,
        "sensitive": true,
        "sign": true,
        "trusted": false,
        "unwrap": false,
        "verify": true,
        "wrap": false,
        "wrap-with-trusted": false,
        "key-length-bytes": 16
      }
    },
    "message": "Successfully replicated key"
  }
}
```

## Pendapat
<a name="key-replicate-arguments"></a>

***<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 cocok pada cluster sumber.  
Untuk daftar atribut kunci CloudHSM CLI yang didukung, lihat [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)  
Wajib: Ya

***<SOURCE\$1CLUSTER\$1ID>***  
ID cluster sumber.  
Wajib: Ya

***<DESTINATION\$1CLUSTER\$1ID>***  
ID cluster tujuan.  
Wajib: Ya

## Topik terkait
<a name="chsm-key-replicate-seealso"></a>
+ [Menghubungkan ke beberapa cluster dengan CloudHSM CLI](cloudhsm_cli-configs-multi-cluster.md)

# Mengatur atribut kunci dengan CloudHSM CLI
<a name="cloudhsm_cli-key-set-attribute"></a>

Gunakan **key set-attribute** perintah di CloudHSM CLI untuk mengatur atribut kunci di cluster Anda. AWS CloudHSM Hanya CU yang membuat kunci dan akibatnya memilikinya yang dapat mengubah atribut kunci.

Untuk daftar atribut kunci yang dapat digunakan di CloudHSM CLI, lihat. [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)

## Jenis pengguna
<a name="chsm-cli-key-set-attribute-user-type"></a>

Jenis pengguna berikut dapat menjalankan perintah ini.
+ Pengguna Crypto (CUs) dapat menjalankan perintah ini.
+ Admin dapat mengatur atribut tepercaya.

## Persyaratan
<a name="chsm-cli-key-set-attribute-requirements"></a>

Untuk menjalankan perintah ini, Anda harus masuk sebagai CU. Untuk mengatur atribut tepercaya, Anda harus masuk sebagai pengguna admin.

## Sintaksis
<a name="chsm-cli-key-set-attribute-syntax"></a>

```
aws-cloudhsm > help key set-attribute
Set an attribute for a key in the HSM cluster

Usage: cloudhsm-cli key set-attribute [OPTIONS] --filter [<FILTER>...] --name <KEY_ATTRIBUTE> --value <KEY_ATTRIBUTE_VALUE>

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 matching key to modify
      --name <KEY_ATTRIBUTE>            Name of attribute to be set
      --value <KEY_ATTRIBUTE_VALUE>...  Attribute value to be set
      --approval <APPROVAL>            Filepath of signed quorum token file to approve operation
  -h, --help                            Print help
```

## Contoh: Mengatur atribut kunci
<a name="chsm-cli-key-set-attribute-examples"></a>

Contoh berikut menunjukkan bagaimana menggunakan **key set-attribute** perintah untuk mengatur label.

**Example**  

1. Gunakan kunci dengan label`my_key`, seperti yang ditunjukkan di sini:

   ```
   aws-cloudhsm > key set-attribute --filter attr.label=my_key --name encrypt --value false
   {
     "error_code": 0,
     "data": {
       "message": "Attribute set successfully"
     }
   }
   ```

1. Gunakan **key list** perintah untuk mengonfirmasi bahwa `encrypt` atribut telah berubah:

   ```
   aws-cloudhsm > key list --filter attr.label=my_key --verbose
   {
     "error_code": 0,
     "data": {
       "matched_keys": [
         {
           "key-reference": "0x00000000006400ec",
           "key-info": {
             "key-owners": [
               {
                 "username": "bob",
                 "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": "my_key",
             "id": "",
             "check-value": "0x6bd9f7",
             "class": "secret-key",
             "encrypt": false,
             "decrypt": true,
             "token": true,
             "always-sensitive": true,
             "derive": true,
             "destroyable": true,
             "extractable": true,
             "local": true,
             "modifiable": true,
             "never-extractable": false,
             "private": true,
             "sensitive": true,
             "sign": true,
             "trusted": true,
             "unwrap": true,
             "verify": true,
             "wrap": true,
             "wrap-with-trusted": false,
             "key-length-bytes": 32
           }
         }
       ],
       "total_key_count": 1,
       "returned_key_count": 1
     }
   }
   ```

## Pendapat
<a name="chsm-cli-key-set-attribute-arguments"></a>

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

***<KEY\$1ATTRIBUTE>***  
Menentukan nama atribut kunci.  
Wajib: Ya

***<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 cocok untuk dihapus.  
Untuk daftar atribut kunci CloudHSM CLI yang didukung, lihat [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)  
Wajib: Tidak

***<KEY\$1ATTRIBUTE\$1VALUE>***  
Menentukan nilai atribut kunci.  
Wajib: Ya

***<KEY\$1REFERENCE>***  
Representasi heksadesimal atau desimal dari kunci. (seperti pegangan kunci).  
Wajib: Tidak

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

## Topik terkait
<a name="chsm-cli-key-set-attribute-see-also"></a>
+ [Tombol filter menggunakan CloudHSM CLI](manage-keys-cloudhsm-cli-filtering.md)
+ [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)

# Bagikan kunci menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-share"></a>

Gunakan **key share** perintah di CloudHSM CLI untuk berbagi kunci CUs dengan yang lain di cluster Anda. AWS CloudHSM 

Hanya CU yang membuat kunci dan akibatnya memilikinya yang dapat berbagi kunci. Pengguna dengan siapa kunci dibagikan dapat menggunakan kunci dalam operasi kriptografi, tetapi mereka tidak dapat menghapus, mengekspor, berbagi, atau membatalkan pembagian kunci. Selain itu, pengguna ini tidak dapat mengubah [atribut kunci](cloudhsm_cli-key-attributes.md).

## Jenis pengguna
<a name="chsm-cli-key-share-user-type"></a>

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

## Persyaratan
<a name="chsm-cli-key-share-requirements"></a>

Untuk menjalankan perintah ini, Anda harus masuk sebagai CU.

## Sintaksis
<a name="chsm-cli-key-share-syntax"></a>

```
aws-cloudhsm > help key share
Share a key in the HSM cluster with another user

Usage: key share --filter [<FILTER>...] --username <USERNAME> --role <ROLE>

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 matching key for sharing

      --username <USERNAME>
          A username with which the key will be shared

      --role <ROLE>
          Role the user has in the cluster

          Possible values:
          - crypto-user: A CryptoUser has the ability to manage and use keys
          - admin:       An Admin has the ability to manage user accounts

      --approval <APPROVAL>
          Filepath of signed quorum token file to approve operation

  -h, --help
          Print help (see a summary with '-h')
```

## Contoh: Bagikan kunci dengan CU lain
<a name="chsm-cli-key-share-examples"></a>

Contoh berikut menunjukkan cara menggunakan **key share** perintah untuk berbagi kunci dengan CU`alice`.

**Example**  

1. Jalankan **key share** perintah untuk berbagi kunci dengan`alice`.

   ```
   aws-cloudhsm > key share --filter attr.label="rsa_key_to_share" attr.class=private-key --username alice --role crypto-user
   {
     "error_code": 0,
     "data": {
       "message": "Key shared successfully"
     }
   }
   ```

1. Jalankan perintah **key list**.

   ```
   aws-cloudhsm > key list --filter attr.label="rsa_key_to_share" attr.class=private-key --verbose
   {
     "error_code": 0,
     "data": {
       "matched_keys": [
         {
           "key-reference": "0x00000000001c0686",
           "key-info": {
             "key-owners": [
               {
                 "username": "cu3",
                 "key-coverage": "full"
               }
             ],
             "shared-users": [
               {
                 "username": "cu2",
                 "key-coverage": "full"
               },
               {
                 "username": "cu1",
                 "key-coverage": "full"
               },
               {
                 "username": "cu4",
                 "key-coverage": "full"
               },
               {
                 "username": "cu5",
                 "key-coverage": "full"
               },
               {
                 "username": "cu6",
                 "key-coverage": "full"
               },
               {
                 "username": "cu7",
                 "key-coverage": "full"
               },
               {
                 "username": "alice",
                 "key-coverage": "full"
               }
             ],
             "key-quorum-values": {
               "manage-key-quorum-value": 0,
               "use-key-quorum-value": 0
             },
             "cluster-coverage": "full"
           },
           "attributes": {
             "key-type": "rsa",
             "label": "rsa_key_to_share",
             "id": "",
             "check-value": "0xae8ff0",
             "class": "private-key",
             "encrypt": false,
             "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": true,
             "verify": false,
             "wrap": false,
             "wrap-with-trusted": false,
             "key-length-bytes": 1219,
             "public-exponent": "0x010001",
             "modulus": "0xa8855cba933cec0c21a4df0450ec31675c024f3e65b2b215a53d2bda6dcd191f75729150b59b4d86df58254c8f518f7d000cc04d8e958e7502c7c33098e28da4d94378ef34fb57d1cc7e042d9119bd79be0df728421a980a397095157da24cf3cc2b6dab12225d33fdca11f0c6ed1a5127f12488cda9a556814b39b06cd8373ff5d371db2212887853621b8510faa7b0779fbdec447e1f1d19f343acb02b22526487a31f6c704f8f003cb4f7013136f90cc17c2c20e414dc1fc7bcfb392d59c767900319679fc3307388633485657ce2e1a3deab0f985b0747ef4ed339de78147d1985d14fdd8634219321e49e3f5715e79c298f18658504bab04086bfbdcd3b",
             "modulus-size-bits": 2048
           }
         }
       ],
       "total_key_count": 1,
       "returned_key_count": 1
     }
   }
   ```

1. Dalam daftar di atas, verifikasi `alice` ada dalam daftar `shared-users`

## Pendapat
<a name="chsm-cli-key-share-arguments"></a>

***<CLUSTER\$1ID>***  
ID cluster untuk menjalankan operasi ini pada.  
Wajib: 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 cocok untuk dihapus.  
Untuk daftar atribut kunci yang didukung, lihat[Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md).  
Wajib: Ya

***<USERNAME>***  
Menentukan nama yang mudah diingat untuk pengguna. Panjang maksimum adalah 31 karakter. Satu-satunya karakter khusus yang diizinkan adalah garis bawah (\$1). Nama pengguna tidak peka huruf besar/kecil dalam perintah ini, nama pengguna selalu ditampilkan dalam huruf kecil.  
Wajib: Ya

***<ROLE>***  
Menentukan peran yang ditetapkan untuk pengguna ini. Parameter ini diperlukan. Untuk mendapatkan peran pengguna, gunakan perintah daftar pengguna. Untuk informasi detail tentang jenis pengguna pada HSM, lihat [Jenis pengguna HSM untuk CloudHSM CLI](understanding-users.md).  
Wajib: Ya

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

## Topik terkait
<a name="chsm-cli-key-share-see-also"></a>
+ [Tombol filter menggunakan CloudHSM CLI](manage-keys-cloudhsm-cli-filtering.md)
+ [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)

# Hapus berbagi kunci menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-unshare"></a>

Gunakan **key unshare** perintah di CloudHSM CLI untuk membatalkan berbagi kunci dengan yang lain di cluster Anda. CUs AWS CloudHSM 

Hanya CU yang membuat kunci dan akibatnya memilikinya yang dapat membatalkan pembagian kunci. Pengguna dengan siapa kunci dibagikan dapat menggunakan kunci dalam operasi kriptografi, tetapi mereka tidak dapat menghapus, mengekspor, berbagi, atau membatalkan berbagi kunci. Selain itu, pengguna ini tidak dapat mengubah [atribut kunci](cloudhsm_cli-key-attributes.md).

## Jenis pengguna
<a name="chsm-cli-key-unshare-user-type"></a>

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

## Persyaratan
<a name="chsm-cli-key-unshare-requirements"></a>

Untuk menjalankan perintah ini, Anda harus masuk sebagai CU.

## Sintaksis
<a name="chsm-cli-key-unshare-syntax"></a>

```
aws-cloudhsm > help key unshare
Unshare a key in the HSM cluster with another user

Usage: key unshare --filter [<FILTER>...] --username <USERNAME> --role <ROLE>

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 matching key for unsharing

      --username <USERNAME>
          A username with which the key will be unshared

      --role <ROLE>
          Role the user has in the cluster

          Possible values:
          - crypto-user: A CryptoUser has the ability to manage and use keys
          - admin:       An Admin has the ability to manage user accounts

      --approval <APPROVAL>
          Filepath of signed quorum token file to approve operation

  -h, --help
          Print help (see a summary with '-h')
```

## Contoh: Unshare kunci dengan CU lain
<a name="chsm-cli-key-share-examples"></a>

Contoh berikut menunjukkan cara menggunakan **key unshare** perintah untuk membatalkan berbagi kunci dengan CU`alice`.

**Example**  

1. Jalankan **key list** perintah dan filter dengan kunci spesifik yang ingin Anda unshare. `alice`

   ```
   aws-cloudhsm > key list --filter attr.label="rsa_key_to_share" attr.class=private-key --verbose
   {
     "error_code": 0,
     "data": {
       "matched_keys": [
         {
           "key-reference": "0x00000000001c0686",
           "key-info": {
             "key-owners": [
               {
                 "username": "cu3",
                 "key-coverage": "full"
               }
             ],
             "shared-users": [
               {
                 "username": "cu2",
                 "key-coverage": "full"
               },
               {
                 "username": "cu1",
                 "key-coverage": "full"
               },
               {
                 "username": "cu4",
                 "key-coverage": "full"
               },
               {
                 "username": "cu5",
                 "key-coverage": "full"
               },
               {
                 "username": "cu6",
                 "key-coverage": "full"
               },
               {
                 "username": "cu7",
                 "key-coverage": "full"
               },
               {
                 "username": "alice",
                 "key-coverage": "full"
               }
             ],
             "key-quorum-values": {
               "manage-key-quorum-value": 0,
               "use-key-quorum-value": 0
             },
             "cluster-coverage": "full"
           },
           "attributes": {
             "key-type": "rsa",
             "label": "rsa_key_to_share",
             "id": "",
             "check-value": "0xae8ff0",
             "class": "private-key",
             "encrypt": false,
             "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": true,
             "verify": false,
             "wrap": false,
             "wrap-with-trusted": false,
             "key-length-bytes": 1219,
             "public-exponent": "0x010001",
             "modulus": "0xa8855cba933cec0c21a4df0450ec31675c024f3e65b2b215a53d2bda6dcd191f75729150b59b4d86df58254c8f518f7d000cc04d8e958e7502c7c33098e28da4d94378ef34fb57d1cc7e042d9119bd79be0df728421a980a397095157da24cf3cc2b6dab12225d33fdca11f0c6ed1a5127f12488cda9a556814b39b06cd8373ff5d371db2212887853621b8510faa7b0779fbdec447e1f1d19f343acb02b22526487a31f6c704f8f003cb4f7013136f90cc17c2c20e414dc1fc7bcfb392d59c767900319679fc3307388633485657ce2e1a3deab0f985b0747ef4ed339de78147d1985d14fdd8634219321e49e3f5715e79c298f18658504bab04086bfbdcd3b",
             "modulus-size-bits": 2048
           }
         }
       ],
       "total_key_count": 1,
       "returned_key_count": 1
     }
   }
   ```

1. Konfirmasikan `alice` ada di `shared-users` output, dan jalankan **key unshare** perintah berikut untuk membatalkan pembagian kunci dengan`alice`.

   ```
   aws-cloudhsm > key unshare --filter attr.label="rsa_key_to_share" attr.class=private-key --username alice --role crypto-user
   {
     "error_code": 0,
     "data": {
       "message": "Key unshared successfully"
     }
   }
   ```

1. Jalankan `key list` perintah lagi untuk mengonfirmasi bahwa kunci telah tidak dibagikan`alice`.

   ```
   aws-cloudhsm > key list --filter attr.label="rsa_key_to_share" attr.class=private-key --verbose
   {
     "error_code": 0,
     "data": {
       "matched_keys": [
         {
           "key-reference": "0x00000000001c0686",
           "key-info": {
             "key-owners": [
               {
                 "username": "cu3",
                 "key-coverage": "full"
               }
             ],
             "shared-users": [
               {
                 "username": "cu2",
                 "key-coverage": "full"
               },
               {
                 "username": "cu1",
                 "key-coverage": "full"
               },
               {
                 "username": "cu4",
                 "key-coverage": "full"
               },
               {
                 "username": "cu5",
                 "key-coverage": "full"
               },
               {
                 "username": "cu6",
                 "key-coverage": "full"
               },
               {
                 "username": "cu7",
                 "key-coverage": "full"
               },
             ],
             "key-quorum-values": {
               "manage-key-quorum-value": 0,
               "use-key-quorum-value": 0
             },
             "cluster-coverage": "full"
           },
           "attributes": {
             "key-type": "rsa",
             "label": "rsa_key_to_share",
             "id": "",
             "check-value": "0xae8ff0",
             "class": "private-key",
             "encrypt": false,
             "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": true,
             "verify": false,
             "wrap": false,
             "wrap-with-trusted": false,
             "key-length-bytes": 1219,
             "public-exponent": "0x010001",
             "modulus": "0xa8855cba933cec0c21a4df0450ec31675c024f3e65b2b215a53d2bda6dcd191f75729150b59b4d86df58254c8f518f7d000cc04d8e958e7502c7c33098e28da4d94378ef34fb57d1cc7e042d9119bd79be0df728421a980a397095157da24cf3cc2b6dab12225d33fdca11f0c6ed1a5127f12488cda9a556814b39b06cd8373ff5d371db2212887853621b8510faa7b0779fbdec447e1f1d19f343acb02b22526487a31f6c704f8f003cb4f7013136f90cc17c2c20e414dc1fc7bcfb392d59c767900319679fc3307388633485657ce2e1a3deab0f985b0747ef4ed339de78147d1985d14fdd8634219321e49e3f5715e79c298f18658504bab04086bfbdcd3b",
             "modulus-size-bits": 2048
           }
         }
       ],
       "total_key_count": 1,
       "returned_key_count": 1
     }
   }
   ```

## Pendapat
<a name="chsm-cli-key-unshare-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 cocok untuk dihapus.  
Untuk daftar atribut kunci yang didukung, lihat[Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md).  
Wajib: Ya

***<USERNAME>***  
Menentukan nama yang mudah diingat untuk pengguna. Panjang maksimum adalah 31 karakter. Satu-satunya karakter khusus yang diizinkan adalah garis bawah (\$1). Nama pengguna tidak peka huruf besar/kecil dalam perintah ini, nama pengguna selalu ditampilkan dalam huruf kecil.  
Wajib: Ya

***<ROLE>***  
Menentukan peran yang ditetapkan untuk pengguna ini. Parameter ini diperlukan. Untuk mendapatkan peran pengguna, gunakan perintah daftar pengguna. Untuk informasi detail tentang jenis pengguna pada HSM, lihat [Jenis pengguna HSM untuk CloudHSM CLI](understanding-users.md).  
Wajib: Ya

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

## Topik terkait
<a name="chsm-cli-key-unshare-see-also"></a>
+ [Tombol filter menggunakan CloudHSM CLI](manage-keys-cloudhsm-cli-filtering.md)
+ [Atribut kunci untuk CloudHSM CLI](cloudhsm_cli-key-attributes.md)

# Perintah buka kunci di CloudHSM CLI
<a name="cloudhsm_cli-key-unwrap"></a>

Perintah **key unwrap** induk di CloudHSM CLI mengimpor kunci pribadi simetris atau asimetris terenkripsi (dibungkus) dari file dan ke HSM. Perintah ini dirancang untuk mengimpor kunci terenkripsi yang dibungkus oleh [Perintah bungkus kunci di CloudHSM CLI](cloudhsm_cli-key-wrap.md) perintah, tetapi juga dapat digunakan untuk membuka kunci yang dibungkus dengan alat lain. Namun, dalam situasi tersebut, sebaiknya gunakan PKCS \$111 atau pustaka perangkat lunak JCE untuk membuka kunci.
+ [aes-gcm](cloudhsm_cli-key-unwrap-aes-gcm.md)
+ [aes-no-pad](cloudhsm_cli-key-unwrap-aes-no-pad.md)
+ [aes-pkcs5-pad](cloudhsm_cli-key-unwrap-aes-pkcs5-pad.md)
+ [aes-zero-pad](cloudhsm_cli-key-unwrap-aes-zero-pad.md)
+ [cloudhsm-aes-gcm](cloudhsm_cli-key-unwrap-cloudhsm-aes-gcm.md)
+ [rsa-aes](cloudhsm_cli-key-unwrap-rsa-aes.md)
+ [rsa-oaep](cloudhsm_cli-key-unwrap-rsa-oaep.md)
+ [rsa-PKC](cloudhsm_cli-key-unwrap-rsa-pkcs.md)

# Buka kunci dengan AES-GCM menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-unwrap-aes-gcm"></a>

Gunakan **key unwrap aes-gcm** perintah di CloudHSM CLI untuk membuka kunci payload ke dalam cluster menggunakan kunci pembungkus AES dan mekanisme unwrapping. `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 ke`false`.

Untuk menggunakan **key unwrap aes-gcm** 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-gcm-userType"></a>

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

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

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

```
aws-cloudhsm > help key unwrap aes-gcm
Usage: key unwrap aes-gcm [OPTIONS] --filter [<FILTER>...] --tag-length-bits <TAG_LENGTH_BITS> --key-type-class <KEY_TYPE_CLASS> --label <LABEL> --iv <IV> <--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
      --iv <IV>
          Initial value used to wrap the key, in hex
      --approval <APPROVAL>
          Filepath of signed quorum token file to approve operation
  -h, --help
          Print help
```

## Contoh
<a name="cloudhsm_cli-key-unwrap-aes-gcm-examples"></a>

Contoh-contoh ini menunjukkan cara menggunakan **key unwrap aes-gcm** 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-gcm --key-type-class aes --label aes-unwrapped --filter attr.label=aes-example --tag-length-bits 64  --aad 0x10 --iv 0xf90613bb8e337ec0339aad21 --data xvslgrtg8kHzrvekny97tLSIeokpPwV8
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000001808e4",
      "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-gcm --key-type-class aes --label aes-unwrapped --filter attr.label=aes-example --tag-length-bits 64  --aad 0x10 --iv 0xf90613bb8e337ec0339aad21 --data-path payload-key.pem
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000001808e4",
      "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-gcm-arguments"></a>

***<CLUSTER\$1ID>***  
ID cluster untuk menjalankan operasi ini pada.  
Wajib: 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.  
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 Aes GCM Additional Authenticated Data (AAD), dalam hex.  
Wajib: Tidak

***<TAG\$1LENGTH\$1BITS>***  
Panjang tag Aes GCM dalam bit.  
Wajib: Ya

***<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

***<IV>***  
Nilai awal yang digunakan untuk membungkus kunci, dalam hex.  
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-gcm-seealso"></a>
+ [Perintah bungkus kunci di CloudHSM CLI](cloudhsm_cli-key-wrap.md)
+ [Perintah buka kunci di CloudHSM CLI](cloudhsm_cli-key-unwrap.md)

# 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)

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

Gunakan **key unwrap aes-pkcs5-pad** perintah di CloudHSM CLI untuk membuka kunci payload menggunakan kunci pembungkus AES dan mekanisme unwrapping. `AES-PKCS5-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-pkcs5-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-pkcs5-pad-userType"></a>

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

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

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

```
aws-cloudhsm > help key unwrap aes-pkcs5-pad
Usage: key unwrap aes-pkcs5-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-pkcs5-pad-examples"></a>

Contoh-contoh ini menunjukkan cara menggunakan **key unwrap aes-pkcs5-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-pkcs5-pad --key-type-class aes --label aes-unwrapped --filter attr.label=aes-example --data MbuYNresfOKyGNnxKWen88nSfX+uUE/0qmGofSisicY=
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000001c08e3",
      "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-pkcs5-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": "0x00000000001c08e3",
      "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-pkcs5-pad-arguments"></a>

***<CLUSTER\$1ID>***  
ID cluster untuk menjalankan operasi ini pada.  
Wajib: 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 yang 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\$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-pkcs5-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)

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

Gunakan **key unwrap aes-zero-pad** perintah di CloudHSM CLI untuk membuka kunci payload ke AWS CloudHSM dalam cluster menggunakan kunci pembungkus AES dan mekanisme unwrapping. `AES-ZERO-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-zero-pad-userType"></a>

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

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

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

```
aws-cloudhsm > help key unwrap aes-zero-pad
Usage: key unwrap aes-zero-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-zero-pad-examples"></a>

Contoh-contoh ini menunjukkan cara menggunakan **key unwrap aes-zero-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-zero-pad --key-type-class aes --label aes-unwrapped --filter attr.label=aes-example --data L1wVlL/YeBNVAw6Mpk3owFJZXBzDLONt
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000001c08e7",
      "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-zero-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": "0x00000000001c08e7",
      "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-zero-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-zero-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)

# Buka kunci dengan CLOUDHSM-AES-GCM menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-unwrap-cloudhsm-aes-gcm"></a>

Gunakan **key unwrap cloudhsm-aes-gcm** perintah di CloudHSM CLI untuk membuka kunci payload ke AWS CloudHSM dalam cluster menggunakan kunci pembungkus AES dan mekanisme 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 ke`false`.

Untuk menggunakan **key unwrap cloudhsm-aes-gcm** 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-cloudhsm-aes-gcm-userType"></a>

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

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

## Sintaksis
<a name="cloudhsm_cli-key-unwrap-cloudhsm-aes-gcm-syntax"></a>

```
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
<a name="cloudhsm_cli-key-unwrap-cloudhsm-aes-gcm-examples"></a>

Contoh-contoh ini menunjukkan cara menggunakan **key unwrap cloudhsm-aes-gcm** 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 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
      }
    }
  }
}
```

**Example 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
<a name="cloudhsm_cli-key-unwrap-cloudhsm-aes-gcm-arguments"></a>

***<CLUSTER\$1ID>***  
ID cluster untuk menjalankan operasi ini pada.  
Wajib: 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.  
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 Aes GCM Additional Authenticated Data (AAD), dalam hex.  
Wajib: Tidak

***<TAG\$1LENGTH\$1BITS>***  
Panjang tag Aes GCM dalam bit.  
Wajib: Ya

***<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-cloudhsm-aes-gcm-seealso"></a>
+ [Perintah bungkus kunci di CloudHSM CLI](cloudhsm_cli-key-wrap.md)
+ [Perintah buka kunci di CloudHSM CLI](cloudhsm_cli-key-unwrap.md)

# Buka kunci dengan RSA-AES menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-unwrap-rsa-aes"></a>

Gunakan **key unwrap rsa-aes** perintah di CloudHSM CLI untuk 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 ke`false`.

Untuk menggunakan**key 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` 

**catatan**  
Perintah ini hanya tersedia dengan CloudHSM CLI 5.11\$1.

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

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

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

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

```
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
      --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
      --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
      --approval <APPROVAL>
          Filepath of signed quorum token file to approve operation
  -h, --help
          Print help
```

## Contoh
<a name="cloudhsm_cli-key-unwrap-rsa-aes-examples"></a>

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

**Example 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": [],
        "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 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": [],
        "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-rsa-aes-arguments"></a>

***<CLUSTER\$1ID>***  
ID cluster untuk menjalankan operasi ini pada.  
Wajib: 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.  
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\$1TYPE\$1CLASS>***  
Jenis kunci dan kelas kunci yang dibungkus [nilai yang mungkin:`aes`,`des3`,`ec-private`,`generic-secret`,`rsa-private`].  
Wajib: Ya

***<HASH\$1FUNCTION>***  
Menentukan fungsi hash.  
Nilai valid:  
+ sha1
+ sha224
+ sha256
+ sha384
+ sha512
Wajib: Ya

***<MGF>***  
Menentukan fungsi pembuatan topeng.   
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

***<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-rsa-aes-seealso"></a>
+ [Perintah bungkus kunci di CloudHSM CLI](cloudhsm_cli-key-wrap.md)
+ [Perintah buka kunci di CloudHSM CLI](cloudhsm_cli-key-unwrap.md)

# Buka kunci dengan RSA-OAEP menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-unwrap-rsa-oaep"></a>

Gunakan **key unwrap rsa-oaep** perintah di CloudHSM CLI untuk membuka kunci payload menggunakan kunci pribadi RSA dan mekanisme unwrapping. `RSA-OAEP`

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 rsa-oaep** perintah, 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
<a name="cloudhsm_cli-key-unwrap-rsa-oaep-userType"></a>

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

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

## Sintaksis
<a name="cloudhsm_cli-key-unwrap-rsa-oaep-syntax"></a>

```
aws-cloudhsm > help key unwrap rsa-oaep
Usage: key unwrap rsa-oaep [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
      --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
      --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
      --approval <APPROVAL>
          Filepath of signed quorum token file to approve operation
  -h, --help
          Print help
```

## Contoh
<a name="cloudhsm_cli-key-unwrap-rsa-oaep-examples"></a>

Contoh-contoh ini menunjukkan bagaimana menggunakan **key unwrap rsa-oaep** perintah menggunakan kunci pribadi RSA dengan nilai `unwrap` atribut yang disetel ke`true`.

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

```
aws-cloudhsm > key unwrap rsa-oaep --key-type-class aes --label aes-unwrapped --filter attr.label=rsa-private-example-key --hash-function sha256 --mgf mgf1-sha256 --data OjJe4msobPLz9TuSAdULEu17T5rMDWtSlLyBSkLbaZnYzzpdrhsbGLbwZJCtB/jGkDNdB4qyTAOQwEpggGf6v+Yx6JcesNeKKNU8XZal/YBoHC8noTGUSDI2qr+u2tDc84NPv6d+F2KOONXsSxMhmxzzNG/gzTVIJhOuy/B1yHjGP4mOXoDZf5+7f5M1CjxBmz4Vva/wrWHGCSG0yOaWblEvOiHAIt3UBdyKmU+/My4xjfJv7WGGu3DFUUIZ06TihRtKQhUYU1M9u6NPf9riJJfHsk6QCuSZ9yWThDT9as6i7e3htnyDhIhGWaoK8JU855cN/YNKAUqkNpC4FPL3iw==
{
  "data": {
    "key": {
      "key-reference": "0x00000000001808e9",
      "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 rsa-oaep --key-type-class aes --label aes-unwrapped --filter attr.label=rsa-private-example-key --hash-function sha256 --mgf mgf1-sha256 --data-path payload-key.pem
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000001808e9",
      "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-rsa-oaep-arguments"></a>

***<CLUSTER\$1ID>***  
ID cluster untuk menjalankan operasi ini pada.  
Wajib: 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.  
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\$1TYPE\$1CLASS>***  
Jenis kunci dan kelas kunci yang dibungkus [nilai yang mungkin:`aes`,`des3`,`ec-private`,`generic-secret`,`rsa-private`].  
Wajib: Ya

***<HASH\$1FUNCTION>***  
Menentukan fungsi hash.  
Nilai valid:  
+ sha1
+ sha224
+ sha256
+ sha384
+ sha512
Wajib: Ya

***<MGF>***  
Menentukan fungsi pembuatan topeng.   
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

***<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-rsa-oaep-seealso"></a>
+ [Perintah bungkus kunci di CloudHSM CLI](cloudhsm_cli-key-wrap.md)
+ [Perintah buka kunci di CloudHSM CLI](cloudhsm_cli-key-unwrap.md)

# Buka kunci dengan RSA-PKCS menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-unwrap-rsa-pkcs"></a>

Gunakan **key unwrap rsa-pkcs** perintah di CloudHSM CLI untuk membuka kunci payload menggunakan kunci pribadi RSA dan mekanisme unwrapping. `RSA-PKCS`

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 **unwrap rsa-pkcs** perintah kunci, 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
<a name="cloudhsm_cli-key-unwrap-rsa-pkcs-userType"></a>

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

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

## Sintaksis
<a name="cloudhsm_cli-key-unwrap-rsa-pkcs-syntax"></a>

```
aws-cloudhsm > help key unwrap rsa-pkcs
Usage: key unwrap rsa-pkcs [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-rsa-pkcs-examples"></a>

Contoh-contoh ini menunjukkan cara menggunakan **key unwrap rsa-oaep** 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 rsa-pkcs --key-type-class aes --label aes-unwrapped --filter attr.label=rsa-private-key-example --data am0Nc7+YE8FWs+5HvU7sIBcXVb24QA0l65nbNAD+1bK+e18BpSfnaI3P+r8Dp+pLu1ofoUy/vtzRjZoCiDofcz4EqCFnGl4GdcJ1/3W/5WRvMatCa2d7cx02swaeZcjKsermPXYRO1lGlfq6NskwMeeTkV8R7Rx9artFrs1y0DdIgIKVaiFHwnBIUMnlQrR2zRmMkfwU1jxMYmOYyD031F5VbnjSrhfMwkww2la7uf/c3XdFJ2+0Bo94c6og/yfPcpOOobJlITCoXhtMRepSdO4OggYq/6nUDuHCtJ86pPGnNahyr7+sAaSI3a5ECQLUjwaIARUCyoRh7EFK3qPXcg==
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000001c08ef",
      "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 rsa-pkcs --key-type-class aes --label aes-unwrapped --filter attr.label=rsa-private-key-example --data-path payload-key.pem
{
  "error_code": 0,
  "data": {
    "key": {
      "key-reference": "0x00000000001c08ef",
      "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-rsa-pkcs-arguments"></a>

***<CLUSTER\$1ID>***  
ID cluster untuk menjalankan operasi ini pada.  
Wajib: 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 yang 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\$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-rsa-pkcs-seealso"></a>
+ [Perintah bungkus kunci di CloudHSM CLI](cloudhsm_cli-key-wrap.md)
+ [Perintah buka kunci di CloudHSM CLI](cloudhsm_cli-key-unwrap.md)

# Perintah bungkus kunci di CloudHSM CLI
<a name="cloudhsm_cli-key-wrap"></a>

**key wrap**Perintah di CloudHSM CLI mengekspor salinan terenkripsi kunci pribadi simetris atau asimetris dari modul keamanan perangkat keras (HSM) ke file. Ketika Anda menjalankan**key wrap**, Anda menentukan dua hal: Kunci untuk mengekspor dan file output. Kunci untuk mengekspor adalah kunci pada HSM yang akan mengenkripsi (membungkus) kunci yang ingin Anda ekspor.

**key wrap**Perintah tidak menghapus kunci dari HSM atau mencegah Anda menggunakannya dalam operasi kriptografi. Anda dapat mengekspor kunci yang sama beberapa kali. Untuk mengimpor kunci terenkripsi kembali ke HSM, gunakan. [Perintah buka kunci di CloudHSM CLI](cloudhsm_cli-key-unwrap.md) Hanya pemilik kunci, yaitu pengguna kripto (CU) yang membuat kunci, yang dapat membungkus kunci tersebut. Pengguna dengan siapa kunci dibagikan hanya dapat menggunakan kunci dalam operasi kriptografi.

**key wrap**Perintah terdiri dari subperintah berikut:
+ [aes-gcm](cloudhsm_cli-key-wrap-aes-gcm.md)
+ [aes-no-pad](cloudhsm_cli-key-wrap-aes-no-pad.md)
+ [aes-pkcs5-pad](cloudhsm_cli-key-wrap-aes-pkcs5-pad.md)
+ [aes-zero-pad](cloudhsm_cli-key-wrap-aes-zero-pad.md)
+ [cloudhsm-aes-gcm](cloudhsm_cli-key-wrap-cloudhsm-aes-gcm.md)
+ [rsa-aes](cloudhsm_cli-key-wrap-rsa-aes.md)
+ [rsa-oaep](cloudhsm_cli-key-wrap-rsa-oaep.md)
+ [rsa-PKC](cloudhsm_cli-key-wrap-rsa-pkcs.md)

# Bungkus kunci dengan AES-GCM menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-wrap-aes-gcm"></a>

Gunakan **key wrap aes-gcm** perintah di CloudHSM CLI untuk membungkus kunci payload menggunakan kunci AES pada modul keamanan perangkat keras (HSM) dan mekanisme pembungkus. `AES-GCM` `extractable`Atribut kunci payload harus disetel ke`true`.

Hanya pemilik kunci, yaitu pengguna kripto (CU) yang membuat kunci, yang dapat membungkus kunci tersebut. Pengguna yang berbagi kunci dapat menggunakan kunci dalam operasi kriptografi.

Untuk menggunakan **key wrap aes-gcm** perintah, Anda harus terlebih dahulu memiliki kunci AES di AWS CloudHSM cluster Anda. Anda dapat menghasilkan kunci AES untuk membungkus dengan [Hasilkan kunci AES simetris dengan CloudHSM CLI](cloudhsm_cli-key-generate-symmetric-aes.md) perintah dan `wrap` atribut yang disetel ke. `true`

## Jenis pengguna
<a name="cloudhsm_cli-key-wrap-aes-gcm-userType"></a>

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

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

## Sintaksis
<a name="cloudhsm_cli-key-wrap-aes-gcm-syntax"></a>

```
aws-cloudhsm > help key wrap aes-gcm
Usage: key wrap aes-gcm [OPTIONS] --payload-filter [<PAYLOAD_FILTER>...] --wrapping-filter [<WRAPPING_FILTER>...] --tag-length-bits <TAG_LENGTH_BITS>

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
      --payload-filter [<PAYLOAD_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 payload key
      --wrapping-filter [<WRAPPING_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 wrapping key
      --path <PATH>
          Path to the binary file where the wrapped key data will be saved
      --wrapping-approval <WRAPPING_APPROVALR>
          File path of signed quorum token file to approve operation for wrapping key
      --payload-approval <PAYLOAD_APPROVALR>
          File path of signed quorum token file to approve operation for payload key
      --aad <AAD>
          Aes GCM Additional Authenticated Data (AAD) value, in hex
      --tag-length-bits <TAG_LENGTH_BITS>
          Aes GCM tag length in bits
  -h, --help
          Print help
```

## Contoh
<a name="cloudhsm_cli-key-wrap-aes-gcm-examples"></a>

Contoh ini menunjukkan cara menggunakan **key wrap aes-gcm** perintah menggunakan kunci AES.

**Example**  

```
aws-cloudhsm > key wrap aes-gcm --payload-filter attr.label=payload-key --wrapping-filter attr.label=aes-example --tag-length-bits 64  --aad 0x10
{
  "error_code": 0,
  "data": {
    "payload_key_reference": "0x00000000001c08f1",
    "wrapping_key_reference": "0x00000000001c08ea",
    "iv": "0xf90613bb8e337ec0339aad21",
    "wrapped_key_data": "xvslgrtg8kHzrvekny97tLSIeokpPwV8"
  }
}
```

## Pendapat
<a name="cloudhsm_cli-key-wrap-aes-gcm-arguments"></a>

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

***<PAYLOAD\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci payload.  
Wajib: Ya

***<PATH>***  
Path ke file biner tempat data kunci yang dibungkus akan disimpan.  
Wajib: Tidak

***<WRAPPING\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci pembungkus.   
Wajib: Ya

***<AAD>***  
Nilai AES GCM Additional Authenticated Data (AAD), dalam hex.   
Wajib: Tidak

***<TAG\$1LENGTH\$1BITS>***  
Panjang tag AES GCM dalam bit.  
Wajib: Ya

***<WRAPPING\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi untuk kunci pembungkus. Hanya diperlukan jika nilai kuorum layanan manajemen kunci kunci wrapping lebih besar dari 1.

***<PAYLOAD\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi kunci payload. Hanya diperlukan jika nilai kuorum layanan manajemen kunci payload key lebih besar dari 1.

## Topik terkait
<a name="cloudhsm_cli-key-wrap-aes-gcm-seealso"></a>
+ [Perintah bungkus kunci di CloudHSM CLI](cloudhsm_cli-key-wrap.md)
+ [Perintah buka kunci di CloudHSM CLI](cloudhsm_cli-key-unwrap.md)

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

Gunakan **key wrap aes-no-pad** perintah di CloudHSM CLI untuk membungkus kunci payload menggunakan kunci AES pada modul keamanan perangkat keras (HSM) dan mekanisme pembungkus. `AES-NO-PAD` `extractable`Atribut kunci payload harus disetel ke`true`.

Hanya pemilik kunci, yaitu pengguna kripto (CU) yang membuat kunci, yang dapat membungkus kunci tersebut. Pengguna yang berbagi kunci dapat menggunakan kunci dalam operasi kriptografi.

Untuk menggunakan **key wrap aes-no-pad** perintah, Anda harus terlebih dahulu memiliki kunci AES di AWS CloudHSM cluster Anda. Anda dapat menghasilkan kunci AES untuk pembungkus menggunakan [Hasilkan kunci AES simetris dengan CloudHSM CLI](cloudhsm_cli-key-generate-symmetric-aes.md) perintah dan `wrap` atribut yang disetel ke. `true`

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

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

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

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

```
aws-cloudhsm > help key wrap aes-no-pad
Usage: key wrap aes-no-pad [OPTIONS] --payload-filter [<PAYLOAD_FILTER>...] --wrapping-filter [<WRAPPING_FILTER>...]

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
      --payload-filter [<PAYLOAD_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 payload key
      --wrapping-filter [<WRAPPING_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 wrapping key
      --path <PATH>
          Path to the binary file where the wrapped key data will be saved
      --wrapping-approval <WRAPPING_APPROVALR>
          File path of signed quorum token file to approve operation for wrapping key
      --payload-approval <PAYLOAD_APPROVALR>
          File path of signed quorum token file to approve operation for payload key
  -h, --help
          Print help
```

## Contoh
<a name="cloudhsm_cli-key-wrap-aes-no-pad-examples"></a>

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

**Example**  

```
aws-cloudhsm > key wrap aes-no-pad --payload-filter attr.label=payload-key --wrapping-filter attr.label=aes-example
{
  "error_code": 0,
  "data": {
    "payload_key_reference": "0x00000000001c08f1",
    "wrapping_key_reference": "0x00000000001c08ea",
    "wrapped_key_data": "eXK3PMAOnKM9y3YX6brbhtMoC060EOH9"
  }
}
```

## Pendapat
<a name="cloudhsm_cli-key-wrap-aes-no-pad-arguments"></a>

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

***<PAYLOAD\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci payload.  
Wajib: Ya

***<PATH>***  
Path ke file biner tempat data kunci yang dibungkus akan disimpan.  
Wajib: Tidak

***<WRAPPING\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci pembungkus.   
Wajib: Ya

***<WRAPPING\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi untuk kunci pembungkus. Hanya diperlukan jika nilai kuorum layanan manajemen kunci kunci wrapping lebih besar dari 1.

***<PAYLOAD\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi kunci payload. Hanya diperlukan jika nilai kuorum layanan manajemen kunci payload key lebih besar dari 1.

## Topik terkait
<a name="cloudhsm_cli-key-wrap-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)

# Bungkus kunci dengan AES- PKCS5 -PAD menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-wrap-aes-pkcs5-pad"></a>

Gunakan **key wrap aes-pkcs5-pad** perintah di CloudHSM CLI untuk membungkus kunci payload menggunakan kunci AES pada modul keamanan perangkat keras (HSM) dan mekanisme pembungkus. `AES-PKCS5-PAD` `extractable`Atribut kunci payload harus disetel ke`true`.

Hanya pemilik kunci, yaitu pengguna kripto (CU) yang membuat kunci, yang dapat membungkus kunci tersebut. Pengguna yang berbagi kunci dapat menggunakan kunci dalam operasi kriptografi.

Untuk menggunakan **key wrap aes-pkcs5-pad** perintah, Anda harus terlebih dahulu memiliki kunci AES di AWS CloudHSM cluster Anda. Anda dapat menghasilkan kunci AES untuk pembungkus menggunakan [Hasilkan kunci AES simetris dengan CloudHSM CLI](cloudhsm_cli-key-generate-symmetric-aes.md) perintah dan `wrap` atribut yang disetel ke. `true`

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

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

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

## Sintaksis
<a name="cloudhsm_cli-key-wrap-aes-pkcs5-pad-syntax"></a>

```
aws-cloudhsm > help key wrap aes-pkcs5-pad
Usage: key wrap aes-pkcs5-pad [OPTIONS] --payload-filter [<PAYLOAD_FILTER>...] --wrapping-filter [<WRAPPING_FILTER>...]

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
      --payload-filter [<PAYLOAD_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 payload key
      --wrapping-filter [<WRAPPING_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 wrapping key
      --path <PATH>
          Path to the binary file where the wrapped key data will be saved
      --wrapping-approval <WRAPPING_APPROVALR>
          File path of signed quorum token file to approve operation for wrapping key
      --payload-approval <PAYLOAD_APPROVALR>
          File path of signed quorum token file to approve operation for payload key
  -h, --help
          Print help
```

## Contoh
<a name="cloudhsm_cli-key-wrap-aes-pkcs5-pad-examples"></a>

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

**Example**  

```
aws-cloudhsm > key wrap aes-pkcs5-pad --payload-filter attr.label=payload-key --wrapping-filter attr.label=aes-example
{
  "error_code": 0,
  "data": {
    "payload_key_reference": "0x00000000001c08f1",
    "wrapping_key_reference": "0x00000000001c08ea",
    "wrapped_key_data": "MbuYNresfOKyGNnxKWen88nSfX+uUE/0qmGofSisicY="
  }
}
```

## Pendapat
<a name="cloudhsm_cli-key-wrap-aes-pkcs5-pad-arguments"></a>

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

***<PAYLOAD\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci payload.  
Wajib: Ya

***<PATH>***  
Path ke file biner tempat data kunci yang dibungkus akan disimpan.  
Wajib: Tidak

***<WRAPPING\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci pembungkus.   
Wajib: Ya

***<WRAPPING\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi untuk kunci pembungkus. Hanya diperlukan jika nilai kuorum layanan manajemen kunci kunci wrapping lebih besar dari 1.

***<PAYLOAD\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi kunci payload. Hanya diperlukan jika nilai kuorum layanan manajemen kunci payload key lebih besar dari 1.

## Topik terkait
<a name="cloudhsm_cli-key-wrap-aes-pkcs5-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)

# Bungkus kunci dengan AES-ZERO-PAD menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-wrap-aes-zero-pad"></a>

Gunakan **key wrap aes-zero-pad** perintah di CloudHSM CLI untuk membungkus kunci payload menggunakan kunci AES pada modul keamanan perangkat keras HSM) dan mekanisme pembungkus. `AES-ZERO-PAD` `extractable`Atribut kunci payload harus disetel ke`true`.

Hanya pemilik kunci, yaitu pengguna kripto (CU) yang membuat kunci, yang dapat membungkus kunci tersebut. Pengguna yang berbagi kunci dapat menggunakan kunci dalam operasi kriptografi.

Untuk menggunakan **key wrap aes-zero-pad** perintah, Anda harus terlebih dahulu memiliki kunci AES di AWS CloudHSM cluster Anda. Anda dapat menghasilkan kunci AES untuk membungkus menggunakan [Hasilkan kunci AES simetris dengan CloudHSM CLI](cloudhsm_cli-key-generate-symmetric-aes.md) perintah dengan `wrap` atribut yang disetel ke. `true`

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

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

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

## Sintaksis
<a name="cloudhsm_cli-key-wrap-aes-zero-pad-syntax"></a>

```
aws-cloudhsm > help key wrap aes-zero-pad
Usage: key wrap aes-zero-pad [OPTIONS] --payload-filter [<PAYLOAD_FILTER>...] --wrapping-filter [<WRAPPING_FILTER>...]

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
      --payload-filter [<PAYLOAD_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 payload key
      --wrapping-filter [<WRAPPING_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 wrapping key
      --path <PATH>
          Path to the binary file where the wrapped key data will be saved
      --wrapping-approval <WRAPPING_APPROVALR>
          File path of signed quorum token file to approve operation for wrapping key
      --payload-approval <PAYLOAD_APPROVALR>
          File path of signed quorum token file to approve operation for payload key
  -h, --help
          Print help
```

## Contoh
<a name="cloudhsm_cli-key-wrap-aes-zero-pad-examples"></a>

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

**Example**  

```
aws-cloudhsm > key wrap aes-zero-pad --payload-filter attr.label=payload-key --wrapping-filter attr.label=aes-example
{
  "error_code": 0,
  "data": {
    "payload_key_reference": "0x00000000001c08f1",
    "wrapping_key_reference": "0x00000000001c08ea",
    "wrapped_key_data": "L1wVlL/YeBNVAw6Mpk3owFJZXBzDLONt"
  }
}
```

## Pendapat
<a name="cloudhsm_cli-key-wrap-aes-zero-pad-arguments"></a>

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

***<PAYLOAD\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci payload.  
Wajib: Ya

***<PATH>***  
Path ke file biner tempat data kunci yang dibungkus akan disimpan.  
Wajib: Tidak

***<WRAPPING\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci pembungkus.   
Wajib: Ya

***<WRAPPING\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi untuk kunci pembungkus. Hanya diperlukan jika nilai kuorum layanan manajemen kunci kunci wrapping lebih besar dari 1.

***<PAYLOAD\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi kunci payload. Hanya diperlukan jika nilai kuorum layanan manajemen kunci payload key lebih besar dari 1.

## Topik terkait
<a name="cloudhsm_cli-key-wrap-aes-zero-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)

# Bungkus kunci dengan CLOUDHSM-AES-GCM menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-wrap-cloudhsm-aes-gcm"></a>

Gunakan **key wrap cloudhsm-aes-gcm** perintah di CloudHSM CLI untuk membungkus kunci payload menggunakan kunci AES pada modul keamanan perangkat keras (HSM) dan mekanisme pembungkus. `CLOUDHSM-AES-GCM` `extractable`Atribut kunci payload harus disetel ke`true`.

Hanya pemilik kunci, yaitu pengguna kripto (CU) yang membuat kunci, yang dapat membungkus kunci tersebut. Pengguna yang berbagi kunci dapat menggunakan kunci dalam operasi kriptografi.

Untuk menggunakan **key wrap cloudhsm-aes-gcm** perintah, Anda harus terlebih dahulu memiliki kunci AES di AWS CloudHSM cluster Anda. Anda dapat menghasilkan kunci AES untuk membungkus dengan [Hasilkan kunci AES simetris dengan CloudHSM CLI](cloudhsm_cli-key-generate-symmetric-aes.md) perintah dan `wrap` atribut yang disetel ke. `true`

## Jenis pengguna
<a name="cloudhsm_cli-key-wrap-cloudhsm-aes-gcm-userType"></a>

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

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

## Sintaksis
<a name="cloudhsm_cli-key-wrap-cloudhsm-aes-gcm-syntax"></a>

```
aws-cloudhsm > help key wrap cloudhsm-aes-gcm
Usage: key wrap cloudhsm-aes-gcm [OPTIONS] --payload-filter [<PAYLOAD_FILTER>...] --wrapping-filter [<WRAPPING_FILTER>...] --tag-length-bits <TAG_LENGTH_BITS>

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
      --payload-filter [<PAYLOAD_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 payload key
      --wrapping-filter [<WRAPPING_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 wrapping key
      --path <PATH>
          Path to the binary file where the wrapped key data will be saved
      --wrapping-approval <WRAPPING_APPROVALR>
          File path of signed quorum token file to approve operation for wrapping key
      --payload-approval <PAYLOAD_APPROVALR>
          File path of signed quorum token file to approve operation for payload key
      --aad <AAD>
          Aes GCM Additional Authenticated Data (AAD) value, in hex
      --tag-length-bits <TAG_LENGTH_BITS>
          Aes GCM tag length in bits
  -h, --help
          Print help
```

## Contoh
<a name="cloudhsm_cli-key-wrap-cloudhsm-aes-gcm-examples"></a>

Contoh ini menunjukkan cara menggunakan **key wrap cloudhsm-aes-gcm** perintah menggunakan kunci AES.

**Example**  

```
aws-cloudhsm > key wrap cloudhsm-aes-gcm --payload-filter attr.label=payload-key --wrapping-filter attr.label=aes-example --tag-length-bits 64 --aad 0x10
{
  "error_code": 0,
  "data": {
    "payload_key_reference": "0x00000000001c08f1",
    "wrapping_key_reference": "0x00000000001c08ea",
    "wrapped_key_data": "6Rn8nkjEriDYlnP3P8nPkYQ8hplOEJ899zsrF+aTB0i/fIlZ"
  }
}
```

## Pendapat
<a name="cloudhsm_cli-key-wrap-cloudhsm-aes-gcm-arguments"></a>

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

***<PAYLOAD\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci payload.  
Wajib: Ya

***<PATH>***  
Path ke file biner tempat data kunci yang dibungkus akan disimpan.  
Wajib: Tidak

***<WRAPPING\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci pembungkus.   
Wajib: Ya

***<AAD>***  
Nilai AES GCM Additional Authenticated Data (AAD), dalam hex.   
Wajib: Tidak

***<TAG\$1LENGTH\$1BITS>***  
Panjang tag AES GCM dalam bit.  
Wajib: Ya

***<WRAPPING\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi untuk kunci pembungkus. Hanya diperlukan jika nilai kuorum layanan manajemen kunci kunci wrapping lebih besar dari 1.

***<PAYLOAD\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi kunci payload. Hanya diperlukan jika nilai kuorum layanan manajemen kunci payload key lebih besar dari 1.

## Topik terkait
<a name="cloudhsm_cli-key-wrap-cloudhsm-aes-gcm-seealso"></a>
+ [Perintah bungkus kunci di CloudHSM CLI](cloudhsm_cli-key-wrap.md)
+ [Perintah buka kunci di CloudHSM CLI](cloudhsm_cli-key-unwrap.md)

# Bungkus kunci dengan RSA-AES menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-wrap-rsa-aes"></a>

Gunakan **key wrap rsa-aes** perintah di CloudHSM CLI untuk membungkus kunci payload menggunakan kunci publik RSA pada modul keamanan perangkat keras (HSM) dan mekanisme pembungkus RSA-AES. `extractable`Atribut kunci payload harus disetel ke`true`.

Hanya pemilik kunci, yaitu pengguna kripto (CU) yang membuat kunci, yang dapat membungkus kunci tersebut. Pengguna yang berbagi kunci dapat menggunakan kunci dalam operasi kriptografi.

Untuk menggunakan **key wrap rsa-aes** perintah, Anda harus terlebih dahulu memiliki kunci RSA di AWS CloudHSM cluster Anda. Anda dapat menghasilkan key pair RSA menggunakan [generate-asymmetric-pairKategori di CloudHSM CLI](cloudhsm_cli-key-generate-asymmetric-pair.md) perintah dan `wrap` atribut yang disetel ke`true`.

## Jenis pengguna
<a name="cloudhsm_cli-key-wrap-rsa-aes-userType"></a>

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

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

## Sintaksis
<a name="cloudhsm_cli-key-wrap-rsa-aes-syntax"></a>

```
aws-cloudhsm > help key wrap rsa-aes
Usage: key wrap rsa-aes [OPTIONS] --payload-filter [<PAYLOAD_FILTER>...] --wrapping-filter [<WRAPPING_FILTER>...] --hash-function <HASH_FUNCTION> --mgf <MGF>

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
      --payload-filter [<PAYLOAD_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 payload key
      --wrapping-filter [<WRAPPING_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 wrapping key
      --path <PATH>
          Path to the binary file where the wrapped key data will be saved
      --wrapping-approval <WRAPPING_APPROVALR>
          File path of signed quorum token file to approve operation for wrapping key
      --payload-approval <PAYLOAD_APPROVALR>
          File path of signed quorum token file to approve operation for payload 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]
  -h, --help
          Print help
```

## Contoh
<a name="cloudhsm_cli-key-wrap-rsa-aes-examples"></a>

Contoh ini menunjukkan cara menggunakan **key wrap rsa-ae** perintah menggunakan kunci publik RSA dengan nilai `wrap` atribut yang disetel ke`true`.

**Example**  

```
aws-cloudhsm > key wrap rsa-aes --payload-filter attr.label=payload-key --wrapping-filter attr.label=rsa-public-key-example --hash-function sha256 --mgf mgf1-sha256
{
  "error_code": 0,
  "data": {
    "payload-key-reference": "0x00000000001c08f1",
    "wrapping-key-reference": "0x00000000007008da",
    "wrapped-key-data": "HrSE1DEyLjIeyGdPa9R+ebiqB5TIJGyamPker31ZebPwRA+NcerbAJO8DJ1lXPygZcI21vIFSZJuWMEiWpe1R9D/5WSYgxLVKex30xCFqebtEzxbKuv4DOmU4meSofqREYvtb3EoIKwjyxCMRQFgoyUCuP4y0f0eSv0k6rSJh4NuCsHptXZbtgNeRcR4botN7LlzkEIUcq4fVHaatCwd0J1QGKHKyRhkol+RL5WGXKe4nAboAkC5GO7veI5yHL1SaKlssSJtTL/CFpbSLsAFuYbv/NUCWwMY5mwyVTCSlw+HlgKK+5TH1MzBaSi8fpfyepLT8sHy2Q/VRl6ifb49p6m0KQFbRVvz/OWUd6l4d97BdgtaEz6ueg=="
  }
}
```

## Pendapat
<a name="cloudhsm_cli-key-wrap-rsa-aes-arguments"></a>

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

***<PAYLOAD\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci payload.  
Wajib: Ya

***<PATH>***  
Path ke file biner tempat data kunci yang dibungkus akan disimpan.  
Wajib: Tidak

***<WRAPPING\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci pembungkus.   
Wajib: Ya

***<MGF>***  
Menentukan fungsi pembuatan topeng.  
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

***<WRAPPING\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi untuk kunci pembungkus. Hanya diperlukan jika nilai kuorum layanan manajemen kunci kunci wrapping lebih besar dari 1.

***<PAYLOAD\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi kunci payload. Hanya diperlukan jika nilai kuorum layanan manajemen kunci payload key lebih besar dari 1.

## Topik terkait
<a name="cloudhsm_cli-key-wrap-rsa-aes-seealso"></a>
+ [Perintah bungkus kunci di CloudHSM CLI](cloudhsm_cli-key-wrap.md)
+ [Perintah buka kunci di CloudHSM CLI](cloudhsm_cli-key-unwrap.md)

# Bungkus kunci dengan RSA-OAEP menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-wrap-rsa-oaep"></a>

Gunakan **key wrap rsa-oaep** perintah di CloudHSM CLI untuk membungkus kunci payload menggunakan kunci publik RSA pada modul keamanan perangkat keras (HSM) dan mekanisme pembungkus. `RSA-OAEP` `extractable`Atribut kunci payload harus disetel ke`true`.

Hanya pemilik kunci, yaitu pengguna kripto (CU) yang membuat kunci, yang dapat membungkus kunci tersebut. Pengguna yang berbagi kunci dapat menggunakan kunci dalam operasi kriptografi.

Untuk menggunakan **key wrap rsa-oaep** perintah, Anda harus terlebih dahulu memiliki kunci RSA di AWS CloudHSM cluster Anda. Anda dapat menghasilkan key pair RSA menggunakan [generate-asymmetric-pairKategori di CloudHSM CLI](cloudhsm_cli-key-generate-asymmetric-pair.md) perintah dan `wrap` atribut yang disetel ke`true`.

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

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

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

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

```
aws-cloudhsm > help key wrap rsa-oaep
Usage: key wrap rsa-oaep [OPTIONS] --payload-filter [<PAYLOAD_FILTER>...] --wrapping-filter [<WRAPPING_FILTER>...] --hash-function <HASH_FUNCTION> --mgf <MGF>

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
      --payload-filter [<PAYLOAD_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 payload key
      --wrapping-filter [<WRAPPING_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 wrapping key
      --path <PATH>
          Path to the binary file where the wrapped key data will be saved
      --wrapping-approval <WRAPPING_APPROVALR>
          File path of signed quorum token file to approve operation for wrapping key
      --payload-approval <PAYLOAD_APPROVALR>
          File path of signed quorum token file to approve operation for payload 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]
  -h, --help
          Print help
```

## Contoh
<a name="cloudhsm_cli-key-unwrap-rsa-aes-examples"></a>

Contoh ini menunjukkan cara menggunakan **key wrap rsa-oaep** perintah menggunakan kunci publik RSA dengan nilai `wrap` atribut yang disetel ke`true`.

**Example**  

```
aws-cloudhsm > key wrap rsa-oaep --payload-filter attr.label=payload-key --wrapping-filter attr.label=rsa-public-key-example --hash-function sha256 --mgf mgf1-sha256
{
  "error_code": 0,
  "data": {
    "payload-key-reference": "0x00000000001c08f1",
    "wrapping-key-reference": "0x00000000007008da",
    "wrapped-key-data": "OjJe4msobPLz9TuSAdULEu17T5rMDWtSlLyBSkLbaZnYzzpdrhsbGLbwZJCtB/jGkDNdB4qyTAOQwEpggGf6v+Yx6JcesNeKKNU8XZal/YBoHC8noTGUSDI2qr+u2tDc84NPv6d+F2KOONXsSxMhmxzzNG/gzTVIJhOuy/B1yHjGP4mOXoDZf5+7f5M1CjxBmz4Vva/wrWHGCSG0yOaWblEvOiHAIt3UBdyKmU+/My4xjfJv7WGGu3DFUUIZ06TihRtKQhUYU1M9u6NPf9riJJfHsk6QCuSZ9yWThDT9as6i7e3htnyDhIhGWaoK8JU855cN/YNKAUqkNpC4FPL3iw=="
  }
}
```

## Pendapat
<a name="cloudhsm_cli-key-unwrap-rsa-aes-arguments"></a>

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

***<PAYLOAD\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci payload.  
Wajib: Ya

***<PATH>***  
Path ke file biner tempat data kunci yang dibungkus akan disimpan.  
Wajib: Tidak

***<WRAPPING\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci pembungkus.   
Wajib: Ya

***<MGF>***  
Menentukan fungsi pembuatan topeng.  
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

***<WRAPPING\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi untuk kunci pembungkus. Hanya diperlukan jika nilai kuorum layanan manajemen kunci kunci wrapping lebih besar dari 1.

***<PAYLOAD\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi kunci payload. Hanya diperlukan jika nilai kuorum layanan manajemen kunci payload key lebih besar dari 1.

## Topik terkait
<a name="cloudhsm_cli-key-unwrap-rsa-aes-seealso"></a>
+ [Perintah bungkus kunci di CloudHSM CLI](cloudhsm_cli-key-wrap.md)
+ [Perintah buka kunci di CloudHSM CLI](cloudhsm_cli-key-unwrap.md)

# Bungkus kunci dengan RSA-PKCS menggunakan CloudHSM CLI
<a name="cloudhsm_cli-key-wrap-rsa-pkcs"></a>

Gunakan **key wrap rsa-pkcs** perintah di CloudHSM CLI untuk membungkus kunci payload menggunakan kunci publik RSA pada modul keamanan perangkat keras (HSM) dan mekanisme pembungkus. `RSA-PKCS` `extractable`Atribut kunci payload harus disetel ke`true`.

Hanya pemilik kunci, yaitu pengguna kripto (CU) yang membuat kunci, yang dapat membungkus kunci tersebut. Pengguna yang berbagi kunci dapat menggunakan kunci dalam operasi kriptografi.

Untuk menggunakan **key wrap rsa-pkcs** perintah, Anda harus terlebih dahulu memiliki kunci RSA di AWS CloudHSM cluster Anda. Anda dapat menghasilkan key pair RSA menggunakan [generate-asymmetric-pairKategori di CloudHSM CLI](cloudhsm_cli-key-generate-asymmetric-pair.md) perintah dan `wrap` atribut yang disetel ke`true`.

## Jenis pengguna
<a name="cloudhsm_cli-key-wrap-rsa-pkcs-userType"></a>

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

## Persyaratan
<a name="cloudhsm_cli-key-wrap-rsa-pkcs-requirements"></a>
+ Untuk menjalankan perintah ini, Anda harus masuk sebagai CU.

## Sintaksis
<a name="cloudhsm_cli-key-wrap-rsa-pkcs-syntax"></a>

```
aws-cloudhsm > help key wrap rsa-pkcs
Usage: key wrap rsa-pkcs [OPTIONS] --payload-filter [<PAYLOAD_FILTER>...] --wrapping-filter [<WRAPPING_FILTER>...]

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
      --payload-filter [<PAYLOAD_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 payload key
      --wrapping-filter [<WRAPPING_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 wrapping key
      --path <PATH>
          Path to the binary file where the wrapped key data will be saved
      --wrapping-approval <WRAPPING_APPROVALR>
          File path of signed quorum token file to approve operation for wrapping key
      --payload-approval <PAYLOAD_APPROVALR>
          File path of signed quorum token file to approve operation for payload key
  -h, --help
          Print help
```

## Contoh
<a name="cloudhsm_cli-key-wrap-rsa-pkcs-examples"></a>

Contoh ini menunjukkan cara menggunakan **key wrap rsa-pkcs** perintah menggunakan kunci publik RSA.

**Example**  

```
aws-cloudhsm > key wrap rsa-pkcs --payload-filter attr.label=payload-key --wrapping-filter attr.label=rsa-public-key-example
{
  "error_code": 0,
  "data": {
    "payload_key_reference": "0x00000000001c08f1",
    "wrapping_key_reference": "0x00000000007008da",
    "wrapped_key_data": "am0Nc7+YE8FWs+5HvU7sIBcXVb24QA0l65nbNAD+1bK+e18BpSfnaI3P+r8Dp+pLu1ofoUy/vtzRjZoCiDofcz4EqCFnGl4GdcJ1/3W/5WRvMatCa2d7cx02swaeZcjKsermPXYRO1lGlfq6NskwMeeTkV8R7Rx9artFrs1y0DdIgIKVaiFHwnBIUMnlQrR2zRmMkfwU1jxMYmOYyD031F5VbnjSrhfMwkww2la7uf/c3XdFJ2+0Bo94c6og/yfPcpOOobJlITCoXhtMRepSdO4OggYq/6nUDuHCtJ86pPGnNahyr7+sAaSI3a5ECQLUjwaIARUCyoRh7EFK3qPXcg=="
  }
```

## Pendapat
<a name="cloudhsm_cli-key-wrap-rsa-pkcs-arguments"></a>

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

***<PAYLOAD\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci payload.  
Wajib: Ya

***<PATH>***  
Path ke file biner tempat data kunci yang dibungkus akan disimpan.  
Wajib: Tidak

***<WRAPPING\$1FILTER>***  
Referensi kunci (misalnya,`key-reference=0xabc`) atau spasi dipisahkan daftar atribut kunci dalam bentuk `attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE` untuk memilih kunci pembungkus.   
Wajib: Ya

***<WRAPPING\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi untuk kunci pembungkus. Hanya diperlukan jika nilai kuorum layanan manajemen kunci kunci wrapping lebih besar dari 1.

***<PAYLOAD\$1APPROVALR>***  
Menentukan jalur file ke file token kuorum yang ditandatangani untuk menyetujui operasi kunci payload. Hanya diperlukan jika nilai kuorum layanan manajemen kunci payload key lebih besar dari 1.

## Topik terkait
<a name="cloudhsm_cli-key-wrap-rsa-pkcs-seealso"></a>
+ [Perintah bungkus kunci di CloudHSM CLI](cloudhsm_cli-key-wrap.md)
+ [Perintah buka kunci di CloudHSM CLI](cloudhsm_cli-key-unwrap.md)