키 생성-대칭 aes - AWS CloudHSM

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

키 생성-대칭 aes

key generate-symmetric aes 명령은 클러스터에 대칭 AES 키를 생성합니다. AWS CloudHSM

사용자 유형

다음 사용자 유형이 이 명령을 실행할 수 있습니다.

  • CU(Crypto User)

요구 사항

이 명령을 실행하려면 CU로 로그인해야 합니다.

구문

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 -h, --help Print help

예제

다음 예시에서는 key generate-symmetric aes 명령을 사용하여 AES 키를 생성하는 방법을 보여 줍니다.

예시: 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": [], "cluster-coverage": "session" }, "attributes": { "key-type": "aes", "label": "example-aes", "id": "", "check-value": "0x9b94bd", "class": "secret-key", "encrypt": false, "decrypt": false, "token": false, "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 } } } }
예시: 선택적 속성을 사용하여 AES 키 생성하기
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": [], "cluster-coverage": "session" }, "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 } } } }

인수

<CLUSTER_ID>

이 작업을 실행할 클러스터의 ID입니다.

필수: 여러 클러스터가 구성된 경우.

<KEY_ATTRIBUTES>

생성된 AES 키에 대해 설정할 키 속성의 공백으로 구분된 목록을 KEY_ATTRIBUTE_NAME=KEY_ATTRIBUTE_VALUE (예: token=true)의 형식으로 지정합니다.

지원되는 키 속성 목록은 CloudHSM CLI의 키 속성 섹션을 참조하십시오.

필수 여부: 아니요

<KEY-LENGTH-BYTES>

키 크기를 바이트 단위로 지정합니다.

유효한 값:

  • 16, 24 및 32

필수 여부: 예

<LABEL>

AES 키에 대해 사용자 정의 레이블을 지정합니다. 클라이언트 SDK 5.11 이상의 경우 허용되는 최대 label 크기는 127자입니다. 클라이언트 SDK 5.10 이전 버전은 126자로 제한됩니다.

필수 여부: 예

<SESSION>

현재 세션에만 존재하는 키를 생성합니다. 세션이 종료된 후에는 키를 복구할 수 없습니다.

다른 키를 암호화한 후 다시 재빨리 암호를 해독하는 래핑 키와 같이 키가 일시적으로 필요한 경우 이 파라미터를 사용합니다. 세션 종료 후에 암호를 해독해야 할 수 있는 데이터를 암호화하는 데 세션 키를 사용해서는 안 됩니다.

기본적으로 생성되는 키는 영구(토큰) 키입니다. <SESSION>을 전달하면 이를 변경하여 이 인수로 생성된 키가 세션(임시) 키인지 확인합니다.

필수 여부: 아니요

관련 주제