diff --git a/ChangeLog.txt b/ChangeLog.txt index 06858342..e9b868ff 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -8,6 +8,8 @@ New Features & Improvements: * Use relatime instead of strictatime (further performance improvement) * Pass fuse options directly to cryfs (i.e. 'cryfs basedir mountdir -o allow_other' instead of 'cryfs basedir mountdir -- -o allow_other') * CryFS tells the operating system to not swap the encryption key to the disk (note: this is best-effort and cannot be guaranteed. Hibernation, for example, will still write the encryption key to the disk) +* New block size options: 4KB and 16KB +* New default block size: 16KB Fixed bugs: * `du` shows correct file system size on Mac OS X. diff --git a/src/cryfs/config/CryConfigConsole.cpp b/src/cryfs/config/CryConfigConsole.cpp index 00ad5293..3ff04af3 100644 --- a/src/cryfs/config/CryConfigConsole.cpp +++ b/src/cryfs/config/CryConfigConsole.cpp @@ -55,15 +55,17 @@ namespace cryfs { } uint32_t CryConfigConsole::_askBlocksizeBytes() const { - vector sizes = {"8KB", "32KB", "64KB", "512KB", "1MB", "4MB"}; + vector sizes = {"4KB", "8KB", "16KB", "32KB", "64KB", "512KB", "1MB", "4MB"}; int index = _console->ask("Which block size do you want to use?", sizes); switch(index) { - case 0: return 8*1024; - case 1: return 32*1024; - case 2: return 64*1024; - case 3: return 512*1024; - case 4: return 1024*1024; - case 5: return 4*1024*1024; + case 0: return 4*1024; + case 1: return 8*1024; + case 2: return 16*1024; + case 3: return 32*1024; + case 4: return 64*1024; + case 5: return 512*1024; + case 6: return 1024*1024; + case 7: return 4*1024*1024; default: ASSERT(false, "Unhandled case"); } } diff --git a/src/cryfs/config/CryConfigConsole.h b/src/cryfs/config/CryConfigConsole.h index 71aae021..460d4f03 100644 --- a/src/cryfs/config/CryConfigConsole.h +++ b/src/cryfs/config/CryConfigConsole.h @@ -17,7 +17,7 @@ namespace cryfs { bool askMissingBlockIsIntegrityViolation(); static constexpr const char *DEFAULT_CIPHER = "aes-256-gcm"; - static constexpr uint32_t DEFAULT_BLOCKSIZE_BYTES = 32 * 1024; // 32KB + static constexpr uint32_t DEFAULT_BLOCKSIZE_BYTES = 16 * 1024; // 16KB static constexpr uint32_t DEFAULT_MISSINGBLOCKISINTEGRITYVIOLATION = false; private: