/optee_os-3.20.0/core/kernel/ |
A D | embedded_ts.c | 55 struct ts_store_handle **h, in emb_ts_open() argument 77 *h = handle; in emb_ts_open() 112 res = crypto_hash_update(ctx, h->ts->ts, h->ts->size); in emb_ts_get_tag() 124 uint8_t *src = (uint8_t *)h->ts->ts + h->offs; in read_uncompressed() 128 next_offs > h->ts->size) in read_uncompressed() 132 h->offs = next_offs; in read_uncompressed() 140 z_stream *strm = &h->strm; in read_compressed() 204 if (h->ts->uncompressed_size) in emb_ts_read() 212 if (h->ts->uncompressed_size) in emb_ts_close() 213 inflateEnd(&h->strm); in emb_ts_close() [all …]
|
A D | secstor_ta.c | 41 static TEE_Result secstor_ta_get_size(const struct ts_store_handle *h, in secstor_ta_get_size() argument 44 struct tee_tadb_ta_read *ta = (struct tee_tadb_ta_read *)h; in secstor_ta_get_size() 52 static TEE_Result secstor_ta_get_tag(const struct ts_store_handle *h, in secstor_ta_get_tag() argument 55 return tee_tadb_get_tag((struct tee_tadb_ta_read *)h, tag, tag_len); in secstor_ta_get_tag() 58 static TEE_Result secstor_ta_read(struct ts_store_handle *h, void *data, in secstor_ta_read() argument 61 struct tee_tadb_ta_read *ta = (struct tee_tadb_ta_read *)h; in secstor_ta_read() 73 static void secstor_ta_close(struct ts_store_handle *h) in secstor_ta_close() argument 75 struct tee_tadb_ta_read *ta = (struct tee_tadb_ta_read *)h; in secstor_ta_close()
|
A D | interrupt.c | 52 struct itr_handler *h = NULL; in itr_handle() local 55 SLIST_FOREACH(h, &handlers, link) { in itr_handle() 56 if (h->it == it) { in itr_handle() 57 if (h->handler(h) == ITRR_HANDLED) in itr_handle() 59 else if (!(h->flags & ITRF_SHARED)) in itr_handle() 98 void itr_add_type_prio(struct itr_handler *h, uint32_t type, uint32_t prio) in itr_add_type_prio() argument 103 if (hdl->it == h->it) in itr_add_type_prio() 105 (h->flags & ITRF_SHARED)); in itr_add_type_prio() 107 itr_chip->ops->add(itr_chip, h->it, type, prio); in itr_add_type_prio() 108 SLIST_INSERT_HEAD(&handlers, h, link); in itr_add_type_prio()
|
A D | ree_fs_ta.c | 234 struct ts_store_handle **h) in ree_fs_ta_open() argument 478 *h = (struct ts_store_handle *)handle; in ree_fs_ta_open() 528 digest = malloc(h->shdr->hash_size); in check_digest() 531 res = crypto_hash_final(h->hash_ctx, digest, h->shdr->hash_size); in check_digest() 537 h->shdr->hash_size)) in check_digest() 677 struct ts_store_handle **h) in buf_ta_open() argument 687 res = ree_fs_ta_open(uuid, &handle->h); in buf_ta_open() 734 *h = (struct ts_store_handle *)handle; in buf_ta_open() 735 ree_fs_ta_close(handle->h); in buf_ta_open() 739 ree_fs_ta_close(handle->h); in buf_ta_open() [all …]
|
A D | ldelf_syscalls.c | 23 struct ts_store_handle *h; member 92 if (binh->op && binh->h) in bin_close() 93 binh->op->close(binh->h); in bin_close() 109 int h = 0; in ldelf_syscall_open_bin() local 145 res = binh->op->open(uuid, &binh->h); in ldelf_syscall_open_bin() 157 res = binh->op->open(uuid, &binh->h); in ldelf_syscall_open_bin() 180 h = handle_get(&sys_ctx->db, binh); in ldelf_syscall_open_bin() 181 if (h < 0) in ldelf_syscall_open_bin() 183 *handle = h; in ldelf_syscall_open_bin() 209 res = binh->op->read(binh->h, NULL, in ldelf_syscall_close_bin() [all …]
|
A D | early_ta.c | 30 struct ts_store_handle **h) in early_ta_open() argument 32 return emb_ts_open(uuid, h, find_early_ta); in early_ta_open()
|
/optee_os-3.20.0/scripts/ |
A D | print_tee_hash.py | 30 def hash_range(h, elf, start, end): argument 46 def hash_section(h, elf, name): argument 54 h.update(d) 69 h = hashes.Hash(hashes.SHA256(), default_backend()) 71 hash_range(h, elf, '__text_data_end', '__text_end') 72 hash_section(h, elf, '.text_init') 73 hash_section(h, elf, '.text_pageable') 74 hash_section(h, elf, '.rodata') 75 hash_section(h, elf, '.rodata_init') 76 hash_section(h, elf, '.rodata_pageable') [all …]
|
A D | checkpatch_inc.sh | 7 core/include/gen-asm-defines.h \ 10 lib/libutee/include/elf.h \ 11 lib/libutee/include/elf_common.h \ 12 core/arch/arm/include/arm{32,64}.h \ 13 core/arch/arm/plat-ti/api_monitor_index_a{9,15}.h \ 16 core/arch/riscv/include/encoding.h )
|
/optee_os-3.20.0/ta/avb/ |
A D | entry.c | 38 TEE_ObjectHandle *h) in open_rb_state() argument 83 TEE_ObjectHandle h; in read_rb_idx() local 124 TEE_CloseObject(h); in read_rb_idx() 139 TEE_ObjectHandle h; in write_rb_idx() local 174 TEE_CloseObject(h); in write_rb_idx() 187 TEE_ObjectHandle h; in read_lock_state() local 210 TEE_CloseObject(h); in read_lock_state() 225 TEE_ObjectHandle h; in write_lock_state() local 244 TEE_CloseObject(h); in write_lock_state() 287 value_sz, &h); in write_persist_value() [all …]
|
/optee_os-3.20.0/lib/libdl/ |
A D | dlfcn.c | 41 struct dl_handle *h = NULL; in dlopen() local 46 h = malloc(sizeof(*h)); in dlopen() 47 if (!h) in dlopen() 73 h->uuid = uuid; in dlopen() 74 return (void *)h; in dlopen() 76 free(h); in dlopen() 95 struct dl_handle *h = handle; in dlsym() local 107 params[0].memref.buffer = &h->uuid; in dlsym() 108 params[0].memref.size = sizeof(h->uuid); in dlsym()
|
/optee_os-3.20.0/core/include/kernel/ |
A D | embedded_ts.h | 25 TEE_Result emb_ts_read(struct ts_store_handle *h, void *data, size_t len); 26 void emb_ts_close(struct ts_store_handle *h); 29 struct ts_store_handle **h, 32 TEE_Result emb_ts_get_size(const struct ts_store_handle *h, size_t *size); 33 TEE_Result emb_ts_get_tag(const struct ts_store_handle *h,
|
A D | ts_store.h | 22 struct ts_store_handle **h); 27 TEE_Result (*get_size)(const struct ts_store_handle *h, 34 TEE_Result (*get_tag)(const struct ts_store_handle *h, 47 TEE_Result (*read)(struct ts_store_handle *h, void *data, 52 void (*close)(struct ts_store_handle *h);
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/mac/poly1305/ |
A D | poly1305.c | 35 h0 = st->h[0]; in s_poly1305_block() 36 h1 = st->h[1]; in s_poly1305_block() 37 h2 = st->h[2]; in s_poly1305_block() 38 h3 = st->h[3]; in s_poly1305_block() 39 h4 = st->h[4]; in s_poly1305_block() 69 st->h[0] = h0; in s_poly1305_block() 97 st->h[0] = 0; in poly1305_init() 98 st->h[1] = 0; in poly1305_init() 99 st->h[2] = 0; in poly1305_init() 100 st->h[3] = 0; in poly1305_init() [all …]
|
/optee_os-3.20.0/core/arch/arm/crypto/ |
A D | aes-gcm-ce.c | 40 h[0] = (a << 1) | (b >> 63); in ghash_reflect() 41 h[1] = (b << 1) | (a >> 63); in ghash_reflect() 43 h[1] ^= 0xc200000000000000UL; in ghash_reflect() 50 uint64_t h[2] = { 0 }; in internal_aes_gcm_set_key() local 55 ghash_reflect(state->ghash_key.h, k); in internal_aes_gcm_set_key() 57 internal_aes_gcm_gfmul(k, k, h); in internal_aes_gcm_set_key() 58 ghash_reflect(state->ghash_key.h2, h); in internal_aes_gcm_set_key() 60 internal_aes_gcm_gfmul(k, h, h); in internal_aes_gcm_set_key() 61 ghash_reflect(state->ghash_key.h3, h); in internal_aes_gcm_set_key() 63 internal_aes_gcm_gfmul(k, h, h); in internal_aes_gcm_set_key() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/ |
A D | adler32.c | 80 unsigned char* h; in adler32_finish() local 85 h = hash; in adler32_finish() 89 h[3] = ctx->s[0] & 0x0ff; in adler32_finish() 92 h[2] = (ctx->s[0] >> 8) & 0x0ff; in adler32_finish() 95 h[1] = ctx->s[1] & 0x0ff; in adler32_finish() 98 h[0] = (ctx->s[1] >> 8) & 0x0ff; in adler32_finish()
|
A D | crc32.c | 160 unsigned char* h; in crc32_finish() local 165 h = hash; in crc32_finish() 171 h[i] = ((unsigned char*)&(crc))[size-i-1]; in crc32_finish()
|
/optee_os-3.20.0/core/crypto/ |
A D | aes-gcm-ghash-tbl.c | 54 unsigned char h[16]; in internal_aes_gcm_ghash_gen_tbl() local 56 memset(h, 0, 16); in internal_aes_gcm_ghash_gen_tbl() 57 crypto_aes_enc_block(ek->data, sizeof(ek->data), ek->rounds, h, h); in internal_aes_gcm_ghash_gen_tbl() 59 vh = get_be64(h); in internal_aes_gcm_ghash_gen_tbl() 60 vl = get_be64(h + 8); in internal_aes_gcm_ghash_gen_tbl()
|
/optee_os-3.20.0/core/tee/ |
A D | tee_cryp_pbkdf2.c | 28 struct hmac_parms *h, struct pbkdf2_parms *p) in pbkdf2_f() argument 37 res = crypto_mac_init(h->ctx, p->password, p->password_len); in pbkdf2_f() 43 res = crypto_mac_update(h->ctx, p->salt, in pbkdf2_f() 51 res = crypto_mac_update(h->ctx, (uint8_t *)&be_index, in pbkdf2_f() 56 res = crypto_mac_update(h->ctx, u, h->hash_len); in pbkdf2_f() 61 res = crypto_mac_final(h->ctx, u, sizeof(u)); in pbkdf2_f()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/safer/ |
A D | safer.c | 251 { unsigned char a, b, c, d, e, f, g, h, t; in s_safer_ecb_encrypt() local 261 e = pt[4]; f = pt[5]; g = pt[6]; h = pt[7]; in s_safer_ecb_encrypt() 270 g = LOG(g) ^ *++key; h = EXP(h) + *++key; in s_safer_ecb_encrypt() 271 PHT(a, b); PHT(c, d); PHT(e, f); PHT(g, h); in s_safer_ecb_encrypt() 272 PHT(a, c); PHT(e, g); PHT(b, d); PHT(f, h); in s_safer_ecb_encrypt() 273 PHT(a, e); PHT(b, f); PHT(c, g); PHT(d, h); in s_safer_ecb_encrypt() 281 ct[6] = g & 0xFF; ct[7] = h & 0xFF; in s_safer_ecb_encrypt() 305 { unsigned char a, b, c, d, e, f, g, h, t; in s_safer_ecb_decrypt() local 315 e = ct[4]; f = ct[5]; g = ct[6]; h = ct[7]; in s_safer_ecb_decrypt() 328 h = LOG(h) ^ *--key; g = EXP(g) - *--key; in s_safer_ecb_decrypt() [all …]
|
/optee_os-3.20.0/ldelf/ |
A D | ta_elf_rel.c | 22 uint32_t h = 0; in elf_hash() local 26 h = (h << 4) + *p++; in elf_hash() 27 g = h & 0xf0000000; in elf_hash() 29 h ^= g >> 24; in elf_hash() 30 h &= ~g; in elf_hash() 32 return h; in elf_hash() 38 uint32_t h = 5381; in gnu_hash() local 41 h = (h << 5) + h + *p++; in gnu_hash() 43 return h; in gnu_hash() 169 chain = bucket + h->nbuckets; in resolve_sym_helper() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/crypt/ |
A D | crypt_register_all_prngs.c | 12 #define REGISTER_PRNG(h) do {\ argument 13 LTC_ARGCHK(register_prng(h) != -1); \
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/dsa/ |
A D | dsa_generate_pqg.c | 28 void *t2L1, *t2N1, *t2q, *t2seedlen, *U, *W, *X, *c, *h, *e, *seedinc; in s_dsa_make_params() local 111 err = mp_init_multi(&t2L1, &t2N1, &t2q, &t2seedlen, &U, &W, &X, &c, &h, &e, &seedinc, LTC_NULL); in s_dsa_make_params() 181 if ((err = rand_bn_bits(h, i, prng, wprng)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params() 182 } while (mp_cmp(h, p) != LTC_MP_LT || mp_cmp_d(h, 2) != LTC_MP_GT); in s_dsa_make_params() 183 if ((err = mp_sub_d(h, 1, h)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params() 185 if ((err = mp_exptmod(h, e, p, g)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params() 190 mp_clear_multi(t2L1, t2N1, t2q, t2seedlen, U, W, X, c, h, e, seedinc, LTC_NULL); in s_dsa_make_params()
|
/optee_os-3.20.0/ta/ |
A D | ta.mk | 62 arm32-user-sysregs-$(arm32-user-sysreg-txt)-h := arm32_user_sysreg.h 116 incfiles-extra-host := lib/libutils/ext/include/compiler.h 117 incfiles-extra-host += lib/libutils/ext/include/util.h 118 incfiles-extra-host += lib/libutils/ext/include/types_ext.h 122 incfiles-extra-host += core/include/tee/tee_fs_key_manager.h 123 incfiles-extra-host += core/include/tee/fs_htree.h 124 incfiles-extra-host += core/include/signed_hdr.h 129 incfiles-extra-host += core/arch/arm/include/ffa.h 130 incfiles-extra-host += core/arch/arm/include/smccc.h 165 $$(foreach h, $$(sf), $$(eval $$(call copy-file, $1/$$(h), \ [all …]
|
/optee_os-3.20.0/lib/libutee/ |
A D | tee_api_property.c | 51 static TEE_Result propset_get(TEE_PropSetHandle h, in propset_get() argument 55 if (h == TEE_PROPSET_CURRENT_TA) { in propset_get() 58 } else if (h == TEE_PROPSET_CURRENT_CLIENT) { in propset_get() 61 } else if (h == TEE_PROPSET_TEE_IMPLEMENTATION) { in propset_get() 127 static bool is_propset_pseudo_handle(TEE_PropSetHandle h) in is_propset_pseudo_handle() argument 129 return h == TEE_PROPSET_CURRENT_TA || in is_propset_pseudo_handle() 130 h == TEE_PROPSET_CURRENT_CLIENT || in is_propset_pseudo_handle() 131 h == TEE_PROPSET_TEE_IMPLEMENTATION; in is_propset_pseudo_handle() 144 if (is_propset_pseudo_handle(h)) { in propget_get_property() 147 res = propset_get(h, &eps, &eps_len); in propget_get_property() [all …]
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | ecjpake.c | 192 mbedtls_mpi *h ) in ecjpake_hash() argument 224 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( h, h, &grp->N ) ); in ecjpake_hash() 244 mbedtls_mpi r, h; in ecjpake_zkp_read() local 250 mbedtls_mpi_init( &h ); in ecjpake_zkp_read() 285 &VV, &h, X, &r, G ) ); in ecjpake_zkp_read() 297 mbedtls_mpi_free( &h ); in ecjpake_zkp_read() 328 mbedtls_mpi_init( &h ); in ecjpake_zkp_write() 334 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &h, &h, x ) ); /* x*h */ in ecjpake_zkp_write() 335 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &h, &v, &h ) ); /* v - x*h */ in ecjpake_zkp_write() 336 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &h, &h, &grp->N ) ); /* r */ in ecjpake_zkp_write() [all …]
|