botan-low
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.Low.PubKey.ElGamal

Description

 

Documentation

privKeyCreateElGamal Source #

Arguments

:: RNG

rng: initialized PRNG

-> Int

pbits: length of the key in bits. Must be at least 1024

-> Int

qbits: order of the subgroup. Must be at least 160

-> IO PrivKey

key: handler to the resulting key

privKeyLoadElGamal Source #

Arguments

:: MP

p: prime order of a Z_p group

-> MP

g: group generator

-> MP

x: public key

-> IO PrivKey

key: variable populated with key material

pubKeyLoadElGamal Source #

Arguments

:: MP

p: prime order of a Z_p group

-> MP

g: group generator

-> MP

y: private key

-> IO PubKey

key: variable populated with key material