Cookie の設定を選択する

当社は、当社のサイトおよびサービスを提供するために必要な必須 Cookie および類似のツールを使用しています。当社は、パフォーマンス Cookie を使用して匿名の統計情報を収集することで、お客様が当社のサイトをどのように利用しているかを把握し、改善に役立てています。必須 Cookie は無効化できませんが、[カスタマイズ] または [拒否] をクリックしてパフォーマンス Cookie を拒否することはできます。

お客様が同意した場合、AWS および承認された第三者は、Cookie を使用して便利なサイト機能を提供したり、お客様の選択を記憶したり、関連する広告を含む関連コンテンツを表示したりします。すべての必須ではない Cookie を受け入れるか拒否するには、[受け入れる] または [拒否] をクリックしてください。より詳細な選択を行うには、[カスタマイズ] をクリックしてください。

CloudHSM CLI で対称汎用シークレットキーを生成する

フォーカスモード
CloudHSM CLI で対称汎用シークレットキーを生成する - AWS CloudHSM

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

CloudHSM CLI の key generate-asymmetric-pair コマンドを使用して、 AWS CloudHSM クラスターに対称汎用シークレットキーを生成します。

ユーザーのタイプ

このコマンドは、次のタイプのユーザーが実行できます。

  • Crypto User (CU)

要件

このコマンドを実行するには、CU としてログインする必要があります。

構文

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

次の例は、key generate-symmetric generic-secret コマンドを使って汎用シークレットキーを作成する方法を示しています。

例: 汎用シークレットキー作成
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 } } } }
例: オプションの属性を持つ汎用シークレットキー作成
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 } } } }
例: クォーラム値を使用して汎用シークレットキーを作成する

クォーラムコントロールを使用してキーを生成する場合、そのキーは、最大キークォーラム値と等しい最小ユーザー数に関連付ける必要があります。関連付けられたユーザーには、キー所有者とキーが共有されている Crypto ユーザーが含まれます。キーを共有する最小ユーザー数を決定するには、キー使用クォーラム値とキー管理クォーラム値の間の最大のクォーラム値を取得し、キー所有者を考慮して 1 を減算します。キー所有者はデフォルトでキーに関連付けられています。より多くのユーザーとキーを共有するには、 CloudHSM CLI を使用してキーを共有する コマンドを使用します。

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

引数

<CLUSTER_ID>

このオペレーションを実行するクラスターの ID。

必須: 複数のクラスターが設定されている場合。

<KEY_ATTRIBUTES>

KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE 形式で生成された AES キーに設定するキー属性のスペース区切りリストを指定します (例: sign=true)。

サポートされているキー属性のリストについては、「CloudHSM CLI のキー属性」を参照してください。

必須: いいえ

<KEY-LENGTH-BYTES>

キーの長さをバイト単位で指定します。

有効な値:

  • 1~800

必須: はい

<LABEL>

汎用シークレットキーのユーザー定義ラベルを指定します。label に許可される最大サイズは、クライアント SDK 5.11 以降では 127 文字です。クライアント SDK 5.10 以前では、制限は 126 文字です。

必須: はい

<SESSION>

現在のセッションにのみ存在するキーを作成します。セッション終了後、キーをリカバリすることはできません。

このパラメータは、別のキーを暗号化してからすばやく復号化するラッピングキーなど、キーが短時間だけ必要な場合に使用します。セッション終了後に復号する必要がある可能性のあるデータを暗号化するためにセッションキーを使用しないでください。

デフォルトでは、生成されるキーは永続 (トークン) キーです。<SESSION> で渡すことでこれが変わり、この引数で生成されたキーがセッション (エフェメラル) キーであることが保証されます。

必須: いいえ

<SHARE_CRYPTO_USERS>

汎用シークレットキーを共有する Crypto User ユーザー名のスペース区切りリスト

必須: いいえ

<MANAGE_KEY_QUORUM_VALUE>

キー管理オペレーションのクォーラム値。この値は、キーが関連付けられているユーザーの数以下である必要があります。これには、キーが共有されているユーザーとキー所有者が含まれます。最大値は 8 です。

必須: いいえ

<USE_KEY_QUORUM_VALUE>

キー使用オペレーションのクォーラム値。この値は、キーが関連付けられているユーザーの数以下である必要があります。これには、キーが共有されているユーザーとキー所有者が含まれます。最大値は 8 です。

必須: いいえ

関連トピック

このページの内容

プライバシーサイト規約Cookie の設定
© 2025, Amazon Web Services, Inc. or its affiliates.All rights reserved.