| ||||||||
| ||||||||
Description | ||||||||
Generic mode implementations useable by any correct BlockCipher instance Be aware there are no tests for CFB mode yet. See Test.Crypto. | ||||||||
Synopsis | ||||||||
Documentation | ||||||||
ecb :: BlockCipher k => k -> ByteString -> ByteString | ||||||||
unEcb :: BlockCipher k => k -> ByteString -> ByteString | ||||||||
cbc :: BlockCipher k => k -> IV k -> ByteString -> (ByteString, IV k) | ||||||||
Cipher block chaining encryption for lazy bytestrings | ||||||||
unCbc :: BlockCipher k => k -> IV k -> ByteString -> (ByteString, IV k) | ||||||||
Cipher block chaining decryption for lazy bytestrings | ||||||||
cfb :: BlockCipher k => k -> IV k -> ByteString -> (ByteString, IV k) | ||||||||
Ciphertext feed-back encryption mode for lazy bytestrings (with s == blockSize) | ||||||||
unCfb :: BlockCipher k => k -> IV k -> ByteString -> (ByteString, IV k) | ||||||||
Ciphertext feed-back decryption mode for lazy bytestrings (with s == blockSize) | ||||||||
ofb :: BlockCipher k => k -> IV k -> ByteString -> (ByteString, IV k) | ||||||||
Output feedback mode for lazy bytestrings | ||||||||
unOfb :: BlockCipher k => k -> IV k -> ByteString -> (ByteString, IV k) | ||||||||
Output feedback mode for lazy bytestrings | ||||||||
ecb' :: BlockCipher k => k -> ByteString -> ByteString | ||||||||
unEcb' :: BlockCipher k => k -> ByteString -> ByteString | ||||||||
cbc' :: BlockCipher k => k -> IV k -> ByteString -> (ByteString, IV k) | ||||||||
zipWith xor + Pack This is written intentionally to take advantage of the bytestring libraries zipWith' rewrite rule but at the extra cost of the resulting lazy bytestring being more fragmented than either of the two inputs. zipWith xor + Pack As a result of rewrite rules, this should automatically be optimized (at compile time) to use the bytestring libraries zipWith' function. Cipher block chaining encryption mode on strict bytestrings | ||||||||
unCbc' :: BlockCipher k => k -> IV k -> ByteString -> (ByteString, IV k) | ||||||||
Cipher block chaining decryption for strict bytestrings | ||||||||
cfb' :: BlockCipher k => k -> IV k -> ByteString -> (ByteString, IV k) | ||||||||
Ciphertext feed-back encryption mode for strict bytestrings (with s == blockSize) | ||||||||
unCfb' :: BlockCipher k => k -> IV k -> ByteString -> (ByteString, IV k) | ||||||||
Ciphertext feed-back decryption mode for strict bytestrings (with s == blockSize) | ||||||||
ofb' :: BlockCipher k => k -> IV k -> ByteString -> (ByteString, IV k) | ||||||||
Output feedback mode for strict bytestrings | ||||||||
unOfb' :: BlockCipher k => k -> IV k -> ByteString -> (ByteString, IV k) | ||||||||
Output feedback mode for strict bytestrings | ||||||||
data IV k | ||||||||
| ||||||||
getIV :: (BlockCipher k, CryptoRandomGen g) => g -> Either GenError (IV k, g) | ||||||||
Obtain an IV using the provided CryptoRandomGenerator. | ||||||||
getIVIO :: BlockCipher k => IO (IV k) | ||||||||
Obtain an IV using the system entropy (see System.Crypto.Random) | ||||||||
Produced by Haddock version 2.7.2 |