-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key rotation #66
Comments
@fear1226
Rotating an encryption key in PGP usually means: creating a new encryption keypair, signing it with the certification private key and marking the old one as expired. PGP clients commonly just use the first valid encryption key on a keyring to encrypt data. So you'll need to distribute the updated keyring to the clients. However, the new private key can't decrypt data encrypted with the previous key. What exactly are you looking for? |
Thank you for your response. |
Hi, The only way I can see is to generate a new key pair and to use it instead of the previous one. |
The requirement is to decrypt my data using the latest key. If this is the only solution, considering I am using a key pair for an year after which I will create a new key pair (to manage key rotation).I need to re-encrypt the entire data I have encrypted through out the year as the new private key can't decrypt old data? |
From what I wrote above:
And from what you wrote:
I think there is a fundamental misunderstanding here. There is no way to "rotate" a key in such a way that the new key will decrypt data encrypted by the old key. You can achieve something like this in the way that Vault does it out of the box through an intermediary key. Off the top of my head, PGP encrypts data by:
In theory you might be able to achieve what you want in Vault-GPG by just rotating the key encrypting the session key (i.e. keeping the session key constant, therefor you don't need to reencrypt the data, just create a new keypair and reencrypt the session key)... but that would be a huge hack. From what you are writing, I believe that you're trying to cover some regulatory or standards rule around key rotation. I hope this helps. |
Is there a feature to rotate the key pair and use the new private key to decrypt the old data encrypted with previous key.
The text was updated successfully, but these errors were encountered: