Home
last modified time | relevance | path

Searched +full:- +full:y (Results 1 – 25 of 129) sorted by relevance

123456

/openthread-latest/third_party/mbedtls/repo/library/
Dconstant_time_impl.h2 * 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"
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 */
73 * Core const-time primitives
[all …]
Ddes.c2 * FIPS-46-3 compliant Triple-DES implementation
5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
11 * http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf
29 * Expanded DES S-boxes
192 * PC1: left and right halves bit-swap
213 #define DES_IP(X, Y) \ argument
216 T = (((X) >> 4) ^ (Y)) & 0x0F0F0F0F; (Y) ^= T; (X) ^= (T << 4); \
217 T = (((X) >> 16) ^ (Y)) & 0x0000FFFF; (Y) ^= T; (X) ^= (T << 16); \
218 T = (((Y) >> 2) ^ (X)) & 0x33333333; (X) ^= T; (Y) ^= (T << 2); \
219 T = (((Y) >> 8) ^ (X)) & 0x00FF00FF; (X) ^= T; (Y) ^= (T << 8); \
[all …]
Dconstant_time_internal.h2 * Constant-time functions
5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
20 /* The constant-time interface provides various operations that are likely
21 * to result in constant-time code that does not branch or use conditional
27 * - boolean operations
31 * example: bool x = y | z => x = mbedtls_ct_bool_or(y, z)
32 * example: bool x = y == z => x = mbedtls_ct_uint_eq(y, z)
34 * - conditional data selection
40 * - block memory operations
47 * be able to prove anything about its value at compile-time.
[all …]
Dbignum.c2 * 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()
57 const mbedtls_mpi *Y, in mbedtls_mpi_lt_mpi_ct() argument
62 if (X->n != Y->n) { in mbedtls_mpi_lt_mpi_ct()
[all …]
Dccm.c2 * NIST SP800-38C compliant CCM implementation
5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
10 * http://csrc.nist.gov/publications/nistpubs/800-38C/SP800-38C_updated-July20_2007.pdf
11 * RFC 3610 "Counter with CBC-MAC (CCM)"
60 mbedtls_block_cipher_free(&ctx->block_cipher_ctx); in mbedtls_ccm_setkey()
62 if ((ret = mbedtls_block_cipher_setup(&ctx->block_cipher_ctx, cipher)) != 0) { in mbedtls_ccm_setkey()
66 if ((ret = mbedtls_block_cipher_setkey(&ctx->block_cipher_ctx, key, keybits)) != 0) { in mbedtls_ccm_setkey()
82 mbedtls_cipher_free(&ctx->cipher_ctx); in mbedtls_ccm_setkey()
84 if ((ret = mbedtls_cipher_setup(&ctx->cipher_ctx, cipher_info)) != 0) { in mbedtls_ccm_setkey()
88 if ((ret = mbedtls_cipher_setkey(&ctx->cipher_ctx, key, keybits, in mbedtls_ccm_setkey()
[all …]
Decp.c5 * 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 …]
Daes.c2 * FIPS-197 compliant AES implementation
5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
10 …src.nist.gov/csrc/media/projects/cryptographic-standards-and-guidelines/documents/aes-development/…
11 * http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
59 * This is a convenience shorthand macro to check if we need reverse S-box and
71 static int aes_padlock_ace = -1;
76 * Forward S-box
203 * Reverse S-box
343 * Forward S-box & tables
352 * Reverse S-box & tables
[all …]
/openthread-latest/third_party/mbedtls/repo/tests/suites/
Dtest_suite_bignum_core.misc.data4 Test mbedtls_mpi_core_io_be #1 (Buffer and limbs just fit, input limb-aligned)
10 Test mbedtls_mpi_core_io_be #3 (Buffer just fits, extra limbs, input limb-aligned)
16 Test mbedtls_mpi_core_io_be #5 (Extra limbs, buffer aligned to extra limbs, input limb-aligned)
22 Test mbedtls_mpi_core_io_be #7 (Buffer and limbs just fit, input limb-aligned with leading zeroes)
28 Test mbedtls_mpi_core_io_be #9 (Buffer just fits, extra limbs, input limb-aligned with leading zero…
54 Test mbedtls_mpi_core_io_be #17 (not enough limbs, input limb-aligned)
60 Test mbedtls_mpi_core_io_be #19 (buffer too small, input limb-aligned)
69 Test mbedtls_mpi_core_io_le #1 (Buffer and limbs just fit, input limb-aligned)
75 Test mbedtls_mpi_core_io_le #3 (Buffer just fits, extra limbs, input limb-aligned)
81 Test mbedtls_mpi_core_io_le #5 (Extra limbs, buffer aligned to extra limbs, input limb-aligned)
[all …]
Dtest_suite_bignum.function17 /* Only +1 and -1 are valid sign bits, not e.g. 0 */
18 if (X->s != 1 && X->s != -1) {
23 * with s=-1 is an invalid representation. Forbid that. As an exception,
28 mbedtls_mpi_bitlen(X) == 0 && X->s != 1) {
42 * This function is called by the Miller-Rabin primality test each time it
43 * chooses a random witness. The witnesses (or non-witnesses as provided by the
53 if (random == NULL || random->data->x == NULL || buf == NULL) {
54 return -1;
57 if (random->pos + random->chunk_len > random->data->len
58 || random->chunk_len > len) {
[all …]
Dtest_suite_bignum_mod_raw.function64 ret = mbedtls_mpi_mod_raw_read(X, &m, input->x, input->len, 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++) {
92 size_t leading_zeroes = input->len - nb;
93 TEST_ASSERT(memcmp(input->x + input->len - nb, buf, nb) == 0);
95 TEST_EQUAL(input->x[i], 0);
98 TEST_ASSERT(memcmp(input->x, buf, nb) == 0);
[all …]
Dtest_suite_bignum_core.function10 * \param[in] A Little-endian presentation of the left operand.
11 * \param[in] B Little-endian presentation of the right operand.
13 * \param[in] S Little-endian presentation of the expected sum.
86 * \param[in] A Little-endian presentation of the left operand.
87 * \param[in] B Little-endian presentation of the right operand.
89 * \param[in] S Little-endian presentation of the expected sum.
215 int ret = mbedtls_mpi_core_read_be(X, nx, input->x, input->len);
224 if (nb > input->len) {
225 size_t leading_zeroes = nb - input->len;
226 TEST_ASSERT(memcmp(buf + nb - input->len, input->x, input->len) == 0);
[all …]
Dtest_suite_constant_time.function8 * under MSan or Valgrind will detect a non-constant-time implementation.
51 mbedtls_ct_uint_t y = strtoull(y_str, NULL, 0);
54 mbedtls_ct_uint_t y1 = y;
57 TEST_CF_SECRET(&y, sizeof(y));
63 TEST_EQUAL(mbedtls_ct_uint_ne(x, y), expected);
66 TEST_EQUAL(mbedtls_ct_uint_eq(x, y), expected);
69 TEST_EQUAL(mbedtls_ct_uint_gt(x, y), expected);
72 TEST_EQUAL(mbedtls_ct_uint_lt(x, y), expected);
75 TEST_EQUAL(mbedtls_ct_uint_ge(x, y), expected);
78 TEST_EQUAL(mbedtls_ct_uint_le(x, y), expected);
[all …]
Dtest_suite_ecp.function12 #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/3rdparty/p256-m/p256-m/
Dp256-m.c2 * 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/3rdparty/everest/library/kremlib/
DFStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c5-fc89 -fparentheses -fno-shadow -header /mnt/e/everest/verify/hdrB9w -minimal -fparentheses -fcurl…
19 return xnx - (uint64_t)1U; in FStar_UInt64_eq_mask()
25 uint64_t y = b; 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()
28 uint64_t x_sub_y_xor_y = x_sub_y ^ y; in FStar_UInt64_gte_mask()
32 return x_xor_q_ - (uint64_t)1U; in FStar_UInt64_gte_mask()
41 return xnx - (uint32_t)1U; in FStar_UInt32_eq_mask()
47 uint32_t y = b; in FStar_UInt32_gte_mask() local
48 uint32_t x_xor_y = x ^ y; in FStar_UInt32_gte_mask()
[all …]
DFStar_UInt128_extracted.c5-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()
113 return (hi << s) + (lo >> (FStar_UInt128_u32_64 - s)); in FStar_UInt128_add_u64_shift_left()
139 FStar_UInt128_uint128 flat = { (uint64_t)0U, a.low << (s - FStar_UInt128_u32_64) }; in FStar_UInt128_shift_left_large()
157 return (lo >> s) + (hi << (FStar_UInt128_u32_64 - s)); in FStar_UInt128_add_u64_shift_right()
183 FStar_UInt128_uint128 flat = { a.high >> (s - FStar_UInt128_u32_64), (uint64_t)0U }; in FStar_UInt128_shift_right_large()
341 FStar_UInt128_uint128 FStar_UInt128_mul32(uint64_t x, uint32_t y) in FStar_UInt128_mul32() argument
[all …]
/openthread-latest/third_party/mbedtls/repo/programs/pkey/
Dmpi_demo.c5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
31 mbedtls_mpi E, P, Q, N, H, D, X, Y, Z; in main() local
34 mbedtls_mpi_init(&H); mbedtls_mpi_init(&D); mbedtls_mpi_init(&X); mbedtls_mpi_init(&Y); in main()
56 mbedtls_mpi_write_file(" D = E^-1 mod (P-1)*(Q-1) = ", in main()
62 MBEDTLS_MPI_CHK(mbedtls_mpi_exp_mod(&Y, &X, &E, &N, NULL)); in main()
63 MBEDTLS_MPI_CHK(mbedtls_mpi_exp_mod(&Z, &Y, &D, &N, NULL)); in main()
67 MBEDTLS_MPI_CHK(mbedtls_mpi_write_file(" Y (ciphertext) = X^E mod N = ", &Y, 10, NULL)); in main()
68 MBEDTLS_MPI_CHK(mbedtls_mpi_write_file(" Z (decrypted) = Y^D mod N = ", &Z, 10, NULL)); in main()
75 mbedtls_mpi_free(&H); mbedtls_mpi_free(&D); mbedtls_mpi_free(&X); mbedtls_mpi_free(&Y); in main()
/openthread-latest/tools/harness-simulation/harness/
Dinstall.bat29 xcopy /E /Y Thread_Harness %THREADDIR%\Thread_Harness
30 copy /Y ..\..\harness-thci\OpenThread.py %THREADDIR%\Thread_Harness\THCI
31 copy /Y ..\..\harness-thci\OpenThread_BR.py %THREADDIR%\Thread_Harness\THCI
32 copy /Y ..\..\harness-thci\OpenThread.png %THREADDIR%\Web\images
33 copy /Y ..\..\harness-thci\OpenThread_BR.png %THREADDIR%\Web\images
34 copy /Y ..\posix\config.yml %THREADDIR%\Thread_Harness\simulation
35 xcopy /E /Y ..\posix\sniffer_sim\proto %THREADDIR%\Thread_Harness\simulation\Sniffer\proto
37 %THREADDIR%\Python27\python.exe -m pip install --upgrade pip
38 %THREADDIR%\Python27\python.exe -m pip install -r requirements.txt
43 …systemdrive%\GRL\Thread1.2\Python27\python.exe -m grpc_tools.protoc -I%BASEDIR% --python_out=%BASE…
/openthread-latest/third_party/mbedtls/repo/tests/include/test/
Dmacros.h9 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
34 * - Mark this test case as failed.
35 * - Print a message identifying the failure.
36 * - Jump to the \c exit label.
68 * \param expr1 An integral-typed expression to evaluate.
69 * \param expr2 Another integral-typed expression to evaluate.
81 * \param expr1 An integral-typed expression to evaluate.
82 * \param expr2 Another integral-typed expression to evaluate.
94 * \param expr1 An integral-typed expression to evaluate.
95 * \param expr2 Another integral-typed expression to evaluate.
[all …]
/openthread-latest/third_party/mbedtls/repo/include/mbedtls/
Dbignum.h4 * \brief Multi-precision integer library
8 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
24 #define MBEDTLS_ERR_MPI_FILE_IO_ERROR -0x0002
26 #define MBEDTLS_ERR_MPI_BAD_INPUT_DATA -0x0004
28 #define MBEDTLS_ERR_MPI_INVALID_CHARACTER -0x0006
30 #define MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL -0x0008
32 #define MBEDTLS_ERR_MPI_NEGATIVE_VALUE -0x000A
34 #define MBEDTLS_ERR_MPI_DIVISION_BY_ZERO -0x000C
36 #define MBEDTLS_ERR_MPI_NOT_ACCEPTABLE -0x000E
38 #define MBEDTLS_ERR_MPI_ALLOC_FAILED -0x0010
[all …]
/openthread-latest/etc/docker/android-trusty/
DDockerfile36 ENV ANDROID_JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64
39 ENV ANDROID_NDK_PATH=/opt/ndk-bundle
43 RUN apt-get -y update && apt-get --no-install-recommends install -y \
44 gcc-multilib \
45 g++-multilib \
52 RUN wget https://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip \
53 && unzip android-ndk-r17c-linux-x86_64.zip > /dev/null \
54 && mv android-ndk-r17c $ANDROID_NDK_PATH \
55 && rm android-ndk-r17c-linux-x86_64.zip
58 RUN mkdir build && cd build && git init && git pull --depth 1 https://android.googlesource.com/plat…
[all …]
/openthread-latest/.github/workflows/
Dbuild.yml33 branches-ignore:
34 - 'dependabot/**'
37 - 'main'
40 …group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'opent…
41 cancel-in-progress: true
49 runs-on: ubuntu-24.04
51 - name: Harden Runner
52 uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
54 egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
56 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
[all …]
Dtoranj.yml33 branches-ignore:
34 - 'dependabot/**'
37 - 'main'
40 …group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'opent…
41 cancel-in-progress: true
48 toranj-ncp:
49 name: toranj-ncp-${{ matrix.TORANJ_RADIO }}
50 runs-on: ubuntu-22.04
52 fail-fast: false
61 - name: Harden Runner
[all …]
Dsimulation-1.1.yml33 branches-ignore:
34 - 'dependabot/**'
37 - 'main'
40 …group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.repository == 'opent…
41 cancel-in-progress: true
48 packet-verification:
49 runs-on: ubuntu-24.04
57 - name: Harden Runner
58 uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
60 egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
[all …]
/openthread-latest/third_party/mbedtls/repo/
DBRANCHES.md5 - The [`main`](https://github.com/Mbed-TLS/mbedtls/tree/main) branch:
8 - The [`development`](https://github.com/Mbed-TLS/mbedtls/tree/development) branch:
12 - One or more long-time support (LTS) branches: these only get bug fixes and
14 - [`mbedtls-2.28`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-2.28).
15 - [`mbedtls-3.6`](https://github.com/Mbed-TLS/mbedtls/tree/mbedtls-3.6).
18 such as [`archive/mbedtls-2.7`](https://github.com/Mbed-TLS/mbedtls/tree/archive/mbedtls-2.7).
27 We will make regular LTS releases on an 18-month cycle, each of which will have
35 code that's working and secure with Mbed TLS x.y.z and does not rely on
36 undocumented features, then you should be able to re-compile it without
37 modification with any later release x.y'.z' with the same major version
[all …]

123456