On Thu, Apr 28, 2016 at 1:24 PM, Gordon Cassie <
gordon...@gmail.com> wrote:
> I believe in another thread it was mentioned that transit is not really
> optimized for file encryption. Would this work with any size file? I assume
> performance would not be sufficient to stream decrypted files back to a
> client (for example in a file server type application)?
It's not optimized in the sense that you're round-tripping entire
files over the network. The AES encryption speed is pretty good,
especially with Go 1.6+ (in Vault 0.5.1+), but encoding many large
files just means a lot of data being sent back and forth. Also,
streaming isn't supported, unless you implement it yourself -- each
call is a discrete block of data to be encrypted or unencrypted.
Generally when people want to encrypt lots of large files we recommend
the datakey approach -- have transit generate a datakey wrapped by a
transit key. You can store the encrypted copy of the datakey with your
data and unwrap it with a single call to transit as needed, then using
the unwrapped key to perform encryption/decryption locally, without
persisting the unwrapped key to disk.
Best,
Jeff