Shopify / ejson

EJSON is a small library to manage encrypted secrets using asymmetric encryption.
MIT License
1.35k stars 62 forks source link

Support enryption for multiple public keys #21

Closed Nirkus closed 5 months ago

Nirkus commented 8 years ago

Hey,

would like to be able to encrypt the contents of a single ejson file for several public keys. The idea is to have a list of keys in a git repo so that everyone is able to encrpt secret files for all of the keys and add the encrypted ejson to the git repo.

In the ejson file, the value of "_public_key" could be a list of public keys instead of a single key. encrypt => encrypt for each key (encrypt symmetrically, encrypt symm. key for each public key) decrypt => try to find the private key for any of the listed public keys and decypt

Any chance to have this supported?

burke commented 8 years ago

This sounds like a reasonable proposal, and it wouldn't add too much code complexity -- I would probably accept a PR for this, but I don't have any use for it myself or much spare time to work on ejson lately.

ghost commented 5 years ago

(I get that this is a really old issue thread...but...)

@Nirkus @burke Does anyone know if this ever got done? Multiple keys?

lavoiesl commented 5 years ago

AFAIK, no work has been done on this, but we’d be happy to review patches in that direction.

thepwagner commented 5 months ago

https://github.com/getsops/sops supports this.

EJSON operates on a single key by design.