Decrypt

Last Updated: Mar 13, 2017

Decrypts the ciphertext CiphertextBlob. The ciphertext can be generated by the following API.

GenerateDataKey

Encrypt

  • Request format
    1. CiphertextBlob=blob&EncryptionContext=json //Blob is a Base64 encoded string.
  • Request parameters

    • CiphertextBlob
      • Description: Ciphertext to be decrypted
      • Type: String
      • Required or not: Yes
        • EncryptionContext
      • Description: JSON string of a key/value pair. If this parameter is specified on the Encrypt or GenerateDataKey API, the same parameter is also required for decryption. For details, refer to EncryptionContext description.
      • Type: String
      • Required or not: No
  • Request example

  1. https://kms.cn-hangzhou.aliyuncs.com/?Action=Decrypt
  2. &CiphertextBlob=<your ciphertextblob>
  3. &EncryptionContext = <json string>
  4. &<Other public parameters>
  • Return format
  1. {
  2. "Plaintext": blob, // Blob is a Base64 encoded string.
  3. "KeyId": "string",
  4. "RequestId":"string"
  5. }
  • Return parameters
    • KeyId
      • Description: Globally unique identifier of CMK
      • Type: String
    • Plaintext
      • Description: Plaintext of the key after decryption
      • Type: String
    • RequestId
      • Description: Random access ID
      • Type: String
  • Return example:
  1. //json response
  2. {
  3. "KeyId": "KeyId"
  4. "Plaintext": "Plaintext"
  5. "RequestId": "207596a2-36d3-4840-b1bd-f87044699bd7"
  6. }
  7. //xml response
  8. <KMS>
  9. <KeyId>KeyId</KeyId>
  10. <Plaintext>Plaintext</Plaintext>
  11. <RequestId>4bd560a1-729e-45f1-a3d9-b2a33d61046b</RequestId>
  12. </KMS>
Thank you! We've received your feedback.