Decrypt
    • PDF

    Decrypt

    • PDF

    Article Summary

    Overview

    Decrypts ciphertext with the specified master key. Since decryption is performed with the specified key version, the KMS prefix as well as the ciphertext should be exactly specified. Only a key type for encryption and decryption can be specified.

    POST https://kms.apigw.ntruss.com/keys/v1/{keyTag}/decrypt
    POST https://kms.apigw.ntruss.com/keys/v2/{keyTag}/decrypt
    

    Request

    Request parameters

    ParameterTypeRequiredDescription
    keyTagStringYTag of the master key for decryption.

    Request body

    {
      "ciphertext" : string or string list,
      "context" : string
    }
    
    ParameterTypeRequiredDescription
    ciphertextString or List of StringsYCiphertext to decrypt
    (It must be composed of a KMS prefix and Base64-encoded ciphertext.)
    contextStringNContext 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

    {
      "plaintext" : string
    }
    
    FieldTypeDescription
    plaintextStringPlaintext
    (It is Base64-encoded.)

    Roles

    Manager, Decryptor, Encryptor/Decryptor


    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.