- Increased file name IV length

This commit is contained in:
Sebastian Stenzel
2014-12-30 18:13:43 +01:00
parent d8c9279f6f
commit ebea3dae65
2 changed files with 4 additions and 3 deletions

View File

@@ -78,9 +78,10 @@ interface AesCryptographicConfiguration {
/**
* Number of non-zero bytes in the IV used for file name encryption. Less means shorter encrypted filenames, more means higher entropy.
* Maximum length is {@value #AES_BLOCK_LENGTH}.
* Maximum length is {@value #AES_BLOCK_LENGTH}. Even the shortest base32 (see {@link FileNamingConventions#ENCRYPTED_FILENAME_CODEC})
* encoded byte array will need 8 chars. The maximum number of bytes that fit in 8 base32 chars is 5. Thus 5 is the ideal length.
*/
int FILE_NAME_IV_LENGTH = 4;
int FILE_NAME_IV_LENGTH = 5;
/**
* Number of iterations for key derived from user pw. High iteration count for better resistance to bruteforcing.

View File

@@ -22,7 +22,7 @@ interface FileNamingConventions {
String MASTERKEY_FILE_EXT = ".masterkey.json";
/**
* How to encode the encrypted file names safely.
* How to encode the encrypted file names safely. Base32 uses only alphanumeric characters and is case-insensitive.
*/
BaseNCodec ENCRYPTED_FILENAME_CODEC = new Base32();