ECPoint c1 = ecpub.getQ();this.p2 = userKey.multiply(k); reset();returnc1; } 开发者ID:nuls-io,项目名称:nuls,代码行数:11,代码来源:Cipher.java 示例5: expon ▲点赞 2▼ importorg.bouncycastle.math.ec.ECPoint;//导入方法依赖的package包/类publicECPointexpon(ECPoint base, BigInteger exp){re...
方法名:multiply ECPoint.multiply介绍 [英]Multiplies this ECPoint by the given number.[中]将这个ECPoint乘以给定的数字。 代码示例 代码示例来源:origin: web3j/web3j if (!R.multiply(n).isInfinity()) { return null; 代码示例来源:origin: SeanDragon/protools /** * 判断生成的公钥是否合法 * * @...
*/publicECPointMultiply(ECPointp, BigInteger k, PreCompInfo preCompInfo){// TODO Probably should try to add this// BigInteger e = k.Mod(n); // n == order of pBigInteger e = k; BigInteger h = e.Multiply(BigInteger.Three);ECPointneg = p.Negate();ECPointR = p;for(inti = h.BitL...
代码示例来源:origin: com.madgag.spongycastle/core public ECPoint multiply(ECPoint p, BigInteger k) { int sign = k.signum(); if (sign == 0 || p.isInfinity()) { return p.getCurve().getInfinity(); } ECPoint positive = multiplyPositive(p, k.abs()); ECPoint result = sign > 0 ? p...
ECPointtemp=aPublicKey.add(RA.multiply(x1).normalize()).normalize(); ECPointV=temp.multiply(ecc_bc_spec.getH().multiply(tB)).normalize(); if(V.isInfinity()) 代码示例来源:origin: org.bouncycastle/bcprov-debug-jdk15on publicECPointthreeTimes() ...
multiply(r.getAffineX().subtract(xOut))).mod(prime); ECPoint out = new ECPoint(xOut, yOut); return out; } 代码示例来源:origin: i2p/i2p.i2p private static ECPoint addPoint(ECPoint r, ECPoint s, EllipticCurve curve) { if (r.equals(s)) return doublePoint(r, curve); else if (r....
this : getCurve().createRawPoint(getRawXCoord().multiply(scale), getRawYCoord().negate(), getRawZCoords()); } public ECPoint scaleY(ECFieldElement scale) { return isInfinity() ? this : getCurve().createRawPoint(getRawXCoord(), getRawYCoord().multiply(scale), getRawZCoords())...
multiply(n).normalize(); if (product.getAffineXCoord() == null) { // Point at infinity return EcPoint.pointAtInfinity; } else { return new EcPoint(product.getAffineXCoord().toBigInteger(), product.getAffineYCoord().toBigInteger()); } } ...
getG().multiply(privateKey.getD()); byte[] publicDerBytes = Q.getEncoded(false); ECPoint point = ecSpec.getCurve().decodePoint(publicDerBytes); ECPublicKeySpec pubSpec = new ECPublicKeySpec(point, ecSpec); return (ECPublicKey) keyFactory.generatePublic(pubSpec); } ...
示例1: MultiplyPositive ▲點讚 9▼ /** * 'Zeroless' Signed Digit Left-to-Right. */protectedoverrideECPointMultiplyPositive(ECPoint p, BigInteger k){ ECPoint addP = p.Normalize(), subP = addP.Negate(); ECPoint R0 = addP;intn = k.BitLength;ints = k.GetLowestSetBit();inti = n;...