tahoe-chk-0.1.0.2: The Tahoe-LAFS' Content-Hash-Key (CHK) cryptographic protocol.
Safe HaskellNone
LanguageHaskell2010

Tahoe.CHK.Encrypt

Description

Support the encryption requirements of CHK.

Synopsis

Documentation

encrypt :: AESKey128 -> ByteString -> ByteString Source #

AES128-CTR encrypt a byte string in the manner used by CHK.

This replaces allmydata.immutable.upload.EncryptAnUploadable

The only noteworthy piece here is that encryption starts with the zero IV.

decrypt :: AESKey128 -> ByteString -> ByteString Source #

AES128-CTR decrypt a byte string in the manner used by CHK.