public static bool IsValid(IntBig x, IntBig y, IntBig a4, IntBig a6, IntBig modulo) { MIntBig my = new MIntBig(y, modulo); MIntBig mx = new MIntBig(x, modulo); MIntBig ma4 = new MIntBig(a4, modulo); MIntBig ma6 = new MIntBig(a6, modulo); MIntBig my2 = my * my; MIntBig mx2 = mx * mx * mx + ma4 * mx + ma6; return(my2 == mx2); }
public static bool IsValid(IntBig x, IntBig y, IntBig z, IntBig a4, IntBig a6, IntBig modulo) { MIntBig my = new MIntBig(y, modulo); MIntBig mx = new MIntBig(x, modulo); MIntBig mz = new MIntBig(z, modulo); MIntBig ma4 = new MIntBig(a4, modulo); MIntBig ma6 = new MIntBig(a6, modulo); MIntBig mz2 = mz * mz; MIntBig mz4 = mz2 * mz2; MIntBig mz6 = mz4 * mz2; MIntBig my2 = my * my; MIntBig mx2 = mx * mx * mx + ma4 * mx * mz4 + ma6 * mz6; return(my2 == mx2); }