public boolean isZero() { return Nat.isZero(17, x); }
public boolean isZero() { return Nat.isZero(12, x); }
public boolean isZero() { return Nat.isZero(12, x); }
public boolean isZero() { return Nat.isZero(17, x); }
public static void negate(int[] x, int[] z) { if (Nat.isZero(17, x)) { Nat.zero(17, z); } else { Nat.sub(17, P, x, z); } }
public static void negate(int[] x, int[] z) { if (Nat.isZero(12, x)) { Nat.zero(12, z); } else { Nat.sub(12, P, x, z); } }
public static void negate(int[] x, int[] z) { if (Nat.isZero(12, x)) { Nat.zero(12, z); } else { Nat.sub(12, P, x, z); } }
public static void negate(int[] x, int[] z) { if (Nat.isZero(17, x)) { Nat.zero(17, z); } else { Nat.sub(17, P, x, z); } }
/** * return a sqrt root - the routine verifies that the calculation returns the right value - if * none exists it returns null. */ public ECFieldElement sqrt() { // Raise this element to the exponent 2^519 int[] x1 = this.x; if (Nat.isZero(17, x1) || Nat.isOne(17, x1)) { return this; } int[] t1 = Nat.create(17); int[] t2 = Nat.create(17); SecP521R1Field.squareN(x1, 519, t1); SecP521R1Field.square(t1, t2); return Nat.eq(17, x1, t2) ? new SecP521R1FieldElement(t1) : null; }
/** * return a sqrt root - the routine verifies that the calculation returns the right value - if * none exists it returns null. */ public ECFieldElement sqrt() { // Raise this element to the exponent 2^519 int[] x1 = this.x; if (Nat.isZero(17, x1) || Nat.isOne(17, x1)) { return this; } int[] t1 = Nat.create(17); int[] t2 = Nat.create(17); SecP521R1Field.squareN(x1, 519, t1); SecP521R1Field.square(t1, t2); return Nat.eq(17, x1, t2) ? new SecP521R1FieldElement(t1) : null; }
public static void invert(int[] p, int[] x, int[] z) if (Nat.isZero(len, x))
public static void invert(int[] p, int[] x, int[] z) if (Nat.isZero(len, x))
if (Nat.isZero(12, x1) || Nat.isOne(12, x1))
if (Nat.isZero(12, x1) || Nat.isOne(12, x1))