Safe Haskell | None |
---|---|
Language | Haskell2010 |
Implement the encryption scheme used by SDMF.
Synopsis
- randomIV :: MonadRandom m => m (Maybe SDMF_IV)
- encrypt :: KeyPair -> SDMF_IV -> ByteString -> ByteString
- decrypt :: Read -> SDMF_IV -> ByteString -> ByteString
- encryptWithDataKey :: Data -> ByteString -> ByteString
- decryptWithDataKey :: Data -> ByteString -> ByteString
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.