| /openthread-latest/third_party/mbedtls/repo/tests/suites/ |
| D | test_suite_bignum_mod.function | 14 const mbedtls_mpi_mod_modulus *m, 27 r->p = p; 28 r->limbs = limbs; 32 /* mbedtls_mpi_mod_residue_setup() checks limbs, and that value < m */ 33 return mbedtls_mpi_mod_residue_setup(r, m, p, limbs); 47 mbedtls_mpi_mod_modulus m; 52 mbedtls_mpi_mod_modulus_init(&m); 56 ret = mbedtls_mpi_mod_modulus_setup(&m, mp, MLIMBS); 59 ret = mbedtls_mpi_mod_optred_modulus_setup(&m, mp, MLIMBS, NULL); 68 /* Only test if the constants have been set-up */ [all …]
|
| D | test_suite_bignum_mod_raw.function | 22 mbedtls_mpi_mod_modulus m; 23 mbedtls_mpi_mod_modulus_init(&m); 57 int ret = mbedtls_mpi_mod_modulus_setup(&m, init, nx); 64 ret = mbedtls_mpi_mod_raw_read(X, &m, input->x, input->len, endian); 72 ret = mbedtls_mpi_mod_raw_write(X, &m, buf, nb, endian); 77 if (nb > input->len) { 79 size_t leading_zeroes = nb - input->len; 80 TEST_ASSERT(memcmp(buf + nb - input->len, input->x, input->len) == 0); 85 TEST_ASSERT(memcmp(buf, input->x, input->len) == 0); 86 for (size_t i = input->len; i < nb; i++) { [all …]
|
| D | test_suite_bignum_mod.misc.data | 10 Test mpi_mod_mul #1 N->limbs != A->limbs 13 Test mpi_mod_mul #2 N->limbs != B->limbs 16 Test mpi_mod_mul #3 N->limbs != X->limbs 40 mbedtls_mpi_mod_inv non-Mont. form - base case for negative testing (N, A, A^-1) 43 mbedtls_mpi_mod_inv non-Mont. form - A == 0 46 mbedtls_mpi_mod_inv non-Mont. form - A too long 49 mbedtls_mpi_mod_inv non-Mont. form - A too short 52 mbedtls_mpi_mod_inv 32-bit Mont. form - base case for negative testing, A = 1 (N, mont(A), mont(A^-… 56 mbedtls_mpi_mod_inv 32-bit Mont. form - A == 0 60 mbedtls_mpi_mod_inv 32-bit Mont. form - A too long [all …]
|
| D | test_suite_ecp.function | 12 #define ECP_PF_UNKNOWN -1 22 if (mbedtls_mpi_cmp_mpi(&grp1->P, &grp2->P) != 0) { 25 if (mbedtls_mpi_cmp_mpi(&grp1->A, &grp2->A) != 0) { 28 if (mbedtls_mpi_cmp_mpi(&grp1->B, &grp2->B) != 0) { 31 if (mbedtls_mpi_cmp_mpi(&grp1->N, &grp2->N) != 0) { 34 if (mbedtls_ecp_point_cmp(&grp1->G, &grp2->G) != 0) { 37 if (grp1->id != grp2->id) { 40 if (grp1->pbits != grp2->pbits) { 43 if (grp1->nbits != grp2->nbits) { 46 if (grp1->h != grp2->h) { [all …]
|
| /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/library/ |
| D | bn_mul.h | 4 * \brief Multi-precision integer library 8 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 16 * . IA-32 (386+) . AMD64 / EM64T 17 * . IA-32 (SSE2) . Motorola 68000 18 * . PowerPC, 32-bit . MicroBlaze 19 * . PowerPC, 64-bit . TriCore 51 #else /* 64-bits */ 71 /* *INDENT-OFF* */ 74 /* armcc5 --gnu defines __GNUC__ but doesn't support GNU's extended asm */ 86 * instead of using a fixed register, was implemented on x86/x86-64 [all …]
|
| D | padlock.c | 5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 29 static int flags = -1; in mbedtls_padlock_has_support() 32 if (flags == -1) { in mbedtls_padlock_has_support() 44 : "=m" (ebx), "=m" (edx) in mbedtls_padlock_has_support() 45 : "m" (ebx) in mbedtls_padlock_has_support() 55 * PadLock AES-ECB block en(de)cryption 68 rk = ctx->buf + ctx->rk_offset; in mbedtls_padlock_xcryptecb() 78 *ctrl = 0x80 | ctx->nr | ((ctx->nr + (mode^1) - 10) << 9); in mbedtls_padlock_xcryptecb() 90 : "=m" (ebx) in mbedtls_padlock_xcryptecb() 91 : "m" (ebx), "m" (ctrl), "m" (rk), "m" (blk) in mbedtls_padlock_xcryptecb() [all …]
|
| D | mps_trace.c | 5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 21 #define color_default "\x1B[0m" 22 #define color_red "\x1B[1;31m" 23 #define color_green "\x1B[1;32m" 24 #define color_yellow "\x1B[1;33m" 25 #define color_blue "\x1B[1;34m" 26 #define color_magenta "\x1B[1;35m" 27 #define color_cyan "\x1B[1;36m" 28 #define color_white "\x1B[1;37m" 64 trace_depth--; in mbedtls_mps_trace_dec_depth() [all …]
|
| D | ecp.c | 5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 11 * SEC1 https://www.secg.org/sec1-v2.pdf 12 * GECC = Guide to Elliptic Curve Cryptography - Hankerson, Menezes, Vanstone 13 * FIPS 186-3 http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf 15 * - https://www.rfc-editor.org/rfc/rfc4492 17 * - https://www.rfc-editor.org/rfc/rfc7748 19 * [Curve25519] https://cr.yp.to/ecdh/curve25519-20060209.pdf 21 * [2] CORON, Jean-S'ebastien. Resistance against differential power analysis 23 * Embedded Systems. Springer Berlin Heidelberg, 1999. p. 292-302. 24 * <http://link.springer.com/chapter/10.1007/3-540-48059-5_25> [all …]
|
| /openthread-latest/third_party/mbedtls/repo/3rdparty/p256-m/ |
| D | Makefile.inc | 1 …ARTY_INCLUDES+=-I$(THIRDPARTY_DIR)/p256-m/p256-m/include -I$(THIRDPARTY_DIR)/p256-m/p256-m/include… 4 $(THIRDPARTY_DIR)/p256-m//p256-m_driver_entrypoints.o \ 5 $(THIRDPARTY_DIR)/p256-m//p256-m/p256-m.o
|
| D | README.md | 1 …-m/` subdirectory originate from the [p256-m GitHub repository](https://github.com/mpg/p256-m). Th… 3 The files `p256-m.c`, `p256-m.h` and `README.md` have been taken from the `p256-m` repository. 4 It should be noted that p256-m deliberately does not supply its own cryptographically secure RNG fu…
|
| D | p256-m_driver_entrypoints.c | 2 * Driver entry points for p256-m 6 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 10 #include "p256-m_driver_entrypoints.h" 11 #include "p256-m/p256-m.h" 28 * p256-m's internal format for private keys matches PSA. Its format for public 30 * Hence, when passing public keys from PSA to p256-m, the leading byte is 33 * Shared secret and signature have the same format between PSA and p256-m. 44 /* Convert between p256-m and PSA error codes */ 120 /* Validate sizes, as p256-m expects fixed-size buffers */ in p256_transparent_export_public_key() 145 * of driver entry-points. (void) used to avoid compiler warning. */ in p256_transparent_generate_key() [all …]
|
| /openthread-latest/third_party/jlink/SEGGER_RTT_V640/RTT/ |
| D | SEGGER_RTT.h | 6 * (c) 1995 - 2018 SEGGER Microcontroller GmbH * 20 * compatible with the RTT protocol and J-Link. * 54 ---------------------------END-OF-HEADER------------------------------ 56 Purpose : Implementation of SEGGER real-time transfer which allows 57 real-time communication on targets which support debugger 60 ---------------------------------------------------------------------- 92 // which is used as up-buffer (T->H) 95 … sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4" 105 // which is used as down-buffer (H->T) 108 … sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4" [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 34 def normalize_type(cls, typ: str) -> str: 40 def __init__(self, decl: str) -> None: 42 m = self._DECLARATION_RE.match(self.decl) 43 if not m: 45 self.type = self.normalize_type(m.group('type')) #type: str 46 self.name = m.group('name') #type: Optional[str] 47 self.suffix = m.group('suffix') if m.group('suffix') else '' #type: str 52 #pylint: disable=too-few-public-methods [all …]
|
| D | crypto_knowledge.py | 7 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 17 def short_expression(original: str, level: int = 0) -> str: 18 """Abbreviate the expression, keeping it human-readable. 26 short = re.sub(r'\bPSA_(?:ALG|DH_FAMILY|ECC_FAMILY|KEY_[A-Z]+)_', r'', short) 59 def from_family(family: str) -> 'EllipticCurveCategory': 71 def __init__(self, name: str, params: Optional[Iterable[str]] = None) -> None: 90 m = re.match(r'(\w+)\s*\((.*)\)\Z', self.name) 91 assert m is not None 92 self.name = m.group(1) 93 params = m.group(2).split(',') [all …]
|
| /openthread-latest/third_party/mbedtls/repo/3rdparty/p256-m/p256-m/ |
| D | README.md | 1 *This is the original README for the p256-m repository. Please note that as 2 only a subset of p256-m's files are present in Mbed TLS, this README may refer 5 p256-m is a minimalistic implementation of ECDH and ECDSA on NIST P-256, 6 especially suited to constrained 32-bit environments. It's written in standard 7 C, with optional bits of assembly for Arm Cortex-M and Cortex-A CPUs. 16 some might even risk weakening security for more speed. p256-m was written 21 to existing implementations (see below) - in less than 700 LOC. 25 - [Correctness](#correctness) 26 - [Security](#security) 27 - [Code size](#code-size) [all …]
|
| 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/configs/ |
| D | config-tfm.h | 2 * \file config-tfm.h 4 * \brief TF-M medium profile, adapted to work on other platforms. 8 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 11 /* TF-M medium profile: mbedtls legacy configuration */ 14 /* TF-M medium profile: PSA crypto configuration */ 18 /* Tweak the configuration to remove dependencies on TF-M. */ 21 /* MBEDTLS_PSA_CRYPTO_SPM needs third-party files, so disable it. */ 24 /* Disable buffer-based memory allocator. This isn't strictly required, 37 // These platform-related TF-M settings are not useful here. 46 * In order to get an example config that works cleanly out-of-the-box [all …]
|
| /openthread-latest/tests/scripts/thread-cert/ |
| D | message.py | 330 … mac_address = common.MacAddress.from_eui64(bytearray(node.get_addr64(), encoding="utf-8")) 388 m = self.messages.pop(0) 390 if m.type != MessageType.COAP: 393 if uri_path is not None and m.coap.uri_path != uri_path: 397 if not m.coap.code.is_equal_dotted(code): 400 message = m 421 for i in range(size - 1, -1, -1): 422 m = self.messages[i] 424 if m.type != MessageType.MLE: 428 if m.mle.command.type == command_type: [all …]
|
| /openthread-latest/third_party/mbedtls/repo/configs/ext/ |
| D | README.md | 2 ------- 10 used by Mbed TLS: a dual Apache 2.0 or GPLv2-or-later license. 13 ---------- 16 are taken verbatim from the TF-M source code here: 18 https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/tree/lib/ext/mbedcrypto/mbedcrypto_conf… 20 In TF-M, they are distributed under a 3-Clause BSD license, as noted at the top of the files. 22 …-M project, they are distributed under a dual [Apache-2.0](https://spdx.org/licenses/Apache-2.0.ht…
|
| /openthread-latest/third_party/mbedtls/repo/tests/ |
| D | context-info.sh | 3 # context-info.sh 6 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 11 set -eu 35 printf " -h|--help\tPrint this help.\n" 36 printf " -m|--memcheck\tUse valgrind to check the memory.\n" 41 printf "%s %.*s " "$1" $(( 71 - ${#1} )) \ 70 while [ $# -gt 0 ]; do 72 -h|--help) 76 -m|--memcheck) 98 cp -f "$OUT_FILE" "$FAIL_OUT" [all …]
|
| /openthread-latest/third_party/mbedtls/repo/docs/ |
| D | psa-driver-example-and-guide.md | 5 …osed, work-in-progress driver system. The [PSA Driver Interface](https://github.com/Mbed-TLS/mbedt… 6 …-TLS/mbedtls/blob/development/docs/proposed/psa-driver-developer-guide.md) Guide describes the del… 9 [Background on how Mbed TLS calls drivers](#background-on-how-mbed-tls-calls-drivers)\ 10 [Process for Entry Points where auto-generation is implemented](#process-for-entry-points-where-aut… 11 …ocess for Entry Points where auto-generation is not implemented](#process-for-entry-points-where-a… 12 …tware accelerator alongside Mbed TLS](#example-manually-integrating-a-software-accelerator-alongsi… 16 …-party drivers. Operations that are completed within one step (one function call), such as verifyi… 19 …ivers can also be pure software implementations that are distributed as plug-ins to a PSA Cryptogr… 20 …y location](https://github.com/Mbed-TLS/mbedtls/blob/development/docs/proposed/psa-driver-interfac… 22 …-part of a multi-part operation), the library calls the corresponding function in the driver wrapp… [all …]
|
| /openthread-latest/third_party/mbedtls/repo/tests/scripts/ |
| D | check_files.py | 4 # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later 8 including incorrect file permissions, presence of tabs, non-Unix line endings, 9 trailing whitespace, and presence of UTF-8 BOM. 22 from typing import FrozenSet, Optional, Pattern # pylint: disable=unused-import 26 import scripts_path # pylint: disable=unused-import 31 """Base class for file-wide issue tracking. 44 ``heading``: human-readable description of the issue 50 # pylint: disable=no-member 120 """Base class for line-by-line issue tracking. 167 _shebang_re = re.compile(rb'^#! ?(?:/bin/(bash|sh)(?: -[^\n ]*)?' [all …]
|