Decrypt
This API decrypts data using key specified by name.
URL
<http/https>://<host-name>:<Port>/protectappws/services/rest/decrypt
Input Parameters
Parameters | Description |
---|---|
username | User name. |
password | Password associated with the user. |
keyname | Name of the key to be used for decryption. |
ciphertext | Encrypted data represented in Hex. |
keyiv | Optional/blank. If blank, the key’s default IV is used, else, specify in IV in Hex characters. The number of Hex character must be specific to the transformation used. |
transformation | Transformation to be used. For example: AES/ ECIES/CBC/PKCS5Padding. For more information on supported ECIES transformations, refer to the CipherTrust Application Data Protection for Java User Guide. |
outputformat | (Optional), displays output in following formats: — HEX — STR (default) — —BASE64 |
certAlias | Optional, is a client certificate alias for making SSL connections. |
certPass | Optional, is the password for the provided certificate alias. |
Sample REST call for cxf
request
{
"Decrypt": {
"username": "cryptouser",
"password": "safenet123",
"keyname": "testKey",
"keyiv": "12345678123456781234567812345678",
"transformation": "AES/CBC/PKCS5Padding",
"ciphertext": "100010EBF1B02D8CFAC300502398BD7FD5DB1A",
"outputformat": "STR"
}
}
response
{
"DecryptResponse": {
"plainText": "hello world!"
}
}
Sample SOAP Parameters
Plaintext data.
<prot:Decrypt>
<username>cryptouser</username>
<password>qwerty1234</password>
<keyname>aes256vt</keyname>
<ciphertext>10009046C980ECAFC6A79765A7ABAE01C846C5</ciphertext>
<!--Optional:-->
<keyiv></keyiv>
<transformation>AES/CBC/PKCS5Padding</transformation>
<!--Optional:-->
<outputformat>STR</outputformat>
</prot:Decrypt>
output
Plaintext data.
<ns1:DecryptResponse xmlns:ns1="http://dsws.org/protectappws/">0000111122223333</ns1:DecryptResponse>
Note
In almost all cases the keyiv and transformation should not be specified: It is a useful practice to utilize the Key Manager appliances capability to store the IV for the application and AES/CBC/PKCS5Padding – the default - is the most recommended cipher block mode.