Home
last modified time | relevance | path

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

12345

/mbedtls-development/3rdparty/everest/include/everest/kremlin/
A Dc_endianness.h65 # define htole16(x) (x) argument
67 # define le16toh(x) (x) argument
70 # define htole32(x) (x) argument
72 # define le32toh(x) (x) argument
75 # define htole64(x) (x) argument
77 # define le64toh(x) (x) argument
84 # define htole16(x) (x) argument
86 # define le16toh(x) (x) argument
89 # define htole32(x) (x) argument
91 # define le32toh(x) (x) argument
[all …]
/mbedtls-development/3rdparty/everest/library/kremlib/
A DFStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c15 uint64_t x = a ^ b; in FStar_UInt64_eq_mask() local
24 uint64_t x = a; in FStar_UInt64_gte_mask() local
37 uint32_t x = a ^ b; in FStar_UInt32_eq_mask() local
46 uint32_t x = a; in FStar_UInt32_gte_mask() local
59 uint16_t x = a ^ b; in FStar_UInt16_eq_mask() local
68 uint16_t x = a; in FStar_UInt16_gte_mask() local
81 uint8_t x = a ^ b; in FStar_UInt8_eq_mask() local
90 uint8_t x = a; in FStar_UInt8_gte_mask() local
92 uint8_t x_xor_y = x ^ y; in FStar_UInt8_gte_mask()
93 uint8_t x_sub_y = x - y; in FStar_UInt8_gte_mask()
[all …]
/mbedtls-development/tests/suites/
A Dtest_suite_des.function13 TEST_ASSERT( mbedtls_des_key_check_weak( key->x ) == ret );
27 TEST_ASSERT( mbedtls_des_setkey_enc( &ctx, key_str->x ) == 0 );
28 TEST_ASSERT( mbedtls_des_crypt_ecb( &ctx, src_str->x, output ) == 0 );
47 TEST_ASSERT( mbedtls_des_setkey_dec( &ctx, key_str->x ) == 0 );
68 TEST_ASSERT( mbedtls_des_setkey_enc( &ctx, key_str->x ) == 0 );
69 …edtls_des_crypt_cbc( &ctx, MBEDTLS_DES_ENCRYPT, src_str->len, iv_str->x, src_str->x, output ) == c…
94 TEST_ASSERT( mbedtls_des_setkey_dec( &ctx, key_str->x ) == 0 );
95 …edtls_des_crypt_cbc( &ctx, MBEDTLS_DES_DECRYPT, src_str->len, iv_str->x, src_str->x, output ) == c…
181 …dtls_des3_crypt_cbc( &ctx, MBEDTLS_DES_ENCRYPT, src_str->len, iv_str->x, src_str->x, output ) == c…
186 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x,
[all …]
A Dtest_suite_poly1305.function22 TEST_ASSERT( mbedtls_poly1305_mac( key->x, src_str->x,
26 expected_mac->x, expected_mac->len );
33 TEST_ASSERT( mbedtls_poly1305_starts( &ctx, key->x ) == 0 );
40 expected_mac->x, expected_mac->len );
50 TEST_ASSERT( mbedtls_poly1305_starts( &ctx, key->x ) == 0 );
52 TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str->x, 1 ) == 0 );
58 expected_mac->x, expected_mac->len );
66 TEST_ASSERT( mbedtls_poly1305_starts( &ctx, key->x ) == 0 );
68 TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str->x, 1 ) == 0 );
69 TEST_ASSERT( mbedtls_poly1305_update( &ctx, src_str->x + 1, 1 ) == 0 );
[all …]
A Dtest_suite_camellia.function105 mbedtls_camellia_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
106 …llia_crypt_cbc( &ctx, MBEDTLS_CAMELLIA_ENCRYPT, src_str->len, iv_str->x, src_str->x, output) == cb…
110 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, src_str->len,
131 mbedtls_camellia_setkey_dec( &ctx, key_str->x, key_str->len * 8 );
132 …llia_crypt_cbc( &ctx, MBEDTLS_CAMELLIA_DECRYPT, src_str->len, iv_str->x, src_str->x, output ) == c…
136 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, src_str->len,
157 mbedtls_camellia_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
158 …crypt_cfb128( &ctx, MBEDTLS_CAMELLIA_ENCRYPT, 16, &iv_offset, iv_str->x, src_str->x, output ) == 0…
160 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x, 16, dst->len ) == 0 );
180 mbedtls_camellia_setkey_enc( &ctx, key_str->x, key_str->len * 8 );
[all …]
A Dtest_suite_aria.function83 expected_output->x, expected_output->len );
134 src_str->len, iv_str->x, src_str->x,
160 src_str->len, iv_str->x, src_str->x,
188 iv_str->x, src_str->x, output )
192 expected_output->x, expected_output->len );
214 iv_str->x, src_str->x, output )
218 expected_output->x, expected_output->len );
240 iv_str->x, blk, src_str->x, output )
244 expected_output->x, expected_output->len );
266 iv_str->x, blk, src_str->x, output )
[all …]
A Dtest_suite_ccm.function193 memcpy( io_msg_buf, msg->x, msg->len );
201 TEST_EQUAL( mbedtls_ccm_encrypt_and_tag( &ctx, msg->len, iv->x, iv->len, add->x, add->len,
208 const data_t encrypted_expected = { .x = result->x,
210 …const data_t tag_expected = { .x = (uint8_t*) expected_tag, /* cast to conform with data_t x type …
280 TEST_EQUAL( mbedtls_ccm_auth_decrypt( &ctx, expected_msg_len, iv->x, iv->len, add->x, add->len,
288 const data_t encrypted = { .x = msg->x,
347 memcpy( io_msg_buf, msg->x, msg->len );
376 const data_t iv_data = { .x = iv,
379 const data_t encrypted_expected = { .x = expected_result->x,
453 const data_t iv_data = { .x = iv,
[all …]
A Dtest_suite_pkcs1_v21.function23 info.buf = rnd_buf->x;
32 TEST_ASSERT( mbedtls_mpi_read_binary( &N, input_N->x, input_N->len ) == 0 );
39 message_str->x = NULL;
43 message_str->x,
47 ASSERT_COMPARE( output, ctx.len, result_str->x, result_str->len );
94 &output_len, message_str->x,
134 info.buf = rnd_buf->x;
170 info.buf = rnd_buf->x;
180 ASSERT_COMPARE( output, ctx.len, result_str->x, result_str->len );
258 message_str->x, message_str->len,
[all …]
A Dtest_suite_gcm.function29 iv->x, iv->len ) );
40 ASSERT_COMPARE( output, olen, expected_output->x, n1 );
55 ASSERT_COMPARE( output, tag->len, tag->x, tag->len );
81 iv->x, iv->len ) );
102 ASSERT_COMPARE( output, tag->len, tag->x, tag->len );
133 ASSERT_COMPARE( output_tag, tag->len, tag->x, tag->len );
148 iv->x, iv->len ) );
152 ASSERT_COMPARE( output, tag->len, tag->x, tag->len );
183 … add_str->x, add_str->len, src_str->x, output, tag_len, tag_output ) == gcm_result );
213 … &ctx, MBEDTLS_GCM_ENCRYPT, src_str->len, iv_str->x, iv_str->len, add_str->x, add_str->len, src_st…
[all …]
A Dtest_suite_chacha20.function29 …TEST_ASSERT( mbedtls_chacha20_crypt( key_str->x, nonce_str->x, counter, src_str->len, src_str->x, …
32 expected_output_str->x, expected_output_str->len );
39 TEST_ASSERT( mbedtls_chacha20_setkey( &ctx, key_str->x ) == 0 );
41 TEST_ASSERT( mbedtls_chacha20_starts( &ctx, nonce_str->x, counter ) == 0 );
44 TEST_ASSERT( mbedtls_chacha20_update( &ctx, src_str->len, src_str->x, output ) == 0 );
47 expected_output_str->x, expected_output_str->len );
55 TEST_ASSERT( mbedtls_chacha20_starts( &ctx, nonce_str->x, counter ) == 0 );
58 TEST_ASSERT( mbedtls_chacha20_update( &ctx, 1, src_str->x, output ) == 0 );
60 src_str->x + 1, output + 1 ) == 0 );
63 expected_output_str->x, expected_output_str->len );
A Dtest_suite_aes.function71 …edtls_aes_crypt_cbc( &ctx, MBEDTLS_AES_ENCRYPT, src_str->len, iv_str->x, src_str->x, output ) == c…
75 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x,
96 …edtls_aes_crypt_cbc( &ctx, MBEDTLS_AES_DECRYPT, src_str->len, iv_str->x, src_str->x, output ) == c…
245 …_aes_crypt_cfb128( &ctx, MBEDTLS_AES_ENCRYPT, 16, &iv_offset, iv_str->x, src_str->x, output ) == 0…
267 …_aes_crypt_cfb128( &ctx, MBEDTLS_AES_DECRYPT, 16, &iv_offset, iv_str->x, src_str->x, output ) == 0…
288 …dtls_aes_crypt_cfb8( &ctx, MBEDTLS_AES_ENCRYPT, src_str->len, iv_str->x, src_str->x, output ) == 0…
290 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x,
310 …dtls_aes_crypt_cfb8( &ctx, MBEDTLS_AES_DECRYPT, src_str->len, iv_str->x, src_str->x, output ) == 0…
312 TEST_ASSERT( mbedtls_test_hexcmp( output, dst->x,
339 src_str_next = src_str->x;
[all …]
A Dtest_suite_psa_crypto_hash.function24 input->x, input->len ) );
28 ASSERT_COMPARE( expected_hash->x, expected_hash->len,
47 input->x,
50 expected_hash->x,
77 input->x, len ) );
80 input->x + len, input->len - len ) );
82 input->x + len, input->len - len ) );
87 ASSERT_COMPARE( expected_hash->x, expected_hash->len,
93 ASSERT_COMPARE( expected_hash->x, expected_hash->len,
A Dtest_suite_shax.function15 TEST_ASSERT( mbedtls_sha1( src_str->x, src_str->len, output ) == 0 );
17 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x, 20, hash->len ) == 0 );
50 TEST_ASSERT( mbedtls_sha256( src_str->x, src_str->len, output, 1 ) == 0 );
52 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x, 28, hash->len ) == 0 );
64 TEST_ASSERT( mbedtls_sha256( src_str->x, src_str->len, output, 0 ) == 0 );
66 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x, 32, hash->len ) == 0 );
99 TEST_ASSERT( mbedtls_sha512( src_str->x, src_str->len, output, 1 ) == 0 );
101 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x, 48, hash->len ) == 0 );
113 TEST_ASSERT( mbedtls_sha512( src_str->x, src_str->len, output, 0 ) == 0 );
115 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x, 64, hash->len ) == 0 );
A Dtest_suite_chachapoly.function23 TEST_ASSERT( mbedtls_chachapoly_setkey( &ctx, key_str->x ) == 0 );
26 input_str->len, nonce_str->x,
27 aad_str->x, aad_str->len,
28 input_str->x, output, mac ) == 0 );
30 TEST_ASSERT( memcmp( output_str->x, output, output_str->len ) == 0 );
31 TEST_ASSERT( memcmp( mac_str->x, mac, 16U ) == 0 );
51 TEST_ASSERT( mbedtls_chachapoly_setkey( &ctx, key_str->x ) == 0 );
54 input_str->len, nonce_str->x,
55 aad_str->x, aad_str->len,
56 mac_str->x, input_str->x, output );
[all …]
A Dtest_suite_psa_crypto_driver_wrappers.function35 key_input->x, key_input->len,
42 expected_output->x;
93 key_input->x, key_input->len,
103 key_input->x, key_input->len,
149 key_input->x, key_input->len,
156 expected_output->x;
270 fake_output->x;
385 fake_output->x;
393 expected_output_ptr = expected_output->x;
809 memcpy( input, iv->x, iv->len );
[all …]
A Dtest_suite_hmac_drbg.function190 p_entropy.p = entropy->x;
197 memcpy( data, entropy->x, p_entropy.len );
198 memcpy( data + p_entropy.len, custom->x, custom->len );
209 TEST_ASSERT( memcmp( my_output, output->x, output->len ) == 0 );
213 custom->x, custom->len ) == 0 );
218 TEST_ASSERT( memcmp( my_output, output->x, output->len ) == 0 );
237 p_entropy.p = entropy->x;
244 custom->x, custom->len ) == 0 );
251 TEST_ASSERT( memcmp( my_output, output->x, output->len ) == 0 );
269 p_entropy.p = entropy->x;
[all …]
A Dtest_suite_pkcs5.function24 … TEST_ASSERT( mbedtls_pkcs5_pbkdf2_hmac( &ctx, pw_str->x, pw_str->len, salt_str->x, salt_str->len,
27 TEST_ASSERT( mbedtls_test_hexcmp( key, result_key_string->x,
44 params.p = params_hex->x;
50 pw->x, pw->len, data->x, data->len, my_out );
54 TEST_ASSERT( memcmp( my_out, ref_out->x, ref_out->len ) == 0 );
A Dtest_suite_asn1parse.function318 unsigned char *p = input->x;
345 p = input->x;
352 p = input->x;
410 p = input->x;
427 p = input->x;
506 p = input->x;
554 unsigned char *p = input->x;
567 p = input->x;
594 unsigned char *p = input->x;
654 unsigned char *p = input->x;
[all …]
A Dtest_suite_cmac.function151 (const unsigned char*)key->x,
158 (unsigned char*)block1->x,
163 (unsigned char*)block2->x,
168 (unsigned char*)block3->x,
173 (unsigned char*)block4->x,
178 TEST_ASSERT( memcmp( output, expected_result->x, block_size ) == 0 );
231 (const unsigned char*)key->x,
240 (unsigned char*)block_a1->x,
245 (unsigned char*)block_a2->x,
255 TEST_ASSERT( memcmp( output, expected_result_a->x, block_size ) == 0 );
[all …]
A Dtest_suite_md.function148 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x,
171 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x,
213 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x,
222 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x,
262 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x,
271 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x,
298 …TEST_ASSERT ( mbedtls_md_hmac( md_info, key_str->x, key_str->len, src_str->x, src_str->len, output…
300 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x,
333 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x,
344 TEST_ASSERT( mbedtls_test_hexcmp( output, hash->x,
[all …]
/mbedtls-development/library/
A Dcommon.h76 #define MBEDTLS_BYTE_0( x ) ( (uint8_t) ( ( x ) & 0xff ) ) argument
77 #define MBEDTLS_BYTE_1( x ) ( (uint8_t) ( ( ( x ) >> 8 ) & 0xff ) ) argument
78 #define MBEDTLS_BYTE_2( x ) ( (uint8_t) ( ( ( x ) >> 16 ) & 0xff ) ) argument
79 #define MBEDTLS_BYTE_3( x ) ( (uint8_t) ( ( ( x ) >> 24 ) & 0xff ) ) argument
80 #define MBEDTLS_BYTE_4( x ) ( (uint8_t) ( ( ( x ) >> 32 ) & 0xff ) ) argument
81 #define MBEDTLS_BYTE_5( x ) ( (uint8_t) ( ( ( x ) >> 40 ) & 0xff ) ) argument
82 #define MBEDTLS_BYTE_6( x ) ( (uint8_t) ( ( ( x ) >> 48 ) & 0xff ) ) argument
83 #define MBEDTLS_BYTE_7( x ) ( (uint8_t) ( ( ( x ) >> 56 ) & 0xff ) ) argument
A Dsha512.c34 #define UL64(x) x##ui64 argument
36 #define UL64(x) x##ULL argument
205 #define SHR(x,n) ((x) >> (n)) in mbedtls_internal_sha512_process() argument
206 #define ROTR(x,n) (SHR((x),(n)) | ((x) << (64 - (n)))) in mbedtls_internal_sha512_process() argument
208 #define S0(x) (ROTR(x, 1) ^ ROTR(x, 8) ^ SHR(x, 7)) in mbedtls_internal_sha512_process() argument
209 #define S1(x) (ROTR(x,19) ^ ROTR(x,61) ^ SHR(x, 6)) in mbedtls_internal_sha512_process() argument
211 #define S2(x) (ROTR(x,28) ^ ROTR(x,34) ^ ROTR(x,39)) in mbedtls_internal_sha512_process() argument
212 #define S3(x) (ROTR(x,14) ^ ROTR(x,18) ^ ROTR(x,41)) in mbedtls_internal_sha512_process() argument
214 #define F0(x,y,z) (((x) & (y)) | ((z) & ((x) | (y)))) in mbedtls_internal_sha512_process() argument
215 #define F1(x,y,z) ((z) ^ ((x) & ((y) ^ (z)))) in mbedtls_internal_sha512_process() argument
[all …]
A Dsha256.c146 #define SHR(x,n) (((x) & 0xFFFFFFFF) >> (n)) argument
147 #define ROTR(x,n) (SHR(x,n) | ((x) << (32 - (n)))) argument
149 #define S0(x) (ROTR(x, 7) ^ ROTR(x,18) ^ SHR(x, 3)) argument
150 #define S1(x) (ROTR(x,17) ^ ROTR(x,19) ^ SHR(x,10)) argument
152 #define S2(x) (ROTR(x, 2) ^ ROTR(x,13) ^ ROTR(x,22)) argument
153 #define S3(x) (ROTR(x, 6) ^ ROTR(x,11) ^ ROTR(x,25)) argument
155 #define F0(x,y,z) (((x) & (y)) | ((z) & ((x) | (y)))) argument
156 #define F1(x,y,z) ((z) ^ ((x) & ((y) ^ (z)))) argument
164 #define P(a,b,c,d,e,f,g,h,x,K) \ argument
167 local.temp1 = (h) + S3(e) + F1((e),(f),(g)) + (K) + (x); \
A Daria.c93 #define ARIA_P1(x) ARIA_P2( ARIA_P3( x ) ) argument
97 #define ARIA_P1(x) ((((x) >> 8) & 0x00FF00FF) ^ (((x) & 0x00FF00FF) << 8)) argument
107 #define ARIA_P2(x) (((x) >> 16) ^ ((x) << 16)) argument
145 __asm( "bswap %0" : "=r" (x) : "0" (x) ); in aria_p3()
146 return( x ); in aria_p3()
152 #define ARIA_P3(x) ARIA_P2( ARIA_P1 ( x ) ) argument
356 r[0] = a ^ x[0]; in aria_fo_xor()
357 r[1] = b ^ x[1]; in aria_fo_xor()
358 r[2] = c ^ x[2]; in aria_fo_xor()
359 r[3] = d ^ x[3]; in aria_fo_xor()
[all …]
/mbedtls-development/scripts/
A Dfind-mem-leak.cocci2 expression x, y;
5 x = mbedtls_calloc(...);
8 * if (x == NULL || y == NULL)
12 expression x, y;
16 * (x = mbedtls_calloc(...)) == NULL

Completed in 48 milliseconds

12345