ECDH shared-secret derivation. More...
#include <StormByte/crypto/secret/ecdh.hxx>


Public Member Functions | |
| PointerType | Clone () const noexcept override |
| Clone this object. | |
| PointerType | Move () noexcept override |
| Move this object into a new instance. | |
| std::optional< Secure::Password > | Share (std::string_view peerPublicKey) const noexcept override |
| Derive a shared secret. | |
Construction | |
| ECDH (KeyPair::Generic::PointerType keypair, unsigned short bits=256) noexcept | |
| Construct from a keypair pointer. | |
| ECDH (const KeyPair::ECDH &keypair, unsigned short bits=256) noexcept | |
| Construct by cloning an ECDH keypair. | |
| ECDH (KeyPair::ECDH &&keypair, unsigned short bits=256) noexcept | |
| Construct by moving an ECDH keypair. | |
| ECDH (const ECDH &other)=default | |
| Copy constructor. | |
| ECDH (ECDH &&other) noexcept=default | |
| Move constructor. | |
| ~ECDH () noexcept | |
| Destructor. | |
| ECDH & | operator= (const ECDH &other)=default |
| Copy assignment. | |
| ECDH & | operator= (ECDH &&other) noexcept=default |
| Move assignment. | |
Public Member Functions inherited from StormByte::Crypto::Secret::Generic | |
| Type | Type () const noexcept |
| Algorithm of this instance. | |
| Generic (const Generic &other)=default | |
| Copy constructor. | |
| Generic (Generic &&other) noexcept=default | |
| Move constructor. | |
| virtual | ~Generic () noexcept |
| Destructor. | |
| Generic & | operator= (const Generic &other)=default |
| Copy assignment. | |
| Generic & | operator= (Generic &&other) noexcept=default |
| Move assignment. | |
Public Member Functions inherited from StormByte::Safe::Clonable< Generic > | |
| constexpr | Clonable ()=default |
| constexpr | Clonable (const Clonable &)=default |
| constexpr | Clonable (Clonable &&) noexcept=default |
| constexpr Clonable & | operator= (const Clonable &)=default |
| constexpr Clonable & | operator= (Clonable &&) noexcept=default |
| virtual constexpr | ~Clonable () noexcept=default |
Additional Inherited Members | |
Public Types inherited from StormByte::Safe::Clonable< Generic > | |
| typedef SmartPointer | PointerType |
Static Public Member Functions inherited from StormByte::Safe::Clonable< Generic > | |
| static PointerType | MakePointer (Args &&... args) |
Protected Member Functions inherited from StormByte::Crypto::Secret::Generic | |
| Generic (enum Type type, KeyPair::Generic::PointerType keypair) noexcept | |
| Construct with algorithm and keypair. | |
Protected Attributes inherited from StormByte::Crypto::Secret::Generic | |
| enum Type | m_type |
| Algorithm. | |
| KeyPair::Generic::PointerType | m_keypair |
| Local keypair (needs private key) | |
ECDH shared-secret derivation.
|
inlinenoexcept |
Construct from a keypair pointer.
| keypair | Must be KeyPair::Type::ECDH. |
| bits | Curve size in bits. Must match the keypair. |
|
inlinenoexcept |
Construct by cloning an ECDH keypair.
| keypair | Keypair. |
| bits | Curve size in bits. |
|
inlinenoexcept |
Construct by moving an ECDH keypair.
| keypair | Keypair. |
| bits | Curve size in bits. |
Copy constructor.
| other | Object to copy. |
|
defaultnoexcept |
Move constructor.
| other | Object to move. |
|
noexcept |
Destructor.
|
inlineoverridevirtualnoexcept |
Clone this object.
Implements StormByte::Safe::Clonable< Generic >.
|
inlineoverridevirtualnoexcept |
Move this object into a new instance.
Implements StormByte::Safe::Clonable< Generic >.
|
default |
Copy assignment.
| other | Object to copy. |
|
defaultnoexcept |
Move assignment.
| other | Object to move. |
|
overridevirtualnoexcept |
Derive a shared secret.
| peerPublicKey | Peer public key as Base64. Accepts String and std::string via string_view. |
Implements StormByte::Crypto::Secret::Generic.