News for hackers. Stuff that matters.
Re:Ext4 encryption by caf on Wednesday May 27, 2015 @03:02AM (#9609770)
For 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.

Re:Ext4 encryption by Dylan16807 on Wednesday May 27, 2015 @03:35PM (#9613769)
Well if you use atomic 4K writes to the drive, and expose each one as 7 512-byte blocks to the next layer...
Re:Ext4 encryption by kijin on Wednesday May 27, 2015 @08:04PM (#9615254)
That'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.

Re:Ext4 encryption by caf on Wednesday May 27, 2015 @08:47PM (#9615423)
Now your 4K aligned writes of filesystem blocks turn into an 8K read-modify-write cycle on the underlying block device.