Home
last modified time | relevance | path

Searched refs:bitLength (Results 1 – 25 of 178) sorted by relevance

12345678

/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/util/
DBigIntegers.java93 if (min.bitLength() > max.bitLength() / 2) in createRandomInRange()
100 BigInteger x = createRandomBigInteger(max.bitLength(), random); in createRandomInRange()
108 return createRandomBigInteger(max.subtract(min).bitLength() - 1, random).add(min); in createRandomInRange()
129 return (n.bitLength() + 7) / 8; in getUnsignedByteLength()
139 public static BigInteger createRandomBigInteger(int bitLength, SecureRandom random) in createRandomBigInteger() argument
141 return new BigInteger(1, createRandom(bitLength, random)); in createRandomBigInteger()
151 public static BigInteger createRandomPrime(int bitLength, int certainty, SecureRandom random) in createRandomPrime() argument
153 if (bitLength < 2) in createRandomPrime()
160 if (bitLength == 2) in createRandomPrime()
167 byte[] base = createRandom(bitLength, random); in createRandomPrime()
[all …]
DFingerprint.java39 public Fingerprint(byte[] source, int bitLength) in Fingerprint() argument
41 this.fingerprint = calculateFingerprint(source, bitLength); in Fingerprint()
128 public static byte[] calculateFingerprint(byte[] input, int bitLength) in calculateFingerprint() argument
130 if (bitLength % 8 != 0) in calculateFingerprint()
141 byte[] rv = new byte[bitLength / 8]; in calculateFingerprint()
148 if ((bitLength / 8) >= 32) { in calculateFingerprint()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/util/
DBigIntegers.java95 if (min.bitLength() > max.bitLength() / 2) in createRandomInRange()
102 BigInteger x = createRandomBigInteger(max.bitLength(), random); in createRandomInRange()
110 return createRandomBigInteger(max.subtract(min).bitLength() - 1, random).add(min); in createRandomInRange()
131 return (n.bitLength() + 7) / 8; in getUnsignedByteLength()
141 public static BigInteger createRandomBigInteger(int bitLength, SecureRandom random) in createRandomBigInteger() argument
143 return new BigInteger(1, createRandom(bitLength, random)); in createRandomBigInteger()
153 public static BigInteger createRandomPrime(int bitLength, int certainty, SecureRandom random) in createRandomPrime() argument
155 if (bitLength < 2) in createRandomPrime()
162 if (bitLength == 2) in createRandomPrime()
169 byte[] base = createRandom(bitLength, random); in createRandomPrime()
[all …]
DFingerprint.java41 public Fingerprint(byte[] source, int bitLength) in Fingerprint() argument
43 this.fingerprint = calculateFingerprint(source, bitLength); in Fingerprint()
130 public static byte[] calculateFingerprint(byte[] input, int bitLength) in calculateFingerprint() argument
132 if (bitLength % 8 != 0) in calculateFingerprint()
143 byte[] rv = new byte[bitLength / 8]; in calculateFingerprint()
150 if ((bitLength / 8) >= 32) { in calculateFingerprint()
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/archivers/zip/
DBinaryTree.java128 final int bitLength = (b & 0x0F) + 1; in decode() local
131 originalBitLengths[pos++] = bitLength; in decode()
134 maxLength = Math.max(maxLength, bitLength); in decode()
181 final int bitLength = originalBitLengths[k]; in decode() local
182 if (bitLength > 0) { in decode()
183 tree.addLeaf(0, Integer.reverse(codes[k] << 16), bitLength, k); in decode()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/math/ec/
DWNafUtil.java21 if ((k.bitLength() >>> 16) != 0) in generateCompactNaf()
32 int bits = _3k.bitLength(); in generateCompactNaf()
73 if ((k.bitLength() >>> 16) != 0) in generateCompactWindowNaf()
82 int[] wnaf = new int[k.bitLength() / width + 1]; in generateCompactWindowNaf()
92 while (pos <= k.bitLength()) in generateCompactWindowNaf()
130 int digits = Math.max(g.bitLength(), h.bitLength()) + 1; in generateJSF()
137 while ((d0 | d1) != 0 || k0.bitLength() > offset || k1.bitLength() > offset) in generateJSF()
198 int digits = _3k.bitLength() - 1; in generateNaf()
245 byte[] wnaf = new byte[k.bitLength() + 1]; in generateWindowNaf()
255 while (pos <= k.bitLength()) in generateWindowNaf()
DECFieldElement.java36 public int bitLength() in bitLength() method in ECFieldElement
38 return toBigInteger().bitLength(); in bitLength()
43 return bitLength() == 1; in isOne()
112 int bitLength = p.bitLength(); in calculateResidue() local
113 if (bitLength >= 96) in calculateResidue()
115 BigInteger firstWord = p.shiftRight(bitLength - 64); in calculateResidue()
118 return ONE.shiftLeft(bitLength).subtract(p); in calculateResidue()
161 return q.bitLength(); in getFieldSize()
312 P = new BigInteger(q.bitLength(), rand); in sqrt()
343 int n = k.bitLength(); in lucasSequence()
[all …]
DECAlgorithms.java195 int t = x.bitLength(); in referenceMultiply()
290 int widthP = Math.max(2, Math.min(16, WNafUtil.getWindowSize(k.bitLength()))); in implShamirsTrickWNaf()
291 int widthQ = Math.max(2, Math.min(16, WNafUtil.getWindowSize(l.bitLength()))); in implShamirsTrickWNaf()
314 … width = Math.max(2, Math.min(16, WNafUtil.getWindowSize(Math.max(k.bitLength(), l.bitLength()))));
395 int width = Math.max(2, Math.min(16, WNafUtil.getWindowSize(ki.bitLength()))); in implSumOfMultiplies()
450 …th = Math.max(2, Math.min(16, WNafUtil.getWindowSize(Math.max(kj0.bitLength(), kj1.bitLength()))));
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/ec/
DWNafUtil.java17 if ((k.bitLength() >>> 16) != 0) in generateCompactNaf()
28 int bits = _3k.bitLength(); in generateCompactNaf()
69 if ((k.bitLength() >>> 16) != 0) in generateCompactWindowNaf()
78 int[] wnaf = new int[k.bitLength() / width + 1]; in generateCompactWindowNaf()
88 while (pos <= k.bitLength()) in generateCompactWindowNaf()
126 int digits = Math.max(g.bitLength(), h.bitLength()) + 1; in generateJSF()
133 while ((d0 | d1) != 0 || k0.bitLength() > offset || k1.bitLength() > offset) in generateJSF()
194 int digits = _3k.bitLength() - 1; in generateNaf()
241 byte[] wnaf = new byte[k.bitLength() + 1]; in generateWindowNaf()
251 while (pos <= k.bitLength()) in generateWindowNaf()
DECFieldElement.java32 public int bitLength() in bitLength() method in ECFieldElement
34 return toBigInteger().bitLength(); in bitLength()
39 return bitLength() == 1; in isOne()
102 int bitLength = p.bitLength(); in calculateResidue() local
103 if (bitLength >= 96) in calculateResidue()
105 BigInteger firstWord = p.shiftRight(bitLength - 64); in calculateResidue()
108 return ONE.shiftLeft(bitLength).subtract(p); in calculateResidue()
151 return q.bitLength(); in getFieldSize()
302 P = new BigInteger(q.bitLength(), rand); in sqrt()
333 int n = k.bitLength(); in lucasSequence()
[all …]
DECAlgorithms.java191 int t = x.bitLength(); in referenceMultiply()
286 int widthP = Math.max(2, Math.min(16, WNafUtil.getWindowSize(k.bitLength()))); in implShamirsTrickWNaf()
287 int widthQ = Math.max(2, Math.min(16, WNafUtil.getWindowSize(l.bitLength()))); in implShamirsTrickWNaf()
310 … width = Math.max(2, Math.min(16, WNafUtil.getWindowSize(Math.max(k.bitLength(), l.bitLength()))));
391 int width = Math.max(2, Math.min(16, WNafUtil.getWindowSize(ki.bitLength()))); in implSumOfMultiplies()
446 …th = Math.max(2, Math.min(16, WNafUtil.getWindowSize(Math.max(kj0.bitLength(), kj1.bitLength()))));
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/math/field/
DFiniteFields.java34 int bitLength = characteristic.bitLength(); in getPrimeField() local
35 if (characteristic.signum() <= 0 || bitLength < 2) in getPrimeField()
40 if (bitLength < 3) in getPrimeField()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/math/field/
DFiniteFields.java38 int bitLength = characteristic.bitLength(); in getPrimeField() local
39 if (characteristic.signum() <= 0 || bitLength < 2) in getPrimeField()
44 if (bitLength < 3) in getPrimeField()
/external/bouncycastle/bcpkix/src/main/java/org/bouncycastle/cert/selector/
DMSOutlookKeyIdCalculator.java129 long bitLength = (byteCount << 3); in finish() local
141 processLength(bitLength); in finish()
159 protected abstract void processLength(long bitLength); in processLength() argument
211 long bitLength) in processLength() argument
218 X[14] = (int)(bitLength >>> 32); in processLength()
219 X[15] = (int)(bitLength & 0xffffffff); in processLength()
/external/wycheproof/java/com/google/security/wycheproof/testcases/
DRsaKeyTest.java1407 assertEquals(expectedKeySize, n.bitLength()); in checkPrivateCrtKey()
1414 assertTrue(d.bitLength() > expectedKeySize / 2); in checkPrivateCrtKey()
1417 assertTrue(p.bitLength() > 256); in checkPrivateCrtKey()
1418 assertTrue(q.bitLength() > 256); in checkPrivateCrtKey()
DDsaTest.java846 assertEquals(keysize, params.getP().bitLength()); in testKeyGeneration()
853 int qsize = params.getQ().bitLength(); in testKeyGeneration()
871 assertTrue(priv.getX().bitLength() >= qsize - 32); in testKeyGeneration()
993 int lengthDiff = q.bitLength() - k.bitLength(); in testBiasSha1WithDSA()
998 + q.bitLength() in testBiasSha1WithDSA()
1000 + k.bitLength()); in testBiasSha1WithDSA()
DDhTest.java255 int keySize = p.bitLength(); in testKeyPair()
265 assertTrue(x.bitLength() >= minPrivateKeyBits - 32); in testKeyPair()
309 assertTrue(minPrivateKeyBits - (keySize - r.bitLength()) > 160); in testKeyPair()
313 if (g.bitLength() >= 160) { in testKeyPair()
/external/conscrypt/repackaged/common/src/main/java/com/android/org/conscrypt/
DChainStrengthAnalyzer.java80 int modulusLength = ((RSAPublicKey) pubkey).getModulus().bitLength(); in checkKeyLength()
93 int pLength = ((DSAPublicKey) pubkey).getParams().getP().bitLength(); in checkKeyLength()
94 int qLength = ((DSAPublicKey) pubkey).getParams().getQ().bitLength(); in checkKeyLength()
/external/conscrypt/common/src/main/java/org/conscrypt/
DChainStrengthAnalyzer.java78 int modulusLength = ((RSAPublicKey) pubkey).getModulus().bitLength(); in checkKeyLength()
91 int pLength = ((DSAPublicKey) pubkey).getParams().getP().bitLength(); in checkKeyLength()
92 int qLength = ((DSAPublicKey) pubkey).getParams().getQ().bitLength(); in checkKeyLength()
/external/python/pyasn1/pyasn1/compat/
Dinteger.py39 bits = bitLength(value)
84 def bitLength(number): function
109 def bitLength(number): function
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/digests/
DGeneralDigest.java117 long bitLength = (byteCount << 3); in finish() local
129 processLength(bitLength); in finish()
159 protected abstract void processLength(long bitLength); in processLength() argument
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/digests/
DGeneralDigest.java115 long bitLength = (byteCount << 3); in finish() local
127 processLength(bitLength); in finish()
157 protected abstract void processLength(long bitLength); in processLength() argument
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/
DRSAKeyPairGenerator.java74 if (diff.bitLength() < mindiffbits || diff.compareTo(minDiff) <= 0) in generateKeyPair()
84 if (n.bitLength() != strength) in generateKeyPair()
193 int iterations = getNumberOfIterations(x.bitLength(), param.getCertainty()); in isProbablePrime()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/generators/
DRSAKeyPairGenerator.java76 if (diff.bitLength() < mindiffbits || diff.compareTo(minDiff) <= 0) in generateKeyPair()
86 if (n.bitLength() != strength) in generateKeyPair()
195 int iterations = getNumberOfIterations(x.bitLength(), param.getCertainty()); in isProbablePrime()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/math/
DPrimes.java167 if (candidate.bitLength() == 2) in enhancedMRProbablePrimeTest()
293 if (candidate.bitLength() == 2) in isMRProbablePrime()
344 if (candidate.bitLength() == 2) in isMRProbablePrimeToBase()
360 if (n == null || n.signum() < 1 || n.bitLength() < 2) in checkCandidate()
543 if (c.bitLength() > length) in implSTRandomPrime()

12345678