Safe Haskell | None |
---|---|
Language | Haskell2010 |
Support the encryption requirements of CHK.
Synopsis
- encrypt :: AESKey128 -> ByteString -> ByteString
- decrypt :: AESKey128 -> ByteString -> ByteString
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.