/external/dropbear/libtomcrypt/src/pk/pkcs1/ |
pkcs_1_oaep_encode.c | 41 unsigned long hLen, x, y, modulus_len; 58 hLen = hash_descriptor[hash_idx].hashsize; 62 if ((2*hLen >= (modulus_len - 2)) || (msglen > (modulus_len - 2*hLen - 2))) { 69 seed = XMALLOC(hLen); 84 /* DB == lhash || PS || 0x01 || M, PS == k - mlen - 2hlen - 2 zeroes */ 98 x = hLen; 99 y = modulus_len - msglen - 2*hLen - 2; 111 if (prng_descriptor[prng_idx].read(seed, hLen, prng) != hLen) { [all...] |
pkcs_1_oaep_decode.c | 40 unsigned long hLen, x, y, modulus_len; 55 hLen = hash_descriptor[hash_idx].hashsize; 59 if ((2*hLen >= (modulus_len - 2)) || (msglen != modulus_len)) { 66 seed = XMALLOC(hLen); 84 1 || hLen || modulus_len - hLen - 1 96 XMEMCPY(seed, msg + x, hLen); 97 x += hLen; 100 XMEMCPY(DB, msg + x, modulus_len - hLen - 1); 101 x += modulus_len - hLen - 1 [all...] |
pkcs_1_mgf1.c | 33 unsigned long hLen, x; 48 hLen = hash_descriptor[hash_idx].hashsize; 52 buf = XMALLOC(hLen); 86 for (x = 0; x < hLen && masklen > 0; x++, masklen--) { 94 zeromem(buf, hLen);
|
pkcs_1_pss_decode.c | 38 unsigned long x, y, hLen, modulus_len; 53 hLen = hash_descriptor[hash_idx].hashsize; 58 (modulus_len < hLen + saltlen + 2) || (siglen != modulus_len)) { 91 XMEMCPY(DB, sig + x, modulus_len - hLen - 1); 92 x += modulus_len - hLen - 1; 95 XMEMCPY(hash, sig + x, hLen); 96 x += hLen; 104 /* generate mask of length modulus_len - hLen - 1 from hash */ 105 if ((err = pkcs_1_mgf1(hash_idx, hash, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) [all...] |
pkcs_1_pss_encode.c | 40 unsigned long x, y, hLen, modulus_len; 56 hLen = hash_descriptor[hash_idx].hashsize; 60 if ((saltlen > modulus_len) || (modulus_len < hLen + saltlen + 2)) { 112 /* generate DB = PS || 0x01 || salt, PS == modulus_len - saltlen - hLen - 2 zero bytes */ 114 XMEMSET(DB + x, 0, modulus_len - saltlen - hLen - 2); 115 x += modulus_len - saltlen - hLen - 2; 120 /* generate mask of length modulus_len - hLen - 1 from hash */ 121 if ((err = pkcs_1_mgf1(hash_idx, hash, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { 126 for (y = 0; y < (modulus_len - hLen - 1); y++) [all...] |
/external/openssl/crypto/rsa/ |
rsa_pss.c | 85 int hLen, maskedDBLen, MSBits, emLen; 95 hLen = EVP_MD_size(Hash); 96 if (hLen < 0) 100 * -1 sLen == hLen 104 if (sLen == -1) sLen = hLen; 124 if (emLen < (hLen + sLen + 2)) /* sLen can be small negative */ 134 maskedDBLen = emLen - hLen - 1; 142 if (PKCS1_MGF1(DB, maskedDBLen, H, hLen, mgf1Hash) < 0) 161 || !EVP_DigestUpdate(&ctx, mHash, hLen)) 170 if (memcmp(H_, H, hLen)) [all...] |
/external/bouncycastle/src/main/java/org/bouncycastle/crypto/generators/ |
PKCS5S2ParametersGenerator.java | 86 int hLen = hMac.getMacSize(); 87 int l = (dkLen + hLen - 1) / hLen; 89 byte[] out = new byte[l * hLen]; 95 F(password, salt, iterationCount, iBuf, out, (i - 1) * hLen);
|
/external/chromium/crypto/ |
symmetric_key_win.cc | 406 DWORD hLen = 0; 407 DWORD param_size = sizeof(hLen); 409 reinterpret_cast<BYTE*>(&hLen), ¶m_size, 0); 410 if (!ok || hLen == 0) 413 // 1. If dkLen > (2^32 - 1) * hLen, output "derived key too long" and stop. 417 if ((dkLen / hLen) > 0xFFFFFFFF) { 422 // 2. Let l be the number of hLen-octet blocks in the derived key, 425 size_t L = (dkLen + hLen - 1) / hLen; 428 size_t total_generated_size = L * hLen; [all...] |
/external/dropbear/libtomcrypt/ |
crypt.tex | [all...] |