Home
last modified time | relevance | path

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

123

/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.java93 int keySize) in generateDerivedParameters() argument
95 keySize = keySize / 8; in generateDerivedParameters()
97 byte[] dKey = generateDerivedKey(keySize); in generateDerivedParameters()
99 return new KeyParameter(dKey, 0, keySize); in generateDerivedParameters()
113 int keySize, in generateDerivedParameters() argument
116 keySize = keySize / 8; in generateDerivedParameters()
119 byte[] dKey = generateDerivedKey(keySize + ivSize); in generateDerivedParameters()
121 return new ParametersWithIV(new KeyParameter(dKey, 0, keySize), dKey, keySize, ivSize); in generateDerivedParameters()
133 int keySize) in generateDerivedMacParameters() argument
135 return generateDerivedParameters(keySize); in generateDerivedMacParameters()
DPKCS5S2ParametersGenerator.java119 int keySize) in generateDerivedParameters() argument
121 keySize = keySize / 8; in generateDerivedParameters()
123 byte[] dKey = Arrays.copyOfRange(generateDerivedKey(keySize), 0, keySize); in generateDerivedParameters()
125 return new KeyParameter(dKey, 0, keySize); in generateDerivedParameters()
138 int keySize, in generateDerivedParameters() argument
141 keySize = keySize / 8; in generateDerivedParameters()
144 byte[] dKey = generateDerivedKey(keySize + ivSize); in generateDerivedParameters()
146 return new ParametersWithIV(new KeyParameter(dKey, 0, keySize), dKey, keySize, ivSize); in generateDerivedParameters()
157 int keySize) in generateDerivedMacParameters() argument
159 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/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()
DPBE.java212 int keySize, in makePBEParameters() argument
237 param = generator.generateDerivedParameters(keySize, ivSize); in makePBEParameters()
256 param = generator.generateDerivedParameters(keySize); in makePBEParameters()
382 int keySize) in makePBEMacParameters() argument
392 param = generator.generateDerivedMacParameters(keySize); in makePBEMacParameters()
410 int keySize, in makePBEParameters() argument
423 param = generator.generateDerivedParameters(keySize, ivSize); in makePBEParameters()
427 param = generator.generateDerivedParameters(keySize); in makePBEParameters()
447 int keySize, in makePBEMacParameters() argument
457 param = generator.generateDerivedMacParameters(keySize); in makePBEMacParameters()
DBCPBEKey.java19 int keySize; field in BCPBEKey
33 int keySize, in BCPBEKey() argument
42 this.keySize = keySize; in BCPBEKey()
104 return keySize; in getKeySize()
DBaseMac.java43 private int keySize = 160; field in BaseMac
55 int keySize) in BaseMac() argument
60 this.keySize = keySize; in BaseMac()
104 int keySize = 160; in engineInit() local
117 keySize = 256; in engineInit()
120 param = PBE.Util.makePBEMacParameters(k, PKCS12, digest, keySize, pbeSpec); in engineInit()
DBaseKeyGenerator.java19 protected int keySize; field in BaseKeyGenerator
31 this.keySize = this.defaultKeySize = defaultKeySize; in BaseKeyGenerator()
54 int keySize, in engineInit() argument
63 engine.init(new KeyGenerationParameters(random, keySize)); in engineInit()
/external/lzma/CPP/7zip/Crypto/
DMyAes.h30 CAesCbcCoder(bool encodeMode, unsigned keySize);
41 CAesCbcEncoder(unsigned keySize = 0): CAesCbcCoder(true, keySize) {} in CAesCbcCoder()
46 CAesCbcDecoder(unsigned keySize = 0): CAesCbcCoder(false, keySize) {} in CAesCbcCoder()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/
DDES.java217 int keySize, in engineInit() argument
220 super.engineInit(keySize, random); in engineInit()
298 private int keySize; field in DES.DESPBEKeyFactory
307 int keySize, in DESPBEKeyFactory() argument
315 this.keySize = keySize; in DESPBEKeyFactory()
330 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, null); in engineGenerateSecret()
335 param = PBE.Util.makePBEParameters(pbeSpec, scheme, digest, keySize, ivSize); in engineGenerateSecret()
339 param = PBE.Util.makePBEMacParameters(pbeSpec, scheme, digest, keySize); in engineGenerateSecret()
354 … 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()
DPBEPBKDF2.java210 int keySize = pbeSpec.getKeyLength(); in engineGenerateSecret() local
212 … CipherParameters param = PBE.Util.makePBEMacParameters(pbeSpec, scheme, digest, keySize); in engineGenerateSecret()
214 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, param); in engineGenerateSecret()
219 int keySize = pbeSpec.getKeyLength(); in engineGenerateSecret() local
221 … CipherParameters param = PBE.Util.makePBEMacParameters(pbeSpec, scheme, digest, keySize); in engineGenerateSecret()
223 … return new BCPBEKey(this.algName, this.algOid, scheme, digest, keySize, ivSize, pbeSpec, param); in engineGenerateSecret()
/external/lzma/C/
DAes.c130 void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *w, const Byte *key, unsigned keySize) in Aes_SetKey_Enc() argument
133 wSize = keySize + 28; in Aes_SetKey_Enc()
134 keySize /= 4; in Aes_SetKey_Enc()
135 w[0] = ((UInt32)keySize / 2) + 3; in Aes_SetKey_Enc()
138 for (i = 0; i < keySize; i++, key += 4) in Aes_SetKey_Enc()
144 unsigned rem = i % keySize; in Aes_SetKey_Enc()
146 t = Ui32(Sbox[gb1(t)] ^ Rcon[i / keySize], Sbox[gb2(t)], Sbox[gb3(t)], Sbox[gb0(t)]); in Aes_SetKey_Enc()
147 else if (keySize > 6 && rem == 4) in Aes_SetKey_Enc()
149 w[i] = w[i - keySize] ^ t; in Aes_SetKey_Enc()
153 void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *w, const Byte *key, unsigned keySize) in Aes_SetKey_Dec() argument
[all …]
DAes.h23 typedef void (MY_FAST_CALL *AES_SET_KEY_FUNC)(UInt32 *aes, const Byte *key, unsigned keySize);
24 void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *aes, const Byte *key, unsigned keySize);
25 void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *aes, const Byte *key, unsigned keySize);
/external/tpm2/
DEncryptDecrypt.c28 UINT16 keySize; in TPM2_EncryptDecrypt() local
61 keySize = symKey->publicArea.parameters.symDetail.sym.keyBits.sym; in TPM2_EncryptDecrypt()
63 blockSize = CryptGetSymmetricBlockSize(alg, keySize); in TPM2_EncryptDecrypt()
90 keySize, in->mode, key, in TPM2_EncryptDecrypt()
100 keySize, in TPM2_EncryptDecrypt()
DCpriSym_fp.h34 #define _cpri__AESDecryptCTR(dOut, keySize, key, iv, dInSize, dIn) \ argument
35 _cpri__AESEncryptCTR(((BYTE *)dOut), ((UINT32)keySize), ((BYTE *)key), \
64 #define _cpri__SM4DecryptCTR(dOut, keySize, key, iv, dInSize, dIn) \ argument
65 _cpri__SM4EncryptCTR(((BYTE *)dOut), ((UINT32)keySize), ((BYTE *)key), \
Dstubs_hash.c13 UINT16 keySize, // IN: the size of the HMAC key in _cpri__StartHMAC() argument
25 if(keySize > blockSize) in _cpri__StartHMAC()
30 _cpri__UpdateHash(&localState, keySize, key); in _cpri__StartHMAC()
37 memcpy(oPadKey->buffer, key, keySize); in _cpri__StartHMAC()
38 oPadKey->size = keySize; in _cpri__StartHMAC()
/external/wycheproof/java/com/google/security/wycheproof/testcases/
DDhTest.java255 int keySize = p.bitLength(); in testKeyPair() local
256 assertEquals("wrong key size", keySize, expectedKeySize); in testKeyPair()
263 int minPrivateKeyBits = keySize / 2; in testKeyPair()
309 assertTrue(minPrivateKeyBits - (keySize - r.bitLength()) > 160); in testKeyPair()
326 int keySize = 1024; in testKeyPairGenerator() local
328 keyGen.initialize(keySize); in testKeyPairGenerator()
330 testKeyPair(keyPair, keySize); in testKeyPairGenerator()
DEcKeyTest.java209 int keySize = EcUtil.fieldSizeInBits(pub.getParams().getCurve()); in testDefaultKeyGeneration() local
210 if (keySize < 224) { in testDefaultKeyGeneration()
211 fail("Expected a default key size of at least 224 bits. Size of generate key is " + keySize); in testDefaultKeyGeneration()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/
DPBEParametersGenerator.java75 public abstract CipherParameters generateDerivedParameters(int keySize); in generateDerivedParameters() argument
85 public abstract CipherParameters generateDerivedParameters(int keySize, int ivSize); in generateDerivedParameters() argument
94 public abstract CipherParameters generateDerivedMacParameters(int keySize); in generateDerivedMacParameters() argument
/external/mesa3d/src/gallium/auxiliary/util/
Du_keymap.c85 hash(const void *key, unsigned keySize) in hash() argument
89 keySize /= 4; /* convert from bytes to uints */ in hash()
92 for (i = 0; i < keySize; i++) { in hash()
110 util_new_keymap(unsigned keySize, unsigned maxEntries, in util_new_keymap() argument
125 map->key_size = keySize; in util_new_keymap()
/external/icu/icu4c/source/samples/legacy/
Dnewcol.cpp76 int32_t keySize = 0; in test_current() local
83 keySize = getSortKey_current("ja", data[i], -1, keys[i], 32); in test_current()
84 fprintf(stderr, "For i=%d, size of sortkey is %d\n", i, keySize); in test_current()
Doldcol.cpp92 int32_t keySize = 0; in test_legacy() local
100 keySize = getSortKey_legacy("ja", data[i], -1, keys[i], 32); in test_legacy()
101 fprintf(stderr, "For i=%d, size of sortkey is %d\n", i, keySize); in test_legacy()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/spec/
DPBKDF2KeySpec.java28 …public PBKDF2KeySpec(char[] password, byte[] salt, int iterationCount, int keySize, AlgorithmIdent… in PBKDF2KeySpec() argument
30 super(password, salt, iterationCount, keySize); in PBKDF2KeySpec()

123