Loading...
Searching...
No Matches
lime::bctbx_ECDH< Curve > Class Template Reference

a wrapper around bctoolbox key exchange algorithms, implements the keyExchange interface More...

Inheritance diagram for lime::bctbx_ECDH< Curve >:

## Public Member Functions

const X< Curve, lime::Xtype::privateKey > | get_secret (void) override
| get Secret key
const X< Curve, lime::Xtype::publicKey > | get_selfPublic (void) override
| get Self Public key
const X< Curve, lime::Xtype::publicKey > | get_peerPublic (void) override
| get Peer Public key
const X< Curve, lime::Xtype::sharedSecret > | get_sharedSecret (void) override
| get shared secret when exchange is completed
void | set_secret (const X< Curve, lime::Xtype::privateKey > &secret) override
| set Secret key
void | set_secret (const DSA< Curve, lime::DSAtype::privateKey > &secret) override
void | set_selfPublic (const X< Curve, lime::Xtype::publicKey > &selfPublic) override
| set Self Public key
void | set_selfPublic (const DSA< Curve, lime::DSAtype::publicKey > &selfPublic) override
void | set_peerPublic (const X< Curve, lime::Xtype::publicKey > &peerPublic) override
| set Peer Public key
void | set_peerPublic (const DSA< Curve, lime::DSAtype::publicKey > &peerPublic) override
void | createKeyPair (std::shared_ptr< lime::RNG > rng) override
| generate a new random key pair
void | deriveSelfPublic (void) override
| Compute the self public key using the secret already set in context.
void | computeSharedSecret (void) override
| Perform the shared secret computation, it is then available in the object via get_sharedSecret.
| bctbx_ECDH ()
| ~bctbx_ECDH ()
Public Member Functions inherited from lime::keyExchange< Curve >
virtual | ~keyExchange ()=default

## Detailed Description

template<typename Curve>
class lime::bctbx_ECDH< Curve >

a wrapper around bctoolbox key exchange algorithms, implements the keyExchange interface

Provides X25519 and X448

## Constructor & Destructor Documentation

## bctbx_ECDH()

template<typename Curve>

lime::bctbx_ECDH< Curve >::bctbx_ECDH | ( |  | ) |

inline

## ~bctbx_ECDH()

template<typename Curve>

lime::bctbx_ECDH< Curve >::~bctbx_ECDH | ( |  | ) |

inline

## Member Function Documentation

## computeSharedSecret()

template<typename Curve>

void lime::bctbx_ECDH< Curve >::computeSharedSecret | ( | void |  | ) |

inline override virtual

Perform the shared secret computation, it is then available in the object via get_sharedSecret.

Implements lime::keyExchange< Curve >.

## createKeyPair()

template<typename Curve>

void lime::bctbx_ECDH< Curve >::createKeyPair | ( | std::shared_ptr< lime::RNG > | rng | ) |

inline override virtual

generate a new random key pair

Parameters

  [in] | rng | The Random Number Generator to be used to generate the private kay

Implements lime::keyExchange< Curve >.

## deriveSelfPublic()

template<typename Curve>

void lime::bctbx_ECDH< Curve >::deriveSelfPublic | ( | void |  | ) |

inline override virtual

Compute the self public key using the secret already set in context.

Implements lime::keyExchange< Curve >.

## get_peerPublic()

template<typename Curve>

const X< Curve, lime::Xtype::publicKey > lime::bctbx_ECDH< Curve >::get_peerPublic | ( | void |  | ) |

inline override virtual

get Peer Public key

Implements lime::keyExchange< Curve >.

## get_secret()

template<typename Curve>

const X< Curve, lime::Xtype::privateKey > lime::bctbx_ECDH< Curve >::get_secret | ( | void |  | ) |

inline override virtual

get Secret key

Implements lime::keyExchange< Curve >.

## get_selfPublic()

template<typename Curve>

const X< Curve, lime::Xtype::publicKey > lime::bctbx_ECDH< Curve >::get_selfPublic | ( | void |  | ) |

inline override virtual

get Self Public key

Implements lime::keyExchange< Curve >.

## get_sharedSecret()

template<typename Curve>

const X< Curve, lime::Xtype::sharedSecret > lime::bctbx_ECDH< Curve >::get_sharedSecret | ( | void |  | ) |

inline override virtual

get shared secret when exchange is completed

Implements lime::keyExchange< Curve >.

## set_peerPublic() [1/2]

template<typename Curve>

void lime::bctbx_ECDH< Curve >::set_peerPublic | ( | const DSA< Curve, lime::DSAtype::publicKey > & | peerPublic | ) |

inline override virtual

Peer Public key This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

give a DSA formatted key, this set function will convert its format to the key exchange one

Implements lime::keyExchange< Curve >.

## set_peerPublic() [2/2]

template<typename Curve>

void lime::bctbx_ECDH< Curve >::set_peerPublic | ( | const X< Curve, lime::Xtype::publicKey > & | peerPublic | ) |

inline override virtual

set Peer Public key

Implements lime::keyExchange< Curve >.

## set_secret() [1/2]

template<typename Curve>

void lime::bctbx_ECDH< Curve >::set_secret | ( | const DSA< Curve, lime::DSAtype::privateKey > & | secret | ) |

inline override virtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

give a DSA formatted key, this set function will convert its format to the key exchange one

Implements lime::keyExchange< Curve >.

## set_secret() [2/2]

template<typename Curve>

void lime::bctbx_ECDH< Curve >::set_secret | ( | const X< Curve, lime::Xtype::privateKey > & | secret | ) |

inline override virtual

set Secret key

Implements lime::keyExchange< Curve >.

## set_selfPublic() [1/2]

template<typename Curve>

void lime::bctbx_ECDH< Curve >::set_selfPublic | ( | const DSA< Curve, lime::DSAtype::publicKey > & | selfPublic | ) |

inline override virtual

Self Public key This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

give a DSA formatted key, this set function will convert its format to the key exchange one

Implements lime::keyExchange< Curve >.

## set_selfPublic() [2/2]

template<typename Curve>

void lime::bctbx_ECDH< Curve >::set_selfPublic | ( | const X< Curve, lime::Xtype::publicKey > & | selfPublic | ) |

inline override virtual

set Self Public key

Implements lime::keyExchange< Curve >.

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

- /build/lime-9DdzML/lime-5.3.105+dfsg/src/lime_crypto_primitives.cpp