Home
last modified time | relevance | path

Searched refs:modPow (Results 1 – 25 of 35) sorted by relevance

12

/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/math/
DPrimes.java193 BigInteger z = b.modPow(m, w); in enhancedMRProbablePrimeTest()
205 z = z.modPow(TWO, w); in enhancedMRProbablePrimeTest()
226 z = z.modPow(TWO, w); in enhancedMRProbablePrimeTest()
451 BigInteger z = b.modPow(m, w); in implMRProbablePrimeToBase()
462 z = z.modPow(TWO, w); in implMRProbablePrimeToBase()
565 BigInteger z = a.modPow(tx2, c); in implSTRandomPrime()
567 if (c.gcd(z.subtract(ONE)).equals(ONE) && z.modPow(c0, c).equals(ONE)) in implSTRandomPrime()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/
DPrimes.java189 BigInteger z = b.modPow(m, w); in enhancedMRProbablePrimeTest()
201 z = z.modPow(TWO, w); in enhancedMRProbablePrimeTest()
222 z = z.modPow(TWO, w); in enhancedMRProbablePrimeTest()
447 BigInteger z = b.modPow(m, w); in implMRProbablePrimeToBase()
458 z = z.modPow(TWO, w); in implMRProbablePrimeToBase()
561 BigInteger z = a.modPow(tx2, c); in implSTRandomPrime()
563 if (c.gcd(z.subtract(ONE)).equals(ONE) && z.modPow(c0, c).equals(ONE)) in implSTRandomPrime()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/engines/
DRSACoreEngine.java192 mP = (input.remainder(p)).modPow(dP, p); in processBlock()
195 mQ = (input.remainder(q)).modPow(dQ, q); in processBlock()
210 return input.modPow( in processBlock()
DRSABlindedEngine.java111 BigInteger blindedInput = r.modPow(e, m).multiply(input).mod(m); in processBlock()
117 if (!input.equals(result.modPow(e, m))) in processBlock()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/engines/
DRSACoreEngine.java191 mP = (input.remainder(p)).modPow(dP, p); in processBlock()
194 mQ = (input.remainder(q)).modPow(dQ, q); in processBlock()
209 return input.modPow( in processBlock()
DRSABlindedEngine.java109 BigInteger blindedInput = r.modPow(e, m).multiply(input).mod(m); in processBlock()
115 if (!input.equals(result.modPow(e, m))) in processBlock()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/signers/
DDSASigner.java106 BigInteger r = params.getG().modPow(k.add(getRandomizer(q, random)), params.getP()).mod(q); in generateSignature()
146 u1 = params.getG().modPow(u1, p); in verifySignature()
147 u2 = ((DSAPublicKeyParameters)key).getY().modPow(u2, p); in verifySignature()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/signers/
DDSASigner.java108 BigInteger r = params.getG().modPow(k.add(getRandomizer(q, random)), params.getP()).mod(q); in generateSignature()
148 u1 = params.getG().modPow(u1, p); in verifySignature()
149 u2 = ((DSAPublicKeyParameters)key).getY().modPow(u2, p); in verifySignature()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/ec/
DECFieldElement.java260 return checkSqrt(new Fp(q, r, x.modPow(e, q))); in sqrt()
265 BigInteger t1 = x.modPow(q.shiftRight(3), q); in sqrt()
275 BigInteger t4 = ECConstants.TWO.modPow(q.shiftRight(2), q); in sqrt()
285 if (!(x.modPow(legendreExponent, q).equals(ECConstants.ONE))) in sqrt()
305 … || !modReduce(P.multiply(P).subtract(fourX)).modPow(legendreExponent, q).equals(qMinusOne)); in sqrt()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/math/ec/
DECFieldElement.java270 return checkSqrt(new Fp(q, r, x.modPow(e, q))); in sqrt()
275 BigInteger t1 = x.modPow(q.shiftRight(3), q); in sqrt()
285 BigInteger t4 = ECConstants.TWO.modPow(q.shiftRight(2), q); in sqrt()
295 if (!(x.modPow(legendreExponent, q).equals(ECConstants.ONE))) in sqrt()
315 … || !modReduce(P.multiply(P).subtract(fourX)).modPow(legendreExponent, q).equals(qMinusOne)); in sqrt()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/params/
DDSAPublicKeyParameters.java27 && ONE.equals(y.modPow(params.getQ(), params.getP()))) in validate()
DDHPublicKeyParameters.java37 if (ONE.equals(y.modPow(dhParams.getQ(), dhParams.getP()))) in validate()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/params/
DDSAPublicKeyParameters.java31 && ONE.equals(y.modPow(params.getQ(), params.getP()))) in validate()
DDHPublicKeyParameters.java41 if (ONE.equals(y.modPow(dhParams.getQ(), dhParams.getP()))) in validate()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/
DDHKeyGeneratorHelper.java65 return dhParams.getG().modPow(x, dhParams.getP()); in calculatePublic()
DDHParametersHelper.java103 g = h.modPow(TWO, p); in selectGenerator()
DDSAParametersGenerator.java214 BigInteger g = h.modPow(e, p); in calculateGenerator_FIPS186_2()
374 BigInteger g = W.modPow(e, p); in calculateGenerator_FIPS186_3_Verifiable()
DDSAKeyPairGenerator.java67 return g.modPow(x, p); in calculatePublicKey()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/agreement/
DDHBasicAgreement.java79 BigInteger result = peerY.modPow(key.getX(), p); in calculateAgreement()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/
DDHUtil.java17 BigInteger y = dhParams.getG().modPow(x, dhParams.getP()); in privateKeyToString()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/generators/
DDHKeyGeneratorHelper.java66 return dhParams.getG().modPow(x, dhParams.getP()); in calculatePublic()
DDHParametersHelper.java104 g = h.modPow(TWO, p); in selectGenerator()
DDSAKeyPairGenerator.java69 return g.modPow(x, p); in calculatePublicKey()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/asymmetric/dh/
DDHUtil.java18 BigInteger y = dhParams.getG().modPow(x, dhParams.getP()); in privateKeyToString()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/agreement/
DDHBasicAgreement.java81 BigInteger result = peerY.modPow(key.getX(), p); in calculateAgreement()

12