#include <dl_scheme.h>
Definition at line 21 of file dl_scheme.h.
◆ DL_PublicKey() [1/2]
Botan::DL_PublicKey::DL_PublicKey |
( |
const DL_Group & | group, |
|
|
const BigInt & | public_key ) |
◆ DL_PublicKey() [2/2]
Definition at line 41 of file dl_scheme.cpp.
43 :
44 m_group(alg_id.parameters(), format), m_public_key(decode_single_bigint(key_bits)) {}
◆ check_key()
Definition at line 56 of file dl_scheme.cpp.
56 {
57 return m_group.verify_group(rng, strong) && m_group.verify_public_element(m_public_key);
58}
◆ DER_encode()
std::vector< uint8_t > Botan::DL_PublicKey::DER_encode |
( |
| ) |
const |
◆ estimated_strength()
size_t Botan::DL_PublicKey::estimated_strength |
( |
| ) |
const |
Definition at line 60 of file dl_scheme.cpp.
60 {
61 return m_group.estimated_strength();
62}
◆ get_int_field()
const BigInt & Botan::DL_PublicKey::get_int_field |
( |
std::string_view | algo_name, |
|
|
std::string_view | field ) const |
Definition at line 101 of file dl_scheme.cpp.
101 {
102 if(field == "p") {
103 return m_group.get_p();
104 } else if(field == "q") {
105 return m_group.get_q();
106 } else if(field == "g") {
107 return m_group.get_g();
108 } else if(field == "y") {
109 return m_public_key;
110 } else {
111 throw Unknown_PK_Field_Name(algo, field);
112 }
113}
◆ group()
const DL_Group & Botan::DL_PublicKey::group |
( |
| ) |
const |
|
inline |
◆ p_bits()
size_t Botan::DL_PublicKey::p_bits |
( |
| ) |
const |
Definition at line 64 of file dl_scheme.cpp.
64 {
65 return m_group.p_bits();
66}
◆ public_key()
const BigInt & Botan::DL_PublicKey::public_key |
( |
| ) |
const |
|
inline |
◆ public_key_as_bytes()
std::vector< uint8_t > Botan::DL_PublicKey::public_key_as_bytes |
( |
| ) |
const |
Definition at line 46 of file dl_scheme.cpp.
46 {
47 return m_public_key.serialize(m_group.p_bytes());
48}
The documentation for this class was generated from the following files: