Copyright | (c) Leo D 2023 |
---|---|
License | BSD-3-Clause |
Maintainer | leo@apotheca.io |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Public key cryptography is a collection of techniques allowing for encryption, signatures, and key agreement.
Synopsis
- data BotanPrivKeyStruct
- newtype BotanPrivKey = MkBotanPrivKey {}
- botan_privkey_destroy :: FinalizerPtr BotanPrivKeyStruct
- pattern BOTAN_PK_RSA :: (Eq a, IsString a) => a
- pattern BOTAN_PK_SM2 :: (Eq a, IsString a) => a
- pattern BOTAN_PK_ELGAMAL :: (Eq a, IsString a) => a
- pattern BOTAN_PK_DSA :: (Eq a, IsString a) => a
- pattern BOTAN_PK_ECDSA :: (Eq a, IsString a) => a
- pattern BOTAN_PK_ECKCDSA :: (Eq a, IsString a) => a
- pattern BOTAN_PK_ECGDSA :: (Eq a, IsString a) => a
- pattern BOTAN_PK_GOST_34_10 :: (Eq a, IsString a) => a
- pattern BOTAN_PK_ED25519 :: (Eq a, IsString a) => a
- pattern BOTAN_PK_XMSS :: (Eq a, IsString a) => a
- pattern BOTAN_PK_DH :: (Eq a, IsString a) => a
- pattern BOTAN_PK_ECDH :: (Eq a, IsString a) => a
- pattern BOTAN_PK_CURVE25519 :: (Eq a, IsString a) => a
- pattern BOTAN_PK_DILITHIUM :: (Eq a, IsString a) => a
- pattern BOTAN_PK_KYBER :: (Eq a, IsString a) => a
- pattern BOTAN_PK_MCELIECE :: (Eq a, IsString a) => a
- pattern BOTAN_XMSS_SHA2_10_256 :: (Eq a, IsString a) => a
- pattern BOTAN_XMSS_SHA2_16_256 :: (Eq a, IsString a) => a
- pattern BOTAN_XMSS_SHA2_20_256 :: (Eq a, IsString a) => a
- pattern BOTAN_XMSS_SHA2_10_512 :: (Eq a, IsString a) => a
- pattern BOTAN_XMSS_SHA2_16_512 :: (Eq a, IsString a) => a
- pattern BOTAN_XMSS_SHA2_20_512 :: (Eq a, IsString a) => a
- pattern BOTAN_XMSS_SHAKE_10_256 :: (Eq a, IsString a) => a
- pattern BOTAN_XMSS_SHAKE_16_256 :: (Eq a, IsString a) => a
- pattern BOTAN_XMSS_SHAKE_20_256 :: (Eq a, IsString a) => a
- pattern BOTAN_XMSS_SHAKE_10_512 :: (Eq a, IsString a) => a
- pattern BOTAN_XMSS_SHAKE_16_512 :: (Eq a, IsString a) => a
- pattern BOTAN_XMSS_SHAKE_20_512 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_SECP_160_K1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_SECP_160_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_SECP_160_R2 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_SECP_192_K1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_SECP_192_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_SECP_224_K1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_SECP_224_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_SECP_256_K1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_SECP_256_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_SECP_384_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_SECP_521_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_BRAINPOOL_160_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_BRAINPOOL_192_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_BRAINPOOL_224_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_BRAINPOOL_256_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_BRAINPOOL_320_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_BRAINPOOL_384_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_BRAINPOOL_512_R1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_X962_P192_V2 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_X962_P192_V3 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_X962_P239_V1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_X962_P239_V2 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_X962_P239_V3 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_GOST_256A :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_GOST_512A :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_FRP_256_V1 :: (Eq a, IsString a) => a
- pattern BOTAN_ECGROUP_SM2_P256_V1 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_FFDHE_IETF_2048 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_FFDHE_IETF_3072 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_FFDHE_IETF_4096 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_FFDHE_IETF_6144 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_FFDHE_IETF_8192 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_IETF_1024 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_IETF_1536 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_IETF_2048 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_IETF_3072 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_IETF_4096 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_IETF_6144 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_IETF_8192 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_SRP_1024 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_SRP_1536 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_SRP_2048 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_SRP_3072 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_SRP_4096 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_SRP_6144 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_MODP_SRP_8192 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_DSA_JCE_1024 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_DSA_BOTAN_2048 :: (Eq a, IsString a) => a
- pattern BOTAN_DLGROUP_DSA_BOTAN_3072 :: (Eq a, IsString a) => a
- pattern BOTAN_EME_RAW :: (Eq a, IsString a) => a
- pattern BOTAN_EME_PKCS1_v1_5 :: (Eq a, IsString a) => a
- pattern BOTAN_EME_OAEP :: (Eq a, IsString a) => a
- pattern BOTAN_MGF_MGF1 :: (Eq a, IsString a) => a
- botan_privkey_create :: Ptr BotanPrivKey -> ConstPtr CChar -> ConstPtr CChar -> BotanRNG -> IO CInt
- pattern BOTAN_CHECK_KEY_NORMAL_TESTS :: (Eq a, Num a) => a
- pattern BOTAN_CHECK_KEY_EXPENSIVE_TESTS :: (Eq a, Num a) => a
- botan_privkey_check_key :: BotanPrivKey -> BotanRNG -> Word32 -> IO CInt
- botan_privkey_load :: Ptr BotanPrivKey -> BotanRNG -> ConstPtr Word8 -> CSize -> ConstPtr CChar -> IO CInt
- pattern BOTAN_PRIVKEY_EXPORT_FLAG_DER :: (Eq a, Num a) => a
- pattern BOTAN_PRIVKEY_EXPORT_FLAG_PEM :: (Eq a, Num a) => a
- botan_privkey_export :: BotanPrivKey -> Ptr Word8 -> Ptr CSize -> Word32 -> IO CInt
- botan_privkey_view_der :: BotanPrivKey -> BotanViewContext ctx -> FunPtr (BotanViewBinCallback ctx) -> IO CInt
- botan_privkey_view_pem :: BotanPrivKey -> BotanViewContext ctx -> FunPtr (BotanViewStrCallback ctx) -> IO CInt
- botan_privkey_algo_name :: BotanPrivKey -> Ptr CChar -> Ptr CSize -> IO CInt
- botan_privkey_export_encrypted_pbkdf_msec :: BotanPrivKey -> Ptr Word8 -> Ptr CSize -> BotanRNG -> ConstPtr CChar -> Word32 -> Ptr CSize -> ConstPtr CChar -> ConstPtr CChar -> Word32 -> IO CInt
- botan_privkey_export_encrypted_pbkdf_iter :: BotanPrivKey -> Ptr Word8 -> Ptr CSize -> BotanRNG -> ConstPtr CChar -> CSize -> ConstPtr CChar -> ConstPtr CChar -> Word32 -> IO CInt
- botan_privkey_view_encrypted_der :: BotanPrivKey -> BotanRNG -> ConstPtr CChar -> ConstPtr CChar -> ConstPtr CChar -> CSize -> BotanViewContext ctx -> FunPtr (BotanViewBinCallback ctx) -> IO CInt
- botan_privkey_view_encrypted_der_timed :: BotanPrivKey -> BotanRNG -> ConstPtr CChar -> ConstPtr CChar -> ConstPtr CChar -> CSize -> BotanViewContext ctx -> FunPtr (BotanViewBinCallback ctx) -> IO CInt
- botan_privkey_view_encrypted_pem :: BotanPrivKey -> BotanRNG -> ConstPtr CChar -> ConstPtr CChar -> ConstPtr CChar -> CSize -> BotanViewContext ctx -> FunPtr (BotanViewStrCallback ctx) -> IO CInt
- botan_privkey_view_encrypted_pem_timed :: BotanPrivKey -> BotanRNG -> ConstPtr CChar -> ConstPtr CChar -> ConstPtr CChar -> CSize -> BotanViewContext ctx -> FunPtr (BotanViewStrCallback ctx) -> IO CInt
- botan_privkey_get_field :: BotanMP -> BotanPrivKey -> ConstPtr CChar -> IO CInt
- data BotanPubKeyStruct
- newtype BotanPubKey = MkBotanPubKey {}
- botan_pubkey_destroy :: FinalizerPtr BotanPubKeyStruct
- botan_privkey_export_pubkey :: Ptr BotanPubKey -> BotanPrivKey -> IO CInt
- botan_pubkey_load :: Ptr BotanPubKey -> ConstPtr Word8 -> CSize -> IO CInt
- pattern BOTAN_PUBKEY_EXPORT_FLAG_DER :: (Eq a, Num a) => a
- pattern BOTAN_PUBKEY_EXPORT_FLAG_PEM :: (Eq a, Num a) => a
- botan_pubkey_export :: BotanPubKey -> Ptr Word8 -> Ptr CSize -> Word32 -> IO CInt
- botan_pubkey_view_der :: BotanPubKey -> BotanViewContext ctx -> FunPtr (BotanViewBinCallback ctx) -> IO CInt
- botan_pubkey_view_pem :: BotanPubKey -> BotanViewContext ctx -> FunPtr (BotanViewStrCallback ctx) -> IO CInt
- botan_pubkey_algo_name :: BotanPubKey -> Ptr CChar -> Ptr CSize -> IO CInt
- botan_pubkey_check_key :: BotanPubKey -> BotanRNG -> Word32 -> IO CInt
- botan_pubkey_estimated_strength :: BotanPubKey -> Ptr CSize -> IO CInt
- botan_pubkey_fingerprint :: BotanPubKey -> ConstPtr CChar -> Ptr Word8 -> Ptr CSize -> IO CInt
- botan_pubkey_get_field :: BotanMP -> BotanPubKey -> ConstPtr CChar -> IO CInt
- botan_pubkey_view_ec_public_point :: BotanPubKey -> BotanViewContext ctx -> FunPtr (BotanViewBinCallback ctx) -> IO CInt
Documentation
data BotanPrivKeyStruct Source #
Opaque PrivKey struct
newtype BotanPrivKey Source #
Botan PrivKey object
Instances
botan_privkey_destroy :: FinalizerPtr BotanPrivKeyStruct Source #
Frees all resources of the PrivKey object
pattern BOTAN_PK_RSA :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_SM2 :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_ELGAMAL :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_DSA :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_ECDSA :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_ECKCDSA :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_ECGDSA :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_GOST_34_10 :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_ED25519 :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_XMSS :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_DH :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_ECDH :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_CURVE25519 :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_DILITHIUM :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_KYBER :: (Eq a, IsString a) => a Source #
pattern BOTAN_PK_MCELIECE :: (Eq a, IsString a) => a Source #
pattern BOTAN_XMSS_SHA2_10_256 :: (Eq a, IsString a) => a Source #
pattern BOTAN_XMSS_SHA2_16_256 :: (Eq a, IsString a) => a Source #
pattern BOTAN_XMSS_SHA2_20_256 :: (Eq a, IsString a) => a Source #
pattern BOTAN_XMSS_SHA2_10_512 :: (Eq a, IsString a) => a Source #
pattern BOTAN_XMSS_SHA2_16_512 :: (Eq a, IsString a) => a Source #
pattern BOTAN_XMSS_SHA2_20_512 :: (Eq a, IsString a) => a Source #
pattern BOTAN_XMSS_SHAKE_10_256 :: (Eq a, IsString a) => a Source #
pattern BOTAN_XMSS_SHAKE_16_256 :: (Eq a, IsString a) => a Source #
pattern BOTAN_XMSS_SHAKE_20_256 :: (Eq a, IsString a) => a Source #
pattern BOTAN_XMSS_SHAKE_10_512 :: (Eq a, IsString a) => a Source #
pattern BOTAN_XMSS_SHAKE_16_512 :: (Eq a, IsString a) => a Source #
pattern BOTAN_XMSS_SHAKE_20_512 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_SECP_160_K1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_SECP_160_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_SECP_160_R2 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_SECP_192_K1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_SECP_192_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_SECP_224_K1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_SECP_224_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_SECP_256_K1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_SECP_256_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_SECP_384_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_SECP_521_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_BRAINPOOL_160_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_BRAINPOOL_192_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_BRAINPOOL_224_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_BRAINPOOL_256_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_BRAINPOOL_320_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_BRAINPOOL_384_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_BRAINPOOL_512_R1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_X962_P192_V2 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_X962_P192_V3 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_X962_P239_V1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_X962_P239_V2 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_X962_P239_V3 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_GOST_256A :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_GOST_512A :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_FRP_256_V1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_ECGROUP_SM2_P256_V1 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_FFDHE_IETF_2048 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_FFDHE_IETF_3072 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_FFDHE_IETF_4096 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_FFDHE_IETF_6144 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_FFDHE_IETF_8192 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_IETF_1024 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_IETF_1536 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_IETF_2048 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_IETF_3072 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_IETF_4096 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_IETF_6144 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_IETF_8192 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_SRP_1024 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_SRP_1536 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_SRP_2048 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_SRP_3072 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_SRP_4096 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_SRP_6144 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_MODP_SRP_8192 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_DSA_JCE_1024 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_DSA_BOTAN_2048 :: (Eq a, IsString a) => a Source #
pattern BOTAN_DLGROUP_DSA_BOTAN_3072 :: (Eq a, IsString a) => a Source #
pattern BOTAN_EME_RAW :: (Eq a, IsString a) => a Source #
pattern BOTAN_EME_PKCS1_v1_5 :: (Eq a, IsString a) => a Source #
pattern BOTAN_EME_OAEP :: (Eq a, IsString a) => a Source #
pattern BOTAN_MGF_MGF1 :: (Eq a, IsString a) => a Source #
:: Ptr BotanPrivKey | key: the new object will be placed here |
-> ConstPtr CChar | |
-> ConstPtr CChar | algo_params: is specific to the algorithm. For RSA, specifies the modulus bit length. For ECC is the name of the curve. |
-> BotanRNG | rng: a random number generator |
-> IO CInt |
Create a new private key
pattern BOTAN_CHECK_KEY_NORMAL_TESTS :: (Eq a, Num a) => a Source #
pattern BOTAN_CHECK_KEY_EXPENSIVE_TESTS :: (Eq a, Num a) => a Source #
botan_privkey_check_key Source #
:: BotanPrivKey | key |
-> BotanRNG | rng |
-> Word32 | flags |
-> IO CInt |
Check the validity of a private key
:: Ptr BotanPrivKey | key |
-> BotanRNG | rng |
-> ConstPtr Word8 | bits[] |
-> CSize | len |
-> ConstPtr CChar | password |
-> IO CInt |
Input currently assumed to be PKCS #8 structure; Set password to NULL to indicate no encryption expected Starting in 2.8.0, the rng parameter is unused and may be set to null
pattern BOTAN_PRIVKEY_EXPORT_FLAG_DER :: (Eq a, Num a) => a Source #
pattern BOTAN_PRIVKEY_EXPORT_FLAG_PEM :: (Eq a, Num a) => a Source #
On input *out_len is number of bytes in out[] On output *out_len is number of bytes written (or required) If out is not big enough no output is written, *out_len is set and 1 is returned Returns 0 on success and sets If some other error occurs a negative integer is returned.
botan_privkey_view_der Source #
:: BotanPrivKey | key |
-> BotanViewContext ctx | ctx |
-> FunPtr (BotanViewBinCallback ctx) | view |
-> IO CInt |
View the private key's DER encoding
botan_privkey_view_pem Source #
:: BotanPrivKey | key |
-> BotanViewContext ctx | ctx |
-> FunPtr (BotanViewStrCallback ctx) | view |
-> IO CInt |
View the private key's PEM encoding
botan_privkey_export_encrypted_pbkdf_msec Source #
:: BotanPrivKey | key |
-> Ptr Word8 | out[] |
-> Ptr CSize | out_len |
-> BotanRNG | rng |
-> ConstPtr CChar | passphrase |
-> Word32 | pbkdf_msec_runtime |
-> Ptr CSize | pbkdf_iterations_out |
-> ConstPtr CChar | cipher_algo |
-> ConstPtr CChar | pbkdf_algo |
-> Word32 | flags |
-> IO CInt |
Export a private key, running PBKDF for specified amount of time
Note: starting in 3.0, the output iterations count is not provided
botan_privkey_export_encrypted_pbkdf_iter Source #
:: BotanPrivKey | key |
-> Ptr Word8 | out[] |
-> Ptr CSize | out_len |
-> BotanRNG | rng |
-> ConstPtr CChar | passphrase |
-> CSize | pbkdf_iterations |
-> ConstPtr CChar | cipher_algo |
-> ConstPtr CChar | pbkdf_algo |
-> Word32 | flags |
-> IO CInt |
Export a private key using the specified number of iterations.
botan_privkey_view_encrypted_der Source #
:: BotanPrivKey | key |
-> BotanRNG | rng |
-> ConstPtr CChar | passphrase |
-> ConstPtr CChar | cipher_algo |
-> ConstPtr CChar | pbkdf_algo |
-> CSize | pbkdf_iterations |
-> BotanViewContext ctx | ctx |
-> FunPtr (BotanViewBinCallback ctx) | view |
-> IO CInt |
View the encryption of a private key (binary DER encoding)
Set cipher_algo, pbkdf_algo to NULL to use defaults Set pbkdf_iterations to 0 to use defaults
botan_privkey_view_encrypted_der_timed Source #
:: BotanPrivKey | key |
-> BotanRNG | rng |
-> ConstPtr CChar | passphrase |
-> ConstPtr CChar | cipher_algo |
-> ConstPtr CChar | pbkdf_algo |
-> CSize | pbkdf_runtime_msec |
-> BotanViewContext ctx | ctx |
-> FunPtr (BotanViewBinCallback ctx) | view |
-> IO CInt |
View the encryption of a private key (binary DER encoding)
Set cipher_algo, pbkdf_algo to NULL to use defaults
botan_privkey_view_encrypted_pem Source #
:: BotanPrivKey | key |
-> BotanRNG | rng |
-> ConstPtr CChar | passphrase |
-> ConstPtr CChar | cipher_algo |
-> ConstPtr CChar | pbkdf_algo |
-> CSize | pbkdf_iterations |
-> BotanViewContext ctx | ctx |
-> FunPtr (BotanViewStrCallback ctx) | view |
-> IO CInt |
View the encryption of a private key (PEM encoding)
Set cipher_algo, pbkdf_algo to NULL to use defaults Set pbkdf_iterations to 0 to use defaults
botan_privkey_view_encrypted_pem_timed Source #
:: BotanPrivKey | key |
-> BotanRNG | rng |
-> ConstPtr CChar | passphrase |
-> ConstPtr CChar | cipher_algo |
-> ConstPtr CChar | pbkdf_algo |
-> CSize | pbkdf_runtime_msec |
-> BotanViewContext ctx | ctx |
-> FunPtr (BotanViewStrCallback ctx) | view |
-> IO CInt |
View the encryption of a private key (PEM encoding)
Set cipher_algo, pbkdf_algo to NULL to use defaults
data BotanPubKeyStruct Source #
Opaque PubKey struct
newtype BotanPubKey Source #
Botan PubKey object
Instances
Storable BotanPubKey Source # | |
Defined in Botan.Bindings.PubKey sizeOf :: BotanPubKey -> Int # alignment :: BotanPubKey -> Int # peekElemOff :: Ptr BotanPubKey -> Int -> IO BotanPubKey # pokeElemOff :: Ptr BotanPubKey -> Int -> BotanPubKey -> IO () # peekByteOff :: Ptr b -> Int -> IO BotanPubKey # pokeByteOff :: Ptr b -> Int -> BotanPubKey -> IO () # peek :: Ptr BotanPubKey -> IO BotanPubKey # poke :: Ptr BotanPubKey -> BotanPubKey -> IO () # | |
Eq BotanPubKey Source # | |
Defined in Botan.Bindings.PubKey (==) :: BotanPubKey -> BotanPubKey -> Bool # (/=) :: BotanPubKey -> BotanPubKey -> Bool # | |
Ord BotanPubKey Source # | |
Defined in Botan.Bindings.PubKey compare :: BotanPubKey -> BotanPubKey -> Ordering # (<) :: BotanPubKey -> BotanPubKey -> Bool # (<=) :: BotanPubKey -> BotanPubKey -> Bool # (>) :: BotanPubKey -> BotanPubKey -> Bool # (>=) :: BotanPubKey -> BotanPubKey -> Bool # max :: BotanPubKey -> BotanPubKey -> BotanPubKey # min :: BotanPubKey -> BotanPubKey -> BotanPubKey # |
botan_pubkey_destroy :: FinalizerPtr BotanPubKeyStruct Source #
Frees all resources of the PubKey object
botan_privkey_export_pubkey Source #
:: Ptr BotanPubKey | out |
-> BotanPrivKey | in |
-> IO CInt |
pattern BOTAN_PUBKEY_EXPORT_FLAG_DER :: (Eq a, Num a) => a Source #
pattern BOTAN_PUBKEY_EXPORT_FLAG_PEM :: (Eq a, Num a) => a Source #
botan_pubkey_view_der Source #
:: BotanPubKey | key |
-> BotanViewContext ctx | ctx |
-> FunPtr (BotanViewBinCallback ctx) | view |
-> IO CInt |
View the public key's DER encoding
botan_pubkey_view_pem Source #
:: BotanPubKey | key |
-> BotanViewContext ctx | ctx |
-> FunPtr (BotanViewStrCallback ctx) | view |
-> IO CInt |
botan_pubkey_check_key Source #
:: BotanPubKey | key |
-> BotanRNG | rng |
-> Word32 | flags |
-> IO CInt |
Returns 0 if key is valid, negative if invalid key or some other error
botan_pubkey_estimated_strength Source #
:: BotanPubKey | key |
-> Ptr CSize | estimate |
-> IO CInt |
botan_pubkey_get_field Source #
Get arbitrary named fields from public or private keys
botan_pubkey_view_ec_public_point Source #
:: BotanPubKey | key |
-> BotanViewContext ctx | ctx |
-> FunPtr (BotanViewBinCallback ctx) | view |
-> IO CInt |
View the uncompressed public point associated with the key