Represent DSA parameters namely P, G, and Q.
Modulecryptonite-0.30Haskell2010
Crypto.PubKey.DSA
An implementation of the Digital Signature Algorithm (DSA)
- 7 types
- 7 values
- Packagecryptonite-0.30
- Exports14
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceDSA.hs
Represent a DSA signature namely R and S.
Instances5Eq, Data, Read, Show, NFData
Eq SignatureDefined in cryptonite-0.30 · Crypto.PubKey.DSAData SignatureDefined in cryptonite-0.30 · Crypto.PubKey.DSARead SignatureDefined in cryptonite-0.30 · Crypto.PubKey.DSAShow SignatureDefined in cryptonite-0.30 · Crypto.PubKey.DSANFData SignatureDefined in cryptonite-0.30 · Crypto.PubKey.DSA
Represent a DSA public key.
Constructors
PublicKeypublic_params :: ParamsDSA parameters
public_y :: PublicNumberDSA public Y
Instances5Eq, Data, Read, Show, NFData
Eq PublicKeyDefined in cryptonite-0.30 · Crypto.PubKey.DSAData PublicKeyDefined in cryptonite-0.30 · Crypto.PubKey.DSARead PublicKeyDefined in cryptonite-0.30 · Crypto.PubKey.DSAShow PublicKeyDefined in cryptonite-0.30 · Crypto.PubKey.DSANFData PublicKeyDefined in cryptonite-0.30 · Crypto.PubKey.DSA
Represent a DSA private key.
Only x need to be secret. the DSA parameters are publicly shared with the other side.
Constructors
PrivateKeyprivate_params :: ParamsDSA parameters
private_x :: PrivateNumberDSA private X
Instances5Eq, Data, Read, Show, NFData
Eq PrivateKeyDefined in cryptonite-0.30 · Crypto.PubKey.DSAData PrivateKeyDefined in cryptonite-0.30 · Crypto.PubKey.DSARead PrivateKeyDefined in cryptonite-0.30 · Crypto.PubKey.DSAShow PrivateKeyDefined in cryptonite-0.30 · Crypto.PubKey.DSANFData PrivateKeyDefined in cryptonite-0.30 · Crypto.PubKey.DSA
DSA Public Number, usually embedded in DSA Public Key
DSA Private Number, usually embedded in DSA Private Key
Generation
2 declarationsgenerate a private number with no specific property this number is usually called X in DSA text.
Calculate the public number from the parameters and the private key
Signature primitive
2 declarationssign message using the private key.
signWith :: (ByteArrayAccess msg, HashAlgorithm hash)=> Integerk random number
-> PrivateKeyprivate key
-> hashhash function
-> msgmessage to sign
-> Maybe Signature
sign message using the private key and an explicit k number.
Verification primitive
1 declarationverify a bytestring using the public key.
Key pair
3 declarationsRepresent a DSA key pair
Constructors
Instances5Eq, Data, Read, Show, NFData
Public key of a DSA Key pair
Private key of a DSA Key pair