The above answer is incorrect. The actual implementation of eCryptFS does not checksum data by default or at all. Simple demonstration:
$ mkdir /tmp/front /tmp/back
$ sudo mount -o key=passphrase:passwd=Test,ecryptfs_hmac,ecryptfs_enable_filename_crypto=no,ecryptfs_passthrough=no,ecryptfs_unlink_sigs,ecryptfs_key_bytes=16,ecryptfs_cipher=aes -t ecryptfs /tmp/back/ /tmp/front/
$ echo HelloWorld > /tmp/front/HelloWorld.txt
$ cat /tmp/front/HelloWorld.txt
HelloWorld
$ sudo umount /tmp/front
$ printf "deadbeaf" | dd of=/tmp/back/HelloWorld.txt bs=1 seek=8192 count=8 conv=notrunc
$ sudo mount -o key=passphrase:passwd=Test,ecryptfs_hmac,ecryptfs_enable_filename_crypto=no,ecryptfs_passthrough=no,ecryptfs_unlink_sigs,ecryptfs_key_bytes=16,ecryptfs_cipher=aes -t ecryptfs /tmp/back/ /tmp/front/
$ cat /tmp/front/HelloWorld.txt
<garbage>
Also:
$ ecryptfs-stat /tmp/back/HelloWorld.txt
File version: [3]
Decrypted file size: [11]
Number of header bytes at front of file: [8192]
Metadata in the header region
Encrypted
HMAC disabled
eCryptfs does not give a read error or any indication that anything is wrong. Note that this is even with the ecryptfs_hmac
option, which is supposed to enabled checksumming, but apparently doesn't. The actual source code of ecryptfs does contain HMAC code, so I am not sure why that isn't working. Quick Google search indicates that HMAC code might be incomplete. Haven't yet looked deeper into it.