| /optee_os/ta/avb/ |
| H A D | entry.c | 25 static TEE_Result create_rb_state(uint32_t lock_state, TEE_ObjectHandle *h) in create_rb_state() argument 33 &lock_state, sizeof(lock_state), h); in create_rb_state() 37 TEE_ObjectHandle *h) in open_rb_state() argument 44 sizeof(rb_obj_name), flags, h); in open_rb_state() 48 return create_rb_state(default_lock_state, h); in open_rb_state() 82 TEE_ObjectHandle h; in read_rb_idx() local 91 res = open_rb_state(DEFAULT_LOCK_STATE, &h); in read_rb_idx() 95 res = TEE_SeekObjectData(h, slot_offset, TEE_DATA_SEEK_SET); in read_rb_idx() 99 res = TEE_ReadObjectData(h, &idx, sizeof(idx), &count); in read_rb_idx() 110 res = TEE_SeekObjectData(h, slot_offset, in read_rb_idx() [all …]
|
| /optee_os/core/kernel/ |
| H A D | embedded_ts.c | 56 struct ts_store_handle **h, in emb_ts_open() argument 78 *h = handle; in emb_ts_open() 83 TEE_Result emb_ts_get_size(const struct ts_store_handle *h, size_t *size) in emb_ts_get_size() argument 85 const struct embedded_ts *ts = h->ts; in emb_ts_get_size() 95 TEE_Result emb_ts_get_tag(const struct ts_store_handle *h, in emb_ts_get_tag() argument 113 res = crypto_hash_update(ctx, h->ts->ts, h->ts->size); in emb_ts_get_tag() 122 static TEE_Result read_uncompressed(struct ts_store_handle *h, void *data_core, in read_uncompressed() argument 126 uint8_t *src = (uint8_t *)h->ts->ts + h->offs; in read_uncompressed() 129 if (ADD_OVERFLOW(h->offs, len, &next_offs) || in read_uncompressed() 130 next_offs > h->ts->size) in read_uncompressed() [all …]
|
| H 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_core, 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()
|
| H A D | interrupt.c | 113 struct itr_handler *h = NULL; in interrupt_call_handlers() local 118 SLIST_FOREACH(h, &chip->handlers, link) { in interrupt_call_handlers() 119 if (h->it == itr_num) { in interrupt_call_handlers() 120 if (h->handler(h) == ITRR_HANDLED) in interrupt_call_handlers() 122 else if (!(h->flags & ITRF_SHARED)) in interrupt_call_handlers() 151 struct itr_handler *h = NULL; in add_configure_handler() local 156 SLIST_FOREACH(h, &hdl->chip->handlers, link) { in add_configure_handler() 157 if (h->it == hdl->it && in add_configure_handler() 159 !(h->flags & ITRF_SHARED))) { in add_configure_handler() 217 struct itr_handler *h = NULL; in interrupt_remove_handler() local [all …]
|
| H A D | ree_fs_ta.c | 242 struct ts_store_handle **h) in ree_fs_ta_open() argument 486 *h = (struct ts_store_handle *)handle; in ree_fs_ta_open() 506 static TEE_Result ree_fs_ta_get_size(const struct ts_store_handle *h, in ree_fs_ta_get_size() argument 509 struct ree_fs_ta_handle *handle = (struct ree_fs_ta_handle *)h; in ree_fs_ta_get_size() 515 static TEE_Result ree_fs_ta_get_tag(const struct ts_store_handle *h, in ree_fs_ta_get_tag() argument 518 struct ree_fs_ta_handle *handle = (struct ree_fs_ta_handle *)h; in ree_fs_ta_get_tag() 531 static TEE_Result check_digest(struct ree_fs_ta_handle *h) in check_digest() argument 536 digest = malloc(h->shdr->hash_size); in check_digest() 539 res = crypto_hash_final(h->hash_ctx, digest, h->shdr->hash_size); in check_digest() 544 if (FTMN_CALLEE_DONE_MEMCMP(memcmp, digest, SHDR_GET_HASH(h->shdr), in check_digest() [all …]
|
| H A D | ldelf_syscalls.c | 24 struct ts_store_handle *h; member 115 if (binh->op && binh->h) in bin_close() 116 binh->op->close(binh->h); in bin_close() 133 int h = 0; in ldelf_syscall_open_bin() local 166 res = binh->op->open(bb_uuid, &binh->h); in ldelf_syscall_open_bin() 178 res = binh->op->open(bb_uuid, &binh->h); in ldelf_syscall_open_bin() 191 res = binh->op->get_size(binh->h, &binh->size_bytes); in ldelf_syscall_open_bin() 194 res = binh->op->get_tag(binh->h, tag, &tag_len); in ldelf_syscall_open_bin() 201 h = handle_get(&sys_ctx->db, binh); in ldelf_syscall_open_bin() 202 if (h < 0) in ldelf_syscall_open_bin() [all …]
|
| /optee_os/scripts/ |
| H A D | print_tee_hash.py | 30 def hash_range(h, elf, start, end): argument 43 h.update(segment.data()[begin_offs:begin_offs + size]) 46 def hash_section(h, elf, name): argument 54 h.update(d) 69 h = hashes.Hash(hashes.SHA256(), default_backend()) 70 hash_range(h, elf, '__text_start', '__text_data_start') 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') [all …]
|
| H 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 \ 17 core/arch/riscv/include/encoding.h )
|
| H A D | derive_rpmb_key.py | 12 h = bytes.fromhex(str) 16 h = bytes.fromhex('0' + str) 22 return h 70 h = hmac.HMAC(huk, hashes.SHA256()) 73 h.update(usage_word) 74 h.update(data) 75 return h.finalize()
|
| H A D | notify_maintainers.py | 66 " ".join(f"@{h}" for h in allh)) 69 " ".join(f"@{h}" for h in handles)) 72 " ".join(f"@{h}" for h in the_rest_handles)) 106 " ".join(f"@{h}" for h in handles_to_mention)) 120 " ".join(f"@{h}" for h in existing_handles)) 129 " ".join(f"@{h}" for h in skip_handles)) 134 message = "FYI " + " ".join(f"@{h}" for h in new_handles)
|
| /optee_os/core/lib/libtomcrypt/src/mac/poly1305/ |
| H 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() 70 st->h[1] = h1; in s_poly1305_block() 71 st->h[2] = h2; in s_poly1305_block() 72 st->h[3] = h3; in s_poly1305_block() 73 st->h[4] = h4; in s_poly1305_block() [all …]
|
| /optee_os/lib/libdl/ |
| H 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/core/include/kernel/ |
| H A D | embedded_ts.h | 25 TEE_Result emb_ts_read(struct ts_store_handle *h, void *data_core, 27 void emb_ts_close(struct ts_store_handle *h); 30 struct ts_store_handle **h, 33 TEE_Result emb_ts_get_size(const struct ts_store_handle *h, size_t *size); 34 TEE_Result emb_ts_get_tag(const struct ts_store_handle *h,
|
| 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, 52 TEE_Result (*read)(struct ts_store_handle *h, void *data_core, 57 void (*close)(struct ts_store_handle *h);
|
| /optee_os/core/arch/arm/crypto/ |
| H A D | aes-gcm-ce.c | 35 static void ghash_reflect(uint64_t h[2], const uint64_t k[2]) in ghash_reflect() 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() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/misc/ |
| H 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()
|
| /optee_os/core/tee/ |
| H 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/core/crypto/ |
| H A D | aes-gcm-ghash-tbl.c | 53 unsigned char h[16]; in internal_aes_gcm_ghash_gen_tbl() local 55 memset(h, 0, 16); in internal_aes_gcm_ghash_gen_tbl() 56 crypto_aes_enc_block(ek->data, sizeof(ek->data), ek->rounds, h, h); in internal_aes_gcm_ghash_gen_tbl() 58 vh = get_be64(h); in internal_aes_gcm_ghash_gen_tbl() 59 vl = get_be64(h + 8); in internal_aes_gcm_ghash_gen_tbl()
|
| /optee_os/core/lib/libtomcrypt/src/ciphers/safer/ |
| H 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() 266 e ^= *++key; f += *++key; g += *++key; h ^= *++key; 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() 277 e ^= *++key; f += *++key; g += *++key; h ^= *++key; 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 [all …]
|
| /optee_os/ldelf/ |
| H 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() 141 struct gnu_hashtab *h = elf->gnu_hashtab; in resolve_sym_helper() local [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/dsa/ |
| H 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/core/arch/arm/dts/ |
| H A D | stm32mp211.dtsi | 6 #include <dt-bindings/clock/st,stm32mp21-rcc.h> 7 #include <dt-bindings/gpio/gpio.h> 8 #include <dt-bindings/interrupt-controller/arm-gic.h> 9 #include <dt-bindings/firewall/stm32mp21-rifsc.h> 10 #include <dt-bindings/firewall/stm32mp25-rif.h> 11 #include <dt-bindings/firewall/stm32mp25-risab.h> 12 #include <dt-bindings/firewall/stm32mp25-risaf.h> 13 #include <dt-bindings/reset/st,stm32mp21-rcc.h>
|
| /optee_os/lib/libutee/ |
| H A D | tee_api_property.c | 56 static TEE_Result propset_get(TEE_PropSetHandle h, in propset_get() argument 60 if (h == TEE_PROPSET_CURRENT_TA) { in propset_get() 63 } else if (h == TEE_PROPSET_CURRENT_CLIENT) { in propset_get() 66 } else if (h == TEE_PROPSET_TEE_IMPLEMENTATION) { in propset_get() 135 static bool is_propset_pseudo_handle(TEE_PropSetHandle h) in is_propset_pseudo_handle() argument 137 return h == TEE_PROPSET_CURRENT_TA || in is_propset_pseudo_handle() 138 h == TEE_PROPSET_CURRENT_CLIENT || in is_propset_pseudo_handle() 139 h == TEE_PROPSET_TEE_IMPLEMENTATION; in is_propset_pseudo_handle() 142 static TEE_Result propget_get_property(TEE_PropSetHandle h, const char *name, in propget_get_property() argument 152 if (is_propset_pseudo_handle(h)) { in propget_get_property() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/misc/crypt/ |
| H A D | crypt_register_all_prngs.c | 12 #define REGISTER_PRNG(h) do {\ argument 13 LTC_ARGCHK(register_prng(h) != -1); \
|
| /optee_os/core/lib/libtomcrypt/src/prngs/ |
| H A D | rng_get_bytes.c | 119 HCRYPTPROV h = 0; in s_rng_win32() local 120 if (!CryptAcquireContextW(&h, NULL, MS_DEF_PROV_W, PROV_RSA_FULL, in s_rng_win32() 122 !CryptAcquireContextW(&h, NULL, MS_DEF_PROV_W, PROV_RSA_FULL, in s_rng_win32() 126 hProv = h; in s_rng_win32()
|