Home
last modified time | relevance | path

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

1234

/optee_os/core/lib/libtomcrypt/src/hashes/
A Dsha1.c64 e = md->sha1.state[4]; in _sha1_compress()
73 … #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 _sha1_compress() argument
74 … #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 _sha1_compress() argument
75 … #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 _sha1_compress() argument
76 … #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 _sha1_compress() argument
81 FF0(a,b,c,d,e,i++); t = e; e = d; d = c; c = b; b = a; a = t; in _sha1_compress()
85 FF1(a,b,c,d,e,i++); t = e; e = d; d = c; c = b; b = a; a = t; in _sha1_compress()
89 FF2(a,b,c,d,e,i++); t = e; e = d; d = c; c = b; b = a; a = t; in _sha1_compress()
93 FF3(a,b,c,d,e,i++); t = e; e = d; d = c; c = b; b = a; a = t; in _sha1_compress()
99 FF0(a,b,c,d,e,i++); in _sha1_compress()
[all …]
A Drmd160.c51 #define FF(a, b, c, d, e, x, s) \ argument
53 (a) = ROLc((a), (s)) + (e);\
58 (a) = ROLc((a), (s)) + (e);\
63 (a) = ROLc((a), (s)) + (e);\
68 (a) = ROLc((a), (s)) + (e);\
73 (a) = ROLc((a), (s)) + (e);\
78 (a) = ROLc((a), (s)) + (e);\
83 (a) = ROLc((a), (s)) + (e);\
88 (a) = ROLc((a), (s)) + (e);\
93 (a) = ROLc((a), (s)) + (e);\
[all …]
A Drmd320.c46 #define FF(a, b, c, d, e, x, s) \ argument
48 (a) = ROLc((a), (s)) + (e);\
53 (a) = ROLc((a), (s)) + (e);\
58 (a) = ROLc((a), (s)) + (e);\
63 (a) = ROLc((a), (s)) + (e);\
68 (a) = ROLc((a), (s)) + (e);\
73 (a) = ROLc((a), (s)) + (e);\
78 (a) = ROLc((a), (s)) + (e);\
83 (a) = ROLc((a), (s)) + (e);\
88 (a) = ROLc((a), (s)) + (e);\
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/rsa/
A Drsa_make_key.c19 static int s_rsa_make_key(prng_state *prng, int wprng, int size, void *e, rsa_key *key) in s_rsa_make_key() argument
62 …if ((err = mp_copy( e, key->e)) != CRYPT_OK) { goto errkey; } /* key->e = … in s_rsa_make_key()
99 int rsa_make_key(prng_state *prng, int wprng, int size, long e, rsa_key *key) in rsa_make_key() argument
104 if ((e < 3) || ((e & 1) == 0)) { in rsa_make_key()
112 if ((err = mp_set_int(tmp_e, e)) == CRYPT_OK) in rsa_make_key()
131 const unsigned char *e, unsigned long elen, rsa_key *key) in rsa_make_key_ubin_e() argument
140 if ((err = mp_read_unsigned_bin(tmp_e, (unsigned char *)e, elen)) == CRYPT_OK) in rsa_make_key_ubin_e()
157 int rsa_make_key_bn_e(prng_state *prng, int wprng, int size, void *e, rsa_key *key) in rsa_make_key_bn_e() argument
162 e_bits = mp_count_bits(e); in rsa_make_key_bn_e()
163 if ((e_bits > 1 && e_bits < 256) && (mp_get_digit(e, 0) & 1)) { in rsa_make_key_bn_e()
[all …]
A Drsa_set.c28 const unsigned char *e, unsigned long elen, in rsa_set_key() argument
36 LTC_ARGCHK(e != NULL); in rsa_set_key()
39 …err = mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, &key->dP, &key->qP, &key->p, &key->q, NUL… in rsa_set_key()
43 …if ((err = mp_read_unsigned_bin(key->e , (unsigned char *)e , elen)) != CRYPT_OK) { goto LBL_ER… in rsa_set_key()
A Drsa_import.c38 if ((err = mp_init_multi(&key->e, &key->d, &key->N, &key->dQ, in rsa_import()
61 LTC_ASN1_INTEGER, 1UL, key->e, in rsa_import()
86 LTC_ASN1_INTEGER, 1UL, key->e, in rsa_import()
107 LTC_ASN1_INTEGER, 1UL, key->e, in rsa_import()
117 mp_clear_multi(key->d, key->e, key->N, key->dQ, key->dP, key->qP, key->p, key->q, NULL); in rsa_import()
/optee_os/core/tee/
A Dtee_svc_storage.c50 *e_out = e; in tee_svc_storage_get_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()
69 e->fops = NULL; in tee_svc_close_enum()
71 free(e); in tee_svc_close_enum()
530 if (e == NULL) in syscall_storage_alloc_enum()
567 e->fops->closedir(e->dir); in syscall_storage_reset_enum()
590 if (e->dir) { in syscall_storage_start_enum()
591 e->fops->closedir(e->dir); in syscall_storage_start_enum()
[all …]
/optee_os/core/lib/libtomcrypt/src/ciphers/safer/
A Dsafer.c258 { unsigned char a, b, c, d, e, f, g, h, t; in _safer_ecb_encrypt() local
268 e = pt[4]; f = pt[5]; g = pt[6]; h = pt[7]; in _safer_ecb_encrypt()
276 e = EXP(e) + *++key; f = LOG(f) ^ *++key; in _safer_ecb_encrypt()
278 PHT(a, b); PHT(c, d); PHT(e, f); PHT(g, h); in _safer_ecb_encrypt()
281 t = b; b = e; e = c; c = t; t = d; d = f; f = g; g = t; in _safer_ecb_encrypt()
287 ct[4] = e & 0xFF; ct[5] = f & 0xFF; in _safer_ecb_encrypt()
312 { unsigned char a, b, c, d, e, f, g, h, t; in _safer_ecb_decrypt() local
322 e = ct[4]; f = ct[5]; g = ct[6]; h = ct[7]; in _safer_ecb_decrypt()
329 t = e; e = b; b = c; c = t; t = f; f = d; d = g; g = t; in _safer_ecb_decrypt()
336 f = EXP(f) - *--key; e = LOG(e) ^ *--key; in _safer_ecb_decrypt()
[all …]
/optee_os/core/lib/libtomcrypt/src/ciphers/
A Dserpent.c60 #define _beforeS0(f) f(0,a,b,c,d,e)
458 ulong32 a, b, c, d, e; in _setup_key() local
494 ulong32 a, b, c, d, e; in _enc_block() local
516 b = e; in _enc_block()
517 e = d; in _enc_block()
519 a = e; in _enc_block()
527 STORE32L(e, out + 4); in _enc_block()
536 ulong32 a, b, c, d, e; in _dec_block() local
543 e = 0; LTC_UNUSED_PARAM(e); /* avoid scan-build warning */ in _dec_block()
553 d = e; in _dec_block()
[all …]
/optee_os/core/kernel/
A Dasan.c60 vaddr_t e = (vaddr_t)end; in va_range_inside_shadow() local
62 if (b >= e) in va_range_inside_shadow()
70 vaddr_t e = (vaddr_t)end; in va_range_outside_shadow() local
72 if (b >= e) in va_range_outside_shadow()
90 vaddr_t e = (vaddr_t)end; in asan_set_shadowed() local
95 assert(b < e); in asan_set_shadowed()
98 asan_va_size = e - b; in asan_set_shadowed()
173 int8_t *e; in check_access() local
186 e = va_to_shadow((void *)(addr + size - 1)); in check_access()
187 for (a = va_to_shadow(begin); a <= e; a++) in check_access()
[all …]
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/
A Drsa.c89 if (!bn_alloc_max(&s->e)) in crypto_acipher_alloc_rsa_keypair()
116 if (!bn_alloc_max(&s->e)) in crypto_acipher_alloc_rsa_public_key()
122 crypto_bignum_free(s->e); in crypto_acipher_alloc_rsa_public_key()
131 crypto_bignum_free(s->e); in crypto_acipher_free_rsa_public_key()
138 crypto_bignum_free(s->e); in crypto_acipher_free_rsa_keypair()
249 ltc_key.e = key->e; in crypto_acipher_rsanopad_encrypt()
264 ltc_key.e = key->e; in crypto_acipher_rsanopad_decrypt()
292 ltc_key.e = key->e; in crypto_acipher_rsaes_decrypt()
386 .e = key->e, in crypto_acipher_rsaes_encrypt()
444 ltc_key.e = key->e; in crypto_acipher_rsassa_sign()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/ecc/
A Decc_sign_hash.c39 void *r, *s, *e, *p, *b; in ecc_sign_hash_ex() local
56 if ((err = mp_init_multi(&r, &s, &e, &b, NULL)) != CRYPT_OK) { in ecc_sign_hash_ex()
65 … if ((err = mp_read_unsigned_bin(e, (unsigned char *)in, inlen)) != CRYPT_OK) { goto errnokey; } in ecc_sign_hash_ex()
68 … if ((err = mp_read_unsigned_bin(e, (unsigned char *)in, pbytes)) != CRYPT_OK) { goto errnokey; } in ecc_sign_hash_ex()
77 … if ((err = mp_read_unsigned_bin(e, (unsigned char *)buf, pbytes)) != CRYPT_OK) { goto errnokey; } in ecc_sign_hash_ex()
109 … if ((err = mp_mulmod(pubkey.k, e, p, e)) != CRYPT_OK) { goto error; } /* e = e/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()
184 mp_clear_multi(r, s, e, b, NULL); in ecc_sign_hash_ex()
A Decc_verify_hash.c36 void *r, *s, *v, *w, *u1, *u2, *e, *p, *m, *a, *a_plus3; in ecc_verify_hash_ex() local
52 if ((err = mp_init_multi(&r, &s, &v, &w, &u1, &u2, &e, &a_plus3, NULL)) != CRYPT_OK) { in ecc_verify_hash_ex()
139 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, hashlen)) != CRYPT_OK) … in ecc_verify_hash_ex()
142 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, pbytes)) != CRYPT_OK) … in ecc_verify_hash_ex()
151 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)buf, pbytes)) != CRYPT_OK) … in ecc_verify_hash_ex()
158 …if ((err = mp_mulmod(e, w, p, u1)) != CRYPT_OK) … in ecc_verify_hash_ex()
207 mp_clear_multi(r, s, v, w, u1, u2, e, a_plus3, NULL); in ecc_verify_hash_ex()
A Decc_recover_key.c39 void *r, *s, *v, *w, *t1, *t2, *u1, *u2, *v1, *v2, *e, *x, *y, *a_plus3; in ecc_recover_key() local
56 …if ((err = mp_init_multi(&r, &s, &v, &w, &t1, &t2, &u1, &u2, &v1, &v2, &e, &x, &y, &a_plus3, NULL)… in ecc_recover_key()
159 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, hashlen)) != CRYPT_OK) … in ecc_recover_key()
162 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)hash, pbytes)) != CRYPT_OK) … in ecc_recover_key()
171 …if ((err = mp_read_unsigned_bin(e, (unsigned char *)buf, pbytes)) != CRYPT_OK) … in ecc_recover_key()
205 …if ((err = mp_mulmod(e, w, p, v2)) != CRYPT_OK) … in ecc_recover_key()
211 …if ((err = mp_mulmod(e, w, p, u1)) != CRYPT_OK) … in ecc_recover_key()
261 mp_clear_multi(a_plus3, y, x, e, v2, v1, u2, u1, t2, t1, w, v, s, r, NULL); in ecc_recover_key()
/optee_os/lib/libmbedtls/core/
A Drsa.c100 rsa->E = *(mbedtls_mpi *)key->e; in rsa_init_from_key_pair()
134 if (!s->e) in crypto_acipher_alloc_rsa_keypair()
169 if (!s->e) in crypto_acipher_alloc_rsa_public_key()
176 crypto_bignum_free(s->e); in crypto_acipher_alloc_rsa_public_key()
185 crypto_bignum_free(s->e); in crypto_acipher_free_rsa_public_key()
192 crypto_bignum_free(s->e); in crypto_acipher_free_rsa_keypair()
207 uint32_t e = 0; in crypto_acipher_gen_rsa_key() local
216 e = TEE_U32_FROM_BIG_ENDIAN(e); in crypto_acipher_gen_rsa_key()
256 rsa.E = *(mbedtls_mpi *)key->e; in crypto_acipher_rsanopad_encrypt()
456 rsa.E = *(mbedtls_mpi *)key->e; in crypto_acipher_rsaes_encrypt()
[all …]
A Dsm2-dsa.c34 mbedtls_mpi e = { }; in sm2_mbedtls_dsa_sign() local
45 mbedtls_mpi_init(&e); in sm2_mbedtls_dsa_sign()
82 mbedtls_mpi_read_binary(&e, (unsigned char *)msg, msg_len); in sm2_mbedtls_dsa_sign()
83 mres = mbedtls_mpi_add_mpi(&r, &e, &x1y1p.X); in sm2_mbedtls_dsa_sign()
138 mbedtls_mpi_free(&e); in sm2_mbedtls_dsa_sign()
/optee_os/core/pta/
A Dhwrng.c19 uint8_t *e = NULL; in rng_get_entropy() local
30 e = (uint8_t *)params[0].memref.buffer; in rng_get_entropy()
31 if (!e) in rng_get_entropy()
35 e[i] = hw_get_random_byte(); in rng_get_entropy()
/optee_os/core/crypto/
A Dsigned_hdr.c51 uint32_t e = TEE_U32_TO_BIG_ENDIAN(ta_pub_key_exponent); in shdr_verify_signature() local
71 res = crypto_bignum_bin2bn((uint8_t *)&e, sizeof(e), key.e); in shdr_verify_signature()
/optee_os/core/drivers/crypto/se050/core/
A Drsa.c113 set_binary_data(key->e, &key_bin.e, &key_bin.e_len); in se050_inject_public_key()
118 free(key_bin.e); in se050_inject_public_key()
160 set_binary_data(key->e, &key_bin.e, &key_bin.e_len); in se050_inject_keypair()
171 free(key_bin.e); in se050_inject_keypair()
476 if (!bn_alloc_max(&s->e)) in do_alloc_keypair()
495 crypto_bignum_free(s->e); in do_alloc_keypair()
511 if (!bn_alloc_max(&s->e)) in do_alloc_publickey()
545 crypto_bignum_free(s->e); in do_free_keypair()
563 uint8_t *e = NULL; in do_gen_keypair() local
598 crypto_bignum_bin2bn(e, e_len, key->e); in do_gen_keypair()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/dsa/
A Ddsa_generate_pqg.c35 void *t2L1, *t2N1, *t2q, *t2seedlen, *U, *W, *X, *c, *h, *e, *seedinc; in _dsa_make_params() local
118 err = mp_init_multi(&t2L1, &t2N1, &t2q, &t2seedlen, &U, &W, &X, &c, &h, &e, &seedinc, NULL); in _dsa_make_params()
182 if ((err = mp_sub_d(p, 1, e)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params()
183 if ((err = mp_div(e, q, e, c)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params()
192 if ((err = mp_exptmod(h, e, p, g)) != CRYPT_OK) { goto cleanup; } in _dsa_make_params()
197 mp_clear_multi(t2L1, t2N1, t2q, t2seedlen, U, W, X, c, h, e, seedinc, NULL); in _dsa_make_params()
/optee_os/core/arch/arm/mm/
A Dtee_mm.c227 static inline bool fit_in_gap(tee_mm_pool_t *pool, tee_mm_entry_t *e, in fit_in_gap() argument
231 if (offshi > e->offset || in fit_in_gap()
232 (e->next != NULL && in fit_in_gap()
233 (offslo < e->next->offset + e->next->size)) || in fit_in_gap()
238 if (offslo < (e->offset + e->size) || in fit_in_gap()
239 (e->next != NULL && (offshi > e->next->offset)) || in fit_in_gap()
/optee_os/core/drivers/crypto/caam/acipher/
A Dcaam_rsa.c89 crypto_bignum_free(key->e); in do_free_keypair()
106 caam_free_buf(&key->e); in do_keypair_free()
141 crypto_bignum_bn2bin(inkey->e, outkey->e.data); in do_keypub_conv()
142 cache_operation(TEE_CACHECLEAN, outkey->e.data, outkey->e.length); in do_keypub_conv()
361 if (!key->e) in do_allocate_keypair()
425 if (!key->e) in do_allocate_publickey()
438 crypto_bignum_free(key->e); in do_allocate_publickey()
556 retstatus = caam_calloc_buf(&genkey.e, crypto_bignum_num_bytes(key->e)); in do_gen_keypair()
601 crypto_bignum_bn2bin(key->e, genkey.e.data); in do_gen_keypair()
605 prime.e = &genkey.e; in do_gen_keypair()
[all …]
/optee_os/core/arch/arm/plat-synquacer/
A Drng_pta.c256 uint8_t *e = NULL; in rng_get_entropy() local
274 e = (uint8_t *)params[0].memref.buffer; in rng_get_entropy()
275 if (!e) in rng_get_entropy()
297 pool_get_entropy(e, pool_size); in rng_get_entropy()
300 pool_get_entropy(e, rq_size); in rng_get_entropy()
/optee_os/lib/libmbedtls/mbedtls/library/
A Decdsa.c263 mbedtls_mpi k, e, t; in ecdsa_sign_restartable() local
275 mbedtls_mpi_init( &k ); mbedtls_mpi_init( &e ); mbedtls_mpi_init( &t ); in ecdsa_sign_restartable()
349 MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); in ecdsa_sign_restartable()
362 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &e, &e, s ) ); in ecdsa_sign_restartable()
363 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &e, &e, &t ) ); in ecdsa_sign_restartable()
367 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( s, s, &e ) ); in ecdsa_sign_restartable()
605 mbedtls_mpi e, s_inv, u1, u2; in ecdsa_verify_restartable() local
610 mbedtls_mpi_init( &e ); mbedtls_mpi_init( &s_inv ); in ecdsa_verify_restartable()
645 MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); in ecdsa_verify_restartable()
654 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( pu1, &e, &s_inv ) ); in ecdsa_verify_restartable()
[all …]

Completed in 70 milliseconds

1234