lime
Lime is a C++ library implementing Open Whisper System Signal protocol
Public Member Functions | List of all members
lime::keyExchange< Curve > Class Template Referenceabstract

Key exchange interface. More...

Inheritance diagram for lime::keyExchange< Curve >:
lime::bctbx_ECDH< Curve >

Public Member Functions

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

Detailed Description

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

Key exchange interface.

shall be able to provide an interface to any algorithm implementing key exchange

Note
wrapped in algorithms must support key format convertion function from matching Digital Signature algorithm

Constructor & Destructor Documentation

◆ ~keyExchange()

template<typename Curve >
virtual lime::keyExchange< Curve >::~keyExchange ( )
virtualdefault

Member Function Documentation

◆ computeSharedSecret()

template<typename Curve >
virtual void lime::keyExchange< Curve >::computeSharedSecret ( void  )
pure virtual

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

Implemented in lime::bctbx_ECDH< Curve >.

◆ createKeyPair()

template<typename Curve >
virtual void lime::keyExchange< Curve >::createKeyPair ( std::shared_ptr< lime::RNG rng)
pure virtual

generate a new random key pair

Parameters
[in]rngThe Random Number Generator to be used to generate the private kay

Implemented in lime::bctbx_ECDH< Curve >.

◆ deriveSelfPublic()

template<typename Curve >
virtual void lime::keyExchange< Curve >::deriveSelfPublic ( void  )
pure virtual

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

Implemented in lime::bctbx_ECDH< Curve >.

◆ get_peerPublic()

template<typename Curve >
virtual const X<Curve, lime::Xtype::publicKey> lime::keyExchange< Curve >::get_peerPublic ( void  )
pure virtual

get Peer Public key

Implemented in lime::bctbx_ECDH< Curve >.

◆ get_secret()

template<typename Curve >
virtual const X<Curve, lime::Xtype::privateKey> lime::keyExchange< Curve >::get_secret ( void  )
pure virtual

get Secret key

Implemented in lime::bctbx_ECDH< Curve >.

◆ get_selfPublic()

template<typename Curve >
virtual const X<Curve, lime::Xtype::publicKey> lime::keyExchange< Curve >::get_selfPublic ( void  )
pure virtual

get Self Public key

Implemented in lime::bctbx_ECDH< Curve >.

◆ get_sharedSecret()

template<typename Curve >
virtual const X<Curve, lime::Xtype::sharedSecret> lime::keyExchange< Curve >::get_sharedSecret ( void  )
pure virtual

get shared secret when exchange is completed

Implemented in lime::bctbx_ECDH< Curve >.

◆ set_peerPublic() [1/2]

template<typename Curve >
virtual void lime::keyExchange< Curve >::set_peerPublic ( const X< Curve, lime::Xtype::publicKey > &  peerPublic)
pure virtual

set Peer Public key

Implemented in lime::bctbx_ECDH< Curve >.

◆ set_peerPublic() [2/2]

template<typename Curve >
virtual void lime::keyExchange< Curve >::set_peerPublic ( const DSA< Curve, lime::DSAtype::publicKey > &  peerPublic)
pure 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

Implemented in lime::bctbx_ECDH< Curve >.

◆ set_secret() [1/2]

template<typename Curve >
virtual void lime::keyExchange< Curve >::set_secret ( const X< Curve, lime::Xtype::privateKey > &  secret)
pure virtual

set Secret key

Implemented in lime::bctbx_ECDH< Curve >.

◆ set_secret() [2/2]

template<typename Curve >
virtual void lime::keyExchange< Curve >::set_secret ( const DSA< Curve, lime::DSAtype::privateKey > &  secret)
pure 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

Implemented in lime::bctbx_ECDH< Curve >.

◆ set_selfPublic() [1/2]

template<typename Curve >
virtual void lime::keyExchange< Curve >::set_selfPublic ( const X< Curve, lime::Xtype::publicKey > &  selfPublic)
pure virtual

set Self Public key

Implemented in lime::bctbx_ECDH< Curve >.

◆ set_selfPublic() [2/2]

template<typename Curve >
virtual void lime::keyExchange< Curve >::set_selfPublic ( const DSA< Curve, lime::DSAtype::publicKey > &  selfPublic)
pure 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

Implemented in lime::bctbx_ECDH< Curve >.


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