鍵ペアを生成する
鍵ペアの生成コマンドは、以下のように始まります。
smctl keypair generate
or
smctl kp gen
サブコマンド
鍵ペアコマンドは、これらのサブコマンドを生成します。
サブコマンド | 説明 |
---|---|
profile | 鍵ペアプロファイルを使用して鍵を生成する |
ecdsa | ECDSA のアルゴリズムで鍵ペアを生成する。 |
eddsa | EdDSA のアルゴリズムで鍵ペアを生成する。 |
mldsa | Generate a keypair with PQC MLDSA algorithm. |
rsa | RSA のアルゴリズムで鍵ペアを生成する。 |
slhdsa | Generate a keypair with PQC SLHDSA algorithm. |
フラグ
鍵ペアコマンドは、これらのフラグを生成します。
ショートカット | フラグ | 説明 |
---|---|---|
--auto-renew string | Auto-renew this certificate. | |
--cert-alias string | Specify an alias for the default certificate you want to create. | |
--generate-cert | Generate a certificate (default false). | |
--groups string | 鍵ペアのグループID。 形式: --groups="<value>" | |
-hsm-partition-id string | Provide the HSM partition ID to specify which HSM you want the keypair to be stored on. | |
--restricted | [制限] (鍵ペアにマップされているユーザーとグループのみが使用可能) または [オープン] (アカウント内のすべてのユーザーが使用可能)。デフォルトは [制限]。 | |
--users string | 鍵ペアのユーザーID。 形式: --users="<value>" | |
--team-id string | Assign the keypair to a team by specifying the team ID. | |
--account-id string | ユーザーのアカウントID。 形式: --account-id="<value>" | |
-h | --help | 鍵ペアの生成に関するヘルプ。 |
例
Generate a keypair
Generate a keypair when keypair profiles are not enabled on the account.
Command:
smctl keypair generate <algorithm> <keypair alias>
Command sample:
smctl keypair generate rsa keypair-alias-kp1
Generate a keypair on a specific HSM
Generate a keypair on a specific HSM.
Command:
smctl kp gen <algorithm> <keypair alias> --key-storage HSM --hsm-partition-id=<HSM ID>
Command sample:
smctl kp gen rsa keypair1 --key-storage HSM --hsm-partition-id=386425F3GD207A379FAE38426
Generate key with keypair profile ID
Generate a keypair with the specified keypair profile ID. This command is used when keypair profiles are enabled on the account.
Command:
smctl keypair generate profile <keypair alias> <keypair profile id>
Command sample:
smctl keypair generate profile kp1 6109c7ab-c47f-4a3e-a6ea-57203016d725
Generate a key and certificate with different aliases
Generate a keypair and certificate with different aliases by referencing the an alias for the certificate, keypair, and providing the certificate profile. This command is used when certificate profiles are enabled on the account.
Command:
smctl keypair generate <algorithm> <key alias> --generate-cert --cert-alias <cert alias> --cert-profile-id <cert_profile_ID>
Command sample:
smctl keypair generate rsa RSA-KP-1 --generate-cert --cert-alias CERT-1 --cert-profile-id 022df79f-e684-4788-be16-b490cbfbc46c