Coverage Report

Created: 2026-08-15 06:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wolfssl-heapmath/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
358M
    {
117
358M
        return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y));
118
358M
    }
aes.c:rotlFixed
Line
Count
Source
116
1.05M
    {
117
        return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y));
118
1.05M
    }
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
chacha.c:rotlFixed
Line
Count
Source
116
1.84M
    {
117
        return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y));
118
1.84M
    }
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
des3.c:rotlFixed
Line
Count
Source
116
37.2k
    {
117
        return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y));
118
37.2k
    }
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: integer.c:rotlFixed
Unexecuted instantiation: kdf.c:rotlFixed
Unexecuted instantiation: md2.c:rotlFixed
md4.c:rotlFixed
Line
Count
Source
116
1.44M
    {
117
        return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y));
118
1.44M
    }
md5.c:rotlFixed
Line
Count
Source
116
54.8M
    {
117
        return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y));
118
54.8M
    }
Unexecuted instantiation: memory.c:rotlFixed
Unexecuted instantiation: poly1305.c:rotlFixed
Unexecuted instantiation: pwdbased.c:rotlFixed
random.c:rotlFixed
Line
Count
Source
116
410k
    {
117
        return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y));
118
410k
    }
Unexecuted instantiation: ripemd.c:rotlFixed
Unexecuted instantiation: rsa.c:rotlFixed
sha.c:rotlFixed
Line
Count
Source
116
283M
    {
117
        return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y));
118
283M
    }
sha256.c:rotlFixed
Line
Count
Source
116
15.4M
    {
117
        return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y));
118
15.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: 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
564M
    {
123
564M
        return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y));
124
564M
    }
aes.c:rotrFixed
Line
Count
Source
122
1.05M
    {
123
        return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y));
124
1.05M
    }
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
des3.c:rotrFixed
Line
Count
Source
122
168k
    {
123
        return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y));
124
168k
    }
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: integer.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
random.c:rotrFixed
Line
Count
Source
122
410k
    {
123
        return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y));
124
410k
    }
Unexecuted instantiation: ripemd.c:rotrFixed
Unexecuted instantiation: rsa.c:rotrFixed
sha.c:rotrFixed
Line
Count
Source
122
19.5M
    {
123
        return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y));
124
19.5M
    }
sha256.c:rotrFixed
Line
Count
Source
122
543M
    {
123
        return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y));
124
543M
    }
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: 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: integer.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: 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: integer.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: 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
36.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
36.4M
    return (rotrFixed(value, 8U) & 0xff00ff00) |
178
36.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
36.4M
}
aes.c:ByteReverseWord32
Line
Count
Source
146
1.05M
{
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.05M
    return (rotrFixed(value, 8U) & 0xff00ff00) |
178
1.05M
           (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.05M
}
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
des3.c:ByteReverseWord32
Line
Count
Source
146
14.9k
{
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
14.9k
    return (rotrFixed(value, 8U) & 0xff00ff00) |
178
14.9k
           (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
14.9k
}
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: integer.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
410k
{
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
410k
    return (rotrFixed(value, 8U) & 0xff00ff00) |
178
410k
           (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
410k
}
Unexecuted instantiation: ripemd.c:ByteReverseWord32
Unexecuted instantiation: rsa.c:ByteReverseWord32
sha.c:ByteReverseWord32
Line
Count
Source
146
19.5M
{
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
19.5M
    return (rotrFixed(value, 8U) & 0xff00ff00) |
178
19.5M
           (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
19.5M
}
sha256.c:ByteReverseWord32
Line
Count
Source
146
15.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
15.4M
    return (rotrFixed(value, 8U) & 0xff00ff00) |
178
15.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
15.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: 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.36M
{
190
2.36M
    word32 i;
191
192
2.36M
#ifdef WOLFSSL_USE_ALIGN
193
2.36M
    if ((((size_t)in & 0x3) == 0) &&
194
2.36M
        (((size_t)out & 0x3) == 0))
195
2.36M
#endif
196
2.36M
    {
197
2.36M
        word32 count = byteCount/(word32)sizeof(word32);
198
37.3M
        for (i = 0; i < count; i++)
199
35.0M
            out[i] = ByteReverseWord32(in[i]);
200
2.36M
    }
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.36M
#endif
238
2.36M
}
aes.c:ByteReverseWords
Line
Count
Source
189
7.95k
{
190
7.95k
    word32 i;
191
192
7.95k
#ifdef WOLFSSL_USE_ALIGN
193
7.95k
    if ((((size_t)in & 0x3) == 0) &&
194
7.95k
        (((size_t)out & 0x3) == 0))
195
7.95k
#endif
196
7.95k
    {
197
7.95k
        word32 count = byteCount/(word32)sizeof(word32);
198
50.4k
        for (i = 0; i < count; i++)
199
42.5k
            out[i] = ByteReverseWord32(in[i]);
200
7.95k
    }
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
7.95k
#endif
238
7.95k
}
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: integer.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
sha.c:ByteReverseWords
Line
Count
Source
189
1.31M
{
190
1.31M
    word32 i;
191
192
1.31M
#ifdef WOLFSSL_USE_ALIGN
193
1.31M
    if ((((size_t)in & 0x3) == 0) &&
194
1.31M
        (((size_t)out & 0x3) == 0))
195
1.31M
#endif
196
1.31M
    {
197
1.31M
        word32 count = byteCount/(word32)sizeof(word32);
198
20.8M
        for (i = 0; i < count; i++)
199
19.5M
            out[i] = ByteReverseWord32(in[i]);
200
1.31M
    }
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.31M
#endif
238
1.31M
}
sha256.c:ByteReverseWords
Line
Count
Source
189
1.03M
{
190
1.03M
    word32 i;
191
192
1.03M
#ifdef WOLFSSL_USE_ALIGN
193
1.03M
    if ((((size_t)in & 0x3) == 0) &&
194
1.03M
        (((size_t)out & 0x3) == 0))
195
1.03M
#endif
196
1.03M
    {
197
1.03M
        word32 count = byteCount/(word32)sizeof(word32);
198
16.4M
        for (i = 0; i < count; i++)
199
15.4M
            out[i] = ByteReverseWord32(in[i]);
200
1.03M
    }
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.03M
#endif
238
1.03M
}
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: 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: integer.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: 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: integer.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: 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
2.60k
{
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.60k
    return *(const uword32 *)in;
307
2.60k
#endif
308
2.60k
}
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.60k
{
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.60k
    return *(const uword32 *)in;
307
2.60k
#endif
308
2.60k
}
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: integer.c:readUnalignedWord32
Unexecuted instantiation: kdf.c:readUnalignedWord32
Unexecuted instantiation: md2.c:readUnalignedWord32
Unexecuted instantiation: md4.c:readUnalignedWord32
Unexecuted instantiation: md5.c:readUnalignedWord32
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
Unexecuted instantiation: sha256.c:readUnalignedWord32
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: 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
#ifndef WOLFSSL_RW_UNALIGNED_32
313
0
    if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0) {
314
0
        *(word32 *)out = in;
315
0
    }
316
0
    else {
317
0
        XMEMCPY(out, &in, sizeof(in));
318
0
    }
319
0
#else
320
0
    *(uword32 *)out = in;
321
0
#endif
322
0
    return in;
323
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: integer.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: 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
324
325
WC_MISC_STATIC WC_INLINE void readUnalignedWords32(word32 *out, const byte *in,
326
                                                   size_t count)
327
0
{
328
0
#ifndef WOLFSSL_RW_UNALIGNED_32
329
0
    if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0) {
330
0
        const word32 *in_word32 = (const word32 *)in;
331
0
        while (count-- > 0)
332
0
            *out++ = *in_word32++;
333
0
    }
334
0
    else {
335
0
        XMEMCPY(out, in, count * sizeof(*out));
336
0
    }
337
0
#else
338
0
    const uword32 *in_word32 = (const uword32 *)in;
339
0
    while (count-- > 0)
340
0
        *out++ = *in_word32++;
341
0
#endif
342
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: integer.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: 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
343
344
WC_MISC_STATIC WC_INLINE void writeUnalignedWords32(byte *out, const word32 *in,
345
                                                    size_t count)
346
0
{
347
0
#ifndef WOLFSSL_RW_UNALIGNED_32
348
0
    if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0) {
349
0
        word32 *out_word32 = (word32 *)out;
350
0
        while (count-- > 0)
351
0
            *out_word32++ = *in++;
352
0
    }
353
0
    else {
354
0
        XMEMCPY(out, in, count * sizeof(*in));
355
0
    }
356
0
#else
357
0
    uword32 *out_word32 = (uword32 *)out;
358
0
    while (count-- > 0)
359
0
        *out_word32++ = *in++;
360
0
#endif
361
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: integer.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: 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
362
363
#if defined(WORD64_AVAILABLE) && !defined(WOLFSSL_NO_WORD64_OPS)
364
365
#if ((defined(WOLFSSL_AARCH64_BUILD) || defined(__aarch64__)) && \
366
     defined(__APPLE__)) || \
367
    defined(WOLFSSL_X86_64_BUILD) || defined(WOLFSSL_X86_BUILD)
368
    #ifndef WOLFSSL_RW_UNALIGNED_64
369
        #define WOLFSSL_RW_UNALIGNED_64
370
    #endif
371
#endif
372
#ifdef WOLFSSL_RW_UNALIGNED_64
373
typedef word64 MAYBE_UNALIGNED uword64;
374
#endif
375
376
WC_MISC_STATIC WC_INLINE word64 readUnalignedWord64(const byte *in)
377
3.71M
{
378
#ifdef WOLFSSL_WIDE_BYTE
379
    /* Where a C byte is wider than an octet (CHAR_BIT != 8, e.g. TI C28x) the
380
     * input holds one octet per cell, so assemble 8 octets little-endian rather
381
     * than aliasing whole cells as a word64. */
382
    return  (word64)(in[0] & 0xFF)        | ((word64)(in[1] & 0xFF) <<  8) |
383
           ((word64)(in[2] & 0xFF) << 16) | ((word64)(in[3] & 0xFF) << 24) |
384
           ((word64)(in[4] & 0xFF) << 32) | ((word64)(in[5] & 0xFF) << 40) |
385
           ((word64)(in[6] & 0xFF) << 48) | ((word64)(in[7] & 0xFF) << 56);
386
#elif !defined(WOLFSSL_RW_UNALIGNED_64)
387
    if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0) {
388
        return *(const word64 *)in;
389
    }
390
    else {
391
        word64 out = 0; /* else CONFIG_FORTIFY_SOURCE -Wmaybe-uninitialized */
392
        XMEMCPY(&out, in, sizeof(out));
393
        return out;
394
    }
395
#else
396
3.71M
    return *(const uword64 *)in;
397
3.71M
#endif
398
3.71M
}
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: integer.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: 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
377
3.71M
{
378
#ifdef WOLFSSL_WIDE_BYTE
379
    /* Where a C byte is wider than an octet (CHAR_BIT != 8, e.g. TI C28x) the
380
     * input holds one octet per cell, so assemble 8 octets little-endian rather
381
     * than aliasing whole cells as a word64. */
382
    return  (word64)(in[0] & 0xFF)        | ((word64)(in[1] & 0xFF) <<  8) |
383
           ((word64)(in[2] & 0xFF) << 16) | ((word64)(in[3] & 0xFF) << 24) |
384
           ((word64)(in[4] & 0xFF) << 32) | ((word64)(in[5] & 0xFF) << 40) |
385
           ((word64)(in[6] & 0xFF) << 48) | ((word64)(in[7] & 0xFF) << 56);
386
#elif !defined(WOLFSSL_RW_UNALIGNED_64)
387
    if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0) {
388
        return *(const word64 *)in;
389
    }
390
    else {
391
        word64 out = 0; /* else CONFIG_FORTIFY_SOURCE -Wmaybe-uninitialized */
392
        XMEMCPY(&out, in, sizeof(out));
393
        return out;
394
    }
395
#else
396
3.71M
    return *(const uword64 *)in;
397
3.71M
#endif
398
3.71M
}
Unexecuted instantiation: internal.c:readUnalignedWord64
Unexecuted instantiation: keys.c:readUnalignedWord64
399
400
WC_MISC_STATIC WC_INLINE word64 writeUnalignedWord64(void *out, word64 in)
401
0
{
402
#ifndef WOLFSSL_RW_UNALIGNED_64
403
    if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0) {
404
        *(word64 *)out = in;
405
    }
406
    else {
407
        XMEMCPY(out, &in, sizeof(in));
408
    }
409
#else
410
0
    *(uword64 *)out = in;
411
0
#endif
412
0
    return in;
413
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: integer.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: 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
414
415
WC_MISC_STATIC WC_INLINE void readUnalignedWords64(word64 *out, const byte *in,
416
                                                   size_t count)
417
0
{
418
0
#ifndef WOLFSSL_RW_UNALIGNED_64
419
0
    if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0) {
420
0
        const word64 *in_word64 = (const word64 *)in;
421
0
        while (count-- > 0)
422
0
            *out++ = *in_word64++;
423
0
    }
424
0
    else {
425
0
        XMEMCPY(out, in, count * sizeof(*out));
426
0
    }
427
0
#else
428
0
    const uword64 *in_word64 = (const uword64 *)in;
429
0
    while (count-- > 0)
430
0
        *out++ = *in_word64++;
431
0
#endif
432
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: integer.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: 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
433
434
WC_MISC_STATIC WC_INLINE void writeUnalignedWords64(byte *out, const word64 *in,
435
                                                    size_t count)
436
0
{
437
0
#ifndef WOLFSSL_RW_UNALIGNED_64
438
0
    if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0) {
439
0
        word64 *out_word64 = (word64 *)out;
440
0
        while (count-- > 0)
441
0
            *out_word64++ = *in++;
442
0
    }
443
0
    else {
444
0
        XMEMCPY(out, in, count * sizeof(*in));
445
0
    }
446
0
#else
447
0
    uword64 *out_word64 = (uword64 *)out;
448
0
    while (count-- > 0)
449
0
        *out_word64++ = *in++;
450
0
#endif
451
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: integer.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: 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
452
453
WC_MISC_STATIC WC_INLINE word64 rotlFixed64(word64 x, word64 y)
454
83.7M
{
455
83.7M
    return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y));
456
83.7M
}
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: integer.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
random.c:rotlFixed64
Line
Count
Source
454
561k
{
455
    return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y));
456
561k
}
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
sha512.c:rotlFixed64
Line
Count
Source
454
83.1M
{
455
    return (x << y) | (x >> (sizeof(x) * CHAR_BIT - y));
456
83.1M
}
Unexecuted instantiation: siphash.c:rotlFixed64
Unexecuted instantiation: sm2.c:rotlFixed64
Unexecuted instantiation: sm3.c:rotlFixed64
Unexecuted instantiation: sm4.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
457
458
459
WC_MISC_STATIC WC_INLINE word64 rotrFixed64(word64 x, word64 y)
460
3.07G
{
461
3.07G
    return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y));
462
3.07G
}
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: integer.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
sha512.c:rotrFixed64
Line
Count
Source
460
3.07G
{
461
    return (x >> y) | (x << (sizeof(x) * CHAR_BIT - y));
462
3.07G
}
Unexecuted instantiation: siphash.c:rotrFixed64
Unexecuted instantiation: sm2.c:rotrFixed64
Unexecuted instantiation: sm3.c:rotrFixed64
Unexecuted instantiation: sm4.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
463
464
465
WC_MISC_STATIC WC_INLINE word64 ByteReverseWord64(word64 value)
466
83.7M
{
467
#if defined(WOLF_ALLOW_BUILTIN) && defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3)
468
    return (word64)__builtin_bswap64(value);
469
#elif defined(WOLFCRYPT_SLOW_WORD64)
470
    return (word64)((word64)ByteReverseWord32((word32) value)) << 32 |
471
        (word64)ByteReverseWord32((word32)(value   >> 32));
472
#else
473
83.7M
    value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) |
474
83.7M
        ((value & W64LIT(0x00FF00FF00FF00FF)) << 8);
475
83.7M
    value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) |
476
83.7M
        ((value & W64LIT(0x0000FFFF0000FFFF)) << 16);
477
83.7M
    return rotlFixed64(value, 32U);
478
83.7M
#endif
479
83.7M
}
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: integer.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
466
561k
{
467
#if defined(WOLF_ALLOW_BUILTIN) && defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3)
468
    return (word64)__builtin_bswap64(value);
469
#elif defined(WOLFCRYPT_SLOW_WORD64)
470
    return (word64)((word64)ByteReverseWord32((word32) value)) << 32 |
471
        (word64)ByteReverseWord32((word32)(value   >> 32));
472
#else
473
561k
    value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) |
474
561k
        ((value & W64LIT(0x00FF00FF00FF00FF)) << 8);
475
561k
    value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) |
476
561k
        ((value & W64LIT(0x0000FFFF0000FFFF)) << 16);
477
561k
    return rotlFixed64(value, 32U);
