Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How to put Encrypted Contents on Cloud Storages (haridas.in)
4 points by haridas on July 29, 2012 | hide | past | favorite | 4 comments



I've used encfs for years to keep sensitive data encrypted locally, but I found that with cloud storage, the inability to compress made that approach less than ideal, and the dropbox client refuses to sync the file when it is mounted. The approach I take is to create a standard filesystem, and then reguarly compress and encrypt a copy into the Dropbox folder. The command to do so is below: cat /overflow/dropbox.ext4 | gzip -f | openssl aes-256-cbc -pass pass:xxx > /overflow/Dropbox/dropbox.ext4.gz.aes-256-cbc

Which I set my backup routine to run when it is finished, but you could also set to run at regular intervals using cron. Occasionaly, you might want to zero out the filesystem to improve compression. This can be done using "cp /dev/zero /mnt/SecureDropbox/zero" followed by "rm /mnt/SecureDropbox/zero"


For zeroing unused blocks, I can suggest zerofree: http://packages.debian.org/squeeze/zerofree


There description sounds like it is intended for use in Virtual Machines


Well sure, but it's just zeroing free blocks; that's the same operation (with the same desired outcome) whether you're using the disk image in a virtual machine or as an encrypted loopback device.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: