/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/ |
A D | multi2.c | 19 ulong32 t; in s_pi2() local 21 t = (ROL(t, 1) + t - 1) & 0xFFFFFFFFUL; in s_pi2() 22 t = (ROL(t, 4) ^ t) & 0xFFFFFFFFUL; in s_pi2() 23 p[0] ^= t; in s_pi2() 30 t = (ROL(t, 2) + t + 1) & 0xFFFFFFFFUL; in s_pi3() 31 t = (ROL(t, 8) ^ t) & 0xFFFFFFFFUL; in s_pi3() 32 t = (t + k[2]) & 0xFFFFFFFFUL; in s_pi3() 33 t = (ROL(t, 1) - t) & 0xFFFFFFFFUL; in s_pi3() 34 t = ROL(t, 16) ^ (p[0] | t); in s_pi3() 42 t = (ROL(t, 2) + t + 1) & 0xFFFFFFFFUL; in s_pi4() [all …]
|
A D | rc6.c | 120 ulong32 a,b,c,d,t,u; in s_rc6_ecb_encrypt() local 133 t = (b * (b + b + 1)); t = ROLc(t, 5); \ in s_rc6_ecb_encrypt() 135 a = ROL(a^t,u) + K[0]; \ in s_rc6_ecb_encrypt() 136 c = ROL(c^u,t) + K[1]; K += 2; in s_rc6_ecb_encrypt() 175 ulong32 a,b,c,d,t,u; in s_rc6_ecb_decrypt() local 188 t = (b * (b + b + 1)); t = ROLc(t, 5); \ in s_rc6_ecb_decrypt() 190 c = ROR(c - K[1], t) ^ u; \ in s_rc6_ecb_decrypt() 191 a = ROR(a - K[0], u) ^ t; K -= 2; in s_rc6_ecb_decrypt()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/base32/ |
A D | base32_decode.c | 23 ulong64 t = 0; in base32_decode() local 90 t = (t<<5) | map[c-'0']; in base32_decode() 92 *out++ = (unsigned char)((t>>32) & 255); in base32_decode() 93 *out++ = (unsigned char)((t>>24) & 255); in base32_decode() 94 *out++ = (unsigned char)((t>>16) & 255); in base32_decode() 95 *out++ = (unsigned char)((t>> 8) & 255); in base32_decode() 96 *out++ = (unsigned char)( t & 255); in base32_decode() 98 t = 0; in base32_decode() 102 t = t << (5 * (8 - y)); in base32_decode() 103 if (y >= 2) *out++ = (unsigned char)((t>>32) & 255); in base32_decode() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/object_identifier/ |
A D | der_decode_object_identifier.c | 22 unsigned long x, y, t, len; in der_decode_object_identifier() local 59 t = 0; in der_decode_object_identifier() 61 t = (t << 7) | (in[x] & 0x7F); in der_decode_object_identifier() 68 if (t <= 79) { in der_decode_object_identifier() 69 words[0] = t / 40; in der_decode_object_identifier() 70 words[1] = t % 40; in der_decode_object_identifier() 73 words[1] = t - 80; in der_decode_object_identifier() 77 words[y++] = t; in der_decode_object_identifier() 80 t = 0; in der_decode_object_identifier()
|
A D | der_encode_object_identifier.c | 22 unsigned long i, x, y, z, t, mask, wordbuf; in der_encode_object_identifier() local 42 t = der_object_identifier_bits(wordbuf); in der_encode_object_identifier() 43 z += t/7 + ((t%7) ? 1 : 0) + (wordbuf == 0 ? 1 : 0); in der_encode_object_identifier() 62 t = wordbuf & 0xFFFFFFFF; in der_encode_object_identifier() 63 if (t) { in der_encode_object_identifier() 66 while (t) { in der_encode_object_identifier() 67 out[x++] = (unsigned char)((t & 0x7F) | mask); in der_encode_object_identifier() 68 t >>= 7; in der_encode_object_identifier() 74 t = out[y]; out[y] = out[z]; out[z] = (unsigned char)t; in der_encode_object_identifier()
|
A D | der_length_object_identifier.c | 34 unsigned long y, z, t, wordbuf; in der_length_object_identifier() local 54 t = der_object_identifier_bits(wordbuf); in der_length_object_identifier() 55 z += t/7 + ((t%7) ? 1 : 0) + (wordbuf == 0 ? 1 : 0); in der_length_object_identifier()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/sober128/ |
A D | sober128_stream.c | 24 ulong32 t; in BYTE2WORD() local 26 return t; in BYTE2WORD() 31 ulong32 t; in XORWORD() local 33 t ^= w; in XORWORD() 49 ulong32 t; in cycle() local 53 t = R[0]; in cycle() 65 t ^= Sbox[(t >> 24) & 0xFF]; \ 66 t = RORc(t, 8); \ 68 t ^= Sbox[(t >> 24) & 0xFF]; \ 69 t = t + st->R[OFF(z,13)]; \ [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/base64/ |
A D | base64_decode.c | 82 unsigned long t, x, y, z; in s_base64_decode_internal() local 91 for (x = y = z = t = 0; x < inlen; x++) { in s_base64_decode_internal() 117 t = (t<<6)|c; in s_base64_decode_internal() 121 out[z++] = (unsigned char)((t>>16)&255); in s_base64_decode_internal() 122 out[z++] = (unsigned char)((t>>8)&255); in s_base64_decode_internal() 123 out[z++] = (unsigned char)(t&255); in s_base64_decode_internal() 124 y = t = 0; in s_base64_decode_internal() 131 t = t << (6 * (4 - y)); in s_base64_decode_internal() 133 if (y >= 2) out[z++] = (unsigned char) ((t >> 16) & 255); in s_base64_decode_internal() 134 if (y == 3) out[z++] = (unsigned char) ((t >> 8) & 255); in s_base64_decode_internal()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/padding/ |
A D | padding_pad.c | 17 unsigned char pad, block_length, r, t; in s_padding_padded_length() local 28 t = 0; in s_padding_padded_length() 36 t = 1; in s_padding_padded_length() 41 if (rng_get_bytes(&t, sizeof(t), NULL) != sizeof(t)) { in s_padding_padded_length() 44 t %= (256 / block_length); in s_padding_padded_length() 45 } while (t == 0); in s_padding_padded_length() 52 t = 1; in s_padding_padded_length() 58 pad = (t * block_length) - r; in s_padding_padded_length()
|
/optee_os-3.20.0/core/tee/ |
A D | tee_time_generic.c | 70 TEE_Time t; in tee_time_get_ta_time() local 77 res = tee_time_get_sys_time(&t); in tee_time_get_ta_time() 82 TEE_TIME_ADD(t, *offs, t2); in tee_time_get_ta_time() 85 if (TEE_TIME_LT(t2, t)) in tee_time_get_ta_time() 88 TEE_TIME_SUB(t, *offs, t2); in tee_time_get_ta_time() 91 if (TEE_TIME_LE(t, t2)) in tee_time_get_ta_time() 103 TEE_Time t; in tee_time_set_ta_time() local 109 res = tee_time_get_sys_time(&t); in tee_time_set_ta_time() 113 if (TEE_TIME_LT(t, *time)) { in tee_time_set_ta_time() 114 TEE_TIME_SUB(*time, t, offs); in tee_time_set_ta_time() [all …]
|
A D | tee_cryp_utl.c | 178 TEE_Time t; in plat_rng_init() local 191 res = tee_time_get_sys_time(&t); in plat_rng_init() 194 memset(&t, 0, sizeof(t)); in plat_rng_init() 197 res = crypto_rng_init(&t, sizeof(t)); in plat_rng_init()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/xts/ |
A D | xts_mult_x.c | 17 unsigned char t, tt; in xts_mult_x() local 19 for (x = t = 0; x < 16; x++) { in xts_mult_x() 21 I[x] = ((I[x] << 1) | t) & 0xFF; in xts_mult_x() 22 t = tt; in xts_mult_x()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ec25519/ |
A D | tweetnacl.c | 64 p[i]^=t; in sel25519() 65 q[i]^=t; in sel25519() 72 gf m,t; in pack25519() local 74 car25519(t); in pack25519() 75 car25519(t); in pack25519() 133 FOR(i,15) t[i]+=38*t[i+16]; in M() 429 M(t,t,den); in unpackneg() 431 pow2523(t,t); in unpackneg() 432 M(t,t,num); in unpackneg() 433 M(t,t,den); in unpackneg() [all …]
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | aes.c | 851 } t; in mbedtls_internal_aes_encrypt() local 853 t.X[0] = MBEDTLS_GET_UINT32_LE( input, 0 ); t.X[0] ^= *RK++; in mbedtls_internal_aes_encrypt() 860 AES_FROUND( t.Y[0], t.Y[1], t.Y[2], t.Y[3], t.X[0], t.X[1], t.X[2], t.X[3] ); in mbedtls_internal_aes_encrypt() 861 AES_FROUND( t.X[0], t.X[1], t.X[2], t.X[3], t.Y[0], t.Y[1], t.Y[2], t.Y[3] ); in mbedtls_internal_aes_encrypt() 864 AES_FROUND( t.Y[0], t.Y[1], t.Y[2], t.Y[3], t.X[0], t.X[1], t.X[2], t.X[3] ); in mbedtls_internal_aes_encrypt() 895 mbedtls_platform_zeroize( &t, sizeof( t ) ); in mbedtls_internal_aes_encrypt() 924 } t; in mbedtls_internal_aes_decrypt() local 933 AES_RROUND( t.Y[0], t.Y[1], t.Y[2], t.Y[3], t.X[0], t.X[1], t.X[2], t.X[3] ); in mbedtls_internal_aes_decrypt() 934 AES_RROUND( t.X[0], t.X[1], t.X[2], t.X[3], t.Y[0], t.Y[1], t.Y[2], t.Y[3] ); in mbedtls_internal_aes_decrypt() 937 AES_RROUND( t.Y[0], t.Y[1], t.Y[2], t.Y[3], t.X[0], t.X[1], t.X[2], t.X[3] ); in mbedtls_internal_aes_decrypt() [all …]
|
A D | md2.c | 120 unsigned char t = 0; in mbedtls_internal_md2_process() local 134 ( ctx->state[j] ^ PI_SUBST[t] ); in mbedtls_internal_md2_process() 135 t = ctx->state[j]; in mbedtls_internal_md2_process() 138 t = (unsigned char)( t + i ); in mbedtls_internal_md2_process() 141 t = ctx->cksum[15]; in mbedtls_internal_md2_process() 146 ( ctx->cksum[i] ^ PI_SUBST[ctx->buffer[i] ^ t] ); in mbedtls_internal_md2_process() 147 t = ctx->cksum[i]; in mbedtls_internal_md2_process() 151 mbedtls_platform_zeroize( &t, sizeof( t ) ); in mbedtls_internal_md2_process()
|
A D | hkdf.c | 90 unsigned char t[MBEDTLS_MD_MAX_SIZE]; in mbedtls_hkdf_expand() local 133 memset( t, 0, hash_len ); in mbedtls_hkdf_expand() 150 ret = mbedtls_md_hmac_update( &ctx, t, t_len ); in mbedtls_hkdf_expand() 170 ret = mbedtls_md_hmac_finish( &ctx, t ); in mbedtls_hkdf_expand() 177 memcpy( okm + where, t, num_to_copy ); in mbedtls_hkdf_expand() 184 mbedtls_platform_zeroize( t, sizeof( t ) ); in mbedtls_hkdf_expand()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/printable_string/ |
A D | der_decode_printable_string.c | 25 int t, err; in der_decode_printable_string() local 61 t = der_printable_value_decode(in[x++]); in der_decode_printable_string() 62 if (t == -1) { in der_decode_printable_string() 65 out[y] = t; in der_decode_printable_string()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/teletex_string/ |
A D | der_decode_teletex_string.c | 24 int t, err; in der_decode_teletex_string() local 60 t = der_teletex_value_decode(in[x++]); in der_decode_teletex_string() 61 if (t == -1) { in der_decode_teletex_string() 64 out[y] = t; in der_decode_teletex_string()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/ia5/ |
A D | der_decode_ia5_string.c | 25 int t, err; in der_decode_ia5_string() local 61 t = der_ia5_value_decode(in[x++]); in der_decode_ia5_string() 62 if (t == -1) { in der_decode_ia5_string() 65 out[y] = t; in der_decode_ia5_string()
|
/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 100 ulong32 t; in ss_md5_compress() local 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 | md2.c | 69 unsigned char t; in s_md2_compress() local 77 t = (unsigned char)0; in s_md2_compress() 82 t = (md->md2.X[k] ^= PI_SUBST[(int)(t & 255)]); in s_md2_compress() 84 t = (t + (unsigned char)j) & 255; in s_md2_compress()
|
/optee_os-3.20.0/lib/libmbedtls/core/ |
A D | sm2-pke.c | 122 uint8_t *t = NULL; in sm2_mbedtls_pke_decrypt() local 195 t = calloc(1, C2_len); in sm2_mbedtls_pke_decrypt() 196 if (!t) { in sm2_mbedtls_pke_decrypt() 205 if (is_zero(t, C2_len)) { in sm2_mbedtls_pke_decrypt() 214 dst[i] = src[C1_len + i] ^ t[i]; in sm2_mbedtls_pke_decrypt() 259 free(t); in sm2_mbedtls_pke_decrypt() 312 uint8_t *t = NULL; in sm2_mbedtls_pke_encrypt() local 383 t = calloc(1, src_len); in sm2_mbedtls_pke_encrypt() 384 if (!t) { in sm2_mbedtls_pke_encrypt() 393 if (is_zero(t, src_len)) { in sm2_mbedtls_pke_encrypt() [all …]
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/modes/lrw/ |
A D | lrw_start.c | 33 int x, y, z, t; in lrw_start() local 77 t = lrw->PC[x-1][y][15]; in lrw_start() 81 lrw->PC[x][y][0] = gcm_shift_table[t<<1]; in lrw_start() 82 lrw->PC[x][y][1] ^= gcm_shift_table[(t<<1)+1]; in lrw_start()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/gcm/ |
A D | gcm_init.c | 26 int x, y, z, t; in gcm_init() local 81 t = gcm->PC[x-1][y][15]; in gcm_init() 85 gcm->PC[x][y][0] = gcm_shift_table[t<<1]; in gcm_init() 86 gcm->PC[x][y][1] ^= gcm_shift_table[(t<<1)+1]; in gcm_init()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/safer/ |
A D | saferp.c | 220 unsigned char t[33]; in saferp_setup() local 242 t[x] = key[x]; in saferp_setup() 245 t[16] = y; in saferp_setup() 256 t[y] = ((t[y]<<3)|(t[y]>>5)) & 255; in saferp_setup() 270 t[x] = key[x]; in saferp_setup() 273 t[24] = y; in saferp_setup() 283 t[y] = ((t[y]<<3)|(t[y]>>5)) & 255; in saferp_setup() 297 t[x] = key[x]; in saferp_setup() 300 t[32] = y; in saferp_setup() 310 t[y] = ((t[y]<<3)|(t[y]>>5)) & 255; in saferp_setup() [all …]
|