Home
last modified time | relevance | path

Searched refs:x (Results 1 – 25 of 415) sorted by relevance

12345678910>>...17

/optee_os/core/lib/libtomcrypt/src/headers/
H A Dtomcrypt_macros.h12 #define STORE32L(x, y) \ argument
13 do { (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
14 (y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); } while(0)
16 #define LOAD32L(x, y) \ argument
17 do { x = ((ulong32)((y)[3] & 255)<<24) | \
22 #define STORE64L(x, y) \ argument
23 do { (y)[7] = (unsigned char)(((x)>>56)&255); (y)[6] = (unsigned char)(((x)>>48)&255); \
24 (y)[5] = (unsigned char)(((x)>>40)&255); (y)[4] = (unsigned char)(((x)>>32)&255); \
25 (y)[3] = (unsigned char)(((x)>>24)&255); (y)[2] = (unsigned char)(((x)>>16)&255); \
26 (y)[1] = (unsigned char)(((x)>>8)&255); (y)[0] = (unsigned char)((x)&255); } while(0)
[all …]
H A Dtomcrypt_argchk.h13 #define LTC_ARGCHK(x) do { if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); } }while(0) argument
14 #define LTC_ARGCHKVD(x) do { if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); } }while(0) argument
19 #define LTC_ARGCHK(x) assert((x)) argument
20 #define LTC_ARGCHKVD(x) LTC_ARGCHK(x) argument
24 #define LTC_ARGCHK(x) if (!(x)) { fprintf(stderr, "\nwarning: ARGCHK failed at %s:%d\n", __FILE__, … argument
25 #define LTC_ARGCHKVD(x) LTC_ARGCHK(x) argument
29 #define LTC_ARGCHK(x) LTC_UNUSED_PARAM(x) argument
30 #define LTC_ARGCHKVD(x) LTC_ARGCHK(x) argument
34 #define LTC_ARGCHK(x) if (!(x)) return CRYPT_INVALID_ARG; argument
35 #define LTC_ARGCHKVD(x) if (!(x)) return; argument
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/general/
H A Dder_encode_asn1_length.c20 unsigned long x, y; in der_encode_asn1_length() local
24 x = len; in der_encode_asn1_length()
27 while(x != 0) { in der_encode_asn1_length()
29 x >>= 8; in der_encode_asn1_length()
37 x = y; in der_encode_asn1_length()
39 x = y + 1; in der_encode_asn1_length()
45 x = 0; in der_encode_asn1_length()
47 out[x++] = (unsigned char)len; in der_encode_asn1_length()
49 out[x++] = 0x81; in der_encode_asn1_length()
50 out[x++] = (unsigned char)len; in der_encode_asn1_length()
[all …]
/optee_os/core/lib/libtomcrypt/src/modes/lrw/
H A Dlrw_process.c24 int x, err; in lrw_process() local
42 for (x = 15; x >= 0; x--) { in lrw_process()
43 lrw->IV[x] = (lrw->IV[x] + 1) & 255; in lrw_process()
44 if (lrw->IV[x]) { in lrw_process()
52 for (; x < 16; x++) { in lrw_process()
55 … y)) ^= *(LTC_FAST_TYPE_PTR_CAST(&lrw->PC[x][lrw->IV[x]][y])) ^ *(LTC_FAST_TYPE_PTR_CAST(&lrw->PC[ in lrw_process()
59 lrw->pad[y] ^= lrw->PC[x][lrw->IV[x]][y] ^ lrw->PC[x][(lrw->IV[x]-1)&255][y]; in lrw_process()
69 for (x = 0; x < 16; x += sizeof(LTC_FAST_TYPE)) { in lrw_process()
70 …*(LTC_FAST_TYPE_PTR_CAST(ct + x)) = *(LTC_FAST_TYPE_PTR_CAST(pt + x)) ^ *(LTC_FAST_TYPE_PTR_CAST(p… in lrw_process()
73 for (x = 0; x < 16; x++) { in lrw_process()
[all …]
/optee_os/core/lib/libtomcrypt/src/encauth/ccm/
H A Dccm_test.c108 unsigned long taglen, x, y; in ccm_test()
124 for (x = 0; x < (sizeof(tests)/sizeof(tests[0])); x++) { in ccm_test()
126 taglen = tests[x].taglen; in ccm_test()
128 if ((err = cipher_descriptor[idx]->setup(tests[x].key, 16, 0, &skey)) != CRYPT_OK) { in ccm_test()
133 tests[x].key, 16, in ccm_test()
135 tests[x].nonce, tests[x].noncelen, in ccm_test()
136 tests[x].header, tests[x].headerlen, in ccm_test()
137 (unsigned char*)tests[x].pt, tests[x].ptlen, in ccm_test()
144 tests[x].key, 16, in ccm_test()
146 tests[x].nonce, tests[x].noncelen, in ccm_test()
[all …]
/optee_os/core/lib/libtomcrypt/src/ciphers/aes/
H A Daes_tab.c300 #define Te0(x) TE0[x] argument
301 #define Te1(x) RORc(TE0[x], 8) argument
302 #define Te2(x) RORc(TE0[x], 16) argument
303 #define Te3(x) RORc(TE0[x], 24) argument
305 #define Td0(x) TD0[x] argument
306 #define Td1(x) RORc(TD0[x], 8) argument
307 #define Td2(x) RORc(TD0[x], 16) argument
308 #define Td3(x) RORc(TD0[x], 24) argument
317 #define Te0(x) TE0[x] argument
318 #define Te1(x) TE1[x] argument
[all …]
/optee_os/core/lib/libfdt/include/
H A Dlibfdt_env.h29 #define EXTRACT_BYTE(x, n) ((unsigned long long)((uint8_t *)&x)[n]) argument
30 #define CPU_TO_FDT16(x) ((EXTRACT_BYTE(x, 0) << 8) | EXTRACT_BYTE(x, 1)) argument
31 #define CPU_TO_FDT32(x) ((EXTRACT_BYTE(x, 0) << 24) | (EXTRACT_BYTE(x, 1) << 16) | \ argument
32 (EXTRACT_BYTE(x, 2) << 8) | EXTRACT_BYTE(x, 3))
33 #define CPU_TO_FDT64(x) ((EXTRACT_BYTE(x, 0) << 56) | (EXTRACT_BYTE(x, 1) << 48) | \ argument
34 (EXTRACT_BYTE(x, 2) << 40) | (EXTRACT_BYTE(x, 3) << 32) | \
35 (EXTRACT_BYTE(x, 4) << 24) | (EXTRACT_BYTE(x, 5) << 16) | \
36 (EXTRACT_BYTE(x, 6) << 8) | EXTRACT_BYTE(x, 7))
38 static inline uint16_t fdt16_to_cpu(fdt16_t x) in fdt16_to_cpu() argument
40 return (FDT_FORCE uint16_t)CPU_TO_FDT16(x); in fdt16_to_cpu()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/generalizedtime/
H A Dder_decode_generalizedtime.c13 static int s_char_to_int(unsigned char x) in s_char_to_int() argument
15 switch (x) { in s_char_to_int()
31 y = s_char_to_int(buf[x])*10 + s_char_to_int(buf[x+1]); \
33 x += 2; \
37 …y = s_char_to_int(buf[x])*1000 + s_char_to_int(buf[x+1])*100 + s_char_to_int(buf[x+2])*10 + s_cha…
39 x += 4; \
53 unsigned long x; in der_decode_generalizedtime() local
66 for (x = 0; x < in[1]; x++) { in der_decode_generalizedtime()
67 y = der_ia5_value_decode(in[x+2]); in der_decode_generalizedtime()
76 buf[x] = y; in der_decode_generalizedtime()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/utf8/
H A Dder_encode_utf8_string.c24 unsigned long x, y, len; in der_encode_utf8_string() local
32 for (x = len = 0; x < inlen; x++) { in der_encode_utf8_string()
33 if (!der_utf8_valid_char(in[x])) return CRYPT_INVALID_ARG; in der_encode_utf8_string()
34 len += der_utf8_charsize(in[x]); in der_encode_utf8_string()
36 if ((err = der_length_asn1_length(len, &x)) != CRYPT_OK) { in der_encode_utf8_string()
39 x += len + 1; in der_encode_utf8_string()
42 if (x > *outlen) { in der_encode_utf8_string()
43 *outlen = x; in der_encode_utf8_string()
48 x = 0; in der_encode_utf8_string()
49 out[x++] = 0x0C; in der_encode_utf8_string()
[all …]
/optee_os/core/lib/libtomcrypt/src/encauth/ocb/
H A Ds_ocb_done.c36 int err, x; in s_ocb_done() local
74 for (x = 0; x < ocb->block_len; x++) { in s_ocb_done()
75 X[x] ^= ocb->Lr[x]; in s_ocb_done()
86 for (x = 0; x < (int)ptlen; x++) { in s_ocb_done()
87 ocb->checksum[x] ^= ct[x]; in s_ocb_done()
92 for (x = 0; x < (int)ptlen; x++) { in s_ocb_done()
93 ct[x] = pt[x] ^ Y[x]; in s_ocb_done()
99 for (x = 0; x < (int)ptlen; x++) { in s_ocb_done()
100 ocb->checksum[x] ^= ct[x]; in s_ocb_done()
105 for (x = 0; x < ocb->block_len; x++) { in s_ocb_done()
[all …]
H A Docb_test.c159 int err, x, idx, res; in ocb_test()
170 for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { in ocb_test()
172 if ((err = ocb_encrypt_authenticate_memory(idx, tests[x].key, 16, in ocb_test()
173 tests[x].nonce, tests[x].pt, tests[x].ptlen, outct, outtag, &len)) != CRYPT_OK) { in ocb_test()
177 if (compare_testvector(outtag, len, tests[x].tag, sizeof(tests[x].tag), "OCB Tag", x) || in ocb_test()
178 compare_testvector(outct, tests[x].ptlen, tests[x].ct, tests[x].ptlen, "OCB CT", x)) { in ocb_test()
182 … if ((err = ocb_decrypt_verify_memory(idx, tests[x].key, 16, tests[x].nonce, outct, tests[x].ptlen, in ocb_test()
183 outct, tests[x].tag, len, &res)) != CRYPT_OK) { in ocb_test()
186 …if ((res != 1) || compare_testvector(outct, tests[x].ptlen, tests[x].pt, tests[x].ptlen, "OCB", x)… in ocb_test()
H A Docb_init.c42 int poly, x, y, m, err; in ocb_init() local
55 x = (int)(sizeof(polys)/sizeof(polys[0])); in ocb_init()
56 for (poly = 0; poly < x; poly++) { in ocb_init()
61 if (poly == x) { in ocb_init()
80 for (x = 0; x < ocb->block_len; x++) { in ocb_init()
81 ocb->R[x] = ocb->L[x] ^ nonce[x]; in ocb_init()
89 for (x = 1; x < 32; x++) { in ocb_init()
90 m = ocb->Ls[x-1][0] >> 7; in ocb_init()
92 ocb->Ls[x][y] = ((ocb->Ls[x-1][y] << 1) | (ocb->Ls[x-1][y+1] >> 7)) & 255; in ocb_init()
94 ocb->Ls[x][ocb->block_len-1] = (ocb->Ls[x-1][ocb->block_len-1] << 1) & 255; in ocb_init()
[all …]
/optee_os/core/lib/libtomcrypt/src/encauth/eax/
H A Deax_test.c208 int err, x, idx, res; in eax_test()
219 for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { in eax_test()
221 if ((err = eax_encrypt_authenticate_memory(idx, tests[x].key, tests[x].keylen, in eax_test()
222 tests[x].nonce, tests[x].noncelen, tests[x].header, tests[x].headerlen, in eax_test()
223 tests[x].plaintext, tests[x].msglen, outct, outtag, &len)) != CRYPT_OK) { in eax_test()
226 if (compare_testvector(outtag, len, tests[x].tag, len, "EAX Tag", x) || in eax_test()
227 … compare_testvector(outct, tests[x].msglen, tests[x].ciphertext, tests[x].msglen, "EAX CT", x)) { in eax_test()
232 if ((err = eax_decrypt_verify_memory(idx, tests[x].key, tests[x].keylen, in eax_test()
233 tests[x].nonce, tests[x].noncelen, tests[x].header, tests[x].headerlen, in eax_test()
234 outct, tests[x].msglen, outct, outtag, len, &res)) != CRYPT_OK) { in eax_test()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/set/
H A Dder_encode_setof.c21 unsigned long x; in s_qsort_helper() local
28 for (x = B->size; x < A->size; x++) { in s_qsort_helper()
29 if (A->start[x]) { in s_qsort_helper()
34 for (x = A->size; x < B->size; x++) { in s_qsort_helper()
35 if (B->start[x]) { in s_qsort_helper()
56 unsigned long x, y, z; in der_encode_setof() local
63 for (x = 1; x < inlen; x++) { in der_encode_setof()
64 if (list[x].type != list[x-1].type) { in der_encode_setof()
92 x = *ptr++; in der_encode_setof()
93 if (x >= 0x80) { in der_encode_setof()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/printable_string/
H A Dder_length_printable_string.c93 int x; in der_printable_char_encode() local
94 for (x = 0; x < (int)(sizeof(printable_table)/sizeof(printable_table[0])); x++) { in der_printable_char_encode()
95 if (printable_table[x].code == c) { in der_printable_char_encode()
96 return printable_table[x].value; in der_printable_char_encode()
104 int x; in der_printable_value_decode() local
105 for (x = 0; x < (int)(sizeof(printable_table)/sizeof(printable_table[0])); x++) { in der_printable_value_decode()
106 if (printable_table[x].value == v) { in der_printable_value_decode()
107 return printable_table[x].code; in der_printable_value_decode()
122 unsigned long x; in der_length_printable_string() local
129 for (x = 0; x < noctets; x++) { in der_length_printable_string()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/teletex_string/
H A Dder_length_teletex_string.c137 int x; in der_teletex_char_encode() local
138 for (x = 0; x < (int)(sizeof(teletex_table)/sizeof(teletex_table[0])); x++) { in der_teletex_char_encode()
139 if (teletex_table[x].code == c) { in der_teletex_char_encode()
140 return teletex_table[x].value; in der_teletex_char_encode()
148 int x; in der_teletex_value_decode() local
149 for (x = 0; x < (int)(sizeof(teletex_table)/sizeof(teletex_table[0])); x++) { in der_teletex_value_decode()
150 if (teletex_table[x].value == v) { in der_teletex_value_decode()
151 return teletex_table[x].code; in der_teletex_value_decode()
166 unsigned long x; in der_length_teletex_string() local
173 for (x = 0; x < noctets; x++) { in der_length_teletex_string()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/ia5/
H A Dder_length_ia5_string.c121 int x; in der_ia5_char_encode() local
122 for (x = 0; x < (int)(sizeof(ia5_table)/sizeof(ia5_table[0])); x++) { in der_ia5_char_encode()
123 if (ia5_table[x].code == c) { in der_ia5_char_encode()
124 return ia5_table[x].value; in der_ia5_char_encode()
132 int x; in der_ia5_value_decode() local
133 for (x = 0; x < (int)(sizeof(ia5_table)/sizeof(ia5_table[0])); x++) { in der_ia5_value_decode()
134 if (ia5_table[x].value == v) { in der_ia5_value_decode()
135 return ia5_table[x].code; in der_ia5_value_decode()
150 unsigned long x; in der_length_ia5_string() local
157 for (x = 0; x < noctets; x++) { in der_length_ia5_string()
[all …]
/optee_os/core/lib/libtomcrypt/src/stream/salsa20/
H A Dxsalsa20_setup.c18 x[b] ^= (ROL((x[a] + x[d]), 7)); \
19 x[c] ^= (ROL((x[b] + x[a]), 9)); \
20 x[d] ^= (ROL((x[c] + x[b]), 13)); \
21 x[a] ^= (ROL((x[d] + x[c]), 18));
24 static void s_xsalsa20_doubleround(ulong32 *x, int rounds) in s_xsalsa20_doubleround() argument
59 ulong32 x[64]; /* input to & output fm doubleround */ in xsalsa20_setup() local
72 LOAD32L(x[ 0], constants + 0); in xsalsa20_setup()
73 LOAD32L(x[ 5], constants + 4); in xsalsa20_setup()
74 LOAD32L(x[10], constants + 8); in xsalsa20_setup()
75 LOAD32L(x[15], constants + 12); in xsalsa20_setup()
[all …]
/optee_os/core/include/drivers/
H A Dls_dspi.h16 #define DSPI_CTAR_FMSZ(x) (((x) & 0x0F) << 27) /* Frame Size [1-4] */ argument
20 #define DSPI_CTAR_PCS_SCK(x) (((x) & 0x03) << 22) /* PCSSCK [8-9] */ argument
21 #define DSPI_CTAR_PA_SCK(x) (((x) & 0x03) << 20) /* PASC [10-11] */ argument
22 #define DSPI_CTAR_P_DT(x) (((x) & 0x03) << 18) /* PDT [12-13] */ argument
23 #define DSPI_CTAR_BRP(x) \ argument
24 (((x) & 0x03) << 16) /* Baud Rate Prescaler [14-15] */
25 #define DSPI_CTAR_CS_SCK(x) (((x) & 0x0F) << 12) /* CSSCK [16-19] */ argument
26 #define DSPI_CTAR_A_SCK(x) (((x) & 0x0F) << 8) /* ASC [20-23] */ argument
27 #define DSPI_CTAR_A_DT(x) (((x) & 0x0F) << 4) /* DT [24-27] */ argument
28 #define DSPI_CTAR_BR(x) ((x) & 0x0F) /* Baud Rate Scaler [28-31] */ argument
/optee_os/core/include/dt-bindings/firewall/
H A Dstm32mp25-rif.h65 #define RIF_EXTI1_RESOURCE(x) (x) argument
67 #define RIF_EXTI2_RESOURCE(x) (x) argument
69 #define RIF_FMC_CTRL(x) (x) argument
71 #define RIF_IOPORT_PIN(x) (x) argument
73 #define RIF_HPDMA_CHANNEL(x) (x) argument
75 #define RIF_IPCC_CPU1_CHANNEL(x) ((x) - 1) argument
77 #define RIF_IPCC_CPU2_CHANNEL(x) (((x) - 1) + 16) argument
79 #define RIF_PWR_RESOURCE(x) (x) argument
81 #define RIF_HSEM_RESOURCE(x) (x) argument
84 #define RIF_PWR_RESOURCE_WIO(x) ((x) + 6) argument
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/sequence/
H A Dder_length_sequence.c30 unsigned long size, x, y, i; in der_length_sequence_ex() local
52 if ((err = der_length_boolean(&x)) != CRYPT_OK) { in der_length_sequence_ex()
55 y += x; in der_length_sequence_ex()
59 if ((err = der_length_integer(data, &x)) != CRYPT_OK) { in der_length_sequence_ex()
62 y += x; in der_length_sequence_ex()
66 if ((err = der_length_short_integer(*((unsigned long *)data), &x)) != CRYPT_OK) { in der_length_sequence_ex()
69 y += x; in der_length_sequence_ex()
74 if ((err = der_length_bit_string(size, &x)) != CRYPT_OK) { in der_length_sequence_ex()
77 y += x; in der_length_sequence_ex()
81 if ((err = der_length_octet_string(size, &x)) != CRYPT_OK) { in der_length_sequence_ex()
[all …]
/optee_os/lib/libmbedtls/mbedtls/library/
H A Dalignment.h87 uint16_t x; member
90 uint32_t x; member
93 uint64_t x; member
123 r = p16->x; in mbedtls_get_unaligned_uint16()
142 static inline void mbedtls_put_unaligned_uint16(void *p, uint16_t x) in mbedtls_put_unaligned_uint16() argument
146 *p16 = x; in mbedtls_put_unaligned_uint16()
149 p16->x = x; in mbedtls_put_unaligned_uint16()
151 memcpy(p, &x, sizeof(x)); in mbedtls_put_unaligned_uint16()
175 r = p32->x; in mbedtls_get_unaligned_uint32()
194 static inline void mbedtls_put_unaligned_uint32(void *p, uint32_t x) in mbedtls_put_unaligned_uint32() argument
[all …]
/optee_os/core/lib/libtomcrypt/src/stream/rc4/
H A Drc4_stream.c18 int x, y; in rc4_stream_setup() local
26 for (x = 0; x < 256; x++) { in rc4_stream_setup()
27 s[x] = x; in rc4_stream_setup()
30 for (j = x = y = 0; x < 256; x++) { in rc4_stream_setup()
31 y = (y + s[x] + key[j++]) & 255; in rc4_stream_setup()
35 tmp = s[x]; s[x] = s[y]; s[y] = tmp; in rc4_stream_setup()
37 st->x = 0; in rc4_stream_setup()
53 unsigned char x, y, *s, tmp; in rc4_stream_crypt() local
59 x = st->x; in rc4_stream_crypt()
63 x = (x + 1) & 255; in rc4_stream_crypt()
[all …]
/optee_os/core/lib/libtomcrypt/src/encauth/gcm/
H A Dgcm_test.c320 unsigned long x, y; in gcm_test()
341 for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { in gcm_test()
343 if ((err = gcm_memory(idx, tests[x].K, tests[x].keylen, in gcm_test()
344 tests[x].IV, tests[x].IVlen, in gcm_test()
345 tests[x].A, tests[x].alen, in gcm_test()
346 (unsigned char*)tests[x].P, tests[x].ptlen, in gcm_test()
351 if (compare_testvector(out[0], tests[x].ptlen, tests[x].C, tests[x].ptlen, "GCM CT", x)) { in gcm_test()
355 if (compare_testvector(T[0], y, tests[x].T, 16, "GCM Encrypt Tag", x)) { in gcm_test()
360 XMEMCPY(T[1], tests[x].T, 16); in gcm_test()
361 if ((err = gcm_memory(idx, tests[x].K, tests[x].keylen, in gcm_test()
[all …]
/optee_os/core/lib/libtomcrypt/src/encauth/ocb3/
H A Docb3_test.c199 int err, x, idx, res; in ocb3_test()
212 for (x = 0; x < (int)(sizeof(tests)/sizeof(tests[0])); x++) { in ocb3_test()
217 … tests[x].aadlen != 0 ? tests[x].aad : NULL, tests[x].aadlen, in ocb3_test()
218 … tests[x].ptlen != 0 ? tests[x].pt : NULL, tests[x].ptlen, in ocb3_test()
219 … tests[x].ptlen != 0 ? outct : NULL, outtag, &len)) != CRYPT_OK) { in ocb3_test()
223 if (compare_testvector(outtag, len, tests[x].tag, sizeof(tests[x].tag), "OCB3 Tag", x) || in ocb3_test()
224 … compare_testvector(outct, tests[x].ptlen, tests[x].ct, tests[x].ptlen, "OCB3 CT", x)) { in ocb3_test()
231 … tests[x].aadlen != 0 ? tests[x].aad : NULL, tests[x].aadlen, in ocb3_test()
232 tests[x].ptlen != 0 ? outct : NULL, tests[x].ptlen, in ocb3_test()
233 … tests[x].ptlen != 0 ? outct : NULL, tests[x].tag, len, &res)) != CRYPT_OK) { in ocb3_test()
[all …]

12345678910>>...17