Loading...
Searching...
No Matches
lime::Signature< Curve > Class Template Referenceabstract

Digital Signature interface. More...

`#include <lime_crypto_primitives.hpp>`

Inheritance diagram for lime::Signature< Curve >:

## Public Member Functions

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

## Detailed Description

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

Digital Signature interface.

shall be able to provide an interface to any algorithm implementing digital signature

## Constructor & Destructor Documentation

## ~Signature()

template<typename Curve>

virtual lime::Signature< Curve >::~Signature | ( |  | ) |

virtual default

## Member Function Documentation

## createKeyPair()

template<typename Curve>

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

pure virtual

generate a new random EdDSA key pair

Parameters

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

Implemented in lime::bctbx_EDDSA< Curve >.

## derivePublic()

template<typename Curve>

virtual void lime::Signature< Curve >::derivePublic | ( | void |  | ) |

pure virtual

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

Implemented in lime::bctbx_EDDSA< Curve >.

## get_public()

template<typename Curve>

virtual const DSA< Curve, lime::DSAtype::publicKey > lime::Signature< Curve >::get_public | ( | void |  | ) |

pure virtual

Public key.

Implemented in lime::bctbx_EDDSA< Curve >.

## get_secret()

template<typename Curve>

virtual const DSA< Curve, lime::DSAtype::privateKey > lime::Signature< Curve >::get_secret | ( | void |  | ) |

pure virtual

Secret key.

Implemented in lime::bctbx_EDDSA< Curve >.

## set_public()

template<typename Curve>

virtual void lime::Signature< Curve >::set_public | ( | const DSA< Curve, lime::DSAtype::publicKey > & | publicKey | ) |

pure virtual

Public key.

Implemented in lime::bctbx_EDDSA< Curve >.

## set_secret()

template<typename Curve>

virtual void lime::Signature< Curve >::set_secret | ( | const DSA< Curve, lime::DSAtype::privateKey > & | secretKey | ) |

pure virtual

Secret key.

Implemented in lime::bctbx_EDDSA< Curve >.

## sign() [1/2]

template<typename Curve>

virtual void lime::Signature< Curve >::sign | ( | const std::vector< uint8_t > & | message,
|  | DSA< Curve, lime::DSAtype::signature > & | signature )

pure virtual

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

Parameters

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

Implemented in lime::bctbx_EDDSA< Curve >.

## sign() [2/2]

template<typename Curve>

virtual void lime::Signature< Curve >::sign | ( | const X< Curve, lime::Xtype::publicKey > & | message,
|  | DSA< Curve, lime::DSAtype::signature > & | signature )

pure virtual

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

Implemented in lime::bctbx_EDDSA< Curve >.

## verify() [1/2]

template<typename Curve>

virtual bool lime::Signature< Curve >::verify | ( | const std::vector< uint8_t > & | message,
|  | const DSA< Curve, lime::DSAtype::signature > & | signature )

pure virtual

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

Parameters

  [in] | message | The message signed (we can verify any vector or more specifically a key exchange public key)
  [in] | signature | The signature produced from the message with a key pair previously introduced in the object

Returns
  true if the signature is valid, false otherwise

Implemented in lime::bctbx_EDDSA< Curve >.

## verify() [2/2]

template<typename Curve>

virtual bool lime::Signature< Curve >::verify | ( | const X< Curve, lime::Xtype::publicKey > & | message,
|  | const DSA< Curve, lime::DSAtype::signature > & | signature )

pure virtual

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

Implemented in lime::bctbx_EDDSA< Curve >.

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

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