Skip to content

Commit b619e23

Browse files
nil out plaintext if decryption fails
1 parent eb8ce70 commit b619e23

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/org/cryptomator/siv/SivEngine.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ public byte[] decrypt(byte[] ciphertext, byte[]... associatedData) throws AEADBa
130130
if (diff == 0) {
131131
return plaintext;
132132
} else {
133+
Arrays.fill(plaintext, (byte) 0x00);
133134
throw new AEADBadTagException("authentication in SIV decryption failed");
134135
}
135136
}

0 commit comments

Comments
 (0)