Home
last modified time | relevance | path

Searched refs:hash (Results 1 – 25 of 173) sorted by relevance

1234567

/optee_os/core/lib/libtomcrypt/src/hashes/
A Dsha3_test.c45 sha3_done(&c, hash); in sha3_224_test()
54 sha3_done(&c, hash); in sha3_224_test()
65 sha3_done(&c, hash); in sha3_224_test()
101 sha3_done(&c, hash); in sha3_256_test()
109 sha3_done(&c, hash); in sha3_256_test()
118 sha3_done(&c, hash); in sha3_256_test()
129 sha3_done(&c, hash); in sha3_256_test()
155 sha3_done(&c, hash); in sha3_256_test()
156 if(compare_testvector(hash, sizeof(hash), in sha3_256_test()
192 sha3_done(&c, hash); in sha3_384_test()
[all …]
/optee_os/core/lib/libtomcrypt/src/mac/hmac/
A Dhmac_done.c19 #define LTC_HMAC_BLOCKSIZE hash_descriptor[hash]->blocksize
32 int hash, err; in hmac_done() local
38 hash = hmac->hash; in hmac_done()
39 if((err = hash_is_valid(hash)) != CRYPT_OK) { in hmac_done()
44 hashsize = hash_descriptor[hash]->hashsize; in hmac_done()
60 if ((err = hash_descriptor[hash]->done(&hmac->md, isha)) != CRYPT_OK) { in hmac_done()
70 if ((err = hash_descriptor[hash]->init(&hmac->md)) != CRYPT_OK) { in hmac_done()
73 if ((err = hash_descriptor[hash]->process(&hmac->md, buf, LTC_HMAC_BLOCKSIZE)) != CRYPT_OK) { in hmac_done()
76 if ((err = hash_descriptor[hash]->process(&hmac->md, isha, hashsize)) != CRYPT_OK) { in hmac_done()
79 if ((err = hash_descriptor[hash]->done(&hmac->md, buf)) != CRYPT_OK) { in hmac_done()
A Dhmac_init.c19 #define LTC_HMAC_BLOCKSIZE hash_descriptor[hash]->blocksize
29 int hmac_init(hmac_state *hmac, int hash, const unsigned char *key, unsigned long keylen) in hmac_init() argument
40 if ((err = hash_is_valid(hash)) != CRYPT_OK) { in hmac_init()
43 hmac->hash = hash; in hmac_init()
44 hashsize = hash_descriptor[hash]->hashsize; in hmac_init()
66 if ((err = hash_memory(hash, key, keylen, hmac->key, &z)) != CRYPT_OK) { in hmac_init()
84 if ((err = hash_descriptor[hash]->init(&hmac->md)) != CRYPT_OK) { in hmac_init()
88 if ((err = hash_descriptor[hash]->process(&hmac->md, buf, LTC_HMAC_BLOCKSIZE)) != CRYPT_OK) { in hmac_init()
A Dhmac_memory.c30 int hmac_memory(int hash, in hmac_memory() argument
44 if ((err = hash_is_valid(hash)) != CRYPT_OK) { in hmac_memory()
49 if (hash_descriptor[hash]->hmac_block != NULL) { in hmac_memory()
50 return hash_descriptor[hash]->hmac_block(key, keylen, in, inlen, out, outlen); in hmac_memory()
60 if ((err = hmac_init(hmac, hash, key, keylen)) != CRYPT_OK) { in hmac_memory()
/optee_os/core/lib/libtomcrypt/src/prngs/
A Dyarrow.c91 prng->u.yarrow.hash = register_hash(&sha256_desc); in yarrow_start()
93 prng->u.yarrow.hash = register_hash(&sha512_desc); in yarrow_start()
95 prng->u.yarrow.hash = register_hash(&tiger_desc); in yarrow_start()
97 prng->u.yarrow.hash = register_hash(&sha1_desc); in yarrow_start()
99 prng->u.yarrow.hash = register_hash(&rmd320_desc); in yarrow_start()
101 prng->u.yarrow.hash = register_hash(&rmd256_desc); in yarrow_start()
103 prng->u.yarrow.hash = register_hash(&rmd160_desc); in yarrow_start()
107 prng->u.yarrow.hash = register_hash(&md5_desc); in yarrow_start()
109 prng->u.yarrow.hash = register_hash(&md4_desc); in yarrow_start()
111 prng->u.yarrow.hash = register_hash(&md2_desc); in yarrow_start()
[all …]
/optee_os/core/lib/libtomcrypt/src/hashes/helper/
A Dhash_memory.c27 int hash_memory(int hash, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigne… in hash_memory() argument
36 if ((err = hash_is_valid(hash)) != CRYPT_OK) { in hash_memory()
40 if (*outlen < hash_descriptor[hash]->hashsize) { in hash_memory()
41 *outlen = hash_descriptor[hash]->hashsize; in hash_memory()
50 if ((err = hash_descriptor[hash]->init(md)) != CRYPT_OK) { in hash_memory()
53 if ((err = hash_descriptor[hash]->process(md, in, inlen)) != CRYPT_OK) { in hash_memory()
56 err = hash_descriptor[hash]->done(md, out); in hash_memory()
57 *outlen = hash_descriptor[hash]->hashsize; in hash_memory()
A Dhash_filehandle.c26 int hash_filehandle(int hash, FILE *in, unsigned char *out, unsigned long *outlen) in hash_filehandle() argument
41 if ((err = hash_is_valid(hash)) != CRYPT_OK) { in hash_filehandle()
45 if (*outlen < hash_descriptor[hash]->hashsize) { in hash_filehandle()
46 *outlen = hash_descriptor[hash]->hashsize; in hash_filehandle()
50 if ((err = hash_descriptor[hash]->init(&md)) != CRYPT_OK) { in hash_filehandle()
56 if ((err = hash_descriptor[hash]->process(&md, buf, (unsigned long)x)) != CRYPT_OK) { in hash_filehandle()
60 if ((err = hash_descriptor[hash]->done(&md, out)) == CRYPT_OK) { in hash_filehandle()
61 *outlen = hash_descriptor[hash]->hashsize; in hash_filehandle()
A Dhash_memory_multi.c29 int hash_memory_multi(int hash, unsigned char *out, unsigned long *outlen, in hash_memory_multi() argument
42 if ((err = hash_is_valid(hash)) != CRYPT_OK) { in hash_memory_multi()
46 if (*outlen < hash_descriptor[hash]->hashsize) { in hash_memory_multi()
47 *outlen = hash_descriptor[hash]->hashsize; in hash_memory_multi()
56 if ((err = hash_descriptor[hash]->init(md)) != CRYPT_OK) { in hash_memory_multi()
65 if ((err = hash_descriptor[hash]->process(md, curptr, curlen)) != CRYPT_OK) { in hash_memory_multi()
75 err = hash_descriptor[hash]->done(md, out); in hash_memory_multi()
76 *outlen = hash_descriptor[hash]->hashsize; in hash_memory_multi()
/optee_os/lib/libmbedtls/mbedtls/library/
A Dpk_wrap.c78 const unsigned char *hash, size_t hash_len, in rsa_verify_wrap() argument
110 const unsigned char *hash, size_t hash_len, in rsa_sign_wrap() argument
124 md_alg, (unsigned int) hash_len, hash, sig ) ); in rsa_sign_wrap()
602 hash, hash_len, in ecdsa_verify_wrap()
659 hash, hash_len, sig, sig_len, in ecdsa_verify_rs_wrap()
798 unsigned char hash[32]; in rsa_alt_check_pair() local
805 memset( hash, 0x2a, sizeof( hash ) ); in rsa_alt_check_pair()
808 hash, sizeof( hash ), in rsa_alt_check_pair()
815 hash, sizeof( hash ), sig, sig_len ) != 0 ) in rsa_alt_check_pair()
1003 ((void) hash); in pk_opaque_sign_wrap()
[all …]
A Dpk.c280 const unsigned char *hash, size_t hash_len, in mbedtls_pk_verify_restartable() argument
286 hash != NULL ); in mbedtls_pk_verify_restartable()
327 const unsigned char *hash, size_t hash_len, in mbedtls_pk_verify() argument
330 return( mbedtls_pk_verify_restartable( ctx, md_alg, hash, hash_len, in mbedtls_pk_verify()
339 const unsigned char *hash, size_t hash_len, in mbedtls_pk_verify_ext() argument
344 hash != NULL ); in mbedtls_pk_verify_ext()
374 md_alg, (unsigned int) hash_len, hash, in mbedtls_pk_verify_ext()
402 const unsigned char *hash, size_t hash_len, in mbedtls_pk_sign_restartable() argument
409 hash != NULL ); in mbedtls_pk_sign_restartable()
450 const unsigned char *hash, size_t hash_len, in mbedtls_pk_sign() argument
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/pkcs1/
A Dpkcs_1_pss_decode.c36 unsigned char *DB, *mask, *salt, *hash; in pkcs_1_pss_decode() local
66 hash = XMALLOC(modulus_len); in pkcs_1_pss_decode()
67 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { in pkcs_1_pss_decode()
77 if (hash != NULL) { in pkcs_1_pss_decode()
78 XFREE(hash); 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()
152 if (XMEM_NEQ(mask, hash, hLen) == 0) { in pkcs_1_pss_decode()
162 zeromem(hash, modulus_len); in pkcs_1_pss_decode()
165 XFREE(hash); in pkcs_1_pss_decode()
A Dpkcs_1_pss_encode.c38 unsigned char *DB, *mask, *salt, *hash; in pkcs_1_pss_encode() local
68 hash = XMALLOC(modulus_len); in pkcs_1_pss_encode()
69 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { in pkcs_1_pss_encode()
79 if (hash != NULL) { in pkcs_1_pss_encode()
80 XFREE(hash); in pkcs_1_pss_encode()
108 if ((err = hash_descriptor[hash_idx]->done(&md, hash)) != CRYPT_OK) { 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()
143 XMEMCPY(out + y, hash, hLen); in pkcs_1_pss_encode()
160 zeromem(hash, modulus_len); in pkcs_1_pss_encode()
163 XFREE(hash); in pkcs_1_pss_encode()
/optee_os/ta/pkcs11/src/
A Dprocessing_rsa.c24 uint32_t hash = 0; in pkcs2tee_proc_params_rsa_pss() local
52 ctx->hash_alg = hash; in pkcs2tee_proc_params_rsa_pss()
122 uint32_t hash = 0; in pkcs2tee_algo_rsa_pss() local
148 if (hash == PKCS11_CKM_SHA224 && in pkcs2tee_algo_rsa_pss()
153 if (hash == PKCS11_CKM_SHA256 && in pkcs2tee_algo_rsa_pss()
158 if (hash == PKCS11_CKM_SHA384 && in pkcs2tee_algo_rsa_pss()
206 uint32_t hash = 0; in pkcs2tee_proc_params_rsa_oaep() local
245 ctx->hash_alg = hash; in pkcs2tee_proc_params_rsa_oaep()
266 uint32_t hash = 0; in pkcs2tee_algo_rsa_oaep() local
302 switch (hash) { in pkcs2tee_algo_rsa_oaep()
[all …]
/optee_os/core/tee/
A Dfs_dirfile.c26 uint8_t hash[TEE_FS_HTREE_HASH_SIZE]; member
110 TEE_Result tee_fs_dirfile_open(bool create, uint8_t *hash, in tee_fs_dirfile_open() argument
122 res = fops->open(create, hash, NULL, NULL, &dirh->fh); in tee_fs_dirfile_open()
173 uint8_t *hash) in tee_fs_dirfile_commit_writes() argument
175 return dirh->fops->commit_writes(dirh->fh, hash); in tee_fs_dirfile_commit_writes()
235 memcpy(dfh->hash, dent.hash, sizeof(dent.hash)); in tee_fs_dirfile_find()
276 memcpy(dent.hash, dfh->hash, sizeof(dent.hash)); in tee_fs_dirfile_rename()
334 memcpy(&dent.hash, dfh->hash, sizeof(dent.hash)); in tee_fs_dirfile_update_hash()
/optee_os/core/lib/libtomcrypt/src/stream/salsa20/
A Dxsalsa20_test.c23 static int _sha256(unsigned char *hash, const unsigned char *data, const int datalen) { in _sha256() argument
27 sha256_done(&md, hash); in _sha256()
80 unsigned char hash[32]; in xsalsa20_test()
87 if ((err = _sha256(hash, keystream, keystreamlen)) != CRYPT_OK) return err; in xsalsa20_test()
88 …if (compare_testvector(hash, sizeof(hash), expecthash, sizeof(expecthash), "XSALSA20-TV3", 1)) … in xsalsa20_test()
/optee_os/core/lib/libtomcrypt/src/misc/crypt/
A Dcrypt_register_hash.c22 int register_hash(const struct ltc_hash_descriptor *hash) in register_hash() argument
26 LTC_ARGCHK(hash != NULL); in register_hash()
31 if (hash_descriptor[x] == hash) { in register_hash()
40 hash_descriptor[x] = hash; in register_hash()
/optee_os/core/lib/libtomcrypt/src/pk/ecc/
A Decc_encrypt_key.c34 prng_state *prng, int wprng, int hash, in ecc_encrypt_key() argument
47 if ((err = hash_is_valid(hash)) != CRYPT_OK) { in ecc_encrypt_key()
51 if (inlen > hash_descriptor[hash]->hashsize) { in ecc_encrypt_key()
97 if ((err = hash_memory(hash, ecc_shared, x, skey, &y)) != CRYPT_OK) { in ecc_encrypt_key()
107 … LTC_ASN1_OBJECT_IDENTIFIER, hash_descriptor[hash]->OIDlen, hash_descriptor[hash]->OID, in ecc_encrypt_key()
/optee_os/core/lib/libtomcrypt/src/pk/dsa/
A Ddsa_encrypt_key.c33 prng_state *prng, int wprng, int hash, in dsa_encrypt_key() argument
51 if ((err = hash_is_valid(hash)) != CRYPT_OK) { in dsa_encrypt_key()
55 if (inlen > hash_descriptor[hash]->hashsize) { in dsa_encrypt_key()
96 if ((err = hash_memory(hash, expt, x, skey, &y)) != CRYPT_OK) { in dsa_encrypt_key()
106 … LTC_ASN1_OBJECT_IDENTIFIER, hash_descriptor[hash]->OIDlen, hash_descriptor[hash]->OID, in dsa_encrypt_key()
/optee_os/core/include/tee/
A Dfs_dirfile.h22 uint8_t hash[TEE_FS_HTREE_HASH_SIZE]; member
37 TEE_Result (*open)(bool create, uint8_t *hash, const TEE_UUID *uuid,
45 TEE_Result (*commit_writes)(struct tee_file_handle *fh, uint8_t *hash);
56 TEE_Result tee_fs_dirfile_open(bool create, uint8_t *hash,
74 uint8_t *hash);
/optee_os/out/arm/export-ta_arm32/include/mbedtls/
A Drsa.h924 const unsigned char *hash,
972 const unsigned char *hash,
1026 const unsigned char *hash,
1091 const unsigned char *hash,
1144 const unsigned char *hash,
1190 const unsigned char *hash,
1246 const unsigned char *hash,
1299 const unsigned char *hash,
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
A Drsa.h924 const unsigned char *hash,
972 const unsigned char *hash,
1026 const unsigned char *hash,
1091 const unsigned char *hash,
1144 const unsigned char *hash,
1190 const unsigned char *hash,
1246 const unsigned char *hash,
1299 const unsigned char *hash,
/optee_os/out/arm/export-ta_arm64/include/mbedtls/
A Drsa.h924 const unsigned char *hash,
972 const unsigned char *hash,
1026 const unsigned char *hash,
1091 const unsigned char *hash,
1144 const unsigned char *hash,
1190 const unsigned char *hash,
1246 const unsigned char *hash,
1299 const unsigned char *hash,
/optee_os/out/arm/export-ta_arm32/host_include/mbedtls/
A Drsa.h924 const unsigned char *hash,
972 const unsigned char *hash,
1026 const unsigned char *hash,
1091 const unsigned char *hash,
1144 const unsigned char *hash,
1190 const unsigned char *hash,
1246 const unsigned char *hash,
1299 const unsigned char *hash,
/optee_os/out/arm/export-ta_arm64/host_include/mbedtls/
A Drsa.h924 const unsigned char *hash,
972 const unsigned char *hash,
1026 const unsigned char *hash,
1091 const unsigned char *hash,
1144 const unsigned char *hash,
1190 const unsigned char *hash,
1246 const unsigned char *hash,
1299 const unsigned char *hash,
/optee_os/core/lib/libtomcrypt/src/pk/rsa/
A Drsa_verify_hash.c33 const unsigned char *hash, unsigned long hashlen, in rsa_verify_hash_ex() argument
42 LTC_ARGCHK(hash != NULL); in rsa_verify_hash_ex()
97 … err = pkcs_1_pss_decode(hash, hashlen, tmpbuf+1, x-1, saltlen, hash_idx, modulus_bitlen, stat); in rsa_verify_hash_ex()
100 err = pkcs_1_pss_decode(hash, hashlen, tmpbuf, x, saltlen, hash_idx, modulus_bitlen, stat); in rsa_verify_hash_ex()
165 (XMEMCMP(siginfo[1].data, hash, hashlen) == 0)) { in rsa_verify_hash_ex()
171 (XMEMCMP(out, hash, hashlen) == 0)) { in rsa_verify_hash_ex()

Completed in 46 milliseconds

1234567