/openthread-latest/third_party/mbedtls/repo/tests/opt-testcases/ |
D | tls13-kex-modes.sh | 3 # tls13-kex-modes.sh 6 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 15 run_test "TLS 1.3: G->m: all/psk, good" \ 17 … "$G_NEXT_CLI -d 10 --priority NORMAL:-VERS-ALL:-KX-ALL:+ECDHE-PSK:+DHE-PSK:+PSK:+VERS-TLS1.3 \ 18 --pskusername Client_identity --pskkey=6162636465666768696a6b6c6d6e6f70 \ 21 -s "found psk key exchange modes extension" \ 22 -s "found pre_shared_key extension" \ 23 -s "Found PSK_EPHEMERAL KEX MODE" \ 24 -s "Found PSK KEX MODE" \ 25 -s "Pre shared key found" \ [all …]
|
D | tls13-misc.sh | 3 # tls13-misc.sh 6 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 16 run_test "TLS 1.3: PSK: No valid ciphersuite. G->m" \ 18 …"$G_NEXT_CLI -d 10 --priority NORMAL:-VERS-ALL:-CIPHER-ALL:+AES-256-GCM:+AEAD:+SHA384:-KX-ALL:+ECD… 19 --pskusername Client_identity --pskkey=6162636465666768696a6b6c6d6e6f70 \ 22 -s "found psk key exchange modes extension" \ 23 -s "found pre_shared_key extension" \ 24 -s "Found PSK_EPHEMERAL KEX MODE" \ 25 -s "Found PSK KEX MODE" \ 26 -s "No matched ciphersuite" [all …]
|
D | tls13-compat.sh | 3 # tls13-compat.sh 6 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 11 # `./tests/scripts/generate_tls13_compat_tests.py -a -o ./tests/opt-testcases/tls13-compat.sh`. 22 run_test "TLS 1.3 O->m: AES_128_GCM_SHA256,secp256r1,ecdsa_secp256r1_sha256" \ 23 …e=data_files/ecdsa_secp256r1.key debug_level=4 force_ciphersuite=TLS1-3-AES-128-GCM-SHA256 sig_alg… 24 …EXT_CLI_NO_CERT -CAfile data_files/test-ca2.crt -ciphersuites TLS_AES_128_GCM_SHA256 -sigalgs ecds… 26 -s "Protocol is TLSv1.3" \ 27 -s "server hello, chosen ciphersuite: TLS1-3-AES-128-GCM-SHA256 ( id=4865 )" \ 28 -s "received signature algorithm: 0x403" \ 29 -s "got named group: secp256r1(0017)" \ [all …]
|
/openthread-latest/third_party/mbedtls/repo/tests/ |
D | ssl-opt.sh | 3 # ssl-opt.sh 6 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 21 set -u 25 ulimit -f 20971520 38 : ${GNUTLS_CLI:=gnutls-cli} 39 : ${GNUTLS_SERV:=gnutls-serv} 54 if git diff --quiet ../include/mbedtls/mbedtls_config.h 2>/dev/null; then 62 : ${MBEDTLS_TEST_PLATFORM:="$(uname -s | tr -c \\n0-9A-Za-z _)-$(uname -m | tr -c \\n0-9A-Za-z _)"} 65 O_SRV="$OPENSSL s_server -www -cert data_files/server5.crt -key data_files/server5.key" 67 G_SRV="$GNUTLS_SERV --x509certfile data_files/server5.crt --x509keyfile data_files/server5.key" [all …]
|
/openthread-latest/third_party/mbedtls/repo/library/ |
D | sha3.c | 2 * FIPS-202 compliant SHA3 implementation 5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 8 * The SHA-3 Secure Hash Standard was published by NIST in 2015. 24 * these; the defaults here should give sensible trade-offs for gcc and clang on aarch64 and 25 * x86-64. 28 #define MBEDTLS_SHA3_THETA_UNROLL 0 //no-check-names 32 #define MBEDTLS_SHA3_CHI_UNROLL 0 //no-check-names 34 #define MBEDTLS_SHA3_CHI_UNROLL 1 //no-check-names 38 #define MBEDTLS_SHA3_PI_UNROLL 1 //no-check-names 41 #define MBEDTLS_SHA3_RHO_UNROLL 1 //no-check-names [all …]
|
D | constant_time_impl.h | 2 * Constant-time functions 5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 28 * This appears to behave as if the declaration-without-definition was not present 29 * (except for warnings if gcc -Wredundant-decls or similar is used). 31 * Disable -Wredundant-decls so that gcc does not warn about this. This is re-enabled 36 #pragma GCC diagnostic ignored "-Wredundant-decls" 41 * We also disable under Valgrind by default, because it's more useful 42 * for Valgrind to test the plain C implementation. MBEDTLS_TEST_CONSTANT_FLOW_ASM //no-check-names 46 …(MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND) && !defined(MBEDTLS_TEST_CONSTANT_FLOW_ASM)) //no-check-names 54 /* armcc5 --gnu defines __GNUC__ but doesn't support GNU's extended asm */ [all …]
|
D | bignum.c | 2 * Multi-precision integer library 5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 9 * The following sources were referenced in the design of this Multi-precision 12 * [1] Handbook of Applied Cryptography - 1997 15 * [2] Multi-Precision Math 19 * [3] GNU Multi-Precision Arithmetic Library 44 * (MPI sign is the field s in mbedtls_mpi. It is unsigned short and only 1 and -1 are valid 50 return (signed short) mbedtls_ct_uint_if(cond, sign1 + 1, sign2 + 1) - 1; in mbedtls_ct_mpi_sign_if() 62 if (X->n != Y->n) { in mbedtls_mpi_lt_mpi_ct() 68 * We know that N->s == 1 if N >= 0 and N->s == -1 if N < 0. in mbedtls_mpi_lt_mpi_ct() [all …]
|
D | ecdsa.c | 5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 11 * SEC1 https://www.secg.org/sec1-v2.pdf 35 * Sub-context for ecdsa_verify() 46 * Init verify restart sub-context 50 mbedtls_mpi_init(&ctx->u1); in ecdsa_restart_ver_init() 51 mbedtls_mpi_init(&ctx->u2); in ecdsa_restart_ver_init() 52 ctx->state = ecdsa_ver_init; in ecdsa_restart_ver_init() 56 * Free the components of a verify restart sub-context 64 mbedtls_mpi_free(&ctx->u1); in ecdsa_restart_ver_free() 65 mbedtls_mpi_free(&ctx->u2); in ecdsa_restart_ver_free() [all …]
|
D | x509_create.c | 5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 34 * MBEDTLS_ASN1_UTF8_STRING for UTF-8. */ 37 #define ADD_STRLEN(s) s, sizeof(s) - 1 argument 105 for (cur = x509_attrs; cur->name != NULL; cur++) { in x509_attr_descr_from_name() 106 if (cur->name_len == name_len && in x509_attr_descr_from_name() 107 strncmp(cur->name, name, name_len) == 0) { in x509_attr_descr_from_name() 112 if (cur->name == NULL) { in x509_attr_descr_from_name() 121 return ('0' <= c && c <= '9') ? (c - '0') : in hex_to_int() 122 ('a' <= c && c <= 'f') ? (c - 'a' + 10) : in hex_to_int() 123 ('A' <= c && c <= 'F') ? (c - 'A' + 10) : -1; in hex_to_int() [all …]
|
/openthread-latest/tests/scripts/thread-cert/border_router/ |
D | test_firewall.py | 46 # ----------------(eth)---------------------- 113 host.bash(f'ip -6 addr add {interface}/64 dev {host.ETH_DEV} scope global') 115 host.bash(f'ip -6 route del {route} dev {host.ETH_DEV}') 117 host.bash(f'ip -6 route add {dest} dev {host.ETH_DEV} via {gateway}') 121 host.bash(f'ip -6 route del {dest}') 123 host.bash(f'ip -6 addr del {interface}/64 dev {host.ETH_DEV} scope global') 127 # 1. Host pings router1's OMR from host's infra address. 130 # 2. Host pings router1's DUA from host's infra address. 133 # 3. Host pings router1's OMR from router1's RLOC. 139 # 4. Host pings router1's OMR from router2's OMR. [all …]
|
/openthread-latest/tools/harness-thci/ |
D | OpenThread_WpanCtl.py | 112 print('[%s] Expecting [%s]' % (self.port, expected)) 117 print('[%s] Got line [%s]' % (self.port, line)) 120 print('[%s] Expected [%s]' % (self.port, expected)) 124 retry_times -= 1 127 times -= 1 129 raise Exception('failed to find expected string[%s]' % expected) 132 logging.info('%s: reading', self.port) 139 logging.info('%s: writing', self.port) 151 logging.info('%s: reading line', self.port) 162 logging.exception('%s: No new data', self.port) [all …]
|
D | OpenThread_BR.py | 49 LOGX = re.compile(r'.*Under-voltage detected!') 52 assert LOGX.match('[57522.618196] Under-voltage detected! (0x00050005)') 54 OTBR_AGENT_SYSLOG_PATTERN = re.compile(r'raspberrypi otbr-agent\[\d+\]: (.*)') 56 …'Jun 23 05:21:22 raspberrypi otbr-agent[323]: =========[[THCI] direction=send | type=JOIN_FIN.req … 110 if i < retry - 1: 120 print('%s - %s - %s' % (self.port, time.strftime('%b %d %H:%M:%S'), msg)) 173 print('%s - %s - %s' % (self.port, time.strftime('%b %d %H:%M:%S'), msg)) 204 raise Exception('%s: failed to find end of response' % self.port) 216 print('[%s] Got line [%r]' % (self.port, line)) 224 print('[%s] Expected [%r]' % (self.port, expected)) [all …]
|
D | OpenThread.py | 70 # Replace by the actual version string for the vendor's reference device 88 LOGX = re.compile(r'((\[(-|C|W|N|I|D)\])' 89 … r'|(-+$)' # e.x. ------------------------------------------------------------------------ 95 assert LOGX.match('[-]') 101 assert LOGX.match('------------------------------------------------------------------------') 108 logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s") 119 callstr = '====' * _callStackDepth + "> %s%s%s" % (func_name, str(args) if args else "", 125 self.log("%s returns %r", callstr, ret) 128 self.log("FUNC %s failed: %s", func_name, str(ex)) 131 _callStackDepth -= 1 [all …]
|
/openthread-latest/tests/scripts/thread-cert/pktverify/ |
D | bytes.py | 36 def __init__(self, s: Union[str, bytearray, 'Bytes', Any]): 37 if isinstance(s, str): 39 s = Bytes._parse_compact(s) 42 s = Bytes._parse_octets(s) 44 s = Bytes._parse_hextets(s) 46 super().__init__(s) 52 return '%s(%r)' % (self.__class__.__name__, self.format_compact()) 54 def format_compact(self) -> str: 60 def format_octets(self) -> str: 66 def format_hextets(self) -> str: [all …]
|
/openthread-latest/third_party/mbedtls/repo/3rdparty/everest/library/kremlib/ |
D | FStar_UInt128_extracted.c | 5 …-fc89 -fparentheses -fno-shadow -header /mnt/e/everest/verify/hdrB9w -minimal -fparentheses -fcurl… 27 return (a ^ ((a ^ b) | ((a - b) ^ b))) >> (uint32_t)63U; in FStar_UInt128_constant_time_carry() 60 flat = { a.low - b.low, a.high - b.high - FStar_UInt128_carry(a.low, a.low - b.low) }; in FStar_UInt128_sub() 68 flat = { a.low - b.low, a.high - b.high - FStar_UInt128_carry(a.low, a.low - b.low) }; in FStar_UInt128_sub_underspec() 76 flat = { a.low - b.low, a.high - b.high - FStar_UInt128_carry(a.low, a.low - b.low) }; in FStar_UInt128_sub_mod_impl() 111 static uint64_t FStar_UInt128_add_u64_shift_left(uint64_t hi, uint64_t lo, uint32_t s) in FStar_UInt128_add_u64_shift_left() argument 113 return (hi << s) + (lo >> (FStar_UInt128_u32_64 - s)); in FStar_UInt128_add_u64_shift_left() 116 static uint64_t FStar_UInt128_add_u64_shift_left_respec(uint64_t hi, uint64_t lo, uint32_t s) in FStar_UInt128_add_u64_shift_left_respec() argument 118 return FStar_UInt128_add_u64_shift_left(hi, lo, s); in FStar_UInt128_add_u64_shift_left_respec() 122 FStar_UInt128_shift_left_small(FStar_UInt128_uint128 a, uint32_t s) in FStar_UInt128_shift_left_small() argument [all …]
|
/openthread-latest/third_party/mbedtls/repo/tests/suites/ |
D | test_suite_ecdsa.function | 15 mbedtls_mpi d, r, s; 21 mbedtls_mpi_init(&d); mbedtls_mpi_init(&r); mbedtls_mpi_init(&s); 30 TEST_ASSERT(mbedtls_ecdsa_sign(&grp, &r, &s, &d, buf, sizeof(buf), 33 TEST_ASSERT(mbedtls_ecdsa_verify(&grp, buf, sizeof(buf), &Q, &r, &s) == 0); 38 mbedtls_mpi_free(&d); mbedtls_mpi_free(&r); mbedtls_mpi_free(&s); 47 mbedtls_mpi d, r, s; 53 mbedtls_mpi_init(&d); mbedtls_mpi_init(&r); mbedtls_mpi_init(&s); 65 TEST_ASSERT(mbedtls_ecdsa_sign(&grp, &r, &s, &d, buf, sizeof(buf), 68 TEST_ASSERT(mbedtls_ecdsa_verify(&grp, buf, sizeof(buf), &Q, &r, &s) == 0); 73 mbedtls_mpi_free(&d); mbedtls_mpi_free(&r); mbedtls_mpi_free(&s); [all …]
|
D | test_suite_psa_crypto_util.data | 1 ECDSA Raw -> DER, 256bit, Success 5 ECDSA Raw -> DER, 256bit, DER buffer too small 9 ECDSA Raw -> DER, 256bit, Null r 13 ECDSA Raw -> DER, 256bit, Null s 17 ECDSA Raw -> DER, 256bit, r with MSb set 21 ECDSA Raw -> DER, 256bit, s with MSb set 25 ECDSA Raw -> DER, 256bit, both r and s with MSb set 29 ECDSA Raw -> DER, 256bit, r and s only 1 byte of data 33 ECDSA Raw -> DER, 256bit, r and s only 1 byte of data with MSb set 37 ECDSA Raw -> DER, 256bit, Invalid raw signature (r 1 byte shorter) [all …]
|
/openthread-latest/tests/scripts/thread-cert/ |
D | node.py | 82 … self._socat_proc = subprocess.Popen(['socat', '-d', '-d', 'pty,raw,echo=0', 'pty,raw,echo=0'], 103 # We expect ot-rcp not to quit in 1 second. 106 raise Exception(f"ot-rcp {nodeid} exited unexpectedly!") 108 def _get_ot_rcp_path(self) -> str: 110 path = '%s/examples/apps/ncp/ot-rcp' % srcdir 111 logging.info("ot-rcp path: %s", path) 116 subprocess.check_call(f"docker rm -f {self._docker_name} || true", shell=True) 118 dns = ['--dns=127.0.0.1'] if INFRA_DNS64 == 1 else ['--dns=8.8.8.8'] 119 nat64_prefix = ['--nat64-prefix', '2001:db8:1:ffff::/96'] if INFRA_DNS64 == 1 else [] 123 '--rm', [all …]
|
/openthread-latest/third_party/mbedtls/repo/scripts/ |
D | generate_visualc_files.pl | 10 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 18 my $vsx_app_tpl_file = "scripts/data_files/vs2017-app-template.$vsx_ext"; 19 my $vsx_main_tpl_file = "scripts/data_files/vs2017-main-template.$vsx_ext"; 21 my $vsx_sln_tpl_file = "scripts/data_files/vs2017-sln-template.sln"; 78 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "{APPNAME}", "{APPNAME}.vcxproj", "{GUID}" 80 {46CF2D25-6A36-4189-B59C-E4815388E554} = {46CF2D25-6A36-4189-B59C-E4815388E554} 100 if (not (-d $d)) { return 0; } 102 return -d $vsx_dir 103 && -d $mbedtls_header_dir 104 && -d $psa_header_dir [all …]
|
D | bump_version.sh | 4 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 10 # Usage: bump_version.sh [ --version <version> ] [ --so-crypto <version>] 11 # [ --so-x509 <version> ] [ --so-tls <version> ] 12 # [ -v | --verbose ] [ -h | --help ] 15 set -e 22 until [ -z "$1" ] 25 --version) 30 --so-crypto) 34 --so-x509) 38 --so-tls) [all …]
|
/openthread-latest/tools/harness-automation/autothreadharness/ |
D | runner.py | 75 logger.info('Initial state is %s', json.dumps(self.result, indent=2)) 79 … '\n========================================\n%s\n========================================', 87 os.system('echo %s > "%s"' % 88 … (' '.join(self.auto_reboot_args + ['-c', test.__class__.__name__]), RESUME_SCRIPT_PATH)) 91 self.started = time.strftime('%Y-%m-%dT%H:%M:%S') 93 os.system('mkdir %s' % test.result_dir) 94 …self.log_handler = logging.FileHandler('%s\\auto-%s.log' % (test.result_dir, time.strftime('%Y%m%d… 96 self.log_handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(message)s')) 111 'stopped': time.strftime('%Y-%m-%dT%H:%M:%S'), 118 os.system('del "%s"' % RESUME_SCRIPT_PATH) [all …]
|
/openthread-latest/third_party/mbedtls/repo/3rdparty/p256-m/p256-m/ |
D | p256-m.c | 2 * Implementation of curve P-256 (ECDH and ECDSA) 5 * Author: Manuel Pégourié-Gonnard. 6 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 9 #include "p256-m.h" 19 * Zeroize memory - this should not be optimized away 24 * Helpers to test constant-time behaviour with valgrind or MemSan. 56 * Operations on fixed-width unsigned integers 58 * Represented using 32-bit limbs, least significant limb first. 59 * That is: x = x[0] + 2^32 x[1] + ... + 2^224 x[7] for 256-bit. 64 * 256-bit set to 32-bit value [all …]
|
/openthread-latest/third_party/mbedtls/repo/scripts/mbedtls_dev/ |
D | c_parsing_helper.py | 9 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 21 #pylint: disable=too-few-public-methods 28 r'(?P<type>\w[\w\s*]*?)\s*' + 30 r'\s*(?P<suffix>\[[^][]*\])?\Z', 31 re.A | re.S) 34 def normalize_type(cls, typ: str) -> str: 36 typ = re.sub(r'\s+', r' ', typ) 37 typ = re.sub(r'\s*\*', r' *', typ) 40 def __init__(self, decl: str) -> None: 52 #pylint: disable=too-few-public-methods [all …]
|
/openthread-latest/third_party/mbedtls/repo/tests/scripts/ |
D | generate_test_code.py | 5 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 16 ------ 24 --------------------- 48 enc_dec_buf:MBEDTLS_CIPHER_AES_128_GCM:"AES-128-GCM":128:8:-1 51 --------------- 59 ---------- 61 - Generating test_suite_<module>[.<optional sub module>].c file 63 - Building each source file into executables. 64 - Running each executable and printing report. 68 - Process main() [all …]
|
/openthread-latest/tests/toranj/cli/ |
D | test-022-netdata-full.py | 34 # -------------------------------------------------------------------------------------------------… 38 test_name = __file__[:-3] if __file__.endswith('.py') else __file__ 39 print('-' * 120) 42 # -------------------------------------------------------------------------------------------------… 53 # -------------------------------------------------------------------------------------------------… 56 leader.form('netdata-full') 66 # -------------------------------------------------------------------------------------------------… 77 r1.add_route('fd00:1:0:1::/64', 's', 'med') 78 r1.add_route('fd00:1:0:2::/64', 's', 'med') 79 r1.add_route('fd00:1:0:3::/64', 's', 'med') [all …]
|