Bitcoin
Classes | Namespaces | Typedefs | Functions | Variables
crypter.h File Reference
#include <serialize.h>
#include <support/allocators/secure.h>
#include <script/signingprovider.h>
#include <atomic>

Go to the source code of this file.

Classes

class  CMasterKey
 
class  CCrypter
 

Namespaces

 wallet_crypto_tests
 

Typedefs

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

Functions

bool EncryptSecret (const CKeyingMaterial &vMasterKey, const CKeyingMaterial &vchPlaintext, const uint256 &nIV, std::vector< unsigned char > &vchCiphertext)
 
bool DecryptSecret (const CKeyingMaterial &vMasterKey, const std::vector< unsigned char > &vchCiphertext, const uint256 &nIV, CKeyingMaterial &vchPlaintext)
 
bool DecryptKey (const CKeyingMaterial &vMasterKey, const std::vector< unsigned char > &vchCryptedSecret, const CPubKey &vchPubKey, CKey &key)
 

Variables

const unsigned int WALLET_CRYPTO_KEY_SIZE = 32
 
const unsigned int WALLET_CRYPTO_SALT_SIZE = 8
 
const unsigned int WALLET_CRYPTO_IV_SIZE = 16
 

Typedef Documentation

◆ CKeyingMaterial

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

Function Documentation

◆ DecryptKey()

bool DecryptKey ( const CKeyingMaterial vMasterKey,
const std::vector< unsigned char > &  vchCryptedSecret,
const CPubKey vchPubKey,
CKey key 
)

◆ DecryptSecret()

bool DecryptSecret ( const CKeyingMaterial vMasterKey,
const std::vector< unsigned char > &  vchCiphertext,
const uint256 nIV,
CKeyingMaterial vchPlaintext 
)

◆ EncryptSecret()

bool EncryptSecret ( const CKeyingMaterial vMasterKey,
const CKeyingMaterial vchPlaintext,
const uint256 nIV,
std::vector< unsigned char > &  vchCiphertext 
)

Variable Documentation

◆ WALLET_CRYPTO_IV_SIZE

const unsigned int WALLET_CRYPTO_IV_SIZE = 16

◆ WALLET_CRYPTO_KEY_SIZE

const unsigned int WALLET_CRYPTO_KEY_SIZE = 32

◆ WALLET_CRYPTO_SALT_SIZE

const unsigned int WALLET_CRYPTO_SALT_SIZE = 8