HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleHsOpenSSL-0.11.7.10Haskell2010

OpenSSL.DSA

The Digital Signature Algorithm (FIPS 186-2). See http://www.openssl.org/docs/crypto/dsa.html

  • 3 types
  • 1 class
  • 10 values
  • PackageHsOpenSSL-0.11.7.10
  • Exports14
  • LanguageHaskell2010
  • LicenceLicenseRef-PublicDomain
  • SourceDSA.hsc

Type

4 declarations
classclass DSAKey k where
#

DSAKey a is either DSAPubKey or DSAKeyPair.

Methods

Instances2DSAKey
newtypenewtype DSAPubKey
#

The type of a DSA public key, includes parameters p, q, g and public.

Instances6Eq, Ord, Show, DSAKey, PKey, PublicKey
newtypenewtype DSAKeyPair
#

The type of a DSA keypair, includes parameters p, q, g, public and private.

Instances7Eq, Ord, Show, DSAKey, PKey, KeyPair, …

Key and parameter generation

3 declarations
valuegenerateDSAParameters
  1. :: Int

    The number of bits in the generated prime: 512 <= x <= 1024

  2. -> Maybe ByteString

    optional seed, its length must be 20 bytes

  3. -> IO (Int, Int, Integer, Integer, Integer)

    (iteration count, generator count, p, q, g)

#

Generate DSA parameters (*not* a key, but required for a key). This is a compute intensive operation. See FIPS 186-2, app 2. This agrees with the test vectors given in FIP 186-2, app 5

valuegenerateDSAParametersAndKey
  1. :: Int

    The number of bits in the generated prime: 512 <= x <= 1024

  2. -> Maybe ByteString

    optional seed, its length must be 20 bytes

  3. -> IO DSAKeyPair
#

A utility function to generate both the parameters and the key pair at the same time. Saves serialising and deserialising the parameters too

Signing and verification

2 declarations

Extracting fields of DSA objects

5 declarations