Home
last modified time | relevance | path

Searched refs:certainty (Results 1 – 25 of 53) sorted by relevance

123

/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/params/
DDSAParameterGenerationParameters.java13 private final int certainty; field in DSAParameterGenerationParameters
27 int certainty, in DSAParameterGenerationParameters() argument
30 this(L, N, certainty, random, -1); in DSAParameterGenerationParameters()
45 int certainty, in DSAParameterGenerationParameters() argument
51 this.certainty = certainty; in DSAParameterGenerationParameters()
68 return certainty; in getCertainty()
DRSAKeyGenerationParameters.java12 private int certainty; field in RSAKeyGenerationParameters
18 int certainty) in RSAKeyGenerationParameters() argument
36 this.certainty = certainty; in RSAKeyGenerationParameters()
46 return certainty; in getCertainty()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/params/
DDSAParameterGenerationParameters.java17 private final int certainty; field in DSAParameterGenerationParameters
31 int certainty, in DSAParameterGenerationParameters() argument
34 this(L, N, certainty, random, -1); in DSAParameterGenerationParameters()
49 int certainty, in DSAParameterGenerationParameters() argument
55 this.certainty = certainty; in DSAParameterGenerationParameters()
72 return certainty; in getCertainty()
DRSAKeyGenerationParameters.java16 private int certainty; field in RSAKeyGenerationParameters
22 int certainty) in RSAKeyGenerationParameters() argument
40 this.certainty = certainty; in RSAKeyGenerationParameters()
50 return certainty; in getCertainty()
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/crypto/params/
DDSAParameterGenerationParameters.java17 private final int certainty; field in DSAParameterGenerationParameters
31 int certainty, in DSAParameterGenerationParameters() argument
34 this(L, N, certainty, random, -1); in DSAParameterGenerationParameters()
49 int certainty, in DSAParameterGenerationParameters() argument
55 this.certainty = certainty; in DSAParameterGenerationParameters()
72 return certainty; in getCertainty()
DRSAKeyGenerationParameters.java16 private int certainty; field in RSAKeyGenerationParameters
22 int certainty) in RSAKeyGenerationParameters() argument
40 this.certainty = certainty; in RSAKeyGenerationParameters()
50 return certainty; in getCertainty()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/
DRSAKeyPairGenerator.java201 private static int getNumberOfIterations(int bits, int certainty) in getNumberOfIterations() argument
210 return certainty <= 100 ? 3 in getNumberOfIterations()
211 : certainty <= 128 ? 4 in getNumberOfIterations()
212 : 4 + (certainty - 128 + 1) / 2; in getNumberOfIterations()
216 return certainty <= 100 ? 4 in getNumberOfIterations()
217 : certainty <= 112 ? 5 in getNumberOfIterations()
218 : 5 + (certainty - 112 + 1) / 2; in getNumberOfIterations()
222 return certainty <= 80 ? 5 in getNumberOfIterations()
223 : certainty <= 100 ? 7 in getNumberOfIterations()
224 : 7 + (certainty - 100 + 1) / 2; in getNumberOfIterations()
[all …]
DDHParametersGenerator.java11 private int certainty; field in DHParametersGenerator
25 int certainty, in init() argument
29 this.certainty = certainty; in init()
45 BigInteger[] safePrimes = DHParametersHelper.generateSafePrimes(size, certainty, random); in generateParameters()
DDHParametersHelper.java24 static BigInteger[] generateSafePrimes(int size, int certainty, SecureRandom random) in generateSafePrimes() argument
44 if (!p.isProbablePrime(certainty)) in generateSafePrimes()
49 if (certainty > 2 && !q.isProbablePrime(certainty - 2)) in generateSafePrimes()
DDSAParametersGenerator.java28 private int certainty; field in DSAParametersGenerator
55 int certainty, in init() argument
60 this.certainty = certainty; in init()
61 this.iterations = Math.max(getMinimumIterations(L), (certainty + 1) / 2); in init()
104 this.certainty = params.getCertainty(); in init()
105 this.iterations = Math.max(getMinimumIterations(L), (certainty + 1) / 2); in init()
346 return x.isProbablePrime(certainty); in isProbablePrime()
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/crypto/generators/
DRSAKeyPairGenerator.java203 private static int getNumberOfIterations(int bits, int certainty) in getNumberOfIterations() argument
212 return certainty <= 100 ? 3 in getNumberOfIterations()
213 : certainty <= 128 ? 4 in getNumberOfIterations()
214 : 4 + (certainty - 128 + 1) / 2; in getNumberOfIterations()
218 return certainty <= 100 ? 4 in getNumberOfIterations()
219 : certainty <= 112 ? 5 in getNumberOfIterations()
220 : 5 + (certainty - 112 + 1) / 2; in getNumberOfIterations()
224 return certainty <= 80 ? 5 in getNumberOfIterations()
225 : certainty <= 100 ? 7 in getNumberOfIterations()
226 : 7 + (certainty - 100 + 1) / 2; in getNumberOfIterations()
[all …]
DDHParametersGenerator.java15 private int certainty; field in DHParametersGenerator
29 int certainty, in init() argument
33 this.certainty = certainty; in init()
49 BigInteger[] safePrimes = DHParametersHelper.generateSafePrimes(size, certainty, random); in generateParameters()
DDHParametersHelper.java25 static BigInteger[] generateSafePrimes(int size, int certainty, SecureRandom random) in generateSafePrimes() argument
45 if (!p.isProbablePrime(certainty)) in generateSafePrimes()
50 if (certainty > 2 && !q.isProbablePrime(certainty - 2)) in generateSafePrimes()
DDSAParametersGenerator.java30 private int certainty; field in DSAParametersGenerator
57 int certainty, in init() argument
62 this.certainty = certainty; in init()
63 this.iterations = Math.max(getMinimumIterations(L), (certainty + 1) / 2); in init()
106 this.certainty = params.getCertainty(); in init()
107 this.iterations = Math.max(getMinimumIterations(L), (certainty + 1) / 2); in init()
348 return x.isProbablePrime(certainty); in isProbablePrime()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/generators/
DRSAKeyPairGenerator.java203 private static int getNumberOfIterations(int bits, int certainty) in getNumberOfIterations() argument
212 return certainty <= 100 ? 3 in getNumberOfIterations()
213 : certainty <= 128 ? 4 in getNumberOfIterations()
214 : 4 + (certainty - 128 + 1) / 2; in getNumberOfIterations()
218 return certainty <= 100 ? 4 in getNumberOfIterations()
219 : certainty <= 112 ? 5 in getNumberOfIterations()
220 : 5 + (certainty - 112 + 1) / 2; in getNumberOfIterations()
224 return certainty <= 80 ? 5 in getNumberOfIterations()
225 : certainty <= 100 ? 7 in getNumberOfIterations()
226 : 7 + (certainty - 100 + 1) / 2; in getNumberOfIterations()
[all …]
DDHParametersGenerator.java15 private int certainty; field in DHParametersGenerator
29 int certainty, in init() argument
33 this.certainty = certainty; in init()
49 BigInteger[] safePrimes = DHParametersHelper.generateSafePrimes(size, certainty, random); in generateParameters()
DDHParametersHelper.java25 static BigInteger[] generateSafePrimes(int size, int certainty, SecureRandom random) in generateSafePrimes() argument
45 if (!p.isProbablePrime(certainty)) in generateSafePrimes()
50 if (certainty > 2 && !q.isProbablePrime(certainty - 2)) in generateSafePrimes()
DDSAParametersGenerator.java30 private int certainty; field in DSAParametersGenerator
57 int certainty, in init() argument
62 this.certainty = certainty; in init()
63 this.iterations = Math.max(getMinimumIterations(L), (certainty + 1) / 2); in init()
106 this.certainty = params.getCertainty(); in init()
107 this.iterations = Math.max(getMinimumIterations(L), (certainty + 1) / 2); in init()
348 return x.isProbablePrime(certainty); in isProbablePrime()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/
DAlgorithmParameterGeneratorSpi.java78 int certainty = PrimeCertaintyCalculator.getDefaultCertainty(strength); in engineGenerateParameters() local
82 params = new DSAParameterGenerationParameters(1024, 160, certainty, random); in engineGenerateParameters()
87 params = new DSAParameterGenerationParameters(strength, 256, certainty, random); in engineGenerateParameters()
92 pGen.init(strength, certainty, random); in engineGenerateParameters()
DKeyPairGeneratorSpi.java126 int certainty = PrimeCertaintyCalculator.getDefaultCertainty(strength); in generateKeyPair() local
140 pGen.init(strength, certainty, random); in generateKeyPair()
144 … dsaParams = new DSAParameterGenerationParameters(1024, 160, certainty, random); in generateKeyPair()
150 … dsaParams = new DSAParameterGenerationParameters(strength, 256, certainty, random); in generateKeyPair()
157 pGen.init(strength, certainty, random); in generateKeyPair()
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/jcajce/provider/asymmetric/dsa/
DAlgorithmParameterGeneratorSpi.java82 int certainty = PrimeCertaintyCalculator.getDefaultCertainty(strength); in engineGenerateParameters() local
86 params = new DSAParameterGenerationParameters(1024, 160, certainty, random); in engineGenerateParameters()
91 params = new DSAParameterGenerationParameters(strength, 256, certainty, random); in engineGenerateParameters()
96 pGen.init(strength, certainty, random); in engineGenerateParameters()
DKeyPairGeneratorSpi.java130 int certainty = PrimeCertaintyCalculator.getDefaultCertainty(strength); in generateKeyPair() local
144 pGen.init(strength, certainty, random); in generateKeyPair()
148 … dsaParams = new DSAParameterGenerationParameters(1024, 160, certainty, random); in generateKeyPair()
154 … dsaParams = new DSAParameterGenerationParameters(strength, 256, certainty, random); in generateKeyPair()
161 pGen.init(strength, certainty, random); in generateKeyPair()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/asymmetric/dsa/
DAlgorithmParameterGeneratorSpi.java82 int certainty = PrimeCertaintyCalculator.getDefaultCertainty(strength); in engineGenerateParameters() local
86 params = new DSAParameterGenerationParameters(1024, 160, certainty, random); in engineGenerateParameters()
91 params = new DSAParameterGenerationParameters(strength, 256, certainty, random); in engineGenerateParameters()
96 pGen.init(strength, certainty, random); in engineGenerateParameters()
DKeyPairGeneratorSpi.java130 int certainty = PrimeCertaintyCalculator.getDefaultCertainty(strength); in generateKeyPair() local
144 pGen.init(strength, certainty, random); in generateKeyPair()
148 … dsaParams = new DSAParameterGenerationParameters(1024, 160, certainty, random); in generateKeyPair()
154 … dsaParams = new DSAParameterGenerationParameters(strength, 256, certainty, random); in generateKeyPair()
161 pGen.init(strength, certainty, random); in generateKeyPair()
/external/wycheproof/java/com/google/security/wycheproof/testcases/
DBigIntegerTest.java449 int certainty = 80; in testIsProbablePrime() local
451 if (n.isProbablePrime(certainty)) { in testIsProbablePrime()

123