Home
last modified time | relevance | path

Searched refs:e (Results 1 – 25 of 84) sorted by relevance

1234

/optee_os/core/lib/libtomcrypt/src/hashes/
H A Dsha1.c42 ulong32 a,b,c,d,e,W[80],i; in ss_sha1_compress() local
57 e = md->sha1.state[4]; in ss_sha1_compress()
66 … #define FF0(a,b,c,d,e,i) e = (ROLc(a, 5) + F0(b,c,d) + e + W[i] + 0x5a827999UL); b = ROLc(b, 30); in ss_sha1_compress() argument
67 … #define FF1(a,b,c,d,e,i) e = (ROLc(a, 5) + F1(b,c,d) + e + W[i] + 0x6ed9eba1UL); b = ROLc(b, 30); in ss_sha1_compress() argument
68 … #define FF2(a,b,c,d,e,i) e = (ROLc(a, 5) + F2(b,c,d) + e + W[i] + 0x8f1bbcdcUL); b = ROLc(b, 30); in ss_sha1_compress() argument
69 … #define FF3(a,b,c,d,e,i) e = (ROLc(a, 5) + F3(b,c,d) + e + W[i] + 0xca62c1d6UL); b = ROLc(b, 30); in ss_sha1_compress() argument
74 FF0(a,b,c,d,e,i++); t = e; e = d; d = c; c = b; b = a; a = t; in ss_sha1_compress()
78 FF1(a,b,c,d,e,i++); t = e; e = d; d = c; c = b; b = a; a = t; in ss_sha1_compress()
82 FF2(a,b,c,d,e,i++); t = e; e = d; d = c; c = b; b = a; a = t; in ss_sha1_compress()
86 FF3(a,b,c,d,e,i++); t = e; e = d; d = c; c = b; b = a; a = t; in ss_sha1_compress()
[all …]
H A Drmd160.c44 #define FF(a, b, c, d, e, x, s) \ argument
46 (a) = ROLc((a), (s)) + (e);\
49 #define GG(a, b, c, d, e, x, s) \ argument
51 (a) = ROLc((a), (s)) + (e);\
54 #define HH(a, b, c, d, e, x, s) \ argument
56 (a) = ROLc((a), (s)) + (e);\
59 #define II(a, b, c, d, e, x, s) \ argument
61 (a) = ROLc((a), (s)) + (e);\
64 #define JJ(a, b, c, d, e, x, s) \ argument
66 (a) = ROLc((a), (s)) + (e);\
[all …]
H A Drmd320.c39 #define FF(a, b, c, d, e, x, s) \ argument
41 (a) = ROLc((a), (s)) + (e);\
44 #define GG(a, b, c, d, e, x, s) \ argument
46 (a) = ROLc((a), (s)) + (e);\
49 #define HH(a, b, c, d, e, x, s) \ argument
51 (a) = ROLc((a), (s)) + (e);\
54 #define II(a, b, c, d, e, x, s) \ argument
56 (a) = ROLc((a), (s)) + (e);\
59 #define JJ(a, b, c, d, e, x, s) \ argument
61 (a) = ROLc((a), (s)) + (e);\
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/rsa/
H A Drsa_make_key.c12 static int s_rsa_make_key(prng_state *prng, int wprng, int size, void *e, rsa_key *key) in s_rsa_make_key() argument
35 …if ((err = mp_gcd( tmp1, e, tmp2)) != CRYPT_OK) { goto cleanup; } /* tmp2 = gcd(p-1… in s_rsa_make_key()
42 …if ((err = mp_gcd( tmp1, e, tmp2)) != CRYPT_OK) { goto cleanup; } /* tmp2 = gcd(q-1, e)… in s_rsa_make_key()
55 …if ((err = mp_copy( e, key->e)) != CRYPT_OK) { goto errkey; } /* key->e = … in s_rsa_make_key()
56 …if ((err = mp_invmod( key->e, tmp1, key->d)) != CRYPT_OK) { goto errkey; } /* key->d = 1… in s_rsa_make_key()
92 int rsa_make_key(prng_state *prng, int wprng, int size, long e, rsa_key *key) in rsa_make_key() argument
97 if ((e < 3) || ((e & 1) == 0)) { in rsa_make_key()
105 if ((err = mp_set_int(tmp_e, e)) == CRYPT_OK) in rsa_make_key()
124 const unsigned char *e, unsigned long elen, rsa_key *key) in rsa_make_key_ubin_e() argument
133 if ((err = mp_read_unsigned_bin(tmp_e, (unsigned char *)e, elen)) == CRYPT_OK) in rsa_make_key_ubin_e()
[all …]
H A Drsa_set.c21 const unsigned char *e, unsigned long elen, in rsa_set_key() argument
29 LTC_ARGCHK(e != NULL); in rsa_set_key()
35 …if ((err = mp_read_unsigned_bin(key->e , (unsigned char *)e , elen)) != CRYPT_OK) { goto LBL_ER… in rsa_set_key()
H A Drsa_key.c79 …s_mpi_shrink_multi(&key->e, &key->d, &key->N, &key->dQ, &key->dP, &key->qP, &key->p, &key->q, NULL… in rsa_shrink_key()
90 …return mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, &key->dP, &key->qP, &key->p, &key->q, LT… in rsa_init()
100 …mp_cleanup_multi(&key->q, &key->p, &key->qP, &key->dP, &key->dQ, &key->N, &key->d, &key->e, LTC_NU… in rsa_free()
H A Drsa_import.c38 LTC_ASN1_INTEGER, 1UL, key->e, in rsa_import_pkcs1()
53 LTC_ASN1_INTEGER, 1UL, key->e, in rsa_import_pkcs1()
118 LTC_ASN1_INTEGER, 1UL, key->e, in rsa_import()
/optee_os/core/tee/
H A Dtee_svc_storage.c46 struct tee_storage_enum *e; in tee_svc_storage_get_enum() local
48 TAILQ_FOREACH(e, &utc->storage_enums, link) { in tee_svc_storage_get_enum()
49 if (enum_id == (vaddr_t)e) { in tee_svc_storage_get_enum()
50 *e_out = e; in tee_svc_storage_get_enum()
58 struct tee_storage_enum *e) in tee_svc_close_enum() argument
60 if (e == NULL || utc == NULL) in tee_svc_close_enum()
63 TAILQ_REMOVE(&utc->storage_enums, e, link); in tee_svc_close_enum()
65 if (e->fops) in tee_svc_close_enum()
66 e->fops->closedir(e->dir); in tee_svc_close_enum()
68 e->dir = NULL; in tee_svc_close_enum()
[all …]
/optee_os/core/lib/libtomcrypt/src/ciphers/safer/
H A Dsafer.c251 { 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()
269 e = EXP(e) + *++key; f = LOG(f) ^ *++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()
274 t = b; b = e; e = c; c = t; t = d; d = f; f = g; g = t; in s_safer_ecb_encrypt()
277 e ^= *++key; f += *++key; g += *++key; h ^= *++key; in s_safer_ecb_encrypt()
280 ct[4] = e & 0xFF; ct[5] = f & 0xFF; in s_safer_ecb_encrypt()
[all …]
/optee_os/core/lib/libtomcrypt/src/ciphers/
H A Dserpent.c30 #define s_lt(i,a,b,c,d,e) { \ argument
40 #define s_ilt(i,a,b,c,d,e) { \ argument
53 #define s_beforeS0(f) f(0,a,b,c,d,e)
54 #define s_afterS0(f) f(1,b,e,c,a,d)
55 #define s_afterS1(f) f(2,c,b,a,e,d)
56 #define s_afterS2(f) f(3,a,e,b,d,c)
57 #define s_afterS3(f) f(4,e,b,d,c,a)
58 #define s_afterS4(f) f(5,b,a,e,c,d)
59 #define s_afterS5(f) f(6,a,c,b,e,d)
60 #define s_afterS6(f) f(7,a,c,d,b,e)
[all …]
/optee_os/lib/libutils/ext/
H A Darray.c15 void *e = b + pos * elem_size; in ins_array_elem() local
19 memmove(b + (pos + 1) * elem_size, e, in ins_array_elem()
23 memcpy(e, elem, elem_size); in ins_array_elem()
25 return e; in ins_array_elem()
/optee_os/core/pta/
H A Dhwrng.c25 uint8_t *e = NULL; in rng_get_entropy() local
35 e = (uint8_t *)params[0].memref.buffer; in rng_get_entropy()
36 if (!e) in rng_get_entropy()
39 return crypto_rng_read(e, params[0].memref.size); in rng_get_entropy()
/optee_os/core/lib/libtomcrypt/src/pk/ecc/
H A Decc_sign_hash.c32 void *r, *s, *e, *p, *b; in ecc_sign_hash_ex() local
49 if ((err = mp_init_multi(&r, &s, &e, &b, LTC_NULL)) != CRYPT_OK) { in ecc_sign_hash_ex()
58 … if ((err = mp_read_unsigned_bin(e, (unsigned char *)in, inlen)) != CRYPT_OK) { goto errnokey; } in ecc_sign_hash_ex()
61 … if ((err = mp_read_unsigned_bin(e, (unsigned char *)in, pbytes)) != CRYPT_OK) { goto errnokey; } in ecc_sign_hash_ex()
70 … if ((err = mp_read_unsigned_bin(e, (unsigned char *)buf, pbytes)) != CRYPT_OK) { goto errnokey; } in ecc_sign_hash_ex()
102 … if ((err = mp_mulmod(pubkey.k, e, p, e)) != CRYPT_OK) { goto error; } /* e = e/kb */ in ecc_sign_hash_ex()
103 …if ((err = mp_add(e, s, s)) != CRYPT_OK) { goto error; } /* s = e/kb + xr… in ecc_sign_hash_ex()
177 mp_clear_multi(r, s, e, b, LTC_NULL); in ecc_sign_hash_ex()
H A Decc_verify_hash.c29 void *r, *s, *v, *w, *u1, *u2, *e, *p, *m, *a, *a_plus3; in ecc_verify_hash_ex() local
45 if ((err = mp_init_multi(&r, &s, &v, &w, &u1, &u2, &e, &a_plus3, LTC_NULL)) != CRYPT_OK) { in ecc_verify_hash_ex()
133 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, hashlen)) != CRYPT_OK) … in ecc_verify_hash_ex()
136 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, pbytes)) != CRYPT_OK) … in ecc_verify_hash_ex()
145 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)buf, pbytes)) != CRYPT_OK) … in ecc_verify_hash_ex()
152 …if ((err = mp_mulmod(e, w, p, u1)) != CRYPT_OK) … in ecc_verify_hash_ex()
201 mp_clear_multi(r, s, v, w, u1, u2, e, a_plus3, LTC_NULL); in ecc_verify_hash_ex()
H A Decc_recover_key.c32 void *r, *s, *v, *w, *t1, *t2, *u1, *u2, *v1, *v2, *e, *x, *y, *a_plus3; in ecc_recover_key() local
49 …if ((err = mp_init_multi(&r, &s, &v, &w, &t1, &t2, &u1, &u2, &v1, &v2, &e, &x, &y, &a_plus3, LTC_N… in ecc_recover_key()
153 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, hashlen)) != CRYPT_OK) … in ecc_recover_key()
156 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, pbytes)) != CRYPT_OK) … in ecc_recover_key()
165 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)buf, pbytes)) != CRYPT_OK) … in ecc_recover_key()
199 …if ((err = mp_mulmod(e, w, p, v2)) != CRYPT_OK) … in ecc_recover_key()
205 …if ((err = mp_mulmod(e, w, p, u1)) != CRYPT_OK) … in ecc_recover_key()
255 mp_clear_multi(a_plus3, y, x, e, v2, v1, u2, u1, t2, t1, w, v, s, r, LTC_NULL); in ecc_recover_key()
/optee_os/core/kernel/
H A Dasan.c70 vaddr_t e = (vaddr_t)end; in va_range_inside_shadow() local
72 if (b >= e) in va_range_inside_shadow()
74 return (b >= asan_va_base) && (e <= (asan_va_base + asan_va_size)); in va_range_inside_shadow()
80 vaddr_t e = (vaddr_t)end; in va_range_outside_shadow() local
82 if (b >= e) in va_range_outside_shadow()
84 return (e <= asan_va_base) || (b >= (asan_va_base + asan_va_size)); in va_range_outside_shadow()
100 vaddr_t e = (vaddr_t)end; in asan_set_shadowed() local
105 assert(b < e); in asan_set_shadowed()
108 asan_va_size = e - b; in asan_set_shadowed()
194 vaddr_t b = 0, e = 0, saddr = 0; in asan_report() local
[all …]
H A Dlockdep.c150 struct lockdep_edge *e = NULL; in lockdep_graph_get_shortest_cycle() local
156 STAILQ_FOREACH(e, &n->edges, link) { in lockdep_graph_get_shortest_cycle()
157 if (e->to->lock_id == node->lock_id) { in lockdep_graph_get_shortest_cycle()
179 if (!(e->to->flags & LOCKDEP_NODE_BFS_VISITED)) { in lockdep_graph_get_shortest_cycle()
183 e->to->flags |= LOCKDEP_NODE_BFS_VISITED; in lockdep_graph_get_shortest_cycle()
189 nqe->node = e->to; in lockdep_graph_get_shortest_cycle()
196 nqe->path[nlen - 1] = e->to->lock_id; in lockdep_graph_get_shortest_cycle()
213 struct lockdep_edge *e = NULL; in lockdep_visit() local
223 STAILQ_FOREACH(e, &node->edges, link) { in lockdep_visit()
224 TEE_Result res = lockdep_visit(e->to); in lockdep_visit()
/optee_os/core/lib/libtomcrypt/
H A Drsa.c104 if (!bn_alloc_max(&s->e)) in sw_crypto_acipher_alloc_rsa_keypair()
136 if (!bn_alloc_max(&s->e)) in sw_crypto_acipher_alloc_rsa_public_key()
142 crypto_bignum_free(&s->e); in sw_crypto_acipher_alloc_rsa_public_key()
155 crypto_bignum_free(&s->e); in sw_crypto_acipher_free_rsa_public_key()
166 crypto_bignum_free(&s->e); in sw_crypto_acipher_free_rsa_keypair()
189 key_size / 8, key->e, &ltc_tmp_key); in sw_crypto_acipher_gen_rsa_key()
288 ltc_key.e = key->e; in sw_crypto_acipher_rsanopad_encrypt()
310 ltc_key.e = key->e; in sw_crypto_acipher_rsanopad_decrypt()
352 ltc_key.e = key->e; in sw_crypto_acipher_rsaes_decrypt()
468 .e = key->e, in sw_crypto_acipher_rsaes_encrypt()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/dsa/
H A Ddsa_generate_pqg.c28 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()
175 if ((err = mp_sub_d(p, 1, e)) != CRYPT_OK) { goto cleanup; } in s_dsa_make_params()
176 if ((err = mp_div(e, q, e, c)) != 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/lib/libmbedtls/core/
H A Drsa.c105 rsa->E = *(mbedtls_mpi *)key->e; in rsa_complete_from_key_pair()
200 s->e = crypto_bignum_allocate(key_size_bits); in sw_crypto_acipher_alloc_rsa_keypair()
201 if (!s->e) in sw_crypto_acipher_alloc_rsa_keypair()
239 s->e = crypto_bignum_allocate(key_size_bits); in sw_crypto_acipher_alloc_rsa_public_key()
240 if (!s->e) in sw_crypto_acipher_alloc_rsa_public_key()
247 crypto_bignum_free(&s->e); in sw_crypto_acipher_alloc_rsa_public_key()
259 crypto_bignum_free(&s->e); in sw_crypto_acipher_free_rsa_public_key()
269 crypto_bignum_free(&s->e); in sw_crypto_acipher_free_rsa_keypair()
290 uint32_t e = 0; in sw_crypto_acipher_gen_rsa_key() local
300 mbedtls_mpi_write_binary((mbedtls_mpi *)key->e, in sw_crypto_acipher_gen_rsa_key()
[all …]
/optee_os/core/mm/
H A Dtee_mm.c212 static inline bool fit_in_gap(tee_mm_pool_t *pool, tee_mm_entry_t *e, in fit_in_gap() argument
216 if (offshi > e->offset || in fit_in_gap()
217 (e->next != NULL && in fit_in_gap()
218 (offslo < e->next->offset + e->next->size)) || in fit_in_gap()
223 if (offslo < (e->offset + e->size) || in fit_in_gap()
224 (e->next != NULL && (offshi > e->next->offset)) || in fit_in_gap()
/optee_os/lib/libmbedtls/mbedtls/library/
H A Decdsa.c254 mbedtls_mpi k, e, t; in mbedtls_ecdsa_sign_restartable() local
268 mbedtls_mpi_init(&k); mbedtls_mpi_init(&e); mbedtls_mpi_init(&t); in mbedtls_ecdsa_sign_restartable()
340 MBEDTLS_MPI_CHK(derive_mpi(grp, &e, buf, blen)); in mbedtls_ecdsa_sign_restartable()
353 MBEDTLS_MPI_CHK(mbedtls_mpi_add_mpi(&e, &e, s)); in mbedtls_ecdsa_sign_restartable()
354 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&e, &e, &t)); in mbedtls_ecdsa_sign_restartable()
358 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(s, s, &e)); in mbedtls_ecdsa_sign_restartable()
370 mbedtls_mpi_free(&k); mbedtls_mpi_free(&e); mbedtls_mpi_free(&t); in mbedtls_ecdsa_sign_restartable()
496 mbedtls_mpi e, s_inv, u1, u2; in mbedtls_ecdsa_verify_restartable() local
501 mbedtls_mpi_init(&e); mbedtls_mpi_init(&s_inv); in mbedtls_ecdsa_verify_restartable()
536 MBEDTLS_MPI_CHK(derive_mpi(grp, &e, buf, blen)); in mbedtls_ecdsa_verify_restartable()
[all …]
/optee_os/scripts/
H A Dderive_rpmb_key.py13 except ValueError as e:
19 raise e
21 raise e
/optee_os/core/arch/arm/plat-synquacer/
H A Drng_pta.c259 uint8_t *e = NULL; in rng_get_entropy() local
278 e = (uint8_t *)params[0].memref.buffer; in rng_get_entropy()
279 if (!e) in rng_get_entropy()
300 pool_get_entropy(e, pool_size); in rng_get_entropy()
303 pool_get_entropy(e, rq_size); in rng_get_entropy()
/optee_os/core/drivers/crypto/se050/core/
H A Drsa.c158 set_binary_data(key->e, &key_bin.e, &key_bin.e_len); in se050_inject_public_key()
163 free(key_bin.e); in se050_inject_public_key()
205 set_binary_data(key->e, &key_bin.e, &key_bin.e_len); in se050_inject_keypair()
216 free(key_bin.e); in se050_inject_keypair()
521 if (!bn_alloc_max(&s->e)) in do_alloc_keypair()
540 crypto_bignum_free(&s->e); in do_alloc_keypair()
556 if (!bn_alloc_max(&s->e)) in do_alloc_publickey()
559 crypto_bignum_free(&s->e); in do_alloc_publickey()
570 crypto_bignum_free(&s->e); in do_free_publickey()
590 crypto_bignum_free(&s->e); in do_free_keypair()
[all …]

1234