Re-encrypt
- Print
- PDF
Re-encrypt
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Summary
Reencrypt the ciphertext with the most recent 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}/reencrypt
POST https://kms.apigw.ntruss.com/keys/v2/{keyTag}/reencrypt
Request
Request parameters
Parameter name | Type | Description |
---|---|---|
keyTag | String (Required) | Tag value of the master key to use for the reencryption |
Request body
{
"ciphertext": string or string list,
"context" : string
}
Parameter name | Type | Description |
---|---|---|
ciphertext | String (Required) | - Data to reencrypt Must consist of a KMS prefix and a Base64-encoded ciphertext List can be up to 32 KB for all items combined |
context | String (Optional) | - Context data (up to 50 bytes) Need to be Base64-encoded Required only for AES-256 key type with convergent encryption |
Request body example
{
"ciphertext" : "ncpkms:v1:+xQZ2wyDin4vK7O4tue8QSnFB9Tu8MjiE1xTlhlGnrM=",
"context" : "dGhpcyBpcyBhIHRlc3QgY29udGV4dA=="
}
or
{
"ciphertext" : ["ncpkms:v1:+xQZ2wyDin4vK7O4tue8QSnFB9Tu8MjiE1xTlhlGnrM=", "ncpkms:v1:QoRYNd8LxURIEWpwMBRS0Sntv5Zx5cl78dWCTB1T2Ic=", "ncpkms:v1:wPgBmRczInROzKqvnStna9vMX7Q+tApFX8Xh4xGWPL4="],
"context" : "dGhpcyBpcyBhIHRlc3QgY29udGV4dA=="
}
Response
Response body
{
"newCiphertext" : string
}
or
{
"newCiphertextList" : [string, string, string]
}
Parameter name | Type | Description |
---|---|---|
newCiphertext | String | - Ciphertext data Consist of a KMS prefix and a Base64-encoded ciphertext Returned if requested as a string type |
newCiphertextList | String List | - Ciphertext data Consist of a KMS prefix and a Base64-encoded ciphertext Returned if requested as a string list type |
Was this article helpful?