Protocol++® (Protocolpp®)  v5.6.2
ProtocolPP::jikev2dh Class Reference

Public Member Functions

 jikev2dh (std::shared_ptr< InterfacePP::jlogger > &logger)
 Standard constructor.
 
 ~jikev2dh ()=default
 Standard deconstructor.
 
bool get_pubkey (dh_id_t diffiehellman, std::shared_ptr< jarray< uint8_t >> &pubkey, std::shared_ptr< CryptoPP::SecByteBlock > &prvKey)
 
bool verify (dh_id_t diffiehellman, std::shared_ptr< jarray< uint8_t >> &rcvPubKey, std::shared_ptr< CryptoPP::SecByteBlock > &prvKey, std::shared_ptr< jarray< uint8_t >> &sharedSecret)
 
 jikev2dh (jikev2dh &jikev2dh)=delete
 
 jikev2dh (const jikev2dh &jikev2dh)=delete
 

Member Function Documentation

◆ get_pubkey()

bool ProtocolPP::jikev2dh::get_pubkey ( dh_id_t  diffiehellman,
std::shared_ptr< jarray< uint8_t >> &  pubkey,
std::shared_ptr< CryptoPP::SecByteBlock > &  prvKey 
)

Generate a public key pair

Parameters
diffiehellman- Diffie-Hellman curve or field to use
pubkey- array containing public key
prvKey- Generated private key from key pair
Returns
- True if found and calculated, false otherwise

◆ verify()

bool ProtocolPP::jikev2dh::verify ( dh_id_t  diffiehellman,
std::shared_ptr< jarray< uint8_t >> &  rcvPubKey,
std::shared_ptr< CryptoPP::SecByteBlock > &  prvKey,
std::shared_ptr< jarray< uint8_t >> &  sharedSecret 
)

Verify the Diffie-Hellman computation and generate shared secret

Parameters
diffiehellman- Diffie-Hellman curve or field to use
rcvPubKey- the received public key
prvKey- Generated private key from key pair
sharedSecret- the generated shared secret if verification is successful
Returns
Public key verified

The documentation for this class was generated from the following file: