Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Protected Attributes | List of all members
dev::crypto::ECDHE Class Reference

Derive DH shared secret from EC keypairs. More...

#include <ECDHE.h>

Collaboration diagram for dev::crypto::ECDHE:
[legend]

Public Member Functions

 ECDHE ()
 Constructor (pass public key for ingress exchange). More...
 
Public pubkey ()
 Public key sent to remote. More...
 
Secret seckey ()
 
void agree (Public const &_remoteEphemeral, Secret &o_sharedSecret) const
 Input public key for dh agreement, output generated shared secret. More...
 

Protected Attributes

KeyPair m_ephemeral
 Ephemeral keypair; generated. More...
 
Public m_remoteEphemeral
 Public key of remote; parameter. Set once when agree is called, otherwise immutable. More...
 

Detailed Description

Derive DH shared secret from EC keypairs.

As ephemeral keys are single-use, agreement is limited to a single occurrence.

Definition at line 37 of file ECDHE.h.

Constructor & Destructor Documentation

dev::crypto::ECDHE::ECDHE ( )
inline

Constructor (pass public key for ingress exchange).

Definition at line 41 of file ECDHE.h.

Member Function Documentation

void ECDHE::agree ( Public const &  _remoteEphemeral,
Secret o_sharedSecret 
) const

Input public key for dh agreement, output generated shared secret.

Definition at line 27 of file ECDHE.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Public dev::crypto::ECDHE::pubkey ( )
inline

Public key sent to remote.

Definition at line 44 of file ECDHE.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Secret dev::crypto::ECDHE::seckey ( )
inline

Definition at line 46 of file ECDHE.h.

Here is the call graph for this function:

Member Data Documentation

KeyPair dev::crypto::ECDHE::m_ephemeral
protected

Ephemeral keypair; generated.

Definition at line 52 of file ECDHE.h.

Public dev::crypto::ECDHE::m_remoteEphemeral
mutableprotected

Public key of remote; parameter. Set once when agree is called, otherwise immutable.

Definition at line 53 of file ECDHE.h.


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