Create user custom key
- Print
- PDF
Create user custom key
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Summary
Generate a random high-entropy key with the given bits (supported for symmetric keying schemes only). You can also get a key returned in plaintext, along with a key sealed with the current version of the specified master key. The request can only be made with the key type used for encryption and decryption.
POST https://kms.apigw.ntruss.com/keys/v1/{keyTag}/createCustomKey
POST https://kms.apigw.ntruss.com/keys/v2/{keyTag}/createCustomKey
Request
Request parameters
Parameter name | Type | Description |
---|---|---|
keyTag | String (Required) | Tag value of the master key to use for the generated key seal |
Request body
{
"requestPlainKey" : boolean,
"bits" : integer,
"context": string
}
Parameter name | Type | Description |
---|---|---|
requestPlainKey | Boolean (Optional) | Flag to select whether the generated key should be returned in plain text (false by default) |
bits | Integer (Optional) | Bits of the key to be generated 128, 256, 512 (256 by default) |
context | String (Optional) | Use when the master key has a convergent encryption applied Context data (up to 50 bytee) Base64 encoding required |
Response
Response body
{
"plaintext" : string,
"key_version": integer
"ciphertext" : string
}
Parameter name | Type | Description |
---|---|---|
plaintext | String | - Plain text form of the generated key requestPlainKey: return only if true Base64 encoded |
key_version | Integer | - Master key version information |
ciphertext | String | - Sealed form of the generated key Base64 encoded |
Was this article helpful?