Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -1358,6 +1358,15 @@ private void validateWrappingKeyBlob(){
if (!KMEnumArrayTag.contains(KMType.PURPOSE, KMType.WRAP_KEY, data[HW_PARAMETERS])) {
KMException.throwIt((KMError.INCOMPATIBLE_PURPOSE));
}

// Check that the digest and padding mode specified in unwrapping parameters are SHA2_256
// and RSA_OAEP respectively.
if (!KMEnumArrayTag.contains(KMType.DIGEST, KMType.SHA2_256, data[KEY_PARAMETERS])) {
KMException.throwIt(KMError.INCOMPATIBLE_DIGEST);
}
if (!KMEnumArrayTag.contains(KMType.PADDING, KMType.RSA_OAEP, data[KEY_PARAMETERS])) {
KMException.throwIt(KMError.INCOMPATIBLE_PADDING_MODE);
}
}

private short decryptTransportKey(short privExp, short modulus, short transportKey, byte[] scratchPad){
Expand Down