2

I have collected a lot of data (approx 3TB) in photos and videos over the years, I've been upgrading to newer and bigger hard disks and luckily they've not failed on me. I've realized that my access pattern is write once and read very rarely, I think AWS Glacier is a good fit for my use-case.

At first, I thought that I'd go with their BYOK offering to encrypt my data but after doing a bit of reading it appears that BYOK has zero security benefits and is only a marketing ploy. Given that the cloud provider would have access to my key, they could theoretically (actually practically too) access my data without my consent.

Therefore I think that it would be more sensible for me to encrypt my data before I upload the data into Glacier. I've been doing some more reading and it seems that I have two choices using -

  1. Symmetric Key with AES and the like
  2. Asymmetric Key with RSA or GPG

I don't want to store the keys/password that I use on my machine for longer than I need to and am wondering if I could use a physical Yubikey to actually decrypt the data when needed.

I'm not quite sure how Yubikey fits in with the two choices and which one is better?

I plan on storing the private key/password on another cloud storage like Dropbox or so to keep them at an arms length, ideally I'd only need to access that if my Yubikey goes bad. I do realize that this may not be perfect but without being able to access the data in case of a catastrophic failure would defeat the purpose of the backup. The data will contain personal photos, videos and some documents if that matters in the choosing the appropriate strategy.

The main questions that I have are -

  1. What is the more appropriate choice for my situation?
  2. What is the right keysize for the choice? My understanding is the bigger the better. Since I don't need to access this data frequently I'm happy with the encryption/decryption taking longer.
  3. Any personal anecdotes or recommendations that you may have for me that will help me secure the data and balance security and usability?

2 Answers 2

2

it seems that I have two choices using -

  1. Symmetric Key with AES and the like
  2. Asymmetric Key with RSA or GPG

You would probably not want to use asymmetric key cryptography directly because it is very slow compared to symmetric.

Without knowing more about how your data is structured it would be hard to say exactly what the best route is.

If your data is a bunch of files then just generating a random AES key and encrypting each file using a modern AES mode (e.g., GCM not ECB, at least something that uses a random IV) seems like it could work for you.

The main questions that I have are -

  1. What is the more appropriate choice for my situation?

Symmetric.

  1. What is the right keysize for the choice? My understanding is the bigger the better. Since I don't need to access this data frequently I'm happy with the encryption/decryption taking longer.

256-bit symmetric key is likely quite big enough. e.g., AES 256.

  1. Any personal anecdotes or recommendations that you may have for me that will help me secure the data and balance security and usability?

Might be good to investigate whether the costs associated with your data security measures are reasonable in relation to the value of the data.


Update to address the comments:

If the single AES key is kept safe, then there no need for more than one as long as you use a modern AES mode that includes use of a random IV (and so that IV is different for each file).

If you are worried about keeping the single AES key safe, then you could use an alternative method (which is employed by certain ransomware as well). That method consists of: (1) Generate a single public/private key pair and keep the private key private; (2) generate a random AES key for each file; (3) Encrypt each file with its own random AES key; (4) Encrypt each random AES key with your single public key; (5) store the AES encrypted file and public-key-encrypted AES key together as one new file/blob. In this case you still have to worry about keeping the private key safe, but it is a little easier than protecting a single AES key that has to move around and exist on the actual machine doing the encryption (whereas with the asymmetric scheme only the public key has to move around).

3
  • Thanks for your answer, would you know if Yubikey plays nicely with AES?
    – nikhil
    Jul 10, 2018 at 14:13
  • Also one more clarification, do you recommend me having 1 AES pass key for the entire data or to have different keys for each file. If the latter, is there a good solution to manage this?
    – nikhil
    Jul 10, 2018 at 17:30
  • I updated the answer to address the last comment. I'm not really sure regarding the first comment
    – hft
    Jul 10, 2018 at 22:34
0

In my opinion using AWS KMS to manage your encryption keys is safe. KMS is well vetted in the security community. Compare that to the risks of managing your own encryption keys and losing them, I recommend KMS or CloudHSM every time.

Asymmetric encryption is not normally used to encrypt file based data. For this use symmetric encryption. Today AES-128 or AES-256 is fine.

These are my options having been using AWS for 12 years, 30 years in security forensics, MVP in Security and I have the AWS Security Specialty certification (along with seven other AWS certs) and a lot of my customers are government where security is highly important.

5
  • OP clearly indicates they consider the cloud provider a threat: "Given that the cloud provider would have access to my key, they could theoretically (actually practically too) access my data without my consent" Jul 18, 2018 at 21:50
  • I agree that the OP thinks that AWS could be a threat. There is an old security rule. The best kept secret is one that is never shared. If the OP really believes that AWS could access their data, then don't put the data in the cloud. No form of encryption can be proven secure against all known and unknown (meaning unpublished) technologies. Security is a balance of risk versus reward (cost). The risk of losing the encryption keys is something often overlooked. Jul 18, 2018 at 22:03
  • No generally useful form of encryption is proven secure (one time pad is but it's not very useful), but we're still pretty darn confident that AES is very difficult to break. I think it's perfectly reasonable to want to backup encrypted data to an untrusted storage provider. Jul 18, 2018 at 22:06
  • The assumption that AWS should not trusted is my point - it is my opinion that they are trusted. If his data is so valuable that someone including AWS would risk their business to get it or spend the money on court orders, there are many other ways to get his encryption keys. Let's close this thread as we will quickly go down the rabbit hole. Jul 18, 2018 at 22:11
  • Hi John, thanks for your answer. The data I'm backing up isn't sensitive but I do feel that encrypting it myself and storing the encryption keys with another provider is better. My real concern with the BYOK offering is that the marketing around it suggests that users have complete control over their encryption keys, but that's clearly not the case. AWS is the leading provider and Amazon in general is very good when it comes to customer trust and customer service respectively and I'm not questioning that here.
    – nikhil
    Jul 19, 2018 at 20:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .