PIVX Core  5.6.99
P2P Digital Currency
Functions
bip38.cpp File Reference
#include "bip38.h"
#include "base58.h"
#include "crypto/aes.h"
#include "key_io.h"
#include "hash.h"
#include "utilstrencodings.h"
#include "random.h"
#include <secp256k1.h>
#include <string>
Include dependency graph for bip38.cpp:

Go to the source code of this file.

Functions

void DecryptAES (uint256 encryptedIn, uint256 decryptionKey, uint256 &output)
 39 bytes - 78 characters 1) Prefix - 2 bytes - 4 chars - strKey[0..3] 2) Flagbyte - 1 byte - 2 chars - strKey[4..5] 3) addresshash - 4 bytes - 8 chars - strKey[6..13] 4) Owner Entropy - 8 bytes - 16 chars - strKey[14..29] 5) Encrypted Part 1 - 8 bytes - 16 chars - strKey[30..45] 6) Encrypted Part 2 - 16 bytes - 32 chars - strKey[46..77] More...
 
void ComputePreFactor (std::string strPassphrase, std::string strSalt, uint256 &prefactor)
 
void ComputePassfactor (std::string ownersalt, uint256 prefactor, uint256 &passfactor)
 
bool ComputePasspoint (uint256 passfactor, CPubKey &passpoint)
 
void ComputeSeedBPass (CPubKey passpoint, std::string strAddressHash, std::string strOwnerSalt, uint512 &seedBPass)
 
void ComputeFactorB (uint256 seedB, uint256 &factorB)
 
std::string AddressToBip38Hash (const std::string &address)
 
std::string BIP38_Encrypt (std::string strAddress, std::string strPassphrase, uint256 privKey, bool fCompressed)
 
bool BIP38_Decrypt (std::string strPassphrase, std::string strEncryptedKey, uint256 &privKey, bool &fCompressed)
 

Function Documentation

◆ AddressToBip38Hash()

std::string AddressToBip38Hash ( const std::string &  address)

Definition at line 112 of file bip38.cpp.

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

◆ BIP38_Decrypt()

bool BIP38_Decrypt ( std::string  strPassphrase,
std::string  strEncryptedKey,
uint256 privKey,
bool &  fCompressed 
)

Decrypt encryptedpart2 using AES256Decrypt to yield the last 8 bytes of seedb and the last 8 bytes of encryptedpart1.

Decrypt encryptedpart1 to yield the remainder of seedb.

Definition at line 169 of file bip38.cpp.

Here is the caller graph for this function:

◆ BIP38_Encrypt()

std::string BIP38_Encrypt ( std::string  strAddress,
std::string  strPassphrase,
uint256  privKey,
bool  fCompressed 
)

Definition at line 119 of file bip38.cpp.

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

◆ ComputeFactorB()

void ComputeFactorB ( uint256  seedB,
uint256 factorB 
)

Definition at line 106 of file bip38.cpp.

Here is the call graph for this function:

◆ ComputePassfactor()

void ComputePassfactor ( std::string  ownersalt,
uint256  prefactor,
uint256 passfactor 
)

Definition at line 59 of file bip38.cpp.

Here is the call graph for this function:

◆ ComputePasspoint()

bool ComputePasspoint ( uint256  passfactor,
CPubKey passpoint 
)

Definition at line 66 of file bip38.cpp.

◆ ComputePreFactor()

void ComputePreFactor ( std::string  strPassphrase,
std::string  strSalt,
uint256 prefactor 
)

Definition at line 52 of file bip38.cpp.

Here is the call graph for this function:

◆ ComputeSeedBPass()

void ComputeSeedBPass ( CPubKey  passpoint,
std::string  strAddressHash,
std::string  strOwnerSalt,
uint512 seedBPass 
)

Definition at line 98 of file bip38.cpp.

Here is the call graph for this function:

◆ DecryptAES()

void DecryptAES ( uint256  encryptedIn,
uint256  decryptionKey,
uint256 output 
)

39 bytes - 78 characters 1) Prefix - 2 bytes - 4 chars - strKey[0..3] 2) Flagbyte - 1 byte - 2 chars - strKey[4..5] 3) addresshash - 4 bytes - 8 chars - strKey[6..13] 4) Owner Entropy - 8 bytes - 16 chars - strKey[14..29] 5) Encrypted Part 1 - 8 bytes - 16 chars - strKey[30..45] 6) Encrypted Part 2 - 16 bytes - 32 chars - strKey[46..77]

Definition at line 47 of file bip38.cpp.

Here is the call graph for this function: