

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用 KMU 生成 RSA 密钥对 AWS CloudHSM
<a name="generate-rsa-key-pairs"></a>

要为生成 RSA 密钥对 AWS CloudHSM，请使用 ke AWS CloudHSM y\$1mgmt\$1ut [il 中的 gen Pai RSAKey r](key_mgmt_util-genRSAKeyPair.md) 命令。要查看所有可用的选项，请使用 **genRSAKeyPair -h** 命令。

以下示例生成 RSA 2048 位密钥对。

```
Command: genRSAKeyPair -m 2048 -e 65537 -l rsa2048
Cfm3GenerateKeyPair returned: 0x00 : HSM Return: SUCCESS

Cfm3GenerateKeyPair:    public key handle: 524294    private key handle: 524296

Cluster Error Status
Node id 0 and err state 0x00000000 : HSM Return: SUCCESS
Node id 1 and err state 0x00000000 : HSM Return: SUCCESS
Node id 2 and err state 0x00000000 : HSM Return: SUCCESS
```