選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

使用 CloudHSM CLI 使用 AES-PKCS5-PAD 取消包裝金鑰

焦點模式
使用 CloudHSM CLI 使用 AES-PKCS5-PAD 取消包裝金鑰 - AWS CloudHSM

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

在 CloudHSM CLI 中使用 key unwrap aes-pkcs5-pad命令,使用 AES 包裝金鑰和AES-PKCS5-PAD取消包裝機制來取消包裝承載金鑰。

未包裝金鑰的使用方式與 產生的金鑰相同 AWS CloudHSM。若要表示它們不是在本機產生,其local屬性會設為 false

若要使用 key unwrap aes-pkcs5-pad命令,您必須在 AWS CloudHSM 叢集中具有 AES 包裝金鑰,且其unwrap屬性必須設定為 true

使用者類型

下列類型的使用者可以執行此命令。

  • 加密使用者 (CU)

要求

  • 若要執行此命令,必須以 CU 的身分登入。

語法

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

範例

這些範例示範如何使用 key unwrap aes-pkcs5-pad命令,其unwrap屬性值設為 的 AES 金鑰true

範例:從 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 } } } }
範例:取消包裝透過資料路徑提供的承載金鑰
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 } } } }

引數

<CLUSTER_ID>

要執行此操作的叢集 ID。

必要:如果已設定多個叢集。

<篩選條件>

索引鍵參考 (例如 key-reference=0xabc) 或以空格分隔的索引鍵屬性清單,以attr.KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE選取要取消包裝的索引鍵。

必要:是

<DATA_PATH>

包含包裝金鑰資料的二進位檔案路徑。

必要:是 (除非透過 Base64 編碼資料提供)

<DATA>

Base64 編碼的包裝金鑰資料。

必要:是 (除非透過資料路徑提供)

<ATTRIBUTES>

以 的形式KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE為包裝金鑰以空格分隔的金鑰屬性清單。

必要:否

<KEY_TYPE_CLASS>

封裝金鑰的金鑰類型和類別 【可能值:aesdes3ec-privategeneric-secretrsa-private】。

必要:是

<LABEL>

未包裝金鑰的標籤。

必要:是

<SESSION>

建立僅存在於目前工作階段的工作階段金鑰。工作階段結束後,金鑰無法復原。

必要:否

<APPROVAL>

指要核准操作的已簽署規定人數權杖檔案的檔案路徑。只有在未包裝金鑰的金鑰管理服務規定人數值大於 1 時才需要。

相關主題

下一個主題:

aes-zero-pad

上一個主題:

aes-no-pad
隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。