3 ms·
According to the comments, the primary benefits of filesystem-level encryption over full-disk (block-level) encryption are claimed to be: 1) The filesystem can
by kijin 11y ago
According to the comments, the primary benefits of filesystem-level encryption over full-disk (block-level) encryption are claimed to be:
1) The filesystem can be configured to expose different parts of the tree to different users, whereas FDE is all-or-nothing.
2) The filesystem can make room for more metadata than a block device, so it would be easier to implement authenticated encryption.
3) More fine-tuned control over caching.
But are these really significant advantages?
1) Most devices nowadays, including Chromesbooks and Android phones, are only ever used by one person.
2) We could modify dm-crypt to set aside a certain amount of space for MAC, and just expose a smaller block device to the next layer. Besides, the proposed changes to ext4 don't use authenticated encryption, either.
3) Can't this be addressed at a lower level?
- caf 11y agoFor point 2, you can't just expose a smaller block to the next layer - everything is designed to work with 512-byte logical blocks. You could possibly do it if you were willing to sacrifice half your disk space by pairing every 512-byte data block with a 512-byte authenticator block, but... ...the other issue is that you need a way to atomically update the data block and authenticator together. This is a similar problem to the "RAID write hole", and doing this at the block layer requires even more overhead - something equivalent to RAID write intent bitmaps. The filesystem, on the other hand, already tends to have a journal, log-structure or COW rules that allows some form of atomic transactional updates. The encryption authenticator can piggy-back on this.
- Dylan16807 11y agoWell if you use atomic 4K writes to the drive, and expose each one as 7 512-byte blocks to the next layer...
- kijin 11y agoThat's exactly what I was thinking. SSDs have fairly large page sizes and erase block sizes, so you're often reading and writing a lot more than necessary, anyway. A clever implementation might be able to take advantage of that to scatter the MAC throughout the drive without too much impact on performance or longevity.
- caf 11y agoNow your 4K aligned writes of filesystem blocks turn into an 8K read-modify-write cycle on the underlying block device.
- buster 11y agoBut you know that servers host data shared by many persons, right? Also, android can have multiple users. I imagine chromebooks can also have multiple users.