Represent a Modified-Rabin public key.
Constructors
PublicKeypublic_size :: Intsize of key in bytes
public_n :: Integerpublic p*q
:: a typeCtrl KGHC 9.14.1 · lts/ghc-9.14.x · b2f3bfd · 2026-10-11
Modulecrypton-2.1.7Haskell2010
Modified-Rabin public-key digital signature algorithm. See algorithm 11.30 in "Handbook of Applied Cryptography" by Alfred J. Menezes et al. The Jacobi symbols here are taken modulo the public modulus, not the private primes, so what Crypto.PubKey.Rabin.Basic says about that does not apply; the note there about Integer arithmetic does.
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-2.1.7 · Crypto.PubKey.Rabin.ModifiedData PrivateKeyDefined in crypton-2.1.7 · Crypto.PubKey.Rabin.ModifiedRead PrivateKeyDefined in crypton-2.1.7 · Crypto.PubKey.Rabin.ModifiedShow PrivateKeyDefined in crypton-2.1.7 · Crypto.PubKey.Rabin.ModifiedThe public part is shown; the secret fields are not. Use debugShow to see them.
DebugShow PrivateKeyDefined in crypton-2.1.7 · 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.