/external/cronet/third_party/boringssl/src/crypto/fipsmodule/rsa/ |
D | padding.c | 227 size_t hLen = EVP_MD_size(Hash); in RSA_verify_PKCS1_PSS_mgf1() local 229 sLen = (int)hLen; in RSA_verify_PKCS1_PSS_mgf1() 248 if (emLen < hLen + 2 || in RSA_verify_PKCS1_PSS_mgf1() 249 (sLen >= 0 && emLen < hLen + (size_t)sLen + 2)) { in RSA_verify_PKCS1_PSS_mgf1() 257 size_t maskedDBLen = emLen - hLen - 1; in RSA_verify_PKCS1_PSS_mgf1() 263 if (!PKCS1_MGF1(DB, maskedDBLen, H, hLen, mgf1Hash)) { in RSA_verify_PKCS1_PSS_mgf1() 293 !EVP_DigestUpdate(&ctx, mHash, hLen) || in RSA_verify_PKCS1_PSS_mgf1() 298 if (OPENSSL_memcmp(H_, H, hLen) != 0) { in RSA_verify_PKCS1_PSS_mgf1() 318 size_t hLen; in RSA_padding_add_PKCS1_PSS_mgf1() local 326 hLen = EVP_MD_size(Hash); in RSA_padding_add_PKCS1_PSS_mgf1() [all …]
|
/external/boringssl/src/crypto/fipsmodule/rsa/ |
D | padding.c | 227 size_t hLen = EVP_MD_size(Hash); in RSA_verify_PKCS1_PSS_mgf1() local 229 sLen = (int)hLen; in RSA_verify_PKCS1_PSS_mgf1() 248 if (emLen < hLen + 2 || in RSA_verify_PKCS1_PSS_mgf1() 249 (sLen >= 0 && emLen < hLen + (size_t)sLen + 2)) { in RSA_verify_PKCS1_PSS_mgf1() 257 size_t maskedDBLen = emLen - hLen - 1; in RSA_verify_PKCS1_PSS_mgf1() 263 if (!PKCS1_MGF1(DB, maskedDBLen, H, hLen, mgf1Hash)) { in RSA_verify_PKCS1_PSS_mgf1() 293 !EVP_DigestUpdate(&ctx, mHash, hLen) || in RSA_verify_PKCS1_PSS_mgf1() 298 if (OPENSSL_memcmp(H_, H, hLen) != 0) { in RSA_verify_PKCS1_PSS_mgf1() 318 size_t hLen; in RSA_padding_add_PKCS1_PSS_mgf1() local 326 hLen = EVP_MD_size(Hash); in RSA_padding_add_PKCS1_PSS_mgf1() [all …]
|
/external/ms-tpm-20-ref/TPMCmd/tpm/src/crypt/ |
D | CryptRsa.c | 333 UINT16 hLen = CryptHashGetDigestSize(hashAlg); in OaepEncode() local 343 if(hLen == 0) in OaepEncode() 348 if(padded->size < (2 * hLen) + 2) in OaepEncode() 352 if(message->size > (padded->size - (2 * hLen) - 2)) in OaepEncode() 357 pp = &padded->buffer[hLen + 1]; in OaepEncode() 359 hLen, pp) != hLen) in OaepEncode() 363 padLen = padded->size - message->size - (2 * hLen) - 2; in OaepEncode() 364 MemorySet(&pp[hLen], 0, padLen); in OaepEncode() 365 pp[hLen + padLen] = 0x01; in OaepEncode() 367 memcpy(&pp[hLen + padLen], message->buffer, message->size); in OaepEncode() [all …]
|
D | CryptHash.c | 680 UINT32 hLen; in CryptMGF_KDF() local 688 hLen = hDef->digestSize; in CryptMGF_KDF() 689 for(bytes = 0; bytes < mSize; bytes += hLen) in CryptMGF_KDF() 696 CryptHashEnd(&hashState, MIN((mSize - bytes), hLen), in CryptMGF_KDF() 841 UINT16 hLen; in CryptKDFe() local 847 hLen = hashDef->digestSize; in CryptKDFe() 865 for(; bytes > 0; stream = &stream[hLen], bytes = bytes - hLen) in CryptKDFe() 867 if(bytes < hLen) in CryptKDFe() 868 hLen = bytes; in CryptKDFe() 900 CryptHashEnd(&hashState, hLen, stream); in CryptKDFe()
|
D | CryptUtil.c | 372 UINT16 hLen = CryptHashGetDigestSize(hash); in CryptXORObfuscation() local 376 pAssert((key != NULL) && (data != NULL) && (hLen != 0)); in CryptXORObfuscation() 379 for(; remainBytes > 0; remainBytes -= hLen) in CryptXORObfuscation() 387 for(i = hLen < remainBytes ? hLen : remainBytes; i > 0; i--) in CryptXORObfuscation()
|
/external/libese/ready_se/google/keymint/KM300/Applet/AndroidSEProviderLib/src/com/android/javacard/seprovider/ |
D | KMRsaOAEPEncoding.java | 196 short hLen = getDigestLength(); in rsaOAEPDecode() local 198 if (encodedMsgLen < (short) (2 * hLen + 1)) { in rsaOAEPDecode() 208 (short) (encodedMsgOff + hLen), in rsaOAEPDecode() 209 (short) (encodedMsgLen - hLen), in rsaOAEPDecode() 210 hLen, in rsaOAEPDecode() 216 for (short i = 0; i < hLen; i++) { in rsaOAEPDecode() 226 hLen, in rsaOAEPDecode() 227 (short) (encodedMsgLen - hLen), in rsaOAEPDecode() 233 for (short i = 0; i < (short) (encodedMsgLen - hLen); i++) { in rsaOAEPDecode() 235 encodedMsg[(short) (encodedMsgOff + i + hLen)] ^= tmpArray[i]; in rsaOAEPDecode() [all …]
|
/external/libese/ready_se/google/keymint/KM200/Applet/AndroidSEProviderLib/src/com/android/javacard/seprovider/ |
D | KMRsaOAEPEncoding.java | 196 short hLen = getDigestLength(); in rsaOAEPDecode() local 198 if (encodedMsgLen < (short) (2 * hLen + 1)) { in rsaOAEPDecode() 208 (short) (encodedMsgOff + hLen), in rsaOAEPDecode() 209 (short) (encodedMsgLen - hLen), in rsaOAEPDecode() 210 hLen, in rsaOAEPDecode() 216 for (short i = 0; i < hLen; i++) { in rsaOAEPDecode() 226 hLen, in rsaOAEPDecode() 227 (short) (encodedMsgLen - hLen), in rsaOAEPDecode() 233 for (short i = 0; i < (short) (encodedMsgLen - hLen); i++) { in rsaOAEPDecode() 235 encodedMsg[(short) (encodedMsgOff + i + hLen)] ^= tmpArray[i]; in rsaOAEPDecode() [all …]
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/fipsmodule/rsa/ |
D | padding.c | 492 size_t hLen; in RSA_verify_PKCS1_PSS_mgf1() local 503 hLen = EVP_MD_size(Hash); in RSA_verify_PKCS1_PSS_mgf1() 510 sLen = hLen; in RSA_verify_PKCS1_PSS_mgf1() 528 if (emLen < (int)hLen + 2 || emLen < ((int)hLen + sLen + 2)) { in RSA_verify_PKCS1_PSS_mgf1() 537 maskedDBLen = emLen - hLen - 1; in RSA_verify_PKCS1_PSS_mgf1() 544 if (!PKCS1_MGF1(DB, maskedDBLen, H, hLen, mgf1Hash)) { in RSA_verify_PKCS1_PSS_mgf1() 566 !EVP_DigestUpdate(&ctx, mHash, hLen) || in RSA_verify_PKCS1_PSS_mgf1() 571 if (OPENSSL_memcmp(H_, H, hLen)) { in RSA_verify_PKCS1_PSS_mgf1() 591 size_t hLen; in RSA_padding_add_PKCS1_PSS_mgf1() local 598 hLen = EVP_MD_size(Hash); in RSA_padding_add_PKCS1_PSS_mgf1() [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/ |
D | PKCS5S2ParametersGenerator.java | 82 int hLen = hMac.getMacSize(); in generateDerivedKey() local 83 int l = (dkLen + hLen - 1) / hLen; in generateDerivedKey() 85 byte[] outBytes = new byte[l * hLen]; in generateDerivedKey() 102 outPos += hLen; in generateDerivedKey()
|
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/generators/ |
D | PKCS5S2ParametersGenerator.java | 84 int hLen = hMac.getMacSize(); in generateDerivedKey() local 85 int l = (dkLen + hLen - 1) / hLen; in generateDerivedKey() 87 byte[] outBytes = new byte[l * hLen]; in generateDerivedKey() 104 outPos += hLen; in generateDerivedKey()
|
/external/bouncycastle/repackaged_platform/bcprov/src/main/java/com/android/internal/org/bouncycastle/crypto/generators/ |
D | PKCS5S2ParametersGenerator.java | 84 int hLen = hMac.getMacSize(); in generateDerivedKey() local 85 int l = (dkLen + hLen - 1) / hLen; in generateDerivedKey() 87 byte[] outBytes = new byte[l * hLen]; in generateDerivedKey() 104 outPos += hLen; in generateDerivedKey()
|