tahoe-ssk-0.3.0.0: An implementation of the Tahoe-LAFS SSK cryptographic protocols
Safe HaskellNone
LanguageHaskell2010

Tahoe.SDMF.Internal.Encrypting

Description

Implement the encryption scheme used by SDMF.

Synopsis

Documentation

randomIV :: MonadRandom m => m (Maybe SDMF_IV) Source #

Randomly generate a new IV suitable for use with the block cipher used by SDMF.

encrypt :: KeyPair -> SDMF_IV -> ByteString -> ByteString Source #

Encrypt plaintext bytes according to the scheme used for SDMF share construction.

decrypt :: Read -> SDMF_IV -> ByteString -> ByteString Source #

Decrypt ciphertext bytes according to the scheme used for SDMF share construction.

encryptWithDataKey :: Data -> ByteString -> ByteString Source #

Encrypt plaintext bytes according to the scheme used for SDMF share construction using a pre-computed data encryption key.

decryptWithDataKey :: Data -> ByteString -> ByteString Source #

Decrypt ciphertext bytes according to the scheme used for SDMF share construction using a pre-computed data encryption key.