On Mon, Jan 16, 2017 at 10:37 PM, Joel Thompson <
jatho...@gmail.com> wrote:
> Just a thought....
>
> Rule #1 of doing crypto is: "Don't write your own crypto." That's one of the
> reasons why tools such as Vault are so valuable -- they prevent individuals
> from having to write their own crypto. And so, that's why the answer below
> is a bit unsatisfying to me, because it forces end users to write their own
> crypto.
There's a very, very large difference between "provide a
Vault-protected key to a well-tested library" and "write your own
crypto".
> While Vault can provide things such as protection of the data key or
> authentication of the key, it won't protect against easy-to-make mistakes
> such as re-using a nonce with the same key in AES GCM mode, or not comparing
> HMACs in constant time, which can substantially weaken the protections
> encryption offers
But libraries can and do.
> So, with that in mind, what about building that functionality into the Vault
> CLI? It would talk to a Vault server to generate the data key and do the
> encryption. It would talk to Vault to authenticate the ciphertext passed in,
> decrypt the data key, and then decrypt the data.
I don't expect this will land in Vault's CLI anytime soon, but it
seems like really good functionality for an easy third-party utility.
Best,
Jeff