Description | : The DECRYPT operation decrypts a well-formed block of ciphertext using the target encryption key and specified algorithm. This operation is the reverse of the ENCRYPT operation; only a single block of data may be decrypted, the size of this block is dependent on the target key and the algorithm to be used. The DECRYPT operation applies to asymmetric and symmetric keys stored in Azure Key Vault since it uses the private portion of the key. This operation requires the keys/decrypt permission. Microsoft recommends not to use CBC algorithms for decryption without first ensuring the integrity of the ciphertext using an HMAC, for example. See https://docs.microsoft.com/dotnet/standard/security/vulnerabilities-cbc-mode for more information. |
Reference | : Link ¶ |
⚶ Changes
{ "#id": "decrypt", "$parameters": { "parameters": { "$properties": [ { "#name": "alg", "Enum": { "new": [ [ "RSA-OAEP", "[Not recommended] RSAES using Optimal Asymmetric Encryption Padding (OAEP), as described in https://tools.ietf.org/html/rfc3447, with the default parameters specified by RFC 3447 in Section A.2.1. Those default parameters are using a hash function of SHA-1 and a mask generation function of MGF1 with SHA-1. Microsoft recommends using RSA_OAEP_256 or stronger algorithms for enhanced security. Microsoft does *not* recommend RSA_OAEP, which is included solely for backwards compatibility. RSA_OAEP utilizes SHA1, which has known collision problems." ], [ "RSA-OAEP-256", "RSAES using Optimal Asymmetric Encryption Padding with a hash function of SHA-256 and a mask generation function of MGF1 with SHA-256." ], [ "RSA1_5", "[Not recommended] RSAES-PKCS1-V1_5 key encryption, as described in https://tools.ietf.org/html/rfc3447. Microsoft recommends using RSA_OAEP_256 or stronger algorithms for enhanced security. Microsoft does *not* recommend RSA_1_5, which is included solely for backwards compatibility. Cryptographic standards no longer consider RSA with the PKCS#1 v1.5 padding scheme secure for encryption." ], [ "A128GCM", "128-bit AES-GCM." ], [ "A192GCM", "192-bit AES-GCM." ], [ "A256GCM", "256-bit AES-GCM." ], [ "A128KW", "128-bit AES key wrap." ], [ "A192KW", "192-bit AES key wrap." ], [ "A256KW", "256-bit AES key wrap." ], [ "A128CBC", "128-bit AES-CBC." ], [ "A192CBC", "192-bit AES-CBC." ], [ "A256CBC", "256-bit AES-CBC." ], [ "A128CBCPAD", "128-bit AES-CBC with PKCS padding." ], [ "A192CBCPAD", "192-bit AES-CBC with PKCS padding." ], [ "A256CBCPAD", "256-bit AES-CBC with PKCS padding." ] ], "old": [ [ "RSA-OAEP", "RSAES using Optimal Asymmetric Encryption Padding (OAEP), as described in https://tools.ietf.org/html/rfc3447, with the default parameters specified by RFC 3447 in Section A.2.1. Those default parameters are using a hash function of SHA-1 and a mask generation function of MGF1 with SHA-1." ], [ "RSA-OAEP-256", "RSAES using Optimal Asymmetric Encryption Padding with a hash function of SHA-256 and a mask generation function of MGF1 with SHA-256." ], [ "RSA1_5", "RSAES-PKCS1-V1_5 key encryption, as described in https://tools.ietf.org/html/rfc3447." ], [ "A128GCM", "128-bit AES-GCM." ], [ "A192GCM", "192-bit AES-GCM." ], [ "A256GCM", "256-bit AES-GCM." ], [ "A128KW", "128-bit AES key wrap." ], [ "A192KW", "192-bit AES key wrap." ], [ "A256KW", "256-bit AES key wrap." ], [ "A128CBC", "128-bit AES-CBC." ], [ "A192CBC", "192-bit AES-CBC." ], [ "A256CBC", "256-bit AES-CBC." ], [ "A128CBCPAD", "128-bit AES-CBC with PKCS padding." ], [ "A192CBCPAD", "192-bit AES-CBC with PKCS padding." ], [ "A256CBCPAD", "256-bit AES-CBC with PKCS padding." ] ] } } ] } } }
⚼ Request
POST:
/keys/{key-name}/{key-version}/decrypt
{
api-version:
string
,
key-name:
string
,
key-version:
string
,
parameters:
}
{
,
alg:
enum
,
value:
string
,
iv:
string
,
aad:
string
,
tag:
string
,
}
⚐ Response (200)
{
kid:
string
,
value:
string
,
iv:
string
,
tag:
string
,
aad:
string
,
}
⚐ Response (default)
{
error:
}
{
,
code:
string
,
message:
string
,
innererror:
string
,
}