Copyright | (c) Leo D 2023 |
---|---|
License | BSD-3-Clause |
Maintainer | leo@apotheca.io |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Public key cryptography is a collection of techniques allowing for encryption, signatures, and key agreement.
Synopsis
- data PK
- data XMSS
- data ECGroup
- = Secp160k1
- | Secp160r1
- | Secp160r2
- | Secp192k1
- | Secp192r1
- | Secp224k1
- | Secp224r1
- | Secp256k1
- | Secp256r1
- | Secp384r1
- | Secp521r1
- | Brainpool160r1
- | Brainpool192r1
- | Brainpool224r1
- | Brainpool256r1
- | Brainpool320r1
- | Brainpool384r1
- | Brainpool512r1
- | X962_p192v2
- | X962_p192v3
- | X962_p239v1
- | X962_p239v2
- | X962_p239v3
- | Gost_256A
- | Gost_512A
- | Frp256v1
- | Sm2p256v1
- ecGroupName :: ECGroup -> ECGroupName
- data DLGroup
- = FFDHE_IETF_2048
- | FFDHE_IETF_3072
- | FFDHE_IETF_4096
- | FFDHE_IETF_6144
- | FFDHE_IETF_8192
- | MODP_IETF_1024
- | MODP_IETF_1536
- | MODP_IETF_2048
- | MODP_IETF_3072
- | MODP_IETF_4096
- | MODP_IETF_6144
- | MODP_IETF_8192
- | MODP_SRP_1024
- | MODP_SRP_1536
- | MODP_SRP_2048
- | MODP_SRP_3072
- | MODP_SRP_4096
- | MODP_SRP_6144
- | MODP_SRP_8192
- | DSA_JCE_1024
- | DSA_BOTAN_2048
- | DSA_BOTAN_3072
- dlGroupName :: DLGroup -> DLGroupName
- data PKExportFormat
- pkExportFormatFlags :: PKExportFormat -> PrivKeyExportFlags
- data PKCheckKeyFlags
- data PKPadding
- = EME_RAW
- | EME_PKCS1
- | EME_OAEP Hash (Maybe Hash) (Maybe ByteString)
- | SM2EncParam Hash
- pkPaddingName :: PKPadding -> ByteString
- newtype PrivKey = MkPrivKey {
- getPrivKeyForeignPtr :: ForeignPtr BotanPrivKeyStruct
- destroyPrivKey :: MonadIO m => PrivKey -> m ()
- newPrivKey :: MonadRandomIO m => PK -> m PrivKey
- privKeyAlgo :: PrivKey -> PK
- privKeyField :: PrivKey -> ByteString -> Maybe MP
- loadPrivKey :: ByteString -> ByteString -> Maybe PrivKey
- exportPrivKey :: PrivKey -> PKExportFormat -> ByteString
- exportPrivKeyPubKey :: PrivKey -> PubKey
- checkPrivKey :: MonadRandomIO m => PrivKey -> Bool -> m Bool
- newtype PubKey = MkPubKey {
- getPubKeyForeignPtr :: ForeignPtr BotanPubKeyStruct
- destroyPubKey :: MonadIO m => PubKey -> m ()
- pubKeyAlgo :: PubKey -> PK
- pubKeyField :: PubKey -> ByteString -> Maybe MP
- estimatedPubKeyStrength :: PubKey -> Int
- pubKeyFingerprint :: PubKey -> Hash -> ByteString
- loadPubKey :: ByteString -> Maybe PubKey
- exportPubKey :: PubKey -> PKExportFormat -> ByteString
- checkPubKey :: MonadRandomIO m => PubKey -> Bool -> m Bool
- privKeyCreatePKIO :: PK -> RNG -> IO PrivKey
Thing
Usage
Idiomatic interface
Data type
ecGroupName :: ECGroup -> ECGroupName Source #
dlGroupName :: DLGroup -> DLGroupName Source #
Enumerations
Associated types
pkExportFormatFlags :: PKExportFormat -> PrivKeyExportFlags Source #
pkPaddingName :: PKPadding -> ByteString Source #
Private Keys
Wrapped private key
MkPrivKey | |
|
Destructor
destroyPrivKey :: MonadIO m => PrivKey -> m () Source #
Initializers
newPrivKey :: MonadRandomIO m => PK -> m PrivKey Source #
Accessors
privKeyAlgo :: PrivKey -> PK Source #
privKeyField :: PrivKey -> ByteString -> Maybe MP Source #
Accessory functions
loadPrivKey :: ByteString -> ByteString -> Maybe PrivKey Source #
exportPrivKey :: PrivKey -> PKExportFormat -> ByteString Source #
exportPrivKeyPubKey :: PrivKey -> PubKey Source #
checkPrivKey :: MonadRandomIO m => PrivKey -> Bool -> m Bool Source #
Public Keys
MkPubKey | |
|
Destructor
destroyPubKey :: MonadIO m => PubKey -> m () Source #
Accessors
pubKeyAlgo :: PubKey -> PK Source #
pubKeyField :: PubKey -> ByteString -> Maybe MP Source #
estimatedPubKeyStrength :: PubKey -> Int Source #
pubKeyFingerprint :: PubKey -> Hash -> ByteString Source #
Accessory functions
loadPubKey :: ByteString -> Maybe PubKey Source #
exportPubKey :: PubKey -> PKExportFormat -> ByteString Source #
checkPubKey :: MonadRandomIO m => PubKey -> Bool -> m Bool Source #