- always check HMAC before decryption

- separating AES and CMAC key during SIV mode
This commit is contained in:
Sebastian Stenzel
2015-02-20 19:47:45 +01:00
parent 5569ecbfc7
commit b68cf71494
16 changed files with 107 additions and 157 deletions

View File

@@ -69,11 +69,6 @@ public interface Cryptor extends SensitiveDataSwipeListener {
*/
String decryptPath(String encryptedPath, char encryptedPathSep, char cleartextPathSep, CryptorIOSupport ioSupport) throws DecryptFailedException;
/**
* @return <code>true</code> If the integrity of the file can be assured.
*/
boolean authenticateContent(SeekableByteChannel encryptedFile) throws IOException;
/**
* @param metadataSupport Support object allowing the Cryptor to read and write its own metadata to the location of the encrypted file.
* @return Content length of the decrypted file or <code>null</code> if unknown.

View File

@@ -76,11 +76,6 @@ public class SamplingDecorator implements Cryptor, CryptorIOSampling {
return cryptor.decryptPath(encryptedPath, encryptedPathSep, cleartextPathSep, ioSupport);
}
@Override
public boolean authenticateContent(SeekableByteChannel encryptedFile) throws IOException {
return cryptor.authenticateContent(encryptedFile);
}
@Override
public Long decryptedContentLength(SeekableByteChannel encryptedFile) throws IOException {
return cryptor.decryptedContentLength(encryptedFile);