/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/safer/ |
A D | saferp.c | 81 b[0] = (b[0] + (b[1] = (b[0] + b[1]) & 255)) & 255; \ 82 b[2] = (b[2] + (b[3] = (b[3] + b[2]) & 255)) & 255; \ 83 b[4] = (b[4] + (b[5] = (b[5] + b[4]) & 255)) & 255; \ 84 b[6] = (b[6] + (b[7] = (b[7] + b[6]) & 255)) & 255; \ 85 b[8] = (b[8] + (b[9] = (b[9] + b[8]) & 255)) & 255; \ 86 b[10] = (b[10] + (b[11] = (b[11] + b[10]) & 255)) & 255; \ 87 b[12] = (b[12] + (b[13] = (b[13] + b[12]) & 255)) & 255; \ 88 b[14] = (b[14] + (b[15] = (b[15] + b[14]) & 255)) & 255; \ 93 b[15] = (b[15] - (b[14] = (b[14] - b[15]) & 255)) & 255; \ 94 b[13] = (b[13] - (b[12] = (b[12] - b[13]) & 255)) & 255; \ [all …]
|
/optee_os-3.20.0/core/arch/arm/crypto/ |
A D | ghash-ce-core_a64.S | 127 eor t4.16b, t4.16b, t3.16b 132 eor t6.16b, t6.16b, t7.16b 135 eor t4.16b, t4.16b, t3.16b 136 eor t6.16b, t6.16b, t7.16b 148 eor t3.16b, t3.16b, t5.16b 149 eor t7.16b, t7.16b, t9.16b 209 eor XM.16b, XM.16b, T1.16b 214 eor XL.16b, XM.16b, T2.16b 323 b 1b 591 b 1b [all …]
|
A D | aes_modes_armv8a_ce_a64.S | 330 eor v1.16b, v1.16b, v0.16b 332 eor v2.16b, v2.16b, v1.16b 334 eor v3.16b, v3.16b, v2.16b 375 eor v0.16b, v0.16b, v7.16b 376 eor v1.16b, v1.16b, v4.16b 378 eor v2.16b, v2.16b, v5.16b 379 eor v3.16b, v3.16b, v6.16b 519 eor v0.16b, v0.16b, v4.16b 520 eor v1.16b, v1.16b, v5.16b 522 eor v0.16b, v0.16b, v4.16b [all …]
|
A D | sm3_armv8a_ce_a64.S | 13 .set .Lv\b\().4s, \b 56 ext v7.16b, \s2\().16b, \s3\().16b, #8 60 eor v10.16b, \s0\().16b, \s1\().16b 81 ext v8.16b, v8.16b, v8.16b, #8 82 ext v9.16b, v9.16b, v9.16b, #8 99 ext v11.16b, v13.16b, v13.16b, #4 106 ext v11.16b, v14.16b, v14.16b, #4 121 eor v8.16b, v8.16b, v15.16b 122 eor v9.16b, v9.16b, v16.16b 130 ext v8.16b, v8.16b, v8.16b, #8 [all …]
|
A D | sha512_armv8a_ce_a64.S | 13 .set .Lq\b, \b 14 .set .Lv\b\().2d, \b 86 ext v6.16b, v\i2\().16b, v\i3\().16b, #8 87 ext v5.16b, v5.16b, v5.16b, #8 88 ext v7.16b, v\i1\().16b, v\i2\().16b, #8 91 ext v5.16b, v\in3\().16b, v\in4\().16b, #8 119 rev64 v12.16b, v12.16b 130 mov v0.16b, v8.16b 131 mov v1.16b, v9.16b 132 mov v2.16b, v10.16b [all …]
|
A D | sha256_armv8a_ce_a64.S | 29 mov dg2v.16b, dg0v.16b 68 0: ld1 {v16.16b-v19.16b}, [x1], #64 71 rev32 v16.16b, v16.16b 72 rev32 v17.16b, v17.16b 73 rev32 v18.16b, v18.16b 74 rev32 v19.16b, v19.16b 77 mov dg0v.16b, dgav.16b 78 mov dg1v.16b, dgbv.16b 105 cbnz w2, 0b 109 st1 {dgav.16b}, [x9], #16 [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/math/ |
A D | ltm_desc.c | 81 LTC_ARGCHK(b != NULL); in neg() 88 LTC_ARGCHK(b != NULL); in copy() 96 LTC_ARGCHK(b != NULL); in init_copy() 108 mp_set_u32(a, b); in set_int() 142 LTC_ARGCHK(b != NULL); in compare() 187 LTC_ARGCHK(b != NULL); in read_radix() 195 LTC_ARGCHK(b != NULL); in write_radix() 218 LTC_ARGCHK(b != NULL); in unsigned_write() 230 LTC_ARGCHK(b != NULL); in unsigned_read() 403 if (*b == NULL) { in montgomery_setup() [all …]
|
A D | gmp_desc.c | 34 LTC_ARGCHK(b != NULL); in neg() 35 mpz_neg(b, a); in neg() 43 mpz_set(b, a); in copy() 52 return copy(b, *a); in init_copy() 153 p = b; in read_radix() 226 mpz_add(c, a, b); in add() 244 mpz_sub(c, a, b); in sub() 262 mpz_mul(c, a, b); in mul() 279 mpz_mul(b, a, a); in sqr() 512 *b = (void *)1; in montgomery_setup() [all …]
|
A D | tfm_desc.c | 66 fp_copy(a, b); in copy() 82 fp_set(a, b); in set_int() 205 fp_add(a, b, c); in add() 223 fp_sub(a, b, c); in sub() 241 fp_mul(a, b, c); in mul() 258 fp_sqr(a, b); in sqr() 276 fp_div_2(a, b); in div_2() 302 fp_gcd(a, b, c); in gcd() 312 fp_lcm(a, b, c); in lcm() 371 XFREE(*b); in montgomery_setup() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/hashes/ |
A D | md5.c | 39 a = (a + F(b,c,d) + M + t); a = ROL(a, s) + b; 42 a = (a + G(b,c,d) + M + t); a = ROL(a, s) + b; 45 a = (a + H(b,c,d) + M + t); a = ROL(a, s) + b; 48 a = (a + I(b,c,d) + M + t); a = ROL(a, s) + b; 78 a = (a + F(b,c,d) + M + t); a = ROLc(a, s) + b; 81 a = (a + G(b,c,d) + M + t); a = ROLc(a, s) + b; 84 a = (a + H(b,c,d) + M + t); a = ROLc(a, s) + b; 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 78 b = md->md4.state[1]; 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 | 54 b = md->sha1.state[1]; 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() 92 FF0(a,b,c,d,e,i++); in ss_sha1_compress() [all …]
|
/optee_os-3.20.0/lib/libutils/isoc/arch/arm/ |
A D | arm32_aeabi_softfloat.c | 112 return f64_eq(f64_from_d(a), f64_from_d(b)); in __aeabi_dcmpeq() 117 return f64_lt(f64_from_d(a), f64_from_d(b)); in __aeabi_dcmplt() 122 return f64_le(f64_from_d(a), f64_from_d(b)); in __aeabi_dcmple() 127 return f64_le(f64_from_d(b), f64_from_d(a)); in __aeabi_dcmpge() 132 return f64_lt(f64_from_d(b), f64_from_d(a)); in __aeabi_dcmpgt() 170 int __aeabi_fcmpeq(aeabi_float_t a, aeabi_float_t b) in __aeabi_fcmpeq() argument 172 return f32_eq(f32_from_f(a), f32_from_f(b)); in __aeabi_fcmpeq() 177 return f32_lt(f32_from_f(a), f32_from_f(b)); in __aeabi_fcmplt() 182 return f32_le(f32_from_f(a), f32_from_f(b)); in __aeabi_fcmple() 187 return f32_le(f32_from_f(b), f32_from_f(a)); in __aeabi_fcmpge() [all …]
|
/optee_os-3.20.0/lib/libutils/isoc/ |
A D | bget.c | 710 b->bh.bsize = -b->bh.bsize; 994 assert(BH((char *) b - b->bh.prevfree)->bsize == b->bh.prevfree); 995 b = BFH(((char *) b) - b->bh.prevfree); 1007 b->ql.blink->ql.flink = b; 1008 b->bh.bsize = -b->bh.bsize; 1065 assert(BH((char *) b + b->bh.bsize)->prevfree == b->bh.bsize); 1143 b->ql.blink->ql.flink = b; 1299 (b->ql.flink->ql.blink != b)) { 1318 b = BFH(((char *) b) + bs); 1346 (b->ql.flink->ql.blink != b)) { [all …]
|
A D | qsort.c | 36 #define min(a, b) (a) < (b) ? a : b argument 56 swapcode(long, a, b, n) in swapfunc() 58 swapcode(char, a, b, n) in swapfunc() 60 #define swap(a, b) \ argument 63 *(long *)(a) = *(long *)(b); \ 64 *(long *)(b) = t; \ 66 swapfunc(a, b, es, swaptype) 67 #define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) argument 71 return cmp(a, b) < 0 ? in med3() 72 (cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a )) in med3() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/ |
A D | mpi_desc.c | 106 return copy(b, *a); in init_copy() 112 uint32_t b32 = b; in set_int() 114 if (b32 != b) in set_int() 168 unsigned long v = b; in compare_d() 280 uint32_t b32 = b; in addi() 282 if (b32 != b) in addi() 302 uint32_t b32 = b; in subi() 304 if (b32 != b) in subi() 336 return mul(a, a, b); in sqr() 499 if (!*b) in montgomery_setup() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_private.h | 175 #define mp_neg(a, b) ltc_mp.neg(a, b) argument 176 #define mp_copy(a, b) ltc_mp.copy(a, b) argument 195 #define mp_add(a, b, c) ltc_mp.add(a, b, c) argument 197 #define mp_sub(a, b, c) ltc_mp.sub(a, b, c) argument 199 #define mp_mul(a, b, c) ltc_mp.mul(a, b, c) argument 201 #define mp_sqr(a, b) ltc_mp.sqr(a, b) argument 204 #define mp_div_2(a, b) ltc_mp.div_2(a, b) argument 207 #define mp_gcd(a, b, c) ltc_mp.gcd(a, b, c) argument 208 #define mp_lcm(a, b, c) ltc_mp.lcm(a, b, c) argument 226 #define mp_exch(a, b) do { void *ABC__tmp = a; a = b; b = ABC__tmp; } while(0) argument [all …]
|
A D | tomcrypt_math.h | 118 int (*compare)(void *a, void *b); 197 int (*add)(void *a, void *b, void *c); 214 int (*sub)(void *a, void *b, void *c); 232 int (*mul)(void *a, void *b, void *c); 248 int (*sqr)(void *a, void *b); 272 int (*div_2)(void *a, void *b); 288 int (*gcd)(void *a, void *b, void *c); 296 int (*lcm)(void *a, void *b, void *c); 313 int (*sqrmod)(void *a, void *b, void *c); 330 int (*montgomery_setup)(void *a, void **b); [all …]
|
/optee_os-3.20.0/core/kernel/ |
A D | tee_misc.c | 44 hs[i * 2 + 1] = tee_b2hs_add_base(b[i] & 0xf); in tee_b2hs() 45 hs[i * 2] = tee_b2hs_add_base(b[i] >> 4); in tee_b2hs() 67 b[i] = (hi << 4) + lo; in tee_hs2b() 77 if ((b - 1 + bl < b) || (a - 1 + al < a)) in is_valid_conf_and_notnull_size() 86 bool core_is_buffer_inside(paddr_t b, paddr_size_t bl, in core_is_buffer_inside() argument 90 if (!is_valid_conf_and_notnull_size(b, bl, a, al)) in core_is_buffer_inside() 93 if ((b >= a) && (b - 1 + bl <= a - 1 + al)) in core_is_buffer_inside() 103 if (!is_valid_conf_and_notnull_size(b, bl, a, al)) in core_is_buffer_outside() 106 if ((b + bl - 1 < a) || (b > a + al - 1)) in core_is_buffer_outside() 116 if (!is_valid_conf_and_notnull_size(b, bl, a, al)) in core_is_buffer_intersect() [all …]
|
/optee_os-3.20.0/lib/libutils/ext/include/ |
A D | util.h | 20 #define MAX(a, b) \ argument 22 __typeof__(b) _b = (b); \ 25 #define MIN(a, b) \ argument 27 __typeof__(b) _b = (b); \ 30 #define MAX(a, b) (((a) > (b)) ? (a) : (b)) argument 31 #define MIN(a, b) (((a) < (b)) ? (a) : (b)) argument 40 #define MAX_UNSAFE(a, b) (((a) > (b)) ? (a) : (b)) argument 41 #define MIN_UNSAFE(a, b) (((a) < (b)) ? (a) : (b)) argument 150 #define ADD_OVERFLOW(a, b, res) __compiler_add_overflow((a), (b), (res)) argument 151 #define SUB_OVERFLOW(a, b, res) __compiler_sub_overflow((a), (b), (res)) argument [all …]
|
A D | compiler.h | 29 #define __printf(a, b) __attribute__((format(printf, a, b))) argument 96 #define __compiler_add_overflow(a, b, res) \ argument 97 __builtin_add_overflow((a), (b), (res)) 100 __builtin_sub_overflow((a), (b), (res)) 103 __builtin_mul_overflow((a), (b), (res)) 120 typeof(b) __intofa_b = (b); \ 158 typeof(b) __intofs_b = b; \ 238 typeof(b) __intof_ob = (b); \ 253 #define __compiler_add_overflow(a, b, res) __INTOF_ADD(*(res), (a), (b)) argument 254 #define __compiler_sub_overflow(a, b, res) __INTOF_SUB(*(res), (a), (b)) argument [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/ |
A D | noekeon.c | 51 a ^= c&b; 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 …]
|
/optee_os-3.20.0/scripts/ |
A D | gen_ldelf_hex.py | 96 outf.write(b' __aligned(4096) = {\n') 104 outf.write(b'\t') 105 outf.write(b'0x' + '{:02x}'.format(data[j]).encode('utf-8') 106 + b',') 109 outf.write(b'\n') 111 outf.write(b' ') 113 outf.write(b'};\n') 140 outf.write(b'/* Automatically generated, do no edit */\n') 141 outf.write(b'#include <compiler.h>\n') 142 outf.write(b'#include <stdint.h>\n') [all …]
|
/optee_os-3.20.0/core/pta/tests/ |
A D | misc.c | 238 b = (signed)((unsigned)(vaddr_t)&b & 0x00FFF) + 1; in self_test_division() 239 c = a / b; in self_test_division() 240 d = a % b; in self_test_division() 254 b = (signed)((unsigned)(vaddr_t)&b & 0x00FFF) - 1; in self_test_division() 255 c = a / b; in self_test_division() 256 d = a % b; in self_test_division() 261 (unsigned)a, (unsigned)b, (signed)a, (signed)b, (signed)c, in self_test_division() 270 b = -(signed)((unsigned)(vaddr_t)&b & 0x00FFF) + 1; in self_test_division() 271 c = a / b; in self_test_division() 272 d = a % b; in self_test_division() [all …]
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/ |
A D | bn_mul.h | 61 MBEDTLS_BYTES_TO_T_UINT_4( a, b, 0, 0 ) 515 : "m" (s), "m" (d), "m" (c), "m" (b) \ 547 : "m" (s), "m" (d), "m" (c), "m" (b) \ 629 : "m" (s), "m" (d), "m" (c), "m" (b) \ 702 : "m" (s), "m" (d), "m" (c), "m" (b) \ 721 : "r" (b), "0" (s), "1" (d), "2" (c) \ 748 : "m" (s), "m" (d), "m" (c), "m" (b) \ 834 __asm mov ebx, b 940 r = *(s++) * (mbedtls_t_udbl) b; \ 955 b0 = ( b << biH ) >> biH; \ [all …]
|