Cipolla's algorithm: Difference between revisions

Content added Content deleted
m (Automated syntax highlighting fixup (second round - minor fixes))
m (we're testing if x is in F_p. Thus r.x, not r.y)
Line 1,372: Line 1,372:


// Step 3, check x in Fp
// Step 3, check x in Fp
if (!r.y.equals(BigInteger.ZERO)) {
if (!r.x.equals(BigInteger.ZERO)) {
return new Triple(BigInteger.ZERO, BigInteger.ZERO, false);
return new Triple(BigInteger.ZERO, BigInteger.ZERO, false);
}
}