#include <crypto/group.h>

NTL_CLIENT


int main()
{
	// for reading group keys from file
	ifstream ifile("163.txt");
	if (!ifile) cout << " cannot open input file ";

	typedef ecgf2_group group;
	typedef group::GrpElt grpelt;

	group gp(ifile);

	grpelt x, y, y1;

	y = gp.mul(gp.mu, gp.g);
	y1 = gp.mul(gp.mu+1, gp.g);

	if (!gp.is_ident(y) || !gp.equal(y1, gp.g)) cerr << "oops\n";

	ostring s;
	s = gp.encode(x);

	gp.decode(y, s, 0);

	if (!gp.equal(y, x)) cerr << "oops2\n";


}

