/optee_os/core/kernel/ |
A D | tee_ta_manager.c | 226 return s; in tee_ta_find_session() 238 if (!s) in tee_ta_get_session() 241 s = NULL; in tee_ta_get_session() 255 s = NULL; in tee_ta_get_session() 264 return s; in tee_ta_get_session() 294 s->ts_sess.ctx->ops->dump_ftrace(s->ts_sess.ctx); in destroy_session() 303 free(s); in destroy_session() 650 if (!s) in tee_ta_init_session() 697 free(s); in tee_ta_init_session() 736 *sess = s; in tee_ta_open_session() [all …]
|
A D | ts_manager.c | 21 if (s) { in update_current_ctx() 23 s = TAILQ_NEXT(s, link_tsd); in update_current_ctx() 25 if (s) in update_current_ctx() 26 ctx = s->ctx; in update_current_ctx() 51 if (s) { in ts_pop_current_session() 55 return s; in ts_pop_current_session() 62 if (s) in ts_get_calling_session() 63 s = TAILQ_NEXT(s, link_tsd); in ts_get_calling_session() 64 return s; in ts_get_calling_session() 76 if (!s) in ts_get_current_session() [all …]
|
A D | pseudo_ta.c | 20 static bool client_is_secure(struct ts_session *s) in client_is_secure() argument 36 if (client_is_secure(s)) in validate_in_param() 76 if (!validate_in_param(s, mem->mobj)) in copy_in_param() 145 struct tee_ta_session *ta_sess = to_ta_session(s); in pseudo_ta_enter_open_session() 149 ts_push_current_session(s); in pseudo_ta_enter_open_session() 159 void **user_ctx = &s->user_ctx; in pseudo_ta_enter_open_session() 196 ts_push_current_session(s); in pseudo_ta_enter_invoke_cmd() 223 void *user_ctx = s->user_ctx; in pseudo_ta_enter_close_session() 225 ts_push_current_session(s); in pseudo_ta_enter_close_session() 290 struct tee_ta_session *s) in tee_ta_init_pseudo_ta_session() argument [all …]
|
/optee_os/core/tee/ |
A D | uuid.c | 12 d[0] = s->timeLow >> 24; in tee_uuid_to_octets() 13 d[1] = s->timeLow >> 16; in tee_uuid_to_octets() 14 d[2] = s->timeLow >> 8; in tee_uuid_to_octets() 15 d[3] = s->timeLow; in tee_uuid_to_octets() 16 d[4] = s->timeMid >> 8; in tee_uuid_to_octets() 17 d[5] = s->timeMid; in tee_uuid_to_octets() 20 memcpy(d + 8, s->clockSeqAndNode, sizeof(s->clockSeqAndNode)); in tee_uuid_to_octets() 25 d->timeLow = SHIFT_U32(s[0], 24) | SHIFT_U32(s[1], 16) | in tee_uuid_from_octets() 26 SHIFT_U32(s[2], 8) | s[3]; in tee_uuid_from_octets() 27 d->timeMid = SHIFT_U32(s[4], 8) | s[5]; in tee_uuid_from_octets() [all …]
|
/optee_os/lib/libutils/isoc/newlib/ |
A D | strchr.c | 111 if (!*s) 113 s++; 121 while (*s) 122 s++; 129 if (!*s) 131 if (*s == c) 133 s++; 152 while (*s && *s != c) 153 s++; 154 if (*s == c) [all …]
|
A D | strtoul.c | 173 c = *s++; 177 c = *s++; 179 c = *s++; 181 c == '0' && (*s == 'x' || *s == 'X')) { 182 c = s[1]; 183 s += 2; 190 for (acc = 0, any = 0;; c = *s++) { 212 *endptr = (char *) (any ? (char *)s - 1 : nptr); 219 _DEFUN (strtoul, (s, ptr, base), 220 _CONST char *s _AND [all …]
|
/optee_os/core/arch/arm/crypto/ |
A D | sha256_armv8a_ce_a64.S | 31 add t1.4s, v\s0\().4s, \rc\().4s 36 add t0.4s, v\s0\().4s, \rc\().4s 44 sha256su0 v\s0\().4s, v\s1\().4s 46 sha256su1 v\s0\().4s, v\s2\().4s, v\s3\().4s 57 ld1 { v0.4s- v3.4s}, [x8], #64 58 ld1 { v4.4s- v7.4s}, [x8], #64 59 ld1 { v8.4s-v11.4s}, [x8], #64 60 ld1 {v12.4s-v15.4s}, [x8] 76 1: add t0.4s, v16.4s, v0.4s 101 add dgav.4s, dgav.4s, dg0v.4s [all …]
|
A D | sha1_armv8a_ce_a64.S | 35 add t1.4s, v\s0\().4s, \rc\().4s 44 add t0.4s, v\s0\().4s, \rc\().4s 52 sha1su0 v\s0\().4s, v\s1\().4s, v\s2\().4s 54 sha1su1 v\s0\().4s, v\s3\().4s 63 ld1r {k0.4s}, [x6], #4 64 ld1r {k1.4s}, [x6], #4 66 ld1r {k3.4s}, [x6] 69 ld1 {dgav.4s}, [x0] 81 1: add t0.4s, v8.4s, k0.4s 109 add dgbv.2s, dgbv.2s, dg1v.2s [all …]
|
/optee_os/core/lib/libtomcrypt/ |
A D | dsa.c | 19 memset(s, 0, sizeof(*s)); in crypto_acipher_alloc_dsa_keypair() 20 if (!bn_alloc_max(&s->g)) in crypto_acipher_alloc_dsa_keypair() 23 if (!bn_alloc_max(&s->p)) in crypto_acipher_alloc_dsa_keypair() 25 if (!bn_alloc_max(&s->q)) in crypto_acipher_alloc_dsa_keypair() 27 if (!bn_alloc_max(&s->y)) in crypto_acipher_alloc_dsa_keypair() 29 if (!bn_alloc_max(&s->x)) in crypto_acipher_alloc_dsa_keypair() 33 crypto_bignum_free(s->g); in crypto_acipher_alloc_dsa_keypair() 34 crypto_bignum_free(s->p); in crypto_acipher_alloc_dsa_keypair() 43 memset(s, 0, sizeof(*s)); in crypto_acipher_alloc_dsa_public_key() 102 void *r, *s; in crypto_acipher_dsa_sign() local [all …]
|
A D | dh.c | 15 TEE_Result crypto_acipher_alloc_dh_keypair(struct dh_keypair *s, in crypto_acipher_alloc_dh_keypair() argument 18 memset(s, 0, sizeof(*s)); in crypto_acipher_alloc_dh_keypair() 19 if (!bn_alloc_max(&s->g)) in crypto_acipher_alloc_dh_keypair() 21 if (!bn_alloc_max(&s->p)) in crypto_acipher_alloc_dh_keypair() 23 if (!bn_alloc_max(&s->y)) in crypto_acipher_alloc_dh_keypair() 25 if (!bn_alloc_max(&s->x)) in crypto_acipher_alloc_dh_keypair() 27 if (!bn_alloc_max(&s->q)) in crypto_acipher_alloc_dh_keypair() 31 crypto_bignum_free(s->g); in crypto_acipher_alloc_dh_keypair() 32 crypto_bignum_free(s->p); in crypto_acipher_alloc_dh_keypair() 33 crypto_bignum_free(s->y); in crypto_acipher_alloc_dh_keypair() [all …]
|
/optee_os/lib/libmbedtls/core/ |
A D | ecc.c | 40 if (!s) in ecc_free_public_key() 185 mbedtls_mpi s; in ecc_sign() local 189 memset(&s, 0, sizeof(s)); in ecc_sign() 257 memset(&s, 0, sizeof(s)); in ecc_verify() 372 memset(s, 0, sizeof(*s)); in crypto_asym_alloc_ecc_keypair() 402 if (!s->d) in crypto_asym_alloc_ecc_keypair() 405 if (!s->x) in crypto_asym_alloc_ecc_keypair() 408 if (!s->y) in crypto_asym_alloc_ecc_keypair() 443 memset(s, 0, sizeof(*s)); in crypto_asym_alloc_ecc_public_key() 473 if (!s->x) in crypto_asym_alloc_ecc_public_key() [all …]
|
A D | dh.c | 20 memset(s, 0, sizeof(*s)); in crypto_acipher_alloc_dh_keypair() 21 s->g = crypto_bignum_allocate(key_size_bits); in crypto_acipher_alloc_dh_keypair() 22 if (!s->g) in crypto_acipher_alloc_dh_keypair() 25 if (!s->p) in crypto_acipher_alloc_dh_keypair() 28 if (!s->y) in crypto_acipher_alloc_dh_keypair() 31 if (!s->x) in crypto_acipher_alloc_dh_keypair() 34 if (!s->q) in crypto_acipher_alloc_dh_keypair() 38 crypto_bignum_free(s->g); in crypto_acipher_alloc_dh_keypair() 39 crypto_bignum_free(s->p); in crypto_acipher_alloc_dh_keypair() 40 crypto_bignum_free(s->y); in crypto_acipher_alloc_dh_keypair() [all …]
|
A D | rsa.c | 132 memset(s, 0, sizeof(*s)); in crypto_acipher_alloc_rsa_keypair() 134 if (!s->e) in crypto_acipher_alloc_rsa_keypair() 137 if (!s->d) in crypto_acipher_alloc_rsa_keypair() 140 if (!s->n) in crypto_acipher_alloc_rsa_keypair() 143 if (!s->p) in crypto_acipher_alloc_rsa_keypair() 146 if (!s->q) in crypto_acipher_alloc_rsa_keypair() 167 memset(s, 0, sizeof(*s)); in crypto_acipher_alloc_rsa_public_key() 169 if (!s->e) in crypto_acipher_alloc_rsa_public_key() 172 if (!s->n) in crypto_acipher_alloc_rsa_public_key() 182 if (!s) in crypto_acipher_free_rsa_public_key() [all …]
|
/optee_os/core/lib/libtomcrypt/src/stream/rc4/ |
A D | rc4_stream.c | 24 unsigned char tmp, *s; in rc4_stream_setup() local 32 s = st->buf; in rc4_stream_setup() 34 s[x] = x; in rc4_stream_setup() 38 y = (y + s[x] + key[j++]) & 255; in rc4_stream_setup() 42 tmp = s[x]; s[x] = s[y]; s[y] = tmp; in rc4_stream_setup() 60 unsigned char x, y, *s, tmp; in rc4_stream_crypt() local 68 s = st->buf; in rc4_stream_crypt() 71 y = (y + s[x]) & 255; in rc4_stream_crypt() 72 tmp = s[x]; s[x] = s[y]; s[y] = tmp; in rc4_stream_crypt() 73 tmp = (s[x] + s[y]) & 255; in rc4_stream_crypt() [all …]
|
/optee_os/out/arm/export-ta_arm32/host_include/mbedtls/ |
A D | bn_mul.h | 232 : "+c" (c), "+D" (d), "+S" (s) \ 256 : "+r" (c), "+r" (d), "+r" (s) \ 514 : "=m" (c), "=m" (d), "=m" (s) \ 515 : "m" (s), "m" (d), "m" (c), "m" (b) \ 546 : "=m" (c), "=m" (d), "=m" (s) \ 547 : "m" (s), "m" (d), "m" (c), "m" (b) \ 628 : "=m" (c), "=m" (d), "=m" (s) \ 629 : "m" (s), "m" (d), "m" (c), "m" (b) \ 701 : "=m" (c), "=m" (d), "=m" (s) \ 959 s0 = ( *s << biH ) >> biH; \ [all …]
|
/optee_os/out/arm/export-ta_arm64/include/mbedtls/ |
A D | bn_mul.h | 232 : "+c" (c), "+D" (d), "+S" (s) \ 256 : "+r" (c), "+r" (d), "+r" (s) \ 514 : "=m" (c), "=m" (d), "=m" (s) \ 515 : "m" (s), "m" (d), "m" (c), "m" (b) \ 546 : "=m" (c), "=m" (d), "=m" (s) \ 547 : "m" (s), "m" (d), "m" (c), "m" (b) \ 628 : "=m" (c), "=m" (d), "=m" (s) \ 629 : "m" (s), "m" (d), "m" (c), "m" (b) \ 701 : "=m" (c), "=m" (d), "=m" (s) \ 959 s0 = ( *s << biH ) >> biH; \ [all …]
|
/optee_os/out/arm/export-ta_arm32/include/mbedtls/ |
A D | bn_mul.h | 232 : "+c" (c), "+D" (d), "+S" (s) \ 256 : "+r" (c), "+r" (d), "+r" (s) \ 514 : "=m" (c), "=m" (d), "=m" (s) \ 515 : "m" (s), "m" (d), "m" (c), "m" (b) \ 546 : "=m" (c), "=m" (d), "=m" (s) \ 547 : "m" (s), "m" (d), "m" (c), "m" (b) \ 628 : "=m" (c), "=m" (d), "=m" (s) \ 629 : "m" (s), "m" (d), "m" (c), "m" (b) \ 701 : "=m" (c), "=m" (d), "=m" (s) \ 959 s0 = ( *s << biH ) >> biH; \ [all …]
|
/optee_os/out/arm/export-ta_arm64/host_include/mbedtls/ |
A D | bn_mul.h | 232 : "+c" (c), "+D" (d), "+S" (s) \ 256 : "+r" (c), "+r" (d), "+r" (s) \ 514 : "=m" (c), "=m" (d), "=m" (s) \ 515 : "m" (s), "m" (d), "m" (c), "m" (b) \ 546 : "=m" (c), "=m" (d), "=m" (s) \ 547 : "m" (s), "m" (d), "m" (c), "m" (b) \ 628 : "=m" (c), "=m" (d), "=m" (s) \ 629 : "m" (s), "m" (d), "m" (c), "m" (b) \ 701 : "=m" (c), "=m" (d), "=m" (s) \ 959 s0 = ( *s << biH ) >> biH; \ [all …]
|
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
A D | bn_mul.h | 232 : "+c" (c), "+D" (d), "+S" (s) \ 256 : "+r" (c), "+r" (d), "+r" (s) \ 514 : "=m" (c), "=m" (d), "=m" (s) \ 515 : "m" (s), "m" (d), "m" (c), "m" (b) \ 546 : "=m" (c), "=m" (d), "=m" (s) \ 547 : "m" (s), "m" (d), "m" (c), "m" (b) \ 628 : "=m" (c), "=m" (d), "=m" (s) \ 629 : "m" (s), "m" (d), "m" (c), "m" (b) \ 701 : "=m" (c), "=m" (d), "=m" (s) \ 959 s0 = ( *s << biH ) >> biH; \ [all …]
|
/optee_os/core/arch/arm/kernel/ |
A D | secure_partition.c | 82 return s; in sp_get_session() 177 spc->open_session = s; in sp_create_ctx() 201 if (!s) in sp_create_session() 205 if (!s->endpoint_id) { in sp_create_session() 216 *sess = s; in sp_create_session() 220 free(s); in sp_create_session() 321 *sess = s; in sp_open_session() 335 s->state = sp_idle; in sp_open_session() 336 s->caller_id = 0; in sp_open_session() 436 assert(sess == s); in sp_enter_invoke_cmd() [all …]
|
/optee_os/core/lib/libtomcrypt/src/pk/ecc/ |
A D | ecc_sign_hash.c | 39 void *r, *s, *e, *p, *b; in ecc_sign_hash_ex() local 92 while (mp_cmp_d(s, 0) == LTC_MP_GT && mp_cmp(s, p) != LTC_MP_LT) { in ecc_sign_hash_ex() 95 if ((err = mp_sub(s, p, s)) != CRYPT_OK) { goto error; } in ecc_sign_hash_ex() 108 … if ((err = mp_mulmod(pubkey.k, s, p, s)) != CRYPT_OK) { goto error; } /* s = xr/kb */ in ecc_sign_hash_ex() 110 …if ((err = mp_add(e, s, s)) != CRYPT_OK) { goto error; } /* s = e/kb + xr… in ecc_sign_hash_ex() 111 …if ((err = mp_mulmod(s, b, p, s)) != CRYPT_OK) { goto error; } /* s = b(e/kb + … in ecc_sign_hash_ex() 113 if (mp_iszero(s) == LTC_MP_NO) { in ecc_sign_hash_ex() 129 LTC_ASN1_INTEGER, 1UL, s, in ecc_sign_hash_ex() 138 i = mp_unsigned_bin_size(s); in ecc_sign_hash_ex() 153 i = mp_unsigned_bin_size(s); in ecc_sign_hash_ex() [all …]
|
/optee_os/out/arm/export-ta_arm64/host_include/ |
A D | signed_hdr.h | 54 size_t s = sizeof(*shdr); in shdr_get_size() local 56 if (ADD_OVERFLOW(s, shdr->hash_size, &s) || in shdr_get_size() 57 ADD_OVERFLOW(s, shdr->sig_size, &s)) in shdr_get_size() 60 return s; in shdr_get_size() 114 size_t s = sizeof(*ehdr); in shdr_enc_get_size() local 116 if (ADD_OVERFLOW(s, ehdr->iv_size, &s) || in shdr_enc_get_size() 117 ADD_OVERFLOW(s, ehdr->tag_size, &s)) in shdr_enc_get_size() 120 return s; in shdr_enc_get_size()
|
/optee_os/core/include/ |
A D | signed_hdr.h | 54 size_t s = sizeof(*shdr); in shdr_get_size() local 56 if (ADD_OVERFLOW(s, shdr->hash_size, &s) || in shdr_get_size() 57 ADD_OVERFLOW(s, shdr->sig_size, &s)) in shdr_get_size() 60 return s; in shdr_get_size() 114 size_t s = sizeof(*ehdr); in shdr_enc_get_size() local 116 if (ADD_OVERFLOW(s, ehdr->iv_size, &s) || in shdr_enc_get_size() 117 ADD_OVERFLOW(s, ehdr->tag_size, &s)) in shdr_enc_get_size() 120 return s; in shdr_enc_get_size()
|
/optee_os/out/arm/export-ta_arm32/host_include/ |
A D | signed_hdr.h | 54 size_t s = sizeof(*shdr); in shdr_get_size() local 56 if (ADD_OVERFLOW(s, shdr->hash_size, &s) || in shdr_get_size() 57 ADD_OVERFLOW(s, shdr->sig_size, &s)) in shdr_get_size() 60 return s; in shdr_get_size() 114 size_t s = sizeof(*ehdr); in shdr_enc_get_size() local 116 if (ADD_OVERFLOW(s, ehdr->iv_size, &s) || in shdr_enc_get_size() 117 ADD_OVERFLOW(s, ehdr->tag_size, &s)) in shdr_enc_get_size() 120 return s; in shdr_enc_get_size()
|
/optee_os/core/lib/libtomcrypt/src/hashes/ |
A D | sha3.c | 164 static void keccakf(ulong64 s[25]) in keccakf() 172 bc[i] = s[i] ^ s[i + 5] ^ s[i + 10] ^ s[i + 15] ^ s[i + 20]; in keccakf() 177 s[j + i] ^= t; in keccakf() 181 t = s[1]; in keccakf() 184 bc[0] = s[j]; in keccakf() 191 bc[i] = s[j + i]; in keccakf() 211 keccakf(md->sha3.s); in _done() 293 keccakf(md->sha3.s); in sha3_process() 307 keccakf(md->sha3.s); in sha3_process() 348 keccakf(md->sha3.s); in sha3_shake_done() [all …]
|