| /openthread-latest/third_party/mbedtls/repo/3rdparty/everest/include/everest/kremlin/ |
| D | c_endianness.h | 21 # define htole64(x) OSSwapHostToLittleInt64(x) argument 22 # define le64toh(x) OSSwapLittleToHostInt64(x) argument 23 # define htobe64(x) OSSwapHostToBigInt64(x) argument 24 # define be64toh(x) OSSwapBigToHostInt64(x) argument 26 # define htole16(x) OSSwapHostToLittleInt16(x) argument 27 # define le16toh(x) OSSwapLittleToHostInt16(x) argument 28 # define htobe16(x) OSSwapHostToBigInt16(x) argument 29 # define be16toh(x) OSSwapBigToHostInt16(x) argument 31 # define htole32(x) OSSwapHostToLittleInt32(x) argument 32 # define le32toh(x) OSSwapLittleToHostInt32(x) argument [all …]
|
| /openthread-latest/third_party/mbedtls/repo/library/ |
| D | alignment.h | 87 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 …]
|
| D | constant_time_impl.h | 100 static inline mbedtls_ct_uint_t mbedtls_ct_compiler_opaque(mbedtls_ct_uint_t x) in mbedtls_ct_compiler_opaque() argument 103 asm volatile ("" : [x] "+r" (x) :); in mbedtls_ct_compiler_opaque() 104 return x; in mbedtls_ct_compiler_opaque() 106 return x ^ mbedtls_ct_zero; in mbedtls_ct_compiler_opaque() 135 static inline mbedtls_ct_condition_t mbedtls_ct_bool(mbedtls_ct_uint_t x) in mbedtls_ct_bool() argument 152 [x] "+&r" (x) in mbedtls_ct_bool() 156 return (mbedtls_ct_condition_t) x; in mbedtls_ct_bool() 166 [x] "+&l" (x) in mbedtls_ct_bool() 171 return (mbedtls_ct_condition_t) x; in mbedtls_ct_bool() 181 [x] "D" (x) in mbedtls_ct_bool() [all …]
|
| D | common.h | 199 uint8x16_t x = veorq_u8(v1, v2); in mbedtls_xor() local 200 vst1q_u8(r + i, x); in mbedtls_xor() 214 uint64_t x = mbedtls_get_unaligned_uint64(a + i) ^ mbedtls_get_unaligned_uint64(b + i); in mbedtls_xor() local 215 mbedtls_put_unaligned_uint64(r + i, x); in mbedtls_xor() 224 uint32_t x = mbedtls_get_unaligned_uint32(a + i) ^ mbedtls_get_unaligned_uint32(b + i); in mbedtls_xor() local 225 mbedtls_put_unaligned_uint32(r + i, x); in mbedtls_xor() 278 uint64_t x = mbedtls_get_unaligned_uint64(a + i) ^ mbedtls_get_unaligned_uint64(b + i); in mbedtls_xor_no_simd() local 279 mbedtls_put_unaligned_uint64(r + i, x); in mbedtls_xor_no_simd() 292 uint32_t x = mbedtls_get_unaligned_uint32(a + i) ^ mbedtls_get_unaligned_uint32(b + i); in mbedtls_xor_no_simd() local 293 mbedtls_put_unaligned_uint32(r + i, x); in mbedtls_xor_no_simd() [all …]
|
| D | constant_time_internal.h | 99 static inline mbedtls_ct_condition_t mbedtls_ct_bool(mbedtls_ct_uint_t x); 112 static inline mbedtls_ct_condition_t mbedtls_ct_uint_ne(mbedtls_ct_uint_t x, mbedtls_ct_uint_t y); 125 static inline mbedtls_ct_condition_t mbedtls_ct_uint_eq(mbedtls_ct_uint_t x, 139 static inline mbedtls_ct_condition_t mbedtls_ct_uint_lt(mbedtls_ct_uint_t x, mbedtls_ct_uint_t y); 152 static inline mbedtls_ct_condition_t mbedtls_ct_uint_gt(mbedtls_ct_uint_t x, 167 static inline mbedtls_ct_condition_t mbedtls_ct_uint_ge(mbedtls_ct_uint_t x, 182 static inline mbedtls_ct_condition_t mbedtls_ct_uint_le(mbedtls_ct_uint_t x, 200 static inline mbedtls_ct_condition_t mbedtls_ct_bool_ne(mbedtls_ct_condition_t x, 215 static inline mbedtls_ct_condition_t mbedtls_ct_bool_and(mbedtls_ct_condition_t x, 230 static inline mbedtls_ct_condition_t mbedtls_ct_bool_or(mbedtls_ct_condition_t x, [all …]
|
| /openthread-latest/tests/scripts/thread-cert/pktverify/ |
| D | bytes.py | 90 return bytearray(int(x, 16) for x in s.split(':')) 101 return bytearray(int(x[i:i + 2], 16) for x in s.split(':') for i in (0, 2)) 112 x = super().__getitem__(item) 113 if isinstance(x, bytearray): 114 return Bytes(x) 116 return x 134 x = Bytes(b"\x01\x02\x03\x04") variable 135 … assert eval(repr(x)) == x, repr(x) # representation of Bytes should be able to be evaluated back 136 assert x == str(x), (x, str(x)) 138 assert x.format_compact() == "01020304", x.format_compact() [all …]
|
| /openthread-latest/third_party/mbedtls/repo/3rdparty/everest/library/kremlib/ |
| D | FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c | 15 uint64_t x = a ^ b; in FStar_UInt64_eq_mask() local 16 uint64_t minus_x = ~x + (uint64_t)1U; in FStar_UInt64_eq_mask() 17 uint64_t x_or_minus_x = x | minus_x; in FStar_UInt64_eq_mask() 24 uint64_t x = a; in FStar_UInt64_gte_mask() local 26 uint64_t x_xor_y = x ^ y; in FStar_UInt64_gte_mask() 27 uint64_t x_sub_y = x - y; in FStar_UInt64_gte_mask() 30 uint64_t x_xor_q = x ^ q; in FStar_UInt64_gte_mask() 37 uint32_t x = a ^ b; in FStar_UInt32_eq_mask() local 38 uint32_t minus_x = ~x + (uint32_t)1U; in FStar_UInt32_eq_mask() 39 uint32_t x_or_minus_x = x | minus_x; in FStar_UInt32_eq_mask() [all …]
|
| /openthread-latest/third_party/mbedtls/repo/3rdparty/p256-m/p256-m/ |
| D | p256-m.c | 69 static void u256_set32(uint32_t z[8], uint32_t x) in u256_set32() argument 71 z[0] = x; in u256_set32() 88 const uint32_t x[8], const uint32_t y[8]) in u256_add() 93 uint64_t sum = (uint64_t) carry + x[i] + y[i]; in u256_add() 112 const uint32_t x[8], const uint32_t y[8]) in u256_sub() 117 uint64_t diff = (uint64_t) x[i] - y[i] - carry; in u256_sub() 134 static void u256_cmov(uint32_t z[8], const uint32_t x[8], uint32_t c) in u256_cmov() 138 z[i] = (z[i] & ~x_mask) | (x[i] & x_mask); in u256_cmov() 149 static uint32_t u256_diff(const uint32_t x[8], const uint32_t y[8]) in u256_diff() 153 diff |= x[i] ^ y[i]; in u256_diff() [all …]
|
| /openthread-latest/tests/scripts/thread-cert/ |
| D | test_dnssd.py | 131 'srv_ttl': lambda x: x > 0, 132 'txt_ttl': lambda x: x > 0, 133 'aaaa_ttl': lambda x: x > 0, 143 'srv_ttl': lambda x: x > 0, 144 'txt_ttl': lambda x: x > 0, 145 'aaaa_ttl': lambda x: x > 0, 155 'srv_ttl': lambda x: x > 0, 156 'txt_ttl': lambda x: x > 0, 157 'aaaa_ttl': lambda x: x > 0, 167 'srv_ttl': lambda x: x > 0, [all …]
|
| /openthread-latest/third_party/mbedtls/repo/tests/suites/ |
| D | test_suite_lmots.function | 42 key_id->x, leaf_id, seed->x, seed->len), 0); 45 msg->x, msg->len, sig, sizeof(sig), NULL), 0); 46 TEST_EQUAL(mbedtls_lmots_verify(&pub_ctx, msg->x, msg->len, sig, sizeof(sig)), 0); 65 key_id->x, leaf_id, seed->x, seed->len), 0); 87 TEST_EQUAL(mbedtls_lmots_import_public_key(&ctx, pub_key->x, pub_key->len), 0); 89 TEST_EQUAL(mbedtls_lmots_verify(&ctx, msg->x, msg->len, sig->x, sig->len), expected_rc); 95 msg->x[0] ^= 1; 96 TEST_EQUAL(mbedtls_lmots_verify(&ctx, msg->x, msg->len, sig->x, sig->len), 98 msg->x[0] ^= 1; 101 msg->x[msg->len - 1] ^= 1; [all …]
|
| D | test_suite_des.function | 13 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); 30 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, 8, dst->len) == 0); 47 TEST_ASSERT(mbedtls_des_setkey_dec(&ctx, key_str->x) == 0); 48 TEST_ASSERT(mbedtls_des_crypt_ecb(&ctx, src_str->x, output) == 0); 50 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, 8, dst->len) == 0); 68 TEST_ASSERT(mbedtls_des_setkey_enc(&ctx, key_str->x) == 0); 69 TEST_ASSERT(mbedtls_des_crypt_cbc(&ctx, MBEDTLS_DES_ENCRYPT, src_str->len, iv_str->x, 70 src_str->x, output) == cbc_result); [all …]
|
| D | test_suite_lms.function | 27 seed->x, seed->len), 0); 32 msg->x, msg->len, sig, sizeof(sig), 35 TEST_EQUAL(mbedtls_lms_verify(&pub_ctx, msg->x, msg->len, sig, 60 seed->x, seed->len), 0); 87 TEST_EQUAL(mbedtls_lms_import_public_key(&ctx, pub_key->x, pub_key->len), 0); 89 TEST_EQUAL(mbedtls_lms_verify(&ctx, msg->x, msg->len, sig->x, sig->len), expected_rc); 95 msg->x[0] ^= 1; 96 TEST_EQUAL(mbedtls_lms_verify(&ctx, msg->x, msg->len, sig->x, sig->len), 98 msg->x[0] ^= 1; 101 msg->x[msg->len - 1] ^= 1; [all …]
|
| D | test_suite_poly1305.function | 22 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); 35 TEST_ASSERT(mbedtls_poly1305_update(&ctx, src_str->x, src_str->len) == 0); 40 expected_mac->x, expected_mac->len); 49 TEST_ASSERT(mbedtls_poly1305_starts(&ctx, key->x) == 0); 51 TEST_ASSERT(mbedtls_poly1305_update(&ctx, src_str->x, 1) == 0); 52 TEST_ASSERT(mbedtls_poly1305_update(&ctx, src_str->x + 1, src_str->len - 1) == 0); 57 expected_mac->x, expected_mac->len); 64 TEST_ASSERT(mbedtls_poly1305_starts(&ctx, key->x) == 0); [all …]
|
| D | test_suite_bignum_mod.function | 240 mbedtls_mpi_mod_residue x = { NULL, 0 }; 264 x.p = X_raw; 265 x.limbs = limbs + 1; 267 mbedtls_mpi_mod_sub(&x, &a, &b, &m)); 276 x.p = X_raw; 277 x.limbs = limbs - 1; 279 mbedtls_mpi_mod_sub(&x, &a, &b, &m)); 291 TEST_EQUAL(0, mbedtls_mpi_mod_residue_setup(&x, &m, X_raw, limbs)); 294 TEST_EQUAL(expected_ret, mbedtls_mpi_mod_sub(&x, &a, &b, &m)); 299 TEST_COMPARE_MPI_RESIDUES(x, d); [all …]
|
| D | test_suite_pkcs1_v21.function | 24 info.buf = rnd_buf->x; 36 TEST_ASSERT(mbedtls_mpi_read_binary(&N, input_N->x, input_N->len) == 0); 37 TEST_ASSERT(mbedtls_mpi_read_binary(&E, input_E->x, input_E->len) == 0); 43 message_str->x = NULL; 48 message_str->x, 51 TEST_MEMORY_COMPARE(output, ctx.len, result_str->x, result_str->len); 89 TEST_ASSERT(mbedtls_mpi_read_binary(&P, input_P->x, input_P->len) == 0); 90 TEST_ASSERT(mbedtls_mpi_read_binary(&Q, input_Q->x, input_Q->len) == 0); 91 TEST_ASSERT(mbedtls_mpi_read_binary(&N, input_N->x, input_N->len) == 0); 92 TEST_ASSERT(mbedtls_mpi_read_binary(&E, input_E->x, input_E->len) == 0); [all …]
|
| D | test_suite_camellia.function | 57 TEST_ASSERT(mbedtls_camellia_setkey_enc(&ctx, key_str->x, key_str->len * 8) == setkey_result); 59 TEST_ASSERT(mbedtls_camellia_crypt_ecb(&ctx, MBEDTLS_CAMELLIA_ENCRYPT, src_str->x, 62 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, 16, dst->len) == 0); 81 TEST_ASSERT(mbedtls_camellia_setkey_dec(&ctx, key_str->x, key_str->len * 8) == setkey_result); 83 TEST_ASSERT(mbedtls_camellia_crypt_ecb(&ctx, MBEDTLS_CAMELLIA_DECRYPT, src_str->x, 86 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, 16, dst->len) == 0); 105 mbedtls_camellia_setkey_enc(&ctx, key_str->x, key_str->len * 8); 106 TEST_ASSERT(mbedtls_camellia_crypt_cbc(&ctx, MBEDTLS_CAMELLIA_ENCRYPT, src_str->len, iv_str->x, 107 src_str->x, output) == cbc_result); 110 TEST_ASSERT(mbedtls_test_hexcmp(output, dst->x, src_str->len, [all …]
|
| D | test_suite_aria.function | 74 TEST_ASSERT(mbedtls_aria_setkey_enc(&ctx, key_str->x, key_str->len * 8) 78 TEST_ASSERT(mbedtls_aria_crypt_ecb(&ctx, src_str->x + i, 83 expected_output->x, expected_output->len); 102 TEST_ASSERT(mbedtls_aria_setkey_dec(&ctx, key_str->x, key_str->len * 8) 106 TEST_ASSERT(mbedtls_aria_crypt_ecb(&ctx, src_str->x + i, 111 expected_output->x, expected_output->len); 130 mbedtls_aria_setkey_enc(&ctx, key_str->x, key_str->len * 8); 132 src_str->len, iv_str->x, src_str->x, 136 expected_output->x, expected_output->len); 155 mbedtls_aria_setkey_dec(&ctx, key_str->x, key_str->len * 8); [all …]
|
| D | test_suite_ccm.function | 27 TEST_EQUAL(0, mbedtls_ccm_starts(ctx, mode, iv->x, iv->len)); 29 TEST_EQUAL(0, mbedtls_ccm_update_ad(ctx, add->x, n1_add)); 30 TEST_EQUAL(0, mbedtls_ccm_update_ad(ctx, add->x + n1_add, n2_add)); 37 TEST_EQUAL(0, mbedtls_ccm_update(ctx, input->x, n1, output, n1, &olen)); 39 TEST_MEMORY_COMPARE(output, olen, expected_output->x, n1); 45 TEST_EQUAL(0, mbedtls_ccm_update(ctx, input->x + n1, n2, output, n2, &olen)); 47 TEST_MEMORY_COMPARE(output, olen, expected_output->x + n1, n2); 53 TEST_MEMORY_COMPARE(output, tag->len, tag->x, tag->len); 198 const uint8_t *expected_tag = result->x + msg->len; 203 memcpy(io_msg_buf, msg->x, msg->len); [all …]
|
| D | test_suite_pkcs5.function | 18 TEST_ASSERT(mbedtls_pkcs5_pbkdf2_hmac_ext(hash, pw_str->x, pw_str->len, 19 salt_str->x, salt_str->len, 22 TEST_ASSERT(mbedtls_test_hexcmp(key, result_key_string->x, 44 params.p = params_hex->x; 52 pw->x, pw->len, data->x, data->len, my_out); 57 ref_out->x, ref_out->len); 63 pw->x, pw->len, data->x, data->len, my_out, 68 ref_out->x, ref_out->len); 93 params.p = params_hex->x; 101 pw->x, pw->len, data->x, data->len, my_out); [all …]
|
| D | test_suite_alignment.function | 37 uint8_t *x = (uint8_t *) raw; 39 x[i] = (uint8_t) i; 47 r = mbedtls_get_unaligned_uint16(x + offset); 50 r = mbedtls_get_unaligned_uint32(x + offset); 53 r = mbedtls_get_unaligned_uint64(x + offset); 81 x[i + offset] = 0xff; 89 mbedtls_put_unaligned_uint16(x + offset, r); 92 mbedtls_put_unaligned_uint32(x + offset, r); 95 mbedtls_put_unaligned_uint64(x + offset, r); 98 for (size_t i = 0; i < sizeof(x); i++) { [all …]
|
| D | test_suite_bignum_core.misc.data | 161 mbedtls_mpi_core_lt_ct: x=y (1 limb) 164 mbedtls_mpi_core_lt_ct: x>y (1 limb) 167 mbedtls_mpi_core_lt_ct: x<y (1 limb) 170 mbedtls_mpi_core_lt_ct: x>y (63 bit x, y first byte greater) 173 mbedtls_mpi_core_lt_ct: x<y (63 bit y, x first byte greater) 176 mbedtls_mpi_core_lt_ct: x>y (64 bit x, y=x-1) 179 mbedtls_mpi_core_lt_ct: x<y (64 bit y, x=y-1) 182 mbedtls_mpi_core_lt_ct: x>y (64 bit x, y=1) 185 mbedtls_mpi_core_lt_ct: x<y (64 bit y, x=1) 188 mbedtls_mpi_core_lt_ct: x>y (64 bit x, y=0) [all …]
|
| D | test_suite_pkcs12.function | 36 password = password_arg->x; 42 salt = salt_arg->x; 62 TEST_MEMORY_COMPARE(expected_output->x, expected_output->len, 91 pbe_params.p = params_hex->x; 96 md_alg, pw->x, pw->len, data->x, data->len, my_out); 101 ref_out->x, ref_out->len); 109 pbe_params.p = params_hex->x; 112 md_alg, pw->x, pw->len, data->x, data->len, my_out, 117 ref_out->x, ref_out->len); 146 pbe_params.p = params_hex->x; [all …]
|
| D | test_suite_chacha20.function | 29 TEST_ASSERT(mbedtls_chacha20_crypt(key_str->x, nonce_str->x, counter, src_str->len, src_str->x, 33 expected_output_str->x, expected_output_str->len); 40 TEST_ASSERT(mbedtls_chacha20_setkey(&ctx, key_str->x) == 0); 42 TEST_ASSERT(mbedtls_chacha20_starts(&ctx, nonce_str->x, counter) == 0); 45 TEST_ASSERT(mbedtls_chacha20_update(&ctx, src_str->len, src_str->x, output) == 0); 48 expected_output_str->x, expected_output_str->len); 56 TEST_ASSERT(mbedtls_chacha20_starts(&ctx, nonce_str->x, counter) == 0); 59 TEST_ASSERT(mbedtls_chacha20_update(&ctx, 1, src_str->x, output) == 0); 61 src_str->x + 1, output + 1) == 0); 64 expected_output_str->x, expected_output_str->len);
|
| D | test_suite_ecdsa.function | 101 rnd_info.buf = rnd_buf->x; 104 /* Fix rnd_buf->x by shifting it left if necessary */ 110 rnd_buf->x[i] = rnd_buf->x[i] << shift | rnd_buf->x[i+1] >> (8 - shift); 113 rnd_buf->x[rnd_info.length-1] <<= shift; 116 TEST_ASSERT(mbedtls_ecdsa_sign(&grp, &r, &s, &d, hash->x, hash->len, 125 TEST_EQUAL(mbedtls_ecdsa_verify(&grp, hash->x, hash->len, 129 TEST_EQUAL(mbedtls_ecdsa_verify(&grp, hash->x, hash->len, 136 TEST_EQUAL(mbedtls_ecdsa_verify(&grp, hash->x, hash->len, &Q, 138 TEST_EQUAL(mbedtls_ecdsa_verify(&grp, hash->x, hash->len, &Q, 140 TEST_EQUAL(mbedtls_ecdsa_verify(&grp, hash->x, hash->len, &Q, [all …]
|
| /openthread-latest/third_party/mbedtls/repo/programs/ |
| D | demo_common.sh | 52 for x in "$@"; do 53 echo "# $x" 86 for x in "$@"; do 87 "$programs_dir/test/query_compile_time_config" "$x" 95 for x in "$@"; do 96 if ! config_has "$x"; then 97 m="$m $x"
|