Botan 2.19.3
Crypto and TLS for C&
pk_algs.h
Go to the documentation of this file.
1/*
2* PK Key Factory
3* (C) 1999-2010,2016 Jack Lloyd
4*
5* Botan is released under the Simplified BSD License (see license.txt)
6*/
7
8#ifndef BOTAN_PK_KEY_FACTORY_H_
9#define BOTAN_PK_KEY_FACTORY_H_
10
11#include <botan/pk_keys.h>
12#include <botan/asn1_obj.h>
13#include <memory>
14
15namespace Botan {
16
17BOTAN_PUBLIC_API(2,0) std::unique_ptr<Public_Key>
18load_public_key(const AlgorithmIdentifier& alg_id,
19 const std::vector<uint8_t>& key_bits);
20
21BOTAN_PUBLIC_API(2,0) std::unique_ptr<Private_Key>
22load_private_key(const AlgorithmIdentifier& alg_id,
23 const secure_vector<uint8_t>& key_bits);
24
25/**
26* Create a new key
27* For ECC keys, algo_params specifies EC group (eg, "secp256r1")
28* For DH/DSA/ElGamal keys, algo_params is DL group (eg, "modp/ietf/2048")
29* For RSA, algo_params is integer keylength
30* For McEliece, algo_params is n,t
31* If algo_params is left empty, suitable default parameters are chosen.
32*/
33BOTAN_PUBLIC_API(2,0) std::unique_ptr<Private_Key>
34create_private_key(const std::string& algo_name,
35 RandomNumberGenerator& rng,
36 const std::string& algo_params = "",
37 const std::string& provider = "");
38
40std::vector<std::string>
41probe_provider_private_key(const std::string& algo_name,
42 const std::vector<std::string> possible);
43
44}
45
46#endif
#define BOTAN_PUBLIC_API(maj, min)
Definition compiler.h:31
std::unique_ptr< Private_Key > load_private_key(const AlgorithmIdentifier &alg_id, const secure_vector< uint8_t > &key_bits)
Definition pk_algs.cpp:159
std::vector< std::string > probe_provider_private_key(const std::string &alg_name, const std::vector< std::string > possible)
Definition pk_algs.cpp:391
std::unique_ptr< Private_Key > create_private_key(const std::string &alg_name, RandomNumberGenerator &rng, const std::string &params, const std::string &provider)
Definition pk_algs.cpp:260
std::unique_ptr< Public_Key > load_public_key(const AlgorithmIdentifier &alg_id, const std::vector< uint8_t > &key_bits)
Definition pk_algs.cpp:78
std::vector< T, secure_allocator< T > > secure_vector
Definition secmem.h:65
Definition bigint.h:1143