Home
last modified time | relevance | path

Searched refs:keySize (Results 1 – 25 of 98) sorted by relevance

1234

/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/
DPKCS5S1ParametersGenerator.java63 int keySize) in generateDerivedParameters() argument
65 keySize = keySize / 8; in generateDerivedParameters()
67 if (keySize > digest.getDigestSize()) in generateDerivedParameters()
70 "Can't generate a derived key " + keySize + " bytes long."); in generateDerivedParameters()
75 return new KeyParameter(dKey, 0, keySize); in generateDerivedParameters()
89 int keySize, in generateDerivedParameters() argument
92 keySize = keySize / 8; in generateDerivedParameters()
95 if ((keySize + ivSize) > digest.getDigestSize()) in generateDerivedParameters()
98 "Can't generate a derived key " + (keySize + ivSize) + " bytes long."); in generateDerivedParameters()
103 return new ParametersWithIV(new KeyParameter(dKey, 0, keySize), dKey, keySize, ivSize); in generateDerivedParameters()
[all …]
DOpenSSLPBEParametersGenerator.java91 int keySize) in generateDerivedParameters() argument
93 keySize = keySize / 8; in generateDerivedParameters()
95 byte[] dKey = generateDerivedKey(keySize); in generateDerivedParameters()
97 return new KeyParameter(dKey, 0, keySize); in generateDerivedParameters()
111 int keySize, in generateDerivedParameters() argument
114 keySize = keySize / 8; in generateDerivedParameters()
117 byte[] dKey = generateDerivedKey(keySize + ivSize); in generateDerivedParameters()
119 return new ParametersWithIV(new KeyParameter(dKey, 0, keySize), dKey, keySize, ivSize); in generateDerivedParameters()
131 int keySize) in generateDerivedMacParameters() argument
133 return generateDerivedParameters(keySize); in generateDerivedMacParameters()
DPKCS5S2ParametersGenerator.java116 int keySize) in generateDerivedParameters() argument
118 keySize = keySize / 8; in generateDerivedParameters()
120 byte[] dKey = Arrays.copyOfRange(generateDerivedKey(keySize), 0, keySize); in generateDerivedParameters()
122 return new KeyParameter(dKey, 0, keySize); in generateDerivedParameters()
135 int keySize, in generateDerivedParameters() argument
138 keySize = keySize / 8; in generateDerivedParameters()
141 byte[] dKey = generateDerivedKey(keySize + ivSize); in generateDerivedParameters()
143 return new ParametersWithIV(new KeyParameter(dKey, 0, keySize), dKey, keySize, ivSize); in generateDerivedParameters()
154 int keySize) in generateDerivedMacParameters() argument
156 return generateDerivedParameters(keySize); in generateDerivedMacParameters()
DPKCS12ParametersGenerator.java172 int keySize) in generateDerivedParameters() argument
174 keySize = keySize / 8; in generateDerivedParameters()
176 byte[] dKey = generateDerivedKey(KEY_MATERIAL, keySize); in generateDerivedParameters()
178 return new KeyParameter(dKey, 0, keySize); in generateDerivedParameters()
191 int keySize, in generateDerivedParameters() argument
194 keySize = keySize / 8; in generateDerivedParameters()
197 byte[] dKey = generateDerivedKey(KEY_MATERIAL, keySize); in generateDerivedParameters()
201 return new ParametersWithIV(new KeyParameter(dKey, 0, keySize), iv, 0, ivSize); in generateDerivedParameters()
212 int keySize) in generateDerivedMacParameters() argument
214 keySize = keySize / 8; in generateDerivedMacParameters()
[all …]
/external/conscrypt/common/src/main/java/org/conscrypt/
DKeyGeneratorImpl.java42 protected void checkKeySize(int keySize) { in checkKeySize() argument
43 if (keySize <= 0) { in checkKeySize()
65 protected void engineInit(int keySize, SecureRandom secureRandom) { in engineInit() argument
66 checkKeySize(keySize); in engineInit()
67 this.keySizeBits = keySize; in engineInit()
129 protected void checkKeySize(int keySize) { in checkKeySize() argument
130 if ((keySize != 112) && (keySize != 168)) { in checkKeySize()
159 protected void checkKeySize(int keySize) { in checkKeySize() argument
160 if ((keySize != 128) && (keySize != 192) && (keySize != 256)) { in checkKeySize()
173 protected void checkKeySize(int keySize) { in checkKeySize() argument
[all …]
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/generators/
DPKCS5S1ParametersGenerator.java65 int keySize) in generateDerivedParameters() argument
67 keySize = keySize / 8; in generateDerivedParameters()
69 if (keySize > digest.getDigestSize()) in generateDerivedParameters()
72 "Can't generate a derived key " + keySize + " bytes long."); in generateDerivedParameters()
77 return new KeyParameter(dKey, 0, keySize); in generateDerivedParameters()
91 int keySize, in generateDerivedParameters() argument
94 keySize = keySize / 8; in generateDerivedParameters()
97 if ((keySize + ivSize) > digest.getDigestSize()) in generateDerivedParameters()
100 "Can't generate a derived key " + (keySize + ivSize) + " bytes long."); in generateDerivedParameters()
105 return new ParametersWithIV(new KeyParameter(dKey, 0, keySize), dKey, keySize, ivSize); in generateDerivedParameters()
[all …]
DOpenSSLPBEParametersGenerator.java97 int keySize) in generateDerivedParameters() argument
99 keySize = keySize / 8; in generateDerivedParameters()
101 byte[] dKey = generateDerivedKey(keySize); in generateDerivedParameters()
103 return new KeyParameter(dKey, 0, keySize); in generateDerivedParameters()
117 int keySize, in generateDerivedParameters() argument
120 keySize = keySize / 8; in generateDerivedParameters()
123 byte[] dKey = generateDerivedKey(keySize + ivSize); in generateDerivedParameters()
125 return new ParametersWithIV(new KeyParameter(dKey, 0, keySize), dKey, keySize, ivSize); in generateDerivedParameters()
137 int keySize) in generateDerivedMacParameters() argument
139 return generateDerivedParameters(keySize); in generateDerivedMacParameters()
DPKCS5S2ParametersGenerator.java118 int keySize) in generateDerivedParameters() argument
120 keySize = keySize / 8; in generateDerivedParameters()
122 byte[] dKey = Arrays.copyOfRange(generateDerivedKey(keySize), 0, keySize); in generateDerivedParameters()
124 return new KeyParameter(dKey, 0, keySize); in generateDerivedParameters()
137 int keySize, in generateDerivedParameters() argument
140 keySize = keySize / 8; in generateDerivedParameters()
143 byte[] dKey = generateDerivedKey(keySize + ivSize); in generateDerivedParameters()
145 return new ParametersWithIV(new KeyParameter(dKey, 0, keySize), dKey, keySize, ivSize); in generateDerivedParameters()
156 int keySize) in generateDerivedMacParameters() argument
158 return generateDerivedParameters(keySize); in generateDerivedMacParameters()
DPKCS12ParametersGenerator.java174 int keySize) in generateDerivedParameters() argument
176 keySize = keySize / 8; in generateDerivedParameters()
178 byte[] dKey = generateDerivedKey(KEY_MATERIAL, keySize); in generateDerivedParameters()
180 return new KeyParameter(dKey, 0, keySize); in generateDerivedParameters()
193 int keySize, in generateDerivedParameters() argument
196 keySize = keySize / 8; in generateDerivedParameters()
199 byte[] dKey = generateDerivedKey(KEY_MATERIAL, keySize); in generateDerivedParameters()
203 return new ParametersWithIV(new KeyParameter(dKey, 0, keySize), iv, 0, ivSize); in generateDerivedParameters()
214 int keySize) in generateDerivedMacParameters() argument
216 keySize = keySize / 8; in generateDerivedMacParameters()
[all …]
/external/conscrypt/repackaged/common/src/main/java/com/android/org/conscrypt/
DKeyGeneratorImpl.java45 protected void checkKeySize(int keySize) { in checkKeySize() argument
46 if (keySize <= 0) { in checkKeySize()
68 protected void engineInit(int keySize, SecureRandom secureRandom) { in engineInit() argument
69 checkKeySize(keySize); in engineInit()
70 this.keySizeBits = keySize; in engineInit()
167 protected void checkKeySize(int keySize) { in checkKeySize() argument
168 if ((keySize != 112) && (keySize != 168)) { in checkKeySize()
202 protected void checkKeySize(int keySize) { in checkKeySize() argument
203 if ((keySize != 128) && (keySize != 192) && (keySize != 256)) { in checkKeySize()
221 protected void checkKeySize(int keySize) { in checkKeySize() argument
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/
DPBESecretKeyFactory.java19 private int keySize; field in PBESecretKeyFactory
28 int keySize, in PBESecretKeyFactory() argument
36 this.keySize = keySize; in PBESecretKeyFactory()
51 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, null); in engineGenerateSecret()
56 param = PBE.Util.makePBEParameters(pbeSpec, scheme, digest, keySize, ivSize); in engineGenerateSecret()
60 param = PBE.Util.makePBEMacParameters(pbeSpec, scheme, digest, keySize); in engineGenerateSecret()
63 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, param); in engineGenerateSecret()
DBaseMac.java42 private int keySize = 160; field in BaseMac
54 int keySize) in BaseMac() argument
59 this.keySize = keySize; in BaseMac()
103 int keySize = 160; in engineInit() local
120 keySize = 224; in engineInit()
125 keySize = 256; in engineInit()
130 keySize = 384; in engineInit()
135 keySize = 512; in engineInit()
151 param = PBE.Util.makePBEMacParameters(k, PKCS12, digest, keySize, pbeSpec); in engineInit()
DPBE.java241 int keySize, in makePBEParameters() argument
266 param = generator.generateDerivedParameters(keySize, ivSize); in makePBEParameters()
285 param = generator.generateDerivedParameters(keySize); in makePBEParameters()
411 int keySize) in makePBEMacParameters() argument
421 param = generator.generateDerivedMacParameters(keySize); in makePBEMacParameters()
439 int keySize, in makePBEParameters() argument
452 param = generator.generateDerivedParameters(keySize, ivSize); in makePBEParameters()
456 param = generator.generateDerivedParameters(keySize); in makePBEParameters()
476 int keySize, in makePBEMacParameters() argument
486 param = generator.generateDerivedMacParameters(keySize); in makePBEMacParameters()
DBCPBEKey.java21 int keySize; field in BCPBEKey
35 int keySize, in BCPBEKey() argument
44 this.keySize = keySize; in BCPBEKey()
113 return keySize; in getKeySize()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/symmetric/util/
DPBESecretKeyFactory.java23 private int keySize; field in PBESecretKeyFactory
32 int keySize, in PBESecretKeyFactory() argument
40 this.keySize = keySize; in PBESecretKeyFactory()
55 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, null); in engineGenerateSecret()
60 param = PBE.Util.makePBEParameters(pbeSpec, scheme, digest, keySize, ivSize); in engineGenerateSecret()
64 param = PBE.Util.makePBEMacParameters(pbeSpec, scheme, digest, keySize); in engineGenerateSecret()
67 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, param); in engineGenerateSecret()
DBaseMac.java46 private int keySize = 160; field in BaseMac
58 int keySize) in BaseMac() argument
63 this.keySize = keySize; in BaseMac()
107 int keySize = 160; in engineInit() local
124 keySize = 224; in engineInit()
129 keySize = 256; in engineInit()
134 keySize = 384; in engineInit()
139 keySize = 512; in engineInit()
155 param = PBE.Util.makePBEMacParameters(k, PKCS12, digest, keySize, pbeSpec); in engineInit()
DPBE.java245 int keySize, in makePBEParameters() argument
270 param = generator.generateDerivedParameters(keySize, ivSize); in makePBEParameters()
289 param = generator.generateDerivedParameters(keySize); in makePBEParameters()
415 int keySize) in makePBEMacParameters() argument
425 param = generator.generateDerivedMacParameters(keySize); in makePBEMacParameters()
443 int keySize, in makePBEParameters() argument
456 param = generator.generateDerivedParameters(keySize, ivSize); in makePBEParameters()
460 param = generator.generateDerivedParameters(keySize); in makePBEParameters()
480 int keySize, in makePBEMacParameters() argument
490 param = generator.generateDerivedMacParameters(keySize); in makePBEMacParameters()
DBCPBEKey.java25 int keySize; field in BCPBEKey
39 int keySize, in BCPBEKey() argument
48 this.keySize = keySize; in BCPBEKey()
117 return keySize; in getKeySize()
/external/conscrypt/repackaged/testing/src/main/java/com/android/org/conscrypt/java/security/
DAlgorithmParameterSymmetricHelper.java35 private final int keySize; field in AlgorithmParameterSymmetricHelper
38 public AlgorithmParameterSymmetricHelper(String algorithmName, int keySize) { in AlgorithmParameterSymmetricHelper() argument
40 this.keySize = keySize; in AlgorithmParameterSymmetricHelper()
43 public AlgorithmParameterSymmetricHelper(String algorithmName, String blockmode, int keySize) { in AlgorithmParameterSymmetricHelper() argument
44 this(algorithmName, keySize); in AlgorithmParameterSymmetricHelper()
51 generator.init(keySize); in test()
/external/conscrypt/testing/src/main/java/org/conscrypt/java/security/
DAlgorithmParameterSymmetricHelper.java31 private final int keySize; field in AlgorithmParameterSymmetricHelper
34 public AlgorithmParameterSymmetricHelper(String algorithmName, int keySize) { in AlgorithmParameterSymmetricHelper() argument
36 this.keySize = keySize; in AlgorithmParameterSymmetricHelper()
39 public AlgorithmParameterSymmetricHelper(String algorithmName, String blockmode, int keySize) { in AlgorithmParameterSymmetricHelper() argument
40 this(algorithmName, keySize); in AlgorithmParameterSymmetricHelper()
47 generator.init(keySize); in test()
/external/lzma/CPP/7zip/Crypto/
DMyAes.h31 CAesCbcCoder(bool encodeMode, unsigned keySize);
47 CAesCbcEncoder(unsigned keySize = 0): CAesCbcCoder(true, keySize) {} in CAesCbcCoder()
52 CAesCbcDecoder(unsigned keySize = 0): CAesCbcCoder(false, keySize) {} in CAesCbcCoder()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/
DDES.java224 int keySize, in engineInit() argument
227 super.engineInit(keySize, random); in engineInit()
305 private int keySize; field in DES.DESPBEKeyFactory
314 int keySize, in DESPBEKeyFactory() argument
322 this.keySize = keySize; in DESPBEKeyFactory()
348 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, null); in engineGenerateSecret()
356 param = PBE.Util.makePBEParameters(pbeSpec, scheme, digest, keySize, ivSize); in engineGenerateSecret()
360 param = PBE.Util.makePBEMacParameters(pbeSpec, scheme, digest, keySize); in engineGenerateSecret()
375 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, param); in engineGenerateSecret()
DPBES2AlgorithmParameters.java47 private final int keySize; field in PBES2AlgorithmParameters.BasePBEWithHmacAlgorithmParameters
56 int keySize, in BasePBEWithHmacAlgorithmParameters() argument
61 this.keySize = keySize; in BasePBEWithHmacAlgorithmParameters()
137 pbeSpec.getSalt(), pbeSpec.getIterationCount(), keySize, kdf)), in engineInit()
299 for (int keySize : keySizes) { in configure()
302 "AlgorithmParameters.PBEWithHmacSHA" + shaVariant + "AndAES_" + keySize, in configure()
303 PREFIX + "$PBEWithHmacSHA" + shaVariant + "AES" + keySize in configure()
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/symmetric/
DDES.java240 int keySize, in engineInit() argument
243 super.engineInit(keySize, random); in engineInit()
327 private int keySize; field in DES.DESPBEKeyFactory
336 int keySize, in DESPBEKeyFactory() argument
344 this.keySize = keySize; in DESPBEKeyFactory()
370 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, null); in engineGenerateSecret()
378 param = PBE.Util.makePBEParameters(pbeSpec, scheme, digest, keySize, ivSize); in engineGenerateSecret()
382 param = PBE.Util.makePBEMacParameters(pbeSpec, scheme, digest, keySize); in engineGenerateSecret()
397 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, param); in engineGenerateSecret()
/external/lzma/C/
DAes.c143 void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *w, const Byte *key, unsigned keySize) in Aes_SetKey_Enc() argument
146 wSize = keySize + 28; in Aes_SetKey_Enc()
147 keySize /= 4; in Aes_SetKey_Enc()
148 w[0] = ((UInt32)keySize / 2) + 3; in Aes_SetKey_Enc()
151 for (i = 0; i < keySize; i++, key += 4) in Aes_SetKey_Enc()
157 unsigned rem = i % keySize; in Aes_SetKey_Enc()
159 t = Ui32(Sbox[gb1(t)] ^ Rcon[i / keySize], Sbox[gb2(t)], Sbox[gb3(t)], Sbox[gb0(t)]); in Aes_SetKey_Enc()
160 else if (keySize > 6 && rem == 4) in Aes_SetKey_Enc()
162 w[i] = w[i - keySize] ^ t; in Aes_SetKey_Enc()
166 void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *w, const Byte *key, unsigned keySize) in Aes_SetKey_Dec() argument
[all …]

1234