Searched refs:hLen (Results 1 – 5 of 5) sorted by relevance
/optee_os/core/lib/libtomcrypt/src/pk/pkcs1/ |
A D | pkcs_1_oaep_decode.c | 39 unsigned long hLen, x, y, modulus_len; in pkcs_1_oaep_decode() local 65 seed = XMALLOC(hLen); in pkcs_1_oaep_decode() 96 XMEMCPY(seed, msg + x, hLen); in pkcs_1_oaep_decode() 97 x += hLen; in pkcs_1_oaep_decode() 101 x += modulus_len - hLen - 1; in pkcs_1_oaep_decode() 104 if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) { in pkcs_1_oaep_decode() 109 for (y = 0; y < hLen; y++) { in pkcs_1_oaep_decode() 114 if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_oaep_decode() 139 if (XMEM_NEQ(seed, DB, hLen) != 0) { in pkcs_1_oaep_decode() 144 for (x = hLen; x < (modulus_len - hLen - 1) && DB[x] == 0x00; x++) { in pkcs_1_oaep_decode() [all …]
|
A D | pkcs_1_oaep_encode.c | 61 if ((2*hLen >= (modulus_len - 2)) || (msglen > (modulus_len - 2*hLen - 2))) { in pkcs_1_oaep_encode() 68 seed = XMALLOC(hLen); in pkcs_1_oaep_encode() 97 x = hLen; in pkcs_1_oaep_encode() 110 if (prng_descriptor[prng_idx]->read(seed, hLen, prng) != hLen) { in pkcs_1_oaep_encode() 116 if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_oaep_encode() 126 if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) { in pkcs_1_oaep_encode() 131 for (y = 0; y < hLen; y++) { in pkcs_1_oaep_encode() 145 XMEMCPY(out+x, seed, hLen); in pkcs_1_oaep_encode() 146 x += hLen; in pkcs_1_oaep_encode() 148 x += modulus_len - hLen - 1; in pkcs_1_oaep_encode() [all …]
|
A D | pkcs_1_pss_encode.c | 39 unsigned long x, y, hLen, modulus_len; in pkcs_1_pss_encode() local 55 hLen = hash_descriptor[hash_idx]->hashsize; in pkcs_1_pss_encode() 60 if ((saltlen > modulus_len) || (modulus_len < hLen + saltlen + 2)) { in pkcs_1_pss_encode() 114 XMEMSET(DB + x, 0, modulus_len - saltlen - hLen - 2); in pkcs_1_pss_encode() 115 x += modulus_len - saltlen - hLen - 2; in pkcs_1_pss_encode() 121 if ((err = pkcs_1_mgf1(hash_idx, hash, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_pss_encode() 126 for (y = 0; y < (modulus_len - hLen - 1); y++) { in pkcs_1_pss_encode() 139 XMEMCPY(out + y, DB, modulus_len - hLen - 1); in pkcs_1_pss_encode() 140 y += modulus_len - hLen - 1; in pkcs_1_pss_encode() 143 XMEMCPY(out + y, hash, hLen); in pkcs_1_pss_encode() [all …]
|
A D | pkcs_1_pss_decode.c | 37 unsigned long x, y, hLen, modulus_len; in pkcs_1_pss_decode() local 52 hLen = hash_descriptor[hash_idx]->hashsize; in pkcs_1_pss_decode() 58 (modulus_len < hLen + saltlen + 2)) { in pkcs_1_pss_decode() 91 XMEMCPY(DB, sig + x, modulus_len - hLen - 1); in pkcs_1_pss_decode() 92 x += modulus_len - hLen - 1; in pkcs_1_pss_decode() 95 XMEMCPY(hash, sig + x, hLen); in pkcs_1_pss_decode() 105 if ((err = pkcs_1_mgf1(hash_idx, hash, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) { in pkcs_1_pss_decode() 110 for (y = 0; y < (modulus_len - hLen - 1); y++) { in pkcs_1_pss_decode() 120 for (x = 0; x < modulus_len - saltlen - hLen - 2; x++) { in pkcs_1_pss_decode() 152 if (XMEM_NEQ(mask, hash, hLen) == 0) { in pkcs_1_pss_decode()
|
A D | pkcs_1_mgf1.c | 32 unsigned long hLen, x; in pkcs_1_mgf1() local 47 hLen = hash_descriptor[hash_idx]->hashsize; in pkcs_1_mgf1() 51 buf = XMALLOC(hLen); in pkcs_1_mgf1() 85 for (x = 0; x < hLen && masklen > 0; x++, masklen--) { in pkcs_1_mgf1() 93 zeromem(buf, hLen); in pkcs_1_mgf1()
|
Completed in 5 milliseconds