/optee_os/core/lib/zlib/ |
A D | inflate.c | 138 state->lencode = state->distcode = state->next = state->codes; 424 zmemcpy(state->window, end - state->wsize, state->wsize); 426 state->whave = state->wsize; 436 state->whave = state->wsize; 440 if (state->wnext == state->wsize) state->wnext = 0; 441 if (state->whave < state->wsize) state->whave += dist; 952 state->next = state->codes; 966 while (state->have < state->nlen + state->ndist) { 1026 state->next = state->codes; 1110 state->was = state->length; [all …]
|
A D | inffast.c | 82 state = (struct inflate_state FAR *)strm->state; 89 dmax = state->dmax; 91 wsize = state->wsize; 92 whave = state->whave; 93 wnext = state->wnext; 94 window = state->window; 95 hold = state->hold; 96 bits = state->bits; 97 lcode = state->lencode; 305 state->hold = hold; [all …]
|
/optee_os/core/crypto/ |
A D | aes-gcm.c | 79 memset(state, 0, sizeof(*state)); in __gcm_init() 91 memcpy(state->ctr, state->hash_state, sizeof(state->ctr)); in __gcm_init() 96 state->ctr, state->buf_tag); in __gcm_init() 117 state->ctr, state->buf_cryp); in __gcm_init() 200 if (!state->payload_bytes && state->buf_pos) { in __gcm_update_payload() 202 memset(state->buf_hash + state->buf_pos, 0, in __gcm_update_payload() 222 memcpy(state->buf_hash + state->buf_pos, in __gcm_update_payload() 278 memset(state->buf_hash + state->buf_pos, 0, in operation_final() 283 ghash_update_lengths(state, state->aad_bytes, state->payload_bytes); in operation_final() 285 xor_buf(state->buf_tag, state->hash_state, state->tag_len); in operation_final() [all …]
|
A D | aes-gcm-sw.c | 20 state->ctr, state->ghash_key.hash_subkey); in internal_aes_gcm_set_key() 27 void *y = state->hash_state; in ghash_update_block() 44 ghash_update_block(state, head); in internal_aes_gcm_ghash_update() 48 ghash_update_block(state, in internal_aes_gcm_ghash_update() 57 void *buf_cryp = state->buf_cryp; in encrypt_block() 64 enc_key->rounds, state->ctr, state->buf_cryp); in encrypt_block() 65 internal_aes_gcm_inc_ctr(state); in encrypt_block() 79 encrypt_block(state, ek, s, d); in encrypt_pl() 96 void *buf_cryp = state->buf_cryp; in decrypt_block() 100 internal_aes_gcm_inc_ctr(state); in decrypt_block() [all …]
|
A D | rng_fortuna.c | 57 } state; variable 122 state.pool_ctx[n] = NULL; in fortuna_done() 125 state.reseed_ctx = NULL; in fortuna_done() 127 state.ctx = NULL; in fortuna_done() 139 if (state.ctx) in crypto_rng_init() 142 memset(&state, 0, sizeof(state)); in crypto_rng_init() 168 state.ctx = ctx; in crypto_rng_init() 242 state.pool0_length = l; in add_event() 444 state.reseed_count++; in maybe_reseed() 456 state.pool0_length = 0; in maybe_reseed() [all …]
|
A D | sm3.c | 108 A = ctx->state[0]; in sm3_process() 109 B = ctx->state[1]; in sm3_process() 110 C = ctx->state[2]; in sm3_process() 111 D = ctx->state[3]; in sm3_process() 112 E = ctx->state[4]; in sm3_process() 113 F = ctx->state[5]; in sm3_process() 114 G = ctx->state[6]; in sm3_process() 115 H = ctx->state[7]; in sm3_process() 147 ctx->state[0] ^= A; in sm3_process() 148 ctx->state[1] ^= B; in sm3_process() [all …]
|
/optee_os/lib/libunw/ |
A D | unwind_arm32.c | 165 if (state->byte == 0) { in unwind_exec_read_byte() 166 state->byte = 3; in unwind_exec_read_byte() 168 state->entries--; in unwind_exec_read_byte() 170 state->byte--; in unwind_exec_read_byte() 271 state->entries = 0; in unwind_exec_insn() 335 state->byte = 2; in unwind_tab() 336 state->entries = 1; in unwind_tab() 338 state->byte = 1; in unwind_tab() 354 state->registers[PC] = state->registers[LR]; in unwind_tab() 359 if (state->start_pc != state->registers[PC]) in unwind_tab() [all …]
|
/optee_os/lib/libmbedtls/mbedtls/library/ |
A D | chacha20.c | 93 state[a] += state[b]; in chacha20_quarter_round() 94 state[d] ^= state[a]; in chacha20_quarter_round() 95 state[d] = ROTL32( state[d], 16 ); in chacha20_quarter_round() 98 state[c] += state[d]; in chacha20_quarter_round() 99 state[b] ^= state[c]; in chacha20_quarter_round() 103 state[a] += state[b]; in chacha20_quarter_round() 104 state[d] ^= state[a]; in chacha20_quarter_round() 105 state[d] = ROTL32( state[d], 8 ); in chacha20_quarter_round() 108 state[c] += state[d]; in chacha20_quarter_round() 109 state[b] ^= state[c]; in chacha20_quarter_round() [all …]
|
/optee_os/core/arch/arm/crypto/ |
A D | aes-gcm-ce.c | 55 ghash_reflect(state->ghash_key.h, k); in internal_aes_gcm_set_key() 58 ghash_reflect(state->ghash_key.h2, h); in internal_aes_gcm_set_key() 61 ghash_reflect(state->ghash_key.h3, h); in internal_aes_gcm_set_key() 64 ghash_reflect(state->ghash_key.h4, h); in internal_aes_gcm_set_key() 86 get_be_block(dg, state->hash_state); in internal_aes_gcm_ghash_update() 94 put_be_block(state->hash_state, dg); in internal_aes_gcm_ghash_update() 101 void *buf_cryp = state->buf_cryp; in encrypt_pl() 112 internal_aes_gcm_inc_ctr(state); in encrypt_pl() 155 memcpy(ks, state->buf_cryp, sizeof(state->buf_cryp)); in update_payload_2block() 160 internal_aes_gcm_inc_ctr(state); in update_payload_2block() [all …]
|
/optee_os/core/arch/arm/kernel/ |
A D | vfp.c | 31 state->fpexc = fpexc; in vfp_lazy_save_state_init() 42 state->fpscr = vfp_read_fpscr(); in vfp_lazy_save_state_final() 43 vfp_save_extension_regs(state->reg); in vfp_lazy_save_state_final() 60 vfp_write_fpscr(state->fpscr); in vfp_lazy_restore_state() 63 vfp_write_fpexc(state->fpexc); in vfp_lazy_restore_state() 93 state->cpacr_el1 = read_cpacr_el1(); in vfp_lazy_save_state_init() 103 state->fpcr = read_fpcr(); in vfp_lazy_save_state_final() 104 state->fpsr = read_fpsr(); in vfp_lazy_save_state_final() 120 write_fpcr(state->fpcr); in vfp_lazy_restore_state() 121 write_fpsr(state->fpsr); in vfp_lazy_restore_state() [all …]
|
A D | unwind_arm32.c | 62 struct unwind_state_arm32 state = { }; in unw_get_kernel_stack() local 71 state.registers[7] = read_r7(); in unw_get_kernel_stack() 73 state.registers[FP] = read_fp(); in unw_get_kernel_stack() 74 state.registers[SP] = read_sp(); in unw_get_kernel_stack() 75 state.registers[LR] = read_lr(); in unw_get_kernel_stack() 89 addr[n] = state.registers[PC]; in unw_get_kernel_stack() 110 struct unwind_state_arm32 state = { }; in print_kernel_stack() local 115 state.registers[7] = read_r7(); in print_kernel_stack() 117 state.registers[FP] = read_fp(); in print_kernel_stack() 118 state.registers[SP] = read_sp(); in print_kernel_stack() [all …]
|
/optee_os/core/lib/libtomcrypt/src/ciphers/ |
A D | anubis.c | 1033 ulong32 state[4]; in anubis_crypt() local 1041 state[i] = in anubis_crypt() 1054 T0[(state[0] >> 24) & 0xff] ^ in anubis_crypt() 1055 T1[(state[1] >> 24) & 0xff] ^ in anubis_crypt() 1056 T2[(state[2] >> 24) & 0xff] ^ in anubis_crypt() 1057 T3[(state[3] >> 24) & 0xff] ^ in anubis_crypt() 1060 T0[(state[0] >> 16) & 0xff] ^ in anubis_crypt() 1077 state[0] = inter[0]; in anubis_crypt() 1078 state[1] = inter[1]; in anubis_crypt() 1079 state[2] = inter[2]; in anubis_crypt() [all …]
|
/optee_os/core/include/tee/ |
A D | tee_svc_cryp.h | 34 uint32_t *state); 36 TEE_Result syscall_cryp_state_free(unsigned long state); 40 TEE_Result syscall_hash_init(unsigned long state, const void *iv, 47 TEE_Result syscall_cipher_init(unsigned long state, const void *iv, 54 TEE_Result syscall_cryp_derive_key(unsigned long state, 63 TEE_Result syscall_authenc_update_aad(unsigned long state, 65 TEE_Result syscall_authenc_update_payload(unsigned long state, 68 TEE_Result syscall_authenc_enc_final(unsigned long state, 71 TEE_Result syscall_authenc_dec_final(unsigned long state, 75 TEE_Result syscall_asymm_operate(unsigned long state, [all …]
|
/optee_os/core/lib/libtomcrypt/ |
A D | sha256_accel.c | 71 void *state = md->sha256.state; in sha256_compress_nblocks() local 75 crypto_accel_sha256_compress(state, buf, blocks); in sha256_compress_nblocks() 95 md->sha256.state[0] = 0x6A09E667UL; in sha256_init() 96 md->sha256.state[1] = 0xBB67AE85UL; in sha256_init() 97 md->sha256.state[2] = 0x3C6EF372UL; in sha256_init() 98 md->sha256.state[3] = 0xA54FF53AUL; in sha256_init() 99 md->sha256.state[4] = 0x510E527FUL; in sha256_init() 100 md->sha256.state[5] = 0x9B05688CUL; in sha256_init() 101 md->sha256.state[6] = 0x1F83D9ABUL; in sha256_init() 102 md->sha256.state[7] = 0x5BE0CD19UL; in sha256_init() [all …]
|
A D | sha1_accel.c | 69 void *state = md->sha1.state; in sha1_compress_nblocks() local 71 COMPILE_TIME_ASSERT(sizeof(md->sha1.state[0]) == sizeof(uint32_t)); in sha1_compress_nblocks() 73 crypto_accel_sha1_compress(state, buf, blocks); in sha1_compress_nblocks() 99 md->sha1.state[0] = 0x67452301UL; in sha1_init() 100 md->sha1.state[1] = 0xefcdab89UL; in sha1_init() 101 md->sha1.state[2] = 0x98badcfeUL; in sha1_init() 102 md->sha1.state[3] = 0x10325476UL; in sha1_init() 103 md->sha1.state[4] = 0xc3d2e1f0UL; in sha1_init() 155 STORE32H(md->sha1.state[i], out+(4*i)); in sha1_done()
|
/optee_os/core/lib/libtomcrypt/src/mac/pelican/ |
A D | pelican.c | 48 zeromem(pelmac->state, 16); in pelican_init() 49 aes_ecb_encrypt(pelmac->state, pelmac->state, &pelmac->K); in pelican_init() 60 LOAD32H(s0, pelmac->state ); in _four_rounds() 61 LOAD32H(s1, pelmac->state + 4); in _four_rounds() 62 LOAD32H(s2, pelmac->state + 8); in _four_rounds() 63 LOAD32H(s3, pelmac->state + 12); in _four_rounds() 87 STORE32H(s0, pelmac->state ); in _four_rounds() 88 STORE32H(s1, pelmac->state + 4); in _four_rounds() 89 STORE32H(s2, pelmac->state + 8); in _four_rounds() 90 STORE32H(s3, pelmac->state + 12); in _four_rounds() [all …]
|
/optee_os/lib/libunw/include/unw/ |
A D | unwind.h | 56 bool unwind_stack_arm32(struct unwind_state_arm32 *state, 59 void print_stack_arm32(struct unwind_state_arm32 *state, 62 static inline bool unwind_stack_arm32(struct unwind_state_arm32 *state __unused, in unwind_stack_arm32() 69 static inline void print_stack_arm32(struct unwind_state_arm32 *state __unused, in print_stack_arm32() 95 bool unwind_stack_arm64(struct unwind_state_arm64 *state, 98 void print_stack_arm64(struct unwind_state_arm64 *state, 101 static inline bool unwind_stack_arm64(struct unwind_state_arm64 *state __unused, in unwind_stack_arm64() 108 static inline void print_stack_arm64(struct unwind_state_arm64 *state __unused, in print_stack_arm64()
|
/optee_os/core/kernel/ |
A D | mutex.c | 49 can_lock = !m->state; in __mutex_lock() 101 if (!m->state) in __mutex_unlock() 104 m->state = 0; in __mutex_unlock() 140 m->state = -1; in __mutex_trylock() 160 if (m->state <= 0) in __mutex_read_unlock() 162 m->state--; in __mutex_read_unlock() 228 m->state++; in __mutex_read_trylock() 325 if (m->state) in mutex_destroy() 416 if (!m->state) in __condvar_wait() 424 m->state--; in __condvar_wait() [all …]
|
/optee_os/core/lib/libtomcrypt/src/hashes/ |
A D | sha1.c | 60 a = md->sha1.state[0]; in _sha1_compress() 61 b = md->sha1.state[1]; in _sha1_compress() 62 c = md->sha1.state[2]; in _sha1_compress() 63 d = md->sha1.state[3]; in _sha1_compress() 64 e = md->sha1.state[4]; in _sha1_compress() 140 md->sha1.state[0] = md->sha1.state[0] + a; in _sha1_compress() 141 md->sha1.state[1] = md->sha1.state[1] + b; in _sha1_compress() 142 md->sha1.state[2] = md->sha1.state[2] + c; in _sha1_compress() 143 md->sha1.state[3] = md->sha1.state[3] + d; in _sha1_compress() 144 md->sha1.state[4] = md->sha1.state[4] + e; in _sha1_compress() [all …]
|
/optee_os/core/lib/libtomcrypt/src/hashes/sha2/ |
A D | sha224.c | 49 md->sha256.state[0] = 0xc1059ed8UL; in sha224_init() 50 md->sha256.state[1] = 0x367cd507UL; in sha224_init() 51 md->sha256.state[2] = 0x3070dd17UL; in sha224_init() 52 md->sha256.state[3] = 0xf70e5939UL; in sha224_init() 53 md->sha256.state[4] = 0xffc00b31UL; in sha224_init() 54 md->sha256.state[5] = 0x68581511UL; in sha224_init() 55 md->sha256.state[6] = 0x64f98fa7UL; in sha224_init() 56 md->sha256.state[7] = 0xbefa4fa4UL; in sha224_init()
|
/optee_os/out/arm/export-ta_arm64/host_include/ |
A D | utee_syscalls.h | 86 uint32_t *state); 88 TEE_Result _utee_cryp_state_free(unsigned long state); 92 TEE_Result _utee_hash_update(unsigned long state, const void *chunk, 94 TEE_Result _utee_hash_final(unsigned long state, const void *chunk, 97 TEE_Result _utee_cipher_init(unsigned long state, const void *iv, 99 TEE_Result _utee_cipher_update(unsigned long state, const void *src, 101 TEE_Result _utee_cipher_final(unsigned long state, const void *src, 127 TEE_Result _utee_cryp_derive_key(unsigned long state, 139 TEE_Result _utee_authenc_update_payload(unsigned long state, 151 TEE_Result _utee_asymm_operate(unsigned long state, [all …]
|
/optee_os/out/arm/export-ta_arm64/include/ |
A D | utee_syscalls.h | 86 uint32_t *state); 88 TEE_Result _utee_cryp_state_free(unsigned long state); 92 TEE_Result _utee_hash_update(unsigned long state, const void *chunk, 94 TEE_Result _utee_hash_final(unsigned long state, const void *chunk, 97 TEE_Result _utee_cipher_init(unsigned long state, const void *iv, 99 TEE_Result _utee_cipher_update(unsigned long state, const void *src, 101 TEE_Result _utee_cipher_final(unsigned long state, const void *src, 127 TEE_Result _utee_cryp_derive_key(unsigned long state, 139 TEE_Result _utee_authenc_update_payload(unsigned long state, 151 TEE_Result _utee_asymm_operate(unsigned long state, [all …]
|
/optee_os/lib/libutee/include/ |
A D | utee_syscalls.h | 86 uint32_t *state); 88 TEE_Result _utee_cryp_state_free(unsigned long state); 92 TEE_Result _utee_hash_update(unsigned long state, const void *chunk, 94 TEE_Result _utee_hash_final(unsigned long state, const void *chunk, 97 TEE_Result _utee_cipher_init(unsigned long state, const void *iv, 99 TEE_Result _utee_cipher_update(unsigned long state, const void *src, 101 TEE_Result _utee_cipher_final(unsigned long state, const void *src, 127 TEE_Result _utee_cryp_derive_key(unsigned long state, 139 TEE_Result _utee_authenc_update_payload(unsigned long state, 151 TEE_Result _utee_asymm_operate(unsigned long state, [all …]
|
/optee_os/out/arm/export-ta_arm32/host_include/ |
A D | utee_syscalls.h | 86 uint32_t *state); 88 TEE_Result _utee_cryp_state_free(unsigned long state); 92 TEE_Result _utee_hash_update(unsigned long state, const void *chunk, 94 TEE_Result _utee_hash_final(unsigned long state, const void *chunk, 97 TEE_Result _utee_cipher_init(unsigned long state, const void *iv, 99 TEE_Result _utee_cipher_update(unsigned long state, const void *src, 101 TEE_Result _utee_cipher_final(unsigned long state, const void *src, 127 TEE_Result _utee_cryp_derive_key(unsigned long state, 139 TEE_Result _utee_authenc_update_payload(unsigned long state, 151 TEE_Result _utee_asymm_operate(unsigned long state, [all …]
|
/optee_os/out/arm/export-ta_arm32/include/ |
A D | utee_syscalls.h | 86 uint32_t *state); 88 TEE_Result _utee_cryp_state_free(unsigned long state); 92 TEE_Result _utee_hash_update(unsigned long state, const void *chunk, 94 TEE_Result _utee_hash_final(unsigned long state, const void *chunk, 97 TEE_Result _utee_cipher_init(unsigned long state, const void *iv, 99 TEE_Result _utee_cipher_update(unsigned long state, const void *src, 101 TEE_Result _utee_cipher_final(unsigned long state, const void *src, 127 TEE_Result _utee_cryp_derive_key(unsigned long state, 139 TEE_Result _utee_authenc_update_payload(unsigned long state, 151 TEE_Result _utee_asymm_operate(unsigned long state, [all …]
|