478
561k
#endif
479
561k
}
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
466
83.1M
{
467
#if defined(WOLF_ALLOW_BUILTIN) && defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3)
468
    return (word64)__builtin_bswap64(value);
469
#elif defined(WOLFCRYPT_SLOW_WORD64)
470
    return (word64)((word64)ByteReverseWord32((word32) value)) << 32 |
471
        (word64)ByteReverseWord32((word32)(value   >> 32));
472
#else
473
83.1M
    value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) |
474
83.1M
        ((value & W64LIT(0x00FF00FF00FF00FF)) << 8);
475
83.1M
    value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) |
476
83.1M
        ((value & W64LIT(0x0000FFFF0000FFFF)) << 16);
477
83.1M
    return rotlFixed64(value, 32U);
478
83.1M
#endif
479
83.1M
}
Unexecuted instantiation: siphash.c:ByteReverseWord64
Unexecuted instantiation: sm2.c:ByteReverseWord64
Unexecuted instantiation: sm3.c:ByteReverseWord64
Unexecuted instantiation: sm4.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
480
481
482
WC_MISC_STATIC WC_INLINE void ByteReverseWords64(word64* out, const word64* in,
483
                                      word32 byteCount)
484
6.85M
{
485
6.85M
    word32 count = byteCount/(word32)sizeof(word64), i;
486
487
6.85M
#ifdef WOLFSSL_USE_ALIGN
488
6.85M
    if ((((size_t)in & 0x7) == 0) &&
489
6.85M
        (((size_t)out & 0x7) == 0))
490
6.85M
#endif
491
6.85M
    {
492
90.0M
        for (i = 0; i < count; i++)
493
83.1M
            out[i] = ByteReverseWord64(in[i]);
494
6.85M
    }
495
0
#ifdef WOLFSSL_USE_ALIGN
496
0
    else if (((size_t)in & 0x7) == 0) {
497
0
        byte *out_bytes = (byte *)out;
498
0
        word64 scratch;
499
500
0
        byteCount &= ~0x7U;
501
502
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word64)) {
503
0
            scratch = ByteReverseWord64(*in++);
504
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
505
0
        }
506
0
    }
507
0
    else if (((size_t)out & 0x7) == 0) {
508
0
        const byte *in_bytes = (const byte *)in;
509
0
        word64 scratch;
510
511
0
        byteCount &= ~0x7U;
512
513
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word64)) {
514
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
515
0
            *out++ = ByteReverseWord64(scratch);
516
0
        }
517
0
    }
518
0
    else {
519
0
        const byte *in_bytes = (const byte *)in;
520
0
        byte *out_bytes = (byte *)out;
521
0
        word64 scratch;
522
523
0
        byteCount &= ~0x7U;
524
525
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word64)) {
526
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
527
0
            scratch = ByteReverseWord64(scratch);
528
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
529
0
        }
530
0
    }
531
6.85M
#endif
532
6.85M
}
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: integer.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
484
6.85M
{
485
6.85M
    word32 count = byteCount/(word32)sizeof(word64), i;
486
487
6.85M
#ifdef WOLFSSL_USE_ALIGN
488
6.85M
    if ((((size_t)in & 0x7) == 0) &&
489
6.85M
        (((size_t)out & 0x7) == 0))
490
6.85M
#endif
491
6.85M
    {
492
90.0M
        for (i = 0; i < count; i++)
493
83.1M
            out[i] = ByteReverseWord64(in[i]);
494
6.85M
    }
495
0
#ifdef WOLFSSL_USE_ALIGN
496
0
    else if (((size_t)in & 0x7) == 0) {
497
0
        byte *out_bytes = (byte *)out;
498
0
        word64 scratch;
499
500
0
        byteCount &= ~0x7U;
501
502
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word64)) {
503
0
            scratch = ByteReverseWord64(*in++);
504
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
505
0
        }
506
0
    }
507
0
    else if (((size_t)out & 0x7) == 0) {
508
0
        const byte *in_bytes = (const byte *)in;
509
0
        word64 scratch;
510
511
0
        byteCount &= ~0x7U;
512
513
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word64)) {
514
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
515
0
            *out++ = ByteReverseWord64(scratch);
516
0
        }
517
0
    }
518
0
    else {
519
0
        const byte *in_bytes = (const byte *)in;
520
0
        byte *out_bytes = (byte *)out;
521
0
        word64 scratch;
522
523
0
        byteCount &= ~0x7U;
524
525
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word64)) {
526
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
527
0
            scratch = ByteReverseWord64(scratch);
528
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
529
0
        }
530
0
    }
531
6.85M
#endif
532
6.85M
}
Unexecuted instantiation: siphash.c:ByteReverseWords64
Unexecuted instantiation: sm2.c:ByteReverseWords64
Unexecuted instantiation: sm3.c:ByteReverseWords64
Unexecuted instantiation: sm4.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
533
534
#endif /* WORD64_AVAILABLE && !WOLFSSL_NO_WORD64_OPS */
535
536
#ifdef WOLFSSL_WIDE_BYTE
537
/* Big-endian octet <-> word conversion for WOLFSSL_WIDE_BYTE targets (a C byte
538
 * is wider than an octet, e.g. TI C28x), where a word packs several octets per
539
 * cell and so cannot be aliased as an octet stream.  Loads accumulate with
540
 * <<= 8 (a single (word32)octet << 24 is miscompiled as a 16-bit shift by
541
 * cl2000) and read a whole word before writing, so they are safe in place.
542
 * Stores take an octet count so a partial trailing word works (e.g. the
543
 * 28-octet SHA-512/224 digest).  Shared by SHA-2 and the Hash-DRBG. */
544
WC_MISC_STATIC WC_INLINE void WordsFromBytesBE32(word32* w, const byte* b,
545
    word32 wordCnt)
546
{
547
    word32 i;
548
    word32 r;
549
    for (i = 0; i < wordCnt; i++) {
550
        r  = (word32)(b[(i * 4) + 0] & 0xFF); r <<= 8;
551
        r |= (word32)(b[(i * 4) + 1] & 0xFF); r <<= 8;
552
        r |= (word32)(b[(i * 4) + 2] & 0xFF); r <<= 8;
553
        r |= (word32)(b[(i * 4) + 3] & 0xFF);
554
        w[i] = r;
555
    }
556
}
557
WC_MISC_STATIC WC_INLINE void BytesFromWordsBE32(byte* b, const word32* w,
558
    word32 byteCnt)
559
{
560
    word32 i;
561
    for (i = 0; i < byteCnt; i++) {
562
        b[i] = (byte)((w[i >> 2] >> (24 - ((i & 0x3) * 8))) & 0xFF);
563
    }
564
}
565
/* Serialize words to little-endian octets (one octet per byte cell). */
566
WC_MISC_STATIC WC_INLINE void BytesFromWordsLE32(byte* b, const word32* w,
567
    word32 byteCnt)
568
{
569
    word32 i;
570
    for (i = 0; i < byteCnt; i++) {
571
        b[i] = (byte)((w[i >> 2] >> ((i & 0x3) * 8)) & 0xFF);
572
    }
573
}
574
#ifdef WORD64_AVAILABLE
575
WC_MISC_STATIC WC_INLINE void WordsFromBytesBE64(word64* w, const byte* b,
576
    word32 wordCnt)
577
{
578
    word32 i;
579
    int    j;
580
    word64 r;
581
    for (i = 0; i < wordCnt; i++) {
582
        r = 0;
583
        for (j = 0; j < 8; j++) {
584
            r <<= 8;
585
            r |= (word64)(b[(i * 8) + j] & 0xFF);
586
        }
587
        w[i] = r;
588
    }
589
}
590
WC_MISC_STATIC WC_INLINE void BytesFromWordsBE64(byte* b, const word64* w,
591
    word32 byteCnt)
592
{
593
    word32 i;
594
    for (i = 0; i < byteCnt; i++) {
595
        b[i] = (byte)((w[i >> 3] >> (56 - ((i & 0x7) * 8))) & 0xFF);
596
    }
597
}
598
#endif /* WORD64_AVAILABLE */
599
#endif /* WOLFSSL_WIDE_BYTE */
600
601
#ifndef WOLFSSL_NO_XOR_OPS
602
603
/* Leave no doubt that WOLFSSL_WORD_SIZE is a power of 2. */
604
wc_static_assert((WOLFSSL_WORD_SIZE & (WOLFSSL_WORD_SIZE - 1)) == 0);
605
606
/* This routine performs a bitwise XOR operation of <*a> and <*b> for <n> number
607
of wolfssl_words, placing the result in <*r>. */
608
WC_MISC_STATIC WC_INLINE void XorWordsOut(wolfssl_word** r,
609
                       const wolfssl_word** a, const wolfssl_word** b, word32 n)
610
20.3k
{
611
20.3k
    const wolfssl_word *e = *a + n;
612
613
49.6k
    while (*a < e)
614
29.3k
        *((*r)++) = *((*a)++) ^ *((*b)++);
615
20.3k
}
aes.c:XorWordsOut
Line
Count
Source
610
19.7k
{
611
19.7k
    const wolfssl_word *e = *a + n;
612
613
46.4k
    while (*a < e)
614
26.7k
        *((*r)++) = *((*a)++) ^ *((*b)++);
615
19.7k
}
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
chacha.c:XorWordsOut
Line
Count
Source
610
585
{
611
585
    const wolfssl_word *e = *a + n;
612
613
3.12k
    while (*a < e)
614
2.53k
        *((*r)++) = *((*a)++) ^ *((*b)++);
615
585
}
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: integer.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: 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
616
617
/* This routine performs a bitwise XOR operation of <*buf> and <*mask> of n
618
counts, placing the result in <*out>. */
619
620
WC_MISC_STATIC WC_INLINE void xorbufout(void* out, const void* buf,
621
                                        const void* mask, word32 count)
622
41.2k
{
623
41.2k
    byte*       o = (byte*)out;
624
41.2k
    const byte* b = (const byte*)buf;
625
41.2k
    const byte* m = (const byte*)mask;
626
627
    /* type-punning helpers */
628
41.2k
    union {
629
41.2k
        byte* bp;
630
41.2k
        wolfssl_word* wp;
631
41.2k
    } tpo;
632
41.2k
    union {
633
41.2k
        const byte* bp;
634
41.2k
        const wolfssl_word* wp;
635
41.2k
    } tpb, tpm;
636
637
41.2k
    if (((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
638
15.1k
        ((((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
639
15.1k
        ((((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)) == 0))
640
15.1k
    {
641
        /* All buffers are already aligned.  Possible to XOR by words without
642
         * fixup.
643
         */
644
645
15.1k
        tpo.bp = o;
646
15.1k
        tpb.bp = b;
647
15.1k
        tpm.bp = m;
648
15.1k
        XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
649
15.1k
        o = tpo.bp;
650
15.1k
        b = tpb.bp;
651
15.1k
        m = tpm.bp;
652
15.1k
        count &= (WOLFSSL_WORD_SIZE - 1);
653
15.1k
    }
654
26.1k
    else if ((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) ==
655
26.1k
             (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) &&
656
10.2k
             (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) ==
657
10.2k
             (((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)))
658
5.10k
    {
659
        /* Alignment can be fixed up to allow XOR by words. */
660
661
        /* Perform bytewise xor until pointers are aligned to
662
         * WOLFSSL_WORD_SIZE.
663
         */
664
8.06k
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
665
2.96k
        {
666
2.96k
            *o++ = (byte)(*b++ ^ *m++);
667
2.96k
            count--;
668
2.96k
        }
669
670
5.10k
        tpo.bp = o;
671
5.10k
        tpb.bp = b;
672
5.10k
        tpm.bp = m;
673
5.10k
        XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
674
5.10k
        o = tpo.bp;
675
5.10k
        b = tpb.bp;
676
5.10k
        m = tpm.bp;
677
5.10k
        count &= (WOLFSSL_WORD_SIZE - 1);
678
5.10k
    }
679
680
614k
    while (count > 0) {
681
572k
        *o++ = (byte)(*b++ ^ *m++);
682
572k
        count--;
683
572k
    }
684
685
41.2k
}
aes.c:xorbufout
Line
Count
Source
622
35.5k
{
623
35.5k
    byte*       o = (byte*)out;
624
35.5k
    const byte* b = (const byte*)buf;
625
35.5k
    const byte* m = (const byte*)mask;
626
627
    /* type-punning helpers */
628
35.5k
    union {
629
35.5k
        byte* bp;
630
35.5k
        wolfssl_word* wp;
631
35.5k
    } tpo;
632
35.5k
    union {
633
35.5k
        const byte* bp;
634
35.5k
        const wolfssl_word* wp;
635
35.5k
    } tpb, tpm;
636
637
35.5k
    if (((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
638
14.6k
        ((((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
639
14.6k
        ((((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)) == 0))
640
14.6k
    {
641
        /* All buffers are already aligned.  Possible to XOR by words without
642
         * fixup.
643
         */
644
645
14.6k
        tpo.bp = o;
646
14.6k
        tpb.bp = b;
647
14.6k
        tpm.bp = m;
648
14.6k
        XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
649
14.6k
        o = tpo.bp;
650
14.6k
        b = tpb.bp;
651
14.6k
        m = tpm.bp;
652
14.6k
        count &= (WOLFSSL_WORD_SIZE - 1);
653
14.6k
    }
654
20.9k
    else if ((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) ==
655
20.9k
             (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) &&
656
5.10k
             (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) ==
657
5.10k
             (((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)))
658
5.10k
    {
659
        /* Alignment can be fixed up to allow XOR by words. */
660
661
        /* Perform bytewise xor until pointers are aligned to
662
         * WOLFSSL_WORD_SIZE.
663
         */
664
8.06k
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
665
2.96k
        {
666
2.96k
            *o++ = (byte)(*b++ ^ *m++);
667
2.96k
            count--;
668
2.96k
        }
669
670
5.10k
        tpo.bp = o;
671
5.10k
        tpb.bp = b;
672
5.10k
        tpm.bp = m;
673
5.10k
        XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
674
5.10k
        o = tpo.bp;
675
5.10k
        b = tpb.bp;
676
5.10k
        m = tpm.bp;
677
5.10k
        count &= (WOLFSSL_WORD_SIZE - 1);
678
5.10k
    }
679
680
289k
    while (count > 0) {
681
253k
        *o++ = (byte)(*b++ ^ *m++);
682
253k
        count--;
683
253k
    }
684
685
35.5k
}
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
chacha.c:xorbufout
Line
Count
Source
622
5.76k
{
623
5.76k
    byte*       o = (byte*)out;
624
5.76k
    const byte* b = (const byte*)buf;
625
5.76k
    const byte* m = (const byte*)mask;
626
627
    /* type-punning helpers */
628
5.76k
    union {
629
5.76k
        byte* bp;
630
5.76k
        wolfssl_word* wp;
631
5.76k
    } tpo;
632
5.76k
    union {
633
5.76k
        const byte* bp;
634
5.76k
        const wolfssl_word* wp;
635
5.76k
    } tpb, tpm;
636
637
5.76k
    if (((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
638
585
        ((((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
639
585
        ((((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)) == 0))
640
585
    {
641
        /* All buffers are already aligned.  Possible to XOR by words without
642
         * fixup.
643
         */
644
645
585
        tpo.bp = o;
646
585
        tpb.bp = b;
647
585
        tpm.bp = m;
648
585
        XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
649
585
        o = tpo.bp;
650
585
        b = tpb.bp;
651
585
        m = tpm.bp;
652
585
        count &= (WOLFSSL_WORD_SIZE - 1);
653
585
    }
654
5.18k
    else if ((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) ==
655
5.18k
             (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) &&
656
5.18k
             (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) ==
657
5.18k
             (((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)))
658
0
    {
659
        /* Alignment can be fixed up to allow XOR by words. */
660
661
        /* Perform bytewise xor until pointers are aligned to
662
         * WOLFSSL_WORD_SIZE.
663
         */
664
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
665
0
        {
666
0
            *o++ = (byte)(*b++ ^ *m++);
667
0
            count--;
668
0
        }
669
670
0
        tpo.bp = o;
671
0
        tpb.bp = b;
672
0
        tpm.bp = m;
673
0
        XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
674
0
        o = tpo.bp;
675
0
        b = tpb.bp;
676
0
        m = tpm.bp;
677
0
        count &= (WOLFSSL_WORD_SIZE - 1);
678
0
    }
679
680
324k
    while (count > 0) {
681
319k
        *o++ = (byte)(*b++ ^ *m++);
682
319k
        count--;
683
319k
    }
684
685
5.76k
}
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: integer.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: 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
686
687
/* This routine performs a bitwise XOR operation of <*r> and <*a> for <n> number
688
of wolfssl_words, placing the result in <*r>. */
689
WC_MISC_STATIC WC_INLINE void XorWords(wolfssl_word** r, const wolfssl_word** a,
690
                                       word32 n)
691
208k
{
692
208k
    const wolfssl_word *e = *a + n;
693
694
1.61M
    while (*a < e)
695
1.40M
        *((*r)++) ^= *((*a)++);
696
208k
}
aes.c:XorWords
Line
Count
Source
691
62.4k
{
692
62.4k
    const wolfssl_word *e = *a + n;
693
694
210k
    while (*a < e)
695
147k
        *((*r)++) ^= *((*a)++);
696
62.4k
}
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
cmac.c:XorWords
Line
Count
Source
691
270
{
692
270
    const wolfssl_word *e = *a + n;
693
694
810
    while (*a < e)
695
540
        *((*r)++) ^= *((*a)++);
696
270
}
Unexecuted instantiation: coding.c:XorWords
Unexecuted instantiation: curve25519.c:XorWords
Unexecuted instantiation: curve448.c:XorWords
des3.c:XorWords
Line
Count
Source
691
3.07k
{
692
3.07k
    const wolfssl_word *e = *a + n;
693
694
6.15k
    while (*a < e)
695
3.07k
        *((*r)++) ^= *((*a)++);
696
3.07k
}
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
Unexecuted instantiation: integer.c:XorWords
kdf.c:XorWords
Line
Count
Source
691
94
{
692
94
    const wolfssl_word *e = *a + n;
693
694
1.76k
    while (*a < e)
695
1.67k
        *((*r)++) ^= *((*a)++);
696
94
}
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
pwdbased.c:XorWords
Line
Count
Source
691
3.50k
{
692
3.50k
    const wolfssl_word *e = *a + n;
693
694
15.0k
    while (*a < e)
695
11.5k
        *((*r)++) ^= *((*a)++);
696
3.50k
}
Unexecuted instantiation: random.c:XorWords
Unexecuted instantiation: ripemd.c:XorWords
rsa.c:XorWords
Line
Count
Source
691
960
{
692
960
    const wolfssl_word *e = *a + n;
693
694
5.61k
    while (*a < e)
695
4.65k
        *((*r)++) ^= *((*a)++);
696
960
}
Unexecuted instantiation: sha.c:XorWords
Unexecuted instantiation: sha256.c:XorWords
sha3.c:XorWords
Line
Count
Source
691
136k
{
692
136k
    const wolfssl_word *e = *a + n;
693
694
1.37M
    while (*a < e)
695
1.23M
        *((*r)++) ^= *((*a)++);
696
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: wc_encrypt.c:XorWords
Unexecuted instantiation: wolfmath.c:XorWords
Unexecuted instantiation: ssl.c:XorWords
Unexecuted instantiation: tls.c:XorWords
tls13.c:XorWords
Line
Count
Source
691
1.59k
{
692
1.59k
    const wolfssl_word *e = *a + n;
693
694
1.72k
    while (*a < e)
695
126
        *((*r)++) ^= *((*a)++);
696
1.59k
}
Unexecuted instantiation: wc_mlkem.c:XorWords
Unexecuted instantiation: wc_mlkem_poly.c:XorWords
internal.c:XorWords
Line
Count
Source
691
10
{
692
10
    const wolfssl_word *e = *a + n;
693
694
20
    while (*a < e)
695
10
        *((*r)++) ^= *((*a)++);
696
10
}
Unexecuted instantiation: keys.c:XorWords
697
698
/* This routine performs a bitwise XOR operation of <*buf> and <*mask> of n
699
counts, placing the result in <*buf>. */
700
701
WC_MISC_STATIC WC_INLINE void xorbuf(void* buf, const void* mask, word32 count)
702
265k
{
703
265k
    byte*       b = (byte*)buf;
704
265k
    const byte* m = (const byte*)mask;
705
706
    /* type-punning helpers */
707
265k
    union {
708
265k
        byte* bp;
709
265k
        wolfssl_word* wp;
710
265k
    } tpb;
711
265k
    union {
712
265k
        const byte* bp;
713
265k
        const wolfssl_word* wp;
714
265k
    } tpm;
715
716
265k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
717
260k
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
718
206k
    {
719
        /* Both buffers are already aligned.  Possible to XOR by words without
720
         * fixup.
721
         */
722
723
206k
        tpb.bp = b;
724
206k
        tpm.bp = m;
725
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
726
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
727
            PRAGMA_GCC_DIAG_PUSH;
728
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
729
        #endif
730
206k
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
731
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
732
            PRAGMA_GCC_DIAG_POP;
733
        #endif
734
206k
        b = tpb.bp;
735
206k
        m = tpm.bp;
736
206k
        count &= (WOLFSSL_WORD_SIZE - 1);
737
206k
    }
738
58.9k
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
739
58.9k
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
740
2.05k
    {
741
        /* Alignment can be fixed up to allow XOR by words. */
742
743
        /* Perform bytewise xor until pointers are aligned to
744
         * WOLFSSL_WORD_SIZE.
745
         */
746
9.12k
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
747
7.06k
        {
748
7.06k
            *(b++) ^= *(m++);
749
7.06k
            count--;
750
7.06k
        }
751
752
2.05k
        tpb.bp = b;
753
2.05k
        tpm.bp = m;
754
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
755
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
756
            PRAGMA_GCC_DIAG_PUSH;
757
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
758
        #endif
759
2.05k
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
760
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
761
            PRAGMA_GCC_DIAG_POP;
762
        #endif
763
2.05k
        b = tpb.bp;
764
2.05k
        m = tpm.bp;
765
2.05k
        count &= (WOLFSSL_WORD_SIZE - 1);
766
2.05k
    }
767
768
2.13M
    while (count > 0) {
769
1.86M
        *b++ ^= *m++;
770
1.86M
        count--;
771
1.86M
    }
772
265k
}
aes.c:xorbuf
Line
Count
Source
702
111k
{
703
111k
    byte*       b = (byte*)buf;
704
111k
    const byte* m = (const byte*)mask;
705
706
    /* type-punning helpers */
707
111k
    union {
708
111k
        byte* bp;
709
111k
        wolfssl_word* wp;
710
111k
    } tpb;
711
111k
    union {
712
111k
        const byte* bp;
713
111k
        const wolfssl_word* wp;
714
111k
    } tpm;
715
716
111k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
717
110k
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
718
62.4k
    {
719
        /* Both buffers are already aligned.  Possible to XOR by words without
720
         * fixup.
721
         */
722
723
62.4k
        tpb.bp = b;
724
62.4k
        tpm.bp = m;
725
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
726
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
727
            PRAGMA_GCC_DIAG_PUSH;
728
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
729
        #endif
730
62.4k
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
731
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
732
            PRAGMA_GCC_DIAG_POP;
733
        #endif
734
62.4k
        b = tpb.bp;
735
62.4k
        m = tpm.bp;
736
62.4k
        count &= (WOLFSSL_WORD_SIZE - 1);
737
62.4k
    }
738
49.3k
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
739
49.3k
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
740
0
    {
741
        /* Alignment can be fixed up to allow XOR by words. */
742
743
        /* Perform bytewise xor until pointers are aligned to
744
         * WOLFSSL_WORD_SIZE.
745
         */
746
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
747
0
        {
748
0
            *(b++) ^= *(m++);
749
0
            count--;
750
0
        }
751
752
0
        tpb.bp = b;
753
0
        tpm.bp = m;
754
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
755
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
756
            PRAGMA_GCC_DIAG_PUSH;
757
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
758
        #endif
759
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
760
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
761
            PRAGMA_GCC_DIAG_POP;
762
        #endif
763
0
        b = tpb.bp;
764
0
        m = tpm.bp;
765
0
        count &= (WOLFSSL_WORD_SIZE - 1);
766
0
    }
767
768
888k
    while (count > 0) {
769
776k
        *b++ ^= *m++;
770
776k
        count--;
771
776k
    }
772
111k
}
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
cmac.c:xorbuf
Line
Count
Source
702
270
{
703
270
    byte*       b = (byte*)buf;
704
270
    const byte* m = (const byte*)mask;
705
706
    /* type-punning helpers */
707
270
    union {
708
270
        byte* bp;
709
270
        wolfssl_word* wp;
710
270
    } tpb;
711
270
    union {
712
270
        const byte* bp;
713
270
        const wolfssl_word* wp;
714
270
    } tpm;
715
716
270
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
717
270
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
718
270
    {
719
        /* Both buffers are already aligned.  Possible to XOR by words without
720
         * fixup.
721
         */
722
723
270
        tpb.bp = b;
724
270
        tpm.bp = m;
725
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
726
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
727
            PRAGMA_GCC_DIAG_PUSH;
728
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
729
        #endif
730
270
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
731
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
732
            PRAGMA_GCC_DIAG_POP;
733
        #endif
734
270
        b = tpb.bp;
735
270
        m = tpm.bp;
736
270
        count &= (WOLFSSL_WORD_SIZE - 1);
737
270
    }
738
0
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
739
0
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
740
0
    {
741
        /* Alignment can be fixed up to allow XOR by words. */
742
743
        /* Perform bytewise xor until pointers are aligned to
744
         * WOLFSSL_WORD_SIZE.
745
         */
746
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
747
0
        {
748
0
            *(b++) ^= *(m++);
749
0
            count--;
750
0
        }
751
752
0
        tpb.bp = b;
753
0
        tpm.bp = m;
754
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
755
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
756
            PRAGMA_GCC_DIAG_PUSH;
757
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
758
        #endif
759
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
760
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
761
            PRAGMA_GCC_DIAG_POP;
762
        #endif
763
0
        b = tpb.bp;
764
0
        m = tpm.bp;
765
0
        count &= (WOLFSSL_WORD_SIZE - 1);
766
0
    }
767
768
270
    while (count > 0) {
769
0
        *b++ ^= *m++;
770
0
        count--;
771
0
    }
772
270
}
Unexecuted instantiation: coding.c:xorbuf
Unexecuted instantiation: curve25519.c:xorbuf
Unexecuted instantiation: curve448.c:xorbuf
des3.c:xorbuf
Line
Count
Source
702
3.07k
{
703
3.07k
    byte*       b = (byte*)buf;
704
3.07k
    const byte* m = (const byte*)mask;
705
706
    /* type-punning helpers */
707
3.07k
    union {
708
3.07k
        byte* bp;
709
3.07k
        wolfssl_word* wp;
710
3.07k
    } tpb;
711
3.07k
    union {
712
3.07k
        const byte* bp;
713
3.07k
        const wolfssl_word* wp;
714
3.07k
    } tpm;
715
716
3.07k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
717
3.07k
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
718
3.07k
    {
719
        /* Both buffers are already aligned.  Possible to XOR by words without
720
         * fixup.
721
         */
722
723
3.07k
        tpb.bp = b;
724
3.07k
        tpm.bp = m;
725
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
726
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
727
            PRAGMA_GCC_DIAG_PUSH;
728
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
729
        #endif
730
3.07k
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
731
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
732
            PRAGMA_GCC_DIAG_POP;
733
        #endif
734
3.07k
        b = tpb.bp;
735
3.07k
        m = tpm.bp;
736
3.07k
        count &= (WOLFSSL_WORD_SIZE - 1);
737
3.07k
    }
738
0
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
739
0
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
740
0
    {
741
        /* Alignment can be fixed up to allow XOR by words. */
742
743
        /* Perform bytewise xor until pointers are aligned to
744
         * WOLFSSL_WORD_SIZE.
745
         */
746
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
747
0
        {
748
0
            *(b++) ^= *(m++);
749
0
            count--;
750
0
        }
751
752
0
        tpb.bp = b;
753
0
        tpm.bp = m;
754
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
755
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
756
            PRAGMA_GCC_DIAG_PUSH;
757
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
758
        #endif
759
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
760
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
761
            PRAGMA_GCC_DIAG_POP;
762
        #endif
763
0
        b = tpb.bp;
764
0
        m = tpm.bp;
765
0
        count &= (WOLFSSL_WORD_SIZE - 1);
766
0
    }
767
768
3.07k
    while (count > 0) {
769
0
        *b++ ^= *m++;
770
0
        count--;
771
0
    }
772
3.07k
}
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
Unexecuted instantiation: integer.c:xorbuf
kdf.c:xorbuf
Line
Count
Source
702
184
{
703
184
    byte*       b = (byte*)buf;
704
184
    const byte* m = (const byte*)mask;
705
706
    /* type-punning helpers */
707
184
    union {
708
184
        byte* bp;
709
184
        wolfssl_word* wp;
710
184
    } tpb;
711
184
    union {
712
184
        const byte* bp;
713
184
        const wolfssl_word* wp;
714
184
    } tpm;
715
716
184
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
717
94
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
718
94
    {
719
        /* Both buffers are already aligned.  Possible to XOR by words without
720
         * fixup.
721
         */
722
723
94
        tpb.bp = b;
724
94
        tpm.bp = m;
725
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
726
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
727
            PRAGMA_GCC_DIAG_PUSH;
728
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
729
        #endif
730
94
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
731
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
732
            PRAGMA_GCC_DIAG_POP;
733
        #endif
734
94
        b = tpb.bp;
735
94
        m = tpm.bp;
736
94
        count &= (WOLFSSL_WORD_SIZE - 1);
737
94
    }
738
90
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
739
90
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
740
0
    {
741
        /* Alignment can be fixed up to allow XOR by words. */
742
743
        /* Perform bytewise xor until pointers are aligned to
744
         * WOLFSSL_WORD_SIZE.
745
         */
746
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
747
0
        {
748
0
            *(b++) ^= *(m++);
749
0
            count--;
750
0
        }
751
752
0
        tpb.bp = b;
753
0
        tpm.bp = m;
754
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
755
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
756
            PRAGMA_GCC_DIAG_PUSH;
757
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
758
        #endif
759
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
760
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
761
            PRAGMA_GCC_DIAG_POP;
762
        #endif
763
0
        b = tpb.bp;
764
0
        m = tpm.bp;
765
0
        count &= (WOLFSSL_WORD_SIZE - 1);
766
0
    }
767
768
4.52k
    while (count > 0) {
769
4.33k
        *b++ ^= *m++;
770
4.33k
        count--;
771
4.33k
    }
772
184
}
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
pwdbased.c:xorbuf
Line
Count
Source
702
3.59k
{
703
3.59k
    byte*       b = (byte*)buf;
704
3.59k
    const byte* m = (const byte*)mask;
705
706
    /* type-punning helpers */
707
3.59k
    union {
708
3.59k
        byte* bp;
709
3.59k
        wolfssl_word* wp;
710
3.59k
    } tpb;
711
3.59k
    union {
712
3.59k
        const byte* bp;
713
3.59k
        const wolfssl_word* wp;
714
3.59k
    } tpm;
715
716
3.59k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
717
3.50k
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
718
3.50k
    {
719
        /* Both buffers are already aligned.  Possible to XOR by words without
720
         * fixup.
721
         */
722
723
3.50k
        tpb.bp = b;
724
3.50k
        tpm.bp = m;
725
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
726
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
727
            PRAGMA_GCC_DIAG_PUSH;
728
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
729
        #endif
730
3.50k
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
731
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
732
            PRAGMA_GCC_DIAG_POP;
733
        #endif
734
3.50k
        b = tpb.bp;
735
3.50k
        m = tpm.bp;
736
3.50k
        count &= (WOLFSSL_WORD_SIZE - 1);
737
3.50k
    }
738
83
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
739
83
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
740
0
    {
741
        /* Alignment can be fixed up to allow XOR by words. */
742
743
        /* Perform bytewise xor until pointers are aligned to
744
         * WOLFSSL_WORD_SIZE.
745
         */
746
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
747
0
        {
748
0
            *(b++) ^= *(m++);
749
0
            count--;
750
0
        }
751
752
0
        tpb.bp = b;
753
0
        tpm.bp = m;
754
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
755
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
756
            PRAGMA_GCC_DIAG_PUSH;
757
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
758
        #endif
759
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
760
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
761
            PRAGMA_GCC_DIAG_POP;
762
        #endif
763
0
        b = tpb.bp;
764
0
        m = tpm.bp;
765
0
        count &= (WOLFSSL_WORD_SIZE - 1);
766
0
    }
767
768
6.57k
    while (count > 0) {
769
2.98k
        *b++ ^= *m++;
770
2.98k
        count--;
771
2.98k
    }
772
3.59k
}
Unexecuted instantiation: random.c:xorbuf
Unexecuted instantiation: ripemd.c:xorbuf
rsa.c:xorbuf
Line
Count
Source
702
2.41k
{
703
2.41k
    byte*       b = (byte*)buf;
704
2.41k
    const byte* m = (const byte*)mask;
705
706
    /* type-punning helpers */
707
2.41k
    union {
708
2.41k
        byte* bp;
709
2.41k
        wolfssl_word* wp;
710
2.41k
    } tpb;
711
2.41k
    union {
712
2.41k
        const byte* bp;
713
2.41k
        const wolfssl_word* wp;
714
2.41k
    } tpm;
715
716
2.41k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
717
380
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
718
376
    {
719
        /* Both buffers are already aligned.  Possible to XOR by words without
720
         * fixup.
721
         */
722
723
376
        tpb.bp = b;
724
376
        tpm.bp = m;
725
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
726
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
727
            PRAGMA_GCC_DIAG_PUSH;
728
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
729
        #endif
730
376
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
731
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
732
            PRAGMA_GCC_DIAG_POP;
733
        #endif
734
376
        b = tpb.bp;
735
376
        m = tpm.bp;
736
376
        count &= (WOLFSSL_WORD_SIZE - 1);
737
376
    }
738
2.03k
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
739
2.03k
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
740
584
    {
741
        /* Alignment can be fixed up to allow XOR by words. */
742
743
        /* Perform bytewise xor until pointers are aligned to
744
         * WOLFSSL_WORD_SIZE.
745
         */
746
1.75k
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
747
1.17k
        {
748
1.17k
            *(b++) ^= *(m++);
749
1.17k
            count--;
750
1.17k
        }
751
752
584
        tpb.bp = b;
753
584
        tpm.bp = m;
754
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
755
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
756
            PRAGMA_GCC_DIAG_PUSH;
757
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
758
        #endif
759
584
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
760
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
761
            PRAGMA_GCC_DIAG_POP;
762
        #endif
763
584
        b = tpb.bp;
764
584
        m = tpm.bp;
765
584
        count &= (WOLFSSL_WORD_SIZE - 1);
766
584
    }
767
768
130k
    while (count > 0) {
769
127k
        *b++ ^= *m++;
770
127k
        count--;
771
127k
    }
772
2.41k
}
Unexecuted instantiation: sha.c:xorbuf
Unexecuted instantiation: sha256.c:xorbuf
sha3.c:xorbuf
Line
Count
Source
702
142k
{
703
142k
    byte*       b = (byte*)buf;
704
142k
    const byte* m = (const byte*)mask;
705
706
    /* type-punning helpers */
707
142k
    union {
708
142k
        byte* bp;
709
142k
        wolfssl_word* wp;
710
142k
    } tpb;
711
142k
    union {
712
142k
        const byte* bp;
713
142k
        const wolfssl_word* wp;
714
142k
    } tpm;
715
716
142k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
717
142k
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
718
136k
    {
719
        /* Both buffers are already aligned.  Possible to XOR by words without
720
         * fixup.
721
         */
722
723
136k
        tpb.bp = b;
724
136k
        tpm.bp = m;
725
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
726
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
727
            PRAGMA_GCC_DIAG_PUSH;
728
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
729
        #endif
730
136k
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
731
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
732
            PRAGMA_GCC_DIAG_POP;
733
        #endif
734
136k
        b = tpb.bp;
735
136k
        m = tpm.bp;
736
136k
        count &= (WOLFSSL_WORD_SIZE - 1);
737
136k
    }
738
5.93k
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
739
5.93k
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
740
0
    {
741
        /* Alignment can be fixed up to allow XOR by words. */
742
743
        /* Perform bytewise xor until pointers are aligned to
744
         * WOLFSSL_WORD_SIZE.
745
         */
746
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
747
0
        {
748
0
            *(b++) ^= *(m++);
749
0
            count--;
750
0
        }
751
752
0
        tpb.bp = b;
753
0
        tpm.bp = m;
754
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
755
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
756
            PRAGMA_GCC_DIAG_PUSH;
757
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
758
        #endif
759
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
760
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
761
            PRAGMA_GCC_DIAG_POP;
762
        #endif
763
0
        b = tpb.bp;
764
0
        m = tpm.bp;
765
0
        count &= (WOLFSSL_WORD_SIZE - 1);
766
0
    }
767
768
1.09M
    while (count > 0) {
769
949k
        *b++ ^= *m++;
770
949k
        count--;
771
949k
    }
772
142k
}
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: wc_encrypt.c:xorbuf
Unexecuted instantiation: wolfmath.c:xorbuf
Unexecuted instantiation: ssl.c:xorbuf
Unexecuted instantiation: tls.c:xorbuf
tls13.c:xorbuf
Line
Count
Source
702
1.59k
{
703
1.59k
    byte*       b = (byte*)buf;
704
1.59k
    const byte* m = (const byte*)mask;
705
706
    /* type-punning helpers */
707
1.59k
    union {
708
1.59k
        byte* bp;
709
1.59k
        wolfssl_word* wp;
710
1.59k
    } tpb;
711
1.59k
    union {
712
1.59k
        const byte* bp;
713
1.59k
        const wolfssl_word* wp;
714
1.59k
    } tpm;
715
716
1.59k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
717
126
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
718
126
    {
719
        /* Both buffers are already aligned.  Possible to XOR by words without
720
         * fixup.
721
         */
722
723
126
        tpb.bp = b;
724
126
        tpm.bp = m;
725
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
726
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
727
            PRAGMA_GCC_DIAG_PUSH;
728
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
729
        #endif
730
126
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
731
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
732
            PRAGMA_GCC_DIAG_POP;
733
        #endif
734
126
        b = tpb.bp;
735
126
        m = tpm.bp;
736
126
        count &= (WOLFSSL_WORD_SIZE - 1);
737
126
    }
738
1.47k
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
739
1.47k
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
740
1.47k
    {
741
        /* Alignment can be fixed up to allow XOR by words. */
742
743
        /* Perform bytewise xor until pointers are aligned to
744
         * WOLFSSL_WORD_SIZE.
745
         */
746
7.36k
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
747
5.89k
        {
748
5.89k
            *(b++) ^= *(m++);
749
5.89k
            count--;
750
5.89k
        }
751
752
1.47k
        tpb.bp = b;
753
1.47k
        tpm.bp = m;
754
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
755
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
756
            PRAGMA_GCC_DIAG_PUSH;
757
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
758
        #endif
759
1.47k
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
760
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
761
            PRAGMA_GCC_DIAG_POP;
762
        #endif
763
1.47k
        b = tpb.bp;
764
1.47k
        m = tpm.bp;
765
1.47k
        count &= (WOLFSSL_WORD_SIZE - 1);
766
1.47k
    }
767
768
7.49k
    while (count > 0) {
769
5.89k
        *b++ ^= *m++;
770
5.89k
        count--;
771
5.89k
    }
772
1.59k
}
Unexecuted instantiation: wc_mlkem.c:xorbuf
Unexecuted instantiation: wc_mlkem_poly.c:xorbuf
internal.c:xorbuf
Line
Count
Source
702
10
{
703
10
    byte*       b = (byte*)buf;
704
10
    const byte* m = (const byte*)mask;
705
706
    /* type-punning helpers */
707
10
    union {
708
10
        byte* bp;
709
10
        wolfssl_word* wp;
710
10
    } tpb;
711
10
    union {
712
10
        const byte* bp;
713
10
        const wolfssl_word* wp;
714
10
    } tpm;
715
716
10
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
717
10
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
718
10
    {
719
        /* Both buffers are already aligned.  Possible to XOR by words without
720
         * fixup.
721
         */
722
723
10
        tpb.bp = b;
724
10
        tpm.bp = m;
725
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
726
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
727
            PRAGMA_GCC_DIAG_PUSH;
728
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
729
        #endif
730
10
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
731
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
732
            PRAGMA_GCC_DIAG_POP;
733
        #endif
734
10
        b = tpb.bp;
735
10
        m = tpm.bp;
736
10
        count &= (WOLFSSL_WORD_SIZE - 1);
737
10
    }
738
0
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
739
0
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
740
0
    {
741
        /* Alignment can be fixed up to allow XOR by words. */
742
743
        /* Perform bytewise xor until pointers are aligned to
744
         * WOLFSSL_WORD_SIZE.
745
         */
746
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
747
0
        {
748
0
            *(b++) ^= *(m++);
749
0
            count--;
750
0
        }
751
752
0
        tpb.bp = b;
753
0
        tpm.bp = m;
754
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
755
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
756
            PRAGMA_GCC_DIAG_PUSH;
757
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
758
        #endif
759
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
760
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
761
            PRAGMA_GCC_DIAG_POP;
762
        #endif
763
0
        b = tpb.bp;
764
0
        m = tpm.bp;
765
0
        count &= (WOLFSSL_WORD_SIZE - 1);
766
0
    }
767
768
50
    while (count > 0) {
769
40
        *b++ ^= *m++;
770
40
        count--;
771
40
    }
772
10
}
Unexecuted instantiation: keys.c:xorbuf
773
774
#endif /* !WOLFSSL_NO_XOR_OPS */
775
776
#ifndef WOLFSSL_NO_FORCE_ZERO
777
/* This routine fills the first len bytes of the memory area pointed by mem
778
   with zeros. It ensures compiler optimization doesn't skip it. */
779
WC_MISC_STATIC WC_INLINE void ForceZero(void* mem, size_t len)
780
15.9M
{
781
15.9M
    byte *zb = (byte *)mem;
782
15.9M
    unsigned long *zl;
783
784
15.9M
    XFENCE();
785
786
18.3M
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
2.35M
        if (len == 0)
788
0
            return;
789
2.35M
        *zb++ = 0;
790
2.35M
        --len;
791
2.35M
    }
792
793
15.9M
    zl = (unsigned long *)zb;
794
795
425M
    while (len >= sizeof(unsigned long)) {
796
409M
        *zl++ = 0;
797
409M
        len -= sizeof(unsigned long);
798
409M
    }
799
800
15.9M
    zb = (byte *)zl;
801
802
23.2M
    while (len) {
803
7.27M
        *zb++ = 0;
804
7.27M
        --len;
805
7.27M
    }
806
807
15.9M
    XFENCE();
808
15.9M
}
aes.c:ForceZero
Line
Count
Source
780
15.8k
{
781
15.8k
    byte *zb = (byte *)mem;
782
15.8k
    unsigned long *zl;
783
784
15.8k
    XFENCE();
785
786
51.8k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
35.9k
        if (len == 0)
788
0
            return;
789
35.9k
        *zb++ = 0;
790
35.9k
        --len;
791
35.9k
    }
792
793
15.8k
    zl = (unsigned long *)zb;
794
795
610k
    while (len >= sizeof(unsigned long)) {
796
594k
        *zl++ = 0;
797
594k
        len -= sizeof(unsigned long);
798
594k
    }
799
800
15.8k
    zb = (byte *)zl;
801
802
33.7k
    while (len) {
803
17.8k
        *zb++ = 0;
804
17.8k
        --len;
805
17.8k
    }
806
807
    XFENCE();
808
15.8k
}
arc4.c:ForceZero
Line
Count
Source
780
6
{
781
6
    byte *zb = (byte *)mem;
782
6
    unsigned long *zl;
783
784
6
    XFENCE();
785
786
42
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
36
        if (len == 0)
788
0
            return;
789
36
        *zb++ = 0;
790
36
        --len;
791
36
    }
792
793
6
    zl = (unsigned long *)zb;
794
795
192
    while (len >= sizeof(unsigned long)) {
796
186
        *zl++ = 0;
797
186
        len -= sizeof(unsigned long);
798
186
    }
799
800
6
    zb = (byte *)zl;
801
802
18
    while (len) {
803
12
        *zb++ = 0;
804
12
        --len;
805
12
    }
806
807
    XFENCE();
808
6
}
asn.c:ForceZero
Line
Count
Source
780
74.5k
{
781
74.5k
    byte *zb = (byte *)mem;
782
74.5k
    unsigned long *zl;
783
784
74.5k
    XFENCE();
785
786
74.5k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
74.5k
    zl = (unsigned long *)zb;
794
795
11.1M
    while (len >= sizeof(unsigned long)) {
796
11.1M
        *zl++ = 0;
797
11.1M
        len -= sizeof(unsigned long);
798
11.1M
    }
799
800
74.5k
    zb = (byte *)zl;
801
802
149k
    while (len) {
803
74.5k
        *zb++ = 0;
804
74.5k
        --len;
805
74.5k
    }
806
807
    XFENCE();
808
74.5k
}
Unexecuted instantiation: blake2b.c:ForceZero
Unexecuted instantiation: blake2s.c:ForceZero
Unexecuted instantiation: camellia.c:ForceZero
Unexecuted instantiation: chacha.c:ForceZero
chacha20_poly1305.c:ForceZero
Line
Count
Source
780
513
{
781
513
    byte *zb = (byte *)mem;
782
513
    unsigned long *zl;
783
784
513
    XFENCE();
785
786
513
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
513
    zl = (unsigned long *)zb;
794
795
3.01k
    while (len >= sizeof(unsigned long)) {
796
2.49k
        *zl++ = 0;
797
2.49k
        len -= sizeof(unsigned long);
798
2.49k
    }
799
800
513
    zb = (byte *)zl;
801
802
643
    while (len) {
803
130
        *zb++ = 0;
804
130
        --len;
805
130
    }
806
807
    XFENCE();
808
513
}
cmac.c:ForceZero
Line
Count
Source
780
270
{
781
270
    byte *zb = (byte *)mem;
782
270
    unsigned long *zl;
783
784
270
    XFENCE();
785
786
270
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
270
    zl = (unsigned long *)zb;
794
795
20.7k
    while (len >= sizeof(unsigned long)) {
796
20.5k
        *zl++ = 0;
797
20.5k
        len -= sizeof(unsigned long);
798
20.5k
    }
799
800
270
    zb = (byte *)zl;
801
802
270
    while (len) {
803
0
        *zb++ = 0;
804
0
        --len;
805
0
    }
806
807
    XFENCE();
808
270
}
Unexecuted instantiation: coding.c:ForceZero
curve25519.c:ForceZero
Line
Count
Source
780
31.3k
{
781
31.3k
    byte *zb = (byte *)mem;
782
31.3k
    unsigned long *zl;
783
784
31.3k
    XFENCE();
785
786
31.3k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
31.3k
    zl = (unsigned long *)zb;
794
795
262k
    while (len >= sizeof(unsigned long)) {
796
231k
        *zl++ = 0;
797
231k
        len -= sizeof(unsigned long);
798
231k
    }
799
800
31.3k
    zb = (byte *)zl;
801
802
31.3k
    while (len) {
803
0
        *zb++ = 0;
804
0
        --len;
805
0
    }
806
807
    XFENCE();
808
31.3k
}
curve448.c:ForceZero
Line
Count
Source
780
1.44k
{
781
1.44k
    byte *zb = (byte *)mem;
782
1.44k
    unsigned long *zl;
783
784
1.44k
    XFENCE();
785
786
1.96k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
518
        if (len == 0)
788
0
            return;
789
518
        *zb++ = 0;
790
518
        --len;
791
518
    }
792
793
1.44k
    zl = (unsigned long *)zb;
794
795
11.0k
    while (len >= sizeof(unsigned long)) {
796
9.59k
        *zl++ = 0;
797
9.59k
        len -= sizeof(unsigned long);
798
9.59k
    }
799
800
1.44k
    zb = (byte *)zl;
801
802
5.07k
    while (len) {
803
3.62k
        *zb++ = 0;
804
3.62k
        --len;
805
3.62k
    }
806
807
    XFENCE();
808
1.44k
}
Unexecuted instantiation: des3.c:ForceZero
Unexecuted instantiation: dh.c:ForceZero
ecc.c:ForceZero
Line
Count
Source
780
64.1k
{
781
64.1k
    byte *zb = (byte *)mem;
782
64.1k
    unsigned long *zl;
783
784
64.1k
    XFENCE();
785
786
64.1k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
64.1k
    zl = (unsigned long *)zb;
794
795
14.6M
    while (len >= sizeof(unsigned long)) {
796
14.6M
        *zl++ = 0;
797
14.6M
        len -= sizeof(unsigned long);
798
14.6M
    }
799
800
64.1k
    zb = (byte *)zl;
801
802
136k
    while (len) {
803
71.8k
        *zb++ = 0;
804
71.8k
        --len;
805
71.8k
    }
806
807
    XFENCE();
808
64.1k
}
Unexecuted instantiation: eccsi.c:ForceZero
ed25519.c:ForceZero
Line
Count
Source
780
7.90k
{
781
7.90k
    byte *zb = (byte *)mem;
782
7.90k
    unsigned long *zl;
783
784
7.90k
    XFENCE();
785
786
7.90k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
7.90k
    zl = (unsigned long *)zb;
794
795
288k
    while (len >= sizeof(unsigned long)) {
796
280k
        *zl++ = 0;
797
280k
        len -= sizeof(unsigned long);
798
280k
    }
799
800
7.90k
    zb = (byte *)zl;
801
802
7.90k
    while (len) {
803
0
        *zb++ = 0;
804
0
        --len;
805
0
    }
806
807
    XFENCE();
808
7.90k
}
ed448.c:ForceZero
Line
Count
Source
780
9.23k
{
781
9.23k
    byte *zb = (byte *)mem;
782
9.23k
    unsigned long *zl;
783
784
9.23k
    XFENCE();
785
786
9.74k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
511
        if (len == 0)
788
0
            return;
789
511
        *zb++ = 0;
790
511
        --len;
791
511
    }
792
793
9.23k
    zl = (unsigned long *)zb;
794
795
529k
    while (len >= sizeof(unsigned long)) {
796
520k
        *zl++ = 0;
797
520k
        len -= sizeof(unsigned long);
798
520k
    }
799
800
9.23k
    zb = (byte *)zl;
801
802
16.0k
    while (len) {
803
6.79k
        *zb++ = 0;
804
6.79k
        --len;
805
6.79k
    }
806
807
    XFENCE();
808
9.23k
}
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
hmac.c:ForceZero
Line
Count
Source
780
79.0k
{
781
79.0k
    byte *zb = (byte *)mem;
782
79.0k
    unsigned long *zl;
783
784
79.0k
    XFENCE();
785
786
79.0k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
79.0k
    zl = (unsigned long *)zb;
794
795
7.43M
    while (len >= sizeof(unsigned long)) {
796
7.35M
        *zl++ = 0;
797
7.35M
        len -= sizeof(unsigned long);
798
7.35M
    }
799
800
79.0k
    zb = (byte *)zl;
801
802
79.0k
    while (len) {
803
0
        *zb++ = 0;
804
0
        --len;
805
0
    }
806
807
    XFENCE();
808
79.0k
}
Unexecuted instantiation: integer.c:ForceZero
kdf.c:ForceZero
Line
Count
Source
780
17.6k
{
781
17.6k
    byte *zb = (byte *)mem;
782
17.6k
    unsigned long *zl;
783
784
17.6k
    XFENCE();
785
786
17.6k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
17.6k
    zl = (unsigned long *)zb;
794
795
295k
    while (len >= sizeof(unsigned long)) {
796
278k
        *zl++ = 0;
797
278k
        len -= sizeof(unsigned long);
798
278k
    }
799
800
17.6k
    zb = (byte *)zl;
801
802
65.7k
    while (len) {
803
48.0k
        *zb++ = 0;
804
48.0k
        --len;
805
48.0k
    }
806
807
    XFENCE();
808
17.6k
}
Unexecuted instantiation: md2.c:ForceZero
Unexecuted instantiation: md4.c:ForceZero
Unexecuted instantiation: md5.c:ForceZero
memory.c:ForceZero
Line
Count
Source
780
101k
{
781
101k
    byte *zb = (byte *)mem;
782
101k
    unsigned long *zl;
783
784
101k
    XFENCE();
785
786
180k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
78.9k
        if (len == 0)
788
0
            return;
789
78.9k
        *zb++ = 0;
790
78.9k
        --len;
791
78.9k
    }
792
793
101k
    zl = (unsigned long *)zb;
794
795
13.1M
    while (len >= sizeof(unsigned long)) {
796
13.0M
        *zl++ = 0;
797
13.0M
        len -= sizeof(unsigned long);
798
13.0M
    }
799
800
101k
    zb = (byte *)zl;
801
802
344k
    while (len) {
803
242k
        *zb++ = 0;
804
242k
        --len;
805
242k
    }
806
807
    XFENCE();
808
101k
}
Unexecuted instantiation: poly1305.c:ForceZero
pwdbased.c:ForceZero
Line
Count
Source
780
177
{
781
177
    byte *zb = (byte *)mem;
782
177
    unsigned long *zl;
783
784
177
    XFENCE();
785
786
177
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
177
    zl = (unsigned long *)zb;
794
795
731
    while (len >= sizeof(unsigned long)) {
796
554
        *zl++ = 0;
797
554
        len -= sizeof(unsigned long);
798
554
    }
799
800
177
    zb = (byte *)zl;
801
802
409
    while (len) {
803
232
        *zb++ = 0;
804
232
        --len;
805
232
    }
806
807
    XFENCE();
808
177
}
random.c:ForceZero
Line
Count
Source
780
1.84M
{
781
1.84M
    byte *zb = (byte *)mem;
782
1.84M
    unsigned long *zl;
783
784
1.84M
    XFENCE();
785
786
1.84M
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
1.84M
    zl = (unsigned long *)zb;
794
795
23.9M
    while (len >= sizeof(unsigned long)) {
796
22.0M
        *zl++ = 0;
797
22.0M
        len -= sizeof(unsigned long);
798
22.0M
    }
799
800
1.84M
    zb = (byte *)zl;
801
802
6.19M
    while (len) {
803
4.34M
        *zb++ = 0;
804
4.34M
        --len;
805
4.34M
    }
806
807
    XFENCE();
808
1.84M
}
Unexecuted instantiation: ripemd.c:ForceZero
rsa.c:ForceZero
Line
Count
Source
780
460
{
781
460
    byte *zb = (byte *)mem;
782
460
    unsigned long *zl;
783
784
460
    XFENCE();
785
786
460
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
460
    zl = (unsigned long *)zb;
794
795
2.59k
    while (len >= sizeof(unsigned long)) {
796
2.13k
        *zl++ = 0;
797
2.13k
        len -= sizeof(unsigned long);
798
2.13k
    }
799
800
460
    zb = (byte *)zl;
801
802
1.11k
    while (len) {
803
656
        *zb++ = 0;
804
656
        --len;
805
656
    }
806
807
    XFENCE();
808
460
}
Unexecuted instantiation: sha.c:ForceZero
sha256.c:ForceZero
Line
Count
Source
780
1.04M
{
781
1.04M
    byte *zb = (byte *)mem;
782
1.04M
    unsigned long *zl;
783
784
1.04M
    XFENCE();
785
786
1.04M
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
1.04M
    zl = (unsigned long *)zb;
794
795
31.9M
    while (len >= sizeof(unsigned long)) {
796
30.9M
        *zl++ = 0;
797
30.9M
        len -= sizeof(unsigned long);
798
30.9M
    }
799
800
1.04M
    zb = (byte *)zl;
801
802
1.04M
    while (len) {
803
0
        *zb++ = 0;
804
0
        --len;
805
0
    }
806
807
    XFENCE();
808
1.04M
}
Unexecuted instantiation: sha3.c:ForceZero
sha512.c:ForceZero
Line
Count
Source
780
11.2M
{
781
11.2M
    byte *zb = (byte *)mem;
782
11.2M
    unsigned long *zl;
783
784
11.2M
    XFENCE();
785
786
11.2M
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
11.2M
    zl = (unsigned long *)zb;
794
795
199M
    while (len >= sizeof(unsigned long)) {
796
188M
        *zl++ = 0;
797
188M
        len -= sizeof(unsigned long);
798
188M
    }
799
800
11.2M
    zb = (byte *)zl;
801
802
11.2M
    while (len) {
803
0
        *zb++ = 0;
804
0
        --len;
805
0
    }
806
807
    XFENCE();
808
11.2M
}
Unexecuted instantiation: siphash.c:ForceZero
Unexecuted instantiation: sm2.c:ForceZero
Unexecuted instantiation: sm3.c:ForceZero
Unexecuted instantiation: sm4.c:ForceZero
Unexecuted instantiation: wc_encrypt.c:ForceZero
Unexecuted instantiation: wolfmath.c:ForceZero
ssl.c:ForceZero
Line
Count
Source
780
397k
{
781
397k
    byte *zb = (byte *)mem;
782
397k
    unsigned long *zl;
783
784
397k
    XFENCE();
785
786
1.43M
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
1.03M
        if (len == 0)
788
0
            return;
789
1.03M
        *zb++ = 0;
790
1.03M
        --len;
791
1.03M
    }
792
793
397k
    zl = (unsigned long *)zb;
794
795
13.3M
    while (len >= sizeof(unsigned long)) {
796
13.0M
        *zl++ = 0;
797
13.0M
        len -= sizeof(unsigned long);
798
13.0M
    }
799
800
397k
    zb = (byte *)zl;
801
802
1.99M
    while (len) {
803
1.59M
        *zb++ = 0;
804
1.59M
        --len;
805
1.59M
    }
806
807
    XFENCE();
808
397k
}
tls.c:ForceZero
Line
Count
Source
780
36.7k
{
781
36.7k
    byte *zb = (byte *)mem;
782
36.7k
    unsigned long *zl;
783
784
36.7k
    XFENCE();
785
786
36.7k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
36.7k
    zl = (unsigned long *)zb;
794
795
5.81M
    while (len >= sizeof(unsigned long)) {
796
5.77M
        *zl++ = 0;
797
5.77M
        len -= sizeof(unsigned long);
798
5.77M
    }
799
800
36.7k
    zb = (byte *)zl;
801
802
40.1k
    while (len) {
803
3.33k
        *zb++ = 0;
804
3.33k
        --len;
805
3.33k
    }
806
807
    XFENCE();
808
36.7k
}
tls13.c:ForceZero
Line
Count
Source
780
11.9k
{
781
11.9k
    byte *zb = (byte *)mem;
782
11.9k
    unsigned long *zl;
783
784
11.9k
    XFENCE();
785
786
12.0k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
33
        if (len == 0)
788
0
            return;
789
33
        *zb++ = 0;
790
33
        --len;
791
33
    }
792
793
11.9k
    zl = (unsigned long *)zb;
794
795
173k
    while (len >= sizeof(unsigned long)) {
796
161k
        *zl++ = 0;
797
161k
        len -= sizeof(unsigned long);
798
161k
    }
799
800
11.9k
    zb = (byte *)zl;
801
802
22.5k
    while (len) {
803
10.5k
        *zb++ = 0;
804
10.5k
        --len;
805
10.5k
    }
806
807
    XFENCE();
808
11.9k
}
wc_mlkem.c:ForceZero
Line
Count
Source
780
31.7k
{
781
31.7k
    byte *zb = (byte *)mem;
782
31.7k
    unsigned long *zl;
783
784
31.7k
    XFENCE();
785
786
31.7k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
31.7k
    zl = (unsigned long *)zb;
794
795
2.65M
    while (len >= sizeof(unsigned long)) {
796
2.62M
        *zl++ = 0;
797
2.62M
        len -= sizeof(unsigned long);
798
2.62M
    }
799
800
31.7k
    zb = (byte *)zl;
801
802
36.2k
    while (len) {
803
4.53k
        *zb++ = 0;
804
4.53k
        --len;
805
4.53k
    }
806
807
    XFENCE();
808
31.7k
}
wc_mlkem_poly.c:ForceZero
Line
Count
Source
780
27.2k
{
781
27.2k
    byte *zb = (byte *)mem;
782
27.2k
    unsigned long *zl;
783
784
27.2k
    XFENCE();
785
786
27.2k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
0
        if (len == 0)
788
0
            return;
789
0
        *zb++ = 0;
790
0
        --len;
791
0
    }
792
793
27.2k
    zl = (unsigned long *)zb;
794
795
463k
    while (len >= sizeof(unsigned long)) {
796
435k
        *zl++ = 0;
797
435k
        len -= sizeof(unsigned long);
798
435k
    }
799
800
27.2k
    zb = (byte *)zl;
801
802
27.2k
    while (len) {
803
0
        *zb++ = 0;
804
0
        --len;
805
0
    }
806
807
    XFENCE();
808
27.2k
}
internal.c:ForceZero
Line
Count
Source
780
971k
{
781
971k
    byte *zb = (byte *)mem;
782
971k
    unsigned long *zl;
783
784
971k
    XFENCE();
785
786
2.17M
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
787
1.20M
        if (len == 0)
788
0
            return;
789
1.20M
        *zb++ = 0;
790
1.20M
        --len;
791
1.20M
    }
792
793
971k
    zl = (unsigned long *)zb;
794
795
99.1M
    while (len >= sizeof(unsigned long)) {
796
98.1M
        *zl++ = 0;
797
98.1M
        len -= sizeof(unsigned long);
798
98.1M
    }
799
800
971k
    zb = (byte *)zl;
801
802
1.81M
    while (len) {
803
847k
        *zb++ = 0;
804
847k
        --len;
805
847k
    }
806
807
    XFENCE();
808
971k
}
Unexecuted instantiation: keys.c:ForceZero
809
#endif
810
811
812
#ifndef WOLFSSL_NO_CONST_CMP
813
/* check all length bytes for equality, return 0 on success */
814
WC_MISC_STATIC WC_INLINE int ConstantCompare(const byte* a, const byte* b,
815
                                             int length)
816
110k
{
817
110k
    int i;
818
110k
    int compareSum = 0;
819
820
26.5M
    for (i = 0; i < length; i++) {
821
26.4M
        compareSum |= a[i] ^ b[i];
822
26.4M
    }
823
824
110k
    return compareSum;
825
110k
}
aes.c:ConstantCompare
Line
Count
Source
816
298
{
817
298
    int i;
818
298
    int compareSum = 0;
819
820
4.96k
    for (i = 0; i < length; i++) {
821
4.66k
        compareSum |= a[i] ^ b[i];
822
4.66k
    }
823
824
298
    return compareSum;
825
298
}
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
816
31
{
817
31
    int i;
818
31
    int compareSum = 0;
819
820
527
    for (i = 0; i < length; i++) {
821
496
        compareSum |= a[i] ^ b[i];
822
496
    }
823
824
31
    return compareSum;
825
31
}
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
ecc.c:ConstantCompare
Line
Count
Source
816
37
{
817
37
    int i;
818
37
    int compareSum = 0;
819
820
1.22k
    for (i = 0; i < length; i++) {
821
1.18k
        compareSum |= a[i] ^ b[i];
822
1.18k
    }
823
824
37
    return compareSum;
825
37
}
Unexecuted instantiation: eccsi.c:ConstantCompare
ed25519.c:ConstantCompare
Line
Count
Source
816
1.31k
{
817
1.31k
    int i;
818
1.31k
    int compareSum = 0;
819
820
43.2k
    for (i = 0; i < length; i++) {
821
41.9k
        compareSum |= a[i] ^ b[i];
822
41.9k
    }
823
824
1.31k
    return compareSum;
825
1.31k
}
ed448.c:ConstantCompare
Line
Count
Source
816
1.49k
{
817
1.49k
    int i;
818
1.49k
    int compareSum = 0;
819
820
86.6k
    for (i = 0; i < length; i++) {
821
85.1k
        compareSum |= a[i] ^ b[i];
822
85.1k
    }
823
824
1.49k
    return compareSum;
825
1.49k
}
Unexecuted instantiation: fe_448.c:ConstantCompare
fe_operations.c:ConstantCompare
Line
Count
Source
816
4.90k
{
817
4.90k
    int i;
818
4.90k
    int compareSum = 0;
819
820
161k
    for (i = 0; i < length; i++) {
821
156k
        compareSum |= a[i] ^ b[i];
822
156k
    }
823
824
4.90k
    return compareSum;
825
4.90k
}
Unexecuted instantiation: ge_448.c:ConstantCompare
Unexecuted instantiation: ge_operations.c:ConstantCompare
Unexecuted instantiation: hash.c:ConstantCompare
Unexecuted instantiation: hmac.c:ConstantCompare
Unexecuted instantiation: integer.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
random.c:ConstantCompare
Line
Count
Source
816
102k
{
817
102k
    int i;
818
102k
    int compareSum = 0;
819
820
26.2M
    for (i = 0; i < length; i++) {
821
26.1M
        compareSum |= a[i] ^ b[i];
822
26.1M
    }
823
824
102k
    return compareSum;
825
102k
}
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: wc_encrypt.c:ConstantCompare
Unexecuted instantiation: wolfmath.c:ConstantCompare
Unexecuted instantiation: ssl.c:ConstantCompare
tls.c:ConstantCompare
Line
Count
Source
816
22
{
817
22
    int i;
818
22
    int compareSum = 0;
819
820
286
    for (i = 0; i < length; i++) {
821
264
        compareSum |= a[i] ^ b[i];
822
264
    }
823
824
22
    return compareSum;
825
22
}
tls13.c:ConstantCompare
Line
Count
Source
816
3
{
817
3
    int i;
818
3
    int compareSum = 0;
819
820
115
    for (i = 0; i < length; i++) {
821
112
        compareSum |= a[i] ^ b[i];
822
112
    }
823
824
3
    return compareSum;
825
3
}
Unexecuted instantiation: wc_mlkem.c:ConstantCompare
Unexecuted instantiation: wc_mlkem_poly.c:ConstantCompare
internal.c:ConstantCompare
Line
Count
Source
816
19
{
817
19
    int i;
818
19
    int compareSum = 0;
819
820
347
    for (i = 0; i < length; i++) {
821
328
        compareSum |= a[i] ^ b[i];
822
328
    }
823
824
19
    return compareSum;
825
19
}
Unexecuted instantiation: keys.c:ConstantCompare
826
#endif
827
828
829
#if defined(WOLFSSL_NO_CT_OPS) && (!defined(NO_RSA) || !defined(WOLFCRYPT_ONLY)) \
830
    && (!defined(WOLFSSL_RSA_VERIFY_ONLY))
831
/* constant time operations with mask are required for RSA and TLS operations */
832
#warning constant time operations required unless using NO_RSA & WOLFCRYPT_ONLY
833
#endif
834
835
#if !defined(WOLFSSL_NO_CT_OPS) || !defined(NO_RSA) || !defined(WOLFCRYPT_ONLY)
836
/* Constant time - mask set when a > b. */
837
WC_MISC_STATIC WC_INLINE byte ctMaskGT(int a, int b)
838
42.5k
{
839
42.5k
    return (byte)((((word32)a - (word32)b - 1) >> 31) - 1);
840
42.5k
}
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: integer.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
rsa.c:ctMaskGT
Line
Count
Source
838
7.24k
{
839
7.24k
    return (byte)((((word32)a - (word32)b - 1) >> 31) - 1);
840
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
Unexecuted instantiation: wc_encrypt.c:ctMaskGT
Unexecuted instantiation: wolfmath.c:ctMaskGT
tls.c:ctMaskGT
Line
Count
Source
838
35.2k
{
839
35.2k
    return (byte)((((word32)a - (word32)b - 1) >> 31) - 1);
840
35.2k
}
Unexecuted instantiation: tls13.c:ctMaskGT
Unexecuted instantiation: wc_mlkem.c:ctMaskGT
Unexecuted instantiation: wc_mlkem_poly.c:ctMaskGT
internal.c:ctMaskGT
Line
Count
Source
838
57
{
839
57
    return (byte)((((word32)a - (word32)b - 1) >> 31) - 1);
840
57
}
Unexecuted instantiation: keys.c:ctMaskGT
841
842
/* Constant time - mask set when a >= b. */
843
WC_MISC_STATIC WC_INLINE byte ctMaskGTE(int a, int b)
844
11.1k
{
845
11.1k
    return (byte)((((word32)a - (word32)b) >> 31) - 1);
846
11.1k
}
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: integer.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: 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
internal.c:ctMaskGTE
Line
Count
Source
844
11.1k
{
845
11.1k
    return (byte)((((word32)a - (word32)b) >> 31) - 1);
846
11.1k
}
Unexecuted instantiation: keys.c:ctMaskGTE
847
848
/* Constant time - mask set when a >= b. */
849
WC_MISC_STATIC WC_INLINE int ctMaskIntGTE(int a, int b)
850
171
{
851
171
    return (int)((((word32)a - (word32)b) >> 31) - 1);
852
171
}
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: integer.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
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
internal.c:ctMaskIntGTE
Line
Count
Source
850
171
{
851
171
    return (int)((((word32)a - (word32)b) >> 31) - 1);
852
171
}
Unexecuted instantiation: keys.c:ctMaskIntGTE
853
854
#ifdef WORD64_AVAILABLE
855
/* Constant time - mask set when a >= b. */
856
WC_MISC_STATIC WC_INLINE word32 ctMaskWord32GTE(word32 a, word32 b)
857
3.88M
{
858
3.88M
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
3.88M
}
aes.c:ctMaskWord32GTE
Line
Count
Source
857
1.99k
{
858
1.99k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
1.99k
}
Unexecuted instantiation: arc4.c:ctMaskWord32GTE
asn.c:ctMaskWord32GTE
Line
Count
Source
857
55.2k
{
858
55.2k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
55.2k
}
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
dh.c:ctMaskWord32GTE
Line
Count
Source
857
165
{
858
165
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
165
}
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
hmac.c:ctMaskWord32GTE
Line
Count
Source
857
30.0k
{
858
30.0k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
30.0k
}
Unexecuted instantiation: integer.c:ctMaskWord32GTE
kdf.c:ctMaskWord32GTE
Line
Count
Source
857
1.10k
{
858
1.10k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
1.10k
}
Unexecuted instantiation: md2.c:ctMaskWord32GTE
md4.c:ctMaskWord32GTE
Line
Count
Source
857
30.3k
{
858
30.3k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
30.3k
}
md5.c:ctMaskWord32GTE
Line
Count
Source
857
144k
{
858
144k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
144k
}
Unexecuted instantiation: memory.c:ctMaskWord32GTE
Unexecuted instantiation: poly1305.c:ctMaskWord32GTE
pwdbased.c:ctMaskWord32GTE
Line
Count
Source
857
3.01k
{
858
3.01k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
3.01k
}
random.c:ctMaskWord32GTE
Line
Count
Source
857
102k
{
858
102k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
102k
}
Unexecuted instantiation: ripemd.c:ctMaskWord32GTE
Unexecuted instantiation: rsa.c:ctMaskWord32GTE
sha.c:ctMaskWord32GTE
Line
Count
Source
857
258k
{
858
258k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
258k
}
sha256.c:ctMaskWord32GTE
Line
Count
Source
857
240k
{
858
240k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
240k
}
Unexecuted instantiation: sha3.c:ctMaskWord32GTE
sha512.c:ctMaskWord32GTE
Line
Count
Source
857
2.93M
{
858
2.93M
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
2.93M
}
Unexecuted instantiation: siphash.c:ctMaskWord32GTE
Unexecuted instantiation: sm2.c:ctMaskWord32GTE
Unexecuted instantiation: sm3.c:ctMaskWord32GTE
Unexecuted instantiation: sm4.c:ctMaskWord32GTE
Unexecuted instantiation: wc_encrypt.c:ctMaskWord32GTE
Unexecuted instantiation: wolfmath.c:ctMaskWord32GTE
ssl.c:ctMaskWord32GTE
Line
Count
Source
857
342
{
858
342
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
342
}
Unexecuted instantiation: tls.c:ctMaskWord32GTE
tls13.c:ctMaskWord32GTE
Line
Count
Source
857
14.0k
{
858
14.0k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
14.0k
}
Unexecuted instantiation: wc_mlkem.c:ctMaskWord32GTE
Unexecuted instantiation: wc_mlkem_poly.c:ctMaskWord32GTE
internal.c:ctMaskWord32GTE
Line
Count
Source
857
61.9k
{
858
61.9k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
859
61.9k
}
Unexecuted instantiation: keys.c:ctMaskWord32GTE
860
#endif
861
862
/* Constant time - mask set when a < b. */
863
WC_MISC_STATIC WC_INLINE byte ctMaskLT(int a, int b)
864
36.2k
{
865
36.2k
    return (byte)((((word32)b - (word32)a - 1) >> 31) - 1);
866
36.2k
}
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: integer.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
rsa.c:ctMaskLT
Line
Count
Source
864
7.24k
{
865
7.24k
    return (byte)((((word32)b - (word32)a - 1) >> 31) - 1);
866
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
Unexecuted instantiation: wc_encrypt.c:ctMaskLT
Unexecuted instantiation: wolfmath.c:ctMaskLT
tls.c:ctMaskLT
Line
Count
Source
864
17.8k
{
865
17.8k
    return (byte)((((word32)b - (word32)a - 1) >> 31) - 1);
866
17.8k
}
Unexecuted instantiation: tls13.c:ctMaskLT
Unexecuted instantiation: wc_mlkem.c:ctMaskLT
Unexecuted instantiation: wc_mlkem_poly.c:ctMaskLT
internal.c:ctMaskLT
Line
Count
Source
864
11.1k
{
865
11.1k
    return (byte)((((word32)b - (word32)a - 1) >> 31) - 1);
866
11.1k
}
Unexecuted instantiation: keys.c:ctMaskLT
867
868
/* Constant time - mask set when a <= b. */
869
WC_MISC_STATIC WC_INLINE byte ctMaskLTE(int a, int b)
870
17.5k
{
871
17.5k
    return (byte)((((word32)b - (word32)a) >> 31) - 1);
872
17.5k
}
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: integer.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
rsa.c:ctMaskLTE
Line
Count
Source
870
7.24k
{
871
7.24k
    return (byte)((((word32)b - (word32)a) >> 31) - 1);
872
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: 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
internal.c:ctMaskLTE
Line
Count
Source
870
10.2k
{
871
10.2k
    return (byte)((((word32)b - (word32)a) >> 31) - 1);
872
10.2k
}
Unexecuted instantiation: keys.c:ctMaskLTE
873
874
/* Constant time - mask set when a == b. */
875
WC_MISC_STATIC WC_INLINE byte ctMaskEq(int a, int b)
876
17.8k
{
877
17.8k
    return (byte)((byte)(~ctMaskGT(a, b)) & (byte)(~ctMaskLT(a, b)));
878
17.8k
}
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: integer.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
Unexecuted instantiation: wc_encrypt.c:ctMaskEq
Unexecuted instantiation: wolfmath.c:ctMaskEq
tls.c:ctMaskEq
Line
Count
Source
876
17.8k
{
877
17.8k
    return (byte)((byte)(~ctMaskGT(a, b)) & (byte)(~ctMaskLT(a, b)));
878
17.8k
}
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
879
880
/* Constant time - sets 16 bit integer mask when a > b */
881
WC_MISC_STATIC WC_INLINE word16 ctMask16GT(int a, int b)
882
0
{
883
0
    return (word16)((((word32)a - (word32)b - 1) >> 31) - 1);
884
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: integer.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: 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
885
886
/* Constant time - sets 16 bit integer mask when a >= b */
887
WC_MISC_STATIC WC_INLINE word16 ctMask16GTE(int a, int b)
888
0
{
889
0
    return (word16)((((word32)a - (word32)b) >> 31) - 1);
890
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: integer.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: 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
891
892
/* Constant time - sets 16 bit integer mask when a < b. */
893
WC_MISC_STATIC WC_INLINE word16 ctMask16LT(int a, int b)
894
0
{
895
0
    return (word16)((((word32)b - (word32)a - 1) >> 31) - 1);
896
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: integer.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: 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
897
898
/* Constant time - sets 16 bit integer mask when a <= b. */
899
WC_MISC_STATIC WC_INLINE word16 ctMask16LTE(int a, int b)
900
0
{
901
0
    return (word16)((((word32)b - (word32)a) >> 31) - 1);
902
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: integer.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: 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
903
904
/* Constant time - sets 16 bit integer mask when a == b. */
905
WC_MISC_STATIC WC_INLINE word16 ctMask16Eq(int a, int b)
906
0
{
907
0
    return (word16)((word16)(~ctMask16GT(a, b)) & (word16)(~ctMask16LT(a, b)));
908
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: integer.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: 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
909
910
/* Constant time - mask set when a != b. */
911
WC_MISC_STATIC WC_INLINE byte ctMaskNotEq(int a, int b)
912
7.24k
{
913
7.24k
    return (byte)((byte)ctMaskGT(a, b) | (byte)ctMaskLT(a, b));
914
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: integer.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
rsa.c:ctMaskNotEq
Line
Count
Source
912
7.24k
{
913
7.24k
    return (byte)((byte)ctMaskGT(a, b) | (byte)ctMaskLT(a, b));
914
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: 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
915
916
/* Constant time - select a when mask is set and b otherwise. */
917
WC_MISC_STATIC WC_INLINE byte ctMaskSel(byte m, byte a, byte b)
918
19.0k
{
919
19.0k
    return (byte)((b & ((byte)~(word32)m)) | (a & m));
920
19.0k
}
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: integer.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: wc_encrypt.c:ctMaskSel
Unexecuted instantiation: wolfmath.c:ctMaskSel
tls.c:ctMaskSel
Line
Count
Source
918
19.0k
{
919
19.0k
    return (byte)((b & ((byte)~(word32)m)) | (a & m));
920
19.0k
}
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
921
922
/* Constant time - select integer a when mask is set and integer b otherwise. */
923
WC_MISC_STATIC WC_INLINE int ctMaskSelInt(byte m, int a, int b)
924
14.4k
{
925
14.4k
    return (b & (~(signed int)(signed char)m)) |
926
14.4k
           (a & ( (signed int)(signed char)m));
927
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: integer.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
rsa.c:ctMaskSelInt
Line
Count
Source
924
14.4k
{
925
14.4k
    return (b & (~(signed int)(signed char)m)) |
926
14.4k
           (a & ( (signed int)(signed char)m));
927
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: 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
928
929
/* Constant time - select word32 a when mask is set and word32 b otherwise. */
930
WC_MISC_STATIC WC_INLINE word32 ctMaskSelWord32(byte m, word32 a, word32 b)
931
0
{
932
0
    return (((word32)b & (word32)(~(signed int)(signed char)m)) |
933
0
            ((word32)a & (word32)( (signed int)(signed char)m)));
934
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: integer.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: 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
935
936
/* Constant time - bit set when a <= b. */
937
WC_MISC_STATIC WC_INLINE byte ctSetLTE(int a, int b)
938
54
{
939
54
    return (byte)(((word32)a - (word32)b - 1) >> 31);
940
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: integer.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: wc_encrypt.c:ctSetLTE
Unexecuted instantiation: wolfmath.c:ctSetLTE
Unexecuted instantiation: ssl.c:ctSetLTE
tls.c:ctSetLTE
Line
Count
Source
938
54
{
939
54
    return (byte)(((word32)a - (word32)b - 1) >> 31);
940
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
941
942
/* Constant time - conditionally copy size bytes from src to dst if mask is set
943
 */
944
WC_MISC_STATIC WC_INLINE void ctMaskCopy(byte mask, byte* dst, byte* src,
945
    word16 size)
946
0
{
947
0
    int i;
948
0
    for (i = 0; i < size; ++i) {
949
0
        dst[i] ^= (dst[i] ^ src[i]) & mask;
950
0
    }
951
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: integer.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: 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
952
953
#endif /* !WOLFSSL_NO_CT_OPS */
954
955
#ifndef WOLFSSL_HAVE_MIN
956
    #define WOLFSSL_HAVE_MIN
957
    #if defined(HAVE_FIPS) && !defined(min) /* so ifdef check passes */
958
        #define min min
959
    #endif
960
    /* returns the smaller of a and b */
961
    WC_MISC_STATIC WC_INLINE word32 min(word32 a, word32 b)
962
3.88M
    {
963
3.88M
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
3.88M
    defined(WORD64_AVAILABLE)
965
3.88M
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
3.88M
        word32 r = (a & ~gte_mask);
967
3.88M
        r |= (b & gte_mask);
968
3.88M
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
3.88M
    }
aes.c:min
Line
Count
Source
962
1.99k
    {
963
1.99k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
1.99k
    defined(WORD64_AVAILABLE)
965
1.99k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
1.99k
        word32 r = (a & ~gte_mask);
967
1.99k
        r |= (b & gte_mask);
968
1.99k
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
1.99k
    }
Unexecuted instantiation: arc4.c:min
asn.c:min
Line
Count
Source
962
55.2k
    {
963
55.2k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
55.2k
    defined(WORD64_AVAILABLE)
965
55.2k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
55.2k
        word32 r = (a & ~gte_mask);
967
55.2k
        r |= (b & gte_mask);
968
55.2k
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
55.2k
    }
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
dh.c:min
Line
Count
Source
962
165
    {
963
165
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
165
    defined(WORD64_AVAILABLE)
965
165
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
165
        word32 r = (a & ~gte_mask);
967
165
        r |= (b & gte_mask);
968
165
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
165
    }
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
hmac.c:min
Line
Count
Source
962
30.0k
    {
963
30.0k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
30.0k
    defined(WORD64_AVAILABLE)
965
30.0k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
30.0k
        word32 r = (a & ~gte_mask);
967
30.0k
        r |= (b & gte_mask);
968
30.0k
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
30.0k
    }
Unexecuted instantiation: integer.c:min
kdf.c:min
Line
Count
Source
962
1.10k
    {
963
1.10k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
1.10k
    defined(WORD64_AVAILABLE)
965
1.10k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
1.10k
        word32 r = (a & ~gte_mask);
967
1.10k
        r |= (b & gte_mask);
968
1.10k
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
1.10k
    }
Unexecuted instantiation: md2.c:min
md4.c:min
Line
Count
Source
962
30.3k
    {
963
30.3k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
30.3k
    defined(WORD64_AVAILABLE)
965
30.3k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
30.3k
        word32 r = (a & ~gte_mask);
967
30.3k
        r |= (b & gte_mask);
968
30.3k
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
30.3k
    }
md5.c:min
Line
Count
Source
962
144k
    {
963
144k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
144k
    defined(WORD64_AVAILABLE)
965
144k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
144k
        word32 r = (a & ~gte_mask);
967
144k
        r |= (b & gte_mask);
968
144k
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
144k
    }
Unexecuted instantiation: memory.c:min
Unexecuted instantiation: poly1305.c:min
pwdbased.c:min
Line
Count
Source
962
3.01k
    {
963
3.01k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
3.01k
    defined(WORD64_AVAILABLE)
965
3.01k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
3.01k
        word32 r = (a & ~gte_mask);
967
3.01k
        r |= (b & gte_mask);
968
3.01k
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
3.01k
    }
random.c:min
Line
Count
Source
962
102k
    {
963
102k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
102k
    defined(WORD64_AVAILABLE)
965
102k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
102k
        word32 r = (a & ~gte_mask);
967
102k
        r |= (b & gte_mask);
968
102k
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
102k
    }
Unexecuted instantiation: ripemd.c:min
Unexecuted instantiation: rsa.c:min
sha.c:min
Line
Count
Source
962
258k
    {
963
258k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
258k
    defined(WORD64_AVAILABLE)
965
258k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
258k
        word32 r = (a & ~gte_mask);
967
258k
        r |= (b & gte_mask);
968
258k
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
258k
    }
sha256.c:min
Line
Count
Source
962
240k
    {
963
240k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
240k
    defined(WORD64_AVAILABLE)
965
240k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
240k
        word32 r = (a & ~gte_mask);
967
240k
        r |= (b & gte_mask);
968
240k
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
240k
    }
Unexecuted instantiation: sha3.c:min
sha512.c:min
Line
Count
Source
962
2.93M
    {
963
2.93M
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
2.93M
    defined(WORD64_AVAILABLE)
965
2.93M
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
2.93M
        word32 r = (a & ~gte_mask);
967
2.93M
        r |= (b & gte_mask);
968
2.93M
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
2.93M
    }
Unexecuted instantiation: siphash.c:min
Unexecuted instantiation: sm2.c:min
Unexecuted instantiation: sm3.c:min
Unexecuted instantiation: sm4.c:min
Unexecuted instantiation: wc_encrypt.c:min
Unexecuted instantiation: wolfmath.c:min
ssl.c:min
Line
Count
Source
962
342
    {
963
342
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
342
    defined(WORD64_AVAILABLE)
965
342
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
342
        word32 r = (a & ~gte_mask);
967
342
        r |= (b & gte_mask);
968
342
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
342
    }
Unexecuted instantiation: tls.c:min
tls13.c:min
Line
Count
Source
962
14.0k
    {
963
14.0k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
14.0k
    defined(WORD64_AVAILABLE)
965
14.0k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
14.0k
        word32 r = (a & ~gte_mask);
967
14.0k
        r |= (b & gte_mask);
968
14.0k
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
14.0k
    }
Unexecuted instantiation: wc_mlkem.c:min
Unexecuted instantiation: wc_mlkem_poly.c:min
internal.c:min
Line
Count
Source
962
61.0k
    {
963
61.0k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
964
61.0k
    defined(WORD64_AVAILABLE)
965
61.0k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
966
61.0k
        word32 r = (a & ~gte_mask);
967
61.0k
        r |= (b & gte_mask);
968
61.0k
        return r;
969
#else /* WOLFSSL_NO_CT_OPS */
970
        return a > b ? b : a;
971
#endif /* WOLFSSL_NO_CT_OPS */
972
61.0k
    }
Unexecuted instantiation: keys.c:min
973
#endif /* !WOLFSSL_HAVE_MIN */
974
975
#ifndef WOLFSSL_HAVE_MAX
976
    #define WOLFSSL_HAVE_MAX
977
    #if defined(HAVE_FIPS) && !defined(max) /* so ifdef check passes */
978
        #define max max
979
    #endif
980
    WC_MISC_STATIC WC_INLINE word32 max(word32 a, word32 b)
981
0
    {
982
0
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
983
0
    defined(WORD64_AVAILABLE)
984
0
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
985
0
        return (a & gte_mask) | (b & ~gte_mask);
986
0
#else /* WOLFSSL_NO_CT_OPS */
987
0
        return a > b ? a : b;
988
0
#endif /* WOLFSSL_NO_CT_OPS */
989
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: integer.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: 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
990
#endif /* !WOLFSSL_HAVE_MAX */
991
992
#ifndef WOLFSSL_NO_INT_ENCODE
993
/* converts a 32 bit integer to 24 bit */
994
WC_MISC_STATIC WC_INLINE void c32to24(word32 in, word24 out)
995
115k
{
996
115k
    out[0] = (byte)((in >> 16) & 0xff);
997
115k
    out[1] = (byte)((in >>  8) & 0xff);
998
115k
    out[2] =  (byte)(in        & 0xff);
999
115k
}
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: integer.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: wc_encrypt.c:c32to24
Unexecuted instantiation: wolfmath.c:c32to24
Unexecuted instantiation: ssl.c:c32to24
Unexecuted instantiation: tls.c:c32to24
tls13.c:c32to24
Line
Count
Source
995
5.37k
{
996
5.37k
    out[0] = (byte)((in >> 16) & 0xff);
997
5.37k
    out[1] = (byte)((in >>  8) & 0xff);
998
5.37k
    out[2] =  (byte)(in        & 0xff);
999
5.37k
}
Unexecuted instantiation: wc_mlkem.c:c32to24
Unexecuted instantiation: wc_mlkem_poly.c:c32to24
internal.c:c32to24
Line
Count
Source
995
109k
{
996
109k
    out[0] = (byte)((in >> 16) & 0xff);
997
109k
    out[1] = (byte)((in >>  8) & 0xff);
998
109k
    out[2] =  (byte)(in        & 0xff);
999
109k
}
Unexecuted instantiation: keys.c:c32to24
1000
1001
/* convert 16 bit integer to opaque */
1002
WC_MISC_STATIC WC_INLINE void c16toa(word16 wc_u16, byte* c)
1003
603k
{
1004
603k
    c[0] = (byte)((wc_u16 >> 8) & 0xff);
1005
603k
    c[1] =  (byte)(wc_u16       & 0xff);
1006
603k
}
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: integer.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: wc_encrypt.c:c16toa
Unexecuted instantiation: wolfmath.c:c16toa
Unexecuted instantiation: ssl.c:c16toa
tls.c:c16toa
Line
Count
Source
1003
415k
{
1004
415k
    c[0] = (byte)((wc_u16 >> 8) & 0xff);
1005
415k
    c[1] =  (byte)(wc_u16       & 0xff);
1006
415k
}
tls13.c:c16toa
Line
Count
Source
1003
10.3k
{
1004
10.3k
    c[0] = (byte)((wc_u16 >> 8) & 0xff);
1005
10.3k
    c[1] =  (byte)(wc_u16       & 0xff);
1006
10.3k
}
Unexecuted instantiation: wc_mlkem.c:c16toa
Unexecuted instantiation: wc_mlkem_poly.c:c16toa
internal.c:c16toa
Line
Count
Source
1003
177k
{
1004
177k
    c[0] = (byte)((wc_u16 >> 8) & 0xff);
1005
177k
    c[1] =  (byte)(wc_u16       & 0xff);
1006
177k
}
Unexecuted instantiation: keys.c:c16toa
1007
1008
/* convert 32 bit integer to opaque */
1009
WC_MISC_STATIC WC_INLINE void c32toa(word32 wc_u32, byte* c)
1010
225k
{
1011
225k
#ifdef WOLFSSL_USE_ALIGN
1012
225k
    c[0] = (byte)((wc_u32 >> 24) & 0xff);
1013
225k
    c[1] = (byte)((wc_u32 >> 16) & 0xff);
1014
225k
    c[2] = (byte)((wc_u32 >>  8) & 0xff);
1015
225k
    c[3] =  (byte)(wc_u32        & 0xff);
1016
#elif defined(LITTLE_ENDIAN_ORDER)
1017
    *(word32*)c = ByteReverseWord32(wc_u32);
1018
#else
1019
    *(word32*)c = wc_u32;
1020
#endif
1021
225k
}
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: integer.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: wc_encrypt.c:c32toa
Unexecuted instantiation: wolfmath.c:c32toa
Unexecuted instantiation: ssl.c:c32toa
tls.c:c32toa
Line
Count
Source
1010
4.31k
{
1011
4.31k
#ifdef WOLFSSL_USE_ALIGN
1012
4.31k
    c[0] = (byte)((wc_u32 >> 24) & 0xff);
1013
4.31k
    c[1] = (byte)((wc_u32 >> 16) & 0xff);
1014
4.31k
    c[2] = (byte)((wc_u32 >>  8) & 0xff);
1015
4.31k
    c[3] =  (byte)(wc_u32        & 0xff);
1016
#elif defined(LITTLE_ENDIAN_ORDER)
1017
    *(word32*)c = ByteReverseWord32(wc_u32);
1018
#else
1019
    *(word32*)c = wc_u32;
1020
#endif
1021
4.31k
}
tls13.c:c32toa
Line
Count
Source
1010
3.19k
{
1011
3.19k
#ifdef WOLFSSL_USE_ALIGN
1012
3.19k
    c[0] = (byte)((wc_u32 >> 24) & 0xff);
1013
3.19k
    c[1] = (byte)((wc_u32 >> 16) & 0xff);
1014
3.19k
    c[2] = (byte)((wc_u32 >>  8) & 0xff);
1015
3.19k
    c[3] =  (byte)(wc_u32        & 0xff);
1016
#elif defined(LITTLE_ENDIAN_ORDER)
1017
    *(word32*)c = ByteReverseWord32(wc_u32);
1018
#else
1019
    *(word32*)c = wc_u32;
1020
#endif
1021
3.19k
}
Unexecuted instantiation: wc_mlkem.c:c32toa
Unexecuted instantiation: wc_mlkem_poly.c:c32toa
internal.c:c32toa
Line
Count
Source
1010
217k
{
1011
217k
#ifdef WOLFSSL_USE_ALIGN
1012
217k
    c[0] = (byte)((wc_u32 >> 24) & 0xff);
1013
217k
    c[1] = (byte)((wc_u32 >> 16) & 0xff);
1014
217k
    c[2] = (byte)((wc_u32 >>  8) & 0xff);
1015
217k
    c[3] =  (byte)(wc_u32        & 0xff);
1016
#elif defined(LITTLE_ENDIAN_ORDER)
1017
    *(word32*)c = ByteReverseWord32(wc_u32);
1018
#else
1019
    *(word32*)c = wc_u32;
1020
#endif
1021
217k
}
Unexecuted instantiation: keys.c:c32toa
1022
#endif
1023
1024
#ifndef WOLFSSL_NO_INT_DECODE
1025
/* convert a 24 bit integer into a 32 bit one */
1026
WC_MISC_STATIC WC_INLINE void c24to32(const word24 wc_u24, word32* wc_u32)
1027
403k
{
1028
403k
    *wc_u32 = ((word32)wc_u24[0] << 16) |
1029
403k
              ((word32)wc_u24[1] << 8) |
1030
403k
               (word32)wc_u24[2];
1031
403k
}
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: integer.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: 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
internal.c:c24to32
Line
Count
Source
1027
403k
{
1028
403k
    *wc_u32 = ((word32)wc_u24[0] << 16) |
1029
403k
              ((word32)wc_u24[1] << 8) |
1030
403k
               (word32)wc_u24[2];
1031
403k
}
Unexecuted instantiation: keys.c:c24to32
1032
1033
1034
/* convert opaque to 24 bit integer */
1035
WC_MISC_STATIC WC_INLINE void ato24(const byte* c, word32* wc_u24)
1036
0
{
1037
0
    *wc_u24 = ((word32)c[0] << 16) | ((word32)c[1] << 8) | c[2];
1038
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: integer.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: 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
1039
1040
/* convert opaque to 16 bit integer */
1041
WC_MISC_STATIC WC_INLINE void ato16(const byte* c, word16* wc_u16)
1042
1.17M
{
1043
1.17M
    *wc_u16 = (word16) ((c[0] << 8) | (c[1]));
1044
1.17M
}
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: integer.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: wc_encrypt.c:ato16
Unexecuted instantiation: wolfmath.c:ato16
Unexecuted instantiation: ssl.c:ato16
tls.c:ato16
Line
Count
Source
1042
290k
{
1043
290k
    *wc_u16 = (word16) ((c[0] << 8) | (c[1]));
1044
290k
}
tls13.c:ato16
Line
Count
Source
1042
13.5k
{
1043
13.5k
    *wc_u16 = (word16) ((c[0] << 8) | (c[1]));
1044
13.5k
}
Unexecuted instantiation: wc_mlkem.c:ato16
Unexecuted instantiation: wc_mlkem_poly.c:ato16
internal.c:ato16
Line
Count
Source
1042
872k
{
1043
872k
    *wc_u16 = (word16) ((c[0] << 8) | (c[1]));
1044
872k
}
Unexecuted instantiation: keys.c:ato16
1045
1046
/* convert opaque to 32 bit integer */
1047
WC_MISC_STATIC WC_INLINE void ato32(const byte* c, word32* wc_u32)
1048
0
{
1049
0
#ifdef WOLFSSL_USE_ALIGN
1050
0
    *wc_u32 = ((word32)c[0] << 24) |
1051
0
              ((word32)c[1] << 16) |
1052
0
              ((word32)c[2] << 8) |
1053
0
               (word32)c[3];
1054
0
#elif defined(LITTLE_ENDIAN_ORDER)
1055
0
    *wc_u32 = ByteReverseWord32(*(word32*)c);
1056
0
#else
1057
0
    *wc_u32 = *(word32*)c;
1058
0
#endif
1059
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: integer.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: 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
1060
1061
/* convert opaque to 32 bit integer. Interpret as little endian. */
1062
WC_MISC_STATIC WC_INLINE void ato32le(const byte* c, word32* wc_u32)
1063
0
{
1064
0
    *wc_u32 =  (word32)c[0] |
1065
0
              ((word32)c[1] << 8) |
1066
0
              ((word32)c[2] << 16) |
1067
0
              ((word32)c[3] << 24);
1068
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: integer.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: 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
1069
1070
1071
WC_MISC_STATIC WC_INLINE word32 btoi(byte b)
1072
94.8k
{
1073
94.8k
    return (word32)(b - 0x30);
1074
94.8k
}
Unexecuted instantiation: aes.c:btoi
Unexecuted instantiation: arc4.c:btoi
asn.c:btoi
Line
Count
Source
1072
94.8k
{
1073
94.8k
    return (word32)(b - 0x30);
1074
94.8k
}
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: integer.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: 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
1075
#endif
1076
1077
WC_MISC_STATIC WC_INLINE signed char HexCharToByte(char ch)
1078
0
{
1079
0
    signed char ret = (signed char)ch;
1080
0
    if (ret >= '0' && ret <= '9')
1081
0
        ret = (signed char)(ret - '0');
1082
0
    else if (ret >= 'A' && ret <= 'F')
1083
0
        ret = (signed char)(ret - ('A' - 10));
1084
0
    else if (ret >= 'a' && ret <= 'f')
1085
0
        ret = (signed char)(ret - ('a' - 10));
1086
0
    else
1087
0
        ret = -1; /* error case - return code must be signed */
1088
0
    return ret;
1089
0
}
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: integer.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
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
1090
1091
WC_MISC_STATIC WC_INLINE char ByteToHex(byte in)
1092
0
{
1093
0
    static ALIGN64 const char kHexChar[] = {
1094
0
        '0', '1', '2', '3', '4', '5', '6', '7',
1095
0
        '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
1096
0
    };
1097
0
    return (char)(kHexChar[in & 0xF]);
1098
0
}
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: integer.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
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
1099
1100
WC_MISC_STATIC WC_INLINE int ByteToHexStr(byte in, char* out)
1101
0
{
1102
0
    if (out == NULL)
1103
0
        return -1;
1104
0
1105
0
    out[0] = ByteToHex((byte)(in >> 4));
1106
0
    out[1] = ByteToHex((byte)(in & 0xf));
1107
0
    return 0;
1108
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: integer.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: 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
1109
1110
WC_MISC_STATIC WC_INLINE int CharIsWhiteSpace(char ch)
1111
0
{
1112
0
#ifndef WOLFSSL_NO_CT_OPS
1113
0
    return (ctMaskEq(ch, ' ') |
1114
0
            ctMaskEq(ch, '\t') |
1115
0
            ctMaskEq(ch, '\n')) & 1;
1116
#else /* WOLFSSL_NO_CT_OPS */
1117
    switch (ch) {
1118
        case ' ':
1119
        case '\t':
1120
        case '\n':
1121
            return 1;
1122
        default:
1123
            return 0;
1124
    }
1125
#endif /* WOLFSSL_NO_CT_OPS */
1126
0
}
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: integer.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
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
1127
1128
#if defined(WOLFSSL_W64_WRAPPER)
1129
#if defined(WORD64_AVAILABLE) && !defined(WOLFSSL_W64_WRAPPER_TEST)
1130
0
WC_MISC_STATIC WC_INLINE void w64Increment(w64wrapper *n) {
1131
0
    n->n++;
1132
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: integer.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: 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
1133
1134
0
WC_MISC_STATIC WC_INLINE void w64Decrement(w64wrapper *n) {
1135
0
    n->n--;
1136
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: integer.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: 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
1137
1138
0
WC_MISC_STATIC WC_INLINE byte w64Equal(w64wrapper a, w64wrapper b) {
1139
0
    return (a.n == b.n);
1140
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: integer.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: 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
1141
1142
0
WC_MISC_STATIC WC_INLINE word32 w64GetLow32(w64wrapper n) {
1143
0
    return (word32)n.n;
1144
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: integer.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: 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
1145
1146
0
WC_MISC_STATIC WC_INLINE word32 w64GetHigh32(w64wrapper n) {
1147
0
    return (word32)(n.n >> 32);
1148
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: integer.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: 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
1149
1150
0
WC_MISC_STATIC WC_INLINE void w64SetLow32(w64wrapper *n, word32 low) {
1151
0
    n->n = (n->n & (~(word64)(0xffffffff))) | low;
1152
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: integer.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: 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
1153
1154
WC_MISC_STATIC WC_INLINE w64wrapper w64Add32(w64wrapper a, word32 b, byte *wrap)
1155
0
{
1156
0
    a.n += b;
1157
0
    if (a.n < b && wrap != NULL)
1158
0
        *wrap = 1;
1159
0
1160
0
    return a;
1161
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: integer.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: 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
1162
1163
WC_MISC_STATIC WC_INLINE w64wrapper w64Add(w64wrapper a, w64wrapper b,
1164
    byte *wrap)
1165
0
{
1166
0
    a.n += b.n;
1167
0
    if (a.n < b.n && wrap != NULL)
1168
0
        *wrap = 1;
1169
0
1170
0
    return a;
1171
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: integer.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: 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
1172
1173
WC_MISC_STATIC WC_INLINE w64wrapper w64Sub32(w64wrapper a, word32 b, byte *wrap)
1174
0
{
1175
0
    if (a.n < b && wrap != NULL)
1176
0
        *wrap = 1;
1177
0
    a.n = a.n - b;
1178
0
    return a;
1179
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: integer.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: 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
1180
1181
WC_MISC_STATIC WC_INLINE byte w64GT(w64wrapper a, w64wrapper b)
1182
0
{
1183
0
    return a.n > b.n;
1184
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: integer.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: 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
1185
1186
WC_MISC_STATIC WC_INLINE byte w64IsZero(w64wrapper a)
1187
0
{
1188
0
    return a.n == 0;
1189
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: integer.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: 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
1190
1191
WC_MISC_STATIC WC_INLINE void c64toa(const w64wrapper *a, byte *out)
1192
0
{
1193
0
#ifdef BIG_ENDIAN_ORDER
1194
0
    XMEMCPY(out, &a->n, sizeof(a->n));
1195
0
#else
1196
0
    word64 _out;
1197
0
    _out = ByteReverseWord64(a->n);
1198
0
    XMEMCPY(out, &_out, sizeof(_out));
1199
0
#endif /* BIG_ENDIAN_ORDER */
1200
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: integer.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: 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
1201
1202
WC_MISC_STATIC WC_INLINE void ato64(const byte *in, w64wrapper *w64)
1203
0
{
1204
0
#ifdef BIG_ENDIAN_ORDER
1205
0
    XMEMCPY(&w64->n, in, sizeof(w64->n));
1206
0
#else
1207
0
    union {
1208
0
        word64 w;
1209
0
        byte b[sizeof(word64)];
1210
0
    } _in;
1211
0
    XMEMCPY(_in.b, in, sizeof(_in));
1212
0
    w64->n = ByteReverseWord64(_in.w);
1213
0
#endif /* BIG_ENDIAN_ORDER */
1214
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: integer.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: 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
1215
1216
WC_MISC_STATIC WC_INLINE w64wrapper w64From32(word32 hi, word32 lo)
1217
217k
{
1218
217k
    w64wrapper ret;
1219
217k
    ret.n = ((word64)hi << 32) | lo;
1220
217k
    return ret;
1221
217k
}
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: integer.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: 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
internal.c:w64From32
Line
Count
Source
1217
217k
{
1218
217k
    w64wrapper ret;
1219
217k
    ret.n = ((word64)hi << 32) | lo;
1220
217k
    return ret;
1221
217k
}
Unexecuted instantiation: keys.c:w64From32
1222
1223
WC_MISC_STATIC WC_INLINE byte w64GTE(w64wrapper a, w64wrapper b)
1224
53.4k
{
1225
53.4k
    return a.n >= b.n;
1226
53.4k
}
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: integer.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: 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
internal.c:w64GTE
Line
Count
Source
1224
53.4k
{
1225
53.4k
    return a.n >= b.n;
1226
53.4k
}
Unexecuted instantiation: keys.c:w64GTE
1227
1228
WC_MISC_STATIC WC_INLINE byte w64LT(w64wrapper a, w64wrapper b)
1229
0
{
1230
0
    return a.n < b.n;
1231
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: integer.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: 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
1232
1233
WC_MISC_STATIC WC_INLINE w64wrapper w64Sub(w64wrapper a, w64wrapper b)
1234
0
{
1235
0
    a.n -= b.n;
1236
0
    return a;
1237
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: integer.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: 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
1238
1239
WC_MISC_STATIC WC_INLINE void w64Zero(w64wrapper *a)
1240
0
{
1241
0
    a->n = 0;
1242
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: integer.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: 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
1243
1244
WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftRight(w64wrapper a, int shift)
1245
0
{
1246
0
    a.n >>= shift;
1247
0
    return a;
1248
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: integer.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: 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
1249
1250
WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftLeft(w64wrapper a, int shift)
1251
0
{
1252
0
    a.n <<= shift;
1253
0
    return a;
1254
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: integer.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: 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
1255
1256
WC_MISC_STATIC WC_INLINE w64wrapper w64Mul(word32 a, word32 b)
1257
0
{
1258
0
    w64wrapper ret;
1259
0
    ret.n = (word64)a * (word64)b;
1260
0
    return ret;
1261
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: integer.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: 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
1262
1263
#else
1264
1265
WC_MISC_STATIC WC_INLINE void w64Increment(w64wrapper *n)
1266
{
1267
    n->n[1]++;
1268
    if (n->n[1] == 0)
1269
        n->n[0]++;
1270
}
1271
1272
WC_MISC_STATIC WC_INLINE void w64Decrement(w64wrapper *n) {
1273
    if (n->n[1] == 0)
1274
        n->n[0]--;
1275
    n->n[1]--;
1276
}
1277
1278
WC_MISC_STATIC WC_INLINE byte w64Equal(w64wrapper a, w64wrapper b)
1279
{
1280
    return (a.n[0] == b.n[0] && a.n[1] == b.n[1]);
1281
}
1282
1283
WC_MISC_STATIC WC_INLINE word32 w64GetLow32(w64wrapper n) {
1284
    return n.n[1];
1285
}
1286
1287
WC_MISC_STATIC WC_INLINE word32 w64GetHigh32(w64wrapper n) {
1288
    return n.n[0];
1289
}
1290
1291
WC_MISC_STATIC WC_INLINE void w64SetLow32(w64wrapper *n, word32 low)
1292
{
1293
    n->n[1] = low;
1294
}
1295
1296
WC_MISC_STATIC WC_INLINE w64wrapper w64Add32(w64wrapper a, word32 b, byte *wrap)
1297
{
1298
    a.n[1] += b;
1299
    if (a.n[1] < b) {
1300
        a.n[0]++;
1301
        if (wrap != NULL && a.n[0] == 0)
1302
                *wrap = 1;
1303
    }
1304
1305
    return a;
1306
}
1307
1308
WC_MISC_STATIC WC_INLINE w64wrapper w64Add(w64wrapper a, w64wrapper b,
1309
    byte *wrap)
1310
{
1311
    a.n[1] += b.n[1];
1312
    if (a.n[1] < b.n[1]) {
1313
        a.n[0]++;
1314
        if (wrap != NULL && a.n[0] == 0)
1315
                *wrap = 1;
1316
    }
1317
1318
    a.n[0] += b.n[0];
1319
    if (wrap != NULL && a.n[0] < b.n[0]) {
1320
        *wrap = 1;
1321
    }
1322
1323
    return a;
1324
}
1325
1326
WC_MISC_STATIC WC_INLINE w64wrapper w64Sub32(w64wrapper a, word32 b, byte *wrap)
1327
{
1328
    byte _underflow = 0;
1329
    if (a.n[1] < b)
1330
        _underflow = 1;
1331
1332
    a.n[1] -= b;
1333
    if (_underflow) {
1334
        if (a.n[0] == 0 && wrap != NULL)
1335
            *wrap = 1;
1336
        a.n[0]--;
1337
    }
1338
1339
    return a;
1340
}
1341
1342
WC_MISC_STATIC WC_INLINE w64wrapper w64Sub(w64wrapper a, w64wrapper b)
1343
{
1344
    if (a.n[1] < b.n[1])
1345
        a.n[0]--;
1346
    a.n[1] -= b.n[1];
1347
    a.n[0] -= b.n[0];
1348
    return a;
1349
}
1350
1351
WC_MISC_STATIC WC_INLINE void w64Zero(w64wrapper *a)
1352
{
1353
    a->n[0] = a->n[1] = 0;
1354
}
1355
1356
WC_MISC_STATIC WC_INLINE byte w64GT(w64wrapper a, w64wrapper b)
1357
{
1358
    if (a.n[0] > b.n[0])
1359
        return 1;
1360
    if (a.n[0] == b.n[0])
1361
        return a.n[1] > b.n[1];
1362
    return 0;
1363
}
1364
1365
WC_MISC_STATIC WC_INLINE byte w64GTE(w64wrapper a, w64wrapper b)
1366
{
1367
    if (a.n[0] > b.n[0])
1368
        return 1;
1369
    if (a.n[0] == b.n[0])
1370
        return a.n[1] >= b.n[1];
1371
    return 0;
1372
}
1373
1374
WC_MISC_STATIC WC_INLINE byte w64IsZero(w64wrapper a)
1375
{
1376
    return a.n[0] == 0 && a.n[1] == 0;
1377
}
1378
1379
WC_MISC_STATIC WC_INLINE void c64toa(const w64wrapper *a, byte *out)
1380
{
1381
#ifdef BIG_ENDIAN_ORDER
1382
    word32 *_out = (word32*)(out);
1383
    _out[0] = a->n[0];
1384
    _out[1] = a->n[1];
1385
#else
1386
    c32toa(a->n[0], out);
1387
    c32toa(a->n[1], out + 4);
1388
#endif /* BIG_ENDIAN_ORDER */
1389
}
1390
1391
WC_MISC_STATIC WC_INLINE void ato64(const byte *in, w64wrapper *w64)
1392
{
1393
#ifdef BIG_ENDIAN_ORDER
1394
    const word32 *_in = (const word32*)(in);
1395
    w64->n[0] = *_in;
1396
    w64->n[1] = *(_in + 1);
1397
#else
1398
    ato32(in, &w64->n[0]);
1399
    ato32(in + 4, &w64->n[1]);
1400
#endif /* BIG_ENDIAN_ORDER */
1401
}
1402
1403
WC_MISC_STATIC WC_INLINE w64wrapper w64From32(word32 hi, word32 lo)
1404
{
1405
    w64wrapper w64;
1406
    w64.n[0] = hi;
1407
    w64.n[1] = lo;
1408
    return w64;
1409
}
1410
1411
WC_MISC_STATIC WC_INLINE byte w64LT(w64wrapper a, w64wrapper b)
1412
{
1413
    if (a.n[0] < b.n[0])
1414
        return 1;
1415
    if (a.n[0] == b.n[0])
1416
        return a.n[1] < b.n[1];
1417
1418
    return 0;
1419
}
1420
1421
WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftRight(w64wrapper a, int shift)
1422
{
1423
     if (shift < 32) {
1424
         a.n[1] = (a.n[1] >> shift) | (a.n[0] << (32 - shift));
1425
         a.n[0] >>= shift;
1426
     }
1427
     else {
1428
         a.n[1] = a.n[0] >> (shift - 32);
1429
         a.n[0] = 0;
1430
     }
1431
     return a;
1432
}
1433
WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftLeft(w64wrapper a, int shift)
1434
{
1435
     if (shift < 32) {
1436
         a.n[0] = (a.n[0] << shift) | (a.n[1] >> (32 - shift));
1437
         a.n[1] <<= shift;
1438
     }
1439
     else {
1440
         a.n[0] = a.n[1] << (shift - 32);
1441
         a.n[1] = 0;
1442
     }
1443
     return a;
1444
}
1445
1446
WC_MISC_STATIC WC_INLINE w64wrapper w64Mul(word32 a, word32 b)
1447
{
1448
    w64wrapper ret;
1449
    word16 ltlA, ltlB, ltlC, ltlD;
1450
    word32 bigA, bigB, bigC, bigD;
1451
1452
    ltlA = a & 0xFFFF;
1453
    ltlB = (a >> 16) & 0xFFFF;
1454
    ltlC = b & 0xFFFF;
1455
    ltlD = (b >> 16) & 0xFFFF;
1456
1457
    bigA = (word32)ltlA * (word32)ltlC;
1458
    bigC = (word32)ltlB * (word32)ltlC;
1459
    bigD = (word32)ltlA * (word32)ltlD;
1460
    bigB = (word32)ltlB * (word32)ltlD;
1461
1462
    ret = w64From32(0, bigB);
1463
    ret = w64ShiftLeft(ret, 16);
1464
    ret = w64Add32(ret, bigD, NULL);
1465
    ret = w64Add32(ret, bigC, NULL);
1466
    ret = w64ShiftLeft(ret, 16);
1467
    return w64Add32(ret, bigA, NULL);
1468
}
1469
1470
#endif /* WORD64_AVAILABLE && !WOLFSSL_W64_WRAPPER_TEST */
1471
#endif /* WOLFSSL_W64_WRAPPER */
1472
1473
#if defined(HAVE_SESSION_TICKET) || !defined(NO_CERTS) || \
1474
    !defined(NO_SESSION_CACHE)
1475
/* Make a word from the front of random hash */
1476
WC_MISC_STATIC WC_INLINE word32 MakeWordFromHash(const byte* hashID)
1477
4.65k
{
1478
4.65k
    return ((word32)hashID[0] << 24) | ((word32)hashID[1] << 16) |
1479
4.65k
           ((word32)hashID[2] <<  8) |  (word32)hashID[3];
1480
4.65k
}
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: integer.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: wc_encrypt.c:MakeWordFromHash
Unexecuted instantiation: wolfmath.c:MakeWordFromHash
ssl.c:MakeWordFromHash
Line
Count
Source
1477
4.65k
{
1478
4.65k
    return ((word32)hashID[0] << 24) | ((word32)hashID[1] << 16) |
1479
4.65k
           ((word32)hashID[2] <<  8) |  (word32)hashID[3];
1480
4.65k
}
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
1481
#endif /* HAVE_SESSION_TICKET || !NO_CERTS || !NO_SESSION_CACHE */
1482
1483
1484
#if !defined(WOLFCRYPT_ONLY) && !defined(NO_HASH_WRAPPER) && \
1485
    (!defined(NO_SESSION_CACHE) || defined(HAVE_SESSION_TICKET))
1486
1487
#include <wolfssl/wolfcrypt/hash.h>
1488
1489
/* some session IDs aren't random after all, let's make them random */
1490
WC_MISC_STATIC WC_INLINE word32 HashObject(const byte* o, word32 len,
1491
                                           int* error)
1492
432
{
1493
432
    byte digest[WC_MAX_DIGEST_SIZE];
1494
1495
432
#ifndef NO_MD5
1496
432
    *error =  wc_Md5Hash(o, len, digest);
1497
#elif !defined(NO_SHA)
1498
    *error =  wc_ShaHash(o, len, digest);
1499
#elif !defined(NO_SHA256)
1500
    *error =  wc_Sha256Hash(o, len, digest);
1501
#else
1502
    #error "We need a digest to hash the session IDs"
1503
#endif
1504
1505
432
    return *error == 0 ? MakeWordFromHash(digest) : 0; /* 0 on failure */
1506
432
}
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: integer.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: wc_encrypt.c:HashObject
Unexecuted instantiation: wolfmath.c:HashObject
ssl.c:HashObject
Line
Count
Source
1492
432
{
1493
432
    byte digest[WC_MAX_DIGEST_SIZE];
1494
1495
432
#ifndef NO_MD5
1496
432
    *error =  wc_Md5Hash(o, len, digest);
1497
#elif !defined(NO_SHA)
1498
    *error =  wc_ShaHash(o, len, digest);
1499
#elif !defined(NO_SHA256)
1500
    *error =  wc_Sha256Hash(o, len, digest);
1501
#else
1502
    #error "We need a digest to hash the session IDs"
1503
#endif
1504
1505
432
    return *error == 0 ? MakeWordFromHash(digest) : 0; /* 0 on failure */
1506
432
}
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
1507
#endif /* WOLFCRYPT_ONLY && !NO_HASH_WRAPPER &&
1508
        * (!NO_SESSION_CACHE || HAVE_SESSION_TICKET) */
1509
1510
WC_MISC_STATIC WC_INLINE char* CopyString(const char* src, int srcLen,
1511
7.80k
        void* heap, int type) {
1512
7.80k
    char* dst = NULL;
1513
1514
7.80k
    if (src == NULL)
1515
4.33k
        return NULL;
1516
1517
3.47k
    if (srcLen <= 0)
1518
2.27k
        srcLen = (int)XSTRLEN(src);
1519
1520
3.47k
    dst = (char*)XMALLOC((size_t)srcLen + 1, heap, type);
1521
3.47k
    if (dst != NULL) {
1522
3.47k
        XMEMCPY(dst, src, (size_t)srcLen);
1523
3.47k
        dst[srcLen] = '\0';
1524
3.47k
    }
1525
1526
3.47k
    return dst;
1527
7.80k
}
Unexecuted instantiation: aes.c:CopyString
Unexecuted instantiation: arc4.c:CopyString
asn.c:CopyString
Line
Count
Source
1511
7.80k
        void* heap, int type) {
1512
7.80k
    char* dst = NULL;
1513
1514
7.80k
    if (src == NULL)
1515
4.33k
        return NULL;
1516
1517
3.47k
    if (srcLen <= 0)
1518
2.27k
        srcLen = (int)XSTRLEN(src);
1519
1520
3.47k
    dst = (char*)XMALLOC((size_t)srcLen + 1, heap, type);
1521
3.47k
    if (dst != NULL) {
1522
3.47k
        XMEMCPY(dst, src, (size_t)srcLen);
1523
3.47k
        dst[srcLen] = '\0';
1524
3.47k
    }
1525
1526
3.47k
    return dst;
1527
7.80k
}
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: integer.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: 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
1528
1529
#endif /* !WOLFSSL_MISC_INCLUDED && !NO_INLINE */
1530
1531
#endif /* WOLF_CRYPT_MISC_C */