PIVX Core  5.6.99
P2P Digital Currency
Namespaces | Macros | Functions
ParamGeneration.h File Reference

Parameter generation routines for Zerocoin. More...

#include "Params.h"
Include dependency graph for ParamGeneration.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 libzerocoin
 

Macros

#define STRING_COMMIT_GROUP   "COIN_COMMITMENT_GROUP"
 
#define STRING_AVC_GROUP   "ACCUMULATED_VALUE_COMMITMENT_GROUP"
 
#define STRING_AVC_ORDER   "ACCUMULATED_VALUE_COMMITMENT_ORDER"
 
#define STRING_AIC_GROUP   "ACCUMULATOR_INTERNAL_COMMITMENT_GROUP"
 
#define STRING_QRNCOMMIT_GROUPG   "ACCUMULATOR_QRN_COMMITMENT_GROUPG"
 
#define STRING_QRNCOMMIT_GROUPH   "ACCUMULATOR_QRN_COMMITMENT_GROUPH"
 
#define ACCUMULATOR_BASE_CONSTANT   31
 
#define MAX_PRIMEGEN_ATTEMPTS   10000
 
#define MAX_ACCUMGEN_ATTEMPTS   10000
 
#define MAX_GENERATOR_ATTEMPTS   10000
 
#define NUM_SCHNORRGEN_ATTEMPTS   10000
 

Functions

void libzerocoin::CalculateParams (ZerocoinParams &params, const CBigNum &N, const std::string &aux, uint32_t securityLevel)
 Fill in a set of Zerocoin parameters from a modulus "N". More...
 
void libzerocoin::calculateGroupParamLengths (uint32_t maxPLen, uint32_t securityLevel, uint32_t *pLen, uint32_t *qLen)
 Calculate field/group parameter sizes based on a security level. More...
 
bool libzerocoin::primalityTestByTrialDivision (uint32_t candidate)
 Determines whether a uint32_t is a prime through trial division. More...
 
uint256 libzerocoin::calculateSeed (const CBigNum &modulus, const std::string &auxString, uint32_t securityLevel, const std::string &groupName)
 Format a seed string by hashing several values. More...
 
uint256 libzerocoin::calculateGeneratorSeed (const uint256 &seed, const uint256 &pSeed, const uint256 &qSeed, const std::string &label, uint32_t index, uint32_t count)
 Format a seed string by hashing several values. More...
 
uint256 libzerocoin::calculateHash (const uint256 &input)
 
IntegerGroupParams libzerocoin::deriveIntegerGroupParams (const uint256 &seed, uint32_t pLen, uint32_t qLen)
 Deterministically compute a set of group parameters using NIST procedures. More...
 
IntegerGroupParams libzerocoin::deriveIntegerGroupFromOrder (const CBigNum &groupOrder)
 Deterministically compute a set of group parameters with a specified order. More...
 
void libzerocoin::calculateGroupModulusAndOrder (const uint256 &seed, uint32_t pLen, uint32_t qLen, CBigNum *resultModulus, CBigNum *resultGroupOrder, uint256 *resultPseed, uint256 *resultQseed)
 Deterministically compute a group description using NIST procedures. More...
 
CBigNum libzerocoin::calculateGroupGenerator (const uint256 &seed, const uint256 &pSeed, const uint256 &qSeed, const CBigNum &modulus, const CBigNum &groupOrder, uint32_t index)
 Deterministically compute a generator for a given group. More...
 
CBigNum libzerocoin::generateRandomPrime (uint32_t primeBitLen, const arith_uint256 &in_seed, arith_uint256 *out_seed, uint32_t *prime_gen_counter)
 Deterministically compute a random prime number. More...
 
CBigNum libzerocoin::generateIntegerFromSeed (uint32_t numBits, const arith_uint256 &seed, uint32_t *numIterations)
 

Detailed Description

Parameter generation routines for Zerocoin.

Author
Ian Miers, Christina Garman and Matthew Green
Date
June 2013

Definition in file ParamGeneration.h.

Macro Definition Documentation

◆ ACCUMULATOR_BASE_CONSTANT

#define ACCUMULATOR_BASE_CONSTANT   31

Definition at line 29 of file ParamGeneration.h.

◆ MAX_ACCUMGEN_ATTEMPTS

#define MAX_ACCUMGEN_ATTEMPTS   10000

Definition at line 31 of file ParamGeneration.h.

◆ MAX_GENERATOR_ATTEMPTS

#define MAX_GENERATOR_ATTEMPTS   10000

Definition at line 32 of file ParamGeneration.h.

◆ MAX_PRIMEGEN_ATTEMPTS

#define MAX_PRIMEGEN_ATTEMPTS   10000

Definition at line 30 of file ParamGeneration.h.

◆ NUM_SCHNORRGEN_ATTEMPTS

#define NUM_SCHNORRGEN_ATTEMPTS   10000

Definition at line 33 of file ParamGeneration.h.

◆ STRING_AIC_GROUP

#define STRING_AIC_GROUP   "ACCUMULATOR_INTERNAL_COMMITMENT_GROUP"

Definition at line 26 of file ParamGeneration.h.

◆ STRING_AVC_GROUP

#define STRING_AVC_GROUP   "ACCUMULATED_VALUE_COMMITMENT_GROUP"

Definition at line 24 of file ParamGeneration.h.

◆ STRING_AVC_ORDER

#define STRING_AVC_ORDER   "ACCUMULATED_VALUE_COMMITMENT_ORDER"

Definition at line 25 of file ParamGeneration.h.

◆ STRING_COMMIT_GROUP

#define STRING_COMMIT_GROUP   "COIN_COMMITMENT_GROUP"

Definition at line 23 of file ParamGeneration.h.

◆ STRING_QRNCOMMIT_GROUPG

#define STRING_QRNCOMMIT_GROUPG   "ACCUMULATOR_QRN_COMMITMENT_GROUPG"

Definition at line 27 of file ParamGeneration.h.

◆ STRING_QRNCOMMIT_GROUPH

#define STRING_QRNCOMMIT_GROUPH   "ACCUMULATOR_QRN_COMMITMENT_GROUPH"

Definition at line 28 of file ParamGeneration.h.