10 #include <botan/ecc_key.h>
11 #include <botan/x509_key.h>
12 #include <botan/numthry.h>
13 #include <botan/der_enc.h>
14 #include <botan/ber_dec.h>
15 #include <botan/secmem.h>
16 #include <botan/point_gfp.h>
17 #include <botan/internal/assert.h>
23 domain_params(dom_par), public_key(pub_point),
64 "EC-key object whose corresponding domain "
65 "parameters are without oid");
73 throw Invalid_State(
"EC_PrivateKey::private_value - uninitialized");
96 "ECC private key was not on the curve");
103 .
encode(static_cast<size_t>(1))
125 "Loaded ECC private key not on the curve");
SecureVector< byte > get_contents()
std::string get_oid() const
MemoryVector< byte > DER_domain() const
const EC_Group & domain() const
void set_parameter_encoding(EC_Group_Encoding enc)
BER_Decoder & decode_and_check(const T &expected, const std::string &error_msg)
PointGFp OS2ECP(const byte data[], size_t data_len, const CurveGFp &curve)
MemoryVector< byte > pkcs8_private_key() const
const PointGFp & get_base_point() const
bool check_key(RandomNumberGenerator &rng, bool strong) const
std::invalid_argument Invalid_Argument
SecureVector< byte > parameters
static BigInt random_integer(RandomNumberGenerator &rng, const BigInt &min, const BigInt &max)
BER_Decoder start_cons(ASN1_Tag, ASN1_Tag=UNIVERSAL)
#define BOTAN_ASSERT(expr, msg)
virtual OID get_oid() const
const PointGFp & public_point() const
SecureVector< byte > EC2OSP(const PointGFp &point, byte format)
const BigInt & private_value() const
DER_Encoder & encode(bool b)
RandomNumberGenerator * rng
bool on_the_curve() const
AlgorithmIdentifier algorithm_identifier() const
DER_Encoder & start_cons(ASN1_Tag type_tag, ASN1_Tag class_tag=UNIVERSAL)
EC_Group_Encoding domain_encoding
MemoryVector< byte > x509_subject_public_key() const
static SecureVector< byte > encode_1363(const BigInt &n, size_t bytes)