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

Parameter manipulation routines for the Zerocoin cryptographic components. More...

#include "ParamGeneration.h"
#include <string>
#include <cmath>
#include "arith_uint256.h"
#include "hash.h"
#include "uint256.h"
Include dependency graph for ParamGeneration.cpp:

Go to the source code of this file.

Namespaces

 libzerocoin
 

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...
 
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::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::calculateHash (const uint256 &input)
 
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...
 
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)
 
bool libzerocoin::primalityTestByTrialDivision (uint32_t candidate)
 Determines whether a uint32_t is a prime through trial division. More...
 

Detailed Description

Parameter manipulation routines for the Zerocoin cryptographic components.

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

Definition in file ParamGeneration.cpp.