/optee_os-3.20.0/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() 18 d[6] = s->timeHiAndVersion >> 8; in tee_uuid_to_octets() 19 d[7] = s->timeHiAndVersion; in tee_uuid_to_octets() 27 d->timeMid = SHIFT_U32(s[4], 8) | s[5]; in tee_uuid_from_octets() 28 d->timeHiAndVersion = SHIFT_U32(s[6], 8) | s[7]; in tee_uuid_from_octets() [all …]
|
A D | tee_ree_fs.c | 929 struct tee_fs_dir *d = calloc(1, sizeof(*d)); in ree_fs_opendir_rpc() local 931 if (!d) in ree_fs_opendir_rpc() 944 d->d.oidlen = sizeof(d->d.oid); in ree_fs_opendir_rpc() 945 res = tee_fs_dirfile_get_next(d->dirh, d->uuid, &d->idx, d->d.oid, in ree_fs_opendir_rpc() 946 &d->d.oidlen); in ree_fs_opendir_rpc() 953 if (d) in ree_fs_opendir_rpc() 964 if (d) { in ree_fs_closedir_rpc() 981 d->d.oidlen = sizeof(d->d.oid); in ree_fs_readdir_rpc() 982 res = tee_fs_dirfile_get_next(d->dirh, d->uuid, &d->idx, d->d.oid, in ree_fs_readdir_rpc() 983 &d->d.oidlen); in ree_fs_readdir_rpc() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/hashes/ |
A D | md5.c | 38 #define FF(a,b,c,d,M,s,t) \ argument 41 #define GG(a,b,c,d,M,s,t) \ argument 44 #define HH(a,b,c,d,M,s,t) \ argument 47 #define II(a,b,c,d,M,s,t) \ argument 77 #define FF(a,b,c,d,M,s,t) \ argument 80 #define GG(a,b,c,d,M,s,t) \ argument 112 d = md->md5.state[3]; in ss_md5_compress() 117 t = d; d = c; c = b; b = a; a = t; in ss_md5_compress() 122 t = d; d = c; c = b; b = a; a = t; in ss_md5_compress() 127 t = d; d = c; c = b; b = a; a = t; in ss_md5_compress() [all …]
|
A D | md4.c | 54 #define FF(a, b, c, d, x, s) { \ argument 55 (a) += F ((b), (c), (d)) + (x); \ 58 #define GG(a, b, c, d, x, s) { \ argument 62 #define HH(a, b, c, d, x, s) { \ argument 73 ulong32 x[16], a, b, c, d; in ss_md4_compress() local 80 d = md->md4.state[3]; in ss_md4_compress() 88 FF (a, b, c, d, x[ 0], S11); /* 1 */ in ss_md4_compress() 89 FF (d, a, b, c, x[ 1], S12); /* 2 */ in ss_md4_compress() 90 FF (c, d, a, b, x[ 2], S13); /* 3 */ in ss_md4_compress() 91 FF (b, c, d, a, x[ 3], S14); /* 4 */ in ss_md4_compress() [all …]
|
A D | sha1.c | 56 d = md->sha1.state[3]; in ss_sha1_compress() 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() 92 FF0(a,b,c,d,e,i++); in ss_sha1_compress() 93 FF0(e,a,b,c,d,i++); in ss_sha1_compress() 94 FF0(d,e,a,b,c,i++); in ss_sha1_compress() 95 FF0(c,d,e,a,b,i++); in ss_sha1_compress() 96 FF0(b,c,d,e,a,i++); in ss_sha1_compress() [all …]
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/ |
A D | bn_mul.h | 58 ( (mbedtls_mpi_uint) (d) << 24 ) 232 : "+c" (c), "+D" (d), "+S" (s), "+m" (*(uint64_t (*)[16]) d) \ 256 : "+r" (c), "+r" (d), "+r" (s), "+m" (*(uint64_t (*)[16]) d) \ 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) \ 944 r0 += *d; r1 += (r0 < *d); \ 945 c = r1; *(d++) = r0; 969 r0 += *d; r1 += (r0 < *d); \ [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/ |
A D | noekeon.c | 48 temp = d; d = a; a = temp;\ 53 #define PI1(a, b, c, d) \ argument 54 b = ROLc(b, 1); c = ROLc(c, 5); d = ROLc(d, 2); 56 #define PI2(a, b, c, d) \ argument 57 b = RORc(b, 1); c = RORc(c, 5); d = RORc(d, 2); 110 ulong32 a,b,c,d,temp; in s_noekeon_ecb_encrypt() local 123 PI1(a,b,c,d); \ in s_noekeon_ecb_encrypt() 124 GAMMA(a,b,c,d); \ in s_noekeon_ecb_encrypt() 125 PI2(a,b,c,d); in s_noekeon_ecb_encrypt() 178 PI1(a,b,c,d); \ in s_noekeon_ecb_decrypt() [all …]
|
A D | rc6.c | 132 #define RND(a,b,c,d) \ in s_rc6_ecb_encrypt() argument 134 u = (d * (d + d + 1)); u = ROLc(u, 5); \ in s_rc6_ecb_encrypt() 140 RND(a,b,c,d); in s_rc6_ecb_encrypt() 141 RND(b,c,d,a); in s_rc6_ecb_encrypt() 142 RND(c,d,a,b); in s_rc6_ecb_encrypt() 143 RND(d,a,b,c); in s_rc6_ecb_encrypt() 189 u = (d * (d + d + 1)); u = ROLc(u, 5); \ in s_rc6_ecb_decrypt() 196 RND(d,a,b,c); in s_rc6_ecb_decrypt() 197 RND(c,d,a,b); in s_rc6_ecb_decrypt() 198 RND(b,c,d,a); in s_rc6_ecb_decrypt() [all …]
|
A D | serpent.c | 33 d = ROLc(d ^ c ^ (a << 3), 7); \ 46 d = RORc(d, 7) ^ c ^ (a << 3); \ 429 d ^= k[4 * r + 3]; \ 493 LOAD32L(d, in + 12); in s_enc_block() 510 e = d; in s_enc_block() 511 d = a; in s_enc_block() 519 STORE32L(d, out + 0); in s_enc_block() 535 LOAD32L(d, in + 12); in s_dec_block() 545 b = d; in s_dec_block() 546 d = e; in s_dec_block() [all …]
|
/optee_os-3.20.0/lib/libutils/ext/ |
A D | strlcat.c | 52 register char *d = dst; in strlcat() local 58 while (n-- != 0 && *d != '\0') in strlcat() 59 d++; in strlcat() 60 dlen = d - dst; in strlcat() 68 *d++ = *s; in strlcat() 73 *d = '\0'; in strlcat()
|
A D | strlcpy.c | 48 register char *d = dst; in strlcpy() local 55 if ((*d++ = *s++) == 0) in strlcpy() 63 *d = '\0'; /* NUL-terminate dst */ in strlcpy()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ec25519/ |
A D | tweetnacl.c | 31 u32 d = 0; in vn() local 104 u8 d[32]; in par25519() local 188 A(c,b,d); in tweetnacl_crypto_scalarmult() 189 Z(b,b,d); in tweetnacl_crypto_scalarmult() 190 S(d,e); in tweetnacl_crypto_scalarmult() 197 Z(c,d,f); in tweetnacl_crypto_scalarmult() 199 A(a,a,d); in tweetnacl_crypto_scalarmult() 201 M(a,d,f); in tweetnacl_crypto_scalarmult() 202 M(d,b,x); in tweetnacl_crypto_scalarmult() 255 A(d, d, d); in add() [all …]
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | poly1305.c | 205 uint64_t d; in poly1305_compute_mac() local 224 g0 = (uint32_t) d; in poly1305_compute_mac() 225 d = ( (uint64_t) acc1 + ( d >> 32 ) ); in poly1305_compute_mac() 226 g1 = (uint32_t) d; in poly1305_compute_mac() 227 d = ( (uint64_t) acc2 + ( d >> 32 ) ); in poly1305_compute_mac() 228 g2 = (uint32_t) d; in poly1305_compute_mac() 229 d = ( (uint64_t) acc3 + ( d >> 32 ) ); in poly1305_compute_mac() 230 g3 = (uint32_t) d; in poly1305_compute_mac() 245 acc0 = (uint32_t) d; in poly1305_compute_mac() 246 d = (uint64_t) acc1 + ctx->s[1] + ( d >> 32U ); in poly1305_compute_mac() [all …]
|
A D | aria.c | 227 *d = ( (uint32_t) sa[ MBEDTLS_BYTE_0( *d ) ] ) ^ in aria_sl() 346 uint32_t a, b, c, d; in aria_fo_xor() local 351 d = p[3] ^ k[3]; in aria_fo_xor() 359 r[3] = d ^ x[3]; in aria_fo_xor() 368 uint32_t a, b, c, d; in aria_fe_xor() local 373 d = p[3] ^ k[3]; in aria_fe_xor() 381 r[3] = d ^ x[3]; in aria_fe_xor() 523 uint32_t a, b, c, d; in mbedtls_aria_crypt_ecb() local 539 d ^= ctx->rk[i][3]; in mbedtls_aria_crypt_ecb() 548 d ^= ctx->rk[i][3]; in mbedtls_aria_crypt_ecb() [all …]
|
A D | ecdh.c | 73 mbedtls_mpi *d, mbedtls_ecp_point *Q, in ecdh_gen_public_restartable() argument 86 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, Q, d, &grp->G, in ecdh_gen_public_restartable() 101 ECDH_VALIDATE_RET( d != NULL ); in mbedtls_ecdh_gen_public() 124 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, &P, d, Q, in ecdh_compute_shared_restartable() 151 ECDH_VALIDATE_RET( d != NULL ); in mbedtls_ecdh_compute_shared() 153 return( ecdh_compute_shared_restartable( grp, z, Q, d, in mbedtls_ecdh_compute_shared() 161 mbedtls_mpi_init( &ctx->d ); in ecdh_init_internal() 240 mbedtls_mpi_free( &ctx->d ); in ecdh_free_internal() 327 if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q, in ecdh_make_params_internal() 460 ( ret = mbedtls_mpi_copy( &ctx->d, &key->d ) ) != 0 ) in ecdh_get_params_internal() [all …]
|
/optee_os-3.20.0/lib/libutils/isoc/newlib/ |
A D | memchr.c | 109 unsigned char d = c; variable 119 if (*src == d) 134 mask = d << 8 | d; 154 if (*src == d)
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/chacha/ |
A D | chacha_crypt.c | 13 #define QUARTERROUND(a,b,c,d) \ argument 14 x[a] += x[b]; x[d] = ROL(x[d] ^ x[a], 16); \ 15 x[c] += x[d]; x[b] = ROL(x[b] ^ x[c], 12); \ 16 x[a] += x[b]; x[d] = ROL(x[d] ^ x[a], 8); \ 17 x[c] += x[d]; x[b] = ROL(x[b] ^ x[c], 7);
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/safer/ |
A D | safer.c | 251 { unsigned char a, b, c, d, e, f, g, h, t; in s_safer_ecb_encrypt() local 260 a = pt[0]; b = pt[1]; c = pt[2]; d = pt[3]; in s_safer_ecb_encrypt() 268 c = LOG(c) ^ *++key; d = EXP(d) + *++key; in s_safer_ecb_encrypt() 271 PHT(a, b); PHT(c, d); PHT(e, f); PHT(g, 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() 279 ct[2] = c & 0xFF; ct[3] = d & 0xFF; in s_safer_ecb_encrypt() 305 { unsigned char a, b, c, d, e, f, g, h, t; in s_safer_ecb_decrypt() local 314 a = ct[0]; b = ct[1]; c = ct[2]; d = ct[3]; in s_safer_ecb_decrypt() 322 t = e; e = b; b = c; c = t; t = f; f = d; d = g; g = t; in s_safer_ecb_decrypt() 330 d = LOG(d) ^ *--key; c = EXP(c) - *--key; in s_safer_ecb_decrypt() [all …]
|
/optee_os-3.20.0/core/drivers/crypto/caam/acipher/ |
A D | caam_ecc.c | 38 struct caambuf d; member 49 caam_free_buf(&key->d); in do_keypair_free() 110 crypto_bignum_bn2bin(inkey->d, outkey->d.data + size_sec - d_size); in do_keypair_conv() 112 cache_operation(TEE_CACHECLEAN, outkey->d.data, outkey->d.length); in do_keypair_conv() 154 if (!key->d) in do_allocate_keypair() 172 crypto_bignum_free(key->d); in do_allocate_keypair() 234 struct caambuf d = { }; in do_gen_keypair() local 287 cache_operation(TEE_CACHEFLUSH, d.data, d.length); in do_gen_keypair() 291 cache_operation(TEE_CACHEINVALIDATE, d.data, d.length); in do_gen_keypair() 294 ret = crypto_bignum_bin2bn(d.data, key_size / 8, key->d); in do_gen_keypair() [all …]
|
/optee_os-3.20.0/core/crypto/ |
A D | aes-gcm-sw.c | 77 void *d = dst + n * TEE_AES_BLOCK_SIZE; in encrypt_pl() local 79 encrypt_block(state, ek, s, d); in encrypt_pl() 84 void *d = dst + n * TEE_AES_BLOCK_SIZE; in encrypt_pl() local 87 encrypt_block(state, ek, tmp, d); in encrypt_pl() 116 void *d = dst + n * TEE_AES_BLOCK_SIZE; in decrypt_pl() local 118 decrypt_block(state, ek, s, d); in decrypt_pl() 123 void *d = dst + n * TEE_AES_BLOCK_SIZE; in decrypt_pl() local 126 decrypt_block(state, ek, tmp, d); in decrypt_pl()
|
/optee_os-3.20.0/core/pta/tests/ |
A D | misc.c | 227 signed a, b, c, d; in self_test_division() local 240 d = a % b; in self_test_division() 241 r = ((b * c + d) == a); in self_test_division() 248 (unsigned)b, (unsigned)a, (unsigned)b, (unsigned)d, (unsigned)d); in self_test_division() 256 d = a % b; in self_test_division() 257 r = ((b * c + d) == a); in self_test_division() 264 (unsigned)b, (signed)a, (signed)b, (signed)d, (unsigned)d); in self_test_division() 272 d = a % b; in self_test_division() 278 d = (signed)((unsigned)a % (unsigned)b); in self_test_division() 286 (unsigned)b, (unsigned)a, (unsigned)b, (unsigned)d, (unsigned)d); in self_test_division() [all …]
|
/optee_os-3.20.0/lib/libutils/isoc/ |
A D | qsort.c | 79 int d, r, swaptype, swap_cnt; in qsort() local 95 d = (n / 8) * es; in qsort() 96 pl = med3(pl, pl + d, pl + 2 * d, cmp); in qsort() 97 pm = med3(pm - d, pm, pm + d, cmp); in qsort() 98 pn = med3(pn - 2 * d, pn - d, pn, cmp); in qsort()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/math/ |
A D | gmp_desc.c | 406 if (d != NULL) { in divide() 407 mpz_mod(d, a, b); in divide() 459 LTC_ARGCHK(d != NULL); in addmod() 460 mpz_add(d, a, b); in addmod() 461 mpz_mod(d, d, c); in addmod() 470 LTC_ARGCHK(d != NULL); in submod() 471 mpz_sub(d, a, b); in submod() 472 mpz_mod(d, d, c); in submod() 482 mpz_mul(d, a, b); in mulmod() 483 mpz_mod(d, d, c); in mulmod() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/crypt/ |
A D | crypt_argchk.c | 11 void crypt_argchk(const char *v, const char *s, int d) in crypt_argchk() argument 14 v, d, s); in crypt_argchk()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/base32/ |
A D | base32_encode.c | 67 unsigned d = (i+3 < inlen) ? in[3] : 0; in base32_encode() local 75 *out++ = codes[(((c & 0xF) << 1) + (d >> 7)) & 0x1F]; in base32_encode() 78 *out++ = codes[(d >> 2) & 0x1F]; in base32_encode() 79 *out++ = codes[((d & 0x3) << 3) & 0x1F]; in base32_encode()
|