BigInteger ilInt = new BigInteger(1, il); Arrays.fill(il, (byte) 0); ECPoint ki = Sign.publicPointFromPrivate(ilInt).add(getPublicKeyPoint());
/** * 验签 * * @param M 签名信息 * @param signature 签名 * @param IDA 签名方唯一标识 * @param aPublicKey 签名方公钥 * @return true or false */ public boolean verify(String M, Signature signature, String IDA, ECPoint aPublicKey) { if (!between(signature.r, BigInteger.ONE, n)) return false; if (!between(signature.s, BigInteger.ONE, n)) return false; byte[] M_ = join(ZA(IDA, aPublicKey), M.getBytes()); BigInteger e = new BigInteger(1, sm3hash(M_)); BigInteger t = signature.r.add(signature.s).mod(n); if (t.equals(BigInteger.ZERO)) return false; ECPoint p1 = G.multiply(signature.s).normalize(); ECPoint p2 = aPublicKey.multiply(t).normalize(); BigInteger x1 = p1.add(p2).normalize().getXCoord().toBigInteger(); BigInteger R = e.add(x1).mod(n); if (R.equals(signature.r)) return true; return false; }
ECPoint temp = bPublicKey.add(RB.multiply(x2).normalize()).normalize(); ECPoint U = temp.multiply(ecc_bc_spec.getH().multiply(tA)).normalize(); if (U.isInfinity())
ECPoint temp = aPublicKey.add(RA.multiply(x1).normalize()).normalize(); ECPoint V = temp.multiply(ecc_bc_spec.getH().multiply(tB)).normalize(); if (V.isInfinity())
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }
public ECPoint threeTimes() { if (this.isInfinity() || this.y.isZero()) { return this; } // NOTE: Be careful about recursions between twicePlus and threeTimes return twice().add(this); }