mpz_set_str(m_q, q,10);// e = 65537mpz_set_ui(m_e,65537);// n = p * qmpz_mul(m_n, m_p, m_q);// TODO, since n is too small we won't be able to decode big numbers.//if(mpz_sizeinbase(m_n, 2) <= 1024){// std::cout << " WARNING: 2^1023 < n < 2^1...
voidSecretShare::getShares(mpz_t** shares,mpz_t* secrets,intsize){mpz_tcoefficient; mpz_init(coefficient);mpz_ttemp;mpz_init_set_ui(temp,0);intpeer;for(inti =0; i < size; i++){for(intdegree =0; degree < threshold+1; degree++){if(degree ==0) mpz_set(coefficient,secrets[i]);...
voidSecretShare::getShares(mpz_t** shares,mpz_t* secrets,intsize){mpz_tcoefficient; mpz_init(coefficient);mpz_ttemp;mpz_init_set_ui(temp,0);intpeer;for(inti =0; i < size; i++){for(intdegree =0; degree < threshold+1; degree++){if(degree ==0) mpz_set(coefficient,secrets[i]);...