module Botan.BlockCipher.IDEA
( IDEA(..)
, IDEASecretKey(..)
, pattern IDEASecretKey
, getIDEASecretKey
, IDEACiphertext(..)
, ideaEncrypt
, ideaDecrypt
, ideaEncryptLazy
, ideaDecryptLazy
) where

import qualified Data.ByteString as ByteString
import qualified Data.ByteString.Lazy as Lazy
import qualified Data.Text as Text

import qualified Botan.BlockCipher as Botan
import qualified Botan.Utility as Botan

import Botan.Prelude hiding (Ciphertext, LazyCiphertext)

import Botan.BlockCipher.Class
import Botan.Types.Class
import Botan.RNG

-- IDEA type

data IDEA

newtype instance SecretKey IDEA = MkIDEASecretKey GSecretKey
    deriving newtype (SecretKey IDEA -> SecretKey IDEA -> Bool
(SecretKey IDEA -> SecretKey IDEA -> Bool)
-> (SecretKey IDEA -> SecretKey IDEA -> Bool)
-> Eq (SecretKey IDEA)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SecretKey IDEA -> SecretKey IDEA -> Bool
== :: SecretKey IDEA -> SecretKey IDEA -> Bool
$c/= :: SecretKey IDEA -> SecretKey IDEA -> Bool
/= :: SecretKey IDEA -> SecretKey IDEA -> Bool
Eq, Eq (SecretKey IDEA)
Eq (SecretKey IDEA) =>
(SecretKey IDEA -> SecretKey IDEA -> Ordering)
-> (SecretKey IDEA -> SecretKey IDEA -> Bool)
-> (SecretKey IDEA -> SecretKey IDEA -> Bool)
-> (SecretKey IDEA -> SecretKey IDEA -> Bool)
-> (SecretKey IDEA -> SecretKey IDEA -> Bool)
-> (SecretKey IDEA -> SecretKey IDEA -> SecretKey IDEA)
-> (SecretKey IDEA -> SecretKey IDEA -> SecretKey IDEA)
-> Ord (SecretKey IDEA)
SecretKey IDEA -> SecretKey IDEA -> Bool
SecretKey IDEA -> SecretKey IDEA -> Ordering
SecretKey IDEA -> SecretKey IDEA -> SecretKey IDEA
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: SecretKey IDEA -> SecretKey IDEA -> Ordering
compare :: SecretKey IDEA -> SecretKey IDEA -> Ordering
$c< :: SecretKey IDEA -> SecretKey IDEA -> Bool
< :: SecretKey IDEA -> SecretKey IDEA -> Bool
$c<= :: SecretKey IDEA -> SecretKey IDEA -> Bool
<= :: SecretKey IDEA -> SecretKey IDEA -> Bool
$c> :: SecretKey IDEA -> SecretKey IDEA -> Bool
> :: SecretKey IDEA -> SecretKey IDEA -> Bool
$c>= :: SecretKey IDEA -> SecretKey IDEA -> Bool
>= :: SecretKey IDEA -> SecretKey IDEA -> Bool
$cmax :: SecretKey IDEA -> SecretKey IDEA -> SecretKey IDEA
max :: SecretKey IDEA -> SecretKey IDEA -> SecretKey IDEA
$cmin :: SecretKey IDEA -> SecretKey IDEA -> SecretKey IDEA
min :: SecretKey IDEA -> SecretKey IDEA -> SecretKey IDEA
Ord, Int -> SecretKey IDEA -> ShowS
[SecretKey IDEA] -> ShowS
SecretKey IDEA -> String
(Int -> SecretKey IDEA -> ShowS)
-> (SecretKey IDEA -> String)
-> ([SecretKey IDEA] -> ShowS)
-> Show (SecretKey IDEA)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SecretKey IDEA -> ShowS
showsPrec :: Int -> SecretKey IDEA -> ShowS
$cshow :: SecretKey IDEA -> String
show :: SecretKey IDEA -> String
$cshowList :: [SecretKey IDEA] -> ShowS
showList :: [SecretKey IDEA] -> ShowS
Show, ByteString -> Maybe (SecretKey IDEA)
SecretKey IDEA -> ByteString
(SecretKey IDEA -> ByteString)
-> (ByteString -> Maybe (SecretKey IDEA))
-> Encodable (SecretKey IDEA)
forall a.
(a -> ByteString) -> (ByteString -> Maybe a) -> Encodable a
$cencode :: SecretKey IDEA -> ByteString
encode :: SecretKey IDEA -> ByteString
$cdecode :: ByteString -> Maybe (SecretKey IDEA)
decode :: ByteString -> Maybe (SecretKey IDEA)
Encodable)

