Home
last modified time | relevance | path

Searched +full:- +full:c1 +full:- +full:16 (Results 1 – 13 of 13) sorted by relevance

/optee_os/core/lib/libtomcrypt/src/hashes/
H A Dsha3_test.c1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
18 const unsigned char c1 = 0xa3; in sha3_224_test()
34 XMEMSET(buf, c1, sizeof(buf)); in sha3_224_test()
36 /* SHA3-224 on an empty buffer */ in sha3_224_test()
39 …if (compare_testvector(hash, sizeof(hash), sha3_224_empty, sizeof(sha3_224_empty), "SHA3-224", 0))… in sha3_224_test()
43 /* SHA3-224 in two steps. [FIPS 202] */ in sha3_224_test()
48 …tor(hash, sizeof(hash), sha3_224_0xa3_200_times, sizeof(sha3_224_0xa3_200_times), "SHA3-224", 1)) { in sha3_224_test()
52 /* SHA3-224 byte-by-byte: 200 steps. [FIPS 202] */ in sha3_224_test()
55 while (i--) { in sha3_224_test()
[all …]
/optee_os/lib/libutils/ext/include/
H A Dfault_mitigation.h1 /* SPDX-License-Identifier: BSD-2-Clause */
41 * Zero is normally a success code in OP-TEE so special functions are
58 * struct ftmn_check - track current checked state
76 * struct ftmn_func_arg - track a called function
92 * struct ftmn - link a tracked call chain
114 * enum ftmn_incr - increase counter values
140 * FTMN_PANIC() - FTMN specific panic function
161 SHIFT_U32(__FTMN_FUNC_BYTE((f), (o) + 2, (l)), 16) | \
170 __FTMN_FUNC_HASH64((f), (o) + __FTMN_MAX_FUNC_NAME_LEN / 16, (l)))
175 SHIFT_U64(__FTMN_FUNC_BYTE((f), (o) + 2, (l)), 16) | \
[all …]
/optee_os/lib/libmbedtls/mbedtls/library/
H A Daesce.c2 * Armv8-A Cryptographic Extension support functions for Aarch64
5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
19 /* TODO: Re-consider above after https://reviews.llvm.org/D131064 merged.
22 * these are normally only enabled by the -march option on the command line.
24 * requiring -march on the command line.
30 /* See: https://arm-software.github.io/acle/main/acle.html#cryptographic-extensions
53 # error "Minimum version of Clang for MBEDTLS_AESCE_C on 32-bit Arm or Thumb is 11.0."
70 /* TODO: We haven't verified armclang for 32-bit Arm/Thumb prior to 6.20.
73 # error "Minimum version of armclang for MBEDTLS_AESCE_C on 32-bit Arm is 6.20."
83 # error "Must use minimum -march=armv8-a+crypto for MBEDTLS_AESCE_C"
[all …]
H A Daesni.c2 * AES-NI support functions
5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
9 …* [AES-WP] https://www.intel.com/content/www/us/en/developer/articles/tool/intel-advanced-encrypti…
10 …CLMUL-WP] https://www.intel.com/content/www/us/en/develop/download/intel-carry-less-multiplication
47 * AES-NI support detection routine
53 * https://github.com/Mbed-TLS/mbedtls/issues/9840 in mbedtls_aesni_has_support()
58 * (See example 8-1 in Sewell et al., "x86-TSO: A Rigorous and Usable in mbedtls_aesni_has_support()
91 * AES-NI AES-ECB block en(de)cryption
95 const unsigned char input[16], in mbedtls_aesni_crypt_ecb() argument
96 unsigned char output[16]) in mbedtls_aesni_crypt_ecb() argument
[all …]
H A 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
139 V(F5, 53, 53, A6), V(68, D1, D1, B9), V(00, 00, 00, 00), V(2C, ED, ED, C1), \
143 V(6B, D0, D0, BB), V(2A, EF, EF, C5), V(E5, AA, AA, 4F), V(16, FB, FB, ED), \
149 V(DF, BC, BC, 63), V(C1, B6, B6, 77), V(75, DA, DA, AF), V(63, 21, 21, 42), \
[all …]
H A Dconstant_time.c2 * Constant-time functions
5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
101 /* We don't support int smaller than 32-bits, but if someone tried to build in mbedtls_ct_memcmp()
103 * only bits set in diff are in the top 16-bits, and would be lost by a in mbedtls_ct_memcmp()
106 #error "mbedtls_ct_memcmp() requires minimum 32-bit ints" in mbedtls_ct_memcmp()
108 /* The bit-twiddling ensures that when we cast uint32_t to int, we are casting in mbedtls_ct_memcmp()
109 * a value that is in the range 0..INT_MAX - a value larger than this would in mbedtls_ct_memcmp()
112 * This ensures that the value returned by the function is non-zero iff in mbedtls_ct_memcmp()
113 * diff is non-zero. in mbedtls_ct_memcmp()
115 return (int) ((diff & 0xffff) | (diff >> 16)); in mbedtls_ct_memcmp()
[all …]
H A Dx509_crt.c5 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
8 * The ITU-T X.509 standard defines a certificate format for PKI.
14 * http://www.itu.int/ITU-T/studygroups/com17/languages/X.680-0207.pdf
15 * http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
17 * [SIRO] https://cabforum.org/wp-content/uploads/Chunghwatelecom201503cabforumV4.pdf
83 * Max size of verification chain: end-entity + intermediates + trusted root
91 /* Hashes from SHA-256 and above. Note that this selection
98 /* Curves at or above 128-bit security level. Note that this selection
113 /* Next-generation profile. Currently identical to the default, but may
117 /* Hashes from SHA-256 and above. */
[all …]
/optee_os/.github/workflows/
H A Dci.yml6 group: ci-${{ github.ref }} # unique per branch
7 cancel-in-progress: true # cancel previous runs on the same branch
11 runs-on: ubuntu-latest
14 - name: Checkout
17 fetch-depth: 0 # full history so checkpatch can check commit IDs in commit messages
18 - name: Update Git config
19 run: git config --globa
[all...]
/optee_os/core/drivers/crypto/caam/acipher/
H A Dcaam_prime_dsa.c1 // SPDX-License-Identifier: BSD-2-Clause
3 * Copyright 2020-2021, 2023 NXP
38 * Referring to FIPS.186-4, Section A.1.1.2 Generation of the
59 caam_desc_add_word(desc, prime->q->length); in do_desc_prime_q()
61 caam_desc_add_word(desc, prime->q->length); in do_desc_prime_q()
72 /* Exceed retry count - exit with DSA_TRY_FAIL error */ in do_desc_prime_q()
86 if (seed->length > 16) { in do_desc_prime_q()
88 caam_desc_add_word(desc, NFIFO_PAD(BOTH, 0, MSG, RND, 16)); in do_desc_prime_q()
93 RND, seed->length - 16)); in do_desc_prime_q()
97 MSG, RND, seed->length)); in do_desc_prime_q()
[all …]
H A Dcaam_prime_rsa.c1 // SPDX-License-Identifier: BSD-2-Clause
3 * Copyright 2018-2021, 2023 NXP
41 * operation sqrt(2) * (2 ^ ((nlen / 2) - 1))
73 * preceeds it. These values have been pre-computed by the CAAM design team.
76 * the percentage of non-primes weeded out by checking for small prime factors
82 * Percentage weeded: 1 - 1.12/ln B
86 * the costly modular exponentation inside of Miller-Rabin. (If the result is
108 /* 128 / 16 | 25 | 101 | 76 */
355 prime->data = (uint8_t *)smallprimes[idx].data; in search_smallprime()
356 prime->length = psize; in search_smallprime()
[all …]
/optee_os/core/drivers/crypto/caam/ae/
H A Dcaam_ae_gcm.c1 // SPDX-License-Identifier: BSD-2-Clause
59 * it is possible to "roll over" the 32-bit counter value. in caam_ae_do_block_gcm()
60 * When this occurs (unless counter starts at -1), in caam_ae_do_block_gcm()
62 * This occurs even when -1 is used as the counter for the last block. in caam_ae_do_block_gcm()
63 * The problem is that the 32-bit counter will overflow into the h in caam_ae_do_block_gcm()
85 desc = caam_ctx->descriptor; in caam_ae_do_block_gcm()
113 if (!src || src->orig.length == 0 || in caam_ae_do_block_gcm()
114 caam_ctx->nonce.length == AES_GCM_DEFAULT_NONCE_LEN) in caam_ae_do_block_gcm()
117 memcpy(&ctx, caam_ctx->ctx.data, sizeof(struct gcm_caam_ctx_layout)); in caam_ae_do_block_gcm()
119 input_length = src->orig.length; in caam_ae_do_block_gcm()
[all …]
/optee_os/core/arch/arm/crypto/
H A Dsm4_armv8a_aese_a64.S1 /* SPDX-License-Identifier: BSD-2-Clause */
8 * optional Cryptographic Extension for ARMv8-A.
10 * The NEON implementation refers to Linux kernel (sm4-neon-core.S contributed
21 .arch armv8-a+crypto
49 /* round keys: v0-v7 */
59 /* plain blocks: v8-v15 */
93 stp x15, x16, [sp, #-0x10]!
94 stp x17, x18, [sp, #-0x10]!
95 stp x19, x20, [sp, #-0x10]!
96 stp x21, x22, [sp, #-0x10]!
[all …]
/optee_os/core/lib/qcbor/inc/qcbor/
H A Dqcbor_encode.h1 // SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2016-2018, The Linux Foundation.
4 * Copyright (c) 2018-2024, Laurence Lundblade.
24 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
60 * This implements CBOR -- Concise Binary Object Representation as
62 * information is at http://cbor.io. This is a near-complete implementation of
68 * and @ref SpiffyDecode for general discussion on the easier-to-use
85 * Decoding of indefinite-length strings is a special case that requires
88 * indefinite-length string is encountered (indefinite-length maps and
90 * allocator called MemPool is built-in and will work if supplied with a
[all …]