|
| jdsasa () |
|
| jdsasa (int bitsize, keymode_t mode) |
|
| jdsasa (int bitsize, keymode_t mode, CryptoPP::Integer prime, CryptoPP::Integer subprime, CryptoPP::Integer generator) |
|
| jdsasa (int bitsize, keymode_t mode, CryptoPP::DSA::PrivateKey prvkey, CryptoPP::DSA::PublicKey pubkey) |
|
| jdsasa (jdsasa &rhs) |
| standard copy constructor
|
|
| jdsasa (std::shared_ptr< jdsasa > &rhs) |
| standard copy constructor from shared pointer
|
|
virtual | ~jdsasa ()=default |
| Standard deconstructor.
|
|
template<typename T > |
void | set_field (field_t field, T fieldval) |
|
template<typename T > |
T | get_field (field_t field) |
|
void | to_xml (tinyxml2::XMLPrinter &myxml, direction_t direction) |
|
void | to_json (std::ofstream &myjson, direction_t direction, std::string &indent) |
|
| jdsasa (const jdsasa &jdsasa)=delete |
|
| jsecass () |
|
virtual | ~jsecass ()=default |
| Standard deconstructor.
|
|
| jsecass (jsecass &jsecass)=delete |
|
| jsecass (const jsecass &jsecass)=delete |
|
◆ jdsasa() [1/4]
ProtocolPP::jdsasa::jdsasa |
( |
| ) |
|
Standard constructor with defaults
DSA Defaults
field | Default Value |
bitsize | 3078 |
mode | keymode_t::GENKEYPAIR |
product | 0 |
quotient | 0 |
generator | 0 |
prvkey | 0 |
pubkey | 0 |
◆ jdsasa() [2/4]
ProtocolPP::jdsasa::jdsasa |
( |
int |
bitsize, |
|
|
keymode_t |
mode |
|
) |
| |
Security Association for DSA
Required fields for DSA
- Parameters
-
bitsize | - size of the private key (768:1024:2048:3078:4096:6172:8192) |
mode | - Direction of data flow (GENKEYPAIR:PKISIGN:PKIVERIFY) |
◆ jdsasa() [3/4]
ProtocolPP::jdsasa::jdsasa |
( |
int |
bitsize, |
|
|
keymode_t |
mode, |
|
|
CryptoPP::Integer |
prime, |
|
|
CryptoPP::Integer |
subprime, |
|
|
CryptoPP::Integer |
generator |
|
) |
| |
Security Association for DSA
Required fields for DSA
- Parameters
-
bitsize | - size of the private key (768:1024:2048:3078:4096:6172:8192) |
mode | - Direction of data flow (GENKEYPAIR:PKISIGN:PKIVERIFY) |
prime | - Product (Prime) parameter for DSA field |
subprime | - Quotient (SubPrime) parameter for DSA field |
generator | - Generator parameter for DSA field |
◆ jdsasa() [4/4]
ProtocolPP::jdsasa::jdsasa |
( |
int |
bitsize, |
|
|
keymode_t |
mode, |
|
|
CryptoPP::DSA::PrivateKey |
prvkey, |
|
|
CryptoPP::DSA::PublicKey |
pubkey |
|
) |
| |
Security Association for DSA
Required fields for DSA
- Parameters
-
bitsize | - size of the private key (768:1024:2048:3078:4096:6172:8192) |
mode | - Direction of data flow (GENKEYPAIR:PKISIGN:PKIVERIFY) |
prvkey | - Private DSA key |
pubkey | - Public DSA key |
◆ get_field()
template<typename T >
T ProtocolPP::jdsasa::get_field |
( |
field_t |
field | ) |
|
Returns the version field of the DSA security association
DSA Get Fields
field type | field name | Example |
int | BITSIZE | int bitsize = get_field<int>(field_t::BITSIZE) |
keymode_t | MODE | keymode_t mode = get_field<keymode_t>(field_t::MODE) |
CryptoPP::Integer | PRIME | CryptoPP::Integer product = get_field<CryptoPP::Integer>(field_t::PRIME) |
CryptoPP::Integer | SUBPRIME | CryptoPP::Integer quotient = get_field<CryptoPP::Integer>(field_t::SUBPRIME) |
CryptoPP::Integer | GENERATOR | CryptoPP::Integer generator = get_field<CryptoPP::Integer>(field_t::GENERATOR) |
CryptoPP::DSA::PrivateKey | PRVKEY | CryptoPP::DSA::PrivateKey prvkey = get_field<CryptoPP::DSA::PrivateKey>(field_t::PRVKEY) |
CryptoPP::DSA::PublicKey | PUBKEY | CryptoPP::DSA::PublicKey pubkey = get_field<CryptoPP::DSA::PublicKey>(field_t::PUBKEY) |
std::pair<CryptoPP::DSA::PrivateKey,CryptoPP::DSA::PublicKey> | KEYPAIR | std::pair<CryptoPP::DSA::PrivateKey,CryptoPP::DSA::PublicKey> kp = get_field<std::pair<CryptoPP::DSA::PrivateKey,CryptoPP::DSA::PublicKey>>(field_t::KEYPAIR) |
- Parameters
-
field | - field to retrieve from the DSA security association |
- Returns
- field of the DSA security association
◆ set_field()
template<typename T >
void ProtocolPP::jdsasa::set_field |
( |
field_t |
field, |
|
|
T |
fieldval |
|
) |
| |
Allows the user to update the field of the DSA security association
DSA Set Fields
field type | field name | Example |
int | BITSIZE | set_field<int>(field_t::BITSIZE, 3078) |
keymode_t | MODE | set_field<keymode_t>(field_t::MODE, keymode_t::GENKEYPAIR) |
CryptoPP::Integer | PRIME | set_field<CryptoPP::Integer>(field_t::PRIME, product) |
CryptoPP::Integer | SUBPRIME | set_field<CryptoPP::Integer>(field_t::SUBPRIME, quotient) |
CryptoPP::Integer | GENERATOR | set_field<CryptoPP::Integer>(field_t::GENERATOR, generator) |
CryptoPP::DSA::PrivateKey | PRVKEY | set_field<CryptoPP::DSA::PrivateKey>(field_t::PRVKEY, prvkey) |
CryptoPP::DSA::PublicKey | PUBKEY | set_field<CryptoPP::DSA::PublicKey>(field_t::PUBKEY, pubkey) |
- Parameters
-
field | - field to update the DSA security association |
fieldval | - value to update the DSA security association |
◆ to_json()
void ProtocolPP::jdsasa::to_json |
( |
std::ofstream & |
myjson, |
|
|
direction_t |
direction, |
|
|
std::string & |
indent |
|
) |
| |
|
virtual |
Prints the protocol object in JSON
- Parameters
-
myjson | - JSON object to print to |
direction | - randomzation |
indent | - indentation for JSON output |
Implements ProtocolPP::jsecass.
◆ to_xml()
Prints the protocol object in XML
- Parameters
-
myxml | - XMLPrinter object to print to |
direction | - randomzation |
Implements ProtocolPP::jsecass.
The documentation for this class was generated from the following file: