/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/pkcs5/ |
A D | pkcs_5_1.c | 75 while(block * hash_descriptor[hash_idx]->hashsize < *outlen) { in s_pkcs_5_alg1_common() 78 if ((err = hash_descriptor[hash_idx]->init(md)) != CRYPT_OK) { in s_pkcs_5_alg1_common() 83 …if ((err = hash_descriptor[hash_idx]->process(md, buf, hash_descriptor[hash_idx]->hashsize)) != CR… in s_pkcs_5_alg1_common() 87 if ((err = hash_descriptor[hash_idx]->process(md, password, password_len)) != CRYPT_OK) { in s_pkcs_5_alg1_common() 90 if ((err = hash_descriptor[hash_idx]->process(md, salt, 8)) != CRYPT_OK) { in s_pkcs_5_alg1_common() 93 if ((err = hash_descriptor[hash_idx]->done(md, buf)) != CRYPT_OK) { in s_pkcs_5_alg1_common() 101 …if ((err = hash_memory(hash_idx, buf, hash_descriptor[hash_idx]->hashsize, buf, &x)) != CRYPT_OK) { in s_pkcs_5_alg1_common() 108 outidx = block*hash_descriptor[hash_idx]->hashsize; in s_pkcs_5_alg1_common() 109 nb = hash_descriptor[hash_idx]->hashsize; in s_pkcs_5_alg1_common() 125 *outlen = hash_descriptor[hash_idx]->hashsize; in s_pkcs_5_alg1_common()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/hashes/helper/ |
A D | hash_memory.c | 33 if (*outlen < hash_descriptor[hash]->hashsize) { in hash_memory() 34 *outlen = hash_descriptor[hash]->hashsize; in hash_memory() 43 if ((err = hash_descriptor[hash]->init(md)) != CRYPT_OK) { in hash_memory() 46 if ((err = hash_descriptor[hash]->process(md, in, inlen)) != CRYPT_OK) { in hash_memory() 49 err = hash_descriptor[hash]->done(md, out); in hash_memory() 50 *outlen = hash_descriptor[hash]->hashsize; in hash_memory()
|
A D | hash_filehandle.c | 38 if (*outlen < hash_descriptor[hash]->hashsize) { in hash_filehandle() 39 *outlen = hash_descriptor[hash]->hashsize; in hash_filehandle() 43 if ((err = hash_descriptor[hash]->init(&md)) != CRYPT_OK) { in hash_filehandle() 49 if ((err = hash_descriptor[hash]->process(&md, buf, (unsigned long)x)) != CRYPT_OK) { in hash_filehandle() 53 if ((err = hash_descriptor[hash]->done(&md, out)) == CRYPT_OK) { in hash_filehandle() 54 *outlen = hash_descriptor[hash]->hashsize; in hash_filehandle()
|
A D | hash_memory_multi.c | 39 if (*outlen < hash_descriptor[hash]->hashsize) { in hash_memory_multi() 40 *outlen = hash_descriptor[hash]->hashsize; in hash_memory_multi() 49 if ((err = hash_descriptor[hash]->init(md)) != CRYPT_OK) { in hash_memory_multi() 58 if ((err = hash_descriptor[hash]->process(md, curptr, curlen)) != CRYPT_OK) { in hash_memory_multi() 68 err = hash_descriptor[hash]->done(md, out); in hash_memory_multi() 69 *outlen = hash_descriptor[hash]->hashsize; in hash_memory_multi()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/mac/hmac/ |
A D | hmac_done.c | 12 #define LTC_HMAC_BLOCKSIZE hash_descriptor[hash]->blocksize 37 hashsize = hash_descriptor[hash]->hashsize; in hmac_done() 53 if ((err = hash_descriptor[hash]->done(&hmac->md, isha)) != CRYPT_OK) { in hmac_done() 63 if ((err = hash_descriptor[hash]->init(&hmac->md)) != CRYPT_OK) { in hmac_done() 66 if ((err = hash_descriptor[hash]->process(&hmac->md, buf, LTC_HMAC_BLOCKSIZE)) != CRYPT_OK) { in hmac_done() 69 if ((err = hash_descriptor[hash]->process(&hmac->md, isha, hashsize)) != CRYPT_OK) { in hmac_done() 72 if ((err = hash_descriptor[hash]->done(&hmac->md, buf)) != CRYPT_OK) { in hmac_done()
|
A D | hmac_init.c | 12 #define LTC_HMAC_BLOCKSIZE hash_descriptor[hash]->blocksize 37 hashsize = hash_descriptor[hash]->hashsize; in hmac_init() 77 if ((err = hash_descriptor[hash]->init(&hmac->md)) != CRYPT_OK) { in hmac_init() 81 if ((err = hash_descriptor[hash]->process(&hmac->md, buf, LTC_HMAC_BLOCKSIZE)) != CRYPT_OK) { in hmac_init()
|
A D | hmac_memory.c | 42 if (hash_descriptor[hash]->hmac_block != NULL) { in hmac_memory() 43 return hash_descriptor[hash]->hmac_block(key, keylen, in, inlen, out, outlen); in hmac_memory()
|
A D | hmac_process.c | 27 return hash_descriptor[hmac->hash]->process(&hmac->md, in, inlen); in hmac_process()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/crypt/ |
A D | crypt_find_hash_any.c | 27 if (hash_descriptor[x] == NULL) { in find_hash_any() 30 … if ((int)hash_descriptor[x]->hashsize >= digestlen && (int)hash_descriptor[x]->hashsize < y) { in find_hash_any() 32 y = hash_descriptor[x]->hashsize; in find_hash_any()
|
A D | crypt_find_hash_oid.c | 16 …if (hash_descriptor[x] != NULL && hash_descriptor[x]->OIDlen == IDlen && !XMEMCMP(hash_descriptor[… in find_hash_oid()
|
A D | crypt_register_hash.c | 24 if (hash_descriptor[x] == hash) { in register_hash() 32 if (hash_descriptor[x] == NULL) { in register_hash() 33 hash_descriptor[x] = hash; in register_hash()
|
A D | crypt_find_hash_id.c | 20 if (hash_descriptor[x] && hash_descriptor[x]->ID == ID) { in find_hash_id()
|
A D | crypt_unregister_hash.c | 24 if (hash_descriptor[x] == hash) { in unregister_hash() 25 hash_descriptor[x] = NULL; in unregister_hash()
|
A D | crypt_find_hash.c | 21 if (hash_descriptor[x] != NULL && XSTRCMP(hash_descriptor[x]->name, name) == 0) { in find_hash()
|
A D | crypt_hash_descriptor.c | 10 const struct ltc_hash_descriptor *hash_descriptor[TAB_SIZE]; variable
|
A D | crypt_hash_is_valid.c | 18 if (idx < 0 || idx >= TAB_SIZE || hash_descriptor[idx] == NULL) { in hash_is_valid()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/pkcs1/ |
A D | pkcs_1_mgf1.c | 40 hLen = hash_descriptor[hash_idx]->hashsize; in pkcs_1_mgf1() 64 if ((err = hash_descriptor[hash_idx]->init(md)) != CRYPT_OK) { in pkcs_1_mgf1() 67 if ((err = hash_descriptor[hash_idx]->process(md, seed, seedlen)) != CRYPT_OK) { in pkcs_1_mgf1() 70 if ((err = hash_descriptor[hash_idx]->process(md, buf, 4)) != CRYPT_OK) { in pkcs_1_mgf1() 73 if ((err = hash_descriptor[hash_idx]->done(md, buf)) != CRYPT_OK) { in pkcs_1_mgf1()
|
A D | pkcs_1_pss_decode.c | 46 hLen = hash_descriptor[hash_idx]->hashsize; in pkcs_1_pss_decode() 128 if ((err = hash_descriptor[hash_idx]->init(&md)) != CRYPT_OK) { in pkcs_1_pss_decode() 132 if ((err = hash_descriptor[hash_idx]->process(&md, mask, 8)) != CRYPT_OK) { in pkcs_1_pss_decode() 135 if ((err = hash_descriptor[hash_idx]->process(&md, msghash, msghashlen)) != CRYPT_OK) { in pkcs_1_pss_decode() 138 if ((err = hash_descriptor[hash_idx]->process(&md, DB+x, saltlen)) != CRYPT_OK) { in pkcs_1_pss_decode() 141 if ((err = hash_descriptor[hash_idx]->done(&md, mask)) != CRYPT_OK) { in pkcs_1_pss_decode()
|
A D | pkcs_1_pss_encode.c | 48 hLen = hash_descriptor[hash_idx]->hashsize; in pkcs_1_pss_encode() 88 if ((err = hash_descriptor[hash_idx]->init(&md)) != CRYPT_OK) { in pkcs_1_pss_encode() 92 if ((err = hash_descriptor[hash_idx]->process(&md, DB, 8)) != CRYPT_OK) { in pkcs_1_pss_encode() 95 if ((err = hash_descriptor[hash_idx]->process(&md, msghash, msghashlen)) != CRYPT_OK) { in pkcs_1_pss_encode() 98 if ((err = hash_descriptor[hash_idx]->process(&md, salt, saltlen)) != CRYPT_OK) { in pkcs_1_pss_encode() 101 if ((err = hash_descriptor[hash_idx]->done(&md, hash)) != CRYPT_OK) { in pkcs_1_pss_encode()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/prngs/ |
A D | yarrow.c | 144 if ((err = hash_descriptor[prng->u.yarrow.hash]->init(&md)) != CRYPT_OK) { in yarrow_add_entropy() 149 if ((err = hash_descriptor[prng->u.yarrow.hash]->process(&md, prng->u.yarrow.pool, in yarrow_add_entropy() 150 … hash_descriptor[prng->u.yarrow.hash]->hashsize)) != CRYPT_OK) { in yarrow_add_entropy() 155 if ((err = hash_descriptor[prng->u.yarrow.hash]->process(&md, in, inlen)) != CRYPT_OK) { in yarrow_add_entropy() 160 err = hash_descriptor[prng->u.yarrow.hash]->done(&md, prng->u.yarrow.pool); in yarrow_add_entropy() 189 ks = (int)hash_descriptor[prng->u.yarrow.hash]->hashsize; in yarrow_ready() 313 if (hash_descriptor[prng.u.yarrow.hash]->test && in yarrow_test() 314 ((err = hash_descriptor[prng.u.yarrow.hash]->test()) != CRYPT_OK)) { in yarrow_test()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/rsa/ |
A D | rsa_sign_hash.c | 86 if (hash_descriptor[hash_idx]->OIDlen == 0) { in rsa_sign_hash_ex() 98 …_SET_ASN1(digestinfo, 0, LTC_ASN1_OBJECT_IDENTIFIER, hash_descriptor[hash_idx]->OID, hash_descript… in rsa_sign_hash_ex()
|
A D | rsa_verify_hash.c | 130 if (hash_descriptor[hash_idx]->OIDlen == 0) { in rsa_verify_hash_ex() 165 (digestinfo[0].size == hash_descriptor[hash_idx]->OIDlen) && in rsa_verify_hash_ex() 166 …(XMEMCMP(digestinfo[0].data, hash_descriptor[hash_idx]->OID, sizeof(unsigned long) * hash_descript… in rsa_verify_hash_ex()
|
A D | rsa_sign_saltlen_get.c | 30 ret -= (hash_descriptor[hash_idx]->hashsize + 2); in rsa_sign_saltlen_get_max_ex()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/dsa/ |
A D | dsa_encrypt_key.c | 48 if (inlen > hash_descriptor[hash]->hashsize) { in dsa_encrypt_key() 99 … LTC_ASN1_OBJECT_IDENTIFIER, hash_descriptor[hash]->OIDlen, hash_descriptor[hash]->OID, in dsa_encrypt_key()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ecc/ |
A D | ecc_encrypt_key.c | 44 if (inlen > hash_descriptor[hash]->hashsize) { in ecc_encrypt_key() 100 … LTC_ASN1_OBJECT_IDENTIFIER, hash_descriptor[hash]->OIDlen, hash_descriptor[hash]->OID, in ecc_encrypt_key()
|