Represent a Modified-Rabin public key.
Constructors
PublicKeypublic_size :: Intsize of key in bytes
public_n :: Integerpublic p*q
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Modulecrypton-1.0.4Haskell2010
Modified-Rabin public-key digital signature algorithm. See algorithm 11.30 in "Handbook of Applied Cryptography" by Alfred J. Menezes et al.
Represent a Modified-Rabin public key.
PublicKeypublic_size :: Intsize of key in bytes
public_n :: Integerpublic p*q
Represent a Modified-Rabin private key.
Eq PrivateKeyDefined in crypton-1.0.4 · Crypto.PubKey.Rabin.ModifiedData PrivateKeyDefined in crypton-1.0.4 · Crypto.PubKey.Rabin.ModifiedRead PrivateKeyDefined in crypton-1.0.4 · Crypto.PubKey.Rabin.ModifiedShow PrivateKeyDefined in crypton-1.0.4 · Crypto.PubKey.Rabin.ModifiedGenerate a pair of (private, public) key of size in bytes. Prime p is congruent 3 mod 8 and prime q is congruent 7 mod 8.
sign :: HashAlgorithm hash=> PrivateKeyprivate key
-> hashhash function
-> ByteStringmessage to sign
-> Either Error IntegerSign message using hash algorithm and private key.
verify :: HashAlgorithm hash=> PublicKeypublic key
-> hashhash function
-> ByteStringmessage
-> Integersignature
-> BoolVerify signature using hash algorithm and public key.