Storing Sensitive Data In The Cloud

Being an expat with multiple bank accounts in different countries, and important documents such as passports, visas, life insurance and other contracts I seem to have amassed a huge collection of important but private information which is essential to the smooth running of my life. Whatever the documents maybe if you’re like me then keeping track of it all is a headache made even it’s made even more complex as conventionally it’s a bad idea to store it all in the same place which would make identity theft much easier if that information was compromised (i.e. stolen). Added to this you need this information to be easily accessible as it would be pretty difficult to memorize it all (e.g. online bank credentials, emergency contact and policy numbers etc).

So what’s the solution for keeping your personal information secure but accessible at the same time?

One solution I’ve found which works well is to use a combination of the cloud storage service Dropbox and disk encryption software TrueCrypt:

Dropbox TrueCrypt Cloud

Whilst this might look a bit daunting it’s simpler than it appears. TrueCrypt allows you to create a  virtual encrypted disk within a file which can be mounted on your computer as an ordinary disk (like plugging in a USB drive). Dropbox allows you to sync your files online (in the “cloud”) and across multiple computers.

The basic step for setting this up are as follows:

  1. Sign up for a Dropbox account & install the client (2GB of storage free, works on all platforms)
  2. Download and install TrueCrypt (opensource, works on all platforms)
  3. Run the TrueCrypt Volume Creation Wizard to create a new virtual encrypted disk within a file (default option). When selecting the volume size be sure to keep it <5MB depending on your internet connection speed as this will have to be updated each time you unmount (disconnect) the disk.
  4. Save the virtual disk file to your Dropbox (usually within My Documents on Windows or your Home Directory on Mac OS/Linux).
  5. Place your secret files within the virtual disk and mount/unmount as needed.

Dropbox encrypts all files with AES-256 before being sent to their servers over an SSL connection (similar to when you make a credit card purchase online). Combined with TrueCrypt this essentially “triple encrypts” your files so in the extremely unlikely event that someone compromised the Dropbox servers or your computer then your files would still remain safe.

There are other all-in-one solutions which do similar things (like 1Password) but the problem I have with these is that you’re still entrusting your security to other people and most are platform-dependent. With this solution, you have multiple levels of protection and you’re still in complete control.

While this works quite well for me there may be better methods so if you know of one please leave a comment below!

David avatar

55 responses

  1. This is very useful, Thanks one million! I always try not to leave a trace of my private info during online-based payment but then I forget my password at all times. Maybe I have sort of security system in my subconsciousness.

    1. Haha, you might have a good thing going there. If you were captured by terrorists they wouldn’t get much out of you!

  2. Dude, you can use the 1password, it’s not really platform dependent. You can still access your password on window. It act as a browser, the file is located within 1password keychain itself. It’s too much of a hassle to use truecrypt. Better yet, u can use 1password, and store it in truecrypt virtual disk as u discribe earlier, u get quadruple protection. awesomeness

    1. Thanks for the tip Van, sounds like quite a good idea – looks like 1Password has a nice iPhone app interface also.

  3. What about my private bits? « Get secure with Steve Riley

    […] that useless if you encrypt it with a key you don’t know. Recently randomwire published a recipe for combining Dropbox and TrueCrypt. This looks interesting, and I’ll see if I can repeat the experience with […]

  4. Domino avatar
    Domino

    For the Password data base, instead of 1password, you can use the opensource keepass.info . It’s super safe and it’s free… And you can synch it’s DB through dropbox

  5. carls avatar
    carls

    First of all thanks. Same problem here: multiple banks in different countries and too much time commuting to keep a fresh head each time I need the data, password, pin, …

    So I’ve been using TrueCrypt, but worrying about what happens if the file is corrupted or the computer stolen.

    Your idea of DropBox seems terrific, but doesn’t its update algorithm depend on some change in file date or size? In the case of TrueCrypt volumes, the date and size always remain the same – for security reasons that lie outside my concerns. So I’d be glad to change the date each time there’s a change to a file within the TC volume, but am curious if that’s what you do?

    On another note, have you used Quicken with different currencies (mine are just euro and USD) – another way to access without manually entering passwords.

    Thanks for this blog and for any comments. Very much appeciated.

    Carls

    1. Hi Carls, in my experience I simply save my files, unmount the TrueCrypt drive and the changes sync back to DropBox automatically. I’m guessing that although the file size does not change the contents has (even it is encrypted).

      The great thing about DropBox is that even if your TrueCrypt drive was to get corrupted you could simply roll back to the previous saved version that worked.

      I suggest giving it a try – it’s all free 🙂

  6. Adrian avatar
    Adrian

    Please don’t forget that Dropbox stores files locally on your machine so AES/SSL encryptions are useless if your PC gets compromised…

    1. polecat avatar
      polecat

      @Adrian
      The only file Dropbox would be storing locally in this scenario is your TrueCrypt volume, which is itself AES 256 encrypted… If the PC is compromised, the assailant wouldn’t be able to decrypt the TC volume.

  7. Adrian avatar
    Adrian

    You’re absolutely right.

    Dropbox only makes sense if you use TC otherwise your files are exposed big time. But again having TC volume in a single file, let’s say 200MB means that it has to sync up all 200MB each time [even if there is very small change]…

    Without TC it’d be ideal to turn off storing Dropbox files locally to prevent unwanted access [or point to a network share etc.]

    1. Harry avatar
      Harry

      My main container is 8GB. When I dismount it it takes about 5min to Index and Sync. (like 4:55 to index and 5sec to sync). *meh, I don’t know much but I’m quite sure it’s not resyncing the whole 8GB in 5min. It works good.

  8. Stephane avatar
    Stephane

    I’m a Dropbox and TrueCrypt fan since a couple of year. This is a perfect match.

    Dropbox can know if Truecrypt file change if you uncheck “Preserve modification time of file containers” in Truecrypt preferences.

    Dropbox only sync difference, so when I add a 2MB file to my 1 Gig Truecrypt container, only 2MB is upload to the clound.

    I search for other option, because I want to be able to open my Truecrypt on my IPhone, but all solution put encryption and synchronisation in the same product. And in my opinion this is not a good idea.

    1. Thanks for the tip about the modification time Stephane – that’s really helpful!

      Agree that keeping encryption and synchronization is good for security but would be nice is Dropbox could somehow build something similar into their product for the sake of simplicity.

    2. Adrian avatar
      Adrian

      How would Dropbox know that only 2MB changed without being able to look into TC volume?

      Its stored in a single file as you know and encryption prevents anyone from looking into to it to figure out what has changed. Its all or nothing.

      Correct me if I’m wrong….

      KeePass has iPhone client so you ‘might’ want to try that.

      1. name avatar
        name

        Because files are made of blocks, which are made of bytes. They can be compared, and hashed like rsync does.

      2. Fran avatar
        Fran

        Because TrueCrypt does block-level encryption, so if you change a 2 MB file in a 1 GB TC volume, only about 2 MB of the TC volume changes. You can see this by creating a very large (10 GB) TC volume, mounting it, copying one file to it and unmounting it. If the entire 10 GB were changed, it would take many minutes to write out the entire file. But that doesn’t happen. Unmounting is fast, so only the parts of the volume containing the changes are written, which shows that block-level encryption is happening.

        1. Philp avatar
          Philp

          When a 2MB file is encrypted, and then changed, the changed file will almost certainly require a complete re-upload: the entire 2MB. That is what encryption means. Even a change of a single bit will almost certainly change everything.

    3. CryptoDude avatar
      CryptoDude

      I’m guessing that DB doesn’t actually have to look into the container so much as it looks at the container it self. It is probably looking at the overall container and seeing that 2 MB of it has changed, and it only syncs those changes. Similar to a block level differential backup. I haven’t tried this yet, but I will as soon as I get home. I’m intrigued to see how this happens as well.

      1. Stephane avatar
        Stephane

        Dropbox is base on a protocol like rsync, so only modified block are transmit. Dropbox dont have to look inside TrueCrypt container, only look all bytes of the file and with kind of block checksum, transfert only new data.

        Also, to speedup transfert, Dropbox keep checksum of files, so if you put a file already in dropbox somewhere (in your account, or other account), the transfert is instantaneous… Exemple, I download “SystemRescueCD.iso” (around 250MB) file and put in my dropbox, only couples of seconds after, Dropbox tell me all is in sync. WOW !!!
        I dont know exactly how does it work, but that my comprehension. Maybe they have some limitation…

        1. TCspert avatar
          TCspert

          what you guys are describing is not possible. the only way to keep keep in-sync between local/remote TC volumes WITHOUT reuploading the local container to remote servers, would be to mount the remote container locally on your PC & then do all synchronization.

          i dont use DB, but if its just a standard FTP-ish interface this would not be possible, DB would have to be able to mount as a drive letter & allow full read/write/modify access just like a real drive.

          1. AndreyM avatar
            AndreyM

            @TCspert

            Sure it’s possible!

            DropBox doesn’t use FTPish approach. It uses some rsync-like differential algorithm, like Stephane mentioned.

            TC container file is just a blob of bits. Consider the following (not sure that DropBox works this way, but just to prove a point):

            You have a 1GB TC container. Divide it into 20000 pieces of 5KB each. Then scan the file on server and on your machine and calculate a simple checksum for each of these pieces.

            When your local file changes – DropBox client recalculates & sends 20000 checksums to server. Server compares these to what it has stored and replies to DropBox client with a list of pieces that changed. Your client then sends to the server only the pices of file that were modified.

            All this can happen without DropBox peaking into TC container contents at all.

            [I’m not affiliated with DropBox, all said here is an educated guess, please don’t sue me ;]

  9. Adrian avatar
    Adrian

    So it would indicate that Dropbox looks at data from block perspective rather than a file. Typical feature on rather expensive SAN devices.

    Second option would be de-duplication – plenty to google about 🙂
    In fact I never put anything larger that 5MB to notice, thanks for the heads up tho…

  10. Zebedee avatar
    Zebedee

    WARNING:

    In the scenario described in this thread, there is no way to mount the TC volume on Dropbox from two different computers at the same time (assuming you mount read/write) – the differential block writes that TC sends from each computer will corrupt the other computer’s view of the file system in the TC volume since each instance of TC expects to be the sole writer to the volume.

    Bottom line: unmount your TC volume on one computer and make sure all changes have sync’d before mounting it on another computer.

    1. this actually happened to me, dropbox created conflicted files of the TC volume stored locally.. it was a nightmare to fix! luckily I only lost a few minor changes. I learned to always unmount after writing and it never happened again.

    2. Brian avatar
      Brian

      Dropbox will not sync the TC file until it is dismounted so you don’t have to worry about corruption between computers. You do still have to worry about version conflicts if you were to mount it on two computers at the same time which is what Zed experienced.

    3. Harry avatar
      Harry

      Don’t know if this is a new feature: Can have all volumes dismount when screensaver comes on. I made all screensavers text:”Volumes Dismounted”. Takes me 25 min to get from home to office. Screensaver set to come on in 20 min. When I’m at office I KNOW that no volume is mounted at home and I can safely ‘Read/Write’ to all containers without fear of conflicts. Sexy!

  11. […] Randomware and the daily moe have stories on this with some good followup discussion.  Below is a summary of important things to understand when using TrueCrypt with Dropbox.  These issues don’t bother me, but they won’t be OK for everyone. […]

  12. Nick Jackson avatar
    Nick Jackson

    Just ran across an interesting podcast that addresses some of the concerns you mentioned concerning password managers as a way to store sensitive data. The latest “Security Now” podcast (http://www.grc.com/sn/sn-256.htm) which I ran across in a Google search, is basically a discussion of LastPass (the password manager/secure data solution I’ve been using for a few months) and how its crypto/security architecture is setup to ensure that all decryption and key storage happens only on your local machine, and all that’s ever sent to them is encrypted data (even your password is never transmitted, rather they combine it with a randomly generated number and send the twice-hashed version of that string, so there’s no way to unravel your password from that block of data). Add to that a number of tools to keep your encrypted password database secure, such as being able to generate one-time passwords for use on unknown computers, ability to remotely disable bookmarklets you’ve used to access your credentials on other computers, an optional extra layer of authentication similar to “Perfect Paper Passwords” (checking against a printed-out, paper matrix of random values you carry with you). And I’m thoroughly impressed with their multi-platform support, since I have an Android phone and like the idea of always having a local secured copy of my passwords (but also they cover pretty much any modern browser or mobile OS).

    I’m a fan and user of both Dropbox and TrueCrypt as well, and that combination is still superior when you need to store actual files. However, I’d recommend checking out LastPass (don’t know anything about other systems like 1Password or RoboForm) as a leaner, more efficient way to manage simple data like passwords, addresses/account numbers, and text notes.

    1. Thanks for your comment Nick. LastPass definitely looks like another good solution but for all the cool features such as mobile app support you need to subscribe.

  13. +1 for lastpass
    and a correction for future readers, dropbox does *not* encrypt your files before they leave your PC. They are unencrypted on your PC, then sent through an encrypted SSL tunnel to dropbox’ servers, where they arrive still unencrypted. Dropbox then encrypts them with AES before storing them on Amazon’s servers. That’s one of the key differences between dropbox & some of its competitors like jungledisk & spideroak.

    Just mentioning that for anyone who is not using your TC method 🙂

  14. April avatar
    April

    I have an iPhone & just installed the MyKeePass app. On my PC, I have DropBox (also the DropBox app for iPhone) and within my DropBox files, I have a TrueCrypt volume where I store sensitive documents. The MyKeePass app allows me to sync my keepass database where I store all my passwords and DropBox app syncs my docs between computers & iPhone. HOWEVER, the things I can’t access (that I need to) on my iPhone are the sensitive documents within my TC volume. Is there any app or way (without jailbreaking) I can mount this volume on my iPhone when I need to see those docs and then dismount when I am done?

    This is the only piece I am missing! :-/

    1. James Tomlinson avatar
      James Tomlinson

      I have been in this situation for a while now and still no solution. However – it is possible to store 256 AES Encrypted zipfiles on Dropbox and use the ZipBroPro iPhone App (69p/99c) to decrypt them on your iPhone. It works quite well once you’ve invested time creating encrypted zipfiles (although theoretically you could keep all files in just one encrypted zip!).

  15. One huge advantage to also using an external website to store backups, is in case your house ever burned down, you would lose everything if it was only stored your personal computer.

  16. […] to think of the Dropbox-Truecrypt combo. You can find more detailed discussions of the technique here and here. Pitch in with a comment if you've tried this or have a better […]

  17. […] Beveiliging Alle data van en naar Dropbox gaat via een beveiligde https-verbinding. Bestanden die opslagen worden op Dropbox zijn versleuteld en alleen te openen met de gebruikersnaam en wachtwoord. Medewerkers van het bedrijf kunnen ook bestanden niet openen, zij hebben alleen inzicht in de meta-data (bestandsnaam, grootte, etc.). De bestanden die in de public-map staan zijn alleen te vinden als de URL bekend is. De bestanden zijn niet te vinden met bijvoorbeeld Google. Ook is de mappenstructuur niet zichtbaar, waardoor mensen niet van het ene bestand bij het andere kunnen komen. Maar zoals met alle online data-opslag moet er voorzichtig worden gehandeld met bedrijfs- en privacygevoelige informatie. Het is de vraag of het gewenst is dat deze dat via het internet wordt verspreid. Dropbox adviseert zelf om gevoelige data eerst op de eigen computer te encrtypten (lees hier een uitleg over Dropbox en TrueCrypt). […]

  18. Snooz avatar
    Snooz

    Good idea. I was wondering if that would work as well. However, since the truecrypt file size (and I believe other attributes) do not change when written to, I’m not sure how Dropbox will know when to sync the file? If it has to the sync the entire file each time then it might not be very efficient for large files. In any case, I have not tried it yet only sharing some thoughts.

    1. April avatar
      April

      Snooz,
      David answered that earlier…though the file attributes do not change, there must be something that alerts Dropbox to resync the file. I use it with a 1GB TrueCrypt container and Dropbox does sync when appropriate. However, it does take a little while for it to sync b/c I have such a large container.
      I use Dropbox iPhone app and a separate KeePass file/MyKeePass app to store passwords.
      I still don’t know of a solution where I can open the TrueCrypt container on my iPhone but I still sync some other files via the Dropbox app that are not encrypted to view on the phone.

  19. carls avatar
    carls

    What about Wuala for encrypting and cloud storage? It’s been bought by LaCie, the disk company, and it complies with the European privacy constraints. There’s only 2GB available for free, but a pretty decent upgrade path if you’ll share your storage.

    As I understand it, everything you store in encrypted *on your computer* and only then uploaded. It’s split into little bits and stored everywhere with enough duplication to handle “volunteers” being offline when you want at every bit of your stuff.

    It sounded kind of far-fetched, but the more I think about it, it may be just the ticket for the secure stuff I don’t have time to put in Truecrypt and Dropbox.

    What do you think?

  20. Titas Raha avatar
    Titas Raha

    I have been using both Truecrypt and Dropbox for some time now, but never tried it together as I falsely assumed that it may not work correctly. I am going to give it a try.

    I like the opensource Keypass solution, the only problem I have with it is since it is a popular tool, there may be spyware out there trying to exploit it.

    Granted AES is a very secure algorithm but not knowing even the encryption algorithm and the hash functions and the number of it’s iterations provide additional level of security in my opinion. That is exactly the reason why I use my own written tool to encrypt my most sensitive information before writing my password db file on to truecrypt.

  21. Joey D avatar
    Joey D

    Thanks for the tips here, this setup works good for me. I have a question for the group. If I mount my TrueCrypt FS and a backup program happens to kick off during that time and is configured to backup mounted volumes…I assume my decrypted plain text files on the TrueCrypt FS are will be backed up decrypted? I usually mount/dismount only when I need a file rather than leave the thing mounted all the time so the risk is low. But I just wanted to know out of curiosity…and my pea soup recipe is the center of an international spy ring trying to capture it.

    Thanks in advance.

    1. Brian avatar
      Brian

      Yes, when your TC volume is mounted that volume is presented to your computer without encryption… it is only encrypted when the file is unmounted. Technically the actual .tc file is always encrypted but the files contained within are not encrypted when presented to the operating system when mounted. I know, its a bit confusing but think about it for a few minutes and it will click. 🙂

  22. […] software, such as TrueCrypt on your cloud storage service (such as Dropbox); however, such a solution may be problematic as Dropbox cannot access your filesystem and might have to back up your entire […]

  23. Len Beasley avatar
    Len Beasley

    I’m reading all this about cloud storage and have a few concerns.

    The whole concept relies on having access to the net. In the last few weeks problems in various countries have had people reverting to dialup connections because the authorities have “shut down” broadband systems, how is this possible?

    I commute between UK and Canada on a regular basis and parts of Canada still use dialup which can be really slow.

    I read somewhere that data is not safe unless kept in at least three seperate locations, keeping a TrueCrypt file on multi computers gets part of the way but we still rely on ” OTHERS ” to some extent.

    1. Brian avatar
      Brian

      The files are SYNCED with Dropbox, not just stored there. So.. if you have three computers that you have linked to Dropbox, all three computers have replicas of the data PLUS the replica stored in the Dropbox cloud. Therefore, everything you have in Dropbox is saved to your computers and can be accessed offline. When you reconnect your computer to the Internet it will sync up your changes to the Dropbox cloud.

  24. Hello everybody!

    How do you store 1password in a truecrypt container????

    I can’t get this to work and 1password manufacturers say it can’t be done. You can’t save the database on removable media (such as truecrypt container, as they mount). How have you solved this???

    1. Brian avatar
      Brian

      Mounting your TC volume as removable media is an option you can choose not to set (it should be unchecked by default). This would allow you to copy the 1password file on the TC volume.

  25. Awesome! I normally use Dropbox but I didn’t know about this TrueCrypt thing. It’s awesome to secure data. Thanks for this article… I like this article but didn’t find facebook like button 🙁 please add this plugin.

    Regards,

  26. iDiabloX avatar
    iDiabloX

    A little bit of everything:

    Dropbox & TrueCrypt: It is certainly a good marriage to maximize the security and privacy of you data on the cloud, the only thing missing is that DropBox Shall incorporates OTP as a way to login to your DropBox account – Something similar to Google’s Two Step Verification – which allow you to login to your Gmail account using One Time Passwords, either sent to your mobile phone as a text message (SMS) or through a Phone Call (Audible delivery) or through the Google Authenticator App for iPhone (Which produces the OTP Codes locally – on your iPhone) I just think it will be Fantastic if DropBox will provide OTP Authenticated Logins. So, even if someone managed some how to obtain your Dropbox login credentials, it will be useless if they don’t have access to the OTP code. OTP is based in the security model of “Something you have” and “Something you know”

    LastPass and Roboform Everywhere, Shall also be offering by now OTP Authenticated Logins to their services, it is just a no brainer situation towards the security of their customers data – Otherwise they are playing with fire. LastPass servers were recently hacked, and if they would be offering OTP Authenticated Logins at that time – Their users data wouldn’t be compromised, as it was the case. I just can’t picture an Online Password Service Provider not offering Two Factor Authentication to login to their servers.

    In addition, a SSL connection is Not as secure as many people may think – it has its flaws, and it had been demonstrated that a SSL connection can be compromised. Per Example: A “Sniffer on the Wire” could use tools such a WireShark to analyze SSL connections, or use FireSheep to steel and replicate cookies placed unencrypted, there is also DNS poisoning redirections, Man in the Middle attacks, and key-loggers. So, if you think a SSL is truly secure – Think Twice.

    As a counter measure to the above, Online Password Service Providers, Shall offer, in addition to OTP Authenticated Logins, SSH as a way to Securely connect to their servers – SSH is Rock Solid and it is even possible to tunnel a SSL connection through SSH (SSH = Public / Private Key Authentication) SSH is Not just to get Root Access to a Web Server to update a website – it is also useful for many other things such as checking an email account securely, or to establish a secure web browsing connection. So, I guess, it can also be Extremely Useful, to connect to an Online Password Service Provider, and then tunnel a SSL connection through it. Think of it as a Carbon Fiber Tube tunneled trough a Stainless Steel Tube – and that will be a a Real Nightmare to intercept or hack. Period.

    Anyway, you should Better keep your passwords and any highly valuable data, at your side – under your physical control – Encrypted – and stored on a removable media device – That is the most secure method ever know to man kind to protect their valuable data. You should also Prefer to use Open Source software such as TrueCrypt and KeePass, or KeePassX for Mac – Which allows you to store your encrypted data on a Removable Media – such as a USB or DVD, and, in addition to a Master Password, allows you to setup a Key File as a Second Factor of Authentication to open your Data Safe, or Password Safe. Think of it a a Security Box in a Swiss Bank, that, to be opened, requires the key you have with you, plus a second key in possession of the Bank Manager.

    Finally, there is other services, such as SpiderOak, that offer full Encryption of your data before uploading it to their servers, and that is simply more easy than trying two make two different apps work together – such as in the case of Dropbox and TrueCrypt. SpiderOak also has an iPhone app which keeps a copy of your data for offline access – and that is handy while on a trip, and in the case your iPhone gets lost or stolen it is well protected already by the iPhone Hardware Encryption, plus another protection PIN on the SpiderOak iPhone App, plus your SpiderOak account logins credentials which only you know, and you can of course wipe your iPhone Remotely and / or setup your iPhone to erase all its contents at certain wrong password attempts. You can also carry with you a backup – encrypted USB during a trip.

    Well, that’s all for now.

    iDiabloX

    Trust nobody your data but you 😉

  27. maroosh avatar
    maroosh

    try http://www.boxcryptor.com. it does file-level encryption and plays nicely with dropbox.

  28. If you want to add another security layer, try adding a keyfile to the volume.
    Even if you password is compromised they would not be able to open the volume without the keyfile.

  29. Doug avatar
    Doug

    I store TrueCrypt encrypted volumes in Dropbox. Is there a way to access these volumes on my Droid Razr Max?

  30. ValentinJesse avatar
    ValentinJesse

    Question:

    From what i know Dropbox uses the classical 2way synchronization system. What happens if someone compromises your dropbox account and deletes the truecrypt container ? Well, you guessed correctly, the truecrypt container will be deleted from all the pc’s. The same will happen if someone will compromise your laptop.

    I see that nobody addressed this issue. Isn’t it better to use a truecrypt container on your hdd, sync it with rsync or alternatives to the dropbox folder and from there dropbox syncs it to the cloud ?

Leave a Reply to CryptoDude Cancel reply

Your email address will not be published. Required fields are marked *