void FEInitiator::createContract() { // set up session id r = RandomBits_ZZ(2*stat); ZZ id = Hash::hash(r, verifiablePK->hashAlg, verifiablePK->hashKey); long timeout = time(NULL) + timeoutLength; contract = new FEContract(timeout, id); }
void Buyer::createContract() { // set up session id r = RandomBits_ZZ(2*stat); ZZ id = Hash::hash(r, pk->hashAlg, pk->hashKey); // prepare timeout setTimeout(); contract = new FEContract(timeout, id); }
void IndexCalc::GeneratePandQ(long bits){ ic_Q = GenGermainPrime_ZZ(bits); ic_P = 2*ic_Q + 1; ic_G = RandomBits_ZZ(bits/6); ic_X = GenPrime_ZZ(bits/8); }