Re-encrypt
- Print
- PDF
Re-encrypt
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
Overview
Re-encrypts ciphertext with the latest version of the specified master key. Only a key type for encryption and decryption can be specified.
POST https://kms.apigw.ntruss.com/keys/v1/{keyTag}/reencrypt
POST https://kms.apigw.ntruss.com/keys/v2/{keyTag}/reencrypt
Request
Request parameters
Parameter | Type | Required | Description |
---|---|---|---|
keyTag | String | Y | Tag of the master key for re-encryption. |
Request body
{
"ciphertext" : string or string list,
"context" : string
}
Parameter | Type | Required | Description |
---|---|---|---|
ciphertext | String or List of Strings | Y | Ciphertext to re-encrypt (It must be composed of a KMS prefix and a Base64-encoded ciphertext.) |
context | String | N | Context for key derivation (up to 50Byte) (It needs to be Base64-encoded.) Required only for Convergent Encryption |
Example of Request body
{
"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
}
Field | Type | Description |
---|---|---|
newCiphertext | String | Ciphertext (It consists of a KMS prefix and Base64-encoded ciphertext.) |
Roles
Manager, Encryptor, Encryptor/Decryptor
Was this article helpful?