Proposal: Adding support for key encryption with age #251
tarnacious
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In a discussion on Twitter, @AGWA suggested he'd be interested in support for key encryption with age being added to git-crypt. I offered to work on a proposal.
The motivation is to support an alternative to PGP for encrypting the file encryption key for different users. Adding support for age would allow the keys to be encrypted and decrypted with age X25519 key-pairs or with SSH key-pairs.
I see the requirements of the feature like this:
age
binary installed on the systemAn example workflow with an age key would look something like this:
An example workflow with an SSH key could look something like this:
There are some details I'm still considering, some that I need to investigate further and probably some that I'm missing.
A question that I haven't completely worked out is if there should be an option to provide a name for the key when adding a user. SSH public keys can be quite long and are not ideal to be used as part of a filename of the encrypted key. SSH public keys have the option for a comment after the key which could be used or even required as a name for the key. A name could also be useful to specify which encrypted key should be used to unlock the repository.
In the second example I assume it's possible to somehow use the ssh-agent to get the private key and pinentry just works. I assume this will be possible and additionally providing a path the to private key should be supported.
Support for encrypted age private keys should just work, I think, as long as the age pinentry works to enter the pass phrase.
I'm not sure if the full public key should be stored, I don't think this is needed now, but if it were possible to create a new file encryption key then being able to encrypt it for existing users might be useful.
I've also considered if it makes sense to support using a script to get the key. This can be useful for getting the key from the system key-chain or from a program like
pass
. This could also be added later.I'm happy to do the work to create a pull request to implement the feature, but before starting that I'd like hear on any feedback on this proposal to make sure it's in the right ball park and adjust it if needed.
Beta Was this translation helpful? Give feedback.
All reactions