Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Typedefs | Functions | Variables
key.h File Reference
#include <pubkey.h>
#include <serialize.h>
#include <support/allocators/secure.h>
#include <uint256.h>
#include <stdexcept>
#include <vector>
Include dependency graph for key.h:

Go to the source code of this file.

Classes

class  CKey
 An encapsulated private key. More...
 
struct  CExtKey
 
class  KeyPair
 KeyPair. More...
 
class  ECC_Context
 RAII class initializing and deinitializing global state for elliptic curve support. More...
 

Typedefs

typedef std::vector< unsigned char, secure_allocator< unsigned char > > CPrivKey
 CPrivKey is a serialized private key, with all parameters included (SIZE bytes) More...
 
using ECDHSecret = std::array< std::byte, ECDH_SECRET_SIZE >
 

Functions

CKey GenerateRandomKey (bool compressed=true) noexcept
 
bool ECC_InitSanityCheck ()
 Check that required EC support is available at runtime. More...
 

Variables

static constexpr size_t ECDH_SECRET_SIZE = CSHA256::OUTPUT_SIZE
 Size of ECDH shared secrets. More...
 

Typedef Documentation

◆ CPrivKey

typedef std::vector<unsigned char, secure_allocator<unsigned char> > CPrivKey

CPrivKey is a serialized private key, with all parameters included (SIZE bytes)

Definition at line 23 of file key.h.

◆ ECDHSecret

using ECDHSecret = std::array<std::byte, ECDH_SECRET_SIZE>

Definition at line 29 of file key.h.

Function Documentation

◆ ECC_InitSanityCheck()

bool ECC_InitSanityCheck ( )

Check that required EC support is available at runtime.

Definition at line 442 of file key.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GenerateRandomKey()

CKey GenerateRandomKey ( bool  compressed = true)
noexcept

Definition at line 352 of file key.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ECDH_SECRET_SIZE

constexpr size_t ECDH_SECRET_SIZE = CSHA256::OUTPUT_SIZE
staticconstexpr

Size of ECDH shared secrets.

Definition at line 26 of file key.h.