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

a wrapper around bctoolbox signature algorithms, implements the Signature interface More...

Inheritance diagram for lime::bctbx_EDDSA< Curve >:
lime::Signature< Curve >

Public Member Functions

const DSA< Curve, lime::DSAtype::privateKeyget_secret (void) override
 Secret key. More...
 
const DSA< Curve, lime::DSAtype::publicKeyget_public (void) override
 Public key. More...
 
void set_secret (const DSA< Curve, lime::DSAtype::privateKey > &secretKey) override
 Secret key. More...
 
void set_public (const DSA< Curve, lime::DSAtype::publicKey > &publicKey) override
 Public key. More...
 
void createKeyPair (std::shared_ptr< lime::RNG > rng) override
 generate a new random EdDSA key pair More...
 
void derivePublic (void) override
 Compute the public key using the secret already set in context. More...
 
void sign (const std::vector< uint8_t > &message, DSA< Curve, lime::DSAtype::signature > &signature) override
 Sign a message using the key pair previously set in the object. More...
 
void sign (const X< Curve, lime::Xtype::publicKey > &message, DSA< Curve, lime::DSAtype::signature > &signature) override
 
bool verify (const std::vector< uint8_t > &message, const DSA< Curve, lime::DSAtype::signature > &signature) override
 Verify a message signature using the public key previously set in the object. More...
 
bool verify (const X< Curve, lime::Xtype::publicKey > &message, const DSA< Curve, lime::DSAtype::signature > &signature) override
 
 bctbx_EDDSA ()
 
 ~bctbx_EDDSA ()
 
- Public Member Functions inherited from lime::Signature< Curve >
virtual ~Signature ()=default
 

Detailed Description

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

a wrapper around bctoolbox signature algorithms, implements the Signature interface

Provides EdDSA on curves 25519 and 448

Constructor & Destructor Documentation

◆ bctbx_EDDSA()

template<typename Curve >
lime::bctbx_EDDSA< Curve >::bctbx_EDDSA ( )
inline

◆ ~bctbx_EDDSA()

template<typename Curve >
lime::bctbx_EDDSA< Curve >::~bctbx_EDDSA ( )
inline

Member Function Documentation

◆ createKeyPair()

template<typename Curve >
void lime::bctbx_EDDSA< Curve >::createKeyPair ( std::shared_ptr< lime::RNG rng)
inlineoverridevirtual

generate a new random EdDSA key pair

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

Implements lime::Signature< Curve >.

◆ derivePublic()

template<typename Curve >
void lime::bctbx_EDDSA< Curve >::derivePublic ( void  )
inlineoverridevirtual

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

Implements lime::Signature< Curve >.

◆ get_public()

template<typename Curve >
const DSA<Curve, lime::DSAtype::publicKey> lime::bctbx_EDDSA< Curve >::get_public ( void  )
inlineoverridevirtual

Public key.

Implements lime::Signature< Curve >.

◆ get_secret()

template<typename Curve >
const DSA<Curve, lime::DSAtype::privateKey> lime::bctbx_EDDSA< Curve >::get_secret ( void  )
inlineoverridevirtual

Secret key.

Implements lime::Signature< Curve >.

◆ set_public()

template<typename Curve >
void lime::bctbx_EDDSA< Curve >::set_public ( const DSA< Curve, lime::DSAtype::publicKey > &  publicKey)
inlineoverridevirtual

Public key.

Implements lime::Signature< Curve >.

◆ set_secret()

template<typename Curve >
void lime::bctbx_EDDSA< Curve >::set_secret ( const DSA< Curve, lime::DSAtype::privateKey > &  secretKey)
inlineoverridevirtual

Secret key.

Implements lime::Signature< Curve >.

◆ sign() [1/2]

template<typename Curve >
void lime::bctbx_EDDSA< Curve >::sign ( const std::vector< uint8_t > &  message,
DSA< Curve, lime::DSAtype::signature > &  signature 
)
inlineoverridevirtual

Sign a message using the key pair previously set in the object.

Parameters
[in]messageThe message to be signed (we can sign any vector or more specifically a key exchange public key)
[out]signatureThe signature produced from the message with a key pair previously introduced in the object

Implements lime::Signature< Curve >.

◆ sign() [2/2]

template<typename Curve >
void lime::bctbx_EDDSA< Curve >::sign ( const X< Curve, lime::Xtype::publicKey > &  message,
DSA< Curve, lime::DSAtype::signature > &  signature 
)
inlineoverridevirtual

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

a convenience function to directly verify a key exchange public key

Implements lime::Signature< Curve >.

◆ verify() [1/2]

template<typename Curve >
bool lime::bctbx_EDDSA< Curve >::verify ( const std::vector< uint8_t > &  message,
const DSA< Curve, lime::DSAtype::signature > &  signature 
)
inlineoverridevirtual

Verify a message signature using the public key previously set in the object.

Parameters
[in]messageThe message signed (we can verify any vector or more specifically a key exchange public key)
[in]signatureThe signature produced from the message with a key pair previously introduced in the object
Returns
true if the signature is valid, false otherwise

Implements lime::Signature< Curve >.

◆ verify() [2/2]

template<typename Curve >
bool lime::bctbx_EDDSA< Curve >::verify ( const X< Curve, lime::Xtype::publicKey > &  message,
const DSA< Curve, lime::DSAtype::signature > &  signature 
)
inlineoverridevirtual

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

a convenience function to directly verify a key exchange public key

Implements lime::Signature< Curve >.


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