/src/wolfssl-normal-math/wolfcrypt/src/misc.c
Line | Count | Source |
1 | | /* misc.c |
2 | | * |
3 | | * Copyright (C) 2006-2026 wolfSSL Inc. |
4 | | * |
5 | | * This file is part of wolfSSL. |
6 | | * |
7 | | * wolfSSL is free software; you can redistribute it and/or modify |
8 | | * it under the terms of the GNU General Public License as published by |
9 | | * the Free Software Foundation; either version 3 of the License, or |
10 | | * (at your option) any later version. |
11 | | * |
12 | | * wolfSSL is distributed in the hope that it will be useful, |
13 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | | * GNU General Public License for more details. |
16 | | * |
17 | | * You should have received a copy of the GNU General Public License |
18 | | * along with this program; if not, write to the Free Software |
19 | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA |
20 | | */ |
21 | | /* |
22 | | |
23 | | DESCRIPTION |
24 | | This module implements the arithmetic-shift right, left, byte swapping, XOR, |
25 | | masking and clearing memory logic. |
26 | | |
27 | | */ |
28 | | |
29 | | #ifdef WOLFSSL_VIS_FOR_TESTS |
30 | | #ifdef HAVE_CONFIG_H |
31 | | #include <config.h> |
32 | | #endif |
33 | | #include <wolfssl/wolfcrypt/settings.h> |
34 | | #else |
35 | | #include <wolfssl/wolfcrypt/libwolfssl_sources.h> |
36 | | #endif |
37 | | |
38 | | #ifndef WOLF_CRYPT_MISC_C |
39 | | #define WOLF_CRYPT_MISC_C |
40 | | |
41 | | #include <wolfssl/wolfcrypt/misc.h> |
42 | | |
43 | | /* inlining these functions is a huge speed increase and a small size decrease, |
44 | | because the functions are smaller than function call setup/cleanup, e.g., |
45 | | md5 benchmark is twice as fast with inline. If you don't want it, then |
46 | | define NO_INLINE and compile this file into wolfssl, otherwise it's used as |
47 | | a source header |
48 | | */ |
49 | | |
50 | | /* Check for if compiling misc.c when not needed. */ |
51 | | #if !defined(WOLFSSL_MISC_INCLUDED) && !defined(NO_INLINE) |
52 | | #ifndef WOLFSSL_IGNORE_FILE_WARN |
53 | | #warning misc.c does not need to be compiled when using inline (NO_INLINE not defined) |
54 | | #endif |
55 | | |
56 | | #else |
57 | | |
58 | | |
59 | | #if defined(__ICCARM__) |
60 | | #include <intrinsics.h> |
61 | | #endif |
62 | | |
63 | | |
64 | | #ifdef INTEL_INTRINSICS |
65 | | |
66 | | #include <stdlib.h> /* get intrinsic definitions */ |
67 | | |
68 | | /* for non visual studio probably need no long version, 32 bit only |
69 | | * i.e., _rotl and _rotr */ |
70 | | #pragma intrinsic(_lrotl, _lrotr) |
71 | | |
72 | | WC_MISC_STATIC WC_INLINE word32 rotlFixed(word32 x, word32 y) |
73 | | { |
74 | | return y ? _lrotl(x, y) : x; |
75 | | } |
76 | | |
77 | | WC_MISC_STATIC WC_INLINE word32 rotrFixed(word32 x, word32 y) |
78 | | { |
79 | | return y ? _lrotr(x, y) : x; |
80 | | } |
81 | | |
82 | | #elif defined(__CCRX__) |
83 | | |
84 | | #include <builtin.h> /* get intrinsic definitions */ |
85 | | |
86 | | #if !defined(NO_INLINE) |
87 | | |
88 | | #define rotlFixed(x, y) _builtin_rotl(x, y) |
89 | | |
90 | | #define rotrFixed(x, y) _builtin_rotr(x, y) |
91 | | |
92 | | #else /* create real function */ |
93 | | |
94 | | WC_MISC_STATIC WC_INLINE word32 rotlFixed(word32 x, word32 y) |
95 | | { |
96 | | return _builtin_rotl(x, y); |
97 | | } |
98 | | |
99 | | WC_MISC_STATIC WC_INLINE word32 rotrFixed(word32 x, word32 y) |
100 | | { |
101 | | return _builtin_rotr(x, y); |
102 | | } |
103 | | |
104 | | #endif |
105 | | |
106 | | #else /* generic */ |
107 | | /* The rotate complement uses sizeof(x) * CHAR_BIT for the value bit-width of the |
108 | | * word, not a literal * 8. sizeof() counts CHAR_BIT-sized cells, so word32 is a |
109 | | * true 32-bit type but sizeof(word32) is 2 (not 4) on CHAR_BIT == 16 targets |
110 | | * (e.g. TI C28x): 2 * 16 == 32. On the usual CHAR_BIT == 8 targets this is |
111 | | * byte-for-byte identical to the previous sizeof(x) * 8. Same idiom is used by |
112 | | * the word16 and word64 variants below. */ |
113 | | /* This routine performs a left circular arithmetic shift of <x> by <y> value. */ |
114 | | |
115 | | WC_MISC_STATIC WC_INLINE word32 rotlFixed(word32 x, word32 y) |
116 | 348M | { |
117 | 348M | return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y)); |
118 | 348M | } Line | Count | Source | 116 | 1.52M | { | 117 | | return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y)); | 118 | 1.52M | } |
Unexecuted instantiation: arc4.c:rotlFixed Unexecuted instantiation: asn.c:rotlFixed Unexecuted instantiation: blake2b.c:rotlFixed Unexecuted instantiation: blake2s.c:rotlFixed Unexecuted instantiation: camellia.c:rotlFixed Line | Count | Source | 116 | 2.52M | { | 117 | | return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y)); | 118 | 2.52M | } |
Unexecuted instantiation: chacha20_poly1305.c:rotlFixed Unexecuted instantiation: cmac.c:rotlFixed Unexecuted instantiation: coding.c:rotlFixed Unexecuted instantiation: curve25519.c:rotlFixed Unexecuted instantiation: curve448.c:rotlFixed Line | Count | Source | 116 | 37.8k | { | 117 | | return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y)); | 118 | 37.8k | } |
Unexecuted instantiation: dh.c:rotlFixed Unexecuted instantiation: ecc.c:rotlFixed Unexecuted instantiation: eccsi.c:rotlFixed Unexecuted instantiation: ed25519.c:rotlFixed Unexecuted instantiation: ed448.c:rotlFixed Unexecuted instantiation: fe_448.c:rotlFixed Unexecuted instantiation: fe_operations.c:rotlFixed Unexecuted instantiation: ge_448.c:rotlFixed Unexecuted instantiation: ge_operations.c:rotlFixed Unexecuted instantiation: hash.c:rotlFixed Unexecuted instantiation: hmac.c:rotlFixed Unexecuted instantiation: kdf.c:rotlFixed Unexecuted instantiation: md2.c:rotlFixed Line | Count | Source | 116 | 1.11M | { | 117 | | return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y)); | 118 | 1.11M | } |
Line | Count | Source | 116 | 52.4M | { | 117 | | return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y)); | 118 | 52.4M | } |
Unexecuted instantiation: memory.c:rotlFixed Unexecuted instantiation: poly1305.c:rotlFixed Unexecuted instantiation: pwdbased.c:rotlFixed Line | Count | Source | 116 | 419k | { | 117 | | return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y)); | 118 | 419k | } |
Unexecuted instantiation: ripemd.c:rotlFixed Unexecuted instantiation: rsa.c:rotlFixed Line | Count | Source | 116 | 274M | { | 117 | | return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y)); | 118 | 274M | } |
Line | Count | Source | 116 | 16.4M | { | 117 | | return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y)); | 118 | 16.4M | } |
Unexecuted instantiation: sha3.c:rotlFixed Unexecuted instantiation: sha512.c:rotlFixed Unexecuted instantiation: siphash.c:rotlFixed Unexecuted instantiation: sm2.c:rotlFixed Unexecuted instantiation: sm3.c:rotlFixed Unexecuted instantiation: sm4.c:rotlFixed Unexecuted instantiation: sp_int.c:rotlFixed Unexecuted instantiation: wc_encrypt.c:rotlFixed Unexecuted instantiation: wolfmath.c:rotlFixed Unexecuted instantiation: ssl.c:rotlFixed Unexecuted instantiation: tls.c:rotlFixed Unexecuted instantiation: tls13.c:rotlFixed Unexecuted instantiation: wc_mlkem.c:rotlFixed Unexecuted instantiation: wc_mlkem_poly.c:rotlFixed Unexecuted instantiation: internal.c:rotlFixed Unexecuted instantiation: keys.c:rotlFixed |
119 | | |
120 | | /* This routine performs a right circular arithmetic shift of <x> by <y> value. */ |
121 | | WC_MISC_STATIC WC_INLINE word32 rotrFixed(word32 x, word32 y) |
122 | 601M | { |
123 | 601M | return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y)); |
124 | 601M | } Line | Count | Source | 122 | 1.52M | { | 123 | | return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y)); | 124 | 1.52M | } |
Unexecuted instantiation: arc4.c:rotrFixed Unexecuted instantiation: asn.c:rotrFixed Unexecuted instantiation: blake2b.c:rotrFixed Unexecuted instantiation: blake2s.c:rotrFixed Unexecuted instantiation: camellia.c:rotrFixed Unexecuted instantiation: chacha.c:rotrFixed Unexecuted instantiation: chacha20_poly1305.c:rotrFixed Unexecuted instantiation: cmac.c:rotrFixed Unexecuted instantiation: coding.c:rotrFixed Unexecuted instantiation: curve25519.c:rotrFixed Unexecuted instantiation: curve448.c:rotrFixed Line | Count | Source | 122 | 167k | { | 123 | | return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y)); | 124 | 167k | } |
Unexecuted instantiation: dh.c:rotrFixed Unexecuted instantiation: ecc.c:rotrFixed Unexecuted instantiation: eccsi.c:rotrFixed Unexecuted instantiation: ed25519.c:rotrFixed Unexecuted instantiation: ed448.c:rotrFixed Unexecuted instantiation: fe_448.c:rotrFixed Unexecuted instantiation: fe_operations.c:rotrFixed Unexecuted instantiation: ge_448.c:rotrFixed Unexecuted instantiation: ge_operations.c:rotrFixed Unexecuted instantiation: hash.c:rotrFixed Unexecuted instantiation: hmac.c:rotrFixed Unexecuted instantiation: kdf.c:rotrFixed Unexecuted instantiation: md2.c:rotrFixed Unexecuted instantiation: md4.c:rotrFixed Unexecuted instantiation: md5.c:rotrFixed Unexecuted instantiation: memory.c:rotrFixed Unexecuted instantiation: poly1305.c:rotrFixed Unexecuted instantiation: pwdbased.c:rotrFixed Line | Count | Source | 122 | 419k | { | 123 | | return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y)); | 124 | 419k | } |
Unexecuted instantiation: ripemd.c:rotrFixed Unexecuted instantiation: rsa.c:rotrFixed Line | Count | Source | 122 | 18.9M | { | 123 | | return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y)); | 124 | 18.9M | } |
Line | Count | Source | 122 | 580M | { | 123 | | return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y)); | 124 | 580M | } |
Unexecuted instantiation: sha3.c:rotrFixed Unexecuted instantiation: sha512.c:rotrFixed Unexecuted instantiation: siphash.c:rotrFixed Unexecuted instantiation: sm2.c:rotrFixed Unexecuted instantiation: sm3.c:rotrFixed Unexecuted instantiation: sm4.c:rotrFixed Unexecuted instantiation: sp_int.c:rotrFixed Unexecuted instantiation: wc_encrypt.c:rotrFixed Unexecuted instantiation: wolfmath.c:rotrFixed Unexecuted instantiation: ssl.c:rotrFixed Unexecuted instantiation: tls.c:rotrFixed Unexecuted instantiation: tls13.c:rotrFixed Unexecuted instantiation: wc_mlkem.c:rotrFixed Unexecuted instantiation: wc_mlkem_poly.c:rotrFixed Unexecuted instantiation: internal.c:rotrFixed Unexecuted instantiation: keys.c:rotrFixed |
125 | | |
126 | | #endif |
127 | | |
128 | | /* This routine performs a left circular arithmetic shift of <x> by <y> value */ |
129 | | WC_MISC_STATIC WC_INLINE word16 rotlFixed16(word16 x, word16 y) |
130 | 0 | { |
131 | 0 | return (word16)((x << y) | (x >> (sizeof(x) * CHAR_BIT - y))); |
132 | 0 | } Unexecuted instantiation: aes.c:rotlFixed16 Unexecuted instantiation: arc4.c:rotlFixed16 Unexecuted instantiation: asn.c:rotlFixed16 Unexecuted instantiation: blake2b.c:rotlFixed16 Unexecuted instantiation: blake2s.c:rotlFixed16 Unexecuted instantiation: camellia.c:rotlFixed16 Unexecuted instantiation: chacha.c:rotlFixed16 Unexecuted instantiation: chacha20_poly1305.c:rotlFixed16 Unexecuted instantiation: cmac.c:rotlFixed16 Unexecuted instantiation: coding.c:rotlFixed16 Unexecuted instantiation: curve25519.c:rotlFixed16 Unexecuted instantiation: curve448.c:rotlFixed16 Unexecuted instantiation: des3.c:rotlFixed16 Unexecuted instantiation: dh.c:rotlFixed16 Unexecuted instantiation: ecc.c:rotlFixed16 Unexecuted instantiation: eccsi.c:rotlFixed16 Unexecuted instantiation: ed25519.c:rotlFixed16 Unexecuted instantiation: ed448.c:rotlFixed16 Unexecuted instantiation: fe_448.c:rotlFixed16 Unexecuted instantiation: fe_operations.c:rotlFixed16 Unexecuted instantiation: ge_448.c:rotlFixed16 Unexecuted instantiation: ge_operations.c:rotlFixed16 Unexecuted instantiation: hash.c:rotlFixed16 Unexecuted instantiation: hmac.c:rotlFixed16 Unexecuted instantiation: kdf.c:rotlFixed16 Unexecuted instantiation: md2.c:rotlFixed16 Unexecuted instantiation: md4.c:rotlFixed16 Unexecuted instantiation: md5.c:rotlFixed16 Unexecuted instantiation: memory.c:rotlFixed16 Unexecuted instantiation: poly1305.c:rotlFixed16 Unexecuted instantiation: pwdbased.c:rotlFixed16 Unexecuted instantiation: random.c:rotlFixed16 Unexecuted instantiation: ripemd.c:rotlFixed16 Unexecuted instantiation: rsa.c:rotlFixed16 Unexecuted instantiation: sha.c:rotlFixed16 Unexecuted instantiation: sha256.c:rotlFixed16 Unexecuted instantiation: sha3.c:rotlFixed16 Unexecuted instantiation: sha512.c:rotlFixed16 Unexecuted instantiation: siphash.c:rotlFixed16 Unexecuted instantiation: sm2.c:rotlFixed16 Unexecuted instantiation: sm3.c:rotlFixed16 Unexecuted instantiation: sm4.c:rotlFixed16 Unexecuted instantiation: sp_int.c:rotlFixed16 Unexecuted instantiation: wc_encrypt.c:rotlFixed16 Unexecuted instantiation: wolfmath.c:rotlFixed16 Unexecuted instantiation: ssl.c:rotlFixed16 Unexecuted instantiation: tls.c:rotlFixed16 Unexecuted instantiation: tls13.c:rotlFixed16 Unexecuted instantiation: wc_mlkem.c:rotlFixed16 Unexecuted instantiation: wc_mlkem_poly.c:rotlFixed16 Unexecuted instantiation: internal.c:rotlFixed16 Unexecuted instantiation: keys.c:rotlFixed16 |
133 | | |
134 | | |
135 | | /* This routine performs a right circular arithmetic shift of <x> by <y> value */ |
136 | | WC_MISC_STATIC WC_INLINE word16 rotrFixed16(word16 x, word16 y) |
137 | 0 | { |
138 | 0 | return (word16)((x >> y) | (x << (sizeof(x) * CHAR_BIT - y))); |
139 | 0 | } Unexecuted instantiation: aes.c:rotrFixed16 Unexecuted instantiation: arc4.c:rotrFixed16 Unexecuted instantiation: asn.c:rotrFixed16 Unexecuted instantiation: blake2b.c:rotrFixed16 Unexecuted instantiation: blake2s.c:rotrFixed16 Unexecuted instantiation: camellia.c:rotrFixed16 Unexecuted instantiation: chacha.c:rotrFixed16 Unexecuted instantiation: chacha20_poly1305.c:rotrFixed16 Unexecuted instantiation: cmac.c:rotrFixed16 Unexecuted instantiation: coding.c:rotrFixed16 Unexecuted instantiation: curve25519.c:rotrFixed16 Unexecuted instantiation: curve448.c:rotrFixed16 Unexecuted instantiation: des3.c:rotrFixed16 Unexecuted instantiation: dh.c:rotrFixed16 Unexecuted instantiation: ecc.c:rotrFixed16 Unexecuted instantiation: eccsi.c:rotrFixed16 Unexecuted instantiation: ed25519.c:rotrFixed16 Unexecuted instantiation: ed448.c:rotrFixed16 Unexecuted instantiation: fe_448.c:rotrFixed16 Unexecuted instantiation: fe_operations.c:rotrFixed16 Unexecuted instantiation: ge_448.c:rotrFixed16 Unexecuted instantiation: ge_operations.c:rotrFixed16 Unexecuted instantiation: hash.c:rotrFixed16 Unexecuted instantiation: hmac.c:rotrFixed16 Unexecuted instantiation: kdf.c:rotrFixed16 Unexecuted instantiation: md2.c:rotrFixed16 Unexecuted instantiation: md4.c:rotrFixed16 Unexecuted instantiation: md5.c:rotrFixed16 Unexecuted instantiation: memory.c:rotrFixed16 Unexecuted instantiation: poly1305.c:rotrFixed16 Unexecuted instantiation: pwdbased.c:rotrFixed16 Unexecuted instantiation: random.c:rotrFixed16 Unexecuted instantiation: ripemd.c:rotrFixed16 Unexecuted instantiation: rsa.c:rotrFixed16 Unexecuted instantiation: sha.c:rotrFixed16 Unexecuted instantiation: sha256.c:rotrFixed16 Unexecuted instantiation: sha3.c:rotrFixed16 Unexecuted instantiation: sha512.c:rotrFixed16 Unexecuted instantiation: siphash.c:rotrFixed16 Unexecuted instantiation: sm2.c:rotrFixed16 Unexecuted instantiation: sm3.c:rotrFixed16 Unexecuted instantiation: sm4.c:rotrFixed16 Unexecuted instantiation: sp_int.c:rotrFixed16 Unexecuted instantiation: wc_encrypt.c:rotrFixed16 Unexecuted instantiation: wolfmath.c:rotrFixed16 Unexecuted instantiation: ssl.c:rotrFixed16 Unexecuted instantiation: tls.c:rotrFixed16 Unexecuted instantiation: tls13.c:rotrFixed16 Unexecuted instantiation: wc_mlkem.c:rotrFixed16 Unexecuted instantiation: wc_mlkem_poly.c:rotrFixed16 Unexecuted instantiation: internal.c:rotrFixed16 Unexecuted instantiation: keys.c:rotrFixed16 |
140 | | |
141 | | /* This routine performs a byte swap of 32-bit word value. */ |
142 | | #if defined(__CCRX__) && !defined(NO_INLINE) /* shortest version for CC-RX */ |
143 | | #define ByteReverseWord32(value) _builtin_revl(value) |
144 | | #else |
145 | | WC_MISC_STATIC WC_INLINE word32 ByteReverseWord32(word32 value) |
146 | 37.2M | { |
147 | | #ifdef PPC_INTRINSICS |
148 | | /* PPC: load reverse indexed instruction */ |
149 | | return (word32)__lwbrx(&value,0); |
150 | | #elif defined(__ICCARM__) |
151 | | return (word32)__REV(value); |
152 | | #elif defined(KEIL_INTRINSICS) |
153 | | return (word32)__rev(value); |
154 | | #elif defined(__CCRX__) |
155 | | return (word32)_builtin_revl(value); |
156 | | #elif defined(WOLF_ALLOW_BUILTIN) && \ |
157 | | defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3) |
158 | | return (word32)__builtin_bswap32(value); |
159 | | #elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \ |
160 | | defined(__aarch64__) |
161 | | __asm__ volatile ( |
162 | | "REV32 %0, %0 \n" |
163 | | : "+r" (value) |
164 | | : |
165 | | ); |
166 | | return value; |
167 | | #elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \ |
168 | | (defined(__thumb__) || defined(__arm__)) |
169 | | __asm__ volatile ( |
170 | | "REV %0, %0 \n" |
171 | | : "+r" (value) |
172 | | : |
173 | | ); |
174 | | return value; |
175 | | #elif defined(FAST_ROTATE) |
176 | | /* 5 instructions with rotate instruction, 9 without */ |
177 | 37.2M | return (rotrFixed(value, 8U) & 0xff00ff00) | |
178 | 37.2M | (rotlFixed(value, 8U) & 0x00ff00ff); |
179 | | #else |
180 | | /* 6 instructions with rotate instruction, 8 without */ |
181 | | value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); |
182 | | return rotlFixed(value, 16U); |
183 | | #endif |
184 | 37.2M | } Line | Count | Source | 146 | 1.52M | { | 147 | | #ifdef PPC_INTRINSICS | 148 | | /* PPC: load reverse indexed instruction */ | 149 | | return (word32)__lwbrx(&value,0); | 150 | | #elif defined(__ICCARM__) | 151 | | return (word32)__REV(value); | 152 | | #elif defined(KEIL_INTRINSICS) | 153 | | return (word32)__rev(value); | 154 | | #elif defined(__CCRX__) | 155 | | return (word32)_builtin_revl(value); | 156 | | #elif defined(WOLF_ALLOW_BUILTIN) && \ | 157 | | defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3) | 158 | | return (word32)__builtin_bswap32(value); | 159 | | #elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \ | 160 | | defined(__aarch64__) | 161 | | __asm__ volatile ( | 162 | | "REV32 %0, %0 \n" | 163 | | : "+r" (value) | 164 | | : | 165 | | ); | 166 | | return value; | 167 | | #elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \ | 168 | | (defined(__thumb__) || defined(__arm__)) | 169 | | __asm__ volatile ( | 170 | | "REV %0, %0 \n" | 171 | | : "+r" (value) | 172 | | : | 173 | | ); | 174 | | return value; | 175 | | #elif defined(FAST_ROTATE) | 176 | | /* 5 instructions with rotate instruction, 9 without */ | 177 | 1.52M | return (rotrFixed(value, 8U) & 0xff00ff00) | | 178 | 1.52M | (rotlFixed(value, 8U) & 0x00ff00ff); | 179 | | #else | 180 | | /* 6 instructions with rotate instruction, 8 without */ | 181 | | value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); | 182 | | return rotlFixed(value, 16U); | 183 | | #endif | 184 | 1.52M | } |
Unexecuted instantiation: arc4.c:ByteReverseWord32 Unexecuted instantiation: asn.c:ByteReverseWord32 Unexecuted instantiation: blake2b.c:ByteReverseWord32 Unexecuted instantiation: blake2s.c:ByteReverseWord32 Unexecuted instantiation: camellia.c:ByteReverseWord32 Unexecuted instantiation: chacha.c:ByteReverseWord32 Unexecuted instantiation: chacha20_poly1305.c:ByteReverseWord32 Unexecuted instantiation: cmac.c:ByteReverseWord32 Unexecuted instantiation: coding.c:ByteReverseWord32 Unexecuted instantiation: curve25519.c:ByteReverseWord32 Unexecuted instantiation: curve448.c:ByteReverseWord32 Line | Count | Source | 146 | 15.1k | { | 147 | | #ifdef PPC_INTRINSICS | 148 | | /* PPC: load reverse indexed instruction */ | 149 | | return (word32)__lwbrx(&value,0); | 150 | | #elif defined(__ICCARM__) | 151 | | return (word32)__REV(value); | 152 | | #elif defined(KEIL_INTRINSICS) | 153 | | return (word32)__rev(value); | 154 | | #elif defined(__CCRX__) | 155 | | return (word32)_builtin_revl(value); | 156 | | #elif defined(WOLF_ALLOW_BUILTIN) && \ | 157 | | defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3) | 158 | | return (word32)__builtin_bswap32(value); | 159 | | #elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \ | 160 | | defined(__aarch64__) | 161 | | __asm__ volatile ( | 162 | | "REV32 %0, %0 \n" | 163 | | : "+r" (value) | 164 | | : | 165 | | ); | 166 | | return value; | 167 | | #elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \ | 168 | | (defined(__thumb__) || defined(__arm__)) | 169 | | __asm__ volatile ( | 170 | | "REV %0, %0 \n" | 171 | | : "+r" (value) | 172 | | : | 173 | | ); | 174 | | return value; | 175 | | #elif defined(FAST_ROTATE) | 176 | | /* 5 instructions with rotate instruction, 9 without */ | 177 | 15.1k | return (rotrFixed(value, 8U) & 0xff00ff00) | | 178 | 15.1k | (rotlFixed(value, 8U) & 0x00ff00ff); | 179 | | #else | 180 | | /* 6 instructions with rotate instruction, 8 without */ | 181 | | value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); | 182 | | return rotlFixed(value, 16U); | 183 | | #endif | 184 | 15.1k | } |
Unexecuted instantiation: dh.c:ByteReverseWord32 Unexecuted instantiation: ecc.c:ByteReverseWord32 Unexecuted instantiation: eccsi.c:ByteReverseWord32 Unexecuted instantiation: ed25519.c:ByteReverseWord32 Unexecuted instantiation: ed448.c:ByteReverseWord32 Unexecuted instantiation: fe_448.c:ByteReverseWord32 Unexecuted instantiation: fe_operations.c:ByteReverseWord32 Unexecuted instantiation: ge_448.c:ByteReverseWord32 Unexecuted instantiation: ge_operations.c:ByteReverseWord32 Unexecuted instantiation: hash.c:ByteReverseWord32 Unexecuted instantiation: hmac.c:ByteReverseWord32 Unexecuted instantiation: kdf.c:ByteReverseWord32 Unexecuted instantiation: md2.c:ByteReverseWord32 Unexecuted instantiation: md4.c:ByteReverseWord32 Unexecuted instantiation: md5.c:ByteReverseWord32 Unexecuted instantiation: memory.c:ByteReverseWord32 Unexecuted instantiation: poly1305.c:ByteReverseWord32 Unexecuted instantiation: pwdbased.c:ByteReverseWord32 random.c:ByteReverseWord32 Line | Count | Source | 146 | 419k | { | 147 | | #ifdef PPC_INTRINSICS | 148 | | /* PPC: load reverse indexed instruction */ | 149 | | return (word32)__lwbrx(&value,0); | 150 | | #elif defined(__ICCARM__) | 151 | | return (word32)__REV(value); | 152 | | #elif defined(KEIL_INTRINSICS) | 153 | | return (word32)__rev(value); | 154 | | #elif defined(__CCRX__) | 155 | | return (word32)_builtin_revl(value); | 156 | | #elif defined(WOLF_ALLOW_BUILTIN) && \ | 157 | | defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3) | 158 | | return (word32)__builtin_bswap32(value); | 159 | | #elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \ | 160 | | defined(__aarch64__) | 161 | | __asm__ volatile ( | 162 | | "REV32 %0, %0 \n" | 163 | | : "+r" (value) | 164 | | : | 165 | | ); | 166 | | return value; | 167 | | #elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \ | 168 | | (defined(__thumb__) || defined(__arm__)) | 169 | | __asm__ volatile ( | 170 | | "REV %0, %0 \n" | 171 | | : "+r" (value) | 172 | | : | 173 | | ); | 174 | | return value; | 175 | | #elif defined(FAST_ROTATE) | 176 | | /* 5 instructions with rotate instruction, 9 without */ | 177 | 419k | return (rotrFixed(value, 8U) & 0xff00ff00) | | 178 | 419k | (rotlFixed(value, 8U) & 0x00ff00ff); | 179 | | #else | 180 | | /* 6 instructions with rotate instruction, 8 without */ | 181 | | value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); | 182 | | return rotlFixed(value, 16U); | 183 | | #endif | 184 | 419k | } |
Unexecuted instantiation: ripemd.c:ByteReverseWord32 Unexecuted instantiation: rsa.c:ByteReverseWord32 Line | Count | Source | 146 | 18.9M | { | 147 | | #ifdef PPC_INTRINSICS | 148 | | /* PPC: load reverse indexed instruction */ | 149 | | return (word32)__lwbrx(&value,0); | 150 | | #elif defined(__ICCARM__) | 151 | | return (word32)__REV(value); | 152 | | #elif defined(KEIL_INTRINSICS) | 153 | | return (word32)__rev(value); | 154 | | #elif defined(__CCRX__) | 155 | | return (word32)_builtin_revl(value); | 156 | | #elif defined(WOLF_ALLOW_BUILTIN) && \ | 157 | | defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3) | 158 | | return (word32)__builtin_bswap32(value); | 159 | | #elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \ | 160 | | defined(__aarch64__) | 161 | | __asm__ volatile ( | 162 | | "REV32 %0, %0 \n" | 163 | | : "+r" (value) | 164 | | : | 165 | | ); | 166 | | return value; | 167 | | #elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \ | 168 | | (defined(__thumb__) || defined(__arm__)) | 169 | | __asm__ volatile ( | 170 | | "REV %0, %0 \n" | 171 | | : "+r" (value) | 172 | | : | 173 | | ); | 174 | | return value; | 175 | | #elif defined(FAST_ROTATE) | 176 | | /* 5 instructions with rotate instruction, 9 without */ | 177 | 18.9M | return (rotrFixed(value, 8U) & 0xff00ff00) | | 178 | 18.9M | (rotlFixed(value, 8U) & 0x00ff00ff); | 179 | | #else | 180 | | /* 6 instructions with rotate instruction, 8 without */ | 181 | | value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); | 182 | | return rotlFixed(value, 16U); | 183 | | #endif | 184 | 18.9M | } |
sha256.c:ByteReverseWord32 Line | Count | Source | 146 | 16.4M | { | 147 | | #ifdef PPC_INTRINSICS | 148 | | /* PPC: load reverse indexed instruction */ | 149 | | return (word32)__lwbrx(&value,0); | 150 | | #elif defined(__ICCARM__) | 151 | | return (word32)__REV(value); | 152 | | #elif defined(KEIL_INTRINSICS) | 153 | | return (word32)__rev(value); | 154 | | #elif defined(__CCRX__) | 155 | | return (word32)_builtin_revl(value); | 156 | | #elif defined(WOLF_ALLOW_BUILTIN) && \ | 157 | | defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3) | 158 | | return (word32)__builtin_bswap32(value); | 159 | | #elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \ | 160 | | defined(__aarch64__) | 161 | | __asm__ volatile ( | 162 | | "REV32 %0, %0 \n" | 163 | | : "+r" (value) | 164 | | : | 165 | | ); | 166 | | return value; | 167 | | #elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \ | 168 | | (defined(__thumb__) || defined(__arm__)) | 169 | | __asm__ volatile ( | 170 | | "REV %0, %0 \n" | 171 | | : "+r" (value) | 172 | | : | 173 | | ); | 174 | | return value; | 175 | | #elif defined(FAST_ROTATE) | 176 | | /* 5 instructions with rotate instruction, 9 without */ | 177 | 16.4M | return (rotrFixed(value, 8U) & 0xff00ff00) | | 178 | 16.4M | (rotlFixed(value, 8U) & 0x00ff00ff); | 179 | | #else | 180 | | /* 6 instructions with rotate instruction, 8 without */ | 181 | | value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8); | 182 | | return rotlFixed(value, 16U); | 183 | | #endif | 184 | 16.4M | } |
Unexecuted instantiation: sha3.c:ByteReverseWord32 Unexecuted instantiation: sha512.c:ByteReverseWord32 Unexecuted instantiation: siphash.c:ByteReverseWord32 Unexecuted instantiation: sm2.c:ByteReverseWord32 Unexecuted instantiation: sm3.c:ByteReverseWord32 Unexecuted instantiation: sm4.c:ByteReverseWord32 Unexecuted instantiation: sp_int.c:ByteReverseWord32 Unexecuted instantiation: wc_encrypt.c:ByteReverseWord32 Unexecuted instantiation: wolfmath.c:ByteReverseWord32 Unexecuted instantiation: ssl.c:ByteReverseWord32 Unexecuted instantiation: tls.c:ByteReverseWord32 Unexecuted instantiation: tls13.c:ByteReverseWord32 Unexecuted instantiation: wc_mlkem.c:ByteReverseWord32 Unexecuted instantiation: wc_mlkem_poly.c:ByteReverseWord32 Unexecuted instantiation: internal.c:ByteReverseWord32 Unexecuted instantiation: keys.c:ByteReverseWord32 |
185 | | #endif /* __CCRX__ */ |
186 | | /* This routine performs a byte swap of words array of a given count. */ |
187 | | WC_MISC_STATIC WC_INLINE void ByteReverseWords(word32* out, const word32* in, |
188 | | word32 byteCount) |
189 | 2.38M | { |
190 | 2.38M | word32 i; |
191 | | |
192 | 2.38M | #ifdef WOLFSSL_USE_ALIGN |
193 | 2.38M | if ((((size_t)in & 0x3) == 0) && |
194 | 2.38M | (((size_t)out & 0x3) == 0)) |
195 | 2.38M | #endif |
196 | 2.38M | { |
197 | 2.38M | word32 count = byteCount/(word32)sizeof(word32); |
198 | 37.7M | for (i = 0; i < count; i++) |
199 | 35.3M | out[i] = ByteReverseWord32(in[i]); |
200 | 2.38M | } |
201 | 0 | #ifdef WOLFSSL_USE_ALIGN |
202 | 0 | else if (((size_t)in & 0x3) == 0) { |
203 | 0 | byte *out_bytes = (byte *)out; |
204 | 0 | word32 scratch; |
205 | |
|
206 | 0 | byteCount &= ~0x3U; |
207 | |
|
208 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word32)) { |
209 | 0 | scratch = ByteReverseWord32(*in++); |
210 | 0 | XMEMCPY(out_bytes + i, &scratch, sizeof(scratch)); |
211 | 0 | } |
212 | 0 | } |
213 | 0 | else if (((size_t)out & 0x3) == 0) { |
214 | 0 | const byte *in_bytes = (const byte *)in; |
215 | 0 | word32 scratch; |
216 | |
|
217 | 0 | byteCount &= ~0x3U; |
218 | |
|
219 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word32)) { |
220 | 0 | XMEMCPY(&scratch, in_bytes + i, sizeof(scratch)); |
221 | 0 | *out++ = ByteReverseWord32(scratch); |
222 | 0 | } |
223 | 0 | } |
224 | 0 | else { |
225 | 0 | const byte *in_bytes = (const byte *)in; |
226 | 0 | byte *out_bytes = (byte *)out; |
227 | 0 | word32 scratch; |
228 | |
|
229 | 0 | byteCount &= ~0x3U; |
230 | |
|
231 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word32)) { |
232 | 0 | XMEMCPY(&scratch, in_bytes + i, sizeof(scratch)); |
233 | 0 | scratch = ByteReverseWord32(scratch); |
234 | 0 | XMEMCPY(out_bytes + i, &scratch, sizeof(scratch)); |
235 | 0 | } |
236 | 0 | } |
237 | 2.38M | #endif |
238 | 2.38M | } Line | Count | Source | 189 | 8.52k | { | 190 | 8.52k | word32 i; | 191 | | | 192 | 8.52k | #ifdef WOLFSSL_USE_ALIGN | 193 | 8.52k | if ((((size_t)in & 0x3) == 0) && | 194 | 8.52k | (((size_t)out & 0x3) == 0)) | 195 | 8.52k | #endif | 196 | 8.52k | { | 197 | 8.52k | word32 count = byteCount/(word32)sizeof(word32); | 198 | 54.7k | for (i = 0; i < count; i++) | 199 | 46.2k | out[i] = ByteReverseWord32(in[i]); | 200 | 8.52k | } | 201 | 0 | #ifdef WOLFSSL_USE_ALIGN | 202 | 0 | else if (((size_t)in & 0x3) == 0) { | 203 | 0 | byte *out_bytes = (byte *)out; | 204 | 0 | word32 scratch; | 205 | |
| 206 | 0 | byteCount &= ~0x3U; | 207 | |
| 208 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word32)) { | 209 | 0 | scratch = ByteReverseWord32(*in++); | 210 | 0 | XMEMCPY(out_bytes + i, &scratch, sizeof(scratch)); | 211 | 0 | } | 212 | 0 | } | 213 | 0 | else if (((size_t)out & 0x3) == 0) { | 214 | 0 | const byte *in_bytes = (const byte *)in; | 215 | 0 | word32 scratch; | 216 | |
| 217 | 0 | byteCount &= ~0x3U; | 218 | |
| 219 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word32)) { | 220 | 0 | XMEMCPY(&scratch, in_bytes + i, sizeof(scratch)); | 221 | 0 | *out++ = ByteReverseWord32(scratch); | 222 | 0 | } | 223 | 0 | } | 224 | 0 | else { | 225 | 0 | const byte *in_bytes = (const byte *)in; | 226 | 0 | byte *out_bytes = (byte *)out; | 227 | 0 | word32 scratch; | 228 | |
| 229 | 0 | byteCount &= ~0x3U; | 230 | |
| 231 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word32)) { | 232 | 0 | XMEMCPY(&scratch, in_bytes + i, sizeof(scratch)); | 233 | 0 | scratch = ByteReverseWord32(scratch); | 234 | 0 | XMEMCPY(out_bytes + i, &scratch, sizeof(scratch)); | 235 | 0 | } | 236 | 0 | } | 237 | 8.52k | #endif | 238 | 8.52k | } |
Unexecuted instantiation: arc4.c:ByteReverseWords Unexecuted instantiation: asn.c:ByteReverseWords Unexecuted instantiation: blake2b.c:ByteReverseWords Unexecuted instantiation: blake2s.c:ByteReverseWords Unexecuted instantiation: camellia.c:ByteReverseWords Unexecuted instantiation: chacha.c:ByteReverseWords Unexecuted instantiation: chacha20_poly1305.c:ByteReverseWords Unexecuted instantiation: cmac.c:ByteReverseWords Unexecuted instantiation: coding.c:ByteReverseWords Unexecuted instantiation: curve25519.c:ByteReverseWords Unexecuted instantiation: curve448.c:ByteReverseWords Unexecuted instantiation: des3.c:ByteReverseWords Unexecuted instantiation: dh.c:ByteReverseWords Unexecuted instantiation: ecc.c:ByteReverseWords Unexecuted instantiation: eccsi.c:ByteReverseWords Unexecuted instantiation: ed25519.c:ByteReverseWords Unexecuted instantiation: ed448.c:ByteReverseWords Unexecuted instantiation: fe_448.c:ByteReverseWords Unexecuted instantiation: fe_operations.c:ByteReverseWords Unexecuted instantiation: ge_448.c:ByteReverseWords Unexecuted instantiation: ge_operations.c:ByteReverseWords Unexecuted instantiation: hash.c:ByteReverseWords Unexecuted instantiation: hmac.c:ByteReverseWords Unexecuted instantiation: kdf.c:ByteReverseWords Unexecuted instantiation: md2.c:ByteReverseWords Unexecuted instantiation: md4.c:ByteReverseWords Unexecuted instantiation: md5.c:ByteReverseWords Unexecuted instantiation: memory.c:ByteReverseWords Unexecuted instantiation: poly1305.c:ByteReverseWords Unexecuted instantiation: pwdbased.c:ByteReverseWords Unexecuted instantiation: random.c:ByteReverseWords Unexecuted instantiation: ripemd.c:ByteReverseWords Unexecuted instantiation: rsa.c:ByteReverseWords Line | Count | Source | 189 | 1.27M | { | 190 | 1.27M | word32 i; | 191 | | | 192 | 1.27M | #ifdef WOLFSSL_USE_ALIGN | 193 | 1.27M | if ((((size_t)in & 0x3) == 0) && | 194 | 1.27M | (((size_t)out & 0x3) == 0)) | 195 | 1.27M | #endif | 196 | 1.27M | { | 197 | 1.27M | word32 count = byteCount/(word32)sizeof(word32); | 198 | 20.1M | for (i = 0; i < count; i++) | 199 | 18.9M | out[i] = ByteReverseWord32(in[i]); | 200 | 1.27M | } | 201 | 0 | #ifdef WOLFSSL_USE_ALIGN | 202 | 0 | else if (((size_t)in & 0x3) == 0) { | 203 | 0 | byte *out_bytes = (byte *)out; | 204 | 0 | word32 scratch; | 205 | |
| 206 | 0 | byteCount &= ~0x3U; | 207 | |
| 208 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word32)) { | 209 | 0 | scratch = ByteReverseWord32(*in++); | 210 | 0 | XMEMCPY(out_bytes + i, &scratch, sizeof(scratch)); | 211 | 0 | } | 212 | 0 | } | 213 | 0 | else if (((size_t)out & 0x3) == 0) { | 214 | 0 | const byte *in_bytes = (const byte *)in; | 215 | 0 | word32 scratch; | 216 | |
| 217 | 0 | byteCount &= ~0x3U; | 218 | |
| 219 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word32)) { | 220 | 0 | XMEMCPY(&scratch, in_bytes + i, sizeof(scratch)); | 221 | 0 | *out++ = ByteReverseWord32(scratch); | 222 | 0 | } | 223 | 0 | } | 224 | 0 | else { | 225 | 0 | const byte *in_bytes = (const byte *)in; | 226 | 0 | byte *out_bytes = (byte *)out; | 227 | 0 | word32 scratch; | 228 | |
| 229 | 0 | byteCount &= ~0x3U; | 230 | |
| 231 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word32)) { | 232 | 0 | XMEMCPY(&scratch, in_bytes + i, sizeof(scratch)); | 233 | 0 | scratch = ByteReverseWord32(scratch); | 234 | 0 | XMEMCPY(out_bytes + i, &scratch, sizeof(scratch)); | 235 | 0 | } | 236 | 0 | } | 237 | 1.27M | #endif | 238 | 1.27M | } |
sha256.c:ByteReverseWords Line | Count | Source | 189 | 1.10M | { | 190 | 1.10M | word32 i; | 191 | | | 192 | 1.10M | #ifdef WOLFSSL_USE_ALIGN | 193 | 1.10M | if ((((size_t)in & 0x3) == 0) && | 194 | 1.10M | (((size_t)out & 0x3) == 0)) | 195 | 1.10M | #endif | 196 | 1.10M | { | 197 | 1.10M | word32 count = byteCount/(word32)sizeof(word32); | 198 | 17.5M | for (i = 0; i < count; i++) | 199 | 16.4M | out[i] = ByteReverseWord32(in[i]); | 200 | 1.10M | } | 201 | 0 | #ifdef WOLFSSL_USE_ALIGN | 202 | 0 | else if (((size_t)in & 0x3) == 0) { | 203 | 0 | byte *out_bytes = (byte *)out; | 204 | 0 | word32 scratch; | 205 | |
| 206 | 0 | byteCount &= ~0x3U; | 207 | |
| 208 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word32)) { | 209 | 0 | scratch = ByteReverseWord32(*in++); | 210 | 0 | XMEMCPY(out_bytes + i, &scratch, sizeof(scratch)); | 211 | 0 | } | 212 | 0 | } | 213 | 0 | else if (((size_t)out & 0x3) == 0) { | 214 | 0 | const byte *in_bytes = (const byte *)in; | 215 | 0 | word32 scratch; | 216 | |
| 217 | 0 | byteCount &= ~0x3U; | 218 | |
| 219 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word32)) { | 220 | 0 | XMEMCPY(&scratch, in_bytes + i, sizeof(scratch)); | 221 | 0 | *out++ = ByteReverseWord32(scratch); | 222 | 0 | } | 223 | 0 | } | 224 | 0 | else { | 225 | 0 | const byte *in_bytes = (const byte *)in; | 226 | 0 | byte *out_bytes = (byte *)out; | 227 | 0 | word32 scratch; | 228 | |
| 229 | 0 | byteCount &= ~0x3U; | 230 | |
| 231 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word32)) { | 232 | 0 | XMEMCPY(&scratch, in_bytes + i, sizeof(scratch)); | 233 | 0 | scratch = ByteReverseWord32(scratch); | 234 | 0 | XMEMCPY(out_bytes + i, &scratch, sizeof(scratch)); | 235 | 0 | } | 236 | 0 | } | 237 | 1.10M | #endif | 238 | 1.10M | } |
Unexecuted instantiation: sha3.c:ByteReverseWords Unexecuted instantiation: sha512.c:ByteReverseWords Unexecuted instantiation: siphash.c:ByteReverseWords Unexecuted instantiation: sm2.c:ByteReverseWords Unexecuted instantiation: sm3.c:ByteReverseWords Unexecuted instantiation: sm4.c:ByteReverseWords Unexecuted instantiation: sp_int.c:ByteReverseWords Unexecuted instantiation: wc_encrypt.c:ByteReverseWords Unexecuted instantiation: wolfmath.c:ByteReverseWords Unexecuted instantiation: ssl.c:ByteReverseWords Unexecuted instantiation: tls.c:ByteReverseWords Unexecuted instantiation: tls13.c:ByteReverseWords Unexecuted instantiation: wc_mlkem.c:ByteReverseWords Unexecuted instantiation: wc_mlkem_poly.c:ByteReverseWords Unexecuted instantiation: internal.c:ByteReverseWords Unexecuted instantiation: keys.c:ByteReverseWords |
239 | | |
240 | | #if ((defined(WOLFSSL_AARCH64_BUILD) || defined(__aarch64__)) && \ |
241 | | defined(__APPLE__)) || \ |
242 | | defined(WOLFSSL_X86_64_BUILD) || defined(WOLFSSL_X86_BUILD) |
243 | | #ifndef WOLFSSL_RW_UNALIGNED_16 |
244 | | #define WOLFSSL_RW_UNALIGNED_16 |
245 | | #endif |
246 | | #ifndef WOLFSSL_RW_UNALIGNED_32 |
247 | | #define WOLFSSL_RW_UNALIGNED_32 |
248 | | #endif |
249 | | #endif |
250 | | #ifdef WOLFSSL_RW_UNALIGNED_16 |
251 | | typedef word16 MAYBE_UNALIGNED uword16; |
252 | | #endif |
253 | | #ifdef WOLFSSL_RW_UNALIGNED_32 |
254 | | typedef word32 MAYBE_UNALIGNED uword32; |
255 | | #endif |
256 | | |
257 | | WC_MISC_STATIC WC_INLINE word16 readUnalignedWord16(const byte *in) |
258 | 0 | { |
259 | 0 | #ifndef WOLFSSL_RW_UNALIGNED_16 |
260 | 0 | if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word16) - 1U)) == (wc_ptr_t)0) { |
261 | 0 | return *(const word16 *)in; |
262 | 0 | } |
263 | 0 | else { |
264 | 0 | word16 out = 0; |
265 | 0 | XMEMCPY(&out, in, sizeof(out)); |
266 | 0 | return out; |
267 | 0 | } |
268 | 0 | #else |
269 | 0 | return *(const uword16 *)in; |
270 | 0 | #endif |
271 | 0 | } Unexecuted instantiation: aes.c:readUnalignedWord16 Unexecuted instantiation: arc4.c:readUnalignedWord16 Unexecuted instantiation: asn.c:readUnalignedWord16 Unexecuted instantiation: blake2b.c:readUnalignedWord16 Unexecuted instantiation: blake2s.c:readUnalignedWord16 Unexecuted instantiation: camellia.c:readUnalignedWord16 Unexecuted instantiation: chacha.c:readUnalignedWord16 Unexecuted instantiation: chacha20_poly1305.c:readUnalignedWord16 Unexecuted instantiation: cmac.c:readUnalignedWord16 Unexecuted instantiation: coding.c:readUnalignedWord16 Unexecuted instantiation: curve25519.c:readUnalignedWord16 Unexecuted instantiation: curve448.c:readUnalignedWord16 Unexecuted instantiation: des3.c:readUnalignedWord16 Unexecuted instantiation: dh.c:readUnalignedWord16 Unexecuted instantiation: ecc.c:readUnalignedWord16 Unexecuted instantiation: eccsi.c:readUnalignedWord16 Unexecuted instantiation: ed25519.c:readUnalignedWord16 Unexecuted instantiation: ed448.c:readUnalignedWord16 Unexecuted instantiation: fe_448.c:readUnalignedWord16 Unexecuted instantiation: fe_operations.c:readUnalignedWord16 Unexecuted instantiation: ge_448.c:readUnalignedWord16 Unexecuted instantiation: ge_operations.c:readUnalignedWord16 Unexecuted instantiation: hash.c:readUnalignedWord16 Unexecuted instantiation: hmac.c:readUnalignedWord16 Unexecuted instantiation: kdf.c:readUnalignedWord16 Unexecuted instantiation: md2.c:readUnalignedWord16 Unexecuted instantiation: md4.c:readUnalignedWord16 Unexecuted instantiation: md5.c:readUnalignedWord16 Unexecuted instantiation: memory.c:readUnalignedWord16 Unexecuted instantiation: poly1305.c:readUnalignedWord16 Unexecuted instantiation: pwdbased.c:readUnalignedWord16 Unexecuted instantiation: random.c:readUnalignedWord16 Unexecuted instantiation: ripemd.c:readUnalignedWord16 Unexecuted instantiation: rsa.c:readUnalignedWord16 Unexecuted instantiation: sha.c:readUnalignedWord16 Unexecuted instantiation: sha256.c:readUnalignedWord16 Unexecuted instantiation: sha3.c:readUnalignedWord16 Unexecuted instantiation: sha512.c:readUnalignedWord16 Unexecuted instantiation: siphash.c:readUnalignedWord16 Unexecuted instantiation: sm2.c:readUnalignedWord16 Unexecuted instantiation: sm3.c:readUnalignedWord16 Unexecuted instantiation: sm4.c:readUnalignedWord16 Unexecuted instantiation: sp_int.c:readUnalignedWord16 Unexecuted instantiation: wc_encrypt.c:readUnalignedWord16 Unexecuted instantiation: wolfmath.c:readUnalignedWord16 Unexecuted instantiation: ssl.c:readUnalignedWord16 Unexecuted instantiation: tls.c:readUnalignedWord16 Unexecuted instantiation: tls13.c:readUnalignedWord16 Unexecuted instantiation: wc_mlkem.c:readUnalignedWord16 Unexecuted instantiation: wc_mlkem_poly.c:readUnalignedWord16 Unexecuted instantiation: internal.c:readUnalignedWord16 Unexecuted instantiation: keys.c:readUnalignedWord16 |
272 | | |
273 | | WC_MISC_STATIC WC_INLINE word16 writeUnalignedWord16(void *out, word16 in) |
274 | 0 | { |
275 | 0 | #ifndef WOLFSSL_RW_UNALIGNED_16 |
276 | 0 | if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word16) - 1U)) == (wc_ptr_t)0) { |
277 | 0 | *(word16 *)out = in; |
278 | 0 | } |
279 | 0 | else { |
280 | 0 | XMEMCPY(out, &in, sizeof(in)); |
281 | 0 | } |
282 | 0 | #else |
283 | 0 | *(uword16 *)out = in; |
284 | 0 | #endif |
285 | 0 | return in; |
286 | 0 | } Unexecuted instantiation: aes.c:writeUnalignedWord16 Unexecuted instantiation: arc4.c:writeUnalignedWord16 Unexecuted instantiation: asn.c:writeUnalignedWord16 Unexecuted instantiation: blake2b.c:writeUnalignedWord16 Unexecuted instantiation: blake2s.c:writeUnalignedWord16 Unexecuted instantiation: camellia.c:writeUnalignedWord16 Unexecuted instantiation: chacha.c:writeUnalignedWord16 Unexecuted instantiation: chacha20_poly1305.c:writeUnalignedWord16 Unexecuted instantiation: cmac.c:writeUnalignedWord16 Unexecuted instantiation: coding.c:writeUnalignedWord16 Unexecuted instantiation: curve25519.c:writeUnalignedWord16 Unexecuted instantiation: curve448.c:writeUnalignedWord16 Unexecuted instantiation: des3.c:writeUnalignedWord16 Unexecuted instantiation: dh.c:writeUnalignedWord16 Unexecuted instantiation: ecc.c:writeUnalignedWord16 Unexecuted instantiation: eccsi.c:writeUnalignedWord16 Unexecuted instantiation: ed25519.c:writeUnalignedWord16 Unexecuted instantiation: ed448.c:writeUnalignedWord16 Unexecuted instantiation: fe_448.c:writeUnalignedWord16 Unexecuted instantiation: fe_operations.c:writeUnalignedWord16 Unexecuted instantiation: ge_448.c:writeUnalignedWord16 Unexecuted instantiation: ge_operations.c:writeUnalignedWord16 Unexecuted instantiation: hash.c:writeUnalignedWord16 Unexecuted instantiation: hmac.c:writeUnalignedWord16 Unexecuted instantiation: kdf.c:writeUnalignedWord16 Unexecuted instantiation: md2.c:writeUnalignedWord16 Unexecuted instantiation: md4.c:writeUnalignedWord16 Unexecuted instantiation: md5.c:writeUnalignedWord16 Unexecuted instantiation: memory.c:writeUnalignedWord16 Unexecuted instantiation: poly1305.c:writeUnalignedWord16 Unexecuted instantiation: pwdbased.c:writeUnalignedWord16 Unexecuted instantiation: random.c:writeUnalignedWord16 Unexecuted instantiation: ripemd.c:writeUnalignedWord16 Unexecuted instantiation: rsa.c:writeUnalignedWord16 Unexecuted instantiation: sha.c:writeUnalignedWord16 Unexecuted instantiation: sha256.c:writeUnalignedWord16 Unexecuted instantiation: sha3.c:writeUnalignedWord16 Unexecuted instantiation: sha512.c:writeUnalignedWord16 Unexecuted instantiation: siphash.c:writeUnalignedWord16 Unexecuted instantiation: sm2.c:writeUnalignedWord16 Unexecuted instantiation: sm3.c:writeUnalignedWord16 Unexecuted instantiation: sm4.c:writeUnalignedWord16 Unexecuted instantiation: sp_int.c:writeUnalignedWord16 Unexecuted instantiation: wc_encrypt.c:writeUnalignedWord16 Unexecuted instantiation: wolfmath.c:writeUnalignedWord16 Unexecuted instantiation: ssl.c:writeUnalignedWord16 Unexecuted instantiation: tls.c:writeUnalignedWord16 Unexecuted instantiation: tls13.c:writeUnalignedWord16 Unexecuted instantiation: wc_mlkem.c:writeUnalignedWord16 Unexecuted instantiation: wc_mlkem_poly.c:writeUnalignedWord16 Unexecuted instantiation: internal.c:writeUnalignedWord16 Unexecuted instantiation: keys.c:writeUnalignedWord16 |
287 | | |
288 | | WC_MISC_STATIC WC_INLINE word32 readUnalignedWord32(const byte *in) |
289 | 68.0M | { |
290 | | #ifdef WOLFSSL_WIDE_BYTE |
291 | | /* Where a C byte is wider than an octet (CHAR_BIT != 8, e.g. TI C28x) the |
292 | | * input holds one octet per cell, so assemble 4 octets little-endian rather |
293 | | * than aliasing whole cells as a word32. */ |
294 | | return (word32)(in[0] & 0xFF) | ((word32)(in[1] & 0xFF) << 8) | |
295 | | ((word32)(in[2] & 0xFF) << 16) | ((word32)(in[3] & 0xFF) << 24); |
296 | | #elif !defined(WOLFSSL_RW_UNALIGNED_32) |
297 | | if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0) { |
298 | | return *(const word32 *)in; |
299 | | } |
300 | | else { |
301 | | word32 out = 0; /* else CONFIG_FORTIFY_SOURCE -Wmaybe-uninitialized */ |
302 | | XMEMCPY(&out, in, sizeof(out)); |
303 | | return out; |
304 | | } |
305 | | #else |
306 | 68.0M | return *(const uword32 *)in; |
307 | 68.0M | #endif |
308 | 68.0M | } Unexecuted instantiation: aes.c:readUnalignedWord32 Unexecuted instantiation: arc4.c:readUnalignedWord32 Unexecuted instantiation: asn.c:readUnalignedWord32 Unexecuted instantiation: blake2b.c:readUnalignedWord32 Unexecuted instantiation: blake2s.c:readUnalignedWord32 Unexecuted instantiation: camellia.c:readUnalignedWord32 chacha.c:readUnalignedWord32 Line | Count | Source | 289 | 2.97k | { | 290 | | #ifdef WOLFSSL_WIDE_BYTE | 291 | | /* Where a C byte is wider than an octet (CHAR_BIT != 8, e.g. TI C28x) the | 292 | | * input holds one octet per cell, so assemble 4 octets little-endian rather | 293 | | * than aliasing whole cells as a word32. */ | 294 | | return (word32)(in[0] & 0xFF) | ((word32)(in[1] & 0xFF) << 8) | | 295 | | ((word32)(in[2] & 0xFF) << 16) | ((word32)(in[3] & 0xFF) << 24); | 296 | | #elif !defined(WOLFSSL_RW_UNALIGNED_32) | 297 | | if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0) { | 298 | | return *(const word32 *)in; | 299 | | } | 300 | | else { | 301 | | word32 out = 0; /* else CONFIG_FORTIFY_SOURCE -Wmaybe-uninitialized */ | 302 | | XMEMCPY(&out, in, sizeof(out)); | 303 | | return out; | 304 | | } | 305 | | #else | 306 | 2.97k | return *(const uword32 *)in; | 307 | 2.97k | #endif | 308 | 2.97k | } |
Unexecuted instantiation: chacha20_poly1305.c:readUnalignedWord32 Unexecuted instantiation: cmac.c:readUnalignedWord32 Unexecuted instantiation: coding.c:readUnalignedWord32 Unexecuted instantiation: curve25519.c:readUnalignedWord32 Unexecuted instantiation: curve448.c:readUnalignedWord32 Unexecuted instantiation: des3.c:readUnalignedWord32 Unexecuted instantiation: dh.c:readUnalignedWord32 Unexecuted instantiation: ecc.c:readUnalignedWord32 Unexecuted instantiation: eccsi.c:readUnalignedWord32 Unexecuted instantiation: ed25519.c:readUnalignedWord32 Unexecuted instantiation: ed448.c:readUnalignedWord32 Unexecuted instantiation: fe_448.c:readUnalignedWord32 Unexecuted instantiation: fe_operations.c:readUnalignedWord32 Unexecuted instantiation: ge_448.c:readUnalignedWord32 Unexecuted instantiation: ge_operations.c:readUnalignedWord32 Unexecuted instantiation: hash.c:readUnalignedWord32 Unexecuted instantiation: hmac.c:readUnalignedWord32 Unexecuted instantiation: kdf.c:readUnalignedWord32 Unexecuted instantiation: md2.c:readUnalignedWord32 Unexecuted instantiation: md4.c:readUnalignedWord32 md5.c:readUnalignedWord32 Line | Count | Source | 289 | 52.4M | { | 290 | | #ifdef WOLFSSL_WIDE_BYTE | 291 | | /* Where a C byte is wider than an octet (CHAR_BIT != 8, e.g. TI C28x) the | 292 | | * input holds one octet per cell, so assemble 4 octets little-endian rather | 293 | | * than aliasing whole cells as a word32. */ | 294 | | return (word32)(in[0] & 0xFF) | ((word32)(in[1] & 0xFF) << 8) | | 295 | | ((word32)(in[2] & 0xFF) << 16) | ((word32)(in[3] & 0xFF) << 24); | 296 | | #elif !defined(WOLFSSL_RW_UNALIGNED_32) | 297 | | if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0) { | 298 | | return *(const word32 *)in; | 299 | | } | 300 | | else { | 301 | | word32 out = 0; /* else CONFIG_FORTIFY_SOURCE -Wmaybe-uninitialized */ | 302 | | XMEMCPY(&out, in, sizeof(out)); | 303 | | return out; | 304 | | } | 305 | | #else | 306 | 52.4M | return *(const uword32 *)in; | 307 | 52.4M | #endif | 308 | 52.4M | } |
Unexecuted instantiation: memory.c:readUnalignedWord32 Unexecuted instantiation: poly1305.c:readUnalignedWord32 Unexecuted instantiation: pwdbased.c:readUnalignedWord32 Unexecuted instantiation: random.c:readUnalignedWord32 Unexecuted instantiation: ripemd.c:readUnalignedWord32 Unexecuted instantiation: rsa.c:readUnalignedWord32 Unexecuted instantiation: sha.c:readUnalignedWord32 sha256.c:readUnalignedWord32 Line | Count | Source | 289 | 15.6M | { | 290 | | #ifdef WOLFSSL_WIDE_BYTE | 291 | | /* Where a C byte is wider than an octet (CHAR_BIT != 8, e.g. TI C28x) the | 292 | | * input holds one octet per cell, so assemble 4 octets little-endian rather | 293 | | * than aliasing whole cells as a word32. */ | 294 | | return (word32)(in[0] & 0xFF) | ((word32)(in[1] & 0xFF) << 8) | | 295 | | ((word32)(in[2] & 0xFF) << 16) | ((word32)(in[3] & 0xFF) << 24); | 296 | | #elif !defined(WOLFSSL_RW_UNALIGNED_32) | 297 | | if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0) { | 298 | | return *(const word32 *)in; | 299 | | } | 300 | | else { | 301 | | word32 out = 0; /* else CONFIG_FORTIFY_SOURCE -Wmaybe-uninitialized */ | 302 | | XMEMCPY(&out, in, sizeof(out)); | 303 | | return out; | 304 | | } | 305 | | #else | 306 | 15.6M | return *(const uword32 *)in; | 307 | 15.6M | #endif | 308 | 15.6M | } |
Unexecuted instantiation: sha3.c:readUnalignedWord32 Unexecuted instantiation: sha512.c:readUnalignedWord32 Unexecuted instantiation: siphash.c:readUnalignedWord32 Unexecuted instantiation: sm2.c:readUnalignedWord32 Unexecuted instantiation: sm3.c:readUnalignedWord32 Unexecuted instantiation: sm4.c:readUnalignedWord32 Unexecuted instantiation: sp_int.c:readUnalignedWord32 Unexecuted instantiation: wc_encrypt.c:readUnalignedWord32 Unexecuted instantiation: wolfmath.c:readUnalignedWord32 Unexecuted instantiation: ssl.c:readUnalignedWord32 Unexecuted instantiation: tls.c:readUnalignedWord32 Unexecuted instantiation: tls13.c:readUnalignedWord32 Unexecuted instantiation: wc_mlkem.c:readUnalignedWord32 Unexecuted instantiation: wc_mlkem_poly.c:readUnalignedWord32 Unexecuted instantiation: internal.c:readUnalignedWord32 Unexecuted instantiation: keys.c:readUnalignedWord32 |
309 | | |
310 | | WC_MISC_STATIC WC_INLINE word32 writeUnalignedWord32(void *out, word32 in) |
311 | 0 | { |
312 | 0 | #ifdef WOLFSSL_WIDE_BYTE |
313 | 0 | /* CHAR_BIT != 8 (e.g. TI C28x): one octet per cell, so store 4 octets |
314 | 0 | * little-endian rather than aliasing cells as a word32. Mirrors |
315 | 0 | * readUnalignedWord32() so a read/write pair spans the same cells. */ |
316 | 0 | byte* out8 = (byte*)out; |
317 | 0 |
|
318 | 0 | out8[0] = (byte)( in & 0xFF); |
319 | 0 | out8[1] = (byte)((in >> 8) & 0xFF); |
320 | 0 | out8[2] = (byte)((in >> 16) & 0xFF); |
321 | 0 | out8[3] = (byte)((in >> 24) & 0xFF); |
322 | 0 | #elif !defined(WOLFSSL_RW_UNALIGNED_32) |
323 | 0 | if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0) { |
324 | 0 | *(word32 *)out = in; |
325 | 0 | } |
326 | 0 | else { |
327 | 0 | XMEMCPY(out, &in, sizeof(in)); |
328 | 0 | } |
329 | 0 | #else |
330 | 0 | *(uword32 *)out = in; |
331 | 0 | #endif |
332 | 0 | return in; |
333 | 0 | } Unexecuted instantiation: aes.c:writeUnalignedWord32 Unexecuted instantiation: arc4.c:writeUnalignedWord32 Unexecuted instantiation: asn.c:writeUnalignedWord32 Unexecuted instantiation: blake2b.c:writeUnalignedWord32 Unexecuted instantiation: blake2s.c:writeUnalignedWord32 Unexecuted instantiation: camellia.c:writeUnalignedWord32 Unexecuted instantiation: chacha.c:writeUnalignedWord32 Unexecuted instantiation: chacha20_poly1305.c:writeUnalignedWord32 Unexecuted instantiation: cmac.c:writeUnalignedWord32 Unexecuted instantiation: coding.c:writeUnalignedWord32 Unexecuted instantiation: curve25519.c:writeUnalignedWord32 Unexecuted instantiation: curve448.c:writeUnalignedWord32 Unexecuted instantiation: des3.c:writeUnalignedWord32 Unexecuted instantiation: dh.c:writeUnalignedWord32 Unexecuted instantiation: ecc.c:writeUnalignedWord32 Unexecuted instantiation: eccsi.c:writeUnalignedWord32 Unexecuted instantiation: ed25519.c:writeUnalignedWord32 Unexecuted instantiation: ed448.c:writeUnalignedWord32 Unexecuted instantiation: fe_448.c:writeUnalignedWord32 Unexecuted instantiation: fe_operations.c:writeUnalignedWord32 Unexecuted instantiation: ge_448.c:writeUnalignedWord32 Unexecuted instantiation: ge_operations.c:writeUnalignedWord32 Unexecuted instantiation: hash.c:writeUnalignedWord32 Unexecuted instantiation: hmac.c:writeUnalignedWord32 Unexecuted instantiation: kdf.c:writeUnalignedWord32 Unexecuted instantiation: md2.c:writeUnalignedWord32 Unexecuted instantiation: md4.c:writeUnalignedWord32 Unexecuted instantiation: md5.c:writeUnalignedWord32 Unexecuted instantiation: memory.c:writeUnalignedWord32 Unexecuted instantiation: poly1305.c:writeUnalignedWord32 Unexecuted instantiation: pwdbased.c:writeUnalignedWord32 Unexecuted instantiation: random.c:writeUnalignedWord32 Unexecuted instantiation: ripemd.c:writeUnalignedWord32 Unexecuted instantiation: rsa.c:writeUnalignedWord32 Unexecuted instantiation: sha.c:writeUnalignedWord32 Unexecuted instantiation: sha256.c:writeUnalignedWord32 Unexecuted instantiation: sha3.c:writeUnalignedWord32 Unexecuted instantiation: sha512.c:writeUnalignedWord32 Unexecuted instantiation: siphash.c:writeUnalignedWord32 Unexecuted instantiation: sm2.c:writeUnalignedWord32 Unexecuted instantiation: sm3.c:writeUnalignedWord32 Unexecuted instantiation: sm4.c:writeUnalignedWord32 Unexecuted instantiation: sp_int.c:writeUnalignedWord32 Unexecuted instantiation: wc_encrypt.c:writeUnalignedWord32 Unexecuted instantiation: wolfmath.c:writeUnalignedWord32 Unexecuted instantiation: ssl.c:writeUnalignedWord32 Unexecuted instantiation: tls.c:writeUnalignedWord32 Unexecuted instantiation: tls13.c:writeUnalignedWord32 Unexecuted instantiation: wc_mlkem.c:writeUnalignedWord32 Unexecuted instantiation: wc_mlkem_poly.c:writeUnalignedWord32 Unexecuted instantiation: internal.c:writeUnalignedWord32 Unexecuted instantiation: keys.c:writeUnalignedWord32 |
334 | | |
335 | | WC_MISC_STATIC WC_INLINE void readUnalignedWords32(word32 *out, const byte *in, |
336 | | size_t count) |
337 | 0 | { |
338 | 0 | #ifndef WOLFSSL_RW_UNALIGNED_32 |
339 | 0 | if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0) { |
340 | 0 | const word32 *in_word32 = (const word32 *)in; |
341 | 0 | while (count-- > 0) |
342 | 0 | *out++ = *in_word32++; |
343 | 0 | } |
344 | 0 | else { |
345 | 0 | XMEMCPY(out, in, count * sizeof(*out)); |
346 | 0 | } |
347 | 0 | #else |
348 | 0 | const uword32 *in_word32 = (const uword32 *)in; |
349 | 0 | while (count-- > 0) |
350 | 0 | *out++ = *in_word32++; |
351 | 0 | #endif |
352 | 0 | } Unexecuted instantiation: aes.c:readUnalignedWords32 Unexecuted instantiation: arc4.c:readUnalignedWords32 Unexecuted instantiation: asn.c:readUnalignedWords32 Unexecuted instantiation: blake2b.c:readUnalignedWords32 Unexecuted instantiation: blake2s.c:readUnalignedWords32 Unexecuted instantiation: camellia.c:readUnalignedWords32 Unexecuted instantiation: chacha.c:readUnalignedWords32 Unexecuted instantiation: chacha20_poly1305.c:readUnalignedWords32 Unexecuted instantiation: cmac.c:readUnalignedWords32 Unexecuted instantiation: coding.c:readUnalignedWords32 Unexecuted instantiation: curve25519.c:readUnalignedWords32 Unexecuted instantiation: curve448.c:readUnalignedWords32 Unexecuted instantiation: des3.c:readUnalignedWords32 Unexecuted instantiation: dh.c:readUnalignedWords32 Unexecuted instantiation: ecc.c:readUnalignedWords32 Unexecuted instantiation: eccsi.c:readUnalignedWords32 Unexecuted instantiation: ed25519.c:readUnalignedWords32 Unexecuted instantiation: ed448.c:readUnalignedWords32 Unexecuted instantiation: fe_448.c:readUnalignedWords32 Unexecuted instantiation: fe_operations.c:readUnalignedWords32 Unexecuted instantiation: ge_448.c:readUnalignedWords32 Unexecuted instantiation: ge_operations.c:readUnalignedWords32 Unexecuted instantiation: hash.c:readUnalignedWords32 Unexecuted instantiation: hmac.c:readUnalignedWords32 Unexecuted instantiation: kdf.c:readUnalignedWords32 Unexecuted instantiation: md2.c:readUnalignedWords32 Unexecuted instantiation: md4.c:readUnalignedWords32 Unexecuted instantiation: md5.c:readUnalignedWords32 Unexecuted instantiation: memory.c:readUnalignedWords32 Unexecuted instantiation: poly1305.c:readUnalignedWords32 Unexecuted instantiation: pwdbased.c:readUnalignedWords32 Unexecuted instantiation: random.c:readUnalignedWords32 Unexecuted instantiation: ripemd.c:readUnalignedWords32 Unexecuted instantiation: rsa.c:readUnalignedWords32 Unexecuted instantiation: sha.c:readUnalignedWords32 Unexecuted instantiation: sha256.c:readUnalignedWords32 Unexecuted instantiation: sha3.c:readUnalignedWords32 Unexecuted instantiation: sha512.c:readUnalignedWords32 Unexecuted instantiation: siphash.c:readUnalignedWords32 Unexecuted instantiation: sm2.c:readUnalignedWords32 Unexecuted instantiation: sm3.c:readUnalignedWords32 Unexecuted instantiation: sm4.c:readUnalignedWords32 Unexecuted instantiation: sp_int.c:readUnalignedWords32 Unexecuted instantiation: wc_encrypt.c:readUnalignedWords32 Unexecuted instantiation: wolfmath.c:readUnalignedWords32 Unexecuted instantiation: ssl.c:readUnalignedWords32 Unexecuted instantiation: tls.c:readUnalignedWords32 Unexecuted instantiation: tls13.c:readUnalignedWords32 Unexecuted instantiation: wc_mlkem.c:readUnalignedWords32 Unexecuted instantiation: wc_mlkem_poly.c:readUnalignedWords32 Unexecuted instantiation: internal.c:readUnalignedWords32 Unexecuted instantiation: keys.c:readUnalignedWords32 |
353 | | |
354 | | WC_MISC_STATIC WC_INLINE void writeUnalignedWords32(byte *out, const word32 *in, |
355 | | size_t count) |
356 | 0 | { |
357 | 0 | #ifndef WOLFSSL_RW_UNALIGNED_32 |
358 | 0 | if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0) { |
359 | 0 | word32 *out_word32 = (word32 *)out; |
360 | 0 | while (count-- > 0) |
361 | 0 | *out_word32++ = *in++; |
362 | 0 | } |
363 | 0 | else { |
364 | 0 | XMEMCPY(out, in, count * sizeof(*in)); |
365 | 0 | } |
366 | 0 | #else |
367 | 0 | uword32 *out_word32 = (uword32 *)out; |
368 | 0 | while (count-- > 0) |
369 | 0 | *out_word32++ = *in++; |
370 | 0 | #endif |
371 | 0 | } Unexecuted instantiation: aes.c:writeUnalignedWords32 Unexecuted instantiation: arc4.c:writeUnalignedWords32 Unexecuted instantiation: asn.c:writeUnalignedWords32 Unexecuted instantiation: blake2b.c:writeUnalignedWords32 Unexecuted instantiation: blake2s.c:writeUnalignedWords32 Unexecuted instantiation: camellia.c:writeUnalignedWords32 Unexecuted instantiation: chacha.c:writeUnalignedWords32 Unexecuted instantiation: chacha20_poly1305.c:writeUnalignedWords32 Unexecuted instantiation: cmac.c:writeUnalignedWords32 Unexecuted instantiation: coding.c:writeUnalignedWords32 Unexecuted instantiation: curve25519.c:writeUnalignedWords32 Unexecuted instantiation: curve448.c:writeUnalignedWords32 Unexecuted instantiation: des3.c:writeUnalignedWords32 Unexecuted instantiation: dh.c:writeUnalignedWords32 Unexecuted instantiation: ecc.c:writeUnalignedWords32 Unexecuted instantiation: eccsi.c:writeUnalignedWords32 Unexecuted instantiation: ed25519.c:writeUnalignedWords32 Unexecuted instantiation: ed448.c:writeUnalignedWords32 Unexecuted instantiation: fe_448.c:writeUnalignedWords32 Unexecuted instantiation: fe_operations.c:writeUnalignedWords32 Unexecuted instantiation: ge_448.c:writeUnalignedWords32 Unexecuted instantiation: ge_operations.c:writeUnalignedWords32 Unexecuted instantiation: hash.c:writeUnalignedWords32 Unexecuted instantiation: hmac.c:writeUnalignedWords32 Unexecuted instantiation: kdf.c:writeUnalignedWords32 Unexecuted instantiation: md2.c:writeUnalignedWords32 Unexecuted instantiation: md4.c:writeUnalignedWords32 Unexecuted instantiation: md5.c:writeUnalignedWords32 Unexecuted instantiation: memory.c:writeUnalignedWords32 Unexecuted instantiation: poly1305.c:writeUnalignedWords32 Unexecuted instantiation: pwdbased.c:writeUnalignedWords32 Unexecuted instantiation: random.c:writeUnalignedWords32 Unexecuted instantiation: ripemd.c:writeUnalignedWords32 Unexecuted instantiation: rsa.c:writeUnalignedWords32 Unexecuted instantiation: sha.c:writeUnalignedWords32 Unexecuted instantiation: sha256.c:writeUnalignedWords32 Unexecuted instantiation: sha3.c:writeUnalignedWords32 Unexecuted instantiation: sha512.c:writeUnalignedWords32 Unexecuted instantiation: siphash.c:writeUnalignedWords32 Unexecuted instantiation: sm2.c:writeUnalignedWords32 Unexecuted instantiation: sm3.c:writeUnalignedWords32 Unexecuted instantiation: sm4.c:writeUnalignedWords32 Unexecuted instantiation: sp_int.c:writeUnalignedWords32 Unexecuted instantiation: wc_encrypt.c:writeUnalignedWords32 Unexecuted instantiation: wolfmath.c:writeUnalignedWords32 Unexecuted instantiation: ssl.c:writeUnalignedWords32 Unexecuted instantiation: tls.c:writeUnalignedWords32 Unexecuted instantiation: tls13.c:writeUnalignedWords32 Unexecuted instantiation: wc_mlkem.c:writeUnalignedWords32 Unexecuted instantiation: wc_mlkem_poly.c:writeUnalignedWords32 Unexecuted instantiation: internal.c:writeUnalignedWords32 Unexecuted instantiation: keys.c:writeUnalignedWords32 |
372 | | |
373 | | #if defined(WORD64_AVAILABLE) && !defined(WOLFSSL_NO_WORD64_OPS) |
374 | | |
375 | | #if ((defined(WOLFSSL_AARCH64_BUILD) || defined(__aarch64__)) && \ |
376 | | defined(__APPLE__)) || \ |
377 | | defined(WOLFSSL_X86_64_BUILD) || defined(WOLFSSL_X86_BUILD) |
378 | | #ifndef WOLFSSL_RW_UNALIGNED_64 |
379 | | #define WOLFSSL_RW_UNALIGNED_64 |
380 | | #endif |
381 | | #endif |
382 | | #ifdef WOLFSSL_RW_UNALIGNED_64 |
383 | | typedef word64 MAYBE_UNALIGNED uword64; |
384 | | #endif |
385 | | |
386 | | WC_MISC_STATIC WC_INLINE word64 readUnalignedWord64(const byte *in) |
387 | 3.70M | { |
388 | | #ifdef WOLFSSL_WIDE_BYTE |
389 | | /* Where a C byte is wider than an octet (CHAR_BIT != 8, e.g. TI C28x) the |
390 | | * input holds one octet per cell, so assemble 8 octets little-endian rather |
391 | | * than aliasing whole cells as a word64. */ |
392 | | return (word64)(in[0] & 0xFF) | ((word64)(in[1] & 0xFF) << 8) | |
393 | | ((word64)(in[2] & 0xFF) << 16) | ((word64)(in[3] & 0xFF) << 24) | |
394 | | ((word64)(in[4] & 0xFF) << 32) | ((word64)(in[5] & 0xFF) << 40) | |
395 | | ((word64)(in[6] & 0xFF) << 48) | ((word64)(in[7] & 0xFF) << 56); |
396 | | #elif !defined(WOLFSSL_RW_UNALIGNED_64) |
397 | | if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0) { |
398 | | return *(const word64 *)in; |
399 | | } |
400 | | else { |
401 | | word64 out = 0; /* else CONFIG_FORTIFY_SOURCE -Wmaybe-uninitialized */ |
402 | | XMEMCPY(&out, in, sizeof(out)); |
403 | | return out; |
404 | | } |
405 | | #else |
406 | 3.70M | return *(const uword64 *)in; |
407 | 3.70M | #endif |
408 | 3.70M | } Unexecuted instantiation: aes.c:readUnalignedWord64 Unexecuted instantiation: arc4.c:readUnalignedWord64 Unexecuted instantiation: asn.c:readUnalignedWord64 Unexecuted instantiation: blake2b.c:readUnalignedWord64 Unexecuted instantiation: blake2s.c:readUnalignedWord64 Unexecuted instantiation: camellia.c:readUnalignedWord64 Unexecuted instantiation: chacha.c:readUnalignedWord64 Unexecuted instantiation: chacha20_poly1305.c:readUnalignedWord64 Unexecuted instantiation: cmac.c:readUnalignedWord64 Unexecuted instantiation: coding.c:readUnalignedWord64 Unexecuted instantiation: curve25519.c:readUnalignedWord64 Unexecuted instantiation: curve448.c:readUnalignedWord64 Unexecuted instantiation: des3.c:readUnalignedWord64 Unexecuted instantiation: dh.c:readUnalignedWord64 Unexecuted instantiation: ecc.c:readUnalignedWord64 Unexecuted instantiation: eccsi.c:readUnalignedWord64 Unexecuted instantiation: ed25519.c:readUnalignedWord64 Unexecuted instantiation: ed448.c:readUnalignedWord64 Unexecuted instantiation: fe_448.c:readUnalignedWord64 Unexecuted instantiation: fe_operations.c:readUnalignedWord64 Unexecuted instantiation: ge_448.c:readUnalignedWord64 Unexecuted instantiation: ge_operations.c:readUnalignedWord64 Unexecuted instantiation: hash.c:readUnalignedWord64 Unexecuted instantiation: hmac.c:readUnalignedWord64 Unexecuted instantiation: kdf.c:readUnalignedWord64 Unexecuted instantiation: md2.c:readUnalignedWord64 Unexecuted instantiation: md4.c:readUnalignedWord64 Unexecuted instantiation: md5.c:readUnalignedWord64 Unexecuted instantiation: memory.c:readUnalignedWord64 Unexecuted instantiation: poly1305.c:readUnalignedWord64 Unexecuted instantiation: pwdbased.c:readUnalignedWord64 Unexecuted instantiation: random.c:readUnalignedWord64 Unexecuted instantiation: ripemd.c:readUnalignedWord64 Unexecuted instantiation: rsa.c:readUnalignedWord64 Unexecuted instantiation: sha.c:readUnalignedWord64 Unexecuted instantiation: sha256.c:readUnalignedWord64 Unexecuted instantiation: sha3.c:readUnalignedWord64 Unexecuted instantiation: sha512.c:readUnalignedWord64 Unexecuted instantiation: siphash.c:readUnalignedWord64 Unexecuted instantiation: sm2.c:readUnalignedWord64 Unexecuted instantiation: sm3.c:readUnalignedWord64 Unexecuted instantiation: sm4.c:readUnalignedWord64 Unexecuted instantiation: sp_int.c:readUnalignedWord64 Unexecuted instantiation: wc_encrypt.c:readUnalignedWord64 Unexecuted instantiation: wolfmath.c:readUnalignedWord64 Unexecuted instantiation: ssl.c:readUnalignedWord64 Unexecuted instantiation: tls.c:readUnalignedWord64 Unexecuted instantiation: tls13.c:readUnalignedWord64 Unexecuted instantiation: wc_mlkem.c:readUnalignedWord64 wc_mlkem_poly.c:readUnalignedWord64 Line | Count | Source | 387 | 3.70M | { | 388 | | #ifdef WOLFSSL_WIDE_BYTE | 389 | | /* Where a C byte is wider than an octet (CHAR_BIT != 8, e.g. TI C28x) the | 390 | | * input holds one octet per cell, so assemble 8 octets little-endian rather | 391 | | * than aliasing whole cells as a word64. */ | 392 | | return (word64)(in[0] & 0xFF) | ((word64)(in[1] & 0xFF) << 8) | | 393 | | ((word64)(in[2] & 0xFF) << 16) | ((word64)(in[3] & 0xFF) << 24) | | 394 | | ((word64)(in[4] & 0xFF) << 32) | ((word64)(in[5] & 0xFF) << 40) | | 395 | | ((word64)(in[6] & 0xFF) << 48) | ((word64)(in[7] & 0xFF) << 56); | 396 | | #elif !defined(WOLFSSL_RW_UNALIGNED_64) | 397 | | if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0) { | 398 | | return *(const word64 *)in; | 399 | | } | 400 | | else { | 401 | | word64 out = 0; /* else CONFIG_FORTIFY_SOURCE -Wmaybe-uninitialized */ | 402 | | XMEMCPY(&out, in, sizeof(out)); | 403 | | return out; | 404 | | } | 405 | | #else | 406 | 3.70M | return *(const uword64 *)in; | 407 | 3.70M | #endif | 408 | 3.70M | } |
Unexecuted instantiation: internal.c:readUnalignedWord64 Unexecuted instantiation: keys.c:readUnalignedWord64 |
409 | | |
410 | | WC_MISC_STATIC WC_INLINE word64 writeUnalignedWord64(void *out, word64 in) |
411 | 0 | { |
412 | | #ifndef WOLFSSL_RW_UNALIGNED_64 |
413 | | if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0) { |
414 | | *(word64 *)out = in; |
415 | | } |
416 | | else { |
417 | | XMEMCPY(out, &in, sizeof(in)); |
418 | | } |
419 | | #else |
420 | 0 | *(uword64 *)out = in; |
421 | 0 | #endif |
422 | 0 | return in; |
423 | 0 | } Unexecuted instantiation: aes.c:writeUnalignedWord64 Unexecuted instantiation: arc4.c:writeUnalignedWord64 Unexecuted instantiation: asn.c:writeUnalignedWord64 Unexecuted instantiation: blake2b.c:writeUnalignedWord64 Unexecuted instantiation: blake2s.c:writeUnalignedWord64 Unexecuted instantiation: camellia.c:writeUnalignedWord64 Unexecuted instantiation: chacha.c:writeUnalignedWord64 Unexecuted instantiation: chacha20_poly1305.c:writeUnalignedWord64 Unexecuted instantiation: cmac.c:writeUnalignedWord64 Unexecuted instantiation: coding.c:writeUnalignedWord64 Unexecuted instantiation: curve25519.c:writeUnalignedWord64 Unexecuted instantiation: curve448.c:writeUnalignedWord64 Unexecuted instantiation: des3.c:writeUnalignedWord64 Unexecuted instantiation: dh.c:writeUnalignedWord64 Unexecuted instantiation: ecc.c:writeUnalignedWord64 Unexecuted instantiation: eccsi.c:writeUnalignedWord64 Unexecuted instantiation: ed25519.c:writeUnalignedWord64 Unexecuted instantiation: ed448.c:writeUnalignedWord64 Unexecuted instantiation: fe_448.c:writeUnalignedWord64 Unexecuted instantiation: fe_operations.c:writeUnalignedWord64 Unexecuted instantiation: ge_448.c:writeUnalignedWord64 Unexecuted instantiation: ge_operations.c:writeUnalignedWord64 Unexecuted instantiation: hash.c:writeUnalignedWord64 Unexecuted instantiation: hmac.c:writeUnalignedWord64 Unexecuted instantiation: kdf.c:writeUnalignedWord64 Unexecuted instantiation: md2.c:writeUnalignedWord64 Unexecuted instantiation: md4.c:writeUnalignedWord64 Unexecuted instantiation: md5.c:writeUnalignedWord64 Unexecuted instantiation: memory.c:writeUnalignedWord64 Unexecuted instantiation: poly1305.c:writeUnalignedWord64 Unexecuted instantiation: pwdbased.c:writeUnalignedWord64 Unexecuted instantiation: random.c:writeUnalignedWord64 Unexecuted instantiation: ripemd.c:writeUnalignedWord64 Unexecuted instantiation: rsa.c:writeUnalignedWord64 Unexecuted instantiation: sha.c:writeUnalignedWord64 Unexecuted instantiation: sha256.c:writeUnalignedWord64 Unexecuted instantiation: sha3.c:writeUnalignedWord64 Unexecuted instantiation: sha512.c:writeUnalignedWord64 Unexecuted instantiation: siphash.c:writeUnalignedWord64 Unexecuted instantiation: sm2.c:writeUnalignedWord64 Unexecuted instantiation: sm3.c:writeUnalignedWord64 Unexecuted instantiation: sm4.c:writeUnalignedWord64 Unexecuted instantiation: sp_int.c:writeUnalignedWord64 Unexecuted instantiation: wc_encrypt.c:writeUnalignedWord64 Unexecuted instantiation: wolfmath.c:writeUnalignedWord64 Unexecuted instantiation: ssl.c:writeUnalignedWord64 Unexecuted instantiation: tls.c:writeUnalignedWord64 Unexecuted instantiation: tls13.c:writeUnalignedWord64 Unexecuted instantiation: wc_mlkem.c:writeUnalignedWord64 Unexecuted instantiation: wc_mlkem_poly.c:writeUnalignedWord64 Unexecuted instantiation: internal.c:writeUnalignedWord64 Unexecuted instantiation: keys.c:writeUnalignedWord64 |
424 | | |
425 | | WC_MISC_STATIC WC_INLINE void readUnalignedWords64(word64 *out, const byte *in, |
426 | | size_t count) |
427 | 0 | { |
428 | 0 | #ifndef WOLFSSL_RW_UNALIGNED_64 |
429 | 0 | if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0) { |
430 | 0 | const word64 *in_word64 = (const word64 *)in; |
431 | 0 | while (count-- > 0) |
432 | 0 | *out++ = *in_word64++; |
433 | 0 | } |
434 | 0 | else { |
435 | 0 | XMEMCPY(out, in, count * sizeof(*out)); |
436 | 0 | } |
437 | 0 | #else |
438 | 0 | const uword64 *in_word64 = (const uword64 *)in; |
439 | 0 | while (count-- > 0) |
440 | 0 | *out++ = *in_word64++; |
441 | 0 | #endif |
442 | 0 | } Unexecuted instantiation: aes.c:readUnalignedWords64 Unexecuted instantiation: arc4.c:readUnalignedWords64 Unexecuted instantiation: asn.c:readUnalignedWords64 Unexecuted instantiation: blake2b.c:readUnalignedWords64 Unexecuted instantiation: blake2s.c:readUnalignedWords64 Unexecuted instantiation: camellia.c:readUnalignedWords64 Unexecuted instantiation: chacha.c:readUnalignedWords64 Unexecuted instantiation: chacha20_poly1305.c:readUnalignedWords64 Unexecuted instantiation: cmac.c:readUnalignedWords64 Unexecuted instantiation: coding.c:readUnalignedWords64 Unexecuted instantiation: curve25519.c:readUnalignedWords64 Unexecuted instantiation: curve448.c:readUnalignedWords64 Unexecuted instantiation: des3.c:readUnalignedWords64 Unexecuted instantiation: dh.c:readUnalignedWords64 Unexecuted instantiation: ecc.c:readUnalignedWords64 Unexecuted instantiation: eccsi.c:readUnalignedWords64 Unexecuted instantiation: ed25519.c:readUnalignedWords64 Unexecuted instantiation: ed448.c:readUnalignedWords64 Unexecuted instantiation: fe_448.c:readUnalignedWords64 Unexecuted instantiation: fe_operations.c:readUnalignedWords64 Unexecuted instantiation: ge_448.c:readUnalignedWords64 Unexecuted instantiation: ge_operations.c:readUnalignedWords64 Unexecuted instantiation: hash.c:readUnalignedWords64 Unexecuted instantiation: hmac.c:readUnalignedWords64 Unexecuted instantiation: kdf.c:readUnalignedWords64 Unexecuted instantiation: md2.c:readUnalignedWords64 Unexecuted instantiation: md4.c:readUnalignedWords64 Unexecuted instantiation: md5.c:readUnalignedWords64 Unexecuted instantiation: memory.c:readUnalignedWords64 Unexecuted instantiation: poly1305.c:readUnalignedWords64 Unexecuted instantiation: pwdbased.c:readUnalignedWords64 Unexecuted instantiation: random.c:readUnalignedWords64 Unexecuted instantiation: ripemd.c:readUnalignedWords64 Unexecuted instantiation: rsa.c:readUnalignedWords64 Unexecuted instantiation: sha.c:readUnalignedWords64 Unexecuted instantiation: sha256.c:readUnalignedWords64 Unexecuted instantiation: sha3.c:readUnalignedWords64 Unexecuted instantiation: sha512.c:readUnalignedWords64 Unexecuted instantiation: siphash.c:readUnalignedWords64 Unexecuted instantiation: sm2.c:readUnalignedWords64 Unexecuted instantiation: sm3.c:readUnalignedWords64 Unexecuted instantiation: sm4.c:readUnalignedWords64 Unexecuted instantiation: sp_int.c:readUnalignedWords64 Unexecuted instantiation: wc_encrypt.c:readUnalignedWords64 Unexecuted instantiation: wolfmath.c:readUnalignedWords64 Unexecuted instantiation: ssl.c:readUnalignedWords64 Unexecuted instantiation: tls.c:readUnalignedWords64 Unexecuted instantiation: tls13.c:readUnalignedWords64 Unexecuted instantiation: wc_mlkem.c:readUnalignedWords64 Unexecuted instantiation: wc_mlkem_poly.c:readUnalignedWords64 Unexecuted instantiation: internal.c:readUnalignedWords64 Unexecuted instantiation: keys.c:readUnalignedWords64 |
443 | | |
444 | | WC_MISC_STATIC WC_INLINE void writeUnalignedWords64(byte *out, const word64 *in, |
445 | | size_t count) |
446 | 0 | { |
447 | 0 | #ifndef WOLFSSL_RW_UNALIGNED_64 |
448 | 0 | if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0) { |
449 | 0 | word64 *out_word64 = (word64 *)out; |
450 | 0 | while (count-- > 0) |
451 | 0 | *out_word64++ = *in++; |
452 | 0 | } |
453 | 0 | else { |
454 | 0 | XMEMCPY(out, in, count * sizeof(*in)); |
455 | 0 | } |
456 | 0 | #else |
457 | 0 | uword64 *out_word64 = (uword64 *)out; |
458 | 0 | while (count-- > 0) |
459 | 0 | *out_word64++ = *in++; |
460 | 0 | #endif |
461 | 0 | } Unexecuted instantiation: aes.c:writeUnalignedWords64 Unexecuted instantiation: arc4.c:writeUnalignedWords64 Unexecuted instantiation: asn.c:writeUnalignedWords64 Unexecuted instantiation: blake2b.c:writeUnalignedWords64 Unexecuted instantiation: blake2s.c:writeUnalignedWords64 Unexecuted instantiation: camellia.c:writeUnalignedWords64 Unexecuted instantiation: chacha.c:writeUnalignedWords64 Unexecuted instantiation: chacha20_poly1305.c:writeUnalignedWords64 Unexecuted instantiation: cmac.c:writeUnalignedWords64 Unexecuted instantiation: coding.c:writeUnalignedWords64 Unexecuted instantiation: curve25519.c:writeUnalignedWords64 Unexecuted instantiation: curve448.c:writeUnalignedWords64 Unexecuted instantiation: des3.c:writeUnalignedWords64 Unexecuted instantiation: dh.c:writeUnalignedWords64 Unexecuted instantiation: ecc.c:writeUnalignedWords64 Unexecuted instantiation: eccsi.c:writeUnalignedWords64 Unexecuted instantiation: ed25519.c:writeUnalignedWords64 Unexecuted instantiation: ed448.c:writeUnalignedWords64 Unexecuted instantiation: fe_448.c:writeUnalignedWords64 Unexecuted instantiation: fe_operations.c:writeUnalignedWords64 Unexecuted instantiation: ge_448.c:writeUnalignedWords64 Unexecuted instantiation: ge_operations.c:writeUnalignedWords64 Unexecuted instantiation: hash.c:writeUnalignedWords64 Unexecuted instantiation: hmac.c:writeUnalignedWords64 Unexecuted instantiation: kdf.c:writeUnalignedWords64 Unexecuted instantiation: md2.c:writeUnalignedWords64 Unexecuted instantiation: md4.c:writeUnalignedWords64 Unexecuted instantiation: md5.c:writeUnalignedWords64 Unexecuted instantiation: memory.c:writeUnalignedWords64 Unexecuted instantiation: poly1305.c:writeUnalignedWords64 Unexecuted instantiation: pwdbased.c:writeUnalignedWords64 Unexecuted instantiation: random.c:writeUnalignedWords64 Unexecuted instantiation: ripemd.c:writeUnalignedWords64 Unexecuted instantiation: rsa.c:writeUnalignedWords64 Unexecuted instantiation: sha.c:writeUnalignedWords64 Unexecuted instantiation: sha256.c:writeUnalignedWords64 Unexecuted instantiation: sha3.c:writeUnalignedWords64 Unexecuted instantiation: sha512.c:writeUnalignedWords64 Unexecuted instantiation: siphash.c:writeUnalignedWords64 Unexecuted instantiation: sm2.c:writeUnalignedWords64 Unexecuted instantiation: sm3.c:writeUnalignedWords64 Unexecuted instantiation: sm4.c:writeUnalignedWords64 Unexecuted instantiation: sp_int.c:writeUnalignedWords64 Unexecuted instantiation: wc_encrypt.c:writeUnalignedWords64 Unexecuted instantiation: wolfmath.c:writeUnalignedWords64 Unexecuted instantiation: ssl.c:writeUnalignedWords64 Unexecuted instantiation: tls.c:writeUnalignedWords64 Unexecuted instantiation: tls13.c:writeUnalignedWords64 Unexecuted instantiation: wc_mlkem.c:writeUnalignedWords64 Unexecuted instantiation: wc_mlkem_poly.c:writeUnalignedWords64 Unexecuted instantiation: internal.c:writeUnalignedWords64 Unexecuted instantiation: keys.c:writeUnalignedWords64 |
462 | | |
463 | | WC_MISC_STATIC WC_INLINE word64 rotlFixed64(word64 x, word64 y) |
464 | 86.4M | { |
465 | 86.4M | return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y)); |
466 | 86.4M | } Unexecuted instantiation: aes.c:rotlFixed64 Unexecuted instantiation: arc4.c:rotlFixed64 Unexecuted instantiation: asn.c:rotlFixed64 Unexecuted instantiation: blake2b.c:rotlFixed64 Unexecuted instantiation: blake2s.c:rotlFixed64 Unexecuted instantiation: camellia.c:rotlFixed64 Unexecuted instantiation: chacha.c:rotlFixed64 Unexecuted instantiation: chacha20_poly1305.c:rotlFixed64 Unexecuted instantiation: cmac.c:rotlFixed64 Unexecuted instantiation: coding.c:rotlFixed64 Unexecuted instantiation: curve25519.c:rotlFixed64 Unexecuted instantiation: curve448.c:rotlFixed64 Unexecuted instantiation: des3.c:rotlFixed64 Unexecuted instantiation: dh.c:rotlFixed64 Unexecuted instantiation: ecc.c:rotlFixed64 Unexecuted instantiation: eccsi.c:rotlFixed64 Unexecuted instantiation: ed25519.c:rotlFixed64 Unexecuted instantiation: ed448.c:rotlFixed64 Unexecuted instantiation: fe_448.c:rotlFixed64 Unexecuted instantiation: fe_operations.c:rotlFixed64 Unexecuted instantiation: ge_448.c:rotlFixed64 Unexecuted instantiation: ge_operations.c:rotlFixed64 Unexecuted instantiation: hash.c:rotlFixed64 Unexecuted instantiation: hmac.c:rotlFixed64 Unexecuted instantiation: kdf.c:rotlFixed64 Unexecuted instantiation: md2.c:rotlFixed64 Unexecuted instantiation: md4.c:rotlFixed64 Unexecuted instantiation: md5.c:rotlFixed64 Unexecuted instantiation: memory.c:rotlFixed64 Unexecuted instantiation: poly1305.c:rotlFixed64 Unexecuted instantiation: pwdbased.c:rotlFixed64 Line | Count | Source | 464 | 582k | { | 465 | | return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y)); | 466 | 582k | } |
Unexecuted instantiation: ripemd.c:rotlFixed64 Unexecuted instantiation: rsa.c:rotlFixed64 Unexecuted instantiation: sha.c:rotlFixed64 Unexecuted instantiation: sha256.c:rotlFixed64 Unexecuted instantiation: sha3.c:rotlFixed64 Line | Count | Source | 464 | 85.8M | { | 465 | | return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y)); | 466 | 85.8M | } |
Unexecuted instantiation: siphash.c:rotlFixed64 Unexecuted instantiation: sm2.c:rotlFixed64 Unexecuted instantiation: sm3.c:rotlFixed64 Unexecuted instantiation: sm4.c:rotlFixed64 Unexecuted instantiation: sp_int.c:rotlFixed64 Unexecuted instantiation: wc_encrypt.c:rotlFixed64 Unexecuted instantiation: wolfmath.c:rotlFixed64 Unexecuted instantiation: ssl.c:rotlFixed64 Unexecuted instantiation: tls.c:rotlFixed64 Unexecuted instantiation: tls13.c:rotlFixed64 Unexecuted instantiation: wc_mlkem.c:rotlFixed64 Unexecuted instantiation: wc_mlkem_poly.c:rotlFixed64 Unexecuted instantiation: internal.c:rotlFixed64 Unexecuted instantiation: keys.c:rotlFixed64 |
467 | | |
468 | | |
469 | | WC_MISC_STATIC WC_INLINE word64 rotrFixed64(word64 x, word64 y) |
470 | 3.16G | { |
471 | 3.16G | return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y)); |
472 | 3.16G | } Unexecuted instantiation: aes.c:rotrFixed64 Unexecuted instantiation: arc4.c:rotrFixed64 Unexecuted instantiation: asn.c:rotrFixed64 Unexecuted instantiation: blake2b.c:rotrFixed64 Unexecuted instantiation: blake2s.c:rotrFixed64 Unexecuted instantiation: camellia.c:rotrFixed64 Unexecuted instantiation: chacha.c:rotrFixed64 Unexecuted instantiation: chacha20_poly1305.c:rotrFixed64 Unexecuted instantiation: cmac.c:rotrFixed64 Unexecuted instantiation: coding.c:rotrFixed64 Unexecuted instantiation: curve25519.c:rotrFixed64 Unexecuted instantiation: curve448.c:rotrFixed64 Unexecuted instantiation: des3.c:rotrFixed64 Unexecuted instantiation: dh.c:rotrFixed64 Unexecuted instantiation: ecc.c:rotrFixed64 Unexecuted instantiation: eccsi.c:rotrFixed64 Unexecuted instantiation: ed25519.c:rotrFixed64 Unexecuted instantiation: ed448.c:rotrFixed64 Unexecuted instantiation: fe_448.c:rotrFixed64 Unexecuted instantiation: fe_operations.c:rotrFixed64 Unexecuted instantiation: ge_448.c:rotrFixed64 Unexecuted instantiation: ge_operations.c:rotrFixed64 Unexecuted instantiation: hash.c:rotrFixed64 Unexecuted instantiation: hmac.c:rotrFixed64 Unexecuted instantiation: kdf.c:rotrFixed64 Unexecuted instantiation: md2.c:rotrFixed64 Unexecuted instantiation: md4.c:rotrFixed64 Unexecuted instantiation: md5.c:rotrFixed64 Unexecuted instantiation: memory.c:rotrFixed64 Unexecuted instantiation: poly1305.c:rotrFixed64 Unexecuted instantiation: pwdbased.c:rotrFixed64 Unexecuted instantiation: random.c:rotrFixed64 Unexecuted instantiation: ripemd.c:rotrFixed64 Unexecuted instantiation: rsa.c:rotrFixed64 Unexecuted instantiation: sha.c:rotrFixed64 Unexecuted instantiation: sha256.c:rotrFixed64 Unexecuted instantiation: sha3.c:rotrFixed64 Line | Count | Source | 470 | 3.16G | { | 471 | | return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y)); | 472 | 3.16G | } |
Unexecuted instantiation: siphash.c:rotrFixed64 Unexecuted instantiation: sm2.c:rotrFixed64 Unexecuted instantiation: sm3.c:rotrFixed64 Unexecuted instantiation: sm4.c:rotrFixed64 Unexecuted instantiation: sp_int.c:rotrFixed64 Unexecuted instantiation: wc_encrypt.c:rotrFixed64 Unexecuted instantiation: wolfmath.c:rotrFixed64 Unexecuted instantiation: ssl.c:rotrFixed64 Unexecuted instantiation: tls.c:rotrFixed64 Unexecuted instantiation: tls13.c:rotrFixed64 Unexecuted instantiation: wc_mlkem.c:rotrFixed64 Unexecuted instantiation: wc_mlkem_poly.c:rotrFixed64 Unexecuted instantiation: internal.c:rotrFixed64 Unexecuted instantiation: keys.c:rotrFixed64 |
473 | | |
474 | | |
475 | | WC_MISC_STATIC WC_INLINE word64 ByteReverseWord64(word64 value) |
476 | 86.4M | { |
477 | | #if defined(WOLF_ALLOW_BUILTIN) && defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3) |
478 | | return (word64)__builtin_bswap64(value); |
479 | | #elif defined(WOLFCRYPT_SLOW_WORD64) |
480 | | return (word64)((word64)ByteReverseWord32((word32) value)) << 32 | |
481 | | (word64)ByteReverseWord32((word32)(value >> 32)); |
482 | | #else |
483 | 86.4M | value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) | |
484 | 86.4M | ((value & W64LIT(0x00FF00FF00FF00FF)) << 8); |
485 | 86.4M | value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) | |
486 | 86.4M | ((value & W64LIT(0x0000FFFF0000FFFF)) << 16); |
487 | 86.4M | return rotlFixed64(value, 32U); |
488 | 86.4M | #endif |
489 | 86.4M | } Unexecuted instantiation: aes.c:ByteReverseWord64 Unexecuted instantiation: arc4.c:ByteReverseWord64 Unexecuted instantiation: asn.c:ByteReverseWord64 Unexecuted instantiation: blake2b.c:ByteReverseWord64 Unexecuted instantiation: blake2s.c:ByteReverseWord64 Unexecuted instantiation: camellia.c:ByteReverseWord64 Unexecuted instantiation: chacha.c:ByteReverseWord64 Unexecuted instantiation: chacha20_poly1305.c:ByteReverseWord64 Unexecuted instantiation: cmac.c:ByteReverseWord64 Unexecuted instantiation: coding.c:ByteReverseWord64 Unexecuted instantiation: curve25519.c:ByteReverseWord64 Unexecuted instantiation: curve448.c:ByteReverseWord64 Unexecuted instantiation: des3.c:ByteReverseWord64 Unexecuted instantiation: dh.c:ByteReverseWord64 Unexecuted instantiation: ecc.c:ByteReverseWord64 Unexecuted instantiation: eccsi.c:ByteReverseWord64 Unexecuted instantiation: ed25519.c:ByteReverseWord64 Unexecuted instantiation: ed448.c:ByteReverseWord64 Unexecuted instantiation: fe_448.c:ByteReverseWord64 Unexecuted instantiation: fe_operations.c:ByteReverseWord64 Unexecuted instantiation: ge_448.c:ByteReverseWord64 Unexecuted instantiation: ge_operations.c:ByteReverseWord64 Unexecuted instantiation: hash.c:ByteReverseWord64 Unexecuted instantiation: hmac.c:ByteReverseWord64 Unexecuted instantiation: kdf.c:ByteReverseWord64 Unexecuted instantiation: md2.c:ByteReverseWord64 Unexecuted instantiation: md4.c:ByteReverseWord64 Unexecuted instantiation: md5.c:ByteReverseWord64 Unexecuted instantiation: memory.c:ByteReverseWord64 Unexecuted instantiation: poly1305.c:ByteReverseWord64 Unexecuted instantiation: pwdbased.c:ByteReverseWord64 random.c:ByteReverseWord64 Line | Count | Source | 476 | 582k | { | 477 | | #if defined(WOLF_ALLOW_BUILTIN) && defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3) | 478 | | return (word64)__builtin_bswap64(value); | 479 | | #elif defined(WOLFCRYPT_SLOW_WORD64) | 480 | | return (word64)((word64)ByteReverseWord32((word32) value)) << 32 | | 481 | | (word64)ByteReverseWord32((word32)(value >> 32)); | 482 | | #else | 483 | 582k | value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) | | 484 | 582k | ((value & W64LIT(0x00FF00FF00FF00FF)) << 8); | 485 | 582k | value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) | | 486 | 582k | ((value & W64LIT(0x0000FFFF0000FFFF)) << 16); | 487 | 582k | return rotlFixed64(value, 32U); | 488 | 582k | #endif | 489 | 582k | } |
Unexecuted instantiation: ripemd.c:ByteReverseWord64 Unexecuted instantiation: rsa.c:ByteReverseWord64 Unexecuted instantiation: sha.c:ByteReverseWord64 Unexecuted instantiation: sha256.c:ByteReverseWord64 Unexecuted instantiation: sha3.c:ByteReverseWord64 sha512.c:ByteReverseWord64 Line | Count | Source | 476 | 85.8M | { | 477 | | #if defined(WOLF_ALLOW_BUILTIN) && defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3) | 478 | | return (word64)__builtin_bswap64(value); | 479 | | #elif defined(WOLFCRYPT_SLOW_WORD64) | 480 | | return (word64)((word64)ByteReverseWord32((word32) value)) << 32 | | 481 | | (word64)ByteReverseWord32((word32)(value >> 32)); | 482 | | #else | 483 | 85.8M | value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) | | 484 | 85.8M | ((value & W64LIT(0x00FF00FF00FF00FF)) << 8); | 485 | 85.8M | value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) | | 486 | 85.8M | ((value & W64LIT(0x0000FFFF0000FFFF)) << 16); | 487 | 85.8M | return rotlFixed64(value, 32U); | 488 | 85.8M | #endif | 489 | 85.8M | } |
Unexecuted instantiation: siphash.c:ByteReverseWord64 Unexecuted instantiation: sm2.c:ByteReverseWord64 Unexecuted instantiation: sm3.c:ByteReverseWord64 Unexecuted instantiation: sm4.c:ByteReverseWord64 Unexecuted instantiation: sp_int.c:ByteReverseWord64 Unexecuted instantiation: wc_encrypt.c:ByteReverseWord64 Unexecuted instantiation: wolfmath.c:ByteReverseWord64 Unexecuted instantiation: ssl.c:ByteReverseWord64 Unexecuted instantiation: tls.c:ByteReverseWord64 Unexecuted instantiation: tls13.c:ByteReverseWord64 Unexecuted instantiation: wc_mlkem.c:ByteReverseWord64 Unexecuted instantiation: wc_mlkem_poly.c:ByteReverseWord64 Unexecuted instantiation: internal.c:ByteReverseWord64 Unexecuted instantiation: keys.c:ByteReverseWord64 |
490 | | |
491 | | |
492 | | WC_MISC_STATIC WC_INLINE void ByteReverseWords64(word64* out, const word64* in, |
493 | | word32 byteCount) |
494 | 7.08M | { |
495 | 7.08M | word32 count = byteCount/(word32)sizeof(word64), i; |
496 | | |
497 | 7.08M | #ifdef WOLFSSL_USE_ALIGN |
498 | 7.08M | if ((((size_t)in & 0x7) == 0) && |
499 | 7.08M | (((size_t)out & 0x7) == 0)) |
500 | 7.08M | #endif |
501 | 7.08M | { |
502 | 92.9M | for (i = 0; i < count; i++) |
503 | 85.8M | out[i] = ByteReverseWord64(in[i]); |
504 | 7.08M | } |
505 | 0 | #ifdef WOLFSSL_USE_ALIGN |
506 | 0 | else if (((size_t)in & 0x7) == 0) { |
507 | 0 | byte *out_bytes = (byte *)out; |
508 | 0 | word64 scratch; |
509 | |
|
510 | 0 | byteCount &= ~0x7U; |
511 | |
|
512 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word64)) { |
513 | 0 | scratch = ByteReverseWord64(*in++); |
514 | 0 | XMEMCPY(out_bytes + i, &scratch, sizeof(scratch)); |
515 | 0 | } |
516 | 0 | } |
517 | 0 | else if (((size_t)out & 0x7) == 0) { |
518 | 0 | const byte *in_bytes = (const byte *)in; |
519 | 0 | word64 scratch; |
520 | |
|
521 | 0 | byteCount &= ~0x7U; |
522 | |
|
523 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word64)) { |
524 | 0 | XMEMCPY(&scratch, in_bytes + i, sizeof(scratch)); |
525 | 0 | *out++ = ByteReverseWord64(scratch); |
526 | 0 | } |
527 | 0 | } |
528 | 0 | else { |
529 | 0 | const byte *in_bytes = (const byte *)in; |
530 | 0 | byte *out_bytes = (byte *)out; |
531 | 0 | word64 scratch; |
532 | |
|
533 | 0 | byteCount &= ~0x7U; |
534 | |
|
535 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word64)) { |
536 | 0 | XMEMCPY(&scratch, in_bytes + i, sizeof(scratch)); |
537 | 0 | scratch = ByteReverseWord64(scratch); |
538 | 0 | XMEMCPY(out_bytes + i, &scratch, sizeof(scratch)); |
539 | 0 | } |
540 | 0 | } |
541 | 7.08M | #endif |
542 | 7.08M | } Unexecuted instantiation: aes.c:ByteReverseWords64 Unexecuted instantiation: arc4.c:ByteReverseWords64 Unexecuted instantiation: asn.c:ByteReverseWords64 Unexecuted instantiation: blake2b.c:ByteReverseWords64 Unexecuted instantiation: blake2s.c:ByteReverseWords64 Unexecuted instantiation: camellia.c:ByteReverseWords64 Unexecuted instantiation: chacha.c:ByteReverseWords64 Unexecuted instantiation: chacha20_poly1305.c:ByteReverseWords64 Unexecuted instantiation: cmac.c:ByteReverseWords64 Unexecuted instantiation: coding.c:ByteReverseWords64 Unexecuted instantiation: curve25519.c:ByteReverseWords64 Unexecuted instantiation: curve448.c:ByteReverseWords64 Unexecuted instantiation: des3.c:ByteReverseWords64 Unexecuted instantiation: dh.c:ByteReverseWords64 Unexecuted instantiation: ecc.c:ByteReverseWords64 Unexecuted instantiation: eccsi.c:ByteReverseWords64 Unexecuted instantiation: ed25519.c:ByteReverseWords64 Unexecuted instantiation: ed448.c:ByteReverseWords64 Unexecuted instantiation: fe_448.c:ByteReverseWords64 Unexecuted instantiation: fe_operations.c:ByteReverseWords64 Unexecuted instantiation: ge_448.c:ByteReverseWords64 Unexecuted instantiation: ge_operations.c:ByteReverseWords64 Unexecuted instantiation: hash.c:ByteReverseWords64 Unexecuted instantiation: hmac.c:ByteReverseWords64 Unexecuted instantiation: kdf.c:ByteReverseWords64 Unexecuted instantiation: md2.c:ByteReverseWords64 Unexecuted instantiation: md4.c:ByteReverseWords64 Unexecuted instantiation: md5.c:ByteReverseWords64 Unexecuted instantiation: memory.c:ByteReverseWords64 Unexecuted instantiation: poly1305.c:ByteReverseWords64 Unexecuted instantiation: pwdbased.c:ByteReverseWords64 Unexecuted instantiation: random.c:ByteReverseWords64 Unexecuted instantiation: ripemd.c:ByteReverseWords64 Unexecuted instantiation: rsa.c:ByteReverseWords64 Unexecuted instantiation: sha.c:ByteReverseWords64 Unexecuted instantiation: sha256.c:ByteReverseWords64 Unexecuted instantiation: sha3.c:ByteReverseWords64 sha512.c:ByteReverseWords64 Line | Count | Source | 494 | 7.08M | { | 495 | 7.08M | word32 count = byteCount/(word32)sizeof(word64), i; | 496 | | | 497 | 7.08M | #ifdef WOLFSSL_USE_ALIGN | 498 | 7.08M | if ((((size_t)in & 0x7) == 0) && | 499 | 7.08M | (((size_t)out & 0x7) == 0)) | 500 | 7.08M | #endif | 501 | 7.08M | { | 502 | 92.9M | for (i = 0; i < count; i++) | 503 | 85.8M | out[i] = ByteReverseWord64(in[i]); | 504 | 7.08M | } | 505 | 0 | #ifdef WOLFSSL_USE_ALIGN | 506 | 0 | else if (((size_t)in & 0x7) == 0) { | 507 | 0 | byte *out_bytes = (byte *)out; | 508 | 0 | word64 scratch; | 509 | |
| 510 | 0 | byteCount &= ~0x7U; | 511 | |
| 512 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word64)) { | 513 | 0 | scratch = ByteReverseWord64(*in++); | 514 | 0 | XMEMCPY(out_bytes + i, &scratch, sizeof(scratch)); | 515 | 0 | } | 516 | 0 | } | 517 | 0 | else if (((size_t)out & 0x7) == 0) { | 518 | 0 | const byte *in_bytes = (const byte *)in; | 519 | 0 | word64 scratch; | 520 | |
| 521 | 0 | byteCount &= ~0x7U; | 522 | |
| 523 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word64)) { | 524 | 0 | XMEMCPY(&scratch, in_bytes + i, sizeof(scratch)); | 525 | 0 | *out++ = ByteReverseWord64(scratch); | 526 | 0 | } | 527 | 0 | } | 528 | 0 | else { | 529 | 0 | const byte *in_bytes = (const byte *)in; | 530 | 0 | byte *out_bytes = (byte *)out; | 531 | 0 | word64 scratch; | 532 | |
| 533 | 0 | byteCount &= ~0x7U; | 534 | |
| 535 | 0 | for (i = 0; i < byteCount; i += (word32)sizeof(word64)) { | 536 | 0 | XMEMCPY(&scratch, in_bytes + i, sizeof(scratch)); | 537 | 0 | scratch = ByteReverseWord64(scratch); | 538 | 0 | XMEMCPY(out_bytes + i, &scratch, sizeof(scratch)); | 539 | 0 | } | 540 | 0 | } | 541 | 7.08M | #endif | 542 | 7.08M | } |
Unexecuted instantiation: siphash.c:ByteReverseWords64 Unexecuted instantiation: sm2.c:ByteReverseWords64 Unexecuted instantiation: sm3.c:ByteReverseWords64 Unexecuted instantiation: sm4.c:ByteReverseWords64 Unexecuted instantiation: sp_int.c:ByteReverseWords64 Unexecuted instantiation: wc_encrypt.c:ByteReverseWords64 Unexecuted instantiation: wolfmath.c:ByteReverseWords64 Unexecuted instantiation: ssl.c:ByteReverseWords64 Unexecuted instantiation: tls.c:ByteReverseWords64 Unexecuted instantiation: tls13.c:ByteReverseWords64 Unexecuted instantiation: wc_mlkem.c:ByteReverseWords64 Unexecuted instantiation: wc_mlkem_poly.c:ByteReverseWords64 Unexecuted instantiation: internal.c:ByteReverseWords64 Unexecuted instantiation: keys.c:ByteReverseWords64 |
543 | | |
544 | | #endif /* WORD64_AVAILABLE && !WOLFSSL_NO_WORD64_OPS */ |
545 | | |
546 | | #ifdef WOLFSSL_WIDE_BYTE |
547 | | /* Big-endian octet <-> word conversion for WOLFSSL_WIDE_BYTE targets (a C byte |
548 | | * is wider than an octet, e.g. TI C28x), where a word packs several octets per |
549 | | * cell and so cannot be aliased as an octet stream. Loads accumulate with |
550 | | * <<= 8 (a single (word32)octet << 24 is miscompiled as a 16-bit shift by |
551 | | * cl2000) and read a whole word before writing, so they are safe in place. |
552 | | * Stores take an octet count so a partial trailing word works (e.g. the |
553 | | * 28-octet SHA-512/224 digest). Shared by SHA-2 and the Hash-DRBG. */ |
554 | | WC_MISC_STATIC WC_INLINE void WordsFromBytesBE32(word32* w, const byte* b, |
555 | | word32 wordCnt) |
556 | | { |
557 | | word32 i; |
558 | | word32 r; |
559 | | for (i = 0; i < wordCnt; i++) { |
560 | | r = (word32)(b[(i * 4) + 0] & 0xFF); r <<= 8; |
561 | | r |= (word32)(b[(i * 4) + 1] & 0xFF); r <<= 8; |
562 | | r |= (word32)(b[(i * 4) + 2] & 0xFF); r <<= 8; |
563 | | r |= (word32)(b[(i * 4) + 3] & 0xFF); |
564 | | w[i] = r; |
565 | | } |
566 | | } |
567 | | WC_MISC_STATIC WC_INLINE void BytesFromWordsBE32(byte* b, const word32* w, |
568 | | word32 byteCnt) |
569 | | { |
570 | | word32 i; |
571 | | for (i = 0; i < byteCnt; i++) { |
572 | | b[i] = (byte)((w[i >> 2] >> (24 - ((i & 0x3) * 8))) & 0xFF); |
573 | | } |
574 | | } |
575 | | /* Serialize words to little-endian octets (one octet per byte cell). */ |
576 | | WC_MISC_STATIC WC_INLINE void BytesFromWordsLE32(byte* b, const word32* w, |
577 | | word32 byteCnt) |
578 | | { |
579 | | word32 i; |
580 | | for (i = 0; i < byteCnt; i++) { |
581 | | b[i] = (byte)((w[i >> 2] >> ((i & 0x3) * 8)) & 0xFF); |
582 | | } |
583 | | } |
584 | | #ifdef WORD64_AVAILABLE |
585 | | WC_MISC_STATIC WC_INLINE void WordsFromBytesBE64(word64* w, const byte* b, |
586 | | word32 wordCnt) |
587 | | { |
588 | | word32 i; |
589 | | int j; |
590 | | word64 r; |
591 | | for (i = 0; i < wordCnt; i++) { |
592 | | r = 0; |
593 | | for (j = 0; j < 8; j++) { |
594 | | r <<= 8; |
595 | | r |= (word64)(b[(i * 8) + j] & 0xFF); |
596 | | } |
597 | | w[i] = r; |
598 | | } |
599 | | } |
600 | | WC_MISC_STATIC WC_INLINE void BytesFromWordsBE64(byte* b, const word64* w, |
601 | | word32 byteCnt) |
602 | | { |
603 | | word32 i; |
604 | | for (i = 0; i < byteCnt; i++) { |
605 | | b[i] = (byte)((w[i >> 3] >> (56 - ((i & 0x7) * 8))) & 0xFF); |
606 | | } |
607 | | } |
608 | | #endif /* WORD64_AVAILABLE */ |
609 | | #endif /* WOLFSSL_WIDE_BYTE */ |
610 | | |
611 | | #ifndef WOLFSSL_NO_XOR_OPS |
612 | | |
613 | | /* Leave no doubt that WOLFSSL_WORD_SIZE is a power of 2. */ |
614 | | wc_static_assert((WOLFSSL_WORD_SIZE & (WOLFSSL_WORD_SIZE - 1)) == 0); |
615 | | |
616 | | /* This routine performs a bitwise XOR operation of <*a> and <*b> for <n> number |
617 | | of wolfssl_words, placing the result in <*r>. */ |
618 | | WC_MISC_STATIC WC_INLINE void XorWordsOut(wolfssl_word** r, |
619 | | const wolfssl_word** a, const wolfssl_word** b, word32 n) |
620 | 27.6k | { |
621 | 27.6k | const wolfssl_word *e = *a + n; |
622 | | |
623 | 78.5k | while (*a < e) |
624 | 50.8k | *((*r)++) = *((*a)++) ^ *((*b)++); |
625 | 27.6k | } Line | Count | Source | 620 | 25.9k | { | 621 | 25.9k | const wolfssl_word *e = *a + n; | 622 | | | 623 | 65.1k | while (*a < e) | 624 | 39.2k | *((*r)++) = *((*a)++) ^ *((*b)++); | 625 | 25.9k | } |
Unexecuted instantiation: arc4.c:XorWordsOut Unexecuted instantiation: asn.c:XorWordsOut Unexecuted instantiation: blake2b.c:XorWordsOut Unexecuted instantiation: blake2s.c:XorWordsOut Unexecuted instantiation: camellia.c:XorWordsOut Line | Count | Source | 620 | 1.77k | { | 621 | 1.77k | const wolfssl_word *e = *a + n; | 622 | | | 623 | 13.4k | while (*a < e) | 624 | 11.6k | *((*r)++) = *((*a)++) ^ *((*b)++); | 625 | 1.77k | } |
Unexecuted instantiation: chacha20_poly1305.c:XorWordsOut Unexecuted instantiation: cmac.c:XorWordsOut Unexecuted instantiation: coding.c:XorWordsOut Unexecuted instantiation: curve25519.c:XorWordsOut Unexecuted instantiation: curve448.c:XorWordsOut Unexecuted instantiation: des3.c:XorWordsOut Unexecuted instantiation: dh.c:XorWordsOut Unexecuted instantiation: ecc.c:XorWordsOut Unexecuted instantiation: eccsi.c:XorWordsOut Unexecuted instantiation: ed25519.c:XorWordsOut Unexecuted instantiation: ed448.c:XorWordsOut Unexecuted instantiation: fe_448.c:XorWordsOut Unexecuted instantiation: fe_operations.c:XorWordsOut Unexecuted instantiation: ge_448.c:XorWordsOut Unexecuted instantiation: ge_operations.c:XorWordsOut Unexecuted instantiation: hash.c:XorWordsOut Unexecuted instantiation: hmac.c:XorWordsOut Unexecuted instantiation: kdf.c:XorWordsOut Unexecuted instantiation: md2.c:XorWordsOut Unexecuted instantiation: md4.c:XorWordsOut Unexecuted instantiation: md5.c:XorWordsOut Unexecuted instantiation: memory.c:XorWordsOut Unexecuted instantiation: poly1305.c:XorWordsOut Unexecuted instantiation: pwdbased.c:XorWordsOut Unexecuted instantiation: random.c:XorWordsOut Unexecuted instantiation: ripemd.c:XorWordsOut Unexecuted instantiation: rsa.c:XorWordsOut Unexecuted instantiation: sha.c:XorWordsOut Unexecuted instantiation: sha256.c:XorWordsOut Unexecuted instantiation: sha3.c:XorWordsOut Unexecuted instantiation: sha512.c:XorWordsOut Unexecuted instantiation: siphash.c:XorWordsOut Unexecuted instantiation: sm2.c:XorWordsOut Unexecuted instantiation: sm3.c:XorWordsOut Unexecuted instantiation: sm4.c:XorWordsOut Unexecuted instantiation: sp_int.c:XorWordsOut Unexecuted instantiation: wc_encrypt.c:XorWordsOut Unexecuted instantiation: wolfmath.c:XorWordsOut Unexecuted instantiation: ssl.c:XorWordsOut Unexecuted instantiation: tls.c:XorWordsOut Unexecuted instantiation: tls13.c:XorWordsOut Unexecuted instantiation: wc_mlkem.c:XorWordsOut Unexecuted instantiation: wc_mlkem_poly.c:XorWordsOut Unexecuted instantiation: internal.c:XorWordsOut Unexecuted instantiation: keys.c:XorWordsOut |
626 | | |
627 | | /* This routine performs a bitwise XOR operation of <*buf> and <*mask> of n |
628 | | counts, placing the result in <*out>. */ |
629 | | |
630 | | WC_MISC_STATIC WC_INLINE void xorbufout(void* out, const void* buf, |
631 | | const void* mask, word32 count) |
632 | 50.2k | { |
633 | 50.2k | byte* o = (byte*)out; |
634 | 50.2k | const byte* b = (const byte*)buf; |
635 | 50.2k | const byte* m = (const byte*)mask; |
636 | | |
637 | | /* type-punning helpers */ |
638 | 50.2k | union { |
639 | 50.2k | byte* bp; |
640 | 50.2k | wolfssl_word* wp; |
641 | 50.2k | } tpo; |
642 | 50.2k | union { |
643 | 50.2k | const byte* bp; |
644 | 50.2k | const wolfssl_word* wp; |
645 | 50.2k | } tpb, tpm; |
646 | | |
647 | 50.2k | if (((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) == 0) && |
648 | 22.6k | ((((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) == 0) && |
649 | 22.6k | ((((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)) == 0)) |
650 | 22.6k | { |
651 | | /* All buffers are already aligned. Possible to XOR by words without |
652 | | * fixup. |
653 | | */ |
654 | | |
655 | 22.6k | tpo.bp = o; |
656 | 22.6k | tpb.bp = b; |
657 | 22.6k | tpm.bp = m; |
658 | 22.6k | XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); |
659 | 22.6k | o = tpo.bp; |
660 | 22.6k | b = tpb.bp; |
661 | 22.6k | m = tpm.bp; |
662 | 22.6k | count &= (WOLFSSL_WORD_SIZE - 1); |
663 | 22.6k | } |
664 | 27.6k | else if ((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) == |
665 | 27.6k | (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) && |
666 | 11.2k | (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) == |
667 | 11.2k | (((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1))) |
668 | 5.09k | { |
669 | | /* Alignment can be fixed up to allow XOR by words. */ |
670 | | |
671 | | /* Perform bytewise xor until pointers are aligned to |
672 | | * WOLFSSL_WORD_SIZE. |
673 | | */ |
674 | 8.00k | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) |
675 | 2.90k | { |
676 | 2.90k | *o++ = (byte)(*b++ ^ *m++); |
677 | 2.90k | count--; |
678 | 2.90k | } |
679 | | |
680 | 5.09k | tpo.bp = o; |
681 | 5.09k | tpb.bp = b; |
682 | 5.09k | tpm.bp = m; |
683 | 5.09k | XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); |
684 | 5.09k | o = tpo.bp; |
685 | 5.09k | b = tpb.bp; |
686 | 5.09k | m = tpm.bp; |
687 | 5.09k | count &= (WOLFSSL_WORD_SIZE - 1); |
688 | 5.09k | } |
689 | | |
690 | 691k | while (count > 0) { |
691 | 640k | *o++ = (byte)(*b++ ^ *m++); |
692 | 640k | count--; |
693 | 640k | } |
694 | | |
695 | 50.2k | } Line | Count | Source | 632 | 42.3k | { | 633 | 42.3k | byte* o = (byte*)out; | 634 | 42.3k | const byte* b = (const byte*)buf; | 635 | 42.3k | const byte* m = (const byte*)mask; | 636 | | | 637 | | /* type-punning helpers */ | 638 | 42.3k | union { | 639 | 42.3k | byte* bp; | 640 | 42.3k | wolfssl_word* wp; | 641 | 42.3k | } tpo; | 642 | 42.3k | union { | 643 | 42.3k | const byte* bp; | 644 | 42.3k | const wolfssl_word* wp; | 645 | 42.3k | } tpb, tpm; | 646 | | | 647 | 42.3k | if (((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 648 | 20.8k | ((((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 649 | 20.8k | ((((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)) == 0)) | 650 | 20.8k | { | 651 | | /* All buffers are already aligned. Possible to XOR by words without | 652 | | * fixup. | 653 | | */ | 654 | | | 655 | 20.8k | tpo.bp = o; | 656 | 20.8k | tpb.bp = b; | 657 | 20.8k | tpm.bp = m; | 658 | 20.8k | XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 659 | 20.8k | o = tpo.bp; | 660 | 20.8k | b = tpb.bp; | 661 | 20.8k | m = tpm.bp; | 662 | 20.8k | count &= (WOLFSSL_WORD_SIZE - 1); | 663 | 20.8k | } | 664 | 21.5k | else if ((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) == | 665 | 21.5k | (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) && | 666 | 5.09k | (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) == | 667 | 5.09k | (((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1))) | 668 | 5.09k | { | 669 | | /* Alignment can be fixed up to allow XOR by words. */ | 670 | | | 671 | | /* Perform bytewise xor until pointers are aligned to | 672 | | * WOLFSSL_WORD_SIZE. | 673 | | */ | 674 | 8.00k | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) | 675 | 2.90k | { | 676 | 2.90k | *o++ = (byte)(*b++ ^ *m++); | 677 | 2.90k | count--; | 678 | 2.90k | } | 679 | | | 680 | 5.09k | tpo.bp = o; | 681 | 5.09k | tpb.bp = b; | 682 | 5.09k | tpm.bp = m; | 683 | 5.09k | XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 684 | 5.09k | o = tpo.bp; | 685 | 5.09k | b = tpb.bp; | 686 | 5.09k | m = tpm.bp; | 687 | 5.09k | count &= (WOLFSSL_WORD_SIZE - 1); | 688 | 5.09k | } | 689 | | | 690 | 306k | while (count > 0) { | 691 | 263k | *o++ = (byte)(*b++ ^ *m++); | 692 | 263k | count--; | 693 | 263k | } | 694 | | | 695 | 42.3k | } |
Unexecuted instantiation: arc4.c:xorbufout Unexecuted instantiation: asn.c:xorbufout Unexecuted instantiation: blake2b.c:xorbufout Unexecuted instantiation: blake2s.c:xorbufout Unexecuted instantiation: camellia.c:xorbufout Line | Count | Source | 632 | 7.89k | { | 633 | 7.89k | byte* o = (byte*)out; | 634 | 7.89k | const byte* b = (const byte*)buf; | 635 | 7.89k | const byte* m = (const byte*)mask; | 636 | | | 637 | | /* type-punning helpers */ | 638 | 7.89k | union { | 639 | 7.89k | byte* bp; | 640 | 7.89k | wolfssl_word* wp; | 641 | 7.89k | } tpo; | 642 | 7.89k | union { | 643 | 7.89k | const byte* bp; | 644 | 7.89k | const wolfssl_word* wp; | 645 | 7.89k | } tpb, tpm; | 646 | | | 647 | 7.89k | if (((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 648 | 1.77k | ((((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 649 | 1.77k | ((((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)) == 0)) | 650 | 1.77k | { | 651 | | /* All buffers are already aligned. Possible to XOR by words without | 652 | | * fixup. | 653 | | */ | 654 | | | 655 | 1.77k | tpo.bp = o; | 656 | 1.77k | tpb.bp = b; | 657 | 1.77k | tpm.bp = m; | 658 | 1.77k | XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 659 | 1.77k | o = tpo.bp; | 660 | 1.77k | b = tpb.bp; | 661 | 1.77k | m = tpm.bp; | 662 | 1.77k | count &= (WOLFSSL_WORD_SIZE - 1); | 663 | 1.77k | } | 664 | 6.11k | else if ((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) == | 665 | 6.11k | (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) && | 666 | 6.11k | (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) == | 667 | 6.11k | (((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1))) | 668 | 0 | { | 669 | | /* Alignment can be fixed up to allow XOR by words. */ | 670 | | | 671 | | /* Perform bytewise xor until pointers are aligned to | 672 | | * WOLFSSL_WORD_SIZE. | 673 | | */ | 674 | 0 | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) | 675 | 0 | { | 676 | 0 | *o++ = (byte)(*b++ ^ *m++); | 677 | 0 | count--; | 678 | 0 | } | 679 | |
| 680 | 0 | tpo.bp = o; | 681 | 0 | tpb.bp = b; | 682 | 0 | tpm.bp = m; | 683 | 0 | XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 684 | 0 | o = tpo.bp; | 685 | 0 | b = tpb.bp; | 686 | 0 | m = tpm.bp; | 687 | 0 | count &= (WOLFSSL_WORD_SIZE - 1); | 688 | 0 | } | 689 | | | 690 | 384k | while (count > 0) { | 691 | 376k | *o++ = (byte)(*b++ ^ *m++); | 692 | 376k | count--; | 693 | 376k | } | 694 | | | 695 | 7.89k | } |
Unexecuted instantiation: chacha20_poly1305.c:xorbufout Unexecuted instantiation: cmac.c:xorbufout Unexecuted instantiation: coding.c:xorbufout Unexecuted instantiation: curve25519.c:xorbufout Unexecuted instantiation: curve448.c:xorbufout Unexecuted instantiation: des3.c:xorbufout Unexecuted instantiation: dh.c:xorbufout Unexecuted instantiation: ecc.c:xorbufout Unexecuted instantiation: eccsi.c:xorbufout Unexecuted instantiation: ed25519.c:xorbufout Unexecuted instantiation: ed448.c:xorbufout Unexecuted instantiation: fe_448.c:xorbufout Unexecuted instantiation: fe_operations.c:xorbufout Unexecuted instantiation: ge_448.c:xorbufout Unexecuted instantiation: ge_operations.c:xorbufout Unexecuted instantiation: hash.c:xorbufout Unexecuted instantiation: hmac.c:xorbufout Unexecuted instantiation: kdf.c:xorbufout Unexecuted instantiation: md2.c:xorbufout Unexecuted instantiation: md4.c:xorbufout Unexecuted instantiation: md5.c:xorbufout Unexecuted instantiation: memory.c:xorbufout Unexecuted instantiation: poly1305.c:xorbufout Unexecuted instantiation: pwdbased.c:xorbufout Unexecuted instantiation: random.c:xorbufout Unexecuted instantiation: ripemd.c:xorbufout Unexecuted instantiation: rsa.c:xorbufout Unexecuted instantiation: sha.c:xorbufout Unexecuted instantiation: sha256.c:xorbufout Unexecuted instantiation: sha3.c:xorbufout Unexecuted instantiation: sha512.c:xorbufout Unexecuted instantiation: siphash.c:xorbufout Unexecuted instantiation: sm2.c:xorbufout Unexecuted instantiation: sm3.c:xorbufout Unexecuted instantiation: sm4.c:xorbufout Unexecuted instantiation: sp_int.c:xorbufout Unexecuted instantiation: wc_encrypt.c:xorbufout Unexecuted instantiation: wolfmath.c:xorbufout Unexecuted instantiation: ssl.c:xorbufout Unexecuted instantiation: tls.c:xorbufout Unexecuted instantiation: tls13.c:xorbufout Unexecuted instantiation: wc_mlkem.c:xorbufout Unexecuted instantiation: wc_mlkem_poly.c:xorbufout Unexecuted instantiation: internal.c:xorbufout Unexecuted instantiation: keys.c:xorbufout |
696 | | |
697 | | /* This routine performs a bitwise XOR operation of <*r> and <*a> for <n> number |
698 | | of wolfssl_words, placing the result in <*r>. */ |
699 | | WC_MISC_STATIC WC_INLINE void XorWords(wolfssl_word** r, const wolfssl_word** a, |
700 | | word32 n) |
701 | 228k | { |
702 | 228k | const wolfssl_word *e = *a + n; |
703 | | |
704 | 1.66M | while (*a < e) |
705 | 1.44M | *((*r)++) ^= *((*a)++); |
706 | 228k | } Line | Count | Source | 701 | 81.2k | { | 702 | 81.2k | const wolfssl_word *e = *a + n; | 703 | | | 704 | 265k | while (*a < e) | 705 | 183k | *((*r)++) ^= *((*a)++); | 706 | 81.2k | } |
Unexecuted instantiation: arc4.c:XorWords Unexecuted instantiation: asn.c:XorWords Unexecuted instantiation: blake2b.c:XorWords Unexecuted instantiation: blake2s.c:XorWords Unexecuted instantiation: camellia.c:XorWords Unexecuted instantiation: chacha.c:XorWords Unexecuted instantiation: chacha20_poly1305.c:XorWords Line | Count | Source | 701 | 312 | { | 702 | 312 | const wolfssl_word *e = *a + n; | 703 | | | 704 | 936 | while (*a < e) | 705 | 624 | *((*r)++) ^= *((*a)++); | 706 | 312 | } |
Unexecuted instantiation: coding.c:XorWords Unexecuted instantiation: curve25519.c:XorWords Unexecuted instantiation: curve448.c:XorWords Line | Count | Source | 701 | 3.00k | { | 702 | 3.00k | const wolfssl_word *e = *a + n; | 703 | | | 704 | 6.01k | while (*a < e) | 705 | 3.00k | *((*r)++) ^= *((*a)++); | 706 | 3.00k | } |
Unexecuted instantiation: dh.c:XorWords Unexecuted instantiation: ecc.c:XorWords Unexecuted instantiation: eccsi.c:XorWords Unexecuted instantiation: ed25519.c:XorWords Unexecuted instantiation: ed448.c:XorWords Unexecuted instantiation: fe_448.c:XorWords Unexecuted instantiation: fe_operations.c:XorWords Unexecuted instantiation: ge_448.c:XorWords Unexecuted instantiation: ge_operations.c:XorWords Unexecuted instantiation: hash.c:XorWords Unexecuted instantiation: hmac.c:XorWords Line | Count | Source | 701 | 112 | { | 702 | 112 | const wolfssl_word *e = *a + n; | 703 | | | 704 | 2.13k | while (*a < e) | 705 | 2.02k | *((*r)++) ^= *((*a)++); | 706 | 112 | } |
Unexecuted instantiation: md2.c:XorWords Unexecuted instantiation: md4.c:XorWords Unexecuted instantiation: md5.c:XorWords Unexecuted instantiation: memory.c:XorWords Unexecuted instantiation: poly1305.c:XorWords Line | Count | Source | 701 | 3.98k | { | 702 | 3.98k | const wolfssl_word *e = *a + n; | 703 | | | 704 | 18.1k | while (*a < e) | 705 | 14.1k | *((*r)++) ^= *((*a)++); | 706 | 3.98k | } |
Unexecuted instantiation: random.c:XorWords Unexecuted instantiation: ripemd.c:XorWords Line | Count | Source | 701 | 964 | { | 702 | 964 | const wolfssl_word *e = *a + n; | 703 | | | 704 | 5.70k | while (*a < e) | 705 | 4.74k | *((*r)++) ^= *((*a)++); | 706 | 964 | } |
Unexecuted instantiation: sha.c:XorWords Unexecuted instantiation: sha256.c:XorWords Line | Count | Source | 701 | 136k | { | 702 | 136k | const wolfssl_word *e = *a + n; | 703 | | | 704 | 1.36M | while (*a < e) | 705 | 1.23M | *((*r)++) ^= *((*a)++); | 706 | 136k | } |
Unexecuted instantiation: sha512.c:XorWords Unexecuted instantiation: siphash.c:XorWords Unexecuted instantiation: sm2.c:XorWords Unexecuted instantiation: sm3.c:XorWords Unexecuted instantiation: sm4.c:XorWords Unexecuted instantiation: sp_int.c:XorWords Unexecuted instantiation: wc_encrypt.c:XorWords Unexecuted instantiation: wolfmath.c:XorWords Unexecuted instantiation: ssl.c:XorWords Unexecuted instantiation: tls.c:XorWords Line | Count | Source | 701 | 1.68k | { | 702 | 1.68k | const wolfssl_word *e = *a + n; | 703 | | | 704 | 1.80k | while (*a < e) | 705 | 118 | *((*r)++) ^= *((*a)++); | 706 | 1.68k | } |
Unexecuted instantiation: wc_mlkem.c:XorWords Unexecuted instantiation: wc_mlkem_poly.c:XorWords Line | Count | Source | 701 | 17 | { | 702 | 17 | const wolfssl_word *e = *a + n; | 703 | | | 704 | 34 | while (*a < e) | 705 | 17 | *((*r)++) ^= *((*a)++); | 706 | 17 | } |
Unexecuted instantiation: keys.c:XorWords |
707 | | |
708 | | /* This routine performs a bitwise XOR operation of <*buf> and <*mask> of n |
709 | | counts, placing the result in <*buf>. */ |
710 | | |
711 | | WC_MISC_STATIC WC_INLINE void xorbuf(void* buf, const void* mask, word32 count) |
712 | 284k | { |
713 | 284k | byte* b = (byte*)buf; |
714 | 284k | const byte* m = (const byte*)mask; |
715 | | |
716 | | /* type-punning helpers */ |
717 | 284k | union { |
718 | 284k | byte* bp; |
719 | 284k | wolfssl_word* wp; |
720 | 284k | } tpb; |
721 | 284k | union { |
722 | 284k | const byte* bp; |
723 | 284k | const wolfssl_word* wp; |
724 | 284k | } tpm; |
725 | | |
726 | 284k | if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) && |
727 | 279k | (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0)) |
728 | 225k | { |
729 | | /* Both buffers are already aligned. Possible to XOR by words without |
730 | | * fixup. |
731 | | */ |
732 | | |
733 | 225k | tpb.bp = b; |
734 | 225k | tpm.bp = m; |
735 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ |
736 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) |
737 | | PRAGMA_GCC_DIAG_PUSH; |
738 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
739 | | #endif |
740 | 225k | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); |
741 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) |
742 | | PRAGMA_GCC_DIAG_POP; |
743 | | #endif |
744 | 225k | b = tpb.bp; |
745 | 225k | m = tpm.bp; |
746 | 225k | count &= (WOLFSSL_WORD_SIZE - 1); |
747 | 225k | } |
748 | 58.7k | else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == |
749 | 58.7k | ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1))) |
750 | 2.16k | { |
751 | | /* Alignment can be fixed up to allow XOR by words. */ |
752 | | |
753 | | /* Perform bytewise xor until pointers are aligned to |
754 | | * WOLFSSL_WORD_SIZE. |
755 | | */ |
756 | 9.62k | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) |
757 | 7.45k | { |
758 | 7.45k | *(b++) ^= *(m++); |
759 | 7.45k | count--; |
760 | 7.45k | } |
761 | | |
762 | 2.16k | tpb.bp = b; |
763 | 2.16k | tpm.bp = m; |
764 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ |
765 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) |
766 | | PRAGMA_GCC_DIAG_PUSH; |
767 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
768 | | #endif |
769 | 2.16k | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); |
770 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) |
771 | | PRAGMA_GCC_DIAG_POP; |
772 | | #endif |
773 | 2.16k | b = tpb.bp; |
774 | 2.16k | m = tpm.bp; |
775 | 2.16k | count &= (WOLFSSL_WORD_SIZE - 1); |
776 | 2.16k | } |
777 | | |
778 | 2.18M | while (count > 0) { |
779 | 1.89M | *b++ ^= *m++; |
780 | 1.89M | count--; |
781 | 1.89M | } |
782 | 284k | } Line | Count | Source | 712 | 129k | { | 713 | 129k | byte* b = (byte*)buf; | 714 | 129k | const byte* m = (const byte*)mask; | 715 | | | 716 | | /* type-punning helpers */ | 717 | 129k | union { | 718 | 129k | byte* bp; | 719 | 129k | wolfssl_word* wp; | 720 | 129k | } tpb; | 721 | 129k | union { | 722 | 129k | const byte* bp; | 723 | 129k | const wolfssl_word* wp; | 724 | 129k | } tpm; | 725 | | | 726 | 129k | if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 727 | 128k | (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0)) | 728 | 81.2k | { | 729 | | /* Both buffers are already aligned. Possible to XOR by words without | 730 | | * fixup. | 731 | | */ | 732 | | | 733 | 81.2k | tpb.bp = b; | 734 | 81.2k | tpm.bp = m; | 735 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 736 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 737 | | PRAGMA_GCC_DIAG_PUSH; | 738 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 739 | | #endif | 740 | 81.2k | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 741 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 742 | | PRAGMA_GCC_DIAG_POP; | 743 | | #endif | 744 | 81.2k | b = tpb.bp; | 745 | 81.2k | m = tpm.bp; | 746 | 81.2k | count &= (WOLFSSL_WORD_SIZE - 1); | 747 | 81.2k | } | 748 | 48.7k | else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == | 749 | 48.7k | ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1))) | 750 | 0 | { | 751 | | /* Alignment can be fixed up to allow XOR by words. */ | 752 | | | 753 | | /* Perform bytewise xor until pointers are aligned to | 754 | | * WOLFSSL_WORD_SIZE. | 755 | | */ | 756 | 0 | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) | 757 | 0 | { | 758 | 0 | *(b++) ^= *(m++); | 759 | 0 | count--; | 760 | 0 | } | 761 | |
| 762 | 0 | tpb.bp = b; | 763 | 0 | tpm.bp = m; | 764 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 765 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 766 | | PRAGMA_GCC_DIAG_PUSH; | 767 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 768 | | #endif | 769 | 0 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 770 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 771 | | PRAGMA_GCC_DIAG_POP; | 772 | | #endif | 773 | 0 | b = tpb.bp; | 774 | 0 | m = tpm.bp; | 775 | 0 | count &= (WOLFSSL_WORD_SIZE - 1); | 776 | 0 | } | 777 | | | 778 | 897k | while (count > 0) { | 779 | 767k | *b++ ^= *m++; | 780 | 767k | count--; | 781 | 767k | } | 782 | 129k | } |
Unexecuted instantiation: arc4.c:xorbuf Unexecuted instantiation: asn.c:xorbuf Unexecuted instantiation: blake2b.c:xorbuf Unexecuted instantiation: blake2s.c:xorbuf Unexecuted instantiation: camellia.c:xorbuf Unexecuted instantiation: chacha.c:xorbuf Unexecuted instantiation: chacha20_poly1305.c:xorbuf Line | Count | Source | 712 | 312 | { | 713 | 312 | byte* b = (byte*)buf; | 714 | 312 | const byte* m = (const byte*)mask; | 715 | | | 716 | | /* type-punning helpers */ | 717 | 312 | union { | 718 | 312 | byte* bp; | 719 | 312 | wolfssl_word* wp; | 720 | 312 | } tpb; | 721 | 312 | union { | 722 | 312 | const byte* bp; | 723 | 312 | const wolfssl_word* wp; | 724 | 312 | } tpm; | 725 | | | 726 | 312 | if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 727 | 312 | (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0)) | 728 | 312 | { | 729 | | /* Both buffers are already aligned. Possible to XOR by words without | 730 | | * fixup. | 731 | | */ | 732 | | | 733 | 312 | tpb.bp = b; | 734 | 312 | tpm.bp = m; | 735 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 736 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 737 | | PRAGMA_GCC_DIAG_PUSH; | 738 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 739 | | #endif | 740 | 312 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 741 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 742 | | PRAGMA_GCC_DIAG_POP; | 743 | | #endif | 744 | 312 | b = tpb.bp; | 745 | 312 | m = tpm.bp; | 746 | 312 | count &= (WOLFSSL_WORD_SIZE - 1); | 747 | 312 | } | 748 | 0 | else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == | 749 | 0 | ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1))) | 750 | 0 | { | 751 | | /* Alignment can be fixed up to allow XOR by words. */ | 752 | | | 753 | | /* Perform bytewise xor until pointers are aligned to | 754 | | * WOLFSSL_WORD_SIZE. | 755 | | */ | 756 | 0 | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) | 757 | 0 | { | 758 | 0 | *(b++) ^= *(m++); | 759 | 0 | count--; | 760 | 0 | } | 761 | |
| 762 | 0 | tpb.bp = b; | 763 | 0 | tpm.bp = m; | 764 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 765 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 766 | | PRAGMA_GCC_DIAG_PUSH; | 767 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 768 | | #endif | 769 | 0 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 770 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 771 | | PRAGMA_GCC_DIAG_POP; | 772 | | #endif | 773 | 0 | b = tpb.bp; | 774 | 0 | m = tpm.bp; | 775 | 0 | count &= (WOLFSSL_WORD_SIZE - 1); | 776 | 0 | } | 777 | | | 778 | 312 | while (count > 0) { | 779 | 0 | *b++ ^= *m++; | 780 | 0 | count--; | 781 | 0 | } | 782 | 312 | } |
Unexecuted instantiation: coding.c:xorbuf Unexecuted instantiation: curve25519.c:xorbuf Unexecuted instantiation: curve448.c:xorbuf Line | Count | Source | 712 | 3.00k | { | 713 | 3.00k | byte* b = (byte*)buf; | 714 | 3.00k | const byte* m = (const byte*)mask; | 715 | | | 716 | | /* type-punning helpers */ | 717 | 3.00k | union { | 718 | 3.00k | byte* bp; | 719 | 3.00k | wolfssl_word* wp; | 720 | 3.00k | } tpb; | 721 | 3.00k | union { | 722 | 3.00k | const byte* bp; | 723 | 3.00k | const wolfssl_word* wp; | 724 | 3.00k | } tpm; | 725 | | | 726 | 3.00k | if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 727 | 3.00k | (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0)) | 728 | 3.00k | { | 729 | | /* Both buffers are already aligned. Possible to XOR by words without | 730 | | * fixup. | 731 | | */ | 732 | | | 733 | 3.00k | tpb.bp = b; | 734 | 3.00k | tpm.bp = m; | 735 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 736 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 737 | | PRAGMA_GCC_DIAG_PUSH; | 738 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 739 | | #endif | 740 | 3.00k | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 741 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 742 | | PRAGMA_GCC_DIAG_POP; | 743 | | #endif | 744 | 3.00k | b = tpb.bp; | 745 | 3.00k | m = tpm.bp; | 746 | 3.00k | count &= (WOLFSSL_WORD_SIZE - 1); | 747 | 3.00k | } | 748 | 0 | else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == | 749 | 0 | ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1))) | 750 | 0 | { | 751 | | /* Alignment can be fixed up to allow XOR by words. */ | 752 | | | 753 | | /* Perform bytewise xor until pointers are aligned to | 754 | | * WOLFSSL_WORD_SIZE. | 755 | | */ | 756 | 0 | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) | 757 | 0 | { | 758 | 0 | *(b++) ^= *(m++); | 759 | 0 | count--; | 760 | 0 | } | 761 | |
| 762 | 0 | tpb.bp = b; | 763 | 0 | tpm.bp = m; | 764 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 765 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 766 | | PRAGMA_GCC_DIAG_PUSH; | 767 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 768 | | #endif | 769 | 0 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 770 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 771 | | PRAGMA_GCC_DIAG_POP; | 772 | | #endif | 773 | 0 | b = tpb.bp; | 774 | 0 | m = tpm.bp; | 775 | 0 | count &= (WOLFSSL_WORD_SIZE - 1); | 776 | 0 | } | 777 | | | 778 | 3.00k | while (count > 0) { | 779 | 0 | *b++ ^= *m++; | 780 | 0 | count--; | 781 | 0 | } | 782 | 3.00k | } |
Unexecuted instantiation: dh.c:xorbuf Unexecuted instantiation: ecc.c:xorbuf Unexecuted instantiation: eccsi.c:xorbuf Unexecuted instantiation: ed25519.c:xorbuf Unexecuted instantiation: ed448.c:xorbuf Unexecuted instantiation: fe_448.c:xorbuf Unexecuted instantiation: fe_operations.c:xorbuf Unexecuted instantiation: ge_448.c:xorbuf Unexecuted instantiation: ge_operations.c:xorbuf Unexecuted instantiation: hash.c:xorbuf Unexecuted instantiation: hmac.c:xorbuf Line | Count | Source | 712 | 220 | { | 713 | 220 | byte* b = (byte*)buf; | 714 | 220 | const byte* m = (const byte*)mask; | 715 | | | 716 | | /* type-punning helpers */ | 717 | 220 | union { | 718 | 220 | byte* bp; | 719 | 220 | wolfssl_word* wp; | 720 | 220 | } tpb; | 721 | 220 | union { | 722 | 220 | const byte* bp; | 723 | 220 | const wolfssl_word* wp; | 724 | 220 | } tpm; | 725 | | | 726 | 220 | if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 727 | 112 | (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0)) | 728 | 112 | { | 729 | | /* Both buffers are already aligned. Possible to XOR by words without | 730 | | * fixup. | 731 | | */ | 732 | | | 733 | 112 | tpb.bp = b; | 734 | 112 | tpm.bp = m; | 735 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 736 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 737 | | PRAGMA_GCC_DIAG_PUSH; | 738 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 739 | | #endif | 740 | 112 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 741 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 742 | | PRAGMA_GCC_DIAG_POP; | 743 | | #endif | 744 | 112 | b = tpb.bp; | 745 | 112 | m = tpm.bp; | 746 | 112 | count &= (WOLFSSL_WORD_SIZE - 1); | 747 | 112 | } | 748 | 108 | else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == | 749 | 108 | ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1))) | 750 | 0 | { | 751 | | /* Alignment can be fixed up to allow XOR by words. */ | 752 | | | 753 | | /* Perform bytewise xor until pointers are aligned to | 754 | | * WOLFSSL_WORD_SIZE. | 755 | | */ | 756 | 0 | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) | 757 | 0 | { | 758 | 0 | *(b++) ^= *(m++); | 759 | 0 | count--; | 760 | 0 | } | 761 | |
| 762 | 0 | tpb.bp = b; | 763 | 0 | tpm.bp = m; | 764 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 765 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 766 | | PRAGMA_GCC_DIAG_PUSH; | 767 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 768 | | #endif | 769 | 0 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 770 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 771 | | PRAGMA_GCC_DIAG_POP; | 772 | | #endif | 773 | 0 | b = tpb.bp; | 774 | 0 | m = tpm.bp; | 775 | 0 | count &= (WOLFSSL_WORD_SIZE - 1); | 776 | 0 | } | 777 | | | 778 | 5.42k | while (count > 0) { | 779 | 5.20k | *b++ ^= *m++; | 780 | 5.20k | count--; | 781 | 5.20k | } | 782 | 220 | } |
Unexecuted instantiation: md2.c:xorbuf Unexecuted instantiation: md4.c:xorbuf Unexecuted instantiation: md5.c:xorbuf Unexecuted instantiation: memory.c:xorbuf Unexecuted instantiation: poly1305.c:xorbuf Line | Count | Source | 712 | 4.03k | { | 713 | 4.03k | byte* b = (byte*)buf; | 714 | 4.03k | const byte* m = (const byte*)mask; | 715 | | | 716 | | /* type-punning helpers */ | 717 | 4.03k | union { | 718 | 4.03k | byte* bp; | 719 | 4.03k | wolfssl_word* wp; | 720 | 4.03k | } tpb; | 721 | 4.03k | union { | 722 | 4.03k | const byte* bp; | 723 | 4.03k | const wolfssl_word* wp; | 724 | 4.03k | } tpm; | 725 | | | 726 | 4.03k | if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 727 | 3.98k | (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0)) | 728 | 3.98k | { | 729 | | /* Both buffers are already aligned. Possible to XOR by words without | 730 | | * fixup. | 731 | | */ | 732 | | | 733 | 3.98k | tpb.bp = b; | 734 | 3.98k | tpm.bp = m; | 735 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 736 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 737 | | PRAGMA_GCC_DIAG_PUSH; | 738 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 739 | | #endif | 740 | 3.98k | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 741 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 742 | | PRAGMA_GCC_DIAG_POP; | 743 | | #endif | 744 | 3.98k | b = tpb.bp; | 745 | 3.98k | m = tpm.bp; | 746 | 3.98k | count &= (WOLFSSL_WORD_SIZE - 1); | 747 | 3.98k | } | 748 | 56 | else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == | 749 | 56 | ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1))) | 750 | 0 | { | 751 | | /* Alignment can be fixed up to allow XOR by words. */ | 752 | | | 753 | | /* Perform bytewise xor until pointers are aligned to | 754 | | * WOLFSSL_WORD_SIZE. | 755 | | */ | 756 | 0 | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) | 757 | 0 | { | 758 | 0 | *(b++) ^= *(m++); | 759 | 0 | count--; | 760 | 0 | } | 761 | |
| 762 | 0 | tpb.bp = b; | 763 | 0 | tpm.bp = m; | 764 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 765 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 766 | | PRAGMA_GCC_DIAG_PUSH; | 767 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 768 | | #endif | 769 | 0 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 770 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 771 | | PRAGMA_GCC_DIAG_POP; | 772 | | #endif | 773 | 0 | b = tpb.bp; | 774 | 0 | m = tpm.bp; | 775 | 0 | count &= (WOLFSSL_WORD_SIZE - 1); | 776 | 0 | } | 777 | | | 778 | 6.19k | while (count > 0) { | 779 | 2.15k | *b++ ^= *m++; | 780 | 2.15k | count--; | 781 | 2.15k | } | 782 | 4.03k | } |
Unexecuted instantiation: random.c:xorbuf Unexecuted instantiation: ripemd.c:xorbuf Line | Count | Source | 712 | 2.36k | { | 713 | 2.36k | byte* b = (byte*)buf; | 714 | 2.36k | const byte* m = (const byte*)mask; | 715 | | | 716 | | /* type-punning helpers */ | 717 | 2.36k | union { | 718 | 2.36k | byte* bp; | 719 | 2.36k | wolfssl_word* wp; | 720 | 2.36k | } tpb; | 721 | 2.36k | union { | 722 | 2.36k | const byte* bp; | 723 | 2.36k | const wolfssl_word* wp; | 724 | 2.36k | } tpm; | 725 | | | 726 | 2.36k | if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 727 | 371 | (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0)) | 728 | 369 | { | 729 | | /* Both buffers are already aligned. Possible to XOR by words without | 730 | | * fixup. | 731 | | */ | 732 | | | 733 | 369 | tpb.bp = b; | 734 | 369 | tpm.bp = m; | 735 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 736 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 737 | | PRAGMA_GCC_DIAG_PUSH; | 738 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 739 | | #endif | 740 | 369 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 741 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 742 | | PRAGMA_GCC_DIAG_POP; | 743 | | #endif | 744 | 369 | b = tpb.bp; | 745 | 369 | m = tpm.bp; | 746 | 369 | count &= (WOLFSSL_WORD_SIZE - 1); | 747 | 369 | } | 748 | 2.00k | else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == | 749 | 2.00k | ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1))) | 750 | 595 | { | 751 | | /* Alignment can be fixed up to allow XOR by words. */ | 752 | | | 753 | | /* Perform bytewise xor until pointers are aligned to | 754 | | * WOLFSSL_WORD_SIZE. | 755 | | */ | 756 | 1.78k | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) | 757 | 1.19k | { | 758 | 1.19k | *(b++) ^= *(m++); | 759 | 1.19k | count--; | 760 | 1.19k | } | 761 | | | 762 | 595 | tpb.bp = b; | 763 | 595 | tpm.bp = m; | 764 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 765 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 766 | | PRAGMA_GCC_DIAG_PUSH; | 767 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 768 | | #endif | 769 | 595 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 770 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 771 | | PRAGMA_GCC_DIAG_POP; | 772 | | #endif | 773 | 595 | b = tpb.bp; | 774 | 595 | m = tpm.bp; | 775 | 595 | count &= (WOLFSSL_WORD_SIZE - 1); | 776 | 595 | } | 777 | | | 778 | 126k | while (count > 0) { | 779 | 123k | *b++ ^= *m++; | 780 | 123k | count--; | 781 | 123k | } | 782 | 2.36k | } |
Unexecuted instantiation: sha.c:xorbuf Unexecuted instantiation: sha256.c:xorbuf Line | Count | Source | 712 | 143k | { | 713 | 143k | byte* b = (byte*)buf; | 714 | 143k | const byte* m = (const byte*)mask; | 715 | | | 716 | | /* type-punning helpers */ | 717 | 143k | union { | 718 | 143k | byte* bp; | 719 | 143k | wolfssl_word* wp; | 720 | 143k | } tpb; | 721 | 143k | union { | 722 | 143k | const byte* bp; | 723 | 143k | const wolfssl_word* wp; | 724 | 143k | } tpm; | 725 | | | 726 | 143k | if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 727 | 143k | (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0)) | 728 | 136k | { | 729 | | /* Both buffers are already aligned. Possible to XOR by words without | 730 | | * fixup. | 731 | | */ | 732 | | | 733 | 136k | tpb.bp = b; | 734 | 136k | tpm.bp = m; | 735 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 736 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 737 | | PRAGMA_GCC_DIAG_PUSH; | 738 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 739 | | #endif | 740 | 136k | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 741 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 742 | | PRAGMA_GCC_DIAG_POP; | 743 | | #endif | 744 | 136k | b = tpb.bp; | 745 | 136k | m = tpm.bp; | 746 | 136k | count &= (WOLFSSL_WORD_SIZE - 1); | 747 | 136k | } | 748 | 6.24k | else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == | 749 | 6.24k | ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1))) | 750 | 0 | { | 751 | | /* Alignment can be fixed up to allow XOR by words. */ | 752 | | | 753 | | /* Perform bytewise xor until pointers are aligned to | 754 | | * WOLFSSL_WORD_SIZE. | 755 | | */ | 756 | 0 | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) | 757 | 0 | { | 758 | 0 | *(b++) ^= *(m++); | 759 | 0 | count--; | 760 | 0 | } | 761 | |
| 762 | 0 | tpb.bp = b; | 763 | 0 | tpm.bp = m; | 764 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 765 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 766 | | PRAGMA_GCC_DIAG_PUSH; | 767 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 768 | | #endif | 769 | 0 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 770 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 771 | | PRAGMA_GCC_DIAG_POP; | 772 | | #endif | 773 | 0 | b = tpb.bp; | 774 | 0 | m = tpm.bp; | 775 | 0 | count &= (WOLFSSL_WORD_SIZE - 1); | 776 | 0 | } | 777 | | | 778 | 1.13M | while (count > 0) { | 779 | 990k | *b++ ^= *m++; | 780 | 990k | count--; | 781 | 990k | } | 782 | 143k | } |
Unexecuted instantiation: sha512.c:xorbuf Unexecuted instantiation: siphash.c:xorbuf Unexecuted instantiation: sm2.c:xorbuf Unexecuted instantiation: sm3.c:xorbuf Unexecuted instantiation: sm4.c:xorbuf Unexecuted instantiation: sp_int.c:xorbuf Unexecuted instantiation: wc_encrypt.c:xorbuf Unexecuted instantiation: wolfmath.c:xorbuf Unexecuted instantiation: ssl.c:xorbuf Unexecuted instantiation: tls.c:xorbuf Line | Count | Source | 712 | 1.68k | { | 713 | 1.68k | byte* b = (byte*)buf; | 714 | 1.68k | const byte* m = (const byte*)mask; | 715 | | | 716 | | /* type-punning helpers */ | 717 | 1.68k | union { | 718 | 1.68k | byte* bp; | 719 | 1.68k | wolfssl_word* wp; | 720 | 1.68k | } tpb; | 721 | 1.68k | union { | 722 | 1.68k | const byte* bp; | 723 | 1.68k | const wolfssl_word* wp; | 724 | 1.68k | } tpm; | 725 | | | 726 | 1.68k | if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 727 | 118 | (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0)) | 728 | 118 | { | 729 | | /* Both buffers are already aligned. Possible to XOR by words without | 730 | | * fixup. | 731 | | */ | 732 | | | 733 | 118 | tpb.bp = b; | 734 | 118 | tpm.bp = m; | 735 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 736 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 737 | | PRAGMA_GCC_DIAG_PUSH; | 738 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 739 | | #endif | 740 | 118 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 741 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 742 | | PRAGMA_GCC_DIAG_POP; | 743 | | #endif | 744 | 118 | b = tpb.bp; | 745 | 118 | m = tpm.bp; | 746 | 118 | count &= (WOLFSSL_WORD_SIZE - 1); | 747 | 118 | } | 748 | 1.56k | else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == | 749 | 1.56k | ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1))) | 750 | 1.56k | { | 751 | | /* Alignment can be fixed up to allow XOR by words. */ | 752 | | | 753 | | /* Perform bytewise xor until pointers are aligned to | 754 | | * WOLFSSL_WORD_SIZE. | 755 | | */ | 756 | 7.83k | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) | 757 | 6.26k | { | 758 | 6.26k | *(b++) ^= *(m++); | 759 | 6.26k | count--; | 760 | 6.26k | } | 761 | | | 762 | 1.56k | tpb.bp = b; | 763 | 1.56k | tpm.bp = m; | 764 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 765 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 766 | | PRAGMA_GCC_DIAG_PUSH; | 767 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 768 | | #endif | 769 | 1.56k | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 770 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 771 | | PRAGMA_GCC_DIAG_POP; | 772 | | #endif | 773 | 1.56k | b = tpb.bp; | 774 | 1.56k | m = tpm.bp; | 775 | 1.56k | count &= (WOLFSSL_WORD_SIZE - 1); | 776 | 1.56k | } | 777 | | | 778 | 7.95k | while (count > 0) { | 779 | 6.26k | *b++ ^= *m++; | 780 | 6.26k | count--; | 781 | 6.26k | } | 782 | 1.68k | } |
Unexecuted instantiation: wc_mlkem.c:xorbuf Unexecuted instantiation: wc_mlkem_poly.c:xorbuf Line | Count | Source | 712 | 17 | { | 713 | 17 | byte* b = (byte*)buf; | 714 | 17 | const byte* m = (const byte*)mask; | 715 | | | 716 | | /* type-punning helpers */ | 717 | 17 | union { | 718 | 17 | byte* bp; | 719 | 17 | wolfssl_word* wp; | 720 | 17 | } tpb; | 721 | 17 | union { | 722 | 17 | const byte* bp; | 723 | 17 | const wolfssl_word* wp; | 724 | 17 | } tpm; | 725 | | | 726 | 17 | if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) && | 727 | 17 | (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0)) | 728 | 17 | { | 729 | | /* Both buffers are already aligned. Possible to XOR by words without | 730 | | * fixup. | 731 | | */ | 732 | | | 733 | 17 | tpb.bp = b; | 734 | 17 | tpm.bp = m; | 735 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 736 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 737 | | PRAGMA_GCC_DIAG_PUSH; | 738 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 739 | | #endif | 740 | 17 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 741 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 742 | | PRAGMA_GCC_DIAG_POP; | 743 | | #endif | 744 | 17 | b = tpb.bp; | 745 | 17 | m = tpm.bp; | 746 | 17 | count &= (WOLFSSL_WORD_SIZE - 1); | 747 | 17 | } | 748 | 0 | else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == | 749 | 0 | ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1))) | 750 | 0 | { | 751 | | /* Alignment can be fixed up to allow XOR by words. */ | 752 | | | 753 | | /* Perform bytewise xor until pointers are aligned to | 754 | | * WOLFSSL_WORD_SIZE. | 755 | | */ | 756 | 0 | while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0)) | 757 | 0 | { | 758 | 0 | *(b++) ^= *(m++); | 759 | 0 | count--; | 760 | 0 | } | 761 | |
| 762 | 0 | tpb.bp = b; | 763 | 0 | tpm.bp = m; | 764 | | /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */ | 765 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 766 | | PRAGMA_GCC_DIAG_PUSH; | 767 | | PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") | 768 | | #endif | 769 | 0 | XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2); | 770 | | #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE) | 771 | | PRAGMA_GCC_DIAG_POP; | 772 | | #endif | 773 | 0 | b = tpb.bp; | 774 | 0 | m = tpm.bp; | 775 | 0 | count &= (WOLFSSL_WORD_SIZE - 1); | 776 | 0 | } | 777 | | | 778 | 85 | while (count > 0) { | 779 | 68 | *b++ ^= *m++; | 780 | 68 | count--; | 781 | 68 | } | 782 | 17 | } |
Unexecuted instantiation: keys.c:xorbuf |
783 | | |
784 | | #endif /* !WOLFSSL_NO_XOR_OPS */ |
785 | | |
786 | | #ifndef WOLFSSL_NO_FORCE_ZERO |
787 | | /* This routine fills the first len bytes of the memory area pointed by mem |
788 | | with zeros. It ensures compiler optimization doesn't skip it. */ |
789 | | WC_MISC_STATIC WC_INLINE void ForceZero(void* mem, size_t len) |
790 | 3.29M | { |
791 | 3.29M | byte *zb = (byte *)mem; |
792 | 3.29M | unsigned long *zl; |
793 | | |
794 | | /* Make the compiler put the buffer's current contents at mem, so the |
795 | | * wipe below hits the memory that holds them and not a copy. */ |
796 | 3.29M | WC_BARRIER_DATA(mem); |
797 | | |
798 | | /* No early return here: a short unaligned buffer must still reach the |
799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ |
800 | 3.88M | while ((len != 0) && |
801 | 3.88M | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { |
802 | 594k | *zb++ = 0; |
803 | 594k | --len; |
804 | 594k | } |
805 | | |
806 | 3.29M | zl = (unsigned long *)zb; |
807 | | |
808 | 73.9M | while (len >= sizeof(unsigned long)) { |
809 | 70.6M | *zl++ = 0; |
810 | 70.6M | len -= sizeof(unsigned long); |
811 | 70.6M | } |
812 | | |
813 | 3.29M | zb = (byte *)zl; |
814 | | |
815 | 5.77M | while (len) { |
816 | 2.48M | *zb++ = 0; |
817 | 2.48M | --len; |
818 | 2.48M | } |
819 | | |
820 | | /* The caller is done with the buffer, so the compiler may drop the |
821 | | * stores above as dead. The barrier makes the buffer look read by |
822 | | * opaque code. No CPU fence is needed for that. */ |
823 | 3.29M | WC_BARRIER_DATA(mem); |
824 | 3.29M | } Line | Count | Source | 790 | 12.7k | { | 791 | 12.7k | byte *zb = (byte *)mem; | 792 | 12.7k | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 12.7k | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 42.6k | while ((len != 0) && | 801 | 38.8k | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 29.8k | *zb++ = 0; | 803 | 29.8k | --len; | 804 | 29.8k | } | 805 | | | 806 | 12.7k | zl = (unsigned long *)zb; | 807 | | | 808 | 505k | while (len >= sizeof(unsigned long)) { | 809 | 493k | *zl++ = 0; | 810 | 493k | len -= sizeof(unsigned long); | 811 | 493k | } | 812 | | | 813 | 12.7k | zb = (byte *)zl; | 814 | | | 815 | 27.5k | while (len) { | 816 | 14.8k | *zb++ = 0; | 817 | 14.8k | --len; | 818 | 14.8k | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 12.7k | WC_BARRIER_DATA(mem); | 824 | 12.7k | } |
Unexecuted instantiation: arc4.c:ForceZero Unexecuted instantiation: asn.c:ForceZero Unexecuted instantiation: blake2b.c:ForceZero Unexecuted instantiation: blake2s.c:ForceZero Unexecuted instantiation: camellia.c:ForceZero Unexecuted instantiation: chacha.c:ForceZero Unexecuted instantiation: chacha20_poly1305.c:ForceZero Line | Count | Source | 790 | 312 | { | 791 | 312 | byte *zb = (byte *)mem; | 792 | 312 | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 312 | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 312 | while ((len != 0) && | 801 | 312 | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 0 | *zb++ = 0; | 803 | 0 | --len; | 804 | 0 | } | 805 | | | 806 | 312 | zl = (unsigned long *)zb; | 807 | | | 808 | 24.0k | while (len >= sizeof(unsigned long)) { | 809 | 23.7k | *zl++ = 0; | 810 | 23.7k | len -= sizeof(unsigned long); | 811 | 23.7k | } | 812 | | | 813 | 312 | zb = (byte *)zl; | 814 | | | 815 | 312 | while (len) { | 816 | 0 | *zb++ = 0; | 817 | 0 | --len; | 818 | 0 | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 312 | WC_BARRIER_DATA(mem); | 824 | 312 | } |
Unexecuted instantiation: coding.c:ForceZero Line | Count | Source | 790 | 4.20k | { | 791 | 4.20k | byte *zb = (byte *)mem; | 792 | 4.20k | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 4.20k | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 4.20k | while ((len != 0) && | 801 | 4.20k | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 0 | *zb++ = 0; | 803 | 0 | --len; | 804 | 0 | } | 805 | | | 806 | 4.20k | zl = (unsigned long *)zb; | 807 | | | 808 | 31.2k | while (len >= sizeof(unsigned long)) { | 809 | 27.0k | *zl++ = 0; | 810 | 27.0k | len -= sizeof(unsigned long); | 811 | 27.0k | } | 812 | | | 813 | 4.20k | zb = (byte *)zl; | 814 | | | 815 | 4.20k | while (len) { | 816 | 0 | *zb++ = 0; | 817 | 0 | --len; | 818 | 0 | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 4.20k | WC_BARRIER_DATA(mem); | 824 | 4.20k | } |
Line | Count | Source | 790 | 505 | { | 791 | 505 | byte *zb = (byte *)mem; | 792 | 505 | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 505 | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 505 | while ((len != 0) && | 801 | 505 | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 0 | *zb++ = 0; | 803 | 0 | --len; | 804 | 0 | } | 805 | | | 806 | 505 | zl = (unsigned long *)zb; | 807 | | | 808 | 4.04k | while (len >= sizeof(unsigned long)) { | 809 | 3.53k | *zl++ = 0; | 810 | 3.53k | len -= sizeof(unsigned long); | 811 | 3.53k | } | 812 | | | 813 | 505 | zb = (byte *)zl; | 814 | | | 815 | 505 | while (len) { | 816 | 0 | *zb++ = 0; | 817 | 0 | --len; | 818 | 0 | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 505 | WC_BARRIER_DATA(mem); | 824 | 505 | } |
Unexecuted instantiation: des3.c:ForceZero Unexecuted instantiation: dh.c:ForceZero Line | Count | Source | 790 | 37.0k | { | 791 | 37.0k | byte *zb = (byte *)mem; | 792 | 37.0k | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 37.0k | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 37.0k | while ((len != 0) && | 801 | 37.0k | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 0 | *zb++ = 0; | 803 | 0 | --len; | 804 | 0 | } | 805 | | | 806 | 37.0k | zl = (unsigned long *)zb; | 807 | | | 808 | 13.9M | while (len >= sizeof(unsigned long)) { | 809 | 13.9M | *zl++ = 0; | 810 | 13.9M | len -= sizeof(unsigned long); | 811 | 13.9M | } | 812 | | | 813 | 37.0k | zb = (byte *)zl; | 814 | | | 815 | 56.1k | while (len) { | 816 | 19.1k | *zb++ = 0; | 817 | 19.1k | --len; | 818 | 19.1k | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 37.0k | WC_BARRIER_DATA(mem); | 824 | 37.0k | } |
Unexecuted instantiation: eccsi.c:ForceZero Line | Count | Source | 790 | 6.89k | { | 791 | 6.89k | byte *zb = (byte *)mem; | 792 | 6.89k | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 6.89k | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 6.89k | while ((len != 0) && | 801 | 6.89k | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 0 | *zb++ = 0; | 803 | 0 | --len; | 804 | 0 | } | 805 | | | 806 | 6.89k | zl = (unsigned long *)zb; | 807 | | | 808 | 234k | while (len >= sizeof(unsigned long)) { | 809 | 227k | *zl++ = 0; | 810 | 227k | len -= sizeof(unsigned long); | 811 | 227k | } | 812 | | | 813 | 6.89k | zb = (byte *)zl; | 814 | | | 815 | 6.89k | while (len) { | 816 | 0 | *zb++ = 0; | 817 | 0 | --len; | 818 | 0 | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 6.89k | WC_BARRIER_DATA(mem); | 824 | 6.89k | } |
Line | Count | Source | 790 | 7.95k | { | 791 | 7.95k | byte *zb = (byte *)mem; | 792 | 7.95k | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 7.95k | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 8.30k | while ((len != 0) && | 801 | 8.30k | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 350 | *zb++ = 0; | 803 | 350 | --len; | 804 | 350 | } | 805 | | | 806 | 7.95k | zl = (unsigned long *)zb; | 807 | | | 808 | 431k | while (len >= sizeof(unsigned long)) { | 809 | 423k | *zl++ = 0; | 810 | 423k | len -= sizeof(unsigned long); | 811 | 423k | } | 812 | | | 813 | 7.95k | zb = (byte *)zl; | 814 | | | 815 | 14.5k | while (len) { | 816 | 6.58k | *zb++ = 0; | 817 | 6.58k | --len; | 818 | 6.58k | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 7.95k | WC_BARRIER_DATA(mem); | 824 | 7.95k | } |
Unexecuted instantiation: fe_448.c:ForceZero Unexecuted instantiation: fe_operations.c:ForceZero Unexecuted instantiation: ge_448.c:ForceZero Unexecuted instantiation: ge_operations.c:ForceZero Unexecuted instantiation: hash.c:ForceZero Line | Count | Source | 790 | 14.3k | { | 791 | 14.3k | byte *zb = (byte *)mem; | 792 | 14.3k | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 14.3k | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 14.3k | while ((len != 0) && | 801 | 14.3k | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 0 | *zb++ = 0; | 803 | 0 | --len; | 804 | 0 | } | 805 | | | 806 | 14.3k | zl = (unsigned long *)zb; | 807 | | | 808 | 1.56M | while (len >= sizeof(unsigned long)) { | 809 | 1.55M | *zl++ = 0; | 810 | 1.55M | len -= sizeof(unsigned long); | 811 | 1.55M | } | 812 | | | 813 | 14.3k | zb = (byte *)zl; | 814 | | | 815 | 14.3k | while (len) { | 816 | 0 | *zb++ = 0; | 817 | 0 | --len; | 818 | 0 | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 14.3k | WC_BARRIER_DATA(mem); | 824 | 14.3k | } |
Unexecuted instantiation: kdf.c:ForceZero Unexecuted instantiation: md2.c:ForceZero Unexecuted instantiation: md4.c:ForceZero Unexecuted instantiation: md5.c:ForceZero Unexecuted instantiation: memory.c:ForceZero Unexecuted instantiation: poly1305.c:ForceZero Line | Count | Source | 790 | 169 | { | 791 | 169 | byte *zb = (byte *)mem; | 792 | 169 | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 169 | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 169 | while ((len != 0) && | 801 | 169 | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 0 | *zb++ = 0; | 803 | 0 | --len; | 804 | 0 | } | 805 | | | 806 | 169 | zl = (unsigned long *)zb; | 807 | | | 808 | 777 | while (len >= sizeof(unsigned long)) { | 809 | 608 | *zl++ = 0; | 810 | 608 | len -= sizeof(unsigned long); | 811 | 608 | } | 812 | | | 813 | 169 | zb = (byte *)zl; | 814 | | | 815 | 313 | while (len) { | 816 | 144 | *zb++ = 0; | 817 | 144 | --len; | 818 | 144 | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 169 | WC_BARRIER_DATA(mem); | 824 | 169 | } |
Line | Count | Source | 790 | 460k | { | 791 | 460k | byte *zb = (byte *)mem; | 792 | 460k | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 460k | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 460k | while ((len != 0) && | 801 | 460k | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 0 | *zb++ = 0; | 803 | 0 | --len; | 804 | 0 | } | 805 | | | 806 | 460k | zl = (unsigned long *)zb; | 807 | | | 808 | 5.35M | while (len >= sizeof(unsigned long)) { | 809 | 4.89M | *zl++ = 0; | 810 | 4.89M | len -= sizeof(unsigned long); | 811 | 4.89M | } | 812 | | | 813 | 460k | zb = (byte *)zl; | 814 | | | 815 | 2.03M | while (len) { | 816 | 1.57M | *zb++ = 0; | 817 | 1.57M | --len; | 818 | 1.57M | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 460k | WC_BARRIER_DATA(mem); | 824 | 460k | } |
Unexecuted instantiation: ripemd.c:ForceZero Unexecuted instantiation: rsa.c:ForceZero Unexecuted instantiation: sha.c:ForceZero Line | Count | Source | 790 | 210k | { | 791 | 210k | byte *zb = (byte *)mem; | 792 | 210k | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 210k | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 210k | while ((len != 0) && | 801 | 210k | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 0 | *zb++ = 0; | 803 | 0 | --len; | 804 | 0 | } | 805 | | | 806 | 210k | zl = (unsigned long *)zb; | 807 | | | 808 | 6.89M | while (len >= sizeof(unsigned long)) { | 809 | 6.68M | *zl++ = 0; | 810 | 6.68M | len -= sizeof(unsigned long); | 811 | 6.68M | } | 812 | | | 813 | 210k | zb = (byte *)zl; | 814 | | | 815 | 210k | while (len) { | 816 | 0 | *zb++ = 0; | 817 | 0 | --len; | 818 | 0 | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 210k | WC_BARRIER_DATA(mem); | 824 | 210k | } |
Unexecuted instantiation: sha3.c:ForceZero Line | Count | Source | 790 | 2.31M | { | 791 | 2.31M | byte *zb = (byte *)mem; | 792 | 2.31M | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 2.31M | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 2.31M | while ((len != 0) && | 801 | 2.31M | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 0 | *zb++ = 0; | 803 | 0 | --len; | 804 | 0 | } | 805 | | | 806 | 2.31M | zl = (unsigned long *)zb; | 807 | | | 808 | 39.8M | while (len >= sizeof(unsigned long)) { | 809 | 37.5M | *zl++ = 0; | 810 | 37.5M | len -= sizeof(unsigned long); | 811 | 37.5M | } | 812 | | | 813 | 2.31M | zb = (byte *)zl; | 814 | | | 815 | 2.31M | while (len) { | 816 | 0 | *zb++ = 0; | 817 | 0 | --len; | 818 | 0 | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 2.31M | WC_BARRIER_DATA(mem); | 824 | 2.31M | } |
Unexecuted instantiation: siphash.c:ForceZero Unexecuted instantiation: sm2.c:ForceZero Unexecuted instantiation: sm3.c:ForceZero Unexecuted instantiation: sm4.c:ForceZero Line | Count | Source | 790 | 51.8k | { | 791 | 51.8k | byte *zb = (byte *)mem; | 792 | 51.8k | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 51.8k | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 121k | while ((len != 0) && | 801 | 121k | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 69.8k | *zb++ = 0; | 803 | 69.8k | --len; | 804 | 69.8k | } | 805 | | | 806 | 51.8k | zl = (unsigned long *)zb; | 807 | | | 808 | 3.55M | while (len >= sizeof(unsigned long)) { | 809 | 3.49M | *zl++ = 0; | 810 | 3.49M | len -= sizeof(unsigned long); | 811 | 3.49M | } | 812 | | | 813 | 51.8k | zb = (byte *)zl; | 814 | | | 815 | 97.3k | while (len) { | 816 | 45.4k | *zb++ = 0; | 817 | 45.4k | --len; | 818 | 45.4k | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 51.8k | WC_BARRIER_DATA(mem); | 824 | 51.8k | } |
Unexecuted instantiation: wc_encrypt.c:ForceZero Unexecuted instantiation: wolfmath.c:ForceZero Line | Count | Source | 790 | 166k | { | 791 | 166k | byte *zb = (byte *)mem; | 792 | 166k | unsigned long *zl; | 793 | | | 794 | | /* Make the compiler put the buffer's current contents at mem, so the | 795 | | * wipe below hits the memory that holds them and not a copy. */ | 796 | 166k | WC_BARRIER_DATA(mem); | 797 | | | 798 | | /* No early return here: a short unaligned buffer must still reach the | 799 | | * trailing barrier, or its wipe can be dropped as a dead store. */ | 800 | 661k | while ((len != 0) && | 801 | 661k | ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U))) { | 802 | 494k | *zb++ = 0; | 803 | 494k | --len; | 804 | 494k | } | 805 | | | 806 | 166k | zl = (unsigned long *)zb; | 807 | | | 808 | 1.42M | while (len >= sizeof(unsigned long)) { | 809 | 1.25M | *zl++ = 0; | 810 | 1.25M | len -= sizeof(unsigned long); | 811 | 1.25M | } | 812 | | | 813 | 166k | zb = (byte *)zl; | 814 | | | 815 | 991k | while (len) { | 816 | 824k | *zb++ = 0; | 817 | 824k | --len; | 818 | 824k | } | 819 | | | 820 | | /* The caller is done with the buffer, so the compiler may drop the | 821 | | * stores above as dead. The barrier makes the buffer look read by | 822 | | * opaque code. No CPU fence is needed for that. */ | 823 | 166k | WC_BARRIER_DATA(mem); | 824 | 166k | } |
Unexecuted instantiation: tls.c:ForceZero Unexecuted instantiation: tls13.c:ForceZero Unexecuted instantiation: wc_mlkem.c:ForceZero Unexecuted instantiation: wc_mlkem_poly.c:ForceZero Unexecuted instantiation: internal.c:ForceZero Unexecuted instantiation: keys.c:ForceZero |
825 | | #endif |
826 | | |
827 | | |
828 | | #ifndef WOLFSSL_NO_CONST_CMP |
829 | | /* check all length bytes for equality, return 0 on success */ |
830 | | WC_MISC_STATIC WC_INLINE int ConstantCompare(const byte* a, const byte* b, |
831 | | int length) |
832 | 113k | { |
833 | 113k | int i; |
834 | 113k | int compareSum = 0; |
835 | | |
836 | 27.2M | for (i = 0; i < length; i++) { |
837 | 27.1M | compareSum |= a[i] ^ b[i]; |
838 | 27.1M | } |
839 | | |
840 | 113k | return compareSum; |
841 | 113k | } Line | Count | Source | 832 | 322 | { | 833 | 322 | int i; | 834 | 322 | int compareSum = 0; | 835 | | | 836 | 5.32k | for (i = 0; i < length; i++) { | 837 | 5.00k | compareSum |= a[i] ^ b[i]; | 838 | 5.00k | } | 839 | | | 840 | 322 | return compareSum; | 841 | 322 | } |
Unexecuted instantiation: arc4.c:ConstantCompare Unexecuted instantiation: asn.c:ConstantCompare Unexecuted instantiation: blake2b.c:ConstantCompare Unexecuted instantiation: blake2s.c:ConstantCompare Unexecuted instantiation: camellia.c:ConstantCompare Unexecuted instantiation: chacha.c:ConstantCompare chacha20_poly1305.c:ConstantCompare Line | Count | Source | 832 | 55 | { | 833 | 55 | int i; | 834 | 55 | int compareSum = 0; | 835 | | | 836 | 935 | for (i = 0; i < length; i++) { | 837 | 880 | compareSum |= a[i] ^ b[i]; | 838 | 880 | } | 839 | | | 840 | 55 | return compareSum; | 841 | 55 | } |
Unexecuted instantiation: cmac.c:ConstantCompare Unexecuted instantiation: coding.c:ConstantCompare Unexecuted instantiation: curve25519.c:ConstantCompare Unexecuted instantiation: curve448.c:ConstantCompare Unexecuted instantiation: des3.c:ConstantCompare Unexecuted instantiation: dh.c:ConstantCompare Line | Count | Source | 832 | 26 | { | 833 | 26 | int i; | 834 | 26 | int compareSum = 0; | 835 | | | 836 | 858 | for (i = 0; i < length; i++) { | 837 | 832 | compareSum |= a[i] ^ b[i]; | 838 | 832 | } | 839 | | | 840 | 26 | return compareSum; | 841 | 26 | } |
Unexecuted instantiation: eccsi.c:ConstantCompare ed25519.c:ConstantCompare Line | Count | Source | 832 | 1.39k | { | 833 | 1.39k | int i; | 834 | 1.39k | int compareSum = 0; | 835 | | | 836 | 46.0k | for (i = 0; i < length; i++) { | 837 | 44.6k | compareSum |= a[i] ^ b[i]; | 838 | 44.6k | } | 839 | | | 840 | 1.39k | return compareSum; | 841 | 1.39k | } |
Line | Count | Source | 832 | 1.42k | { | 833 | 1.42k | int i; | 834 | 1.42k | int compareSum = 0; | 835 | | | 836 | 82.4k | for (i = 0; i < length; i++) { | 837 | 81.0k | compareSum |= a[i] ^ b[i]; | 838 | 81.0k | } | 839 | | | 840 | 1.42k | return compareSum; | 841 | 1.42k | } |
Unexecuted instantiation: fe_448.c:ConstantCompare fe_operations.c:ConstantCompare Line | Count | Source | 832 | 5.23k | { | 833 | 5.23k | int i; | 834 | 5.23k | int compareSum = 0; | 835 | | | 836 | 172k | for (i = 0; i < length; i++) { | 837 | 167k | compareSum |= a[i] ^ b[i]; | 838 | 167k | } | 839 | | | 840 | 5.23k | return compareSum; | 841 | 5.23k | } |
Unexecuted instantiation: ge_448.c:ConstantCompare Unexecuted instantiation: ge_operations.c:ConstantCompare Unexecuted instantiation: hash.c:ConstantCompare Unexecuted instantiation: hmac.c:ConstantCompare Unexecuted instantiation: kdf.c:ConstantCompare Unexecuted instantiation: md2.c:ConstantCompare Unexecuted instantiation: md4.c:ConstantCompare Unexecuted instantiation: md5.c:ConstantCompare Unexecuted instantiation: memory.c:ConstantCompare Unexecuted instantiation: poly1305.c:ConstantCompare Unexecuted instantiation: pwdbased.c:ConstantCompare Line | Count | Source | 832 | 104k | { | 833 | 104k | int i; | 834 | 104k | int compareSum = 0; | 835 | | | 836 | 26.9M | for (i = 0; i < length; i++) { | 837 | 26.8M | compareSum |= a[i] ^ b[i]; | 838 | 26.8M | } | 839 | | | 840 | 104k | return compareSum; | 841 | 104k | } |
Unexecuted instantiation: ripemd.c:ConstantCompare Unexecuted instantiation: rsa.c:ConstantCompare Unexecuted instantiation: sha.c:ConstantCompare Unexecuted instantiation: sha256.c:ConstantCompare Unexecuted instantiation: sha3.c:ConstantCompare Unexecuted instantiation: sha512.c:ConstantCompare Unexecuted instantiation: siphash.c:ConstantCompare Unexecuted instantiation: sm2.c:ConstantCompare Unexecuted instantiation: sm3.c:ConstantCompare Unexecuted instantiation: sm4.c:ConstantCompare Unexecuted instantiation: sp_int.c:ConstantCompare Unexecuted instantiation: wc_encrypt.c:ConstantCompare Unexecuted instantiation: wolfmath.c:ConstantCompare Unexecuted instantiation: ssl.c:ConstantCompare Line | Count | Source | 832 | 24 | { | 833 | 24 | int i; | 834 | 24 | int compareSum = 0; | 835 | | | 836 | 312 | for (i = 0; i < length; i++) { | 837 | 288 | compareSum |= a[i] ^ b[i]; | 838 | 288 | } | 839 | | | 840 | 24 | return compareSum; | 841 | 24 | } |
Line | Count | Source | 832 | 3 | { | 833 | 3 | int i; | 834 | 3 | int compareSum = 0; | 835 | | | 836 | 115 | for (i = 0; i < length; i++) { | 837 | 112 | compareSum |= a[i] ^ b[i]; | 838 | 112 | } | 839 | | | 840 | 3 | return compareSum; | 841 | 3 | } |
Unexecuted instantiation: wc_mlkem.c:ConstantCompare Unexecuted instantiation: wc_mlkem_poly.c:ConstantCompare internal.c:ConstantCompare Line | Count | Source | 832 | 20 | { | 833 | 20 | int i; | 834 | 20 | int compareSum = 0; | 835 | | | 836 | 358 | for (i = 0; i < length; i++) { | 837 | 338 | compareSum |= a[i] ^ b[i]; | 838 | 338 | } | 839 | | | 840 | 20 | return compareSum; | 841 | 20 | } |
Unexecuted instantiation: keys.c:ConstantCompare |
842 | | #endif |
843 | | |
844 | | |
845 | | #if defined(WOLFSSL_NO_CT_OPS) && (!defined(NO_RSA) || !defined(WOLFCRYPT_ONLY)) \ |
846 | | && (!defined(WOLFSSL_RSA_VERIFY_ONLY)) |
847 | | /* constant time operations with mask are required for RSA and TLS operations */ |
848 | | #warning constant time operations required unless using NO_RSA & WOLFCRYPT_ONLY |
849 | | #endif |
850 | | |
851 | | #if !defined(WOLFSSL_NO_CT_OPS) || !defined(NO_RSA) || !defined(WOLFCRYPT_ONLY) |
852 | | /* Constant time - mask set when a > b. */ |
853 | | WC_MISC_STATIC WC_INLINE byte ctMaskGT(int a, int b) |
854 | 43.1k | { |
855 | 43.1k | return (byte)((((word32)a - (word32)b - 1) >> 31) - 1); |
856 | 43.1k | } Unexecuted instantiation: aes.c:ctMaskGT Unexecuted instantiation: arc4.c:ctMaskGT Unexecuted instantiation: asn.c:ctMaskGT Unexecuted instantiation: blake2b.c:ctMaskGT Unexecuted instantiation: blake2s.c:ctMaskGT Unexecuted instantiation: camellia.c:ctMaskGT Unexecuted instantiation: chacha.c:ctMaskGT Unexecuted instantiation: chacha20_poly1305.c:ctMaskGT Unexecuted instantiation: cmac.c:ctMaskGT Unexecuted instantiation: coding.c:ctMaskGT Unexecuted instantiation: curve25519.c:ctMaskGT Unexecuted instantiation: curve448.c:ctMaskGT Unexecuted instantiation: des3.c:ctMaskGT Unexecuted instantiation: dh.c:ctMaskGT Unexecuted instantiation: ecc.c:ctMaskGT Unexecuted instantiation: eccsi.c:ctMaskGT Unexecuted instantiation: ed25519.c:ctMaskGT Unexecuted instantiation: ed448.c:ctMaskGT Unexecuted instantiation: fe_448.c:ctMaskGT Unexecuted instantiation: fe_operations.c:ctMaskGT Unexecuted instantiation: ge_448.c:ctMaskGT Unexecuted instantiation: ge_operations.c:ctMaskGT Unexecuted instantiation: hash.c:ctMaskGT Unexecuted instantiation: hmac.c:ctMaskGT Unexecuted instantiation: kdf.c:ctMaskGT Unexecuted instantiation: md2.c:ctMaskGT Unexecuted instantiation: md4.c:ctMaskGT Unexecuted instantiation: md5.c:ctMaskGT Unexecuted instantiation: memory.c:ctMaskGT Unexecuted instantiation: poly1305.c:ctMaskGT Unexecuted instantiation: pwdbased.c:ctMaskGT Unexecuted instantiation: random.c:ctMaskGT Unexecuted instantiation: ripemd.c:ctMaskGT Line | Count | Source | 854 | 7.24k | { | 855 | 7.24k | return (byte)((((word32)a - (word32)b - 1) >> 31) - 1); | 856 | 7.24k | } |
Unexecuted instantiation: sha.c:ctMaskGT Unexecuted instantiation: sha256.c:ctMaskGT Unexecuted instantiation: sha3.c:ctMaskGT Unexecuted instantiation: sha512.c:ctMaskGT Unexecuted instantiation: siphash.c:ctMaskGT Unexecuted instantiation: sm2.c:ctMaskGT Unexecuted instantiation: sm3.c:ctMaskGT Unexecuted instantiation: sm4.c:ctMaskGT Line | Count | Source | 854 | 780 | { | 855 | 780 | return (byte)((((word32)a - (word32)b - 1) >> 31) - 1); | 856 | 780 | } |
Unexecuted instantiation: wc_encrypt.c:ctMaskGT Unexecuted instantiation: wolfmath.c:ctMaskGT Line | Count | Source | 854 | 35.0k | { | 855 | 35.0k | return (byte)((((word32)a - (word32)b - 1) >> 31) - 1); | 856 | 35.0k | } |
Unexecuted instantiation: tls13.c:ctMaskGT Unexecuted instantiation: wc_mlkem.c:ctMaskGT Unexecuted instantiation: wc_mlkem_poly.c:ctMaskGT Line | Count | Source | 854 | 56 | { | 855 | 56 | return (byte)((((word32)a - (word32)b - 1) >> 31) - 1); | 856 | 56 | } |
Unexecuted instantiation: keys.c:ctMaskGT |
857 | | |
858 | | /* Constant time - mask set when a >= b. */ |
859 | | WC_MISC_STATIC WC_INLINE byte ctMaskGTE(int a, int b) |
860 | 10.4k | { |
861 | 10.4k | return (byte)((((word32)a - (word32)b) >> 31) - 1); |
862 | 10.4k | } Unexecuted instantiation: aes.c:ctMaskGTE Unexecuted instantiation: arc4.c:ctMaskGTE Unexecuted instantiation: asn.c:ctMaskGTE Unexecuted instantiation: blake2b.c:ctMaskGTE Unexecuted instantiation: blake2s.c:ctMaskGTE Unexecuted instantiation: camellia.c:ctMaskGTE Unexecuted instantiation: chacha.c:ctMaskGTE Unexecuted instantiation: chacha20_poly1305.c:ctMaskGTE Unexecuted instantiation: cmac.c:ctMaskGTE Unexecuted instantiation: coding.c:ctMaskGTE Unexecuted instantiation: curve25519.c:ctMaskGTE Unexecuted instantiation: curve448.c:ctMaskGTE Unexecuted instantiation: des3.c:ctMaskGTE Unexecuted instantiation: dh.c:ctMaskGTE Unexecuted instantiation: ecc.c:ctMaskGTE Unexecuted instantiation: eccsi.c:ctMaskGTE Unexecuted instantiation: ed25519.c:ctMaskGTE Unexecuted instantiation: ed448.c:ctMaskGTE Unexecuted instantiation: fe_448.c:ctMaskGTE Unexecuted instantiation: fe_operations.c:ctMaskGTE Unexecuted instantiation: ge_448.c:ctMaskGTE Unexecuted instantiation: ge_operations.c:ctMaskGTE Unexecuted instantiation: hash.c:ctMaskGTE Unexecuted instantiation: hmac.c:ctMaskGTE Unexecuted instantiation: kdf.c:ctMaskGTE Unexecuted instantiation: md2.c:ctMaskGTE Unexecuted instantiation: md4.c:ctMaskGTE Unexecuted instantiation: md5.c:ctMaskGTE Unexecuted instantiation: memory.c:ctMaskGTE Unexecuted instantiation: poly1305.c:ctMaskGTE Unexecuted instantiation: pwdbased.c:ctMaskGTE Unexecuted instantiation: random.c:ctMaskGTE Unexecuted instantiation: ripemd.c:ctMaskGTE Unexecuted instantiation: rsa.c:ctMaskGTE Unexecuted instantiation: sha.c:ctMaskGTE Unexecuted instantiation: sha256.c:ctMaskGTE Unexecuted instantiation: sha3.c:ctMaskGTE Unexecuted instantiation: sha512.c:ctMaskGTE Unexecuted instantiation: siphash.c:ctMaskGTE Unexecuted instantiation: sm2.c:ctMaskGTE Unexecuted instantiation: sm3.c:ctMaskGTE Unexecuted instantiation: sm4.c:ctMaskGTE Unexecuted instantiation: sp_int.c:ctMaskGTE Unexecuted instantiation: wc_encrypt.c:ctMaskGTE Unexecuted instantiation: wolfmath.c:ctMaskGTE Unexecuted instantiation: ssl.c:ctMaskGTE Unexecuted instantiation: tls.c:ctMaskGTE Unexecuted instantiation: tls13.c:ctMaskGTE Unexecuted instantiation: wc_mlkem.c:ctMaskGTE Unexecuted instantiation: wc_mlkem_poly.c:ctMaskGTE Line | Count | Source | 860 | 10.4k | { | 861 | 10.4k | return (byte)((((word32)a - (word32)b) >> 31) - 1); | 862 | 10.4k | } |
Unexecuted instantiation: keys.c:ctMaskGTE |
863 | | |
864 | | /* Constant time - mask set when a >= b. */ |
865 | | WC_MISC_STATIC WC_INLINE int ctMaskIntGTE(int a, int b) |
866 | 515k | { |
867 | 515k | return (int)((((word32)a - (word32)b) >> 31) - 1); |
868 | 515k | } Unexecuted instantiation: aes.c:ctMaskIntGTE Unexecuted instantiation: arc4.c:ctMaskIntGTE Unexecuted instantiation: asn.c:ctMaskIntGTE Unexecuted instantiation: blake2b.c:ctMaskIntGTE Unexecuted instantiation: blake2s.c:ctMaskIntGTE Unexecuted instantiation: camellia.c:ctMaskIntGTE Unexecuted instantiation: chacha.c:ctMaskIntGTE Unexecuted instantiation: chacha20_poly1305.c:ctMaskIntGTE Unexecuted instantiation: cmac.c:ctMaskIntGTE Unexecuted instantiation: coding.c:ctMaskIntGTE Unexecuted instantiation: curve25519.c:ctMaskIntGTE Unexecuted instantiation: curve448.c:ctMaskIntGTE Unexecuted instantiation: des3.c:ctMaskIntGTE Unexecuted instantiation: dh.c:ctMaskIntGTE Unexecuted instantiation: ecc.c:ctMaskIntGTE Unexecuted instantiation: eccsi.c:ctMaskIntGTE Unexecuted instantiation: ed25519.c:ctMaskIntGTE Unexecuted instantiation: ed448.c:ctMaskIntGTE Unexecuted instantiation: fe_448.c:ctMaskIntGTE Unexecuted instantiation: fe_operations.c:ctMaskIntGTE Unexecuted instantiation: ge_448.c:ctMaskIntGTE Unexecuted instantiation: ge_operations.c:ctMaskIntGTE Unexecuted instantiation: hash.c:ctMaskIntGTE Unexecuted instantiation: hmac.c:ctMaskIntGTE Unexecuted instantiation: kdf.c:ctMaskIntGTE Unexecuted instantiation: md2.c:ctMaskIntGTE Unexecuted instantiation: md4.c:ctMaskIntGTE Unexecuted instantiation: md5.c:ctMaskIntGTE Unexecuted instantiation: memory.c:ctMaskIntGTE Unexecuted instantiation: poly1305.c:ctMaskIntGTE Unexecuted instantiation: pwdbased.c:ctMaskIntGTE Unexecuted instantiation: random.c:ctMaskIntGTE Unexecuted instantiation: ripemd.c:ctMaskIntGTE Unexecuted instantiation: rsa.c:ctMaskIntGTE Unexecuted instantiation: sha.c:ctMaskIntGTE Unexecuted instantiation: sha256.c:ctMaskIntGTE Unexecuted instantiation: sha3.c:ctMaskIntGTE Unexecuted instantiation: sha512.c:ctMaskIntGTE Unexecuted instantiation: siphash.c:ctMaskIntGTE Unexecuted instantiation: sm2.c:ctMaskIntGTE Unexecuted instantiation: sm3.c:ctMaskIntGTE Unexecuted instantiation: sm4.c:ctMaskIntGTE Line | Count | Source | 866 | 515k | { | 867 | 515k | return (int)((((word32)a - (word32)b) >> 31) - 1); | 868 | 515k | } |
Unexecuted instantiation: wc_encrypt.c:ctMaskIntGTE Unexecuted instantiation: wolfmath.c:ctMaskIntGTE Unexecuted instantiation: ssl.c:ctMaskIntGTE Unexecuted instantiation: tls.c:ctMaskIntGTE Unexecuted instantiation: tls13.c:ctMaskIntGTE Unexecuted instantiation: wc_mlkem.c:ctMaskIntGTE Unexecuted instantiation: wc_mlkem_poly.c:ctMaskIntGTE Line | Count | Source | 866 | 168 | { | 867 | 168 | return (int)((((word32)a - (word32)b) >> 31) - 1); | 868 | 168 | } |
Unexecuted instantiation: keys.c:ctMaskIntGTE |
869 | | |
870 | | #ifdef WORD64_AVAILABLE |
871 | | /* Constant time - mask set when a >= b. */ |
872 | | WC_MISC_STATIC WC_INLINE word32 ctMaskWord32GTE(word32 a, word32 b) |
873 | 3.96M | { |
874 | 3.96M | return (word32)((((word64)a - (word64)b) >> 63) - 1); |
875 | 3.96M | } Line | Count | Source | 873 | 7.75k | { | 874 | 7.75k | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 7.75k | } |
Unexecuted instantiation: arc4.c:ctMaskWord32GTE Line | Count | Source | 873 | 49.7k | { | 874 | 49.7k | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 49.7k | } |
Unexecuted instantiation: blake2b.c:ctMaskWord32GTE Unexecuted instantiation: blake2s.c:ctMaskWord32GTE Unexecuted instantiation: camellia.c:ctMaskWord32GTE Unexecuted instantiation: chacha.c:ctMaskWord32GTE Unexecuted instantiation: chacha20_poly1305.c:ctMaskWord32GTE Unexecuted instantiation: cmac.c:ctMaskWord32GTE Unexecuted instantiation: coding.c:ctMaskWord32GTE Unexecuted instantiation: curve25519.c:ctMaskWord32GTE Unexecuted instantiation: curve448.c:ctMaskWord32GTE Unexecuted instantiation: des3.c:ctMaskWord32GTE Line | Count | Source | 873 | 168 | { | 874 | 168 | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 168 | } |
Unexecuted instantiation: ecc.c:ctMaskWord32GTE Unexecuted instantiation: eccsi.c:ctMaskWord32GTE Unexecuted instantiation: ed25519.c:ctMaskWord32GTE Unexecuted instantiation: ed448.c:ctMaskWord32GTE Unexecuted instantiation: fe_448.c:ctMaskWord32GTE Unexecuted instantiation: fe_operations.c:ctMaskWord32GTE Unexecuted instantiation: ge_448.c:ctMaskWord32GTE Unexecuted instantiation: ge_operations.c:ctMaskWord32GTE Unexecuted instantiation: hash.c:ctMaskWord32GTE Line | Count | Source | 873 | 26.0k | { | 874 | 26.0k | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 26.0k | } |
Line | Count | Source | 873 | 1.18k | { | 874 | 1.18k | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 1.18k | } |
Unexecuted instantiation: md2.c:ctMaskWord32GTE Line | Count | Source | 873 | 23.3k | { | 874 | 23.3k | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 23.3k | } |
Line | Count | Source | 873 | 152k | { | 874 | 152k | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 152k | } |
Unexecuted instantiation: memory.c:ctMaskWord32GTE Unexecuted instantiation: poly1305.c:ctMaskWord32GTE pwdbased.c:ctMaskWord32GTE Line | Count | Source | 873 | 3.24k | { | 874 | 3.24k | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 3.24k | } |
Line | Count | Source | 873 | 104k | { | 874 | 104k | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 104k | } |
Unexecuted instantiation: ripemd.c:ctMaskWord32GTE Unexecuted instantiation: rsa.c:ctMaskWord32GTE Line | Count | Source | 873 | 265k | { | 874 | 265k | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 265k | } |
Line | Count | Source | 873 | 254k | { | 874 | 254k | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 254k | } |
Unexecuted instantiation: sha3.c:ctMaskWord32GTE Line | Count | Source | 873 | 3.00M | { | 874 | 3.00M | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 3.00M | } |
Unexecuted instantiation: siphash.c:ctMaskWord32GTE Unexecuted instantiation: sm2.c:ctMaskWord32GTE Unexecuted instantiation: sm3.c:ctMaskWord32GTE Unexecuted instantiation: sm4.c:ctMaskWord32GTE Unexecuted instantiation: sp_int.c:ctMaskWord32GTE Unexecuted instantiation: wc_encrypt.c:ctMaskWord32GTE Unexecuted instantiation: wolfmath.c:ctMaskWord32GTE Line | Count | Source | 873 | 422 | { | 874 | 422 | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 422 | } |
Unexecuted instantiation: tls.c:ctMaskWord32GTE Line | Count | Source | 873 | 14.2k | { | 874 | 14.2k | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 14.2k | } |
Unexecuted instantiation: wc_mlkem.c:ctMaskWord32GTE Unexecuted instantiation: wc_mlkem_poly.c:ctMaskWord32GTE internal.c:ctMaskWord32GTE Line | Count | Source | 873 | 62.8k | { | 874 | 62.8k | return (word32)((((word64)a - (word64)b) >> 63) - 1); | 875 | 62.8k | } |
Unexecuted instantiation: keys.c:ctMaskWord32GTE |
876 | | #endif |
877 | | |
878 | | /* Constant time - mask set when a < b. */ |
879 | | WC_MISC_STATIC WC_INLINE byte ctMaskLT(int a, int b) |
880 | 537k | { |
881 | 537k | return (byte)((((word32)b - (word32)a - 1) >> 31) - 1); |
882 | 537k | } Unexecuted instantiation: aes.c:ctMaskLT Unexecuted instantiation: arc4.c:ctMaskLT Unexecuted instantiation: asn.c:ctMaskLT Unexecuted instantiation: blake2b.c:ctMaskLT Unexecuted instantiation: blake2s.c:ctMaskLT Unexecuted instantiation: camellia.c:ctMaskLT Unexecuted instantiation: chacha.c:ctMaskLT Unexecuted instantiation: chacha20_poly1305.c:ctMaskLT Unexecuted instantiation: cmac.c:ctMaskLT Unexecuted instantiation: coding.c:ctMaskLT Unexecuted instantiation: curve25519.c:ctMaskLT Unexecuted instantiation: curve448.c:ctMaskLT Unexecuted instantiation: des3.c:ctMaskLT Unexecuted instantiation: dh.c:ctMaskLT Unexecuted instantiation: ecc.c:ctMaskLT Unexecuted instantiation: eccsi.c:ctMaskLT Unexecuted instantiation: ed25519.c:ctMaskLT Unexecuted instantiation: ed448.c:ctMaskLT Unexecuted instantiation: fe_448.c:ctMaskLT Unexecuted instantiation: fe_operations.c:ctMaskLT Unexecuted instantiation: ge_448.c:ctMaskLT Unexecuted instantiation: ge_operations.c:ctMaskLT Unexecuted instantiation: hash.c:ctMaskLT Unexecuted instantiation: hmac.c:ctMaskLT Unexecuted instantiation: kdf.c:ctMaskLT Unexecuted instantiation: md2.c:ctMaskLT Unexecuted instantiation: md4.c:ctMaskLT Unexecuted instantiation: md5.c:ctMaskLT Unexecuted instantiation: memory.c:ctMaskLT Unexecuted instantiation: poly1305.c:ctMaskLT Unexecuted instantiation: pwdbased.c:ctMaskLT Unexecuted instantiation: random.c:ctMaskLT Unexecuted instantiation: ripemd.c:ctMaskLT Line | Count | Source | 880 | 7.24k | { | 881 | 7.24k | return (byte)((((word32)b - (word32)a - 1) >> 31) - 1); | 882 | 7.24k | } |
Unexecuted instantiation: sha.c:ctMaskLT Unexecuted instantiation: sha256.c:ctMaskLT Unexecuted instantiation: sha3.c:ctMaskLT Unexecuted instantiation: sha512.c:ctMaskLT Unexecuted instantiation: siphash.c:ctMaskLT Unexecuted instantiation: sm2.c:ctMaskLT Unexecuted instantiation: sm3.c:ctMaskLT Unexecuted instantiation: sm4.c:ctMaskLT Line | Count | Source | 880 | 502k | { | 881 | 502k | return (byte)((((word32)b - (word32)a - 1) >> 31) - 1); | 882 | 502k | } |
Unexecuted instantiation: wc_encrypt.c:ctMaskLT Unexecuted instantiation: wolfmath.c:ctMaskLT Line | Count | Source | 880 | 17.7k | { | 881 | 17.7k | return (byte)((((word32)b - (word32)a - 1) >> 31) - 1); | 882 | 17.7k | } |
Unexecuted instantiation: tls13.c:ctMaskLT Unexecuted instantiation: wc_mlkem.c:ctMaskLT Unexecuted instantiation: wc_mlkem_poly.c:ctMaskLT Line | Count | Source | 880 | 10.4k | { | 881 | 10.4k | return (byte)((((word32)b - (word32)a - 1) >> 31) - 1); | 882 | 10.4k | } |
Unexecuted instantiation: keys.c:ctMaskLT |
883 | | |
884 | | /* Constant time - mask set when a <= b. */ |
885 | | WC_MISC_STATIC WC_INLINE byte ctMaskLTE(int a, int b) |
886 | 16.8k | { |
887 | 16.8k | return (byte)((((word32)b - (word32)a) >> 31) - 1); |
888 | 16.8k | } Unexecuted instantiation: aes.c:ctMaskLTE Unexecuted instantiation: arc4.c:ctMaskLTE Unexecuted instantiation: asn.c:ctMaskLTE Unexecuted instantiation: blake2b.c:ctMaskLTE Unexecuted instantiation: blake2s.c:ctMaskLTE Unexecuted instantiation: camellia.c:ctMaskLTE Unexecuted instantiation: chacha.c:ctMaskLTE Unexecuted instantiation: chacha20_poly1305.c:ctMaskLTE Unexecuted instantiation: cmac.c:ctMaskLTE Unexecuted instantiation: coding.c:ctMaskLTE Unexecuted instantiation: curve25519.c:ctMaskLTE Unexecuted instantiation: curve448.c:ctMaskLTE Unexecuted instantiation: des3.c:ctMaskLTE Unexecuted instantiation: dh.c:ctMaskLTE Unexecuted instantiation: ecc.c:ctMaskLTE Unexecuted instantiation: eccsi.c:ctMaskLTE Unexecuted instantiation: ed25519.c:ctMaskLTE Unexecuted instantiation: ed448.c:ctMaskLTE Unexecuted instantiation: fe_448.c:ctMaskLTE Unexecuted instantiation: fe_operations.c:ctMaskLTE Unexecuted instantiation: ge_448.c:ctMaskLTE Unexecuted instantiation: ge_operations.c:ctMaskLTE Unexecuted instantiation: hash.c:ctMaskLTE Unexecuted instantiation: hmac.c:ctMaskLTE Unexecuted instantiation: kdf.c:ctMaskLTE Unexecuted instantiation: md2.c:ctMaskLTE Unexecuted instantiation: md4.c:ctMaskLTE Unexecuted instantiation: md5.c:ctMaskLTE Unexecuted instantiation: memory.c:ctMaskLTE Unexecuted instantiation: poly1305.c:ctMaskLTE Unexecuted instantiation: pwdbased.c:ctMaskLTE Unexecuted instantiation: random.c:ctMaskLTE Unexecuted instantiation: ripemd.c:ctMaskLTE Line | Count | Source | 886 | 7.24k | { | 887 | 7.24k | return (byte)((((word32)b - (word32)a) >> 31) - 1); | 888 | 7.24k | } |
Unexecuted instantiation: sha.c:ctMaskLTE Unexecuted instantiation: sha256.c:ctMaskLTE Unexecuted instantiation: sha3.c:ctMaskLTE Unexecuted instantiation: sha512.c:ctMaskLTE Unexecuted instantiation: siphash.c:ctMaskLTE Unexecuted instantiation: sm2.c:ctMaskLTE Unexecuted instantiation: sm3.c:ctMaskLTE Unexecuted instantiation: sm4.c:ctMaskLTE Unexecuted instantiation: sp_int.c:ctMaskLTE Unexecuted instantiation: wc_encrypt.c:ctMaskLTE Unexecuted instantiation: wolfmath.c:ctMaskLTE Unexecuted instantiation: ssl.c:ctMaskLTE Unexecuted instantiation: tls.c:ctMaskLTE Unexecuted instantiation: tls13.c:ctMaskLTE Unexecuted instantiation: wc_mlkem.c:ctMaskLTE Unexecuted instantiation: wc_mlkem_poly.c:ctMaskLTE Line | Count | Source | 886 | 9.62k | { | 887 | 9.62k | return (byte)((((word32)b - (word32)a) >> 31) - 1); | 888 | 9.62k | } |
Unexecuted instantiation: keys.c:ctMaskLTE |
889 | | |
890 | | /* Constant time - mask set when a == b. */ |
891 | | WC_MISC_STATIC WC_INLINE byte ctMaskEq(int a, int b) |
892 | 18.5k | { |
893 | 18.5k | return (byte)((byte)(~ctMaskGT(a, b)) & (byte)(~ctMaskLT(a, b))); |
894 | 18.5k | } Unexecuted instantiation: aes.c:ctMaskEq Unexecuted instantiation: arc4.c:ctMaskEq Unexecuted instantiation: asn.c:ctMaskEq Unexecuted instantiation: blake2b.c:ctMaskEq Unexecuted instantiation: blake2s.c:ctMaskEq Unexecuted instantiation: camellia.c:ctMaskEq Unexecuted instantiation: chacha.c:ctMaskEq Unexecuted instantiation: chacha20_poly1305.c:ctMaskEq Unexecuted instantiation: cmac.c:ctMaskEq Unexecuted instantiation: coding.c:ctMaskEq Unexecuted instantiation: curve25519.c:ctMaskEq Unexecuted instantiation: curve448.c:ctMaskEq Unexecuted instantiation: des3.c:ctMaskEq Unexecuted instantiation: dh.c:ctMaskEq Unexecuted instantiation: ecc.c:ctMaskEq Unexecuted instantiation: eccsi.c:ctMaskEq Unexecuted instantiation: ed25519.c:ctMaskEq Unexecuted instantiation: ed448.c:ctMaskEq Unexecuted instantiation: fe_448.c:ctMaskEq Unexecuted instantiation: fe_operations.c:ctMaskEq Unexecuted instantiation: ge_448.c:ctMaskEq Unexecuted instantiation: ge_operations.c:ctMaskEq Unexecuted instantiation: hash.c:ctMaskEq Unexecuted instantiation: hmac.c:ctMaskEq Unexecuted instantiation: kdf.c:ctMaskEq Unexecuted instantiation: md2.c:ctMaskEq Unexecuted instantiation: md4.c:ctMaskEq Unexecuted instantiation: md5.c:ctMaskEq Unexecuted instantiation: memory.c:ctMaskEq Unexecuted instantiation: poly1305.c:ctMaskEq Unexecuted instantiation: pwdbased.c:ctMaskEq Unexecuted instantiation: random.c:ctMaskEq Unexecuted instantiation: ripemd.c:ctMaskEq Unexecuted instantiation: rsa.c:ctMaskEq Unexecuted instantiation: sha.c:ctMaskEq Unexecuted instantiation: sha256.c:ctMaskEq Unexecuted instantiation: sha3.c:ctMaskEq Unexecuted instantiation: sha512.c:ctMaskEq Unexecuted instantiation: siphash.c:ctMaskEq Unexecuted instantiation: sm2.c:ctMaskEq Unexecuted instantiation: sm3.c:ctMaskEq Unexecuted instantiation: sm4.c:ctMaskEq Line | Count | Source | 892 | 780 | { | 893 | 780 | return (byte)((byte)(~ctMaskGT(a, b)) & (byte)(~ctMaskLT(a, b))); | 894 | 780 | } |
Unexecuted instantiation: wc_encrypt.c:ctMaskEq Unexecuted instantiation: wolfmath.c:ctMaskEq Line | Count | Source | 892 | 17.7k | { | 893 | 17.7k | return (byte)((byte)(~ctMaskGT(a, b)) & (byte)(~ctMaskLT(a, b))); | 894 | 17.7k | } |
Unexecuted instantiation: tls13.c:ctMaskEq Unexecuted instantiation: wc_mlkem.c:ctMaskEq Unexecuted instantiation: wc_mlkem_poly.c:ctMaskEq Unexecuted instantiation: internal.c:ctMaskEq Unexecuted instantiation: keys.c:ctMaskEq |
895 | | |
896 | | /* Constant time - sets 16 bit integer mask when a > b */ |
897 | | WC_MISC_STATIC WC_INLINE word16 ctMask16GT(int a, int b) |
898 | 0 | { |
899 | 0 | return (word16)((((word32)a - (word32)b - 1) >> 31) - 1); |
900 | 0 | } Unexecuted instantiation: aes.c:ctMask16GT Unexecuted instantiation: arc4.c:ctMask16GT Unexecuted instantiation: asn.c:ctMask16GT Unexecuted instantiation: blake2b.c:ctMask16GT Unexecuted instantiation: blake2s.c:ctMask16GT Unexecuted instantiation: camellia.c:ctMask16GT Unexecuted instantiation: chacha.c:ctMask16GT Unexecuted instantiation: chacha20_poly1305.c:ctMask16GT Unexecuted instantiation: cmac.c:ctMask16GT Unexecuted instantiation: coding.c:ctMask16GT Unexecuted instantiation: curve25519.c:ctMask16GT Unexecuted instantiation: curve448.c:ctMask16GT Unexecuted instantiation: des3.c:ctMask16GT Unexecuted instantiation: dh.c:ctMask16GT Unexecuted instantiation: ecc.c:ctMask16GT Unexecuted instantiation: eccsi.c:ctMask16GT Unexecuted instantiation: ed25519.c:ctMask16GT Unexecuted instantiation: ed448.c:ctMask16GT Unexecuted instantiation: fe_448.c:ctMask16GT Unexecuted instantiation: fe_operations.c:ctMask16GT Unexecuted instantiation: ge_448.c:ctMask16GT Unexecuted instantiation: ge_operations.c:ctMask16GT Unexecuted instantiation: hash.c:ctMask16GT Unexecuted instantiation: hmac.c:ctMask16GT Unexecuted instantiation: kdf.c:ctMask16GT Unexecuted instantiation: md2.c:ctMask16GT Unexecuted instantiation: md4.c:ctMask16GT Unexecuted instantiation: md5.c:ctMask16GT Unexecuted instantiation: memory.c:ctMask16GT Unexecuted instantiation: poly1305.c:ctMask16GT Unexecuted instantiation: pwdbased.c:ctMask16GT Unexecuted instantiation: random.c:ctMask16GT Unexecuted instantiation: ripemd.c:ctMask16GT Unexecuted instantiation: rsa.c:ctMask16GT Unexecuted instantiation: sha.c:ctMask16GT Unexecuted instantiation: sha256.c:ctMask16GT Unexecuted instantiation: sha3.c:ctMask16GT Unexecuted instantiation: sha512.c:ctMask16GT Unexecuted instantiation: siphash.c:ctMask16GT Unexecuted instantiation: sm2.c:ctMask16GT Unexecuted instantiation: sm3.c:ctMask16GT Unexecuted instantiation: sm4.c:ctMask16GT Unexecuted instantiation: sp_int.c:ctMask16GT Unexecuted instantiation: wc_encrypt.c:ctMask16GT Unexecuted instantiation: wolfmath.c:ctMask16GT Unexecuted instantiation: ssl.c:ctMask16GT Unexecuted instantiation: tls.c:ctMask16GT Unexecuted instantiation: tls13.c:ctMask16GT Unexecuted instantiation: wc_mlkem.c:ctMask16GT Unexecuted instantiation: wc_mlkem_poly.c:ctMask16GT Unexecuted instantiation: internal.c:ctMask16GT Unexecuted instantiation: keys.c:ctMask16GT |
901 | | |
902 | | /* Constant time - sets 16 bit integer mask when a >= b */ |
903 | | WC_MISC_STATIC WC_INLINE word16 ctMask16GTE(int a, int b) |
904 | 0 | { |
905 | 0 | return (word16)((((word32)a - (word32)b) >> 31) - 1); |
906 | 0 | } Unexecuted instantiation: aes.c:ctMask16GTE Unexecuted instantiation: arc4.c:ctMask16GTE Unexecuted instantiation: asn.c:ctMask16GTE Unexecuted instantiation: blake2b.c:ctMask16GTE Unexecuted instantiation: blake2s.c:ctMask16GTE Unexecuted instantiation: camellia.c:ctMask16GTE Unexecuted instantiation: chacha.c:ctMask16GTE Unexecuted instantiation: chacha20_poly1305.c:ctMask16GTE Unexecuted instantiation: cmac.c:ctMask16GTE Unexecuted instantiation: coding.c:ctMask16GTE Unexecuted instantiation: curve25519.c:ctMask16GTE Unexecuted instantiation: curve448.c:ctMask16GTE Unexecuted instantiation: des3.c:ctMask16GTE Unexecuted instantiation: dh.c:ctMask16GTE Unexecuted instantiation: ecc.c:ctMask16GTE Unexecuted instantiation: eccsi.c:ctMask16GTE Unexecuted instantiation: ed25519.c:ctMask16GTE Unexecuted instantiation: ed448.c:ctMask16GTE Unexecuted instantiation: fe_448.c:ctMask16GTE Unexecuted instantiation: fe_operations.c:ctMask16GTE Unexecuted instantiation: ge_448.c:ctMask16GTE Unexecuted instantiation: ge_operations.c:ctMask16GTE Unexecuted instantiation: hash.c:ctMask16GTE Unexecuted instantiation: hmac.c:ctMask16GTE Unexecuted instantiation: kdf.c:ctMask16GTE Unexecuted instantiation: md2.c:ctMask16GTE Unexecuted instantiation: md4.c:ctMask16GTE Unexecuted instantiation: md5.c:ctMask16GTE Unexecuted instantiation: memory.c:ctMask16GTE Unexecuted instantiation: poly1305.c:ctMask16GTE Unexecuted instantiation: pwdbased.c:ctMask16GTE Unexecuted instantiation: random.c:ctMask16GTE Unexecuted instantiation: ripemd.c:ctMask16GTE Unexecuted instantiation: rsa.c:ctMask16GTE Unexecuted instantiation: sha.c:ctMask16GTE Unexecuted instantiation: sha256.c:ctMask16GTE Unexecuted instantiation: sha3.c:ctMask16GTE Unexecuted instantiation: sha512.c:ctMask16GTE Unexecuted instantiation: siphash.c:ctMask16GTE Unexecuted instantiation: sm2.c:ctMask16GTE Unexecuted instantiation: sm3.c:ctMask16GTE Unexecuted instantiation: sm4.c:ctMask16GTE Unexecuted instantiation: sp_int.c:ctMask16GTE Unexecuted instantiation: wc_encrypt.c:ctMask16GTE Unexecuted instantiation: wolfmath.c:ctMask16GTE Unexecuted instantiation: ssl.c:ctMask16GTE Unexecuted instantiation: tls.c:ctMask16GTE Unexecuted instantiation: tls13.c:ctMask16GTE Unexecuted instantiation: wc_mlkem.c:ctMask16GTE Unexecuted instantiation: wc_mlkem_poly.c:ctMask16GTE Unexecuted instantiation: internal.c:ctMask16GTE Unexecuted instantiation: keys.c:ctMask16GTE |
907 | | |
908 | | /* Constant time - sets 16 bit integer mask when a < b. */ |
909 | | WC_MISC_STATIC WC_INLINE word16 ctMask16LT(int a, int b) |
910 | 0 | { |
911 | 0 | return (word16)((((word32)b - (word32)a - 1) >> 31) - 1); |
912 | 0 | } Unexecuted instantiation: aes.c:ctMask16LT Unexecuted instantiation: arc4.c:ctMask16LT Unexecuted instantiation: asn.c:ctMask16LT Unexecuted instantiation: blake2b.c:ctMask16LT Unexecuted instantiation: blake2s.c:ctMask16LT Unexecuted instantiation: camellia.c:ctMask16LT Unexecuted instantiation: chacha.c:ctMask16LT Unexecuted instantiation: chacha20_poly1305.c:ctMask16LT Unexecuted instantiation: cmac.c:ctMask16LT Unexecuted instantiation: coding.c:ctMask16LT Unexecuted instantiation: curve25519.c:ctMask16LT Unexecuted instantiation: curve448.c:ctMask16LT Unexecuted instantiation: des3.c:ctMask16LT Unexecuted instantiation: dh.c:ctMask16LT Unexecuted instantiation: ecc.c:ctMask16LT Unexecuted instantiation: eccsi.c:ctMask16LT Unexecuted instantiation: ed25519.c:ctMask16LT Unexecuted instantiation: ed448.c:ctMask16LT Unexecuted instantiation: fe_448.c:ctMask16LT Unexecuted instantiation: fe_operations.c:ctMask16LT Unexecuted instantiation: ge_448.c:ctMask16LT Unexecuted instantiation: ge_operations.c:ctMask16LT Unexecuted instantiation: hash.c:ctMask16LT Unexecuted instantiation: hmac.c:ctMask16LT Unexecuted instantiation: kdf.c:ctMask16LT Unexecuted instantiation: md2.c:ctMask16LT Unexecuted instantiation: md4.c:ctMask16LT Unexecuted instantiation: md5.c:ctMask16LT Unexecuted instantiation: memory.c:ctMask16LT Unexecuted instantiation: poly1305.c:ctMask16LT Unexecuted instantiation: pwdbased.c:ctMask16LT Unexecuted instantiation: random.c:ctMask16LT Unexecuted instantiation: ripemd.c:ctMask16LT Unexecuted instantiation: rsa.c:ctMask16LT Unexecuted instantiation: sha.c:ctMask16LT Unexecuted instantiation: sha256.c:ctMask16LT Unexecuted instantiation: sha3.c:ctMask16LT Unexecuted instantiation: sha512.c:ctMask16LT Unexecuted instantiation: siphash.c:ctMask16LT Unexecuted instantiation: sm2.c:ctMask16LT Unexecuted instantiation: sm3.c:ctMask16LT Unexecuted instantiation: sm4.c:ctMask16LT Unexecuted instantiation: sp_int.c:ctMask16LT Unexecuted instantiation: wc_encrypt.c:ctMask16LT Unexecuted instantiation: wolfmath.c:ctMask16LT Unexecuted instantiation: ssl.c:ctMask16LT Unexecuted instantiation: tls.c:ctMask16LT Unexecuted instantiation: tls13.c:ctMask16LT Unexecuted instantiation: wc_mlkem.c:ctMask16LT Unexecuted instantiation: wc_mlkem_poly.c:ctMask16LT Unexecuted instantiation: internal.c:ctMask16LT Unexecuted instantiation: keys.c:ctMask16LT |
913 | | |
914 | | /* Constant time - sets 16 bit integer mask when a <= b. */ |
915 | | WC_MISC_STATIC WC_INLINE word16 ctMask16LTE(int a, int b) |
916 | 0 | { |
917 | 0 | return (word16)((((word32)b - (word32)a) >> 31) - 1); |
918 | 0 | } Unexecuted instantiation: aes.c:ctMask16LTE Unexecuted instantiation: arc4.c:ctMask16LTE Unexecuted instantiation: asn.c:ctMask16LTE Unexecuted instantiation: blake2b.c:ctMask16LTE Unexecuted instantiation: blake2s.c:ctMask16LTE Unexecuted instantiation: camellia.c:ctMask16LTE Unexecuted instantiation: chacha.c:ctMask16LTE Unexecuted instantiation: chacha20_poly1305.c:ctMask16LTE Unexecuted instantiation: cmac.c:ctMask16LTE Unexecuted instantiation: coding.c:ctMask16LTE Unexecuted instantiation: curve25519.c:ctMask16LTE Unexecuted instantiation: curve448.c:ctMask16LTE Unexecuted instantiation: des3.c:ctMask16LTE Unexecuted instantiation: dh.c:ctMask16LTE Unexecuted instantiation: ecc.c:ctMask16LTE Unexecuted instantiation: eccsi.c:ctMask16LTE Unexecuted instantiation: ed25519.c:ctMask16LTE Unexecuted instantiation: ed448.c:ctMask16LTE Unexecuted instantiation: fe_448.c:ctMask16LTE Unexecuted instantiation: fe_operations.c:ctMask16LTE Unexecuted instantiation: ge_448.c:ctMask16LTE Unexecuted instantiation: ge_operations.c:ctMask16LTE Unexecuted instantiation: hash.c:ctMask16LTE Unexecuted instantiation: hmac.c:ctMask16LTE Unexecuted instantiation: kdf.c:ctMask16LTE Unexecuted instantiation: md2.c:ctMask16LTE Unexecuted instantiation: md4.c:ctMask16LTE Unexecuted instantiation: md5.c:ctMask16LTE Unexecuted instantiation: memory.c:ctMask16LTE Unexecuted instantiation: poly1305.c:ctMask16LTE Unexecuted instantiation: pwdbased.c:ctMask16LTE Unexecuted instantiation: random.c:ctMask16LTE Unexecuted instantiation: ripemd.c:ctMask16LTE Unexecuted instantiation: rsa.c:ctMask16LTE Unexecuted instantiation: sha.c:ctMask16LTE Unexecuted instantiation: sha256.c:ctMask16LTE Unexecuted instantiation: sha3.c:ctMask16LTE Unexecuted instantiation: sha512.c:ctMask16LTE Unexecuted instantiation: siphash.c:ctMask16LTE Unexecuted instantiation: sm2.c:ctMask16LTE Unexecuted instantiation: sm3.c:ctMask16LTE Unexecuted instantiation: sm4.c:ctMask16LTE Unexecuted instantiation: sp_int.c:ctMask16LTE Unexecuted instantiation: wc_encrypt.c:ctMask16LTE Unexecuted instantiation: wolfmath.c:ctMask16LTE Unexecuted instantiation: ssl.c:ctMask16LTE Unexecuted instantiation: tls.c:ctMask16LTE Unexecuted instantiation: tls13.c:ctMask16LTE Unexecuted instantiation: wc_mlkem.c:ctMask16LTE Unexecuted instantiation: wc_mlkem_poly.c:ctMask16LTE Unexecuted instantiation: internal.c:ctMask16LTE Unexecuted instantiation: keys.c:ctMask16LTE |
919 | | |
920 | | /* Constant time - sets 16 bit integer mask when a == b. */ |
921 | | WC_MISC_STATIC WC_INLINE word16 ctMask16Eq(int a, int b) |
922 | 0 | { |
923 | 0 | return (word16)((word16)(~ctMask16GT(a, b)) & (word16)(~ctMask16LT(a, b))); |
924 | 0 | } Unexecuted instantiation: aes.c:ctMask16Eq Unexecuted instantiation: arc4.c:ctMask16Eq Unexecuted instantiation: asn.c:ctMask16Eq Unexecuted instantiation: blake2b.c:ctMask16Eq Unexecuted instantiation: blake2s.c:ctMask16Eq Unexecuted instantiation: camellia.c:ctMask16Eq Unexecuted instantiation: chacha.c:ctMask16Eq Unexecuted instantiation: chacha20_poly1305.c:ctMask16Eq Unexecuted instantiation: cmac.c:ctMask16Eq Unexecuted instantiation: coding.c:ctMask16Eq Unexecuted instantiation: curve25519.c:ctMask16Eq Unexecuted instantiation: curve448.c:ctMask16Eq Unexecuted instantiation: des3.c:ctMask16Eq Unexecuted instantiation: dh.c:ctMask16Eq Unexecuted instantiation: ecc.c:ctMask16Eq Unexecuted instantiation: eccsi.c:ctMask16Eq Unexecuted instantiation: ed25519.c:ctMask16Eq Unexecuted instantiation: ed448.c:ctMask16Eq Unexecuted instantiation: fe_448.c:ctMask16Eq Unexecuted instantiation: fe_operations.c:ctMask16Eq Unexecuted instantiation: ge_448.c:ctMask16Eq Unexecuted instantiation: ge_operations.c:ctMask16Eq Unexecuted instantiation: hash.c:ctMask16Eq Unexecuted instantiation: hmac.c:ctMask16Eq Unexecuted instantiation: kdf.c:ctMask16Eq Unexecuted instantiation: md2.c:ctMask16Eq Unexecuted instantiation: md4.c:ctMask16Eq Unexecuted instantiation: md5.c:ctMask16Eq Unexecuted instantiation: memory.c:ctMask16Eq Unexecuted instantiation: poly1305.c:ctMask16Eq Unexecuted instantiation: pwdbased.c:ctMask16Eq Unexecuted instantiation: random.c:ctMask16Eq Unexecuted instantiation: ripemd.c:ctMask16Eq Unexecuted instantiation: rsa.c:ctMask16Eq Unexecuted instantiation: sha.c:ctMask16Eq Unexecuted instantiation: sha256.c:ctMask16Eq Unexecuted instantiation: sha3.c:ctMask16Eq Unexecuted instantiation: sha512.c:ctMask16Eq Unexecuted instantiation: siphash.c:ctMask16Eq Unexecuted instantiation: sm2.c:ctMask16Eq Unexecuted instantiation: sm3.c:ctMask16Eq Unexecuted instantiation: sm4.c:ctMask16Eq Unexecuted instantiation: sp_int.c:ctMask16Eq Unexecuted instantiation: wc_encrypt.c:ctMask16Eq Unexecuted instantiation: wolfmath.c:ctMask16Eq Unexecuted instantiation: ssl.c:ctMask16Eq Unexecuted instantiation: tls.c:ctMask16Eq Unexecuted instantiation: tls13.c:ctMask16Eq Unexecuted instantiation: wc_mlkem.c:ctMask16Eq Unexecuted instantiation: wc_mlkem_poly.c:ctMask16Eq Unexecuted instantiation: internal.c:ctMask16Eq Unexecuted instantiation: keys.c:ctMask16Eq |
925 | | |
926 | | /* Constant time - mask set when a != b. */ |
927 | | WC_MISC_STATIC WC_INLINE byte ctMaskNotEq(int a, int b) |
928 | 7.24k | { |
929 | 7.24k | return (byte)((byte)ctMaskGT(a, b) | (byte)ctMaskLT(a, b)); |
930 | 7.24k | } Unexecuted instantiation: aes.c:ctMaskNotEq Unexecuted instantiation: arc4.c:ctMaskNotEq Unexecuted instantiation: asn.c:ctMaskNotEq Unexecuted instantiation: blake2b.c:ctMaskNotEq Unexecuted instantiation: blake2s.c:ctMaskNotEq Unexecuted instantiation: camellia.c:ctMaskNotEq Unexecuted instantiation: chacha.c:ctMaskNotEq Unexecuted instantiation: chacha20_poly1305.c:ctMaskNotEq Unexecuted instantiation: cmac.c:ctMaskNotEq Unexecuted instantiation: coding.c:ctMaskNotEq Unexecuted instantiation: curve25519.c:ctMaskNotEq Unexecuted instantiation: curve448.c:ctMaskNotEq Unexecuted instantiation: des3.c:ctMaskNotEq Unexecuted instantiation: dh.c:ctMaskNotEq Unexecuted instantiation: ecc.c:ctMaskNotEq Unexecuted instantiation: eccsi.c:ctMaskNotEq Unexecuted instantiation: ed25519.c:ctMaskNotEq Unexecuted instantiation: ed448.c:ctMaskNotEq Unexecuted instantiation: fe_448.c:ctMaskNotEq Unexecuted instantiation: fe_operations.c:ctMaskNotEq Unexecuted instantiation: ge_448.c:ctMaskNotEq Unexecuted instantiation: ge_operations.c:ctMaskNotEq Unexecuted instantiation: hash.c:ctMaskNotEq Unexecuted instantiation: hmac.c:ctMaskNotEq Unexecuted instantiation: kdf.c:ctMaskNotEq Unexecuted instantiation: md2.c:ctMaskNotEq Unexecuted instantiation: md4.c:ctMaskNotEq Unexecuted instantiation: md5.c:ctMaskNotEq Unexecuted instantiation: memory.c:ctMaskNotEq Unexecuted instantiation: poly1305.c:ctMaskNotEq Unexecuted instantiation: pwdbased.c:ctMaskNotEq Unexecuted instantiation: random.c:ctMaskNotEq Unexecuted instantiation: ripemd.c:ctMaskNotEq Line | Count | Source | 928 | 7.24k | { | 929 | 7.24k | return (byte)((byte)ctMaskGT(a, b) | (byte)ctMaskLT(a, b)); | 930 | 7.24k | } |
Unexecuted instantiation: sha.c:ctMaskNotEq Unexecuted instantiation: sha256.c:ctMaskNotEq Unexecuted instantiation: sha3.c:ctMaskNotEq Unexecuted instantiation: sha512.c:ctMaskNotEq Unexecuted instantiation: siphash.c:ctMaskNotEq Unexecuted instantiation: sm2.c:ctMaskNotEq Unexecuted instantiation: sm3.c:ctMaskNotEq Unexecuted instantiation: sm4.c:ctMaskNotEq Unexecuted instantiation: sp_int.c:ctMaskNotEq Unexecuted instantiation: wc_encrypt.c:ctMaskNotEq Unexecuted instantiation: wolfmath.c:ctMaskNotEq Unexecuted instantiation: tls.c:ctMaskNotEq Unexecuted instantiation: tls13.c:ctMaskNotEq Unexecuted instantiation: wc_mlkem.c:ctMaskNotEq Unexecuted instantiation: wc_mlkem_poly.c:ctMaskNotEq Unexecuted instantiation: internal.c:ctMaskNotEq Unexecuted instantiation: keys.c:ctMaskNotEq |
931 | | |
932 | | /* Constant time - select a when mask is set and b otherwise. */ |
933 | | WC_MISC_STATIC WC_INLINE byte ctMaskSel(byte m, byte a, byte b) |
934 | 18.9k | { |
935 | 18.9k | return (byte)((b & ((byte)~(word32)m)) | (a & m)); |
936 | 18.9k | } Unexecuted instantiation: aes.c:ctMaskSel Unexecuted instantiation: arc4.c:ctMaskSel Unexecuted instantiation: asn.c:ctMaskSel Unexecuted instantiation: blake2b.c:ctMaskSel Unexecuted instantiation: blake2s.c:ctMaskSel Unexecuted instantiation: camellia.c:ctMaskSel Unexecuted instantiation: chacha.c:ctMaskSel Unexecuted instantiation: chacha20_poly1305.c:ctMaskSel Unexecuted instantiation: cmac.c:ctMaskSel Unexecuted instantiation: coding.c:ctMaskSel Unexecuted instantiation: curve25519.c:ctMaskSel Unexecuted instantiation: curve448.c:ctMaskSel Unexecuted instantiation: des3.c:ctMaskSel Unexecuted instantiation: dh.c:ctMaskSel Unexecuted instantiation: ecc.c:ctMaskSel Unexecuted instantiation: eccsi.c:ctMaskSel Unexecuted instantiation: ed25519.c:ctMaskSel Unexecuted instantiation: ed448.c:ctMaskSel Unexecuted instantiation: fe_448.c:ctMaskSel Unexecuted instantiation: fe_operations.c:ctMaskSel Unexecuted instantiation: ge_448.c:ctMaskSel Unexecuted instantiation: ge_operations.c:ctMaskSel Unexecuted instantiation: hash.c:ctMaskSel Unexecuted instantiation: hmac.c:ctMaskSel Unexecuted instantiation: kdf.c:ctMaskSel Unexecuted instantiation: md2.c:ctMaskSel Unexecuted instantiation: md4.c:ctMaskSel Unexecuted instantiation: md5.c:ctMaskSel Unexecuted instantiation: memory.c:ctMaskSel Unexecuted instantiation: poly1305.c:ctMaskSel Unexecuted instantiation: pwdbased.c:ctMaskSel Unexecuted instantiation: random.c:ctMaskSel Unexecuted instantiation: ripemd.c:ctMaskSel Unexecuted instantiation: rsa.c:ctMaskSel Unexecuted instantiation: sha.c:ctMaskSel Unexecuted instantiation: sha256.c:ctMaskSel Unexecuted instantiation: sha3.c:ctMaskSel Unexecuted instantiation: sha512.c:ctMaskSel Unexecuted instantiation: siphash.c:ctMaskSel Unexecuted instantiation: sm2.c:ctMaskSel Unexecuted instantiation: sm3.c:ctMaskSel Unexecuted instantiation: sm4.c:ctMaskSel Unexecuted instantiation: sp_int.c:ctMaskSel Unexecuted instantiation: wc_encrypt.c:ctMaskSel Unexecuted instantiation: wolfmath.c:ctMaskSel Line | Count | Source | 934 | 18.9k | { | 935 | 18.9k | return (byte)((b & ((byte)~(word32)m)) | (a & m)); | 936 | 18.9k | } |
Unexecuted instantiation: tls13.c:ctMaskSel Unexecuted instantiation: wc_mlkem.c:ctMaskSel Unexecuted instantiation: wc_mlkem_poly.c:ctMaskSel Unexecuted instantiation: internal.c:ctMaskSel Unexecuted instantiation: keys.c:ctMaskSel |
937 | | |
938 | | /* Constant time - select integer a when mask is set and integer b otherwise. */ |
939 | | WC_MISC_STATIC WC_INLINE int ctMaskSelInt(byte m, int a, int b) |
940 | 14.4k | { |
941 | 14.4k | return (b & (~(signed int)(signed char)m)) | |
942 | 14.4k | (a & ( (signed int)(signed char)m)); |
943 | 14.4k | } Unexecuted instantiation: aes.c:ctMaskSelInt Unexecuted instantiation: arc4.c:ctMaskSelInt Unexecuted instantiation: asn.c:ctMaskSelInt Unexecuted instantiation: blake2b.c:ctMaskSelInt Unexecuted instantiation: blake2s.c:ctMaskSelInt Unexecuted instantiation: camellia.c:ctMaskSelInt Unexecuted instantiation: chacha.c:ctMaskSelInt Unexecuted instantiation: chacha20_poly1305.c:ctMaskSelInt Unexecuted instantiation: cmac.c:ctMaskSelInt Unexecuted instantiation: coding.c:ctMaskSelInt Unexecuted instantiation: curve25519.c:ctMaskSelInt Unexecuted instantiation: curve448.c:ctMaskSelInt Unexecuted instantiation: des3.c:ctMaskSelInt Unexecuted instantiation: dh.c:ctMaskSelInt Unexecuted instantiation: ecc.c:ctMaskSelInt Unexecuted instantiation: eccsi.c:ctMaskSelInt Unexecuted instantiation: ed25519.c:ctMaskSelInt Unexecuted instantiation: ed448.c:ctMaskSelInt Unexecuted instantiation: fe_448.c:ctMaskSelInt Unexecuted instantiation: fe_operations.c:ctMaskSelInt Unexecuted instantiation: ge_448.c:ctMaskSelInt Unexecuted instantiation: ge_operations.c:ctMaskSelInt Unexecuted instantiation: hash.c:ctMaskSelInt Unexecuted instantiation: hmac.c:ctMaskSelInt Unexecuted instantiation: kdf.c:ctMaskSelInt Unexecuted instantiation: md2.c:ctMaskSelInt Unexecuted instantiation: md4.c:ctMaskSelInt Unexecuted instantiation: md5.c:ctMaskSelInt Unexecuted instantiation: memory.c:ctMaskSelInt Unexecuted instantiation: poly1305.c:ctMaskSelInt Unexecuted instantiation: pwdbased.c:ctMaskSelInt Unexecuted instantiation: random.c:ctMaskSelInt Unexecuted instantiation: ripemd.c:ctMaskSelInt Line | Count | Source | 940 | 14.4k | { | 941 | 14.4k | return (b & (~(signed int)(signed char)m)) | | 942 | 14.4k | (a & ( (signed int)(signed char)m)); | 943 | 14.4k | } |
Unexecuted instantiation: sha.c:ctMaskSelInt Unexecuted instantiation: sha256.c:ctMaskSelInt Unexecuted instantiation: sha3.c:ctMaskSelInt Unexecuted instantiation: sha512.c:ctMaskSelInt Unexecuted instantiation: siphash.c:ctMaskSelInt Unexecuted instantiation: sm2.c:ctMaskSelInt Unexecuted instantiation: sm3.c:ctMaskSelInt Unexecuted instantiation: sm4.c:ctMaskSelInt Unexecuted instantiation: sp_int.c:ctMaskSelInt Unexecuted instantiation: wc_encrypt.c:ctMaskSelInt Unexecuted instantiation: wolfmath.c:ctMaskSelInt Unexecuted instantiation: tls.c:ctMaskSelInt Unexecuted instantiation: tls13.c:ctMaskSelInt Unexecuted instantiation: wc_mlkem.c:ctMaskSelInt Unexecuted instantiation: wc_mlkem_poly.c:ctMaskSelInt Unexecuted instantiation: internal.c:ctMaskSelInt Unexecuted instantiation: keys.c:ctMaskSelInt |
944 | | |
945 | | /* Constant time - select word32 a when mask is set and word32 b otherwise. */ |
946 | | WC_MISC_STATIC WC_INLINE word32 ctMaskSelWord32(byte m, word32 a, word32 b) |
947 | 0 | { |
948 | 0 | return (((word32)b & (word32)(~(signed int)(signed char)m)) | |
949 | 0 | ((word32)a & (word32)( (signed int)(signed char)m))); |
950 | 0 | } Unexecuted instantiation: aes.c:ctMaskSelWord32 Unexecuted instantiation: arc4.c:ctMaskSelWord32 Unexecuted instantiation: asn.c:ctMaskSelWord32 Unexecuted instantiation: blake2b.c:ctMaskSelWord32 Unexecuted instantiation: blake2s.c:ctMaskSelWord32 Unexecuted instantiation: camellia.c:ctMaskSelWord32 Unexecuted instantiation: chacha.c:ctMaskSelWord32 Unexecuted instantiation: chacha20_poly1305.c:ctMaskSelWord32 Unexecuted instantiation: cmac.c:ctMaskSelWord32 Unexecuted instantiation: coding.c:ctMaskSelWord32 Unexecuted instantiation: curve25519.c:ctMaskSelWord32 Unexecuted instantiation: curve448.c:ctMaskSelWord32 Unexecuted instantiation: des3.c:ctMaskSelWord32 Unexecuted instantiation: dh.c:ctMaskSelWord32 Unexecuted instantiation: ecc.c:ctMaskSelWord32 Unexecuted instantiation: eccsi.c:ctMaskSelWord32 Unexecuted instantiation: ed25519.c:ctMaskSelWord32 Unexecuted instantiation: ed448.c:ctMaskSelWord32 Unexecuted instantiation: fe_448.c:ctMaskSelWord32 Unexecuted instantiation: fe_operations.c:ctMaskSelWord32 Unexecuted instantiation: ge_448.c:ctMaskSelWord32 Unexecuted instantiation: ge_operations.c:ctMaskSelWord32 Unexecuted instantiation: hash.c:ctMaskSelWord32 Unexecuted instantiation: hmac.c:ctMaskSelWord32 Unexecuted instantiation: kdf.c:ctMaskSelWord32 Unexecuted instantiation: md2.c:ctMaskSelWord32 Unexecuted instantiation: md4.c:ctMaskSelWord32 Unexecuted instantiation: md5.c:ctMaskSelWord32 Unexecuted instantiation: memory.c:ctMaskSelWord32 Unexecuted instantiation: poly1305.c:ctMaskSelWord32 Unexecuted instantiation: pwdbased.c:ctMaskSelWord32 Unexecuted instantiation: random.c:ctMaskSelWord32 Unexecuted instantiation: ripemd.c:ctMaskSelWord32 Unexecuted instantiation: rsa.c:ctMaskSelWord32 Unexecuted instantiation: sha.c:ctMaskSelWord32 Unexecuted instantiation: sha256.c:ctMaskSelWord32 Unexecuted instantiation: sha3.c:ctMaskSelWord32 Unexecuted instantiation: sha512.c:ctMaskSelWord32 Unexecuted instantiation: siphash.c:ctMaskSelWord32 Unexecuted instantiation: sm2.c:ctMaskSelWord32 Unexecuted instantiation: sm3.c:ctMaskSelWord32 Unexecuted instantiation: sm4.c:ctMaskSelWord32 Unexecuted instantiation: sp_int.c:ctMaskSelWord32 Unexecuted instantiation: wc_encrypt.c:ctMaskSelWord32 Unexecuted instantiation: wolfmath.c:ctMaskSelWord32 Unexecuted instantiation: ssl.c:ctMaskSelWord32 Unexecuted instantiation: tls.c:ctMaskSelWord32 Unexecuted instantiation: tls13.c:ctMaskSelWord32 Unexecuted instantiation: wc_mlkem.c:ctMaskSelWord32 Unexecuted instantiation: wc_mlkem_poly.c:ctMaskSelWord32 Unexecuted instantiation: internal.c:ctMaskSelWord32 Unexecuted instantiation: keys.c:ctMaskSelWord32 |
951 | | |
952 | | /* Constant time - bit set when a <= b. */ |
953 | | WC_MISC_STATIC WC_INLINE byte ctSetLTE(int a, int b) |
954 | 54 | { |
955 | 54 | return (byte)(((word32)a - (word32)b - 1) >> 31); |
956 | 54 | } Unexecuted instantiation: aes.c:ctSetLTE Unexecuted instantiation: arc4.c:ctSetLTE Unexecuted instantiation: asn.c:ctSetLTE Unexecuted instantiation: blake2b.c:ctSetLTE Unexecuted instantiation: blake2s.c:ctSetLTE Unexecuted instantiation: camellia.c:ctSetLTE Unexecuted instantiation: chacha.c:ctSetLTE Unexecuted instantiation: chacha20_poly1305.c:ctSetLTE Unexecuted instantiation: cmac.c:ctSetLTE Unexecuted instantiation: coding.c:ctSetLTE Unexecuted instantiation: curve25519.c:ctSetLTE Unexecuted instantiation: curve448.c:ctSetLTE Unexecuted instantiation: des3.c:ctSetLTE Unexecuted instantiation: dh.c:ctSetLTE Unexecuted instantiation: ecc.c:ctSetLTE Unexecuted instantiation: eccsi.c:ctSetLTE Unexecuted instantiation: ed25519.c:ctSetLTE Unexecuted instantiation: ed448.c:ctSetLTE Unexecuted instantiation: fe_448.c:ctSetLTE Unexecuted instantiation: fe_operations.c:ctSetLTE Unexecuted instantiation: ge_448.c:ctSetLTE Unexecuted instantiation: ge_operations.c:ctSetLTE Unexecuted instantiation: hash.c:ctSetLTE Unexecuted instantiation: hmac.c:ctSetLTE Unexecuted instantiation: kdf.c:ctSetLTE Unexecuted instantiation: md2.c:ctSetLTE Unexecuted instantiation: md4.c:ctSetLTE Unexecuted instantiation: md5.c:ctSetLTE Unexecuted instantiation: memory.c:ctSetLTE Unexecuted instantiation: poly1305.c:ctSetLTE Unexecuted instantiation: pwdbased.c:ctSetLTE Unexecuted instantiation: random.c:ctSetLTE Unexecuted instantiation: ripemd.c:ctSetLTE Unexecuted instantiation: rsa.c:ctSetLTE Unexecuted instantiation: sha.c:ctSetLTE Unexecuted instantiation: sha256.c:ctSetLTE Unexecuted instantiation: sha3.c:ctSetLTE Unexecuted instantiation: sha512.c:ctSetLTE Unexecuted instantiation: siphash.c:ctSetLTE Unexecuted instantiation: sm2.c:ctSetLTE Unexecuted instantiation: sm3.c:ctSetLTE Unexecuted instantiation: sm4.c:ctSetLTE Unexecuted instantiation: sp_int.c:ctSetLTE Unexecuted instantiation: wc_encrypt.c:ctSetLTE Unexecuted instantiation: wolfmath.c:ctSetLTE Unexecuted instantiation: ssl.c:ctSetLTE Line | Count | Source | 954 | 54 | { | 955 | 54 | return (byte)(((word32)a - (word32)b - 1) >> 31); | 956 | 54 | } |
Unexecuted instantiation: tls13.c:ctSetLTE Unexecuted instantiation: wc_mlkem.c:ctSetLTE Unexecuted instantiation: wc_mlkem_poly.c:ctSetLTE Unexecuted instantiation: internal.c:ctSetLTE Unexecuted instantiation: keys.c:ctSetLTE |
957 | | |
958 | | /* Constant time - conditionally copy size bytes from src to dst if mask is set |
959 | | */ |
960 | | WC_MISC_STATIC WC_INLINE void ctMaskCopy(byte mask, byte* dst, byte* src, |
961 | | word16 size) |
962 | 0 | { |
963 | 0 | int i; |
964 | 0 | for (i = 0; i < size; ++i) { |
965 | 0 | dst[i] ^= (dst[i] ^ src[i]) & mask; |
966 | 0 | } |
967 | 0 | } Unexecuted instantiation: aes.c:ctMaskCopy Unexecuted instantiation: arc4.c:ctMaskCopy Unexecuted instantiation: asn.c:ctMaskCopy Unexecuted instantiation: blake2b.c:ctMaskCopy Unexecuted instantiation: blake2s.c:ctMaskCopy Unexecuted instantiation: camellia.c:ctMaskCopy Unexecuted instantiation: chacha.c:ctMaskCopy Unexecuted instantiation: chacha20_poly1305.c:ctMaskCopy Unexecuted instantiation: cmac.c:ctMaskCopy Unexecuted instantiation: coding.c:ctMaskCopy Unexecuted instantiation: curve25519.c:ctMaskCopy Unexecuted instantiation: curve448.c:ctMaskCopy Unexecuted instantiation: des3.c:ctMaskCopy Unexecuted instantiation: dh.c:ctMaskCopy Unexecuted instantiation: ecc.c:ctMaskCopy Unexecuted instantiation: eccsi.c:ctMaskCopy Unexecuted instantiation: ed25519.c:ctMaskCopy Unexecuted instantiation: ed448.c:ctMaskCopy Unexecuted instantiation: fe_448.c:ctMaskCopy Unexecuted instantiation: fe_operations.c:ctMaskCopy Unexecuted instantiation: ge_448.c:ctMaskCopy Unexecuted instantiation: ge_operations.c:ctMaskCopy Unexecuted instantiation: hash.c:ctMaskCopy Unexecuted instantiation: hmac.c:ctMaskCopy Unexecuted instantiation: kdf.c:ctMaskCopy Unexecuted instantiation: md2.c:ctMaskCopy Unexecuted instantiation: md4.c:ctMaskCopy Unexecuted instantiation: md5.c:ctMaskCopy Unexecuted instantiation: memory.c:ctMaskCopy Unexecuted instantiation: poly1305.c:ctMaskCopy Unexecuted instantiation: pwdbased.c:ctMaskCopy Unexecuted instantiation: random.c:ctMaskCopy Unexecuted instantiation: ripemd.c:ctMaskCopy Unexecuted instantiation: rsa.c:ctMaskCopy Unexecuted instantiation: sha.c:ctMaskCopy Unexecuted instantiation: sha256.c:ctMaskCopy Unexecuted instantiation: sha3.c:ctMaskCopy Unexecuted instantiation: sha512.c:ctMaskCopy Unexecuted instantiation: siphash.c:ctMaskCopy Unexecuted instantiation: sm2.c:ctMaskCopy Unexecuted instantiation: sm3.c:ctMaskCopy Unexecuted instantiation: sm4.c:ctMaskCopy Unexecuted instantiation: sp_int.c:ctMaskCopy Unexecuted instantiation: wc_encrypt.c:ctMaskCopy Unexecuted instantiation: wolfmath.c:ctMaskCopy Unexecuted instantiation: ssl.c:ctMaskCopy Unexecuted instantiation: tls.c:ctMaskCopy Unexecuted instantiation: tls13.c:ctMaskCopy Unexecuted instantiation: wc_mlkem.c:ctMaskCopy Unexecuted instantiation: wc_mlkem_poly.c:ctMaskCopy Unexecuted instantiation: internal.c:ctMaskCopy Unexecuted instantiation: keys.c:ctMaskCopy |
968 | | |
969 | | #ifdef WC_NO_PTR_INT_CAST |
970 | | /* Constant time - return b when mask is set and a when it is clear. |
971 | | * |
972 | | * ctMaskCopy() cannot be used to select a pointer on a capability based |
973 | | * target: it copies byte by byte, which drops the capability even when the |
974 | | * bytes are unchanged. Index a two entry table instead. The table is aligned |
975 | | * to 32 bytes - not 16 - so that both entries share one cache line even when |
976 | | * a pointer is 16 bytes wide, as it is on CHERI purecap. XALIGNED is used |
977 | | * rather than ALIGN16 because ALIGN16 expands to nothing unless |
978 | | * WOLFSSL_USE_ALIGN is defined. |
979 | | */ |
980 | | WC_MISC_STATIC WC_INLINE void* ctMaskSelPtr(byte mask, void* a, void* b) |
981 | | { |
982 | | XALIGNED(32) void* p[2]; |
983 | | |
984 | | p[0] = a; |
985 | | p[1] = b; |
986 | | |
987 | | return p[mask & 1]; |
988 | | } |
989 | | #endif /* WC_NO_PTR_INT_CAST */ |
990 | | |
991 | | #endif /* !WOLFSSL_NO_CT_OPS */ |
992 | | |
993 | | #ifndef WOLFSSL_HAVE_MIN |
994 | | #define WOLFSSL_HAVE_MIN |
995 | | #if defined(HAVE_FIPS) && !defined(min) /* so ifdef check passes */ |
996 | | #define min min |
997 | | #endif |
998 | | /* returns the smaller of a and b */ |
999 | | WC_MISC_STATIC WC_INLINE word32 min(word32 a, word32 b) |
1000 | 3.96M | { |
1001 | 3.96M | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ |
1002 | 3.96M | defined(WORD64_AVAILABLE) |
1003 | 3.96M | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); |
1004 | 3.96M | word32 r = (a & ~gte_mask); |
1005 | 3.96M | r |= (b & gte_mask); |
1006 | 3.96M | return r; |
1007 | | #else /* WOLFSSL_NO_CT_OPS */ |
1008 | | return a > b ? b : a; |
1009 | | #endif /* WOLFSSL_NO_CT_OPS */ |
1010 | 3.96M | } Line | Count | Source | 1000 | 7.75k | { | 1001 | 7.75k | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 7.75k | defined(WORD64_AVAILABLE) | 1003 | 7.75k | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 7.75k | word32 r = (a & ~gte_mask); | 1005 | 7.75k | r |= (b & gte_mask); | 1006 | 7.75k | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 7.75k | } |
Unexecuted instantiation: arc4.c:min Line | Count | Source | 1000 | 49.7k | { | 1001 | 49.7k | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 49.7k | defined(WORD64_AVAILABLE) | 1003 | 49.7k | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 49.7k | word32 r = (a & ~gte_mask); | 1005 | 49.7k | r |= (b & gte_mask); | 1006 | 49.7k | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 49.7k | } |
Unexecuted instantiation: blake2b.c:min Unexecuted instantiation: blake2s.c:min Unexecuted instantiation: camellia.c:min Unexecuted instantiation: chacha.c:min Unexecuted instantiation: chacha20_poly1305.c:min Unexecuted instantiation: cmac.c:min Unexecuted instantiation: coding.c:min Unexecuted instantiation: curve25519.c:min Unexecuted instantiation: curve448.c:min Unexecuted instantiation: des3.c:min Line | Count | Source | 1000 | 168 | { | 1001 | 168 | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 168 | defined(WORD64_AVAILABLE) | 1003 | 168 | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 168 | word32 r = (a & ~gte_mask); | 1005 | 168 | r |= (b & gte_mask); | 1006 | 168 | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 168 | } |
Unexecuted instantiation: ecc.c:min Unexecuted instantiation: eccsi.c:min Unexecuted instantiation: ed25519.c:min Unexecuted instantiation: ed448.c:min Unexecuted instantiation: fe_448.c:min Unexecuted instantiation: fe_operations.c:min Unexecuted instantiation: ge_448.c:min Unexecuted instantiation: ge_operations.c:min Unexecuted instantiation: hash.c:min Line | Count | Source | 1000 | 26.0k | { | 1001 | 26.0k | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 26.0k | defined(WORD64_AVAILABLE) | 1003 | 26.0k | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 26.0k | word32 r = (a & ~gte_mask); | 1005 | 26.0k | r |= (b & gte_mask); | 1006 | 26.0k | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 26.0k | } |
Line | Count | Source | 1000 | 1.18k | { | 1001 | 1.18k | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 1.18k | defined(WORD64_AVAILABLE) | 1003 | 1.18k | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 1.18k | word32 r = (a & ~gte_mask); | 1005 | 1.18k | r |= (b & gte_mask); | 1006 | 1.18k | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 1.18k | } |
Unexecuted instantiation: md2.c:min Line | Count | Source | 1000 | 23.3k | { | 1001 | 23.3k | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 23.3k | defined(WORD64_AVAILABLE) | 1003 | 23.3k | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 23.3k | word32 r = (a & ~gte_mask); | 1005 | 23.3k | r |= (b & gte_mask); | 1006 | 23.3k | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 23.3k | } |
Line | Count | Source | 1000 | 152k | { | 1001 | 152k | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 152k | defined(WORD64_AVAILABLE) | 1003 | 152k | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 152k | word32 r = (a & ~gte_mask); | 1005 | 152k | r |= (b & gte_mask); | 1006 | 152k | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 152k | } |
Unexecuted instantiation: memory.c:min Unexecuted instantiation: poly1305.c:min Line | Count | Source | 1000 | 3.24k | { | 1001 | 3.24k | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 3.24k | defined(WORD64_AVAILABLE) | 1003 | 3.24k | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 3.24k | word32 r = (a & ~gte_mask); | 1005 | 3.24k | r |= (b & gte_mask); | 1006 | 3.24k | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 3.24k | } |
Line | Count | Source | 1000 | 104k | { | 1001 | 104k | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 104k | defined(WORD64_AVAILABLE) | 1003 | 104k | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 104k | word32 r = (a & ~gte_mask); | 1005 | 104k | r |= (b & gte_mask); | 1006 | 104k | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 104k | } |
Unexecuted instantiation: ripemd.c:min Unexecuted instantiation: rsa.c:min Line | Count | Source | 1000 | 265k | { | 1001 | 265k | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 265k | defined(WORD64_AVAILABLE) | 1003 | 265k | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 265k | word32 r = (a & ~gte_mask); | 1005 | 265k | r |= (b & gte_mask); | 1006 | 265k | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 265k | } |
Line | Count | Source | 1000 | 254k | { | 1001 | 254k | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 254k | defined(WORD64_AVAILABLE) | 1003 | 254k | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 254k | word32 r = (a & ~gte_mask); | 1005 | 254k | r |= (b & gte_mask); | 1006 | 254k | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 254k | } |
Unexecuted instantiation: sha3.c:min Line | Count | Source | 1000 | 3.00M | { | 1001 | 3.00M | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 3.00M | defined(WORD64_AVAILABLE) | 1003 | 3.00M | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 3.00M | word32 r = (a & ~gte_mask); | 1005 | 3.00M | r |= (b & gte_mask); | 1006 | 3.00M | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 3.00M | } |
Unexecuted instantiation: siphash.c:min Unexecuted instantiation: sm2.c:min Unexecuted instantiation: sm3.c:min Unexecuted instantiation: sm4.c:min Unexecuted instantiation: sp_int.c:min Unexecuted instantiation: wc_encrypt.c:min Unexecuted instantiation: wolfmath.c:min Line | Count | Source | 1000 | 422 | { | 1001 | 422 | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 422 | defined(WORD64_AVAILABLE) | 1003 | 422 | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 422 | word32 r = (a & ~gte_mask); | 1005 | 422 | r |= (b & gte_mask); | 1006 | 422 | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 422 | } |
Unexecuted instantiation: tls.c:min Line | Count | Source | 1000 | 14.2k | { | 1001 | 14.2k | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 14.2k | defined(WORD64_AVAILABLE) | 1003 | 14.2k | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 14.2k | word32 r = (a & ~gte_mask); | 1005 | 14.2k | r |= (b & gte_mask); | 1006 | 14.2k | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 14.2k | } |
Unexecuted instantiation: wc_mlkem.c:min Unexecuted instantiation: wc_mlkem_poly.c:min Line | Count | Source | 1000 | 62.0k | { | 1001 | 62.0k | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ | 1002 | 62.0k | defined(WORD64_AVAILABLE) | 1003 | 62.0k | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); | 1004 | 62.0k | word32 r = (a & ~gte_mask); | 1005 | 62.0k | r |= (b & gte_mask); | 1006 | 62.0k | return r; | 1007 | | #else /* WOLFSSL_NO_CT_OPS */ | 1008 | | return a > b ? b : a; | 1009 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1010 | 62.0k | } |
Unexecuted instantiation: keys.c:min |
1011 | | #endif /* !WOLFSSL_HAVE_MIN */ |
1012 | | |
1013 | | #ifndef WOLFSSL_HAVE_MAX |
1014 | | #define WOLFSSL_HAVE_MAX |
1015 | | #if defined(HAVE_FIPS) && !defined(max) /* so ifdef check passes */ |
1016 | | #define max max |
1017 | | #endif |
1018 | | WC_MISC_STATIC WC_INLINE word32 max(word32 a, word32 b) |
1019 | 0 | { |
1020 | 0 | #if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \ |
1021 | 0 | defined(WORD64_AVAILABLE) |
1022 | 0 | volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b); |
1023 | 0 | return (a & gte_mask) | (b & ~gte_mask); |
1024 | 0 | #else /* WOLFSSL_NO_CT_OPS */ |
1025 | 0 | return a > b ? a : b; |
1026 | 0 | #endif /* WOLFSSL_NO_CT_OPS */ |
1027 | 0 | } Unexecuted instantiation: aes.c:max Unexecuted instantiation: arc4.c:max Unexecuted instantiation: asn.c:max Unexecuted instantiation: blake2b.c:max Unexecuted instantiation: blake2s.c:max Unexecuted instantiation: camellia.c:max Unexecuted instantiation: chacha.c:max Unexecuted instantiation: chacha20_poly1305.c:max Unexecuted instantiation: cmac.c:max Unexecuted instantiation: coding.c:max Unexecuted instantiation: curve25519.c:max Unexecuted instantiation: curve448.c:max Unexecuted instantiation: des3.c:max Unexecuted instantiation: dh.c:max Unexecuted instantiation: ecc.c:max Unexecuted instantiation: eccsi.c:max Unexecuted instantiation: ed25519.c:max Unexecuted instantiation: ed448.c:max Unexecuted instantiation: fe_448.c:max Unexecuted instantiation: fe_operations.c:max Unexecuted instantiation: ge_448.c:max Unexecuted instantiation: ge_operations.c:max Unexecuted instantiation: hash.c:max Unexecuted instantiation: hmac.c:max Unexecuted instantiation: kdf.c:max Unexecuted instantiation: md2.c:max Unexecuted instantiation: md4.c:max Unexecuted instantiation: md5.c:max Unexecuted instantiation: memory.c:max Unexecuted instantiation: poly1305.c:max Unexecuted instantiation: pwdbased.c:max Unexecuted instantiation: random.c:max Unexecuted instantiation: ripemd.c:max Unexecuted instantiation: rsa.c:max Unexecuted instantiation: sha.c:max Unexecuted instantiation: sha256.c:max Unexecuted instantiation: sha3.c:max Unexecuted instantiation: sha512.c:max Unexecuted instantiation: siphash.c:max Unexecuted instantiation: sm2.c:max Unexecuted instantiation: sm3.c:max Unexecuted instantiation: sm4.c:max Unexecuted instantiation: sp_int.c:max Unexecuted instantiation: wc_encrypt.c:max Unexecuted instantiation: wolfmath.c:max Unexecuted instantiation: ssl.c:max Unexecuted instantiation: tls.c:max Unexecuted instantiation: tls13.c:max Unexecuted instantiation: wc_mlkem.c:max Unexecuted instantiation: wc_mlkem_poly.c:max Unexecuted instantiation: keys.c:max |
1028 | | #endif /* !WOLFSSL_HAVE_MAX */ |
1029 | | |
1030 | | #ifndef WOLFSSL_NO_INT_ENCODE |
1031 | | /* converts a 32 bit integer to 24 bit */ |
1032 | | WC_MISC_STATIC WC_INLINE void c32to24(word32 in, word24 out) |
1033 | 116k | { |
1034 | 116k | out[0] = (byte)((in >> 16) & 0xff); |
1035 | 116k | out[1] = (byte)((in >> 8) & 0xff); |
1036 | 116k | out[2] = (byte)(in & 0xff); |
1037 | 116k | } Unexecuted instantiation: aes.c:c32to24 Unexecuted instantiation: arc4.c:c32to24 Unexecuted instantiation: asn.c:c32to24 Unexecuted instantiation: blake2b.c:c32to24 Unexecuted instantiation: blake2s.c:c32to24 Unexecuted instantiation: camellia.c:c32to24 Unexecuted instantiation: chacha.c:c32to24 Unexecuted instantiation: chacha20_poly1305.c:c32to24 Unexecuted instantiation: cmac.c:c32to24 Unexecuted instantiation: coding.c:c32to24 Unexecuted instantiation: curve25519.c:c32to24 Unexecuted instantiation: curve448.c:c32to24 Unexecuted instantiation: des3.c:c32to24 Unexecuted instantiation: dh.c:c32to24 Unexecuted instantiation: ecc.c:c32to24 Unexecuted instantiation: eccsi.c:c32to24 Unexecuted instantiation: ed25519.c:c32to24 Unexecuted instantiation: ed448.c:c32to24 Unexecuted instantiation: fe_448.c:c32to24 Unexecuted instantiation: fe_operations.c:c32to24 Unexecuted instantiation: ge_448.c:c32to24 Unexecuted instantiation: ge_operations.c:c32to24 Unexecuted instantiation: hash.c:c32to24 Unexecuted instantiation: hmac.c:c32to24 Unexecuted instantiation: kdf.c:c32to24 Unexecuted instantiation: md2.c:c32to24 Unexecuted instantiation: md4.c:c32to24 Unexecuted instantiation: md5.c:c32to24 Unexecuted instantiation: memory.c:c32to24 Unexecuted instantiation: poly1305.c:c32to24 Unexecuted instantiation: pwdbased.c:c32to24 Unexecuted instantiation: random.c:c32to24 Unexecuted instantiation: ripemd.c:c32to24 Unexecuted instantiation: rsa.c:c32to24 Unexecuted instantiation: sha.c:c32to24 Unexecuted instantiation: sha256.c:c32to24 Unexecuted instantiation: sha3.c:c32to24 Unexecuted instantiation: sha512.c:c32to24 Unexecuted instantiation: siphash.c:c32to24 Unexecuted instantiation: sm2.c:c32to24 Unexecuted instantiation: sm3.c:c32to24 Unexecuted instantiation: sm4.c:c32to24 Unexecuted instantiation: sp_int.c:c32to24 Unexecuted instantiation: wc_encrypt.c:c32to24 Unexecuted instantiation: wolfmath.c:c32to24 Unexecuted instantiation: ssl.c:c32to24 Unexecuted instantiation: tls.c:c32to24 Line | Count | Source | 1033 | 5.52k | { | 1034 | 5.52k | out[0] = (byte)((in >> 16) & 0xff); | 1035 | 5.52k | out[1] = (byte)((in >> 8) & 0xff); | 1036 | 5.52k | out[2] = (byte)(in & 0xff); | 1037 | 5.52k | } |
Unexecuted instantiation: wc_mlkem.c:c32to24 Unexecuted instantiation: wc_mlkem_poly.c:c32to24 Line | Count | Source | 1033 | 110k | { | 1034 | 110k | out[0] = (byte)((in >> 16) & 0xff); | 1035 | 110k | out[1] = (byte)((in >> 8) & 0xff); | 1036 | 110k | out[2] = (byte)(in & 0xff); | 1037 | 110k | } |
Unexecuted instantiation: keys.c:c32to24 |
1038 | | |
1039 | | /* convert 16 bit integer to opaque */ |
1040 | | WC_MISC_STATIC WC_INLINE void c16toa(word16 wc_u16, byte* c) |
1041 | 621k | { |
1042 | 621k | c[0] = (byte)((wc_u16 >> 8) & 0xff); |
1043 | 621k | c[1] = (byte)(wc_u16 & 0xff); |
1044 | 621k | } Unexecuted instantiation: aes.c:c16toa Unexecuted instantiation: arc4.c:c16toa Unexecuted instantiation: asn.c:c16toa Unexecuted instantiation: blake2b.c:c16toa Unexecuted instantiation: blake2s.c:c16toa Unexecuted instantiation: camellia.c:c16toa Unexecuted instantiation: chacha.c:c16toa Unexecuted instantiation: chacha20_poly1305.c:c16toa Unexecuted instantiation: cmac.c:c16toa Unexecuted instantiation: coding.c:c16toa Unexecuted instantiation: curve25519.c:c16toa Unexecuted instantiation: curve448.c:c16toa Unexecuted instantiation: des3.c:c16toa Unexecuted instantiation: dh.c:c16toa Unexecuted instantiation: ecc.c:c16toa Unexecuted instantiation: eccsi.c:c16toa Unexecuted instantiation: ed25519.c:c16toa Unexecuted instantiation: ed448.c:c16toa Unexecuted instantiation: fe_448.c:c16toa Unexecuted instantiation: fe_operations.c:c16toa Unexecuted instantiation: ge_448.c:c16toa Unexecuted instantiation: ge_operations.c:c16toa Unexecuted instantiation: hash.c:c16toa Unexecuted instantiation: hmac.c:c16toa Unexecuted instantiation: kdf.c:c16toa Unexecuted instantiation: md2.c:c16toa Unexecuted instantiation: md4.c:c16toa Unexecuted instantiation: md5.c:c16toa Unexecuted instantiation: memory.c:c16toa Unexecuted instantiation: poly1305.c:c16toa Unexecuted instantiation: pwdbased.c:c16toa Unexecuted instantiation: random.c:c16toa Unexecuted instantiation: ripemd.c:c16toa Unexecuted instantiation: rsa.c:c16toa Unexecuted instantiation: sha.c:c16toa Unexecuted instantiation: sha256.c:c16toa Unexecuted instantiation: sha3.c:c16toa Unexecuted instantiation: sha512.c:c16toa Unexecuted instantiation: siphash.c:c16toa Unexecuted instantiation: sm2.c:c16toa Unexecuted instantiation: sm3.c:c16toa Unexecuted instantiation: sm4.c:c16toa Unexecuted instantiation: sp_int.c:c16toa Unexecuted instantiation: wc_encrypt.c:c16toa Unexecuted instantiation: wolfmath.c:c16toa Unexecuted instantiation: ssl.c:c16toa Line | Count | Source | 1041 | 424k | { | 1042 | 424k | c[0] = (byte)((wc_u16 >> 8) & 0xff); | 1043 | 424k | c[1] = (byte)(wc_u16 & 0xff); | 1044 | 424k | } |
Line | Count | Source | 1041 | 10.8k | { | 1042 | 10.8k | c[0] = (byte)((wc_u16 >> 8) & 0xff); | 1043 | 10.8k | c[1] = (byte)(wc_u16 & 0xff); | 1044 | 10.8k | } |
Unexecuted instantiation: wc_mlkem.c:c16toa Unexecuted instantiation: wc_mlkem_poly.c:c16toa Line | Count | Source | 1041 | 185k | { | 1042 | 185k | c[0] = (byte)((wc_u16 >> 8) & 0xff); | 1043 | 185k | c[1] = (byte)(wc_u16 & 0xff); | 1044 | 185k | } |
Unexecuted instantiation: keys.c:c16toa |
1045 | | |
1046 | | /* convert 32 bit integer to opaque */ |
1047 | | WC_MISC_STATIC WC_INLINE void c32toa(word32 wc_u32, byte* c) |
1048 | 276k | { |
1049 | 276k | #ifdef WOLFSSL_USE_ALIGN |
1050 | 276k | c[0] = (byte)((wc_u32 >> 24) & 0xff); |
1051 | 276k | c[1] = (byte)((wc_u32 >> 16) & 0xff); |
1052 | 276k | c[2] = (byte)((wc_u32 >> 8) & 0xff); |
1053 | 276k | c[3] = (byte)(wc_u32 & 0xff); |
1054 | | #elif defined(LITTLE_ENDIAN_ORDER) |
1055 | | *(word32*)c = ByteReverseWord32(wc_u32); |
1056 | | #else |
1057 | | *(word32*)c = wc_u32; |
1058 | | #endif |
1059 | 276k | } Unexecuted instantiation: aes.c:c32toa Unexecuted instantiation: arc4.c:c32toa Unexecuted instantiation: asn.c:c32toa Unexecuted instantiation: blake2b.c:c32toa Unexecuted instantiation: blake2s.c:c32toa Unexecuted instantiation: camellia.c:c32toa Unexecuted instantiation: chacha.c:c32toa Unexecuted instantiation: chacha20_poly1305.c:c32toa Unexecuted instantiation: cmac.c:c32toa Unexecuted instantiation: coding.c:c32toa Unexecuted instantiation: curve25519.c:c32toa Unexecuted instantiation: curve448.c:c32toa Unexecuted instantiation: des3.c:c32toa Unexecuted instantiation: dh.c:c32toa Unexecuted instantiation: ecc.c:c32toa Unexecuted instantiation: eccsi.c:c32toa Unexecuted instantiation: ed25519.c:c32toa Unexecuted instantiation: ed448.c:c32toa Unexecuted instantiation: fe_448.c:c32toa Unexecuted instantiation: fe_operations.c:c32toa Unexecuted instantiation: ge_448.c:c32toa Unexecuted instantiation: ge_operations.c:c32toa Unexecuted instantiation: hash.c:c32toa Unexecuted instantiation: hmac.c:c32toa Unexecuted instantiation: kdf.c:c32toa Unexecuted instantiation: md2.c:c32toa Unexecuted instantiation: md4.c:c32toa Unexecuted instantiation: md5.c:c32toa Unexecuted instantiation: memory.c:c32toa Unexecuted instantiation: poly1305.c:c32toa Unexecuted instantiation: pwdbased.c:c32toa Unexecuted instantiation: random.c:c32toa Unexecuted instantiation: ripemd.c:c32toa Unexecuted instantiation: rsa.c:c32toa Unexecuted instantiation: sha.c:c32toa Unexecuted instantiation: sha256.c:c32toa Unexecuted instantiation: sha3.c:c32toa Unexecuted instantiation: sha512.c:c32toa Unexecuted instantiation: siphash.c:c32toa Unexecuted instantiation: sm2.c:c32toa Unexecuted instantiation: sm3.c:c32toa Unexecuted instantiation: sm4.c:c32toa Unexecuted instantiation: sp_int.c:c32toa Unexecuted instantiation: wc_encrypt.c:c32toa Unexecuted instantiation: wolfmath.c:c32toa Unexecuted instantiation: ssl.c:c32toa Line | Count | Source | 1048 | 4.37k | { | 1049 | 4.37k | #ifdef WOLFSSL_USE_ALIGN | 1050 | 4.37k | c[0] = (byte)((wc_u32 >> 24) & 0xff); | 1051 | 4.37k | c[1] = (byte)((wc_u32 >> 16) & 0xff); | 1052 | 4.37k | c[2] = (byte)((wc_u32 >> 8) & 0xff); | 1053 | 4.37k | c[3] = (byte)(wc_u32 & 0xff); | 1054 | | #elif defined(LITTLE_ENDIAN_ORDER) | 1055 | | *(word32*)c = ByteReverseWord32(wc_u32); | 1056 | | #else | 1057 | | *(word32*)c = wc_u32; | 1058 | | #endif | 1059 | 4.37k | } |
Line | Count | Source | 1048 | 3.37k | { | 1049 | 3.37k | #ifdef WOLFSSL_USE_ALIGN | 1050 | 3.37k | c[0] = (byte)((wc_u32 >> 24) & 0xff); | 1051 | 3.37k | c[1] = (byte)((wc_u32 >> 16) & 0xff); | 1052 | 3.37k | c[2] = (byte)((wc_u32 >> 8) & 0xff); | 1053 | 3.37k | c[3] = (byte)(wc_u32 & 0xff); | 1054 | | #elif defined(LITTLE_ENDIAN_ORDER) | 1055 | | *(word32*)c = ByteReverseWord32(wc_u32); | 1056 | | #else | 1057 | | *(word32*)c = wc_u32; | 1058 | | #endif | 1059 | 3.37k | } |
Unexecuted instantiation: wc_mlkem.c:c32toa Unexecuted instantiation: wc_mlkem_poly.c:c32toa Line | Count | Source | 1048 | 268k | { | 1049 | 268k | #ifdef WOLFSSL_USE_ALIGN | 1050 | 268k | c[0] = (byte)((wc_u32 >> 24) & 0xff); | 1051 | 268k | c[1] = (byte)((wc_u32 >> 16) & 0xff); | 1052 | 268k | c[2] = (byte)((wc_u32 >> 8) & 0xff); | 1053 | 268k | c[3] = (byte)(wc_u32 & 0xff); | 1054 | | #elif defined(LITTLE_ENDIAN_ORDER) | 1055 | | *(word32*)c = ByteReverseWord32(wc_u32); | 1056 | | #else | 1057 | | *(word32*)c = wc_u32; | 1058 | | #endif | 1059 | 268k | } |
Unexecuted instantiation: keys.c:c32toa |
1060 | | #endif |
1061 | | |
1062 | | #ifndef WOLFSSL_NO_INT_DECODE |
1063 | | /* convert a 24 bit integer into a 32 bit one */ |
1064 | | WC_MISC_STATIC WC_INLINE void c24to32(const word24 wc_u24, word32* wc_u32) |
1065 | 438k | { |
1066 | 438k | *wc_u32 = ((word32)wc_u24[0] << 16) | |
1067 | 438k | ((word32)wc_u24[1] << 8) | |
1068 | 438k | (word32)wc_u24[2]; |
1069 | 438k | } Unexecuted instantiation: aes.c:c24to32 Unexecuted instantiation: arc4.c:c24to32 Unexecuted instantiation: asn.c:c24to32 Unexecuted instantiation: blake2b.c:c24to32 Unexecuted instantiation: blake2s.c:c24to32 Unexecuted instantiation: camellia.c:c24to32 Unexecuted instantiation: chacha.c:c24to32 Unexecuted instantiation: chacha20_poly1305.c:c24to32 Unexecuted instantiation: cmac.c:c24to32 Unexecuted instantiation: coding.c:c24to32 Unexecuted instantiation: curve25519.c:c24to32 Unexecuted instantiation: curve448.c:c24to32 Unexecuted instantiation: des3.c:c24to32 Unexecuted instantiation: dh.c:c24to32 Unexecuted instantiation: ecc.c:c24to32 Unexecuted instantiation: eccsi.c:c24to32 Unexecuted instantiation: ed25519.c:c24to32 Unexecuted instantiation: ed448.c:c24to32 Unexecuted instantiation: fe_448.c:c24to32 Unexecuted instantiation: fe_operations.c:c24to32 Unexecuted instantiation: ge_448.c:c24to32 Unexecuted instantiation: ge_operations.c:c24to32 Unexecuted instantiation: hash.c:c24to32 Unexecuted instantiation: hmac.c:c24to32 Unexecuted instantiation: kdf.c:c24to32 Unexecuted instantiation: md2.c:c24to32 Unexecuted instantiation: md4.c:c24to32 Unexecuted instantiation: md5.c:c24to32 Unexecuted instantiation: memory.c:c24to32 Unexecuted instantiation: poly1305.c:c24to32 Unexecuted instantiation: pwdbased.c:c24to32 Unexecuted instantiation: random.c:c24to32 Unexecuted instantiation: ripemd.c:c24to32 Unexecuted instantiation: rsa.c:c24to32 Unexecuted instantiation: sha.c:c24to32 Unexecuted instantiation: sha256.c:c24to32 Unexecuted instantiation: sha3.c:c24to32 Unexecuted instantiation: sha512.c:c24to32 Unexecuted instantiation: siphash.c:c24to32 Unexecuted instantiation: sm2.c:c24to32 Unexecuted instantiation: sm3.c:c24to32 Unexecuted instantiation: sm4.c:c24to32 Unexecuted instantiation: sp_int.c:c24to32 Unexecuted instantiation: wc_encrypt.c:c24to32 Unexecuted instantiation: wolfmath.c:c24to32 Unexecuted instantiation: ssl.c:c24to32 Unexecuted instantiation: tls.c:c24to32 Unexecuted instantiation: tls13.c:c24to32 Unexecuted instantiation: wc_mlkem.c:c24to32 Unexecuted instantiation: wc_mlkem_poly.c:c24to32 Line | Count | Source | 1065 | 438k | { | 1066 | 438k | *wc_u32 = ((word32)wc_u24[0] << 16) | | 1067 | 438k | ((word32)wc_u24[1] << 8) | | 1068 | 438k | (word32)wc_u24[2]; | 1069 | 438k | } |
Unexecuted instantiation: keys.c:c24to32 |
1070 | | |
1071 | | |
1072 | | /* convert opaque to 24 bit integer */ |
1073 | | WC_MISC_STATIC WC_INLINE void ato24(const byte* c, word32* wc_u24) |
1074 | 0 | { |
1075 | 0 | *wc_u24 = ((word32)c[0] << 16) | ((word32)c[1] << 8) | c[2]; |
1076 | 0 | } Unexecuted instantiation: aes.c:ato24 Unexecuted instantiation: arc4.c:ato24 Unexecuted instantiation: asn.c:ato24 Unexecuted instantiation: blake2b.c:ato24 Unexecuted instantiation: blake2s.c:ato24 Unexecuted instantiation: camellia.c:ato24 Unexecuted instantiation: chacha.c:ato24 Unexecuted instantiation: chacha20_poly1305.c:ato24 Unexecuted instantiation: cmac.c:ato24 Unexecuted instantiation: coding.c:ato24 Unexecuted instantiation: curve25519.c:ato24 Unexecuted instantiation: curve448.c:ato24 Unexecuted instantiation: des3.c:ato24 Unexecuted instantiation: dh.c:ato24 Unexecuted instantiation: ecc.c:ato24 Unexecuted instantiation: eccsi.c:ato24 Unexecuted instantiation: ed25519.c:ato24 Unexecuted instantiation: ed448.c:ato24 Unexecuted instantiation: fe_448.c:ato24 Unexecuted instantiation: fe_operations.c:ato24 Unexecuted instantiation: ge_448.c:ato24 Unexecuted instantiation: ge_operations.c:ato24 Unexecuted instantiation: hash.c:ato24 Unexecuted instantiation: hmac.c:ato24 Unexecuted instantiation: kdf.c:ato24 Unexecuted instantiation: md2.c:ato24 Unexecuted instantiation: md4.c:ato24 Unexecuted instantiation: md5.c:ato24 Unexecuted instantiation: memory.c:ato24 Unexecuted instantiation: poly1305.c:ato24 Unexecuted instantiation: pwdbased.c:ato24 Unexecuted instantiation: random.c:ato24 Unexecuted instantiation: ripemd.c:ato24 Unexecuted instantiation: rsa.c:ato24 Unexecuted instantiation: sha.c:ato24 Unexecuted instantiation: sha256.c:ato24 Unexecuted instantiation: sha3.c:ato24 Unexecuted instantiation: sha512.c:ato24 Unexecuted instantiation: siphash.c:ato24 Unexecuted instantiation: sm2.c:ato24 Unexecuted instantiation: sm3.c:ato24 Unexecuted instantiation: sm4.c:ato24 Unexecuted instantiation: sp_int.c:ato24 Unexecuted instantiation: wc_encrypt.c:ato24 Unexecuted instantiation: wolfmath.c:ato24 Unexecuted instantiation: ssl.c:ato24 Unexecuted instantiation: tls.c:ato24 Unexecuted instantiation: tls13.c:ato24 Unexecuted instantiation: wc_mlkem.c:ato24 Unexecuted instantiation: wc_mlkem_poly.c:ato24 Unexecuted instantiation: internal.c:ato24 Unexecuted instantiation: keys.c:ato24 |
1077 | | |
1078 | | /* convert opaque to 16 bit integer */ |
1079 | | WC_MISC_STATIC WC_INLINE void ato16(const byte* c, word16* wc_u16) |
1080 | 1.24M | { |
1081 | 1.24M | *wc_u16 = (word16) ((c[0] << 8) | (c[1])); |
1082 | 1.24M | } Unexecuted instantiation: aes.c:ato16 Unexecuted instantiation: arc4.c:ato16 Unexecuted instantiation: asn.c:ato16 Unexecuted instantiation: blake2b.c:ato16 Unexecuted instantiation: blake2s.c:ato16 Unexecuted instantiation: camellia.c:ato16 Unexecuted instantiation: chacha.c:ato16 Unexecuted instantiation: chacha20_poly1305.c:ato16 Unexecuted instantiation: cmac.c:ato16 Unexecuted instantiation: coding.c:ato16 Unexecuted instantiation: curve25519.c:ato16 Unexecuted instantiation: curve448.c:ato16 Unexecuted instantiation: des3.c:ato16 Unexecuted instantiation: dh.c:ato16 Unexecuted instantiation: ecc.c:ato16 Unexecuted instantiation: eccsi.c:ato16 Unexecuted instantiation: ed25519.c:ato16 Unexecuted instantiation: ed448.c:ato16 Unexecuted instantiation: fe_448.c:ato16 Unexecuted instantiation: fe_operations.c:ato16 Unexecuted instantiation: ge_448.c:ato16 Unexecuted instantiation: ge_operations.c:ato16 Unexecuted instantiation: hash.c:ato16 Unexecuted instantiation: hmac.c:ato16 Unexecuted instantiation: kdf.c:ato16 Unexecuted instantiation: md2.c:ato16 Unexecuted instantiation: md4.c:ato16 Unexecuted instantiation: md5.c:ato16 Unexecuted instantiation: memory.c:ato16 Unexecuted instantiation: poly1305.c:ato16 Unexecuted instantiation: pwdbased.c:ato16 Unexecuted instantiation: random.c:ato16 Unexecuted instantiation: ripemd.c:ato16 Unexecuted instantiation: rsa.c:ato16 Unexecuted instantiation: sha.c:ato16 Unexecuted instantiation: sha256.c:ato16 Unexecuted instantiation: sha3.c:ato16 Unexecuted instantiation: sha512.c:ato16 Unexecuted instantiation: siphash.c:ato16 Unexecuted instantiation: sm2.c:ato16 Unexecuted instantiation: sm3.c:ato16 Unexecuted instantiation: sm4.c:ato16 Unexecuted instantiation: sp_int.c:ato16 Unexecuted instantiation: wc_encrypt.c:ato16 Unexecuted instantiation: wolfmath.c:ato16 Unexecuted instantiation: ssl.c:ato16 Line | Count | Source | 1080 | 304k | { | 1081 | 304k | *wc_u16 = (word16) ((c[0] << 8) | (c[1])); | 1082 | 304k | } |
Line | Count | Source | 1080 | 13.9k | { | 1081 | 13.9k | *wc_u16 = (word16) ((c[0] << 8) | (c[1])); | 1082 | 13.9k | } |
Unexecuted instantiation: wc_mlkem.c:ato16 Unexecuted instantiation: wc_mlkem_poly.c:ato16 Line | Count | Source | 1080 | 921k | { | 1081 | 921k | *wc_u16 = (word16) ((c[0] << 8) | (c[1])); | 1082 | 921k | } |
Unexecuted instantiation: keys.c:ato16 |
1083 | | |
1084 | | /* convert opaque to 32 bit integer */ |
1085 | | WC_MISC_STATIC WC_INLINE void ato32(const byte* c, word32* wc_u32) |
1086 | 0 | { |
1087 | 0 | #ifdef WOLFSSL_USE_ALIGN |
1088 | 0 | *wc_u32 = ((word32)c[0] << 24) | |
1089 | 0 | ((word32)c[1] << 16) | |
1090 | 0 | ((word32)c[2] << 8) | |
1091 | 0 | (word32)c[3]; |
1092 | 0 | #elif defined(LITTLE_ENDIAN_ORDER) |
1093 | 0 | *wc_u32 = ByteReverseWord32(*(word32*)c); |
1094 | 0 | #else |
1095 | 0 | *wc_u32 = *(word32*)c; |
1096 | 0 | #endif |
1097 | 0 | } Unexecuted instantiation: aes.c:ato32 Unexecuted instantiation: arc4.c:ato32 Unexecuted instantiation: asn.c:ato32 Unexecuted instantiation: blake2b.c:ato32 Unexecuted instantiation: blake2s.c:ato32 Unexecuted instantiation: camellia.c:ato32 Unexecuted instantiation: chacha.c:ato32 Unexecuted instantiation: chacha20_poly1305.c:ato32 Unexecuted instantiation: cmac.c:ato32 Unexecuted instantiation: coding.c:ato32 Unexecuted instantiation: curve25519.c:ato32 Unexecuted instantiation: curve448.c:ato32 Unexecuted instantiation: des3.c:ato32 Unexecuted instantiation: dh.c:ato32 Unexecuted instantiation: ecc.c:ato32 Unexecuted instantiation: eccsi.c:ato32 Unexecuted instantiation: ed25519.c:ato32 Unexecuted instantiation: ed448.c:ato32 Unexecuted instantiation: fe_448.c:ato32 Unexecuted instantiation: fe_operations.c:ato32 Unexecuted instantiation: ge_448.c:ato32 Unexecuted instantiation: ge_operations.c:ato32 Unexecuted instantiation: hash.c:ato32 Unexecuted instantiation: hmac.c:ato32 Unexecuted instantiation: kdf.c:ato32 Unexecuted instantiation: md2.c:ato32 Unexecuted instantiation: md4.c:ato32 Unexecuted instantiation: md5.c:ato32 Unexecuted instantiation: memory.c:ato32 Unexecuted instantiation: poly1305.c:ato32 Unexecuted instantiation: pwdbased.c:ato32 Unexecuted instantiation: random.c:ato32 Unexecuted instantiation: ripemd.c:ato32 Unexecuted instantiation: rsa.c:ato32 Unexecuted instantiation: sha.c:ato32 Unexecuted instantiation: sha256.c:ato32 Unexecuted instantiation: sha3.c:ato32 Unexecuted instantiation: sha512.c:ato32 Unexecuted instantiation: siphash.c:ato32 Unexecuted instantiation: sm2.c:ato32 Unexecuted instantiation: sm3.c:ato32 Unexecuted instantiation: sm4.c:ato32 Unexecuted instantiation: sp_int.c:ato32 Unexecuted instantiation: wc_encrypt.c:ato32 Unexecuted instantiation: wolfmath.c:ato32 Unexecuted instantiation: ssl.c:ato32 Unexecuted instantiation: tls13.c:ato32 Unexecuted instantiation: wc_mlkem.c:ato32 Unexecuted instantiation: wc_mlkem_poly.c:ato32 Unexecuted instantiation: keys.c:ato32 |
1098 | | |
1099 | | /* convert opaque to 32 bit integer. Interpret as little endian. */ |
1100 | | WC_MISC_STATIC WC_INLINE void ato32le(const byte* c, word32* wc_u32) |
1101 | 0 | { |
1102 | 0 | *wc_u32 = (word32)c[0] | |
1103 | 0 | ((word32)c[1] << 8) | |
1104 | 0 | ((word32)c[2] << 16) | |
1105 | 0 | ((word32)c[3] << 24); |
1106 | 0 | } Unexecuted instantiation: aes.c:ato32le Unexecuted instantiation: arc4.c:ato32le Unexecuted instantiation: asn.c:ato32le Unexecuted instantiation: blake2b.c:ato32le Unexecuted instantiation: blake2s.c:ato32le Unexecuted instantiation: camellia.c:ato32le Unexecuted instantiation: chacha.c:ato32le Unexecuted instantiation: chacha20_poly1305.c:ato32le Unexecuted instantiation: cmac.c:ato32le Unexecuted instantiation: coding.c:ato32le Unexecuted instantiation: curve25519.c:ato32le Unexecuted instantiation: curve448.c:ato32le Unexecuted instantiation: des3.c:ato32le Unexecuted instantiation: dh.c:ato32le Unexecuted instantiation: ecc.c:ato32le Unexecuted instantiation: eccsi.c:ato32le Unexecuted instantiation: ed25519.c:ato32le Unexecuted instantiation: ed448.c:ato32le Unexecuted instantiation: fe_448.c:ato32le Unexecuted instantiation: fe_operations.c:ato32le Unexecuted instantiation: ge_448.c:ato32le Unexecuted instantiation: ge_operations.c:ato32le Unexecuted instantiation: hash.c:ato32le Unexecuted instantiation: hmac.c:ato32le Unexecuted instantiation: kdf.c:ato32le Unexecuted instantiation: md2.c:ato32le Unexecuted instantiation: md4.c:ato32le Unexecuted instantiation: md5.c:ato32le Unexecuted instantiation: memory.c:ato32le Unexecuted instantiation: poly1305.c:ato32le Unexecuted instantiation: pwdbased.c:ato32le Unexecuted instantiation: random.c:ato32le Unexecuted instantiation: ripemd.c:ato32le Unexecuted instantiation: rsa.c:ato32le Unexecuted instantiation: sha.c:ato32le Unexecuted instantiation: sha256.c:ato32le Unexecuted instantiation: sha3.c:ato32le Unexecuted instantiation: sha512.c:ato32le Unexecuted instantiation: siphash.c:ato32le Unexecuted instantiation: sm2.c:ato32le Unexecuted instantiation: sm3.c:ato32le Unexecuted instantiation: sm4.c:ato32le Unexecuted instantiation: sp_int.c:ato32le Unexecuted instantiation: wc_encrypt.c:ato32le Unexecuted instantiation: wolfmath.c:ato32le Unexecuted instantiation: ssl.c:ato32le Unexecuted instantiation: tls.c:ato32le Unexecuted instantiation: tls13.c:ato32le Unexecuted instantiation: wc_mlkem.c:ato32le Unexecuted instantiation: wc_mlkem_poly.c:ato32le Unexecuted instantiation: internal.c:ato32le Unexecuted instantiation: keys.c:ato32le |
1107 | | |
1108 | | |
1109 | | WC_MISC_STATIC WC_INLINE word32 btoi(byte b) |
1110 | 132k | { |
1111 | 132k | return (word32)(b - 0x30); |
1112 | 132k | } Unexecuted instantiation: aes.c:btoi Unexecuted instantiation: arc4.c:btoi Line | Count | Source | 1110 | 132k | { | 1111 | 132k | return (word32)(b - 0x30); | 1112 | 132k | } |
Unexecuted instantiation: blake2b.c:btoi Unexecuted instantiation: blake2s.c:btoi Unexecuted instantiation: camellia.c:btoi Unexecuted instantiation: chacha.c:btoi Unexecuted instantiation: chacha20_poly1305.c:btoi Unexecuted instantiation: cmac.c:btoi Unexecuted instantiation: coding.c:btoi Unexecuted instantiation: curve25519.c:btoi Unexecuted instantiation: curve448.c:btoi Unexecuted instantiation: des3.c:btoi Unexecuted instantiation: dh.c:btoi Unexecuted instantiation: ecc.c:btoi Unexecuted instantiation: eccsi.c:btoi Unexecuted instantiation: ed25519.c:btoi Unexecuted instantiation: ed448.c:btoi Unexecuted instantiation: fe_448.c:btoi Unexecuted instantiation: fe_operations.c:btoi Unexecuted instantiation: ge_448.c:btoi Unexecuted instantiation: ge_operations.c:btoi Unexecuted instantiation: hash.c:btoi Unexecuted instantiation: hmac.c:btoi Unexecuted instantiation: kdf.c:btoi Unexecuted instantiation: md2.c:btoi Unexecuted instantiation: md4.c:btoi Unexecuted instantiation: md5.c:btoi Unexecuted instantiation: memory.c:btoi Unexecuted instantiation: poly1305.c:btoi Unexecuted instantiation: pwdbased.c:btoi Unexecuted instantiation: random.c:btoi Unexecuted instantiation: ripemd.c:btoi Unexecuted instantiation: rsa.c:btoi Unexecuted instantiation: sha.c:btoi Unexecuted instantiation: sha256.c:btoi Unexecuted instantiation: sha3.c:btoi Unexecuted instantiation: sha512.c:btoi Unexecuted instantiation: siphash.c:btoi Unexecuted instantiation: sm2.c:btoi Unexecuted instantiation: sm3.c:btoi Unexecuted instantiation: sm4.c:btoi Unexecuted instantiation: sp_int.c:btoi Unexecuted instantiation: wc_encrypt.c:btoi Unexecuted instantiation: wolfmath.c:btoi Unexecuted instantiation: ssl.c:btoi Unexecuted instantiation: tls.c:btoi Unexecuted instantiation: tls13.c:btoi Unexecuted instantiation: wc_mlkem.c:btoi Unexecuted instantiation: wc_mlkem_poly.c:btoi Unexecuted instantiation: internal.c:btoi Unexecuted instantiation: keys.c:btoi |
1113 | | #endif |
1114 | | |
1115 | | WC_MISC_STATIC WC_INLINE signed char HexCharToByte(char ch) |
1116 | 19.0M | { |
1117 | 19.0M | signed char ret = (signed char)ch; |
1118 | 19.0M | if (ret >= '0' && ret <= '9') |
1119 | 9.23M | ret = (signed char)(ret - '0'); |
1120 | 9.77M | else if (ret >= 'A' && ret <= 'F') |
1121 | 7.00M | ret = (signed char)(ret - ('A' - 10)); |
1122 | 2.76M | else if (ret >= 'a' && ret <= 'f') |
1123 | 2.76M | ret = (signed char)(ret - ('a' - 10)); |
1124 | 953 | else |
1125 | 953 | ret = -1; /* error case - return code must be signed */ |
1126 | 19.0M | return ret; |
1127 | 19.0M | } Unexecuted instantiation: aes.c:HexCharToByte Unexecuted instantiation: arc4.c:HexCharToByte Unexecuted instantiation: asn.c:HexCharToByte Unexecuted instantiation: blake2b.c:HexCharToByte Unexecuted instantiation: blake2s.c:HexCharToByte Unexecuted instantiation: camellia.c:HexCharToByte Unexecuted instantiation: chacha.c:HexCharToByte Unexecuted instantiation: chacha20_poly1305.c:HexCharToByte Unexecuted instantiation: cmac.c:HexCharToByte Unexecuted instantiation: coding.c:HexCharToByte Unexecuted instantiation: curve25519.c:HexCharToByte Unexecuted instantiation: curve448.c:HexCharToByte Unexecuted instantiation: des3.c:HexCharToByte Unexecuted instantiation: dh.c:HexCharToByte Unexecuted instantiation: ecc.c:HexCharToByte Unexecuted instantiation: eccsi.c:HexCharToByte Unexecuted instantiation: ed25519.c:HexCharToByte Unexecuted instantiation: ed448.c:HexCharToByte Unexecuted instantiation: fe_448.c:HexCharToByte Unexecuted instantiation: fe_operations.c:HexCharToByte Unexecuted instantiation: ge_448.c:HexCharToByte Unexecuted instantiation: ge_operations.c:HexCharToByte Unexecuted instantiation: hash.c:HexCharToByte Unexecuted instantiation: hmac.c:HexCharToByte Unexecuted instantiation: kdf.c:HexCharToByte Unexecuted instantiation: md2.c:HexCharToByte Unexecuted instantiation: md4.c:HexCharToByte Unexecuted instantiation: md5.c:HexCharToByte Unexecuted instantiation: memory.c:HexCharToByte Unexecuted instantiation: poly1305.c:HexCharToByte Unexecuted instantiation: pwdbased.c:HexCharToByte Unexecuted instantiation: random.c:HexCharToByte Unexecuted instantiation: ripemd.c:HexCharToByte Unexecuted instantiation: rsa.c:HexCharToByte Unexecuted instantiation: sha.c:HexCharToByte Unexecuted instantiation: sha256.c:HexCharToByte Unexecuted instantiation: sha3.c:HexCharToByte Unexecuted instantiation: sha512.c:HexCharToByte Unexecuted instantiation: siphash.c:HexCharToByte Unexecuted instantiation: sm2.c:HexCharToByte Unexecuted instantiation: sm3.c:HexCharToByte Unexecuted instantiation: sm4.c:HexCharToByte Line | Count | Source | 1116 | 19.0M | { | 1117 | 19.0M | signed char ret = (signed char)ch; | 1118 | 19.0M | if (ret >= '0' && ret <= '9') | 1119 | 9.23M | ret = (signed char)(ret - '0'); | 1120 | 9.77M | else if (ret >= 'A' && ret <= 'F') | 1121 | 7.00M | ret = (signed char)(ret - ('A' - 10)); | 1122 | 2.76M | else if (ret >= 'a' && ret <= 'f') | 1123 | 2.76M | ret = (signed char)(ret - ('a' - 10)); | 1124 | 953 | else | 1125 | 953 | ret = -1; /* error case - return code must be signed */ | 1126 | 19.0M | return ret; | 1127 | 19.0M | } |
Unexecuted instantiation: wc_encrypt.c:HexCharToByte Unexecuted instantiation: wolfmath.c:HexCharToByte Unexecuted instantiation: ssl.c:HexCharToByte Unexecuted instantiation: tls.c:HexCharToByte Unexecuted instantiation: tls13.c:HexCharToByte Unexecuted instantiation: wc_mlkem.c:HexCharToByte Unexecuted instantiation: wc_mlkem_poly.c:HexCharToByte Unexecuted instantiation: internal.c:HexCharToByte Unexecuted instantiation: keys.c:HexCharToByte |
1128 | | |
1129 | | WC_MISC_STATIC WC_INLINE char ByteToHex(byte in) |
1130 | 2.50M | { |
1131 | 2.50M | static ALIGN64 const char kHexChar[] = { |
1132 | 2.50M | '0', '1', '2', '3', '4', '5', '6', '7', |
1133 | 2.50M | '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' |
1134 | 2.50M | }; |
1135 | 2.50M | return (char)(kHexChar[in & 0xF]); |
1136 | 2.50M | } Unexecuted instantiation: aes.c:ByteToHex Unexecuted instantiation: arc4.c:ByteToHex Unexecuted instantiation: blake2b.c:ByteToHex Unexecuted instantiation: blake2s.c:ByteToHex Unexecuted instantiation: camellia.c:ByteToHex Unexecuted instantiation: chacha.c:ByteToHex Unexecuted instantiation: chacha20_poly1305.c:ByteToHex Unexecuted instantiation: cmac.c:ByteToHex Unexecuted instantiation: coding.c:ByteToHex Unexecuted instantiation: curve25519.c:ByteToHex Unexecuted instantiation: curve448.c:ByteToHex Unexecuted instantiation: des3.c:ByteToHex Unexecuted instantiation: dh.c:ByteToHex Unexecuted instantiation: ecc.c:ByteToHex Unexecuted instantiation: eccsi.c:ByteToHex Unexecuted instantiation: ed25519.c:ByteToHex Unexecuted instantiation: ed448.c:ByteToHex Unexecuted instantiation: fe_448.c:ByteToHex Unexecuted instantiation: fe_operations.c:ByteToHex Unexecuted instantiation: ge_448.c:ByteToHex Unexecuted instantiation: ge_operations.c:ByteToHex Unexecuted instantiation: hash.c:ByteToHex Unexecuted instantiation: hmac.c:ByteToHex Unexecuted instantiation: kdf.c:ByteToHex Unexecuted instantiation: md2.c:ByteToHex Unexecuted instantiation: md4.c:ByteToHex Unexecuted instantiation: md5.c:ByteToHex Unexecuted instantiation: memory.c:ByteToHex Unexecuted instantiation: poly1305.c:ByteToHex Unexecuted instantiation: pwdbased.c:ByteToHex Unexecuted instantiation: random.c:ByteToHex Unexecuted instantiation: ripemd.c:ByteToHex Unexecuted instantiation: rsa.c:ByteToHex Unexecuted instantiation: sha.c:ByteToHex Unexecuted instantiation: sha256.c:ByteToHex Unexecuted instantiation: sha3.c:ByteToHex Unexecuted instantiation: sha512.c:ByteToHex Unexecuted instantiation: siphash.c:ByteToHex Unexecuted instantiation: sm2.c:ByteToHex Unexecuted instantiation: sm3.c:ByteToHex Unexecuted instantiation: sm4.c:ByteToHex Line | Count | Source | 1130 | 2.50M | { | 1131 | 2.50M | static ALIGN64 const char kHexChar[] = { | 1132 | 2.50M | '0', '1', '2', '3', '4', '5', '6', '7', | 1133 | 2.50M | '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' | 1134 | 2.50M | }; | 1135 | 2.50M | return (char)(kHexChar[in & 0xF]); | 1136 | 2.50M | } |
Unexecuted instantiation: wc_encrypt.c:ByteToHex Unexecuted instantiation: wolfmath.c:ByteToHex Unexecuted instantiation: ssl.c:ByteToHex Unexecuted instantiation: tls.c:ByteToHex Unexecuted instantiation: tls13.c:ByteToHex Unexecuted instantiation: wc_mlkem.c:ByteToHex Unexecuted instantiation: wc_mlkem_poly.c:ByteToHex Unexecuted instantiation: internal.c:ByteToHex Unexecuted instantiation: keys.c:ByteToHex |
1137 | | |
1138 | | WC_MISC_STATIC WC_INLINE int ByteToHexStr(byte in, char* out) |
1139 | 0 | { |
1140 | 0 | if (out == NULL) |
1141 | 0 | return -1; |
1142 | 0 |
|
1143 | 0 | out[0] = ByteToHex((byte)(in >> 4)); |
1144 | 0 | out[1] = ByteToHex((byte)(in & 0xf)); |
1145 | 0 | return 0; |
1146 | 0 | } Unexecuted instantiation: aes.c:ByteToHexStr Unexecuted instantiation: arc4.c:ByteToHexStr Unexecuted instantiation: blake2b.c:ByteToHexStr Unexecuted instantiation: blake2s.c:ByteToHexStr Unexecuted instantiation: camellia.c:ByteToHexStr Unexecuted instantiation: chacha.c:ByteToHexStr Unexecuted instantiation: chacha20_poly1305.c:ByteToHexStr Unexecuted instantiation: cmac.c:ByteToHexStr Unexecuted instantiation: coding.c:ByteToHexStr Unexecuted instantiation: curve25519.c:ByteToHexStr Unexecuted instantiation: curve448.c:ByteToHexStr Unexecuted instantiation: des3.c:ByteToHexStr Unexecuted instantiation: dh.c:ByteToHexStr Unexecuted instantiation: ecc.c:ByteToHexStr Unexecuted instantiation: eccsi.c:ByteToHexStr Unexecuted instantiation: ed25519.c:ByteToHexStr Unexecuted instantiation: ed448.c:ByteToHexStr Unexecuted instantiation: fe_448.c:ByteToHexStr Unexecuted instantiation: fe_operations.c:ByteToHexStr Unexecuted instantiation: ge_448.c:ByteToHexStr Unexecuted instantiation: ge_operations.c:ByteToHexStr Unexecuted instantiation: hash.c:ByteToHexStr Unexecuted instantiation: hmac.c:ByteToHexStr Unexecuted instantiation: kdf.c:ByteToHexStr Unexecuted instantiation: md2.c:ByteToHexStr Unexecuted instantiation: md4.c:ByteToHexStr Unexecuted instantiation: md5.c:ByteToHexStr Unexecuted instantiation: memory.c:ByteToHexStr Unexecuted instantiation: poly1305.c:ByteToHexStr Unexecuted instantiation: pwdbased.c:ByteToHexStr Unexecuted instantiation: random.c:ByteToHexStr Unexecuted instantiation: ripemd.c:ByteToHexStr Unexecuted instantiation: rsa.c:ByteToHexStr Unexecuted instantiation: sha.c:ByteToHexStr Unexecuted instantiation: sha256.c:ByteToHexStr Unexecuted instantiation: sha3.c:ByteToHexStr Unexecuted instantiation: sha512.c:ByteToHexStr Unexecuted instantiation: siphash.c:ByteToHexStr Unexecuted instantiation: sm2.c:ByteToHexStr Unexecuted instantiation: sm3.c:ByteToHexStr Unexecuted instantiation: sm4.c:ByteToHexStr Unexecuted instantiation: sp_int.c:ByteToHexStr Unexecuted instantiation: wc_encrypt.c:ByteToHexStr Unexecuted instantiation: wolfmath.c:ByteToHexStr Unexecuted instantiation: ssl.c:ByteToHexStr Unexecuted instantiation: tls.c:ByteToHexStr Unexecuted instantiation: tls13.c:ByteToHexStr Unexecuted instantiation: wc_mlkem.c:ByteToHexStr Unexecuted instantiation: wc_mlkem_poly.c:ByteToHexStr Unexecuted instantiation: internal.c:ByteToHexStr Unexecuted instantiation: keys.c:ByteToHexStr |
1147 | | |
1148 | | WC_MISC_STATIC WC_INLINE int CharIsWhiteSpace(char ch) |
1149 | 260 | { |
1150 | 260 | #ifndef WOLFSSL_NO_CT_OPS |
1151 | 260 | return (ctMaskEq(ch, ' ') | |
1152 | 260 | ctMaskEq(ch, '\t') | |
1153 | 260 | ctMaskEq(ch, '\n')) & 1; |
1154 | | #else /* WOLFSSL_NO_CT_OPS */ |
1155 | | switch (ch) { |
1156 | | case ' ': |
1157 | | case '\t': |
1158 | | case '\n': |
1159 | | return 1; |
1160 | | default: |
1161 | | return 0; |
1162 | | } |
1163 | | #endif /* WOLFSSL_NO_CT_OPS */ |
1164 | 260 | } Unexecuted instantiation: aes.c:CharIsWhiteSpace Unexecuted instantiation: arc4.c:CharIsWhiteSpace Unexecuted instantiation: asn.c:CharIsWhiteSpace Unexecuted instantiation: blake2b.c:CharIsWhiteSpace Unexecuted instantiation: blake2s.c:CharIsWhiteSpace Unexecuted instantiation: camellia.c:CharIsWhiteSpace Unexecuted instantiation: chacha.c:CharIsWhiteSpace Unexecuted instantiation: chacha20_poly1305.c:CharIsWhiteSpace Unexecuted instantiation: cmac.c:CharIsWhiteSpace Unexecuted instantiation: coding.c:CharIsWhiteSpace Unexecuted instantiation: curve25519.c:CharIsWhiteSpace Unexecuted instantiation: curve448.c:CharIsWhiteSpace Unexecuted instantiation: des3.c:CharIsWhiteSpace Unexecuted instantiation: dh.c:CharIsWhiteSpace Unexecuted instantiation: ecc.c:CharIsWhiteSpace Unexecuted instantiation: eccsi.c:CharIsWhiteSpace Unexecuted instantiation: ed25519.c:CharIsWhiteSpace Unexecuted instantiation: ed448.c:CharIsWhiteSpace Unexecuted instantiation: fe_448.c:CharIsWhiteSpace Unexecuted instantiation: fe_operations.c:CharIsWhiteSpace Unexecuted instantiation: ge_448.c:CharIsWhiteSpace Unexecuted instantiation: ge_operations.c:CharIsWhiteSpace Unexecuted instantiation: hash.c:CharIsWhiteSpace Unexecuted instantiation: hmac.c:CharIsWhiteSpace Unexecuted instantiation: kdf.c:CharIsWhiteSpace Unexecuted instantiation: md2.c:CharIsWhiteSpace Unexecuted instantiation: md4.c:CharIsWhiteSpace Unexecuted instantiation: md5.c:CharIsWhiteSpace Unexecuted instantiation: memory.c:CharIsWhiteSpace Unexecuted instantiation: poly1305.c:CharIsWhiteSpace Unexecuted instantiation: pwdbased.c:CharIsWhiteSpace Unexecuted instantiation: random.c:CharIsWhiteSpace Unexecuted instantiation: ripemd.c:CharIsWhiteSpace Unexecuted instantiation: rsa.c:CharIsWhiteSpace Unexecuted instantiation: sha.c:CharIsWhiteSpace Unexecuted instantiation: sha256.c:CharIsWhiteSpace Unexecuted instantiation: sha3.c:CharIsWhiteSpace Unexecuted instantiation: sha512.c:CharIsWhiteSpace Unexecuted instantiation: siphash.c:CharIsWhiteSpace Unexecuted instantiation: sm2.c:CharIsWhiteSpace Unexecuted instantiation: sm3.c:CharIsWhiteSpace Unexecuted instantiation: sm4.c:CharIsWhiteSpace sp_int.c:CharIsWhiteSpace Line | Count | Source | 1149 | 260 | { | 1150 | 260 | #ifndef WOLFSSL_NO_CT_OPS | 1151 | 260 | return (ctMaskEq(ch, ' ') | | 1152 | 260 | ctMaskEq(ch, '\t') | | 1153 | 260 | ctMaskEq(ch, '\n')) & 1; | 1154 | | #else /* WOLFSSL_NO_CT_OPS */ | 1155 | | switch (ch) { | 1156 | | case ' ': | 1157 | | case '\t': | 1158 | | case '\n': | 1159 | | return 1; | 1160 | | default: | 1161 | | return 0; | 1162 | | } | 1163 | | #endif /* WOLFSSL_NO_CT_OPS */ | 1164 | 260 | } |
Unexecuted instantiation: wc_encrypt.c:CharIsWhiteSpace Unexecuted instantiation: wolfmath.c:CharIsWhiteSpace Unexecuted instantiation: ssl.c:CharIsWhiteSpace Unexecuted instantiation: tls.c:CharIsWhiteSpace Unexecuted instantiation: tls13.c:CharIsWhiteSpace Unexecuted instantiation: wc_mlkem.c:CharIsWhiteSpace Unexecuted instantiation: wc_mlkem_poly.c:CharIsWhiteSpace Unexecuted instantiation: internal.c:CharIsWhiteSpace Unexecuted instantiation: keys.c:CharIsWhiteSpace |
1165 | | |
1166 | | #if defined(WOLFSSL_W64_WRAPPER) |
1167 | | #if defined(WORD64_AVAILABLE) && !defined(WOLFSSL_W64_WRAPPER_TEST) |
1168 | 0 | WC_MISC_STATIC WC_INLINE void w64Increment(w64wrapper *n) { |
1169 | 0 | n->n++; |
1170 | 0 | } Unexecuted instantiation: aes.c:w64Increment Unexecuted instantiation: arc4.c:w64Increment Unexecuted instantiation: asn.c:w64Increment Unexecuted instantiation: blake2b.c:w64Increment Unexecuted instantiation: blake2s.c:w64Increment Unexecuted instantiation: camellia.c:w64Increment Unexecuted instantiation: chacha.c:w64Increment Unexecuted instantiation: chacha20_poly1305.c:w64Increment Unexecuted instantiation: cmac.c:w64Increment Unexecuted instantiation: coding.c:w64Increment Unexecuted instantiation: curve25519.c:w64Increment Unexecuted instantiation: curve448.c:w64Increment Unexecuted instantiation: des3.c:w64Increment Unexecuted instantiation: dh.c:w64Increment Unexecuted instantiation: ecc.c:w64Increment Unexecuted instantiation: eccsi.c:w64Increment Unexecuted instantiation: ed25519.c:w64Increment Unexecuted instantiation: ed448.c:w64Increment Unexecuted instantiation: fe_448.c:w64Increment Unexecuted instantiation: fe_operations.c:w64Increment Unexecuted instantiation: ge_448.c:w64Increment Unexecuted instantiation: ge_operations.c:w64Increment Unexecuted instantiation: hash.c:w64Increment Unexecuted instantiation: hmac.c:w64Increment Unexecuted instantiation: kdf.c:w64Increment Unexecuted instantiation: md2.c:w64Increment Unexecuted instantiation: md4.c:w64Increment Unexecuted instantiation: md5.c:w64Increment Unexecuted instantiation: memory.c:w64Increment Unexecuted instantiation: poly1305.c:w64Increment Unexecuted instantiation: pwdbased.c:w64Increment Unexecuted instantiation: random.c:w64Increment Unexecuted instantiation: ripemd.c:w64Increment Unexecuted instantiation: rsa.c:w64Increment Unexecuted instantiation: sha.c:w64Increment Unexecuted instantiation: sha256.c:w64Increment Unexecuted instantiation: sha3.c:w64Increment Unexecuted instantiation: sha512.c:w64Increment Unexecuted instantiation: siphash.c:w64Increment Unexecuted instantiation: sm2.c:w64Increment Unexecuted instantiation: sm3.c:w64Increment Unexecuted instantiation: sm4.c:w64Increment Unexecuted instantiation: sp_int.c:w64Increment Unexecuted instantiation: wc_encrypt.c:w64Increment Unexecuted instantiation: wolfmath.c:w64Increment Unexecuted instantiation: ssl.c:w64Increment Unexecuted instantiation: tls.c:w64Increment Unexecuted instantiation: tls13.c:w64Increment Unexecuted instantiation: wc_mlkem.c:w64Increment Unexecuted instantiation: wc_mlkem_poly.c:w64Increment Unexecuted instantiation: keys.c:w64Increment |
1171 | | |
1172 | 0 | WC_MISC_STATIC WC_INLINE void w64Decrement(w64wrapper *n) { |
1173 | 0 | n->n--; |
1174 | 0 | } Unexecuted instantiation: aes.c:w64Decrement Unexecuted instantiation: arc4.c:w64Decrement Unexecuted instantiation: asn.c:w64Decrement Unexecuted instantiation: blake2b.c:w64Decrement Unexecuted instantiation: blake2s.c:w64Decrement Unexecuted instantiation: camellia.c:w64Decrement Unexecuted instantiation: chacha.c:w64Decrement Unexecuted instantiation: chacha20_poly1305.c:w64Decrement Unexecuted instantiation: cmac.c:w64Decrement Unexecuted instantiation: coding.c:w64Decrement Unexecuted instantiation: curve25519.c:w64Decrement Unexecuted instantiation: curve448.c:w64Decrement Unexecuted instantiation: des3.c:w64Decrement Unexecuted instantiation: dh.c:w64Decrement Unexecuted instantiation: ecc.c:w64Decrement Unexecuted instantiation: eccsi.c:w64Decrement Unexecuted instantiation: ed25519.c:w64Decrement Unexecuted instantiation: ed448.c:w64Decrement Unexecuted instantiation: fe_448.c:w64Decrement Unexecuted instantiation: fe_operations.c:w64Decrement Unexecuted instantiation: ge_448.c:w64Decrement Unexecuted instantiation: ge_operations.c:w64Decrement Unexecuted instantiation: hash.c:w64Decrement Unexecuted instantiation: hmac.c:w64Decrement Unexecuted instantiation: kdf.c:w64Decrement Unexecuted instantiation: md2.c:w64Decrement Unexecuted instantiation: md4.c:w64Decrement Unexecuted instantiation: md5.c:w64Decrement Unexecuted instantiation: memory.c:w64Decrement Unexecuted instantiation: poly1305.c:w64Decrement Unexecuted instantiation: pwdbased.c:w64Decrement Unexecuted instantiation: random.c:w64Decrement Unexecuted instantiation: ripemd.c:w64Decrement Unexecuted instantiation: rsa.c:w64Decrement Unexecuted instantiation: sha.c:w64Decrement Unexecuted instantiation: sha256.c:w64Decrement Unexecuted instantiation: sha3.c:w64Decrement Unexecuted instantiation: sha512.c:w64Decrement Unexecuted instantiation: siphash.c:w64Decrement Unexecuted instantiation: sm2.c:w64Decrement Unexecuted instantiation: sm3.c:w64Decrement Unexecuted instantiation: sm4.c:w64Decrement Unexecuted instantiation: sp_int.c:w64Decrement Unexecuted instantiation: wc_encrypt.c:w64Decrement Unexecuted instantiation: wolfmath.c:w64Decrement Unexecuted instantiation: ssl.c:w64Decrement Unexecuted instantiation: tls.c:w64Decrement Unexecuted instantiation: tls13.c:w64Decrement Unexecuted instantiation: wc_mlkem.c:w64Decrement Unexecuted instantiation: wc_mlkem_poly.c:w64Decrement Unexecuted instantiation: keys.c:w64Decrement |
1175 | | |
1176 | 0 | WC_MISC_STATIC WC_INLINE byte w64Equal(w64wrapper a, w64wrapper b) { |
1177 | 0 | return (a.n == b.n); |
1178 | 0 | } Unexecuted instantiation: aes.c:w64Equal Unexecuted instantiation: arc4.c:w64Equal Unexecuted instantiation: asn.c:w64Equal Unexecuted instantiation: blake2b.c:w64Equal Unexecuted instantiation: blake2s.c:w64Equal Unexecuted instantiation: camellia.c:w64Equal Unexecuted instantiation: chacha.c:w64Equal Unexecuted instantiation: chacha20_poly1305.c:w64Equal Unexecuted instantiation: cmac.c:w64Equal Unexecuted instantiation: coding.c:w64Equal Unexecuted instantiation: curve25519.c:w64Equal Unexecuted instantiation: curve448.c:w64Equal Unexecuted instantiation: des3.c:w64Equal Unexecuted instantiation: dh.c:w64Equal Unexecuted instantiation: ecc.c:w64Equal Unexecuted instantiation: eccsi.c:w64Equal Unexecuted instantiation: ed25519.c:w64Equal Unexecuted instantiation: ed448.c:w64Equal Unexecuted instantiation: fe_448.c:w64Equal Unexecuted instantiation: fe_operations.c:w64Equal Unexecuted instantiation: ge_448.c:w64Equal Unexecuted instantiation: ge_operations.c:w64Equal Unexecuted instantiation: hash.c:w64Equal Unexecuted instantiation: hmac.c:w64Equal Unexecuted instantiation: kdf.c:w64Equal Unexecuted instantiation: md2.c:w64Equal Unexecuted instantiation: md4.c:w64Equal Unexecuted instantiation: md5.c:w64Equal Unexecuted instantiation: memory.c:w64Equal Unexecuted instantiation: poly1305.c:w64Equal Unexecuted instantiation: pwdbased.c:w64Equal Unexecuted instantiation: random.c:w64Equal Unexecuted instantiation: ripemd.c:w64Equal Unexecuted instantiation: rsa.c:w64Equal Unexecuted instantiation: sha.c:w64Equal Unexecuted instantiation: sha256.c:w64Equal Unexecuted instantiation: sha3.c:w64Equal Unexecuted instantiation: sha512.c:w64Equal Unexecuted instantiation: siphash.c:w64Equal Unexecuted instantiation: sm2.c:w64Equal Unexecuted instantiation: sm3.c:w64Equal Unexecuted instantiation: sm4.c:w64Equal Unexecuted instantiation: sp_int.c:w64Equal Unexecuted instantiation: wc_encrypt.c:w64Equal Unexecuted instantiation: wolfmath.c:w64Equal Unexecuted instantiation: ssl.c:w64Equal Unexecuted instantiation: tls.c:w64Equal Unexecuted instantiation: tls13.c:w64Equal Unexecuted instantiation: wc_mlkem.c:w64Equal Unexecuted instantiation: wc_mlkem_poly.c:w64Equal Unexecuted instantiation: keys.c:w64Equal |
1179 | | |
1180 | 0 | WC_MISC_STATIC WC_INLINE word32 w64GetLow32(w64wrapper n) { |
1181 | 0 | return (word32)n.n; |
1182 | 0 | } Unexecuted instantiation: aes.c:w64GetLow32 Unexecuted instantiation: arc4.c:w64GetLow32 Unexecuted instantiation: asn.c:w64GetLow32 Unexecuted instantiation: blake2b.c:w64GetLow32 Unexecuted instantiation: blake2s.c:w64GetLow32 Unexecuted instantiation: camellia.c:w64GetLow32 Unexecuted instantiation: chacha.c:w64GetLow32 Unexecuted instantiation: chacha20_poly1305.c:w64GetLow32 Unexecuted instantiation: cmac.c:w64GetLow32 Unexecuted instantiation: coding.c:w64GetLow32 Unexecuted instantiation: curve25519.c:w64GetLow32 Unexecuted instantiation: curve448.c:w64GetLow32 Unexecuted instantiation: des3.c:w64GetLow32 Unexecuted instantiation: dh.c:w64GetLow32 Unexecuted instantiation: ecc.c:w64GetLow32 Unexecuted instantiation: eccsi.c:w64GetLow32 Unexecuted instantiation: ed25519.c:w64GetLow32 Unexecuted instantiation: ed448.c:w64GetLow32 Unexecuted instantiation: fe_448.c:w64GetLow32 Unexecuted instantiation: fe_operations.c:w64GetLow32 Unexecuted instantiation: ge_448.c:w64GetLow32 Unexecuted instantiation: ge_operations.c:w64GetLow32 Unexecuted instantiation: hash.c:w64GetLow32 Unexecuted instantiation: hmac.c:w64GetLow32 Unexecuted instantiation: kdf.c:w64GetLow32 Unexecuted instantiation: md2.c:w64GetLow32 Unexecuted instantiation: md4.c:w64GetLow32 Unexecuted instantiation: md5.c:w64GetLow32 Unexecuted instantiation: memory.c:w64GetLow32 Unexecuted instantiation: poly1305.c:w64GetLow32 Unexecuted instantiation: pwdbased.c:w64GetLow32 Unexecuted instantiation: random.c:w64GetLow32 Unexecuted instantiation: ripemd.c:w64GetLow32 Unexecuted instantiation: rsa.c:w64GetLow32 Unexecuted instantiation: sha.c:w64GetLow32 Unexecuted instantiation: sha256.c:w64GetLow32 Unexecuted instantiation: sha3.c:w64GetLow32 Unexecuted instantiation: sha512.c:w64GetLow32 Unexecuted instantiation: siphash.c:w64GetLow32 Unexecuted instantiation: sm2.c:w64GetLow32 Unexecuted instantiation: sm3.c:w64GetLow32 Unexecuted instantiation: sm4.c:w64GetLow32 Unexecuted instantiation: sp_int.c:w64GetLow32 Unexecuted instantiation: wc_encrypt.c:w64GetLow32 Unexecuted instantiation: wolfmath.c:w64GetLow32 Unexecuted instantiation: ssl.c:w64GetLow32 Unexecuted instantiation: tls.c:w64GetLow32 Unexecuted instantiation: tls13.c:w64GetLow32 Unexecuted instantiation: wc_mlkem.c:w64GetLow32 Unexecuted instantiation: wc_mlkem_poly.c:w64GetLow32 Unexecuted instantiation: keys.c:w64GetLow32 |
1183 | | |
1184 | 0 | WC_MISC_STATIC WC_INLINE word32 w64GetHigh32(w64wrapper n) { |
1185 | 0 | return (word32)(n.n >> 32); |
1186 | 0 | } Unexecuted instantiation: aes.c:w64GetHigh32 Unexecuted instantiation: arc4.c:w64GetHigh32 Unexecuted instantiation: asn.c:w64GetHigh32 Unexecuted instantiation: blake2b.c:w64GetHigh32 Unexecuted instantiation: blake2s.c:w64GetHigh32 Unexecuted instantiation: camellia.c:w64GetHigh32 Unexecuted instantiation: chacha.c:w64GetHigh32 Unexecuted instantiation: chacha20_poly1305.c:w64GetHigh32 Unexecuted instantiation: cmac.c:w64GetHigh32 Unexecuted instantiation: coding.c:w64GetHigh32 Unexecuted instantiation: curve25519.c:w64GetHigh32 Unexecuted instantiation: curve448.c:w64GetHigh32 Unexecuted instantiation: des3.c:w64GetHigh32 Unexecuted instantiation: dh.c:w64GetHigh32 Unexecuted instantiation: ecc.c:w64GetHigh32 Unexecuted instantiation: eccsi.c:w64GetHigh32 Unexecuted instantiation: ed25519.c:w64GetHigh32 Unexecuted instantiation: ed448.c:w64GetHigh32 Unexecuted instantiation: fe_448.c:w64GetHigh32 Unexecuted instantiation: fe_operations.c:w64GetHigh32 Unexecuted instantiation: ge_448.c:w64GetHigh32 Unexecuted instantiation: ge_operations.c:w64GetHigh32 Unexecuted instantiation: hash.c:w64GetHigh32 Unexecuted instantiation: hmac.c:w64GetHigh32 Unexecuted instantiation: kdf.c:w64GetHigh32 Unexecuted instantiation: md2.c:w64GetHigh32 Unexecuted instantiation: md4.c:w64GetHigh32 Unexecuted instantiation: md5.c:w64GetHigh32 Unexecuted instantiation: memory.c:w64GetHigh32 Unexecuted instantiation: poly1305.c:w64GetHigh32 Unexecuted instantiation: pwdbased.c:w64GetHigh32 Unexecuted instantiation: random.c:w64GetHigh32 Unexecuted instantiation: ripemd.c:w64GetHigh32 Unexecuted instantiation: rsa.c:w64GetHigh32 Unexecuted instantiation: sha.c:w64GetHigh32 Unexecuted instantiation: sha256.c:w64GetHigh32 Unexecuted instantiation: sha3.c:w64GetHigh32 Unexecuted instantiation: sha512.c:w64GetHigh32 Unexecuted instantiation: siphash.c:w64GetHigh32 Unexecuted instantiation: sm2.c:w64GetHigh32 Unexecuted instantiation: sm3.c:w64GetHigh32 Unexecuted instantiation: sm4.c:w64GetHigh32 Unexecuted instantiation: sp_int.c:w64GetHigh32 Unexecuted instantiation: wc_encrypt.c:w64GetHigh32 Unexecuted instantiation: wolfmath.c:w64GetHigh32 Unexecuted instantiation: ssl.c:w64GetHigh32 Unexecuted instantiation: tls.c:w64GetHigh32 Unexecuted instantiation: tls13.c:w64GetHigh32 Unexecuted instantiation: wc_mlkem.c:w64GetHigh32 Unexecuted instantiation: wc_mlkem_poly.c:w64GetHigh32 Unexecuted instantiation: keys.c:w64GetHigh32 |
1187 | | |
1188 | 0 | WC_MISC_STATIC WC_INLINE void w64SetLow32(w64wrapper *n, word32 low) { |
1189 | 0 | n->n = (n->n & (~(word64)(0xffffffff))) | low; |
1190 | 0 | } Unexecuted instantiation: aes.c:w64SetLow32 Unexecuted instantiation: arc4.c:w64SetLow32 Unexecuted instantiation: asn.c:w64SetLow32 Unexecuted instantiation: blake2b.c:w64SetLow32 Unexecuted instantiation: blake2s.c:w64SetLow32 Unexecuted instantiation: camellia.c:w64SetLow32 Unexecuted instantiation: chacha.c:w64SetLow32 Unexecuted instantiation: chacha20_poly1305.c:w64SetLow32 Unexecuted instantiation: cmac.c:w64SetLow32 Unexecuted instantiation: coding.c:w64SetLow32 Unexecuted instantiation: curve25519.c:w64SetLow32 Unexecuted instantiation: curve448.c:w64SetLow32 Unexecuted instantiation: des3.c:w64SetLow32 Unexecuted instantiation: dh.c:w64SetLow32 Unexecuted instantiation: ecc.c:w64SetLow32 Unexecuted instantiation: eccsi.c:w64SetLow32 Unexecuted instantiation: ed25519.c:w64SetLow32 Unexecuted instantiation: ed448.c:w64SetLow32 Unexecuted instantiation: fe_448.c:w64SetLow32 Unexecuted instantiation: fe_operations.c:w64SetLow32 Unexecuted instantiation: ge_448.c:w64SetLow32 Unexecuted instantiation: ge_operations.c:w64SetLow32 Unexecuted instantiation: hash.c:w64SetLow32 Unexecuted instantiation: hmac.c:w64SetLow32 Unexecuted instantiation: kdf.c:w64SetLow32 Unexecuted instantiation: md2.c:w64SetLow32 Unexecuted instantiation: md4.c:w64SetLow32 Unexecuted instantiation: md5.c:w64SetLow32 Unexecuted instantiation: memory.c:w64SetLow32 Unexecuted instantiation: poly1305.c:w64SetLow32 Unexecuted instantiation: pwdbased.c:w64SetLow32 Unexecuted instantiation: random.c:w64SetLow32 Unexecuted instantiation: ripemd.c:w64SetLow32 Unexecuted instantiation: rsa.c:w64SetLow32 Unexecuted instantiation: sha.c:w64SetLow32 Unexecuted instantiation: sha256.c:w64SetLow32 Unexecuted instantiation: sha3.c:w64SetLow32 Unexecuted instantiation: sha512.c:w64SetLow32 Unexecuted instantiation: siphash.c:w64SetLow32 Unexecuted instantiation: sm2.c:w64SetLow32 Unexecuted instantiation: sm3.c:w64SetLow32 Unexecuted instantiation: sm4.c:w64SetLow32 Unexecuted instantiation: sp_int.c:w64SetLow32 Unexecuted instantiation: wc_encrypt.c:w64SetLow32 Unexecuted instantiation: wolfmath.c:w64SetLow32 Unexecuted instantiation: ssl.c:w64SetLow32 Unexecuted instantiation: tls.c:w64SetLow32 Unexecuted instantiation: tls13.c:w64SetLow32 Unexecuted instantiation: wc_mlkem.c:w64SetLow32 Unexecuted instantiation: wc_mlkem_poly.c:w64SetLow32 Unexecuted instantiation: internal.c:w64SetLow32 Unexecuted instantiation: keys.c:w64SetLow32 |
1191 | | |
1192 | | WC_MISC_STATIC WC_INLINE w64wrapper w64Add32(w64wrapper a, word32 b, byte *wrap) |
1193 | 0 | { |
1194 | 0 | a.n += b; |
1195 | 0 | if (a.n < b && wrap != NULL) |
1196 | 0 | *wrap = 1; |
1197 | 0 |
|
1198 | 0 | return a; |
1199 | 0 | } Unexecuted instantiation: aes.c:w64Add32 Unexecuted instantiation: arc4.c:w64Add32 Unexecuted instantiation: asn.c:w64Add32 Unexecuted instantiation: blake2b.c:w64Add32 Unexecuted instantiation: blake2s.c:w64Add32 Unexecuted instantiation: camellia.c:w64Add32 Unexecuted instantiation: chacha.c:w64Add32 Unexecuted instantiation: chacha20_poly1305.c:w64Add32 Unexecuted instantiation: cmac.c:w64Add32 Unexecuted instantiation: coding.c:w64Add32 Unexecuted instantiation: curve25519.c:w64Add32 Unexecuted instantiation: curve448.c:w64Add32 Unexecuted instantiation: des3.c:w64Add32 Unexecuted instantiation: dh.c:w64Add32 Unexecuted instantiation: ecc.c:w64Add32 Unexecuted instantiation: eccsi.c:w64Add32 Unexecuted instantiation: ed25519.c:w64Add32 Unexecuted instantiation: ed448.c:w64Add32 Unexecuted instantiation: fe_448.c:w64Add32 Unexecuted instantiation: fe_operations.c:w64Add32 Unexecuted instantiation: ge_448.c:w64Add32 Unexecuted instantiation: ge_operations.c:w64Add32 Unexecuted instantiation: hash.c:w64Add32 Unexecuted instantiation: hmac.c:w64Add32 Unexecuted instantiation: kdf.c:w64Add32 Unexecuted instantiation: md2.c:w64Add32 Unexecuted instantiation: md4.c:w64Add32 Unexecuted instantiation: md5.c:w64Add32 Unexecuted instantiation: memory.c:w64Add32 Unexecuted instantiation: poly1305.c:w64Add32 Unexecuted instantiation: pwdbased.c:w64Add32 Unexecuted instantiation: random.c:w64Add32 Unexecuted instantiation: ripemd.c:w64Add32 Unexecuted instantiation: rsa.c:w64Add32 Unexecuted instantiation: sha.c:w64Add32 Unexecuted instantiation: sha256.c:w64Add32 Unexecuted instantiation: sha3.c:w64Add32 Unexecuted instantiation: sha512.c:w64Add32 Unexecuted instantiation: siphash.c:w64Add32 Unexecuted instantiation: sm2.c:w64Add32 Unexecuted instantiation: sm3.c:w64Add32 Unexecuted instantiation: sm4.c:w64Add32 Unexecuted instantiation: sp_int.c:w64Add32 Unexecuted instantiation: wc_encrypt.c:w64Add32 Unexecuted instantiation: wolfmath.c:w64Add32 Unexecuted instantiation: ssl.c:w64Add32 Unexecuted instantiation: tls.c:w64Add32 Unexecuted instantiation: tls13.c:w64Add32 Unexecuted instantiation: wc_mlkem.c:w64Add32 Unexecuted instantiation: wc_mlkem_poly.c:w64Add32 Unexecuted instantiation: internal.c:w64Add32 Unexecuted instantiation: keys.c:w64Add32 |
1200 | | |
1201 | | WC_MISC_STATIC WC_INLINE w64wrapper w64Add(w64wrapper a, w64wrapper b, |
1202 | | byte *wrap) |
1203 | 0 | { |
1204 | 0 | a.n += b.n; |
1205 | 0 | if (a.n < b.n && wrap != NULL) |
1206 | 0 | *wrap = 1; |
1207 | 0 |
|
1208 | 0 | return a; |
1209 | 0 | } Unexecuted instantiation: aes.c:w64Add Unexecuted instantiation: arc4.c:w64Add Unexecuted instantiation: asn.c:w64Add Unexecuted instantiation: blake2b.c:w64Add Unexecuted instantiation: blake2s.c:w64Add Unexecuted instantiation: camellia.c:w64Add Unexecuted instantiation: chacha.c:w64Add Unexecuted instantiation: chacha20_poly1305.c:w64Add Unexecuted instantiation: cmac.c:w64Add Unexecuted instantiation: coding.c:w64Add Unexecuted instantiation: curve25519.c:w64Add Unexecuted instantiation: curve448.c:w64Add Unexecuted instantiation: des3.c:w64Add Unexecuted instantiation: dh.c:w64Add Unexecuted instantiation: ecc.c:w64Add Unexecuted instantiation: eccsi.c:w64Add Unexecuted instantiation: ed25519.c:w64Add Unexecuted instantiation: ed448.c:w64Add Unexecuted instantiation: fe_448.c:w64Add Unexecuted instantiation: fe_operations.c:w64Add Unexecuted instantiation: ge_448.c:w64Add Unexecuted instantiation: ge_operations.c:w64Add Unexecuted instantiation: hash.c:w64Add Unexecuted instantiation: hmac.c:w64Add Unexecuted instantiation: kdf.c:w64Add Unexecuted instantiation: md2.c:w64Add Unexecuted instantiation: md4.c:w64Add Unexecuted instantiation: md5.c:w64Add Unexecuted instantiation: memory.c:w64Add Unexecuted instantiation: poly1305.c:w64Add Unexecuted instantiation: pwdbased.c:w64Add Unexecuted instantiation: random.c:w64Add Unexecuted instantiation: ripemd.c:w64Add Unexecuted instantiation: rsa.c:w64Add Unexecuted instantiation: sha.c:w64Add Unexecuted instantiation: sha256.c:w64Add Unexecuted instantiation: sha3.c:w64Add Unexecuted instantiation: sha512.c:w64Add Unexecuted instantiation: siphash.c:w64Add Unexecuted instantiation: sm2.c:w64Add Unexecuted instantiation: sm3.c:w64Add Unexecuted instantiation: sm4.c:w64Add Unexecuted instantiation: sp_int.c:w64Add Unexecuted instantiation: wc_encrypt.c:w64Add Unexecuted instantiation: wolfmath.c:w64Add Unexecuted instantiation: ssl.c:w64Add Unexecuted instantiation: tls.c:w64Add Unexecuted instantiation: tls13.c:w64Add Unexecuted instantiation: wc_mlkem.c:w64Add Unexecuted instantiation: wc_mlkem_poly.c:w64Add Unexecuted instantiation: internal.c:w64Add Unexecuted instantiation: keys.c:w64Add |
1210 | | |
1211 | | WC_MISC_STATIC WC_INLINE w64wrapper w64Sub32(w64wrapper a, word32 b, byte *wrap) |
1212 | 0 | { |
1213 | 0 | if (a.n < b && wrap != NULL) |
1214 | 0 | *wrap = 1; |
1215 | 0 | a.n = a.n - b; |
1216 | 0 | return a; |
1217 | 0 | } Unexecuted instantiation: aes.c:w64Sub32 Unexecuted instantiation: arc4.c:w64Sub32 Unexecuted instantiation: asn.c:w64Sub32 Unexecuted instantiation: blake2b.c:w64Sub32 Unexecuted instantiation: blake2s.c:w64Sub32 Unexecuted instantiation: camellia.c:w64Sub32 Unexecuted instantiation: chacha.c:w64Sub32 Unexecuted instantiation: chacha20_poly1305.c:w64Sub32 Unexecuted instantiation: cmac.c:w64Sub32 Unexecuted instantiation: coding.c:w64Sub32 Unexecuted instantiation: curve25519.c:w64Sub32 Unexecuted instantiation: curve448.c:w64Sub32 Unexecuted instantiation: des3.c:w64Sub32 Unexecuted instantiation: dh.c:w64Sub32 Unexecuted instantiation: ecc.c:w64Sub32 Unexecuted instantiation: eccsi.c:w64Sub32 Unexecuted instantiation: ed25519.c:w64Sub32 Unexecuted instantiation: ed448.c:w64Sub32 Unexecuted instantiation: fe_448.c:w64Sub32 Unexecuted instantiation: fe_operations.c:w64Sub32 Unexecuted instantiation: ge_448.c:w64Sub32 Unexecuted instantiation: ge_operations.c:w64Sub32 Unexecuted instantiation: hash.c:w64Sub32 Unexecuted instantiation: hmac.c:w64Sub32 Unexecuted instantiation: kdf.c:w64Sub32 Unexecuted instantiation: md2.c:w64Sub32 Unexecuted instantiation: md4.c:w64Sub32 Unexecuted instantiation: md5.c:w64Sub32 Unexecuted instantiation: memory.c:w64Sub32 Unexecuted instantiation: poly1305.c:w64Sub32 Unexecuted instantiation: pwdbased.c:w64Sub32 Unexecuted instantiation: random.c:w64Sub32 Unexecuted instantiation: ripemd.c:w64Sub32 Unexecuted instantiation: rsa.c:w64Sub32 Unexecuted instantiation: sha.c:w64Sub32 Unexecuted instantiation: sha256.c:w64Sub32 Unexecuted instantiation: sha3.c:w64Sub32 Unexecuted instantiation: sha512.c:w64Sub32 Unexecuted instantiation: siphash.c:w64Sub32 Unexecuted instantiation: sm2.c:w64Sub32 Unexecuted instantiation: sm3.c:w64Sub32 Unexecuted instantiation: sm4.c:w64Sub32 Unexecuted instantiation: sp_int.c:w64Sub32 Unexecuted instantiation: wc_encrypt.c:w64Sub32 Unexecuted instantiation: wolfmath.c:w64Sub32 Unexecuted instantiation: ssl.c:w64Sub32 Unexecuted instantiation: tls.c:w64Sub32 Unexecuted instantiation: tls13.c:w64Sub32 Unexecuted instantiation: wc_mlkem.c:w64Sub32 Unexecuted instantiation: wc_mlkem_poly.c:w64Sub32 Unexecuted instantiation: internal.c:w64Sub32 Unexecuted instantiation: keys.c:w64Sub32 |
1218 | | |
1219 | | WC_MISC_STATIC WC_INLINE byte w64GT(w64wrapper a, w64wrapper b) |
1220 | 0 | { |
1221 | 0 | return a.n > b.n; |
1222 | 0 | } Unexecuted instantiation: aes.c:w64GT Unexecuted instantiation: arc4.c:w64GT Unexecuted instantiation: asn.c:w64GT Unexecuted instantiation: blake2b.c:w64GT Unexecuted instantiation: blake2s.c:w64GT Unexecuted instantiation: camellia.c:w64GT Unexecuted instantiation: chacha.c:w64GT Unexecuted instantiation: chacha20_poly1305.c:w64GT Unexecuted instantiation: cmac.c:w64GT Unexecuted instantiation: coding.c:w64GT Unexecuted instantiation: curve25519.c:w64GT Unexecuted instantiation: curve448.c:w64GT Unexecuted instantiation: des3.c:w64GT Unexecuted instantiation: dh.c:w64GT Unexecuted instantiation: ecc.c:w64GT Unexecuted instantiation: eccsi.c:w64GT Unexecuted instantiation: ed25519.c:w64GT Unexecuted instantiation: ed448.c:w64GT Unexecuted instantiation: fe_448.c:w64GT Unexecuted instantiation: fe_operations.c:w64GT Unexecuted instantiation: ge_448.c:w64GT Unexecuted instantiation: ge_operations.c:w64GT Unexecuted instantiation: hash.c:w64GT Unexecuted instantiation: hmac.c:w64GT Unexecuted instantiation: kdf.c:w64GT Unexecuted instantiation: md2.c:w64GT Unexecuted instantiation: md4.c:w64GT Unexecuted instantiation: md5.c:w64GT Unexecuted instantiation: memory.c:w64GT Unexecuted instantiation: poly1305.c:w64GT Unexecuted instantiation: pwdbased.c:w64GT Unexecuted instantiation: random.c:w64GT Unexecuted instantiation: ripemd.c:w64GT Unexecuted instantiation: rsa.c:w64GT Unexecuted instantiation: sha.c:w64GT Unexecuted instantiation: sha256.c:w64GT Unexecuted instantiation: sha3.c:w64GT Unexecuted instantiation: sha512.c:w64GT Unexecuted instantiation: siphash.c:w64GT Unexecuted instantiation: sm2.c:w64GT Unexecuted instantiation: sm3.c:w64GT Unexecuted instantiation: sm4.c:w64GT Unexecuted instantiation: sp_int.c:w64GT Unexecuted instantiation: wc_encrypt.c:w64GT Unexecuted instantiation: wolfmath.c:w64GT Unexecuted instantiation: ssl.c:w64GT Unexecuted instantiation: tls.c:w64GT Unexecuted instantiation: tls13.c:w64GT Unexecuted instantiation: wc_mlkem.c:w64GT Unexecuted instantiation: wc_mlkem_poly.c:w64GT Unexecuted instantiation: keys.c:w64GT |
1223 | | |
1224 | | WC_MISC_STATIC WC_INLINE byte w64IsZero(w64wrapper a) |
1225 | 0 | { |
1226 | 0 | return a.n == 0; |
1227 | 0 | } Unexecuted instantiation: aes.c:w64IsZero Unexecuted instantiation: arc4.c:w64IsZero Unexecuted instantiation: asn.c:w64IsZero Unexecuted instantiation: blake2b.c:w64IsZero Unexecuted instantiation: blake2s.c:w64IsZero Unexecuted instantiation: camellia.c:w64IsZero Unexecuted instantiation: chacha.c:w64IsZero Unexecuted instantiation: chacha20_poly1305.c:w64IsZero Unexecuted instantiation: cmac.c:w64IsZero Unexecuted instantiation: coding.c:w64IsZero Unexecuted instantiation: curve25519.c:w64IsZero Unexecuted instantiation: curve448.c:w64IsZero Unexecuted instantiation: des3.c:w64IsZero Unexecuted instantiation: dh.c:w64IsZero Unexecuted instantiation: ecc.c:w64IsZero Unexecuted instantiation: eccsi.c:w64IsZero Unexecuted instantiation: ed25519.c:w64IsZero Unexecuted instantiation: ed448.c:w64IsZero Unexecuted instantiation: fe_448.c:w64IsZero Unexecuted instantiation: fe_operations.c:w64IsZero Unexecuted instantiation: ge_448.c:w64IsZero Unexecuted instantiation: ge_operations.c:w64IsZero Unexecuted instantiation: hash.c:w64IsZero Unexecuted instantiation: hmac.c:w64IsZero Unexecuted instantiation: kdf.c:w64IsZero Unexecuted instantiation: md2.c:w64IsZero Unexecuted instantiation: md4.c:w64IsZero Unexecuted instantiation: md5.c:w64IsZero Unexecuted instantiation: memory.c:w64IsZero Unexecuted instantiation: poly1305.c:w64IsZero Unexecuted instantiation: pwdbased.c:w64IsZero Unexecuted instantiation: random.c:w64IsZero Unexecuted instantiation: ripemd.c:w64IsZero Unexecuted instantiation: rsa.c:w64IsZero Unexecuted instantiation: sha.c:w64IsZero Unexecuted instantiation: sha256.c:w64IsZero Unexecuted instantiation: sha3.c:w64IsZero Unexecuted instantiation: sha512.c:w64IsZero Unexecuted instantiation: siphash.c:w64IsZero Unexecuted instantiation: sm2.c:w64IsZero Unexecuted instantiation: sm3.c:w64IsZero Unexecuted instantiation: sm4.c:w64IsZero Unexecuted instantiation: sp_int.c:w64IsZero Unexecuted instantiation: wc_encrypt.c:w64IsZero Unexecuted instantiation: wolfmath.c:w64IsZero Unexecuted instantiation: ssl.c:w64IsZero Unexecuted instantiation: tls.c:w64IsZero Unexecuted instantiation: tls13.c:w64IsZero Unexecuted instantiation: wc_mlkem.c:w64IsZero Unexecuted instantiation: wc_mlkem_poly.c:w64IsZero Unexecuted instantiation: keys.c:w64IsZero |
1228 | | |
1229 | | WC_MISC_STATIC WC_INLINE void c64toa(const w64wrapper *a, byte *out) |
1230 | 0 | { |
1231 | 0 | #ifdef BIG_ENDIAN_ORDER |
1232 | 0 | XMEMCPY(out, &a->n, sizeof(a->n)); |
1233 | 0 | #else |
1234 | 0 | word64 _out; |
1235 | 0 | _out = ByteReverseWord64(a->n); |
1236 | 0 | XMEMCPY(out, &_out, sizeof(_out)); |
1237 | 0 | #endif /* BIG_ENDIAN_ORDER */ |
1238 | 0 | } Unexecuted instantiation: aes.c:c64toa Unexecuted instantiation: arc4.c:c64toa Unexecuted instantiation: asn.c:c64toa Unexecuted instantiation: blake2b.c:c64toa Unexecuted instantiation: blake2s.c:c64toa Unexecuted instantiation: camellia.c:c64toa Unexecuted instantiation: chacha.c:c64toa Unexecuted instantiation: chacha20_poly1305.c:c64toa Unexecuted instantiation: cmac.c:c64toa Unexecuted instantiation: coding.c:c64toa Unexecuted instantiation: curve25519.c:c64toa Unexecuted instantiation: curve448.c:c64toa Unexecuted instantiation: des3.c:c64toa Unexecuted instantiation: dh.c:c64toa Unexecuted instantiation: ecc.c:c64toa Unexecuted instantiation: eccsi.c:c64toa Unexecuted instantiation: ed25519.c:c64toa Unexecuted instantiation: ed448.c:c64toa Unexecuted instantiation: fe_448.c:c64toa Unexecuted instantiation: fe_operations.c:c64toa Unexecuted instantiation: ge_448.c:c64toa Unexecuted instantiation: ge_operations.c:c64toa Unexecuted instantiation: hash.c:c64toa Unexecuted instantiation: hmac.c:c64toa Unexecuted instantiation: kdf.c:c64toa Unexecuted instantiation: md2.c:c64toa Unexecuted instantiation: md4.c:c64toa Unexecuted instantiation: md5.c:c64toa Unexecuted instantiation: memory.c:c64toa Unexecuted instantiation: poly1305.c:c64toa Unexecuted instantiation: pwdbased.c:c64toa Unexecuted instantiation: random.c:c64toa Unexecuted instantiation: ripemd.c:c64toa Unexecuted instantiation: rsa.c:c64toa Unexecuted instantiation: sha.c:c64toa Unexecuted instantiation: sha256.c:c64toa Unexecuted instantiation: sha3.c:c64toa Unexecuted instantiation: sha512.c:c64toa Unexecuted instantiation: siphash.c:c64toa Unexecuted instantiation: sm2.c:c64toa Unexecuted instantiation: sm3.c:c64toa Unexecuted instantiation: sm4.c:c64toa Unexecuted instantiation: sp_int.c:c64toa Unexecuted instantiation: wc_encrypt.c:c64toa Unexecuted instantiation: wolfmath.c:c64toa Unexecuted instantiation: ssl.c:c64toa Unexecuted instantiation: tls.c:c64toa Unexecuted instantiation: tls13.c:c64toa Unexecuted instantiation: wc_mlkem.c:c64toa Unexecuted instantiation: wc_mlkem_poly.c:c64toa Unexecuted instantiation: internal.c:c64toa Unexecuted instantiation: keys.c:c64toa |
1239 | | |
1240 | | WC_MISC_STATIC WC_INLINE void ato64(const byte *in, w64wrapper *w64) |
1241 | 0 | { |
1242 | 0 | #ifdef BIG_ENDIAN_ORDER |
1243 | 0 | XMEMCPY(&w64->n, in, sizeof(w64->n)); |
1244 | 0 | #else |
1245 | 0 | union { |
1246 | 0 | word64 w; |
1247 | 0 | byte b[sizeof(word64)]; |
1248 | 0 | } _in; |
1249 | 0 | XMEMCPY(_in.b, in, sizeof(_in)); |
1250 | 0 | w64->n = ByteReverseWord64(_in.w); |
1251 | 0 | #endif /* BIG_ENDIAN_ORDER */ |
1252 | 0 | } Unexecuted instantiation: aes.c:ato64 Unexecuted instantiation: arc4.c:ato64 Unexecuted instantiation: asn.c:ato64 Unexecuted instantiation: blake2b.c:ato64 Unexecuted instantiation: blake2s.c:ato64 Unexecuted instantiation: camellia.c:ato64 Unexecuted instantiation: chacha.c:ato64 Unexecuted instantiation: chacha20_poly1305.c:ato64 Unexecuted instantiation: cmac.c:ato64 Unexecuted instantiation: coding.c:ato64 Unexecuted instantiation: curve25519.c:ato64 Unexecuted instantiation: curve448.c:ato64 Unexecuted instantiation: des3.c:ato64 Unexecuted instantiation: dh.c:ato64 Unexecuted instantiation: ecc.c:ato64 Unexecuted instantiation: eccsi.c:ato64 Unexecuted instantiation: ed25519.c:ato64 Unexecuted instantiation: ed448.c:ato64 Unexecuted instantiation: fe_448.c:ato64 Unexecuted instantiation: fe_operations.c:ato64 Unexecuted instantiation: ge_448.c:ato64 Unexecuted instantiation: ge_operations.c:ato64 Unexecuted instantiation: hash.c:ato64 Unexecuted instantiation: hmac.c:ato64 Unexecuted instantiation: kdf.c:ato64 Unexecuted instantiation: md2.c:ato64 Unexecuted instantiation: md4.c:ato64 Unexecuted instantiation: md5.c:ato64 Unexecuted instantiation: memory.c:ato64 Unexecuted instantiation: poly1305.c:ato64 Unexecuted instantiation: pwdbased.c:ato64 Unexecuted instantiation: random.c:ato64 Unexecuted instantiation: ripemd.c:ato64 Unexecuted instantiation: rsa.c:ato64 Unexecuted instantiation: sha.c:ato64 Unexecuted instantiation: sha256.c:ato64 Unexecuted instantiation: sha3.c:ato64 Unexecuted instantiation: sha512.c:ato64 Unexecuted instantiation: siphash.c:ato64 Unexecuted instantiation: sm2.c:ato64 Unexecuted instantiation: sm3.c:ato64 Unexecuted instantiation: sm4.c:ato64 Unexecuted instantiation: sp_int.c:ato64 Unexecuted instantiation: wc_encrypt.c:ato64 Unexecuted instantiation: wolfmath.c:ato64 Unexecuted instantiation: ssl.c:ato64 Unexecuted instantiation: tls.c:ato64 Unexecuted instantiation: tls13.c:ato64 Unexecuted instantiation: wc_mlkem.c:ato64 Unexecuted instantiation: wc_mlkem_poly.c:ato64 Unexecuted instantiation: internal.c:ato64 Unexecuted instantiation: keys.c:ato64 |
1253 | | |
1254 | | WC_MISC_STATIC WC_INLINE w64wrapper w64From32(word32 hi, word32 lo) |
1255 | 227k | { |
1256 | 227k | w64wrapper ret; |
1257 | 227k | ret.n = ((word64)hi << 32) | lo; |
1258 | 227k | return ret; |
1259 | 227k | } Unexecuted instantiation: aes.c:w64From32 Unexecuted instantiation: arc4.c:w64From32 Unexecuted instantiation: asn.c:w64From32 Unexecuted instantiation: blake2b.c:w64From32 Unexecuted instantiation: blake2s.c:w64From32 Unexecuted instantiation: camellia.c:w64From32 Unexecuted instantiation: chacha.c:w64From32 Unexecuted instantiation: chacha20_poly1305.c:w64From32 Unexecuted instantiation: cmac.c:w64From32 Unexecuted instantiation: coding.c:w64From32 Unexecuted instantiation: curve25519.c:w64From32 Unexecuted instantiation: curve448.c:w64From32 Unexecuted instantiation: des3.c:w64From32 Unexecuted instantiation: dh.c:w64From32 Unexecuted instantiation: ecc.c:w64From32 Unexecuted instantiation: eccsi.c:w64From32 Unexecuted instantiation: ed25519.c:w64From32 Unexecuted instantiation: ed448.c:w64From32 Unexecuted instantiation: fe_448.c:w64From32 Unexecuted instantiation: fe_operations.c:w64From32 Unexecuted instantiation: ge_448.c:w64From32 Unexecuted instantiation: ge_operations.c:w64From32 Unexecuted instantiation: hash.c:w64From32 Unexecuted instantiation: hmac.c:w64From32 Unexecuted instantiation: kdf.c:w64From32 Unexecuted instantiation: md2.c:w64From32 Unexecuted instantiation: md4.c:w64From32 Unexecuted instantiation: md5.c:w64From32 Unexecuted instantiation: memory.c:w64From32 Unexecuted instantiation: poly1305.c:w64From32 Unexecuted instantiation: pwdbased.c:w64From32 Unexecuted instantiation: random.c:w64From32 Unexecuted instantiation: ripemd.c:w64From32 Unexecuted instantiation: rsa.c:w64From32 Unexecuted instantiation: sha.c:w64From32 Unexecuted instantiation: sha256.c:w64From32 Unexecuted instantiation: sha3.c:w64From32 Unexecuted instantiation: sha512.c:w64From32 Unexecuted instantiation: siphash.c:w64From32 Unexecuted instantiation: sm2.c:w64From32 Unexecuted instantiation: sm3.c:w64From32 Unexecuted instantiation: sm4.c:w64From32 Unexecuted instantiation: sp_int.c:w64From32 Unexecuted instantiation: wc_encrypt.c:w64From32 Unexecuted instantiation: wolfmath.c:w64From32 Unexecuted instantiation: ssl.c:w64From32 Unexecuted instantiation: tls.c:w64From32 Unexecuted instantiation: tls13.c:w64From32 Unexecuted instantiation: wc_mlkem.c:w64From32 Unexecuted instantiation: wc_mlkem_poly.c:w64From32 Line | Count | Source | 1255 | 227k | { | 1256 | 227k | w64wrapper ret; | 1257 | 227k | ret.n = ((word64)hi << 32) | lo; | 1258 | 227k | return ret; | 1259 | 227k | } |
Unexecuted instantiation: keys.c:w64From32 |
1260 | | |
1261 | | WC_MISC_STATIC WC_INLINE byte w64GTE(w64wrapper a, w64wrapper b) |
1262 | 60.0k | { |
1263 | 60.0k | return a.n >= b.n; |
1264 | 60.0k | } Unexecuted instantiation: aes.c:w64GTE Unexecuted instantiation: arc4.c:w64GTE Unexecuted instantiation: asn.c:w64GTE Unexecuted instantiation: blake2b.c:w64GTE Unexecuted instantiation: blake2s.c:w64GTE Unexecuted instantiation: camellia.c:w64GTE Unexecuted instantiation: chacha.c:w64GTE Unexecuted instantiation: chacha20_poly1305.c:w64GTE Unexecuted instantiation: cmac.c:w64GTE Unexecuted instantiation: coding.c:w64GTE Unexecuted instantiation: curve25519.c:w64GTE Unexecuted instantiation: curve448.c:w64GTE Unexecuted instantiation: des3.c:w64GTE Unexecuted instantiation: dh.c:w64GTE Unexecuted instantiation: ecc.c:w64GTE Unexecuted instantiation: eccsi.c:w64GTE Unexecuted instantiation: ed25519.c:w64GTE Unexecuted instantiation: ed448.c:w64GTE Unexecuted instantiation: fe_448.c:w64GTE Unexecuted instantiation: fe_operations.c:w64GTE Unexecuted instantiation: ge_448.c:w64GTE Unexecuted instantiation: ge_operations.c:w64GTE Unexecuted instantiation: hash.c:w64GTE Unexecuted instantiation: hmac.c:w64GTE Unexecuted instantiation: kdf.c:w64GTE Unexecuted instantiation: md2.c:w64GTE Unexecuted instantiation: md4.c:w64GTE Unexecuted instantiation: md5.c:w64GTE Unexecuted instantiation: memory.c:w64GTE Unexecuted instantiation: poly1305.c:w64GTE Unexecuted instantiation: pwdbased.c:w64GTE Unexecuted instantiation: random.c:w64GTE Unexecuted instantiation: ripemd.c:w64GTE Unexecuted instantiation: rsa.c:w64GTE Unexecuted instantiation: sha.c:w64GTE Unexecuted instantiation: sha256.c:w64GTE Unexecuted instantiation: sha3.c:w64GTE Unexecuted instantiation: sha512.c:w64GTE Unexecuted instantiation: siphash.c:w64GTE Unexecuted instantiation: sm2.c:w64GTE Unexecuted instantiation: sm3.c:w64GTE Unexecuted instantiation: sm4.c:w64GTE Unexecuted instantiation: sp_int.c:w64GTE Unexecuted instantiation: wc_encrypt.c:w64GTE Unexecuted instantiation: wolfmath.c:w64GTE Unexecuted instantiation: ssl.c:w64GTE Unexecuted instantiation: tls.c:w64GTE Unexecuted instantiation: tls13.c:w64GTE Unexecuted instantiation: wc_mlkem.c:w64GTE Unexecuted instantiation: wc_mlkem_poly.c:w64GTE Line | Count | Source | 1262 | 60.0k | { | 1263 | 60.0k | return a.n >= b.n; | 1264 | 60.0k | } |
Unexecuted instantiation: keys.c:w64GTE |
1265 | | |
1266 | | WC_MISC_STATIC WC_INLINE byte w64LT(w64wrapper a, w64wrapper b) |
1267 | 0 | { |
1268 | 0 | return a.n < b.n; |
1269 | 0 | } Unexecuted instantiation: aes.c:w64LT Unexecuted instantiation: arc4.c:w64LT Unexecuted instantiation: asn.c:w64LT Unexecuted instantiation: blake2b.c:w64LT Unexecuted instantiation: blake2s.c:w64LT Unexecuted instantiation: camellia.c:w64LT Unexecuted instantiation: chacha.c:w64LT Unexecuted instantiation: chacha20_poly1305.c:w64LT Unexecuted instantiation: cmac.c:w64LT Unexecuted instantiation: coding.c:w64LT Unexecuted instantiation: curve25519.c:w64LT Unexecuted instantiation: curve448.c:w64LT Unexecuted instantiation: des3.c:w64LT Unexecuted instantiation: dh.c:w64LT Unexecuted instantiation: ecc.c:w64LT Unexecuted instantiation: eccsi.c:w64LT Unexecuted instantiation: ed25519.c:w64LT Unexecuted instantiation: ed448.c:w64LT Unexecuted instantiation: fe_448.c:w64LT Unexecuted instantiation: fe_operations.c:w64LT Unexecuted instantiation: ge_448.c:w64LT Unexecuted instantiation: ge_operations.c:w64LT Unexecuted instantiation: hash.c:w64LT Unexecuted instantiation: hmac.c:w64LT Unexecuted instantiation: kdf.c:w64LT Unexecuted instantiation: md2.c:w64LT Unexecuted instantiation: md4.c:w64LT Unexecuted instantiation: md5.c:w64LT Unexecuted instantiation: memory.c:w64LT Unexecuted instantiation: poly1305.c:w64LT Unexecuted instantiation: pwdbased.c:w64LT Unexecuted instantiation: random.c:w64LT Unexecuted instantiation: ripemd.c:w64LT Unexecuted instantiation: rsa.c:w64LT Unexecuted instantiation: sha.c:w64LT Unexecuted instantiation: sha256.c:w64LT Unexecuted instantiation: sha3.c:w64LT Unexecuted instantiation: sha512.c:w64LT Unexecuted instantiation: siphash.c:w64LT Unexecuted instantiation: sm2.c:w64LT Unexecuted instantiation: sm3.c:w64LT Unexecuted instantiation: sm4.c:w64LT Unexecuted instantiation: sp_int.c:w64LT Unexecuted instantiation: wc_encrypt.c:w64LT Unexecuted instantiation: wolfmath.c:w64LT Unexecuted instantiation: ssl.c:w64LT Unexecuted instantiation: tls.c:w64LT Unexecuted instantiation: tls13.c:w64LT Unexecuted instantiation: wc_mlkem.c:w64LT Unexecuted instantiation: wc_mlkem_poly.c:w64LT Unexecuted instantiation: keys.c:w64LT |
1270 | | |
1271 | | WC_MISC_STATIC WC_INLINE w64wrapper w64Sub(w64wrapper a, w64wrapper b) |
1272 | 0 | { |
1273 | 0 | a.n -= b.n; |
1274 | 0 | return a; |
1275 | 0 | } Unexecuted instantiation: aes.c:w64Sub Unexecuted instantiation: arc4.c:w64Sub Unexecuted instantiation: asn.c:w64Sub Unexecuted instantiation: blake2b.c:w64Sub Unexecuted instantiation: blake2s.c:w64Sub Unexecuted instantiation: camellia.c:w64Sub Unexecuted instantiation: chacha.c:w64Sub Unexecuted instantiation: chacha20_poly1305.c:w64Sub Unexecuted instantiation: cmac.c:w64Sub Unexecuted instantiation: coding.c:w64Sub Unexecuted instantiation: curve25519.c:w64Sub Unexecuted instantiation: curve448.c:w64Sub Unexecuted instantiation: des3.c:w64Sub Unexecuted instantiation: dh.c:w64Sub Unexecuted instantiation: ecc.c:w64Sub Unexecuted instantiation: eccsi.c:w64Sub Unexecuted instantiation: ed25519.c:w64Sub Unexecuted instantiation: ed448.c:w64Sub Unexecuted instantiation: fe_448.c:w64Sub Unexecuted instantiation: fe_operations.c:w64Sub Unexecuted instantiation: ge_448.c:w64Sub Unexecuted instantiation: ge_operations.c:w64Sub Unexecuted instantiation: hash.c:w64Sub Unexecuted instantiation: hmac.c:w64Sub Unexecuted instantiation: kdf.c:w64Sub Unexecuted instantiation: md2.c:w64Sub Unexecuted instantiation: md4.c:w64Sub Unexecuted instantiation: md5.c:w64Sub Unexecuted instantiation: memory.c:w64Sub Unexecuted instantiation: poly1305.c:w64Sub Unexecuted instantiation: pwdbased.c:w64Sub Unexecuted instantiation: random.c:w64Sub Unexecuted instantiation: ripemd.c:w64Sub Unexecuted instantiation: rsa.c:w64Sub Unexecuted instantiation: sha.c:w64Sub Unexecuted instantiation: sha256.c:w64Sub Unexecuted instantiation: sha3.c:w64Sub Unexecuted instantiation: sha512.c:w64Sub Unexecuted instantiation: siphash.c:w64Sub Unexecuted instantiation: sm2.c:w64Sub Unexecuted instantiation: sm3.c:w64Sub Unexecuted instantiation: sm4.c:w64Sub Unexecuted instantiation: sp_int.c:w64Sub Unexecuted instantiation: wc_encrypt.c:w64Sub Unexecuted instantiation: wolfmath.c:w64Sub Unexecuted instantiation: ssl.c:w64Sub Unexecuted instantiation: tls.c:w64Sub Unexecuted instantiation: tls13.c:w64Sub Unexecuted instantiation: wc_mlkem.c:w64Sub Unexecuted instantiation: wc_mlkem_poly.c:w64Sub Unexecuted instantiation: keys.c:w64Sub |
1276 | | |
1277 | | WC_MISC_STATIC WC_INLINE void w64Zero(w64wrapper *a) |
1278 | 0 | { |
1279 | 0 | a->n = 0; |
1280 | 0 | } Unexecuted instantiation: aes.c:w64Zero Unexecuted instantiation: arc4.c:w64Zero Unexecuted instantiation: asn.c:w64Zero Unexecuted instantiation: blake2b.c:w64Zero Unexecuted instantiation: blake2s.c:w64Zero Unexecuted instantiation: camellia.c:w64Zero Unexecuted instantiation: chacha.c:w64Zero Unexecuted instantiation: chacha20_poly1305.c:w64Zero Unexecuted instantiation: cmac.c:w64Zero Unexecuted instantiation: coding.c:w64Zero Unexecuted instantiation: curve25519.c:w64Zero Unexecuted instantiation: curve448.c:w64Zero Unexecuted instantiation: des3.c:w64Zero Unexecuted instantiation: dh.c:w64Zero Unexecuted instantiation: ecc.c:w64Zero Unexecuted instantiation: eccsi.c:w64Zero Unexecuted instantiation: ed25519.c:w64Zero Unexecuted instantiation: ed448.c:w64Zero Unexecuted instantiation: fe_448.c:w64Zero Unexecuted instantiation: fe_operations.c:w64Zero Unexecuted instantiation: ge_448.c:w64Zero Unexecuted instantiation: ge_operations.c:w64Zero Unexecuted instantiation: hash.c:w64Zero Unexecuted instantiation: hmac.c:w64Zero Unexecuted instantiation: kdf.c:w64Zero Unexecuted instantiation: md2.c:w64Zero Unexecuted instantiation: md4.c:w64Zero Unexecuted instantiation: md5.c:w64Zero Unexecuted instantiation: memory.c:w64Zero Unexecuted instantiation: poly1305.c:w64Zero Unexecuted instantiation: pwdbased.c:w64Zero Unexecuted instantiation: random.c:w64Zero Unexecuted instantiation: ripemd.c:w64Zero Unexecuted instantiation: rsa.c:w64Zero Unexecuted instantiation: sha.c:w64Zero Unexecuted instantiation: sha256.c:w64Zero Unexecuted instantiation: sha3.c:w64Zero Unexecuted instantiation: sha512.c:w64Zero Unexecuted instantiation: siphash.c:w64Zero Unexecuted instantiation: sm2.c:w64Zero Unexecuted instantiation: sm3.c:w64Zero Unexecuted instantiation: sm4.c:w64Zero Unexecuted instantiation: sp_int.c:w64Zero Unexecuted instantiation: wc_encrypt.c:w64Zero Unexecuted instantiation: wolfmath.c:w64Zero Unexecuted instantiation: ssl.c:w64Zero Unexecuted instantiation: tls.c:w64Zero Unexecuted instantiation: tls13.c:w64Zero Unexecuted instantiation: wc_mlkem.c:w64Zero Unexecuted instantiation: wc_mlkem_poly.c:w64Zero Unexecuted instantiation: keys.c:w64Zero |
1281 | | |
1282 | | WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftRight(w64wrapper a, int shift) |
1283 | 0 | { |
1284 | 0 | a.n >>= shift; |
1285 | 0 | return a; |
1286 | 0 | } Unexecuted instantiation: aes.c:w64ShiftRight Unexecuted instantiation: arc4.c:w64ShiftRight Unexecuted instantiation: asn.c:w64ShiftRight Unexecuted instantiation: blake2b.c:w64ShiftRight Unexecuted instantiation: blake2s.c:w64ShiftRight Unexecuted instantiation: camellia.c:w64ShiftRight Unexecuted instantiation: chacha.c:w64ShiftRight Unexecuted instantiation: chacha20_poly1305.c:w64ShiftRight Unexecuted instantiation: cmac.c:w64ShiftRight Unexecuted instantiation: coding.c:w64ShiftRight Unexecuted instantiation: curve25519.c:w64ShiftRight Unexecuted instantiation: curve448.c:w64ShiftRight Unexecuted instantiation: des3.c:w64ShiftRight Unexecuted instantiation: dh.c:w64ShiftRight Unexecuted instantiation: ecc.c:w64ShiftRight Unexecuted instantiation: eccsi.c:w64ShiftRight Unexecuted instantiation: ed25519.c:w64ShiftRight Unexecuted instantiation: ed448.c:w64ShiftRight Unexecuted instantiation: fe_448.c:w64ShiftRight Unexecuted instantiation: fe_operations.c:w64ShiftRight Unexecuted instantiation: ge_448.c:w64ShiftRight Unexecuted instantiation: ge_operations.c:w64ShiftRight Unexecuted instantiation: hash.c:w64ShiftRight Unexecuted instantiation: hmac.c:w64ShiftRight Unexecuted instantiation: kdf.c:w64ShiftRight Unexecuted instantiation: md2.c:w64ShiftRight Unexecuted instantiation: md4.c:w64ShiftRight Unexecuted instantiation: md5.c:w64ShiftRight Unexecuted instantiation: memory.c:w64ShiftRight Unexecuted instantiation: poly1305.c:w64ShiftRight Unexecuted instantiation: pwdbased.c:w64ShiftRight Unexecuted instantiation: random.c:w64ShiftRight Unexecuted instantiation: ripemd.c:w64ShiftRight Unexecuted instantiation: rsa.c:w64ShiftRight Unexecuted instantiation: sha.c:w64ShiftRight Unexecuted instantiation: sha256.c:w64ShiftRight Unexecuted instantiation: sha3.c:w64ShiftRight Unexecuted instantiation: sha512.c:w64ShiftRight Unexecuted instantiation: siphash.c:w64ShiftRight Unexecuted instantiation: sm2.c:w64ShiftRight Unexecuted instantiation: sm3.c:w64ShiftRight Unexecuted instantiation: sm4.c:w64ShiftRight Unexecuted instantiation: sp_int.c:w64ShiftRight Unexecuted instantiation: wc_encrypt.c:w64ShiftRight Unexecuted instantiation: wolfmath.c:w64ShiftRight Unexecuted instantiation: ssl.c:w64ShiftRight Unexecuted instantiation: tls.c:w64ShiftRight Unexecuted instantiation: tls13.c:w64ShiftRight Unexecuted instantiation: wc_mlkem.c:w64ShiftRight Unexecuted instantiation: wc_mlkem_poly.c:w64ShiftRight Unexecuted instantiation: internal.c:w64ShiftRight Unexecuted instantiation: keys.c:w64ShiftRight |
1287 | | |
1288 | | WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftLeft(w64wrapper a, int shift) |
1289 | 0 | { |
1290 | 0 | a.n <<= shift; |
1291 | 0 | return a; |
1292 | 0 | } Unexecuted instantiation: aes.c:w64ShiftLeft Unexecuted instantiation: arc4.c:w64ShiftLeft Unexecuted instantiation: asn.c:w64ShiftLeft Unexecuted instantiation: blake2b.c:w64ShiftLeft Unexecuted instantiation: blake2s.c:w64ShiftLeft Unexecuted instantiation: camellia.c:w64ShiftLeft Unexecuted instantiation: chacha.c:w64ShiftLeft Unexecuted instantiation: chacha20_poly1305.c:w64ShiftLeft Unexecuted instantiation: cmac.c:w64ShiftLeft Unexecuted instantiation: coding.c:w64ShiftLeft Unexecuted instantiation: curve25519.c:w64ShiftLeft Unexecuted instantiation: curve448.c:w64ShiftLeft Unexecuted instantiation: des3.c:w64ShiftLeft Unexecuted instantiation: dh.c:w64ShiftLeft Unexecuted instantiation: ecc.c:w64ShiftLeft Unexecuted instantiation: eccsi.c:w64ShiftLeft Unexecuted instantiation: ed25519.c:w64ShiftLeft Unexecuted instantiation: ed448.c:w64ShiftLeft Unexecuted instantiation: fe_448.c:w64ShiftLeft Unexecuted instantiation: fe_operations.c:w64ShiftLeft Unexecuted instantiation: ge_448.c:w64ShiftLeft Unexecuted instantiation: ge_operations.c:w64ShiftLeft Unexecuted instantiation: hash.c:w64ShiftLeft Unexecuted instantiation: hmac.c:w64ShiftLeft Unexecuted instantiation: kdf.c:w64ShiftLeft Unexecuted instantiation: md2.c:w64ShiftLeft Unexecuted instantiation: md4.c:w64ShiftLeft Unexecuted instantiation: md5.c:w64ShiftLeft Unexecuted instantiation: memory.c:w64ShiftLeft Unexecuted instantiation: poly1305.c:w64ShiftLeft Unexecuted instantiation: pwdbased.c:w64ShiftLeft Unexecuted instantiation: random.c:w64ShiftLeft Unexecuted instantiation: ripemd.c:w64ShiftLeft Unexecuted instantiation: rsa.c:w64ShiftLeft Unexecuted instantiation: sha.c:w64ShiftLeft Unexecuted instantiation: sha256.c:w64ShiftLeft Unexecuted instantiation: sha3.c:w64ShiftLeft Unexecuted instantiation: sha512.c:w64ShiftLeft Unexecuted instantiation: siphash.c:w64ShiftLeft Unexecuted instantiation: sm2.c:w64ShiftLeft Unexecuted instantiation: sm3.c:w64ShiftLeft Unexecuted instantiation: sm4.c:w64ShiftLeft Unexecuted instantiation: sp_int.c:w64ShiftLeft Unexecuted instantiation: wc_encrypt.c:w64ShiftLeft Unexecuted instantiation: wolfmath.c:w64ShiftLeft Unexecuted instantiation: ssl.c:w64ShiftLeft Unexecuted instantiation: tls.c:w64ShiftLeft Unexecuted instantiation: tls13.c:w64ShiftLeft Unexecuted instantiation: wc_mlkem.c:w64ShiftLeft Unexecuted instantiation: wc_mlkem_poly.c:w64ShiftLeft Unexecuted instantiation: internal.c:w64ShiftLeft Unexecuted instantiation: keys.c:w64ShiftLeft |
1293 | | |
1294 | | WC_MISC_STATIC WC_INLINE w64wrapper w64Mul(word32 a, word32 b) |
1295 | 0 | { |
1296 | 0 | w64wrapper ret; |
1297 | 0 | ret.n = (word64)a * (word64)b; |
1298 | 0 | return ret; |
1299 | 0 | } Unexecuted instantiation: aes.c:w64Mul Unexecuted instantiation: arc4.c:w64Mul Unexecuted instantiation: asn.c:w64Mul Unexecuted instantiation: blake2b.c:w64Mul Unexecuted instantiation: blake2s.c:w64Mul Unexecuted instantiation: camellia.c:w64Mul Unexecuted instantiation: chacha.c:w64Mul Unexecuted instantiation: chacha20_poly1305.c:w64Mul Unexecuted instantiation: cmac.c:w64Mul Unexecuted instantiation: coding.c:w64Mul Unexecuted instantiation: curve25519.c:w64Mul Unexecuted instantiation: curve448.c:w64Mul Unexecuted instantiation: des3.c:w64Mul Unexecuted instantiation: dh.c:w64Mul Unexecuted instantiation: ecc.c:w64Mul Unexecuted instantiation: eccsi.c:w64Mul Unexecuted instantiation: ed25519.c:w64Mul Unexecuted instantiation: ed448.c:w64Mul Unexecuted instantiation: fe_448.c:w64Mul Unexecuted instantiation: fe_operations.c:w64Mul Unexecuted instantiation: ge_448.c:w64Mul Unexecuted instantiation: ge_operations.c:w64Mul Unexecuted instantiation: hash.c:w64Mul Unexecuted instantiation: hmac.c:w64Mul Unexecuted instantiation: kdf.c:w64Mul Unexecuted instantiation: md2.c:w64Mul Unexecuted instantiation: md4.c:w64Mul Unexecuted instantiation: md5.c:w64Mul Unexecuted instantiation: memory.c:w64Mul Unexecuted instantiation: poly1305.c:w64Mul Unexecuted instantiation: pwdbased.c:w64Mul Unexecuted instantiation: random.c:w64Mul Unexecuted instantiation: ripemd.c:w64Mul Unexecuted instantiation: rsa.c:w64Mul Unexecuted instantiation: sha.c:w64Mul Unexecuted instantiation: sha256.c:w64Mul Unexecuted instantiation: sha3.c:w64Mul Unexecuted instantiation: sha512.c:w64Mul Unexecuted instantiation: siphash.c:w64Mul Unexecuted instantiation: sm2.c:w64Mul Unexecuted instantiation: sm3.c:w64Mul Unexecuted instantiation: sm4.c:w64Mul Unexecuted instantiation: sp_int.c:w64Mul Unexecuted instantiation: wc_encrypt.c:w64Mul Unexecuted instantiation: wolfmath.c:w64Mul Unexecuted instantiation: ssl.c:w64Mul Unexecuted instantiation: tls.c:w64Mul Unexecuted instantiation: tls13.c:w64Mul Unexecuted instantiation: wc_mlkem.c:w64Mul Unexecuted instantiation: wc_mlkem_poly.c:w64Mul Unexecuted instantiation: internal.c:w64Mul Unexecuted instantiation: keys.c:w64Mul |
1300 | | |
1301 | | #else |
1302 | | |
1303 | | WC_MISC_STATIC WC_INLINE void w64Increment(w64wrapper *n) |
1304 | | { |
1305 | | n->n[1]++; |
1306 | | if (n->n[1] == 0) |
1307 | | n->n[0]++; |
1308 | | } |
1309 | | |
1310 | | WC_MISC_STATIC WC_INLINE void w64Decrement(w64wrapper *n) { |
1311 | | if (n->n[1] == 0) |
1312 | | n->n[0]--; |
1313 | | n->n[1]--; |
1314 | | } |
1315 | | |
1316 | | WC_MISC_STATIC WC_INLINE byte w64Equal(w64wrapper a, w64wrapper b) |
1317 | | { |
1318 | | return (a.n[0] == b.n[0] && a.n[1] == b.n[1]); |
1319 | | } |
1320 | | |
1321 | | WC_MISC_STATIC WC_INLINE word32 w64GetLow32(w64wrapper n) { |
1322 | | return n.n[1]; |
1323 | | } |
1324 | | |
1325 | | WC_MISC_STATIC WC_INLINE word32 w64GetHigh32(w64wrapper n) { |
1326 | | return n.n[0]; |
1327 | | } |
1328 | | |
1329 | | WC_MISC_STATIC WC_INLINE void w64SetLow32(w64wrapper *n, word32 low) |
1330 | | { |
1331 | | n->n[1] = low; |
1332 | | } |
1333 | | |
1334 | | WC_MISC_STATIC WC_INLINE w64wrapper w64Add32(w64wrapper a, word32 b, byte *wrap) |
1335 | | { |
1336 | | a.n[1] += b; |
1337 | | if (a.n[1] < b) { |
1338 | | a.n[0]++; |
1339 | | if (wrap != NULL && a.n[0] == 0) |
1340 | | *wrap = 1; |
1341 | | } |
1342 | | |
1343 | | return a; |
1344 | | } |
1345 | | |
1346 | | WC_MISC_STATIC WC_INLINE w64wrapper w64Add(w64wrapper a, w64wrapper b, |
1347 | | byte *wrap) |
1348 | | { |
1349 | | a.n[1] += b.n[1]; |
1350 | | if (a.n[1] < b.n[1]) { |
1351 | | a.n[0]++; |
1352 | | if (wrap != NULL && a.n[0] == 0) |
1353 | | *wrap = 1; |
1354 | | } |
1355 | | |
1356 | | a.n[0] += b.n[0]; |
1357 | | if (wrap != NULL && a.n[0] < b.n[0]) { |
1358 | | *wrap = 1; |
1359 | | } |
1360 | | |
1361 | | return a; |
1362 | | } |
1363 | | |
1364 | | WC_MISC_STATIC WC_INLINE w64wrapper w64Sub32(w64wrapper a, word32 b, byte *wrap) |
1365 | | { |
1366 | | byte _underflow = 0; |
1367 | | if (a.n[1] < b) |
1368 | | _underflow = 1; |
1369 | | |
1370 | | a.n[1] -= b; |
1371 | | if (_underflow) { |
1372 | | if (a.n[0] == 0 && wrap != NULL) |
1373 | | *wrap = 1; |
1374 | | a.n[0]--; |
1375 | | } |
1376 | | |
1377 | | return a; |
1378 | | } |
1379 | | |
1380 | | WC_MISC_STATIC WC_INLINE w64wrapper w64Sub(w64wrapper a, w64wrapper b) |
1381 | | { |
1382 | | if (a.n[1] < b.n[1]) |
1383 | | a.n[0]--; |
1384 | | a.n[1] -= b.n[1]; |
1385 | | a.n[0] -= b.n[0]; |
1386 | | return a; |
1387 | | } |
1388 | | |
1389 | | WC_MISC_STATIC WC_INLINE void w64Zero(w64wrapper *a) |
1390 | | { |
1391 | | a->n[0] = a->n[1] = 0; |
1392 | | } |
1393 | | |
1394 | | WC_MISC_STATIC WC_INLINE byte w64GT(w64wrapper a, w64wrapper b) |
1395 | | { |
1396 | | if (a.n[0] > b.n[0]) |
1397 | | return 1; |
1398 | | if (a.n[0] == b.n[0]) |
1399 | | return a.n[1] > b.n[1]; |
1400 | | return 0; |
1401 | | } |
1402 | | |
1403 | | WC_MISC_STATIC WC_INLINE byte w64GTE(w64wrapper a, w64wrapper b) |
1404 | | { |
1405 | | if (a.n[0] > b.n[0]) |
1406 | | return 1; |
1407 | | if (a.n[0] == b.n[0]) |
1408 | | return a.n[1] >= b.n[1]; |
1409 | | return 0; |
1410 | | } |
1411 | | |
1412 | | WC_MISC_STATIC WC_INLINE byte w64IsZero(w64wrapper a) |
1413 | | { |
1414 | | return a.n[0] == 0 && a.n[1] == 0; |
1415 | | } |
1416 | | |
1417 | | WC_MISC_STATIC WC_INLINE void c64toa(const w64wrapper *a, byte *out) |
1418 | | { |
1419 | | #ifdef BIG_ENDIAN_ORDER |
1420 | | word32 *_out = (word32*)(out); |
1421 | | _out[0] = a->n[0]; |
1422 | | _out[1] = a->n[1]; |
1423 | | #else |
1424 | | c32toa(a->n[0], out); |
1425 | | c32toa(a->n[1], out + 4); |
1426 | | #endif /* BIG_ENDIAN_ORDER */ |
1427 | | } |
1428 | | |
1429 | | WC_MISC_STATIC WC_INLINE void ato64(const byte *in, w64wrapper *w64) |
1430 | | { |
1431 | | #ifdef BIG_ENDIAN_ORDER |
1432 | | const word32 *_in = (const word32*)(in); |
1433 | | w64->n[0] = *_in; |
1434 | | w64->n[1] = *(_in + 1); |
1435 | | #else |
1436 | | ato32(in, &w64->n[0]); |
1437 | | ato32(in + 4, &w64->n[1]); |
1438 | | #endif /* BIG_ENDIAN_ORDER */ |
1439 | | } |
1440 | | |
1441 | | WC_MISC_STATIC WC_INLINE w64wrapper w64From32(word32 hi, word32 lo) |
1442 | | { |
1443 | | w64wrapper w64; |
1444 | | w64.n[0] = hi; |
1445 | | w64.n[1] = lo; |
1446 | | return w64; |
1447 | | } |
1448 | | |
1449 | | WC_MISC_STATIC WC_INLINE byte w64LT(w64wrapper a, w64wrapper b) |
1450 | | { |
1451 | | if (a.n[0] < b.n[0]) |
1452 | | return 1; |
1453 | | if (a.n[0] == b.n[0]) |
1454 | | return a.n[1] < b.n[1]; |
1455 | | |
1456 | | return 0; |
1457 | | } |
1458 | | |
1459 | | WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftRight(w64wrapper a, int shift) |
1460 | | { |
1461 | | if (shift < 32) { |
1462 | | a.n[1] = (a.n[1] >> shift) | (a.n[0] << (32 - shift)); |
1463 | | a.n[0] >>= shift; |
1464 | | } |
1465 | | else { |
1466 | | a.n[1] = a.n[0] >> (shift - 32); |
1467 | | a.n[0] = 0; |
1468 | | } |
1469 | | return a; |
1470 | | } |
1471 | | WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftLeft(w64wrapper a, int shift) |
1472 | | { |
1473 | | if (shift < 32) { |
1474 | | a.n[0] = (a.n[0] << shift) | (a.n[1] >> (32 - shift)); |
1475 | | a.n[1] <<= shift; |
1476 | | } |
1477 | | else { |
1478 | | a.n[0] = a.n[1] << (shift - 32); |
1479 | | a.n[1] = 0; |
1480 | | } |
1481 | | return a; |
1482 | | } |
1483 | | |
1484 | | WC_MISC_STATIC WC_INLINE w64wrapper w64Mul(word32 a, word32 b) |
1485 | | { |
1486 | | w64wrapper ret; |
1487 | | word16 ltlA, ltlB, ltlC, ltlD; |
1488 | | word32 bigA, bigB, bigC, bigD; |
1489 | | |
1490 | | ltlA = a & 0xFFFF; |
1491 | | ltlB = (a >> 16) & 0xFFFF; |
1492 | | ltlC = b & 0xFFFF; |
1493 | | ltlD = (b >> 16) & 0xFFFF; |
1494 | | |
1495 | | bigA = (word32)ltlA * (word32)ltlC; |
1496 | | bigC = (word32)ltlB * (word32)ltlC; |
1497 | | bigD = (word32)ltlA * (word32)ltlD; |
1498 | | bigB = (word32)ltlB * (word32)ltlD; |
1499 | | |
1500 | | ret = w64From32(0, bigB); |
1501 | | ret = w64ShiftLeft(ret, 16); |
1502 | | ret = w64Add32(ret, bigD, NULL); |
1503 | | ret = w64Add32(ret, bigC, NULL); |
1504 | | ret = w64ShiftLeft(ret, 16); |
1505 | | return w64Add32(ret, bigA, NULL); |
1506 | | } |
1507 | | |
1508 | | #endif /* WORD64_AVAILABLE && !WOLFSSL_W64_WRAPPER_TEST */ |
1509 | | #endif /* WOLFSSL_W64_WRAPPER */ |
1510 | | |
1511 | | #if defined(HAVE_SESSION_TICKET) || !defined(NO_CERTS) || \ |
1512 | | !defined(NO_SESSION_CACHE) |
1513 | | /* Make a word from the front of random hash */ |
1514 | | WC_MISC_STATIC WC_INLINE word32 MakeWordFromHash(const byte* hashID) |
1515 | 4.89k | { |
1516 | 4.89k | return ((word32)hashID[0] << 24) | ((word32)hashID[1] << 16) | |
1517 | 4.89k | ((word32)hashID[2] << 8) | (word32)hashID[3]; |
1518 | 4.89k | } Unexecuted instantiation: aes.c:MakeWordFromHash Unexecuted instantiation: arc4.c:MakeWordFromHash Unexecuted instantiation: asn.c:MakeWordFromHash Unexecuted instantiation: blake2b.c:MakeWordFromHash Unexecuted instantiation: blake2s.c:MakeWordFromHash Unexecuted instantiation: camellia.c:MakeWordFromHash Unexecuted instantiation: chacha.c:MakeWordFromHash Unexecuted instantiation: chacha20_poly1305.c:MakeWordFromHash Unexecuted instantiation: cmac.c:MakeWordFromHash Unexecuted instantiation: coding.c:MakeWordFromHash Unexecuted instantiation: curve25519.c:MakeWordFromHash Unexecuted instantiation: curve448.c:MakeWordFromHash Unexecuted instantiation: des3.c:MakeWordFromHash Unexecuted instantiation: dh.c:MakeWordFromHash Unexecuted instantiation: ecc.c:MakeWordFromHash Unexecuted instantiation: eccsi.c:MakeWordFromHash Unexecuted instantiation: ed25519.c:MakeWordFromHash Unexecuted instantiation: ed448.c:MakeWordFromHash Unexecuted instantiation: fe_448.c:MakeWordFromHash Unexecuted instantiation: fe_operations.c:MakeWordFromHash Unexecuted instantiation: ge_448.c:MakeWordFromHash Unexecuted instantiation: ge_operations.c:MakeWordFromHash Unexecuted instantiation: hash.c:MakeWordFromHash Unexecuted instantiation: hmac.c:MakeWordFromHash Unexecuted instantiation: kdf.c:MakeWordFromHash Unexecuted instantiation: md2.c:MakeWordFromHash Unexecuted instantiation: md4.c:MakeWordFromHash Unexecuted instantiation: md5.c:MakeWordFromHash Unexecuted instantiation: memory.c:MakeWordFromHash Unexecuted instantiation: poly1305.c:MakeWordFromHash Unexecuted instantiation: pwdbased.c:MakeWordFromHash Unexecuted instantiation: random.c:MakeWordFromHash Unexecuted instantiation: ripemd.c:MakeWordFromHash Unexecuted instantiation: rsa.c:MakeWordFromHash Unexecuted instantiation: sha.c:MakeWordFromHash Unexecuted instantiation: sha256.c:MakeWordFromHash Unexecuted instantiation: sha3.c:MakeWordFromHash Unexecuted instantiation: sha512.c:MakeWordFromHash Unexecuted instantiation: siphash.c:MakeWordFromHash Unexecuted instantiation: sm2.c:MakeWordFromHash Unexecuted instantiation: sm3.c:MakeWordFromHash Unexecuted instantiation: sm4.c:MakeWordFromHash Unexecuted instantiation: sp_int.c:MakeWordFromHash Unexecuted instantiation: wc_encrypt.c:MakeWordFromHash Unexecuted instantiation: wolfmath.c:MakeWordFromHash Line | Count | Source | 1515 | 4.89k | { | 1516 | 4.89k | return ((word32)hashID[0] << 24) | ((word32)hashID[1] << 16) | | 1517 | 4.89k | ((word32)hashID[2] << 8) | (word32)hashID[3]; | 1518 | 4.89k | } |
Unexecuted instantiation: tls.c:MakeWordFromHash Unexecuted instantiation: tls13.c:MakeWordFromHash Unexecuted instantiation: wc_mlkem.c:MakeWordFromHash Unexecuted instantiation: wc_mlkem_poly.c:MakeWordFromHash Unexecuted instantiation: internal.c:MakeWordFromHash Unexecuted instantiation: keys.c:MakeWordFromHash |
1519 | | #endif /* HAVE_SESSION_TICKET || !NO_CERTS || !NO_SESSION_CACHE */ |
1520 | | |
1521 | | |
1522 | | #if !defined(WOLFCRYPT_ONLY) && !defined(NO_HASH_WRAPPER) && \ |
1523 | | (!defined(NO_SESSION_CACHE) || defined(HAVE_SESSION_TICKET)) |
1524 | | |
1525 | | #include <wolfssl/wolfcrypt/hash.h> |
1526 | | |
1527 | | /* some session IDs aren't random after all, let's make them random */ |
1528 | | WC_MISC_STATIC WC_INLINE word32 HashObject(const byte* o, word32 len, |
1529 | | int* error) |
1530 | 522 | { |
1531 | 522 | byte digest[WC_MAX_DIGEST_SIZE]; |
1532 | | |
1533 | 522 | #ifndef NO_MD5 |
1534 | 522 | *error = wc_Md5Hash(o, len, digest); |
1535 | | #elif !defined(NO_SHA) |
1536 | | *error = wc_ShaHash(o, len, digest); |
1537 | | #elif !defined(NO_SHA256) |
1538 | | *error = wc_Sha256Hash(o, len, digest); |
1539 | | #else |
1540 | | #error "We need a digest to hash the session IDs" |
1541 | | #endif |
1542 | | |
1543 | 522 | return *error == 0 ? MakeWordFromHash(digest) : 0; /* 0 on failure */ |
1544 | 522 | } Unexecuted instantiation: aes.c:HashObject Unexecuted instantiation: arc4.c:HashObject Unexecuted instantiation: asn.c:HashObject Unexecuted instantiation: blake2b.c:HashObject Unexecuted instantiation: blake2s.c:HashObject Unexecuted instantiation: camellia.c:HashObject Unexecuted instantiation: chacha.c:HashObject Unexecuted instantiation: chacha20_poly1305.c:HashObject Unexecuted instantiation: cmac.c:HashObject Unexecuted instantiation: coding.c:HashObject Unexecuted instantiation: curve25519.c:HashObject Unexecuted instantiation: curve448.c:HashObject Unexecuted instantiation: des3.c:HashObject Unexecuted instantiation: dh.c:HashObject Unexecuted instantiation: ecc.c:HashObject Unexecuted instantiation: eccsi.c:HashObject Unexecuted instantiation: ed25519.c:HashObject Unexecuted instantiation: ed448.c:HashObject Unexecuted instantiation: fe_448.c:HashObject Unexecuted instantiation: fe_operations.c:HashObject Unexecuted instantiation: ge_448.c:HashObject Unexecuted instantiation: ge_operations.c:HashObject Unexecuted instantiation: hash.c:HashObject Unexecuted instantiation: hmac.c:HashObject Unexecuted instantiation: kdf.c:HashObject Unexecuted instantiation: md2.c:HashObject Unexecuted instantiation: md4.c:HashObject Unexecuted instantiation: md5.c:HashObject Unexecuted instantiation: memory.c:HashObject Unexecuted instantiation: poly1305.c:HashObject Unexecuted instantiation: pwdbased.c:HashObject Unexecuted instantiation: random.c:HashObject Unexecuted instantiation: ripemd.c:HashObject Unexecuted instantiation: rsa.c:HashObject Unexecuted instantiation: sha.c:HashObject Unexecuted instantiation: sha256.c:HashObject Unexecuted instantiation: sha3.c:HashObject Unexecuted instantiation: sha512.c:HashObject Unexecuted instantiation: siphash.c:HashObject Unexecuted instantiation: sm2.c:HashObject Unexecuted instantiation: sm3.c:HashObject Unexecuted instantiation: sm4.c:HashObject Unexecuted instantiation: sp_int.c:HashObject Unexecuted instantiation: wc_encrypt.c:HashObject Unexecuted instantiation: wolfmath.c:HashObject Line | Count | Source | 1530 | 522 | { | 1531 | 522 | byte digest[WC_MAX_DIGEST_SIZE]; | 1532 | | | 1533 | 522 | #ifndef NO_MD5 | 1534 | 522 | *error = wc_Md5Hash(o, len, digest); | 1535 | | #elif !defined(NO_SHA) | 1536 | | *error = wc_ShaHash(o, len, digest); | 1537 | | #elif !defined(NO_SHA256) | 1538 | | *error = wc_Sha256Hash(o, len, digest); | 1539 | | #else | 1540 | | #error "We need a digest to hash the session IDs" | 1541 | | #endif | 1542 | | | 1543 | 522 | return *error == 0 ? MakeWordFromHash(digest) : 0; /* 0 on failure */ | 1544 | 522 | } |
Unexecuted instantiation: tls.c:HashObject Unexecuted instantiation: tls13.c:HashObject Unexecuted instantiation: wc_mlkem.c:HashObject Unexecuted instantiation: wc_mlkem_poly.c:HashObject Unexecuted instantiation: internal.c:HashObject Unexecuted instantiation: keys.c:HashObject |
1545 | | #endif /* WOLFCRYPT_ONLY && !NO_HASH_WRAPPER && |
1546 | | * (!NO_SESSION_CACHE || HAVE_SESSION_TICKET) */ |
1547 | | |
1548 | | WC_MISC_STATIC WC_INLINE char* CopyString(const char* src, int srcLen, |
1549 | 6.75k | void* heap, int type) { |
1550 | 6.75k | char* dst = NULL; |
1551 | | |
1552 | 6.75k | if (src == NULL) |
1553 | 3.72k | return NULL; |
1554 | | |
1555 | 3.03k | if (srcLen <= 0) |
1556 | 1.97k | srcLen = (int)XSTRLEN(src); |
1557 | | |
1558 | 3.03k | dst = (char*)XMALLOC((size_t)srcLen + 1, heap, type); |
1559 | 3.03k | if (dst != NULL) { |
1560 | 3.03k | XMEMCPY(dst, src, (size_t)srcLen); |
1561 | 3.03k | dst[srcLen] = '\0'; |
1562 | 3.03k | } |
1563 | | |
1564 | 3.03k | return dst; |
1565 | 6.75k | } Unexecuted instantiation: aes.c:CopyString Unexecuted instantiation: arc4.c:CopyString Line | Count | Source | 1549 | 6.75k | void* heap, int type) { | 1550 | 6.75k | char* dst = NULL; | 1551 | | | 1552 | 6.75k | if (src == NULL) | 1553 | 3.72k | return NULL; | 1554 | | | 1555 | 3.03k | if (srcLen <= 0) | 1556 | 1.97k | srcLen = (int)XSTRLEN(src); | 1557 | | | 1558 | 3.03k | dst = (char*)XMALLOC((size_t)srcLen + 1, heap, type); | 1559 | 3.03k | if (dst != NULL) { | 1560 | 3.03k | XMEMCPY(dst, src, (size_t)srcLen); | 1561 | 3.03k | dst[srcLen] = '\0'; | 1562 | 3.03k | } | 1563 | | | 1564 | 3.03k | return dst; | 1565 | 6.75k | } |
Unexecuted instantiation: blake2b.c:CopyString Unexecuted instantiation: blake2s.c:CopyString Unexecuted instantiation: camellia.c:CopyString Unexecuted instantiation: chacha.c:CopyString Unexecuted instantiation: chacha20_poly1305.c:CopyString Unexecuted instantiation: cmac.c:CopyString Unexecuted instantiation: coding.c:CopyString Unexecuted instantiation: curve25519.c:CopyString Unexecuted instantiation: curve448.c:CopyString Unexecuted instantiation: des3.c:CopyString Unexecuted instantiation: dh.c:CopyString Unexecuted instantiation: ecc.c:CopyString Unexecuted instantiation: eccsi.c:CopyString Unexecuted instantiation: ed25519.c:CopyString Unexecuted instantiation: ed448.c:CopyString Unexecuted instantiation: fe_448.c:CopyString Unexecuted instantiation: fe_operations.c:CopyString Unexecuted instantiation: ge_448.c:CopyString Unexecuted instantiation: ge_operations.c:CopyString Unexecuted instantiation: hash.c:CopyString Unexecuted instantiation: hmac.c:CopyString Unexecuted instantiation: kdf.c:CopyString Unexecuted instantiation: md2.c:CopyString Unexecuted instantiation: md4.c:CopyString Unexecuted instantiation: md5.c:CopyString Unexecuted instantiation: memory.c:CopyString Unexecuted instantiation: poly1305.c:CopyString Unexecuted instantiation: pwdbased.c:CopyString Unexecuted instantiation: random.c:CopyString Unexecuted instantiation: ripemd.c:CopyString Unexecuted instantiation: rsa.c:CopyString Unexecuted instantiation: sha.c:CopyString Unexecuted instantiation: sha256.c:CopyString Unexecuted instantiation: sha3.c:CopyString Unexecuted instantiation: sha512.c:CopyString Unexecuted instantiation: siphash.c:CopyString Unexecuted instantiation: sm2.c:CopyString Unexecuted instantiation: sm3.c:CopyString Unexecuted instantiation: sm4.c:CopyString Unexecuted instantiation: sp_int.c:CopyString Unexecuted instantiation: wc_encrypt.c:CopyString Unexecuted instantiation: wolfmath.c:CopyString Unexecuted instantiation: ssl.c:CopyString Unexecuted instantiation: tls.c:CopyString Unexecuted instantiation: tls13.c:CopyString Unexecuted instantiation: wc_mlkem.c:CopyString Unexecuted instantiation: wc_mlkem_poly.c:CopyString Unexecuted instantiation: internal.c:CopyString Unexecuted instantiation: keys.c:CopyString |
1566 | | |
1567 | | #endif /* !WOLFSSL_MISC_INCLUDED && !NO_INLINE */ |
1568 | | |
1569 | | #endif /* WOLF_CRYPT_MISC_C */ |