perkeep/config
Filippo Valsorda f9cfd754a2 blobserver/encrypt: rewrite encryption to use NaCl and a simpler meta
NaCl offers authenticated encryption, which means that the blobstore
can't tamper with the data.  Since SHA-1 were checked one could not
change a blob outright, but could add new blobs by tampering with the
meta blobs, too.  It's true that only signed blobs should cause actions
just by being present, but we are already far too deep in the chain of
assumptions, just not to spend a bit of CPU adding a MAC.  The new
scheme is much easier to prove secure.

Also simplified the meta by removing the IV (which is in the encrypted
blob anyway) and the encrypted size (which is plaintext size + overhead).

Finally, added tests (including a storagetest) and tried to make this
sort of production-ready.

Still to do are meta compaction and a way to regenerate the meta from
the blobs, in case of meta corruption (which now we can do securely
thanks to NaCl authentication).

golang.org/x/crypto/nacl/secretbox:
golang.org/x/crypto/poly1305:
golang.org/x/crypto/salsa20/salsa:
golang.org/x/crypto/scrypt:
golang.org/x/crypto/pbkdf2:
	1e61df8d9ea476e2e1504cd9a32b40280c7c6c7e

Change-Id: I095c6204ac093f6292c7943dbb77655d2c51aba6
2017-12-29 14:16:34 -08:00
..
dev-client-dir Get rid of CAMLI_DEV_KEYBLOBS / keyblobs / etc. 2014-01-20 13:47:08 -08:00
dev-client-dir-demo Better demo setup 2014-06-02 15:55:10 +09:00
dev-blobserver-config.json serverconfig & camlistored: simplify low/high-level config bootstrapping. 2012-03-19 13:09:00 -07:00
dev-indexer-config.json serverconfig & camlistored: simplify low/high-level config bootstrapping. 2012-03-19 13:09:00 -07:00
dev-server-config.json blobserver/encrypt: rewrite encryption to use NaCl and a simpler meta 2017-12-29 14:16:34 -08:00