pattern IDEASecretKey :: ByteString -> SecretKey IDEA
pattern $mIDEASecretKey :: forall {r}.
SecretKey IDEA -> (ByteString -> r) -> ((# #) -> r) -> r
$bIDEASecretKey :: ByteString -> SecretKey IDEA
IDEASecretKey bytes = MkIDEASecretKey (MkGSecretKey bytes)

getIDEASecretKey :: SecretKey IDEA -> ByteString
getIDEASecretKey :: SecretKey IDEA -> ByteString
getIDEASecretKey (IDEASecretKey ByteString
bs) = ByteString
bs

type IDEASecretKey = SecretKey IDEA

newtype instance Ciphertext IDEA = MkIDEACiphertext GCiphertext
    deriving newtype (Ciphertext IDEA -> Ciphertext IDEA -> Bool
(Ciphertext IDEA -> Ciphertext IDEA -> Bool)
-> (Ciphertext IDEA -> Ciphertext IDEA -> Bool)
-> Eq (Ciphertext IDEA)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Ciphertext IDEA -> Ciphertext IDEA -> Bool
== :: Ciphertext IDEA -> Ciphertext IDEA -> Bool
$c/= :: Ciphertext IDEA -> Ciphertext IDEA -> Bool
/= :: Ciphertext IDEA -> Ciphertext IDEA -> Bool
Eq, Eq (Ciphertext IDEA)
Eq (Ciphertext IDEA) =>
(Ciphertext IDEA -> Ciphertext IDEA -> Ordering)
-> (Ciphertext IDEA -> Ciphertext IDEA -> Bool)
-> (Ciphertext IDEA -> Ciphertext IDEA -> Bool)
-> (Ciphertext IDEA -> Ciphertext IDEA -> Bool)
-> (Ciphertext IDEA -> Ciphertext IDEA -> Bool)
-> (Ciphertext IDEA -> Ciphertext IDEA -> Ciphertext IDEA)
-> (Ciphertext IDEA -> Ciphertext IDEA -> Ciphertext IDEA)
-> Ord (Ciphertext IDEA)
Ciphertext IDEA -> Ciphertext IDEA -> Bool
Ciphertext IDEA -> Ciphertext IDEA -> Ordering
Ciphertext IDEA -> Ciphertext IDEA -> Ciphertext IDEA
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: Ciphertext IDEA -> Ciphertext IDEA -> Ordering
compare :: Ciphertext IDEA -> Ciphertext IDEA -> Ordering
$c< :: Ciphertext IDEA -> Ciphertext IDEA -> Bool
< :: Ciphertext IDEA -> Ciphertext IDEA -> Bool
$c<= :: Ciphertext IDEA -> Ciphertext IDEA -> Bool
<= :: Ciphertext IDEA -> Ciphertext IDEA -> Bool
$c> :: Ciphertext IDEA -> Ciphertext IDEA -> Bool
> :: Ciphertext IDEA -> Ciphertext IDEA -> Bool
$c>= :: Ciphertext IDEA -> Ciphertext IDEA -> Bool
>= :: Ciphertext IDEA -> Ciphertext IDEA -> Bool
$cmax :: Ciphertext IDEA -> Ciphertext IDEA -> Ciphertext IDEA
max :: Ciphertext IDEA -> Ciphertext IDEA -> Ciphertext IDEA
$cmin :: Ciphertext IDEA -> Ciphertext IDEA -> Ciphertext IDEA
min :: Ciphertext IDEA -> Ciphertext IDEA -> Ciphertext IDEA
Ord, Int -> Ciphertext IDEA -> ShowS
[Ciphertext IDEA] -> ShowS
Ciphertext IDEA -> String
(Int -> Ciphertext IDEA -> ShowS)
-> (Ciphertext IDEA -> String)
-> ([Ciphertext IDEA] -> ShowS)
-> Show (Ciphertext IDEA)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Ciphertext IDEA -> ShowS
showsPrec :: Int -> Ciphertext IDEA -> ShowS
$cshow :: Ciphertext IDEA -> String
show :: Ciphertext IDEA -> String
$cshowList :: [Ciphertext IDEA] -> ShowS
showList :: [Ciphertext IDEA] -> ShowS
Show, ByteString -> Maybe (Ciphertext IDEA)
Ciphertext IDEA -> ByteString
(Ciphertext IDEA -> ByteString)
-> (ByteString -> Maybe (Ciphertext IDEA))
-> Encodable (Ciphertext IDEA)
forall a.
(a -> ByteString) -> (ByteString -> Maybe a) -> Encodable a
$cencode :: Ciphertext IDEA -> ByteString
encode :: Ciphertext IDEA -> ByteString
$cdecode :: ByteString -> Maybe (Ciphertext IDEA)
decode :: ByteString -> Maybe (Ciphertext IDEA)
Encodable)

pattern IDEACiphertext :: ByteString -> Ciphertext IDEA
pattern $mIDEACiphertext :: forall {r}.
Ciphertext IDEA -> (ByteString -> r) -> ((# #) -> r) -> r
$bIDEACiphertext :: ByteString -> Ciphertext IDEA
IDEACiphertext bs = MkIDEACiphertext (MkGCiphertext bs)

getIDEACiphertext :: Ciphertext IDEA -> ByteString
getIDEACiphertext :: Ciphertext IDEA -> ByteString
getIDEACiphertext (IDEACiphertext ByteString
bs) = ByteString
bs

type IDEACiphertext = Ciphertext IDEA

newtype instance LazyCiphertext IDEA = MkIDEALazyCiphertext GLazyCiphertext
    deriving newtype (LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
(LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool)
-> (LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool)
-> Eq (LazyCiphertext IDEA)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
== :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
$c/= :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
/= :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
Eq, Eq (LazyCiphertext IDEA)
Eq (LazyCiphertext IDEA) =>
(LazyCiphertext IDEA -> LazyCiphertext IDEA -> Ordering)
-> (LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool)
-> (LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool)
-> (LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool)
-> (LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool)
-> (LazyCiphertext IDEA
    -> LazyCiphertext IDEA -> LazyCiphertext IDEA)
-> (LazyCiphertext IDEA
    -> LazyCiphertext IDEA -> LazyCiphertext IDEA)
-> Ord (LazyCiphertext IDEA)
LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
LazyCiphertext IDEA -> LazyCiphertext IDEA -> Ordering
LazyCiphertext IDEA -> LazyCiphertext IDEA -> LazyCiphertext IDEA
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Ordering
compare :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Ordering
$c< :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
< :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
$c<= :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
<= :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
$c> :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
> :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
$c>= :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
>= :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> Bool
$cmax :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> LazyCiphertext IDEA
max :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> LazyCiphertext IDEA
$cmin :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> LazyCiphertext IDEA
min :: LazyCiphertext IDEA -> LazyCiphertext IDEA -> LazyCiphertext IDEA
Ord, Int -> LazyCiphertext IDEA -> ShowS
[LazyCiphertext IDEA] -> ShowS
LazyCiphertext IDEA -> String
(Int -> LazyCiphertext IDEA -> ShowS)
-> (LazyCiphertext IDEA -> String)
-> ([LazyCiphertext IDEA] -> ShowS)
-> Show (LazyCiphertext IDEA)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LazyCiphertext IDEA -> ShowS
showsPrec :: Int -> LazyCiphertext IDEA -> ShowS
$cshow :: LazyCiphertext IDEA -> String
show :: LazyCiphertext IDEA -> String
$cshowList :: [LazyCiphertext IDEA] -> ShowS
showList :: [LazyCiphertext IDEA] -> ShowS
Show, ByteString -> Maybe (LazyCiphertext IDEA)
LazyCiphertext IDEA -> ByteString
(LazyCiphertext IDEA -> ByteString)
-> (ByteString -> Maybe (LazyCiphertext IDEA))
-> Encodable (LazyCiphertext IDEA)
forall a.
(a -> ByteString) -> (ByteString -> Maybe a) -> Encodable a
$cencode :: LazyCiphertext IDEA -> ByteString
encode :: LazyCiphertext IDEA -> ByteString
$cdecode :: ByteString -> Maybe (LazyCiphertext IDEA)
decode :: ByteString -> Maybe (LazyCiphertext IDEA)
Encodable, Encodable (LazyCiphertext IDEA)
ByteString -> Maybe (LazyCiphertext IDEA)
LazyCiphertext IDEA -> ByteString
Encodable (LazyCiphertext IDEA) =>
(LazyCiphertext IDEA -> ByteString)
-> (ByteString -> Maybe (LazyCiphertext IDEA))
-> LazyEncodable (LazyCiphertext IDEA)
forall a.
Encodable a =>
(a -> ByteString) -> (ByteString -> Maybe a) -> LazyEncodable a
$cencodeLazy :: LazyCiphertext IDEA -> ByteString
encodeLazy :: LazyCiphertext IDEA -> ByteString
$cdecodeLazy :: ByteString -> Maybe (LazyCiphertext IDEA)
decodeLazy :: ByteString -> Maybe (LazyCiphertext IDEA)
LazyEncodable)

pattern IDEALazyCiphertext :: Lazy.ByteString -> LazyCiphertext IDEA
pattern $mIDEALazyCiphertext :: forall {r}.
LazyCiphertext IDEA -> (ByteString -> r) -> ((# #) -> r) -> r
$bIDEALazyCiphertext :: ByteString -> LazyCiphertext IDEA
IDEALazyCiphertext lbs = MkIDEALazyCiphertext (MkGLazyCiphertext lbs)

getIDEALazyCiphertext :: LazyCiphertext IDEA -> Lazy.ByteString
getIDEALazyCiphertext :: LazyCiphertext IDEA -> ByteString
getIDEALazyCiphertext (IDEALazyCiphertext ByteString
bs) = ByteString
bs

type IDEALazyCiphertext = LazyCiphertext IDEA

instance HasSecretKey IDEA where
    
    secretKeySpec :: SizeSpecifier (SecretKey IDEA)
    secretKeySpec :: SizeSpecifier (SecretKey IDEA)
secretKeySpec = SizeSpecifier () -> SizeSpecifier (SecretKey IDEA)
forall a b. SizeSpecifier a -> SizeSpecifier b
coerceSizeSpec (SizeSpecifier () -> SizeSpecifier (SecretKey IDEA))
-> SizeSpecifier () -> SizeSpecifier (SecretKey IDEA)
forall a b. (a -> b) -> a -> b
$ BlockCipher -> SizeSpecifier ()
Botan.blockCipherKeySpec BlockCipher
Botan.idea

instance (MonadRandomIO m )=> SecretKeyGen IDEA m where

    newSecretKey :: MonadRandomIO m => m (SecretKey IDEA)
    newSecretKey :: MonadRandomIO m => m (SecretKey IDEA)
newSecretKey = ByteString -> SecretKey IDEA
IDEASecretKey (ByteString -> SecretKey IDEA)
-> m ByteString -> m (SecretKey IDEA)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> SizeSpecifier (SecretKey IDEA) -> m ByteString
forall (m :: * -> *) a.
MonadRandomIO m =>
SizeSpecifier a -> m ByteString
newSized (forall alg. HasSecretKey alg => SizeSpecifier (SecretKey alg)
secretKeySpec @IDEA)
    
    newSecretKeyMaybe :: MonadRandomIO m => Int -> m (Maybe (SecretKey IDEA))
    newSecretKeyMaybe :: MonadRandomIO m => Int -> m (Maybe (SecretKey IDEA))
newSecretKeyMaybe Int
i = (ByteString -> SecretKey IDEA)
-> Maybe ByteString -> Maybe (SecretKey IDEA)
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ByteString -> SecretKey IDEA
IDEASecretKey (Maybe ByteString -> Maybe (SecretKey IDEA))
-> m (Maybe ByteString) -> m (Maybe (SecretKey IDEA))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> SizeSpecifier (SecretKey IDEA) -> Int -> m (Maybe ByteString)
forall (m :: * -> *) a.
MonadRandomIO m =>
SizeSpecifier a -> Int -> m (Maybe ByteString)
newSizedMaybe (forall alg. HasSecretKey alg => SizeSpecifier (SecretKey alg)
secretKeySpec @IDEA) Int
i

instance HasCiphertext IDEA where

instance BlockCipher IDEA where

    blockCipherEncrypt :: SecretKey IDEA -> ByteString -> Maybe (Ciphertext IDEA)
    blockCipherEncrypt :: SecretKey IDEA -> ByteString -> Maybe (Ciphertext IDEA)
blockCipherEncrypt (IDEASecretKey ByteString
k) = (ByteString -> Ciphertext IDEA)
-> Maybe ByteString -> Maybe (Ciphertext IDEA)
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ByteString -> Ciphertext IDEA
IDEACiphertext (Maybe ByteString -> Maybe (Ciphertext IDEA))
-> (ByteString -> Maybe ByteString)
-> ByteString
-> Maybe (Ciphertext IDEA)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BlockCipher -> ByteString -> ByteString -> Maybe ByteString
Botan.blockCipherEncrypt BlockCipher
Botan.idea ByteString
k

    blockCipherDecrypt :: SecretKey IDEA -> Ciphertext IDEA -> Maybe ByteString
    blockCipherDecrypt :: SecretKey IDEA -> Ciphertext IDEA -> Maybe ByteString
blockCipherDecrypt (IDEASecretKey ByteString
k) (IDEACiphertext ByteString
ct) = BlockCipher -> ByteString -> ByteString -> Maybe ByteString
Botan.blockCipherDecrypt BlockCipher
Botan.idea ByteString
k ByteString
ct

instance HasLazyCiphertext IDEA where

instance IncrementalBlockCipher IDEA where

    blockCipherEncryptLazy :: SecretKey IDEA -> Lazy.ByteString -> Maybe (LazyCiphertext IDEA)
    blockCipherEncryptLazy :: SecretKey IDEA -> ByteString -> Maybe (LazyCiphertext IDEA)
blockCipherEncryptLazy (IDEASecretKey ByteString
k) = (ByteString -> LazyCiphertext IDEA)
-> Maybe ByteString -> Maybe (LazyCiphertext IDEA)
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ByteString -> LazyCiphertext IDEA
IDEALazyCiphertext (Maybe ByteString -> Maybe (LazyCiphertext IDEA))
-> (ByteString -> Maybe ByteString)
-> ByteString
-> Maybe (LazyCiphertext IDEA)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BlockCipher -> ByteString -> ByteString -> Maybe ByteString
Botan.blockCipherEncryptLazy BlockCipher
Botan.idea ByteString
k

    blockCipherDecryptLazy :: SecretKey IDEA -> LazyCiphertext IDEA -> Maybe Lazy.ByteString
    blockCipherDecryptLazy :: SecretKey IDEA -> LazyCiphertext IDEA -> Maybe ByteString
blockCipherDecryptLazy (IDEASecretKey ByteString
k) (IDEALazyCiphertext ByteString
ct) = BlockCipher -> ByteString -> ByteString -> Maybe ByteString
Botan.blockCipherDecryptLazy BlockCipher
Botan.idea ByteString
k ByteString
ct

-- IDEA blockCipher

ideaEncrypt :: SecretKey IDEA -> ByteString -> Maybe IDEACiphertext
ideaEncrypt :: SecretKey IDEA -> ByteString -> Maybe (Ciphertext IDEA)
ideaEncrypt = SecretKey IDEA -> ByteString -> Maybe (Ciphertext IDEA)
forall bc.
BlockCipher bc =>
SecretKey bc -> ByteString -> Maybe (Ciphertext bc)
blockCipherEncrypt

ideaDecrypt :: SecretKey IDEA -> IDEACiphertext -> Maybe ByteString
ideaDecrypt :: SecretKey IDEA -> Ciphertext IDEA -> Maybe ByteString
ideaDecrypt = SecretKey IDEA -> Ciphertext IDEA -> Maybe ByteString
forall bc.
BlockCipher bc =>
SecretKey bc -> Ciphertext bc -> Maybe ByteString
blockCipherDecrypt

ideaEncryptLazy :: SecretKey IDEA -> Lazy.ByteString -> Maybe IDEALazyCiphertext
ideaEncryptLazy :: SecretKey IDEA -> ByteString -> Maybe (LazyCiphertext IDEA)
ideaEncryptLazy = SecretKey IDEA -> ByteString -> Maybe (LazyCiphertext IDEA)
forall bc.
IncrementalBlockCipher bc =>
SecretKey bc -> ByteString -> Maybe (LazyCiphertext bc)
blockCipherEncryptLazy

ideaDecryptLazy :: SecretKey IDEA -> IDEALazyCiphertext -> Maybe Lazy.ByteString
ideaDecryptLazy :: SecretKey IDEA -> LazyCiphertext IDEA -> Maybe ByteString
ideaDecryptLazy = SecretKey IDEA -> LazyCiphertext IDEA -> Maybe ByteString
forall bc.
IncrementalBlockCipher bc =>
SecretKey bc -> LazyCiphertext bc -> Maybe ByteString
blockCipherDecryptLazy