-1

We do daily backup for some configuration files of many servers. Each conf file (compressed) is from 100KB to a few MB. Number of new files increased everyday is about 650. They are very important and confidential, so we encrypt each conf file with same pass phrase. However, we must change this phrase every 3 months. And old files can't be deleted, we need to re-encrypt all of them with new phrase. Currently, we have more than 300,000 files. They are stored in a network storage. It's very painful to decrypt and encrypt so many files every 3 months.

I was considering of using GPG:

  1. gen a new GPG key
  2. set a pass phrase for it, using pass phrase which is updated every 3 months
  3. encrypt every conf file use this GPG key
  4. 3 months later
  5. only change pass phrase of GPG key to latest one, no need to decrypt and encrypt all old files

But this seems insecure. All files can be decrypted use same GPG key with older pass phrase if some one have the old GPG database.

Is there any smarter way to do this kind of task? Thanks.

Backup task is running daily on one server, all encrypted files are saved to network storage. Only a few have encryption key and access to the backup server.

3
  • Hi, @zaph I replied in my post. Thanks.
    – vvoody
    Jul 12, 2016 at 7:28
  • There are a lot of questions since the usage is not described. First: Are all the files saved on the local storage of one computer? How are they accessed and decrypted? How is the access to the encryption key secured, is it shared?
    – zaph
    Jul 13, 2016 at 2:50
  • If you want better answers you need to provide a more detailed use case.
    – zaph
    Jul 13, 2016 at 12:37

2 Answers 2

0

My suggestion is to leave the data encryption the same. Create a provider on a server and all requests for the data go to that server, no other entity has the encryption key. Change the authentication to the provider server on a periodic schedule.

If the data is valuable invest in an HSM (Hardware Security Module) and use it to secure the actual encryption key. One method is for the provider server to obtain the encryption only when decryption and then only in RAM, the key is never saved in a file. Another method, if the decryption requests are not to frequent and large, is for the HSM to perform the actual encryption and decryption, then the encryption key is never available outside the HSM. HSMs start at around $500 and up in price fast. There are levels of security ranging up to tamper-responsive: detect the intrusion attempt and destroy the contents in the process.

0

This is a typical problem, so it is has a pattern solution.

Mainly you should use key "K" to encrypt the files, and this key should be stored encrypted by key "A".

key "K" should not be distributed nether accessed by anyone else then the service that can decrepit key "A"

key "A" should be rotated, so every time key "A" has changed, it should re-encrypt key "K"

So lets say, in the second month we key "A" is replaced by key "B" and so on.

1
  • Read the last sentence in the question, it is not clear but seems to say there are multimode client computers accessing the encrypted data. I tried to get a better use case from the user but that was not provided. If the encrypted files were on one server and access was only from that server your answer is good, KEKs. That does not seem to be the case. Here is what seems to be missing. The file is on server A. Client wants the decrypted data. The file is transferred to client A still encrypted. How does client A decrypt it, Key K is needed.
    – zaph
    Jul 12, 2016 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.