Exemplo n.º 1
0
void PFC::hash_and_map(G1& w,char *ID)
{
    Big x0=H1(ID);
	if (is_on_curve(x0)) w.g.set(x0);
    else                 w.g.set(-x0);
	w.g*=(*cof);
}
Exemplo n.º 2
0
void PFC::big_and_map(G1& w,const Big& x0)
{
	if (is_on_curve(x0)) w.g.set(x0);
    else                 w.g.set(-x0);
	w.g*=(*cof);
}
/* assumes input is in standard representation */
bool is_on_curve_point(struct curve_point p, unsigned int num_limbs) {
    return is_on_curve(p.x, p.y, num_limbs);
}