EncFS Security Audit
defuse.ca
defuse.ca
In just 10 hours? If really so color me impressed. I don't think I've been so productive in 10 hours, ever.
I can imagine that's way faster than doing a thorough code review, though the number of results from 10 hours is still very impressive.
https://defuse.ca/b/hwwW9d3FkPGhM4T6xBIbhf
I think the reason I found so much in only 10 hours is that I had a good set of guesses about what could be wrong, based on what I've seen people get wrong before. From there it was just a matter of prioritizing which guesses to check. I did look at a lot of the code, although it was mostly guess-checking combined with a closer look at the cryptography code.
Because the audit was so short, the quality of the report suffered (ASCII, some mistakes, some severity ratings that I no longer agree with, etc.). My priority was to find as many problems as possible in the amount of time I was given, and then sort that out later.
To answer some other replies: I always report unbilled hours (in this case none), since I think it's dishonest to say you worked less hours than you did. You would essentially be claiming to be more productive than you really are.
Most modern encryption schemes operate on blocks of a certain fixed size, but if the file isn't a multiple of the block size, you have to do something special with the last block. EncFS apparently uses some made-up scheme for this, instead of using something more standard and well-understood. The common choices would be padding and ciphertext stealing.
And it seems to suggest that using it with (something like) Dropbox is a bad idea too:
> EncFS is not safe if the adversary has the opportunity to see two or more snapshots of the ciphertext at different times.
Not anymore: https://forums.boxcryptor.com/topic/opening-linux-encfs-encr...
I know they could potentially do cute de-duping tricks on their end, similar to tarsnap, but even if they passed those space savings on to me I'd still lose the file-level features.
That's why I chose EncFS to begin with, and asked for potential other file-level tools to replace it. Realistically, I'd prefer if this expedited EncFS 2.0 and 2.0 fixed the noted issues.
If TC + Dropbox is not an option, maybe owncloud + private hosting +SSL certs should be used instead... OR SSHFS with private keys.
https://wiki.archlinux.org/index.php/Disk_Encryption#Compari...
It would be one thing if all these systems used roughly the same XTS construction, like modern full disk encryption systems. But they don't; they use '90s constructions like block-addressed CBC.
ps. I have repeatedly encountered people who falsely assume that Truecrypt does not allow incremental backups with Dropbox. The thinking behind this seems to be assumption cipher-block chaining (CBC) is used. Truecrypt uses XTS mode.
Needless to say, with encfs on Dropbox, files are synced as soon as they are changed.
Sure the unencrypted copy would be exposed, but not to any process that couldn't already access the mounted directory, as far as I can see.
1. Keep TC container in a non-shared location on local disk
2. Mount it, keep it mounted
3. Periodically backup this location to your Dropbox folder
Now, the trick is to use backup software that is capable of
(a) shadow copying
(b) incremental file updates
Shadow copying works around .tc file being locked.
Incremental updating keeps things quick.
The only Windows software I know that is capable of this is Bvckup 2 - http://bvckup2.com(I posted this earlier, but then deleted the post as it read kind of spammy. But this is the way to handle TC container backup, so here it is again. And that's one gem of a backup program too, totally worth a plug).