Show HN: Crypt – Secure Configuration Storage in Etcd or Consul
xordataexchange.github.io
xordataexchange.github.io
We gzip the data first, then encrypt it, finally base64 encode it.
> crypt encrypts, compresses, then encodes your value for storage
Schneier, in Applied Cryptography (which: avoid) recommended compressing before encrypting. That was bad advice. Compression and encryption interact in treacherous ways. Get of out the habit of combining them.
> compressed data should not be encrypted?
That's really tricky to answer simply. "No" might be taken to mean you should store compressed data unencrypted, which would be much worse. Nor do you have to decompress already compressed data before encrypting. But if somebody hands you data to encrypt and store, don't compress it as part of the encrypting phase.
[1] https://github.com/mailgun/vulcand
[2] http://godoc.org/code.google.com/p/go.crypto/nacl/secretbox
Looks like it takes a similar approach as the hiera eyaml project (it also encrypts on a per-key basis using gpg) which I've found to be really nice to work with in the past (as opposed to other tools that use symmetric encryption or encrypt the entire blob of all secret keys together). Glad to see a tool that does this with etcd and consul, gives the same benefits without a centralized puppetmaster.
Any plans for clients in other languages? Or if you're not planning to build would you accept PR's for them?
Ideally clients only need to store values with the following encoding base64(gpg(gzip(data))) and do the reverse when retrieving data. As long as the public/private keys are available, everything should work.
Before this was created were people just doing an encrypt/decrypt on in/out in their application code?