Home
last modified time | relevance | path

Searched refs:hash_descriptor (Results 1 – 25 of 34) sorted by relevance

12

/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/pkcs5/
A Dpkcs_5_1.c75 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 Dhash_memory.c33 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 Dhash_filehandle.c38 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 Dhash_memory_multi.c39 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 Dhmac_done.c12 #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 Dhmac_init.c12 #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 Dhmac_memory.c42 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 Dhmac_process.c27 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 Dcrypt_find_hash_any.c27 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 Dcrypt_find_hash_oid.c16 …if (hash_descriptor[x] != NULL && hash_descriptor[x]->OIDlen == IDlen && !XMEMCMP(hash_descriptor[… in find_hash_oid()
A Dcrypt_register_hash.c24 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 Dcrypt_find_hash_id.c20 if (hash_descriptor[x] && hash_descriptor[x]->ID == ID) { in find_hash_id()
A Dcrypt_unregister_hash.c24 if (hash_descriptor[x] == hash) { in unregister_hash()
25 hash_descriptor[x] = NULL; in unregister_hash()
A Dcrypt_find_hash.c21 if (hash_descriptor[x] != NULL && XSTRCMP(hash_descriptor[x]->name, name) == 0) { in find_hash()
A Dcrypt_hash_descriptor.c10 const struct ltc_hash_descriptor *hash_descriptor[TAB_SIZE]; variable
A Dcrypt_hash_is_valid.c18 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 Dpkcs_1_mgf1.c40 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 Dpkcs_1_pss_decode.c46 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 Dpkcs_1_pss_encode.c48 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 Dyarrow.c144 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()
150hash_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 Drsa_sign_hash.c86 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 Drsa_verify_hash.c130 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 Drsa_sign_saltlen_get.c30 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 Ddsa_encrypt_key.c48 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 Decc_encrypt_key.c44 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()

Completed in 13 milliseconds

12