botan-bindings
Copyright(c) 2023-2024 Apotheca Labs
(c) 2024-2025 Haskell Foundation
LicenseBSD-3-Clause
Maintainerjoris@well-typed.com, leo@apotheca.io
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageGHC2021

Botan.Bindings.PubKey.DSA

Description

 
Synopsis

Documentation

botan_privkey_create_dsa Source #

Arguments

:: Ptr BotanPrivKey

key: handler to the resulting key

-> BotanRNG

rng: initialized PRNG

-> CSize

pbits: length of the key in bits. Must be between in range (1024, 3072) and multiple of 64. Bit size of the prime p

-> CSize

qbits: qbits order of the subgroup. Must be in range (160, 256) and multiple of 8

-> IO CInt

BOTAN_FFI_SUCCESS Success, key initialized with DSA key BOTAN_FFI_ERROR_NULL_POINTER either key or rng is NULL BOTAN_FFI_ERROR_BAD_PARAMETER unexpected value for either pbits or qbits BOTAN_FFI_ERROR_NOT_IMPLEMENTED functionality not implemented

Generates DSA key pair. Gives to a caller control over key length and order of a subgroup q.