

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

# 使用 AWS CloudHSM KMU 產生 RSA 金鑰對
<a name="generate-rsa-key-pairs"></a>

若要產生 的 RSA 金鑰對 AWS CloudHSM，請在 AWS CloudHSM key\_mgmt\_util 中使用 [genRSAKeyPair](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
```