Coverage Report

Created: 2026-05-18 06:53

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
/* This routine performs a left circular arithmetic shift of <x> by <y> value. */
108
109
    WC_MISC_STATIC WC_INLINE word32 rotlFixed(word32 x, word32 y)
110
272M
    {
111
272M
        return (x << y) | (x >> (sizeof(x) * 8 - y));
112
272M
    }
aes.c:rotlFixed
Line
Count
Source
110
818k
    {
111
818k
        return (x << y) | (x >> (sizeof(x) * 8 - y));
112
818k
    }
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
110
742k
    {
111
742k
        return (x << y) | (x >> (sizeof(x) * 8 - y));
112
742k
    }
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
110
36.3k
    {
111
36.3k
        return (x << y) | (x >> (sizeof(x) * 8 - y));
112
36.3k
    }
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
110
1.17M
    {
111
1.17M
        return (x << y) | (x >> (sizeof(x) * 8 - y));
112
1.17M
    }
md5.c:rotlFixed
Line
Count
Source
110
41.4M
    {
111
41.4M
        return (x << y) | (x >> (sizeof(x) * 8 - y));
112
41.4M
    }
Unexecuted instantiation: memory.c:rotlFixed
Unexecuted instantiation: poly1305.c:rotlFixed
Unexecuted instantiation: pwdbased.c:rotlFixed
random.c:rotlFixed
Line
Count
Source
110
514k
    {
111
514k
        return (x << y) | (x >> (sizeof(x) * 8 - y));
112
514k
    }
Unexecuted instantiation: ripemd.c:rotlFixed
Unexecuted instantiation: rsa.c:rotlFixed
sha.c:rotlFixed
Line
Count
Source
110
211M
    {
111
211M
        return (x << y) | (x >> (sizeof(x) * 8 - y));
112
211M
    }
sha256.c:rotlFixed
Line
Count
Source
110
16.5M
    {
111
16.5M
        return (x << y) | (x >> (sizeof(x) * 8 - y));
112
16.5M
    }
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
113
114
/* This routine performs a right circular arithmetic shift of <x> by <y> value. */
115
    WC_MISC_STATIC WC_INLINE word32 rotrFixed(word32 x, word32 y)
116
606M
    {
117
606M
        return (x >> y) | (x << (sizeof(x) * 8 - y));
118
606M
    }
aes.c:rotrFixed
Line
Count
Source
116
818k
    {
117
818k
        return (x >> y) | (x << (sizeof(x) * 8 - y));
118
818k
    }
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
116
171k
    {
117
171k
        return (x >> y) | (x << (sizeof(x) * 8 - y));
118
171k
    }
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
116
514k
    {
117
514k
        return (x >> y) | (x << (sizeof(x) * 8 - y));
118
514k
    }
Unexecuted instantiation: ripemd.c:rotrFixed
Unexecuted instantiation: rsa.c:rotrFixed
sha.c:rotrFixed
Line
Count
Source
116
14.8M
    {
117
14.8M
        return (x >> y) | (x << (sizeof(x) * 8 - y));
118
14.8M
    }
sha256.c:rotrFixed
Line
Count
Source
116
590M
    {
117
590M
        return (x >> y) | (x << (sizeof(x) * 8 - y));
118
590M
    }
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
119
120
#endif
121
122
/* This routine performs a left circular arithmetic shift of <x> by <y> value */
123
WC_MISC_STATIC WC_INLINE word16 rotlFixed16(word16 x, word16 y)
124
0
{
125
0
    return (word16)((x << y) | (x >> (sizeof(x) * 8U - y)));
126
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
127
128
129
/* This routine performs a right circular arithmetic shift of <x> by <y> value */
130
WC_MISC_STATIC WC_INLINE word16 rotrFixed16(word16 x, word16 y)
131
0
{
132
0
    return (word16)((x >> y) | (x << (sizeof(x) * 8U - y)));
133
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
134
135
/* This routine performs a byte swap of 32-bit word value. */
136
#if defined(__CCRX__) && !defined(NO_INLINE) /* shortest version for CC-RX */
137
    #define ByteReverseWord32(value) _builtin_revl(value)
138
#else
139
WC_MISC_STATIC WC_INLINE word32 ByteReverseWord32(word32 value)
140
32.6M
{
141
#ifdef PPC_INTRINSICS
142
    /* PPC: load reverse indexed instruction */
143
    return (word32)__lwbrx(&value,0);
144
#elif defined(__ICCARM__)
145
    return (word32)__REV(value);
146
#elif defined(KEIL_INTRINSICS)
147
    return (word32)__rev(value);
148
#elif defined(__CCRX__)
149
    return (word32)_builtin_revl(value);
150
#elif defined(WOLF_ALLOW_BUILTIN) && \
151
        defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3)
152
    return (word32)__builtin_bswap32(value);
153
#elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \
154
      defined(__aarch64__)
155
    __asm__ volatile (
156
        "REV32 %0, %0  \n"
157
        : "+r" (value)
158
        :
159
    );
160
    return value;
161
#elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \
162
      (defined(__thumb__) || defined(__arm__))
163
    __asm__ volatile (
164
        "REV %0, %0  \n"
165
        : "+r" (value)
166
        :
167
    );
168
    return value;
169
#elif defined(FAST_ROTATE)
170
    /* 5 instructions with rotate instruction, 9 without */
171
32.6M
    return (rotrFixed(value, 8U) & 0xff00ff00) |
172
32.6M
           (rotlFixed(value, 8U) & 0x00ff00ff);
173
#else
174
    /* 6 instructions with rotate instruction, 8 without */
175
    value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8);
176
    return rotlFixed(value, 16U);
177
#endif
178
32.6M
}
aes.c:ByteReverseWord32
Line
Count
Source
140
818k
{
141
#ifdef PPC_INTRINSICS
142
    /* PPC: load reverse indexed instruction */
143
    return (word32)__lwbrx(&value,0);
144
#elif defined(__ICCARM__)
145
    return (word32)__REV(value);
146
#elif defined(KEIL_INTRINSICS)
147
    return (word32)__rev(value);
148
#elif defined(__CCRX__)
149
    return (word32)_builtin_revl(value);
150
#elif defined(WOLF_ALLOW_BUILTIN) && \
151
        defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3)
152
    return (word32)__builtin_bswap32(value);
153
#elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \
154
      defined(__aarch64__)
155
    __asm__ volatile (
156
        "REV32 %0, %0  \n"
157
        : "+r" (value)
158
        :
159
    );
160
    return value;
161
#elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \
162
      (defined(__thumb__) || defined(__arm__))
163
    __asm__ volatile (
164
        "REV %0, %0  \n"
165
        : "+r" (value)
166
        :
167
    );
168
    return value;
169
#elif defined(FAST_ROTATE)
170
    /* 5 instructions with rotate instruction, 9 without */
171
818k
    return (rotrFixed(value, 8U) & 0xff00ff00) |
172
818k
           (rotlFixed(value, 8U) & 0x00ff00ff);
173
#else
174
    /* 6 instructions with rotate instruction, 8 without */
175
    value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8);
176
    return rotlFixed(value, 16U);
177
#endif
178
818k
}
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
140
14.5k
{
141
#ifdef PPC_INTRINSICS
142
    /* PPC: load reverse indexed instruction */
143
    return (word32)__lwbrx(&value,0);
144
#elif defined(__ICCARM__)
145
    return (word32)__REV(value);
146
#elif defined(KEIL_INTRINSICS)
147
    return (word32)__rev(value);
148
#elif defined(__CCRX__)
149
    return (word32)_builtin_revl(value);
150
#elif defined(WOLF_ALLOW_BUILTIN) && \
151
        defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3)
152
    return (word32)__builtin_bswap32(value);
153
#elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \
154
      defined(__aarch64__)
155
    __asm__ volatile (
156
        "REV32 %0, %0  \n"
157
        : "+r" (value)
158
        :
159
    );
160
    return value;
161
#elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \
162
      (defined(__thumb__) || defined(__arm__))
163
    __asm__ volatile (
164
        "REV %0, %0  \n"
165
        : "+r" (value)
166
        :
167
    );
168
    return value;
169
#elif defined(FAST_ROTATE)
170
    /* 5 instructions with rotate instruction, 9 without */
171
14.5k
    return (rotrFixed(value, 8U) & 0xff00ff00) |
172
14.5k
           (rotlFixed(value, 8U) & 0x00ff00ff);
173
#else
174
    /* 6 instructions with rotate instruction, 8 without */
175
    value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8);
176
    return rotlFixed(value, 16U);
177
#endif
178
14.5k
}
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
140
514k
{
141
#ifdef PPC_INTRINSICS
142
    /* PPC: load reverse indexed instruction */
143
    return (word32)__lwbrx(&value,0);
144
#elif defined(__ICCARM__)
145
    return (word32)__REV(value);
146
#elif defined(KEIL_INTRINSICS)
147
    return (word32)__rev(value);
148
#elif defined(__CCRX__)
149
    return (word32)_builtin_revl(value);
150
#elif defined(WOLF_ALLOW_BUILTIN) && \
151
        defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3)
152
    return (word32)__builtin_bswap32(value);
153
#elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \
154
      defined(__aarch64__)
155
    __asm__ volatile (
156
        "REV32 %0, %0  \n"
157
        : "+r" (value)
158
        :
159
    );
160
    return value;
161
#elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \
162
      (defined(__thumb__) || defined(__arm__))
163
    __asm__ volatile (
164
        "REV %0, %0  \n"
165
        : "+r" (value)
166
        :
167
    );
168
    return value;
169
#elif defined(FAST_ROTATE)
170
    /* 5 instructions with rotate instruction, 9 without */
171
514k
    return (rotrFixed(value, 8U) & 0xff00ff00) |
172
514k
           (rotlFixed(value, 8U) & 0x00ff00ff);
173
#else
174
    /* 6 instructions with rotate instruction, 8 without */
175
    value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8);
176
    return rotlFixed(value, 16U);
177
#endif
178
514k
}
Unexecuted instantiation: ripemd.c:ByteReverseWord32
Unexecuted instantiation: rsa.c:ByteReverseWord32
sha.c:ByteReverseWord32
Line
Count
Source
140
14.8M
{
141
#ifdef PPC_INTRINSICS
142
    /* PPC: load reverse indexed instruction */
143
    return (word32)__lwbrx(&value,0);
144
#elif defined(__ICCARM__)
145
    return (word32)__REV(value);
146
#elif defined(KEIL_INTRINSICS)
147
    return (word32)__rev(value);
148
#elif defined(__CCRX__)
149
    return (word32)_builtin_revl(value);
150
#elif defined(WOLF_ALLOW_BUILTIN) && \
151
        defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3)
152
    return (word32)__builtin_bswap32(value);
153
#elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \
154
      defined(__aarch64__)
155
    __asm__ volatile (
156
        "REV32 %0, %0  \n"
157
        : "+r" (value)
158
        :
159
    );
160
    return value;
161
#elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \
162
      (defined(__thumb__) || defined(__arm__))
163
    __asm__ volatile (
164
        "REV %0, %0  \n"
165
        : "+r" (value)
166
        :
167
    );
168
    return value;
169
#elif defined(FAST_ROTATE)
170
    /* 5 instructions with rotate instruction, 9 without */
171
14.8M
    return (rotrFixed(value, 8U) & 0xff00ff00) |
172
14.8M
           (rotlFixed(value, 8U) & 0x00ff00ff);
173
#else
174
    /* 6 instructions with rotate instruction, 8 without */
175
    value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8);
176
    return rotlFixed(value, 16U);
177
#endif
178
14.8M
}
sha256.c:ByteReverseWord32
Line
Count
Source
140
16.5M
{
141
#ifdef PPC_INTRINSICS
142
    /* PPC: load reverse indexed instruction */
143
    return (word32)__lwbrx(&value,0);
144
#elif defined(__ICCARM__)
145
    return (word32)__REV(value);
146
#elif defined(KEIL_INTRINSICS)
147
    return (word32)__rev(value);
148
#elif defined(__CCRX__)
149
    return (word32)_builtin_revl(value);
150
#elif defined(WOLF_ALLOW_BUILTIN) && \
151
        defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3)
152
    return (word32)__builtin_bswap32(value);
153
#elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \
154
      defined(__aarch64__)
155
    __asm__ volatile (
156
        "REV32 %0, %0  \n"
157
        : "+r" (value)
158
        :
159
    );
160
    return value;
161
#elif defined(WOLFSSL_BYTESWAP32_ASM) && defined(__GNUC__) && \
162
      (defined(__thumb__) || defined(__arm__))
163
    __asm__ volatile (
164
        "REV %0, %0  \n"
165
        : "+r" (value)
166
        :
167
    );
168
    return value;
169
#elif defined(FAST_ROTATE)
170
    /* 5 instructions with rotate instruction, 9 without */
171
16.5M
    return (rotrFixed(value, 8U) & 0xff00ff00) |
172
16.5M
           (rotlFixed(value, 8U) & 0x00ff00ff);
173
#else
174
    /* 6 instructions with rotate instruction, 8 without */
175
    value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8);
176
    return rotlFixed(value, 16U);
177
#endif
178
16.5M
}
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
179
#endif /* __CCRX__ */
180
/* This routine performs a byte swap of words array of a given count. */
181
WC_MISC_STATIC WC_INLINE void ByteReverseWords(word32* out, const word32* in,
182
                                    word32 byteCount)
183
2.13M
{
184
2.13M
    word32 i;
185
186
2.13M
#ifdef WOLFSSL_USE_ALIGN
187
2.13M
    if ((((size_t)in & 0x3) == 0) &&
188
2.13M
        (((size_t)out & 0x3) == 0))
189
2.13M
#endif
190
2.13M
    {
191
2.13M
        word32 count = byteCount/(word32)sizeof(word32);
192
33.5M
        for (i = 0; i < count; i++)
193
31.3M
            out[i] = ByteReverseWord32(in[i]);
194
2.13M
    }
195
0
#ifdef WOLFSSL_USE_ALIGN
196
0
    else if (((size_t)in & 0x3) == 0) {
197
0
        byte *out_bytes = (byte *)out;
198
0
        word32 scratch;
199
200
0
        byteCount &= ~0x3U;
201
202
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word32)) {
203
0
            scratch = ByteReverseWord32(*in++);
204
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
205
0
        }
206
0
    }
207
0
    else if (((size_t)out & 0x3) == 0) {
208
0
        const byte *in_bytes = (const byte *)in;
209
0
        word32 scratch;
210
211
0
        byteCount &= ~0x3U;
212
213
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word32)) {
214
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
215
0
            *out++ = ByteReverseWord32(scratch);
216
0
        }
217
0
    }
218
0
    else {
219
0
        const byte *in_bytes = (const byte *)in;
220
0
        byte *out_bytes = (byte *)out;
221
0
        word32 scratch;
222
223
0
        byteCount &= ~0x3U;
224
225
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word32)) {
226
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
227
0
            scratch = ByteReverseWord32(scratch);
228
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
229
0
        }
230
0
    }
231
2.13M
#endif
232
2.13M
}
aes.c:ByteReverseWords
Line
Count
Source
183
5.31k
{
184
5.31k
    word32 i;
185
186
5.31k
#ifdef WOLFSSL_USE_ALIGN
187
5.31k
    if ((((size_t)in & 0x3) == 0) &&
188
5.31k
        (((size_t)out & 0x3) == 0))
189
5.31k
#endif
190
5.31k
    {
191
5.31k
        word32 count = byteCount/(word32)sizeof(word32);
192
34.2k
        for (i = 0; i < count; i++)
193
28.9k
            out[i] = ByteReverseWord32(in[i]);
194
5.31k
    }
195
0
#ifdef WOLFSSL_USE_ALIGN
196
0
    else if (((size_t)in & 0x3) == 0) {
197
0
        byte *out_bytes = (byte *)out;
198
0
        word32 scratch;
199
200
0
        byteCount &= ~0x3U;
201
202
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word32)) {
203
0
            scratch = ByteReverseWord32(*in++);
204
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
205
0
        }
206
0
    }
207
0
    else if (((size_t)out & 0x3) == 0) {
208
0
        const byte *in_bytes = (const byte *)in;
209
0
        word32 scratch;
210
211
0
        byteCount &= ~0x3U;
212
213
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word32)) {
214
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
215
0
            *out++ = ByteReverseWord32(scratch);
216
0
        }
217
0
    }
218
0
    else {
219
0
        const byte *in_bytes = (const byte *)in;
220
0
        byte *out_bytes = (byte *)out;
221
0
        word32 scratch;
222
223
0
        byteCount &= ~0x3U;
224
225
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word32)) {
226
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
227
0
            scratch = ByteReverseWord32(scratch);
228
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
229
0
        }
230
0
    }
231
5.31k
#endif
232
5.31k
}
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
183
1.02M
{
184
1.02M
    word32 i;
185
186
1.02M
#ifdef WOLFSSL_USE_ALIGN
187
1.02M
    if ((((size_t)in & 0x3) == 0) &&
188
1.02M
        (((size_t)out & 0x3) == 0))
189
1.02M
#endif
190
1.02M
    {
191
1.02M
        word32 count = byteCount/(word32)sizeof(word32);
192
15.8M
        for (i = 0; i < count; i++)
193
14.8M
            out[i] = ByteReverseWord32(in[i]);
194
1.02M
    }
195
0
#ifdef WOLFSSL_USE_ALIGN
196
0
    else if (((size_t)in & 0x3) == 0) {
197
0
        byte *out_bytes = (byte *)out;
198
0
        word32 scratch;
199
200
0
        byteCount &= ~0x3U;
201
202
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word32)) {
203
0
            scratch = ByteReverseWord32(*in++);
204
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
205
0
        }
206
0
    }
207
0
    else if (((size_t)out & 0x3) == 0) {
208
0
        const byte *in_bytes = (const byte *)in;
209
0
        word32 scratch;
210
211
0
        byteCount &= ~0x3U;
212
213
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word32)) {
214
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
215
0
            *out++ = ByteReverseWord32(scratch);
216
0
        }
217
0
    }
218
0
    else {
219
0
        const byte *in_bytes = (const byte *)in;
220
0
        byte *out_bytes = (byte *)out;
221
0
        word32 scratch;
222
223
0
        byteCount &= ~0x3U;
224
225
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word32)) {
226
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
227
0
            scratch = ByteReverseWord32(scratch);
228
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
229
0
        }
230
0
    }
231
1.02M
#endif
232
1.02M
}
sha256.c:ByteReverseWords
Line
Count
Source
183
1.09M
{
184
1.09M
    word32 i;
185
186
1.09M
#ifdef WOLFSSL_USE_ALIGN
187
1.09M
    if ((((size_t)in & 0x3) == 0) &&
188
1.09M
        (((size_t)out & 0x3) == 0))
189
1.09M
#endif
190
1.09M
    {
191
1.09M
        word32 count = byteCount/(word32)sizeof(word32);
192
17.6M
        for (i = 0; i < count; i++)
193
16.5M
            out[i] = ByteReverseWord32(in[i]);
194
1.09M
    }
195
0
#ifdef WOLFSSL_USE_ALIGN
196
0
    else if (((size_t)in & 0x3) == 0) {
197
0
        byte *out_bytes = (byte *)out;
198
0
        word32 scratch;
199
200
0
        byteCount &= ~0x3U;
201
202
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word32)) {
203
0
            scratch = ByteReverseWord32(*in++);
204
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
205
0
        }
206
0
    }
207
0
    else if (((size_t)out & 0x3) == 0) {
208
0
        const byte *in_bytes = (const byte *)in;
209
0
        word32 scratch;
210
211
0
        byteCount &= ~0x3U;
212
213
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word32)) {
214
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
215
0
            *out++ = ByteReverseWord32(scratch);
216
0
        }
217
0
    }
218
0
    else {
219
0
        const byte *in_bytes = (const byte *)in;
220
0
        byte *out_bytes = (byte *)out;
221
0
        word32 scratch;
222
223
0
        byteCount &= ~0x3U;
224
225
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word32)) {
226
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
227
0
            scratch = ByteReverseWord32(scratch);
228
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
229
0
        }
230
0
    }
231
1.09M
#endif
232
1.09M
}
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
233
234
WC_MISC_STATIC WC_INLINE word32 readUnalignedWord32(const byte *in)
235
0
{
236
0
    if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0)
237
0
        return *(const word32 *)in;
238
0
    else {
239
0
        word32 out = 0; /* else CONFIG_FORTIFY_SOURCE -Wmaybe-uninitialized */
240
0
        XMEMCPY(&out, in, sizeof(out));
241
0
        return out;
242
0
    }
243
0
}
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
Unexecuted instantiation: chacha.c:readUnalignedWord32
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
244
245
WC_MISC_STATIC WC_INLINE word32 writeUnalignedWord32(void *out, word32 in)
246
0
{
247
0
    if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0)
248
0
        *(word32 *)out = in;
249
0
    else {
250
0
        XMEMCPY(out, &in, sizeof(in));
251
0
    }
252
0
    return in;
253
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
254
255
WC_MISC_STATIC WC_INLINE void readUnalignedWords32(word32 *out, const byte *in,
256
                                                   size_t count)
257
0
{
258
0
    if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0) {
259
0
        const word32 *in_word32 = (const word32 *)in;
260
0
        while (count-- > 0)
261
0
            *out++ = *in_word32++;
262
0
    }
263
0
    else {
264
0
        XMEMCPY(out, in, count * sizeof(*out));
265
0
    }
266
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
267
268
WC_MISC_STATIC WC_INLINE void writeUnalignedWords32(byte *out, const word32 *in,
269
                                                    size_t count)
270
0
{
271
0
    if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word32) - 1U)) == (wc_ptr_t)0) {
272
0
        word32 *out_word32 = (word32 *)out;
273
0
        while (count-- > 0)
274
0
            *out_word32++ = *in++;
275
0
    }
276
0
    else {
277
0
        XMEMCPY(out, in, count * sizeof(*in));
278
0
    }
279
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
280
281
#if defined(WORD64_AVAILABLE) && !defined(WOLFSSL_NO_WORD64_OPS)
282
283
WC_MISC_STATIC WC_INLINE word64 readUnalignedWord64(const byte *in)
284
2.43M
{
285
2.43M
    if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0)
286
834k
        return *(const word64 *)in;
287
1.59M
    else {
288
1.59M
        word64 out = 0; /* else CONFIG_FORTIFY_SOURCE -Wmaybe-uninitialized */
289
1.59M
        XMEMCPY(&out, in, sizeof(out));
290
1.59M
        return out;
291
1.59M
    }
292
2.43M
}
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
284
2.43M
{
285
2.43M
    if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0)
286
834k
        return *(const word64 *)in;
287
1.59M
    else {
288
1.59M
        word64 out = 0; /* else CONFIG_FORTIFY_SOURCE -Wmaybe-uninitialized */
289
1.59M
        XMEMCPY(&out, in, sizeof(out));
290
1.59M
        return out;
291
1.59M
    }
292
2.43M
}
Unexecuted instantiation: internal.c:readUnalignedWord64
Unexecuted instantiation: keys.c:readUnalignedWord64
293
294
WC_MISC_STATIC WC_INLINE word64 writeUnalignedWord64(void *out, word64 in)
295
0
{
296
0
    if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0)
297
0
        *(word64 *)out = in;
298
0
    else {
299
0
        XMEMCPY(out, &in, sizeof(in));
300
0
    }
301
0
    return in;
302
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
303
304
WC_MISC_STATIC WC_INLINE void readUnalignedWords64(word64 *out, const byte *in,
305
                                                   size_t count)
306
0
{
307
0
    if (((wc_ptr_t)in & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0) {
308
0
        const word64 *in_word64 = (const word64 *)in;
309
0
        while (count-- > 0)
310
0
            *out++ = *in_word64++;
311
0
    }
312
0
    else {
313
0
        XMEMCPY(out, in, count * sizeof(*out));
314
0
    }
315
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
316
317
WC_MISC_STATIC WC_INLINE void writeUnalignedWords64(byte *out, const word64 *in,
318
                                                    size_t count)
319
0
{
320
0
    if (((wc_ptr_t)out & (wc_ptr_t)(sizeof(word64) - 1U)) == (wc_ptr_t)0) {
321
0
        word64 *out_word64 = (word64 *)out;
322
0
        while (count-- > 0)
323
0
            *out_word64++ = *in++;
324
0
    }
325
0
    else {
326
0
        XMEMCPY(out, in, count * sizeof(*in));
327
0
    }
328
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
329
330
WC_MISC_STATIC WC_INLINE word64 rotlFixed64(word64 x, word64 y)
331
84.9M
{
332
84.9M
    return (x << y) | (x >> (sizeof(y) * 8 - y));
333
84.9M
}
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
331
424k
{
332
424k
    return (x << y) | (x >> (sizeof(y) * 8 - y));
333
424k
}
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
331
84.4M
{
332
84.4M
    return (x << y) | (x >> (sizeof(y) * 8 - y));
333
84.4M
}
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
334
335
336
WC_MISC_STATIC WC_INLINE word64 rotrFixed64(word64 x, word64 y)
337
3.12G
{
338
3.12G
    return (x >> y) | (x << (sizeof(y) * 8 - y));
339
3.12G
}
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
337
3.12G
{
338
3.12G
    return (x >> y) | (x << (sizeof(y) * 8 - y));
339
3.12G
}
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
340
341
342
WC_MISC_STATIC WC_INLINE word64 ByteReverseWord64(word64 value)
343
84.9M
{
344
#if defined(WOLF_ALLOW_BUILTIN) && defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3)
345
    return (word64)__builtin_bswap64(value);
346
#elif defined(WOLFCRYPT_SLOW_WORD64)
347
    return (word64)((word64)ByteReverseWord32((word32) value)) << 32 |
348
        (word64)ByteReverseWord32((word32)(value   >> 32));
349
#else
350
84.9M
    value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) |
351
84.9M
        ((value & W64LIT(0x00FF00FF00FF00FF)) << 8);
352
84.9M
    value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) |
353
84.9M
        ((value & W64LIT(0x0000FFFF0000FFFF)) << 16);
354
84.9M
    return rotlFixed64(value, 32U);
355
84.9M
#endif
356
84.9M
}
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
343
424k
{
344
#if defined(WOLF_ALLOW_BUILTIN) && defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3)
345
    return (word64)__builtin_bswap64(value);
346
#elif defined(WOLFCRYPT_SLOW_WORD64)
347
    return (word64)((word64)ByteReverseWord32((word32) value)) << 32 |
348
        (word64)ByteReverseWord32((word32)(value   >> 32));
349
#else
350
424k
    value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) |
351
424k
        ((value & W64LIT(0x00FF00FF00FF00FF)) << 8);
352
424k
    value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) |
353
424k
        ((value & W64LIT(0x0000FFFF0000FFFF)) << 16);
354
424k
    return rotlFixed64(value, 32U);
355
424k
#endif
356
424k
}
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
343
84.4M
{
344
#if defined(WOLF_ALLOW_BUILTIN) && defined(__GNUC_PREREQ) && __GNUC_PREREQ(4, 3)
345
    return (word64)__builtin_bswap64(value);
346
#elif defined(WOLFCRYPT_SLOW_WORD64)
347
    return (word64)((word64)ByteReverseWord32((word32) value)) << 32 |
348
        (word64)ByteReverseWord32((word32)(value   >> 32));
349
#else
350
84.4M
    value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) |
351
84.4M
        ((value & W64LIT(0x00FF00FF00FF00FF)) << 8);
352
84.4M
    value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) |
353
84.4M
        ((value & W64LIT(0x0000FFFF0000FFFF)) << 16);
354
84.4M
    return rotlFixed64(value, 32U);
355
84.4M
#endif
356
84.4M
}
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
357
358
359
WC_MISC_STATIC WC_INLINE void ByteReverseWords64(word64* out, const word64* in,
360
                                      word32 byteCount)
361
6.98M
{
362
6.98M
    word32 count = byteCount/(word32)sizeof(word64), i;
363
364
6.98M
#ifdef WOLFSSL_USE_ALIGN
365
6.98M
    if ((((size_t)in & 0x7) == 0) &&
366
6.98M
        (((size_t)out & 0x7) == 0))
367
6.98M
#endif
368
6.98M
    {
369
91.4M
        for (i = 0; i < count; i++)
370
84.4M
            out[i] = ByteReverseWord64(in[i]);
371
6.98M
    }
372
0
#ifdef WOLFSSL_USE_ALIGN
373
0
    else if (((size_t)in & 0x7) == 0) {
374
0
        byte *out_bytes = (byte *)out;
375
0
        word64 scratch;
376
377
0
        byteCount &= ~0x7U;
378
379
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word64)) {
380
0
            scratch = ByteReverseWord64(*in++);
381
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
382
0
        }
383
0
    }
384
0
    else if (((size_t)out & 0x7) == 0) {
385
0
        const byte *in_bytes = (const byte *)in;
386
0
        word64 scratch;
387
388
0
        byteCount &= ~0x7U;
389
390
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word64)) {
391
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
392
0
            *out++ = ByteReverseWord64(scratch);
393
0
        }
394
0
    }
395
0
    else {
396
0
        const byte *in_bytes = (const byte *)in;
397
0
        byte *out_bytes = (byte *)out;
398
0
        word64 scratch;
399
400
0
        byteCount &= ~0x7U;
401
402
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word64)) {
403
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
404
0
            scratch = ByteReverseWord64(scratch);
405
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
406
0
        }
407
0
    }
408
6.98M
#endif
409
6.98M
}
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
361
6.98M
{
362
6.98M
    word32 count = byteCount/(word32)sizeof(word64), i;
363
364
6.98M
#ifdef WOLFSSL_USE_ALIGN
365
6.98M
    if ((((size_t)in & 0x7) == 0) &&
366
6.98M
        (((size_t)out & 0x7) == 0))
367
6.98M
#endif
368
6.98M
    {
369
91.4M
        for (i = 0; i < count; i++)
370
84.4M
            out[i] = ByteReverseWord64(in[i]);
371
6.98M
    }
372
0
#ifdef WOLFSSL_USE_ALIGN
373
0
    else if (((size_t)in & 0x7) == 0) {
374
0
        byte *out_bytes = (byte *)out;
375
0
        word64 scratch;
376
377
0
        byteCount &= ~0x7U;
378
379
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word64)) {
380
0
            scratch = ByteReverseWord64(*in++);
381
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
382
0
        }
383
0
    }
384
0
    else if (((size_t)out & 0x7) == 0) {
385
0
        const byte *in_bytes = (const byte *)in;
386
0
        word64 scratch;
387
388
0
        byteCount &= ~0x7U;
389
390
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word64)) {
391
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
392
0
            *out++ = ByteReverseWord64(scratch);
393
0
        }
394
0
    }
395
0
    else {
396
0
        const byte *in_bytes = (const byte *)in;
397
0
        byte *out_bytes = (byte *)out;
398
0
        word64 scratch;
399
400
0
        byteCount &= ~0x7U;
401
402
0
        for (i = 0; i < byteCount; i += (word32)sizeof(word64)) {
403
0
            XMEMCPY(&scratch, in_bytes + i, sizeof(scratch));
404
0
            scratch = ByteReverseWord64(scratch);
405
0
            XMEMCPY(out_bytes + i, &scratch, sizeof(scratch));
406
0
        }
407
0
    }
408
6.98M
#endif
409
6.98M
}
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
410
411
#endif /* WORD64_AVAILABLE && !WOLFSSL_NO_WORD64_OPS */
412
413
#ifndef WOLFSSL_NO_XOR_OPS
414
415
/* Leave no doubt that WOLFSSL_WORD_SIZE is a power of 2. */
416
wc_static_assert((WOLFSSL_WORD_SIZE & (WOLFSSL_WORD_SIZE - 1)) == 0);
417
418
/* This routine performs a bitwise XOR operation of <*a> and <*b> for <n> number
419
of wolfssl_words, placing the result in <*r>. */
420
WC_MISC_STATIC WC_INLINE void XorWordsOut(wolfssl_word** r,
421
                       const wolfssl_word** a, const wolfssl_word** b, word32 n)
422
11.7k
{
423
11.7k
    const wolfssl_word *e = *a + n;
424
425
29.5k
    while (*a < e)
426
17.8k
        *((*r)++) = *((*a)++) ^ *((*b)++);
427
11.7k
}
aes.c:XorWordsOut
Line
Count
Source
422
11.2k
{
423
11.2k
    const wolfssl_word *e = *a + n;
424
425
27.4k
    while (*a < e)
426
16.1k
        *((*r)++) = *((*a)++) ^ *((*b)++);
427
11.2k
}
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
422
428
{
423
428
    const wolfssl_word *e = *a + n;
424
425
2.14k
    while (*a < e)
426
1.71k
        *((*r)++) = *((*a)++) ^ *((*b)++);
427
428
}
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
428
429
/* This routine performs a bitwise XOR operation of <*buf> and <*mask> of n
430
counts, placing the result in <*out>. */
431
432
WC_MISC_STATIC WC_INLINE void xorbufout(void* out, const void* buf,
433
                                        const void* mask, word32 count)
434
19.2k
{
435
19.2k
    byte*       o = (byte*)out;
436
19.2k
    const byte* b = (const byte*)buf;
437
19.2k
    const byte* m = (const byte*)mask;
438
439
    /* type-punning helpers */
440
19.2k
    union {
441
19.2k
        byte* bp;
442
19.2k
        wolfssl_word* wp;
443
19.2k
    } tpo;
444
19.2k
    union {
445
19.2k
        const byte* bp;
446
19.2k
        const wolfssl_word* wp;
447
19.2k
    } tpb, tpm;
448
449
19.2k
    if (((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
450
9.24k
        ((((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
451
9.24k
        ((((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)) == 0))
452
9.24k
    {
453
        /* All buffers are already aligned.  Possible to XOR by words without
454
         * fixup.
455
         */
456
457
9.24k
        tpo.bp = o;
458
9.24k
        tpb.bp = b;
459
9.24k
        tpm.bp = m;
460
9.24k
        XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
461
9.24k
        o = tpo.bp;
462
9.24k
        b = tpb.bp;
463
9.24k
        m = tpm.bp;
464
9.24k
        count &= (WOLFSSL_WORD_SIZE - 1);
465
9.24k
    }
466
9.99k
    else if ((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) ==
467
9.99k
             (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) &&
468
4.37k
             (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) ==
469
4.37k
             (((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)))
470
2.47k
    {
471
        /* Alignment can be fixed up to allow XOR by words. */
472
473
        /* Perform bytewise xor until pointers are aligned to
474
         * WOLFSSL_WORD_SIZE.
475
         */
476
4.25k
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
477
1.77k
        {
478
1.77k
            *o++ = (byte)(*b++ ^ *m++);
479
1.77k
            count--;
480
1.77k
        }
481
482
2.47k
        tpo.bp = o;
483
2.47k
        tpb.bp = b;
484
2.47k
        tpm.bp = m;
485
2.47k
        XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
486
2.47k
        o = tpo.bp;
487
2.47k
        b = tpb.bp;
488
2.47k
        m = tpm.bp;
489
2.47k
        count &= (WOLFSSL_WORD_SIZE - 1);
490
2.47k
    }
491
492
215k
    while (count > 0) {
493
196k
        *o++ = (byte)(*b++ ^ *m++);
494
196k
        count--;
495
196k
    }
496
497
19.2k
}
aes.c:xorbufout
Line
Count
Source
434
16.9k
{
435
16.9k
    byte*       o = (byte*)out;
436
16.9k
    const byte* b = (const byte*)buf;
437
16.9k
    const byte* m = (const byte*)mask;
438
439
    /* type-punning helpers */
440
16.9k
    union {
441
16.9k
        byte* bp;
442
16.9k
        wolfssl_word* wp;
443
16.9k
    } tpo;
444
16.9k
    union {
445
16.9k
        const byte* bp;
446
16.9k
        const wolfssl_word* wp;
447
16.9k
    } tpb, tpm;
448
449
16.9k
    if (((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
450
8.81k
        ((((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
451
8.81k
        ((((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)) == 0))
452
8.81k
    {
453
        /* All buffers are already aligned.  Possible to XOR by words without
454
         * fixup.
455
         */
456
457
8.81k
        tpo.bp = o;
458
8.81k
        tpb.bp = b;
459
8.81k
        tpm.bp = m;
460
8.81k
        XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
461
8.81k
        o = tpo.bp;
462
8.81k
        b = tpb.bp;
463
8.81k
        m = tpm.bp;
464
8.81k
        count &= (WOLFSSL_WORD_SIZE - 1);
465
8.81k
    }
466
8.10k
    else if ((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) ==
467
8.10k
             (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) &&
468
2.47k
             (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) ==
469
2.47k
             (((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)))
470
2.47k
    {
471
        /* Alignment can be fixed up to allow XOR by words. */
472
473
        /* Perform bytewise xor until pointers are aligned to
474
         * WOLFSSL_WORD_SIZE.
475
         */
476
4.25k
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
477
1.77k
        {
478
1.77k
            *o++ = (byte)(*b++ ^ *m++);
479
1.77k
            count--;
480
1.77k
        }
481
482
2.47k
        tpo.bp = o;
483
2.47k
        tpb.bp = b;
484
2.47k
        tpm.bp = m;
485
2.47k
        XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
486
2.47k
        o = tpo.bp;
487
2.47k
        b = tpb.bp;
488
2.47k
        m = tpm.bp;
489
2.47k
        count &= (WOLFSSL_WORD_SIZE - 1);
490
2.47k
    }
491
492
107k
    while (count > 0) {
493
90.7k
        *o++ = (byte)(*b++ ^ *m++);
494
90.7k
        count--;
495
90.7k
    }
496
497
16.9k
}
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
434
2.32k
{
435
2.32k
    byte*       o = (byte*)out;
436
2.32k
    const byte* b = (const byte*)buf;
437
2.32k
    const byte* m = (const byte*)mask;
438
439
    /* type-punning helpers */
440
2.32k
    union {
441
2.32k
        byte* bp;
442
2.32k
        wolfssl_word* wp;
443
2.32k
    } tpo;
444
2.32k
    union {
445
2.32k
        const byte* bp;
446
2.32k
        const wolfssl_word* wp;
447
2.32k
    } tpb, tpm;
448
449
2.32k
    if (((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
450
428
        ((((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
451
428
        ((((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)) == 0))
452
428
    {
453
        /* All buffers are already aligned.  Possible to XOR by words without
454
         * fixup.
455
         */
456
457
428
        tpo.bp = o;
458
428
        tpb.bp = b;
459
428
        tpm.bp = m;
460
428
        XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
461
428
        o = tpo.bp;
462
428
        b = tpb.bp;
463
428
        m = tpm.bp;
464
428
        count &= (WOLFSSL_WORD_SIZE - 1);
465
428
    }
466
1.89k
    else if ((((wc_ptr_t)o) & (WOLFSSL_WORD_SIZE - 1)) ==
467
1.89k
             (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) &&
468
1.89k
             (((wc_ptr_t)b) & (WOLFSSL_WORD_SIZE - 1)) ==
469
1.89k
             (((wc_ptr_t)m) & (WOLFSSL_WORD_SIZE - 1)))
470
0
    {
471
        /* Alignment can be fixed up to allow XOR by words. */
472
473
        /* Perform bytewise xor until pointers are aligned to
474
         * WOLFSSL_WORD_SIZE.
475
         */
476
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
477
0
        {
478
0
            *o++ = (byte)(*b++ ^ *m++);
479
0
            count--;
480
0
        }
481
482
0
        tpo.bp = o;
483
0
        tpb.bp = b;
484
0
        tpm.bp = m;
485
0
        XorWordsOut(&tpo.wp, &tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
486
0
        o = tpo.bp;
487
0
        b = tpb.bp;
488
0
        m = tpm.bp;
489
0
        count &= (WOLFSSL_WORD_SIZE - 1);
490
0
    }
491
492
107k
    while (count > 0) {
493
105k
        *o++ = (byte)(*b++ ^ *m++);
494
105k
        count--;
495
105k
    }
496
497
2.32k
}
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
498
499
/* This routine performs a bitwise XOR operation of <*r> and <*a> for <n> number
500
of wolfssl_words, placing the result in <*r>. */
501
WC_MISC_STATIC WC_INLINE void XorWords(wolfssl_word** r, const wolfssl_word** a,
502
                                       word32 n)
503
153k
{
504
153k
    const wolfssl_word *e = *a + n;
505
506
1.16M
    while (*a < e)
507
1.01M
        *((*r)++) ^= *((*a)++);
508
153k
}
aes.c:XorWords
Line
Count
Source
503
51.2k
{
504
51.2k
    const wolfssl_word *e = *a + n;
505
506
171k
    while (*a < e)
507
120k
        *((*r)++) ^= *((*a)++);
508
51.2k
}
Unexecuted instantiation: arc4.c:XorWords
Unexecuted instantiation: asn.c:XorWords
Unexecuted instantiation: blake2b.c:XorWords
Unexecuted instantiation: blake2s.c:XorWords
Unexecuted instantiation: camellia.c:XorWords
Unexecuted instantiation: chacha.c:XorWords
Unexecuted instantiation: chacha20_poly1305.c:XorWords
cmac.c:XorWords
Line
Count
Source
503
222
{
504
222
    const wolfssl_word *e = *a + n;
505
506
666
    while (*a < e)
507
444
        *((*r)++) ^= *((*a)++);
508
222
}
Unexecuted instantiation: coding.c:XorWords
Unexecuted instantiation: curve25519.c:XorWords
Unexecuted instantiation: curve448.c:XorWords
des3.c:XorWords
Line
Count
Source
503
2.97k
{
504
2.97k
    const wolfssl_word *e = *a + n;
505
506
5.95k
    while (*a < e)
507
2.97k
        *((*r)++) ^= *((*a)++);
508
2.97k
}
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
503
98
{
504
98
    const wolfssl_word *e = *a + n;
505
506
1.84k
    while (*a < e)
507
1.74k
        *((*r)++) ^= *((*a)++);
508
98
}
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
503
5.31k
{
504
5.31k
    const wolfssl_word *e = *a + n;
505
506
25.2k
    while (*a < e)
507
19.9k
        *((*r)++) ^= *((*a)++);
508
5.31k
}
Unexecuted instantiation: random.c:XorWords
Unexecuted instantiation: ripemd.c:XorWords
rsa.c:XorWords
Line
Count
Source
503
487
{
504
487
    const wolfssl_word *e = *a + n;
505
506
2.56k
    while (*a < e)
507
2.08k
        *((*r)++) ^= *((*a)++);
508
487
}
Unexecuted instantiation: sha.c:XorWords
Unexecuted instantiation: sha256.c:XorWords
sha3.c:XorWords
Line
Count
Source
503
91.9k
{
504
91.9k
    const wolfssl_word *e = *a + n;
505
506
956k
    while (*a < e)
507
864k
        *((*r)++) ^= *((*a)++);
508
91.9k
}
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
503
609
{
504
609
    const wolfssl_word *e = *a + n;
505
506
679
    while (*a < e)
507
70
        *((*r)++) ^= *((*a)++);
508
609
}
Unexecuted instantiation: wc_mlkem.c:XorWords
Unexecuted instantiation: wc_mlkem_poly.c:XorWords
internal.c:XorWords
Line
Count
Source
503
262
{
504
262
    const wolfssl_word *e = *a + n;
505
506
524
    while (*a < e)
507
262
        *((*r)++) ^= *((*a)++);
508
262
}
Unexecuted instantiation: keys.c:XorWords
509
510
/* This routine performs a bitwise XOR operation of <*buf> and <*mask> of n
511
counts, placing the result in <*buf>. */
512
513
WC_MISC_STATIC WC_INLINE void xorbuf(void* buf, const void* mask, word32 count)
514
179k
{
515
179k
    byte*       b = (byte*)buf;
516
179k
    const byte* m = (const byte*)mask;
517
518
    /* type-punning helpers */
519
179k
    union {
520
179k
        byte* bp;
521
179k
        wolfssl_word* wp;
522
179k
    } tpb;
523
179k
    union {
524
179k
        const byte* bp;
525
179k
        const wolfssl_word* wp;
526
179k
    } tpm;
527
528
179k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
529
176k
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
530
152k
    {
531
        /* Both buffers are already aligned.  Possible to XOR by words without
532
         * fixup.
533
         */
534
535
152k
        tpb.bp = b;
536
152k
        tpm.bp = m;
537
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
538
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
539
            PRAGMA_GCC_DIAG_PUSH;
540
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
541
        #endif
542
152k
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
543
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
544
            PRAGMA_GCC_DIAG_POP;
545
        #endif
546
152k
        b = tpb.bp;
547
152k
        m = tpm.bp;
548
152k
        count &= (WOLFSSL_WORD_SIZE - 1);
549
152k
    }
550
27.4k
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
551
27.4k
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
552
881
    {
553
        /* Alignment can be fixed up to allow XOR by words. */
554
555
        /* Perform bytewise xor until pointers are aligned to
556
         * WOLFSSL_WORD_SIZE.
557
         */
558
3.72k
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
559
2.84k
        {
560
2.84k
            *(b++) ^= *(m++);
561
2.84k
            count--;
562
2.84k
        }
563
564
881
        tpb.bp = b;
565
881
        tpm.bp = m;
566
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
567
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
568
            PRAGMA_GCC_DIAG_PUSH;
569
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
570
        #endif
571
881
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
572
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
573
            PRAGMA_GCC_DIAG_POP;
574
        #endif
575
881
        b = tpb.bp;
576
881
        m = tpm.bp;
577
881
        count &= (WOLFSSL_WORD_SIZE - 1);
578
881
    }
579
580
925k
    while (count > 0) {
581
745k
        *b++ ^= *m++;
582
745k
        count--;
583
745k
    }
584
179k
}
aes.c:xorbuf
Line
Count
Source
514
75.1k
{
515
75.1k
    byte*       b = (byte*)buf;
516
75.1k
    const byte* m = (const byte*)mask;
517
518
    /* type-punning helpers */
519
75.1k
    union {
520
75.1k
        byte* bp;
521
75.1k
        wolfssl_word* wp;
522
75.1k
    } tpb;
523
75.1k
    union {
524
75.1k
        const byte* bp;
525
75.1k
        const wolfssl_word* wp;
526
75.1k
    } tpm;
527
528
75.1k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
529
74.1k
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
530
51.2k
    {
531
        /* Both buffers are already aligned.  Possible to XOR by words without
532
         * fixup.
533
         */
534
535
51.2k
        tpb.bp = b;
536
51.2k
        tpm.bp = m;
537
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
538
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
539
            PRAGMA_GCC_DIAG_PUSH;
540
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
541
        #endif
542
51.2k
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
543
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
544
            PRAGMA_GCC_DIAG_POP;
545
        #endif
546
51.2k
        b = tpb.bp;
547
51.2k
        m = tpm.bp;
548
51.2k
        count &= (WOLFSSL_WORD_SIZE - 1);
549
51.2k
    }
550
23.8k
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
551
23.8k
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
552
0
    {
553
        /* Alignment can be fixed up to allow XOR by words. */
554
555
        /* Perform bytewise xor until pointers are aligned to
556
         * WOLFSSL_WORD_SIZE.
557
         */
558
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
559
0
        {
560
0
            *(b++) ^= *(m++);
561
0
            count--;
562
0
        }
563
564
0
        tpb.bp = b;
565
0
        tpm.bp = m;
566
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
567
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
568
            PRAGMA_GCC_DIAG_PUSH;
569
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
570
        #endif
571
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
572
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
573
            PRAGMA_GCC_DIAG_POP;
574
        #endif
575
0
        b = tpb.bp;
576
0
        m = tpm.bp;
577
0
        count &= (WOLFSSL_WORD_SIZE - 1);
578
0
    }
579
580
448k
    while (count > 0) {
581
373k
        *b++ ^= *m++;
582
373k
        count--;
583
373k
    }
584
75.1k
}
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
514
222
{
515
222
    byte*       b = (byte*)buf;
516
222
    const byte* m = (const byte*)mask;
517
518
    /* type-punning helpers */
519
222
    union {
520
222
        byte* bp;
521
222
        wolfssl_word* wp;
522
222
    } tpb;
523
222
    union {
524
222
        const byte* bp;
525
222
        const wolfssl_word* wp;
526
222
    } tpm;
527
528
222
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
529
222
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
530
222
    {
531
        /* Both buffers are already aligned.  Possible to XOR by words without
532
         * fixup.
533
         */
534
535
222
        tpb.bp = b;
536
222
        tpm.bp = m;
537
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
538
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
539
            PRAGMA_GCC_DIAG_PUSH;
540
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
541
        #endif
542
222
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
543
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
544
            PRAGMA_GCC_DIAG_POP;
545
        #endif
546
222
        b = tpb.bp;
547
222
        m = tpm.bp;
548
222
        count &= (WOLFSSL_WORD_SIZE - 1);
549
222
    }
550
0
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
551
0
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
552
0
    {
553
        /* Alignment can be fixed up to allow XOR by words. */
554
555
        /* Perform bytewise xor until pointers are aligned to
556
         * WOLFSSL_WORD_SIZE.
557
         */
558
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
559
0
        {
560
0
            *(b++) ^= *(m++);
561
0
            count--;
562
0
        }
563
564
0
        tpb.bp = b;
565
0
        tpm.bp = m;
566
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
567
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
568
            PRAGMA_GCC_DIAG_PUSH;
569
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
570
        #endif
571
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
572
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
573
            PRAGMA_GCC_DIAG_POP;
574
        #endif
575
0
        b = tpb.bp;
576
0
        m = tpm.bp;
577
0
        count &= (WOLFSSL_WORD_SIZE - 1);
578
0
    }
579
580
222
    while (count > 0) {
581
0
        *b++ ^= *m++;
582
0
        count--;
583
0
    }
584
222
}
Unexecuted instantiation: coding.c:xorbuf
Unexecuted instantiation: curve25519.c:xorbuf
Unexecuted instantiation: curve448.c:xorbuf
des3.c:xorbuf
Line
Count
Source
514
2.97k
{
515
2.97k
    byte*       b = (byte*)buf;
516
2.97k
    const byte* m = (const byte*)mask;
517
518
    /* type-punning helpers */
519
2.97k
    union {
520
2.97k
        byte* bp;
521
2.97k
        wolfssl_word* wp;
522
2.97k
    } tpb;
523
2.97k
    union {
524
2.97k
        const byte* bp;
525
2.97k
        const wolfssl_word* wp;
526
2.97k
    } tpm;
527
528
2.97k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
529
2.97k
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
530
2.97k
    {
531
        /* Both buffers are already aligned.  Possible to XOR by words without
532
         * fixup.
533
         */
534
535
2.97k
        tpb.bp = b;
536
2.97k
        tpm.bp = m;
537
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
538
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
539
            PRAGMA_GCC_DIAG_PUSH;
540
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
541
        #endif
542
2.97k
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
543
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
544
            PRAGMA_GCC_DIAG_POP;
545
        #endif
546
2.97k
        b = tpb.bp;
547
2.97k
        m = tpm.bp;
548
2.97k
        count &= (WOLFSSL_WORD_SIZE - 1);
549
2.97k
    }
550
0
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
551
0
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
552
0
    {
553
        /* Alignment can be fixed up to allow XOR by words. */
554
555
        /* Perform bytewise xor until pointers are aligned to
556
         * WOLFSSL_WORD_SIZE.
557
         */
558
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
559
0
        {
560
0
            *(b++) ^= *(m++);
561
0
            count--;
562
0
        }
563
564
0
        tpb.bp = b;
565
0
        tpm.bp = m;
566
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
567
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
568
            PRAGMA_GCC_DIAG_PUSH;
569
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
570
        #endif
571
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
572
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
573
            PRAGMA_GCC_DIAG_POP;
574
        #endif
575
0
        b = tpb.bp;
576
0
        m = tpm.bp;
577
0
        count &= (WOLFSSL_WORD_SIZE - 1);
578
0
    }
579
580
2.97k
    while (count > 0) {
581
0
        *b++ ^= *m++;
582
0
        count--;
583
0
    }
584
2.97k
}
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
514
207
{
515
207
    byte*       b = (byte*)buf;
516
207
    const byte* m = (const byte*)mask;
517
518
    /* type-punning helpers */
519
207
    union {
520
207
        byte* bp;
521
207
        wolfssl_word* wp;
522
207
    } tpb;
523
207
    union {
524
207
        const byte* bp;
525
207
        const wolfssl_word* wp;
526
207
    } tpm;
527
528
207
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
529
98
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
530
98
    {
531
        /* Both buffers are already aligned.  Possible to XOR by words without
532
         * fixup.
533
         */
534
535
98
        tpb.bp = b;
536
98
        tpm.bp = m;
537
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
538
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
539
            PRAGMA_GCC_DIAG_PUSH;
540
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
541
        #endif
542
98
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
543
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
544
            PRAGMA_GCC_DIAG_POP;
545
        #endif
546
98
        b = tpb.bp;
547
98
        m = tpm.bp;
548
98
        count &= (WOLFSSL_WORD_SIZE - 1);
549
98
    }
550
109
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
551
109
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
552
0
    {
553
        /* Alignment can be fixed up to allow XOR by words. */
554
555
        /* Perform bytewise xor until pointers are aligned to
556
         * WOLFSSL_WORD_SIZE.
557
         */
558
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
559
0
        {
560
0
            *(b++) ^= *(m++);
561
0
            count--;
562
0
        }
563
564
0
        tpb.bp = b;
565
0
        tpm.bp = m;
566
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
567
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
568
            PRAGMA_GCC_DIAG_PUSH;
569
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
570
        #endif
571
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
572
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
573
            PRAGMA_GCC_DIAG_POP;
574
        #endif
575
0
        b = tpb.bp;
576
0
        m = tpm.bp;
577
0
        count &= (WOLFSSL_WORD_SIZE - 1);
578
0
    }
579
580
4.88k
    while (count > 0) {
581
4.67k
        *b++ ^= *m++;
582
4.67k
        count--;
583
4.67k
    }
584
207
}
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
514
5.58k
{
515
5.58k
    byte*       b = (byte*)buf;
516
5.58k
    const byte* m = (const byte*)mask;
517
518
    /* type-punning helpers */
519
5.58k
    union {
520
5.58k
        byte* bp;
521
5.58k
        wolfssl_word* wp;
522
5.58k
    } tpb;
523
5.58k
    union {
524
5.58k
        const byte* bp;
525
5.58k
        const wolfssl_word* wp;
526
5.58k
    } tpm;
527
528
5.58k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
529
5.31k
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
530
5.31k
    {
531
        /* Both buffers are already aligned.  Possible to XOR by words without
532
         * fixup.
533
         */
534
535
5.31k
        tpb.bp = b;
536
5.31k
        tpm.bp = m;
537
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
538
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
539
            PRAGMA_GCC_DIAG_PUSH;
540
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
541
        #endif
542
5.31k
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
543
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
544
            PRAGMA_GCC_DIAG_POP;
545
        #endif
546
5.31k
        b = tpb.bp;
547
5.31k
        m = tpm.bp;
548
5.31k
        count &= (WOLFSSL_WORD_SIZE - 1);
549
5.31k
    }
550
272
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
551
272
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
552
0
    {
553
        /* Alignment can be fixed up to allow XOR by words. */
554
555
        /* Perform bytewise xor until pointers are aligned to
556
         * WOLFSSL_WORD_SIZE.
557
         */
558
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
559
0
        {
560
0
            *(b++) ^= *(m++);
561
0
            count--;
562
0
        }
563
564
0
        tpb.bp = b;
565
0
        tpm.bp = m;
566
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
567
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
568
            PRAGMA_GCC_DIAG_PUSH;
569
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
570
        #endif
571
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
572
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
573
            PRAGMA_GCC_DIAG_POP;
574
        #endif
575
0
        b = tpb.bp;
576
0
        m = tpm.bp;
577
0
        count &= (WOLFSSL_WORD_SIZE - 1);
578
0
    }
579
580
12.8k
    while (count > 0) {
581
7.22k
        *b++ ^= *m++;
582
7.22k
        count--;
583
7.22k
    }
584
5.58k
}
Unexecuted instantiation: random.c:xorbuf
Unexecuted instantiation: ripemd.c:xorbuf
rsa.c:xorbuf
Line
Count
Source
514
1.51k
{
515
1.51k
    byte*       b = (byte*)buf;
516
1.51k
    const byte* m = (const byte*)mask;
517
518
    /* type-punning helpers */
519
1.51k
    union {
520
1.51k
        byte* bp;
521
1.51k
        wolfssl_word* wp;
522
1.51k
    } tpb;
523
1.51k
    union {
524
1.51k
        const byte* bp;
525
1.51k
        const wolfssl_word* wp;
526
1.51k
    } tpm;
527
528
1.51k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
529
149
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
530
145
    {
531
        /* Both buffers are already aligned.  Possible to XOR by words without
532
         * fixup.
533
         */
534
535
145
        tpb.bp = b;
536
145
        tpm.bp = m;
537
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
538
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
539
            PRAGMA_GCC_DIAG_PUSH;
540
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
541
        #endif
542
145
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
543
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
544
            PRAGMA_GCC_DIAG_POP;
545
        #endif
546
145
        b = tpb.bp;
547
145
        m = tpm.bp;
548
145
        count &= (WOLFSSL_WORD_SIZE - 1);
549
145
    }
550
1.36k
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
551
1.36k
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
552
342
    {
553
        /* Alignment can be fixed up to allow XOR by words. */
554
555
        /* Perform bytewise xor until pointers are aligned to
556
         * WOLFSSL_WORD_SIZE.
557
         */
558
1.03k
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
559
690
        {
560
690
            *(b++) ^= *(m++);
561
690
            count--;
562
690
        }
563
564
342
        tpb.bp = b;
565
342
        tpm.bp = m;
566
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
567
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
568
            PRAGMA_GCC_DIAG_PUSH;
569
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
570
        #endif
571
342
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
572
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
573
            PRAGMA_GCC_DIAG_POP;
574
        #endif
575
342
        b = tpb.bp;
576
342
        m = tpm.bp;
577
342
        count &= (WOLFSSL_WORD_SIZE - 1);
578
342
    }
579
580
101k
    while (count > 0) {
581
99.4k
        *b++ ^= *m++;
582
99.4k
        count--;
583
99.4k
    }
584
1.51k
}
Unexecuted instantiation: sha.c:xorbuf
Unexecuted instantiation: sha256.c:xorbuf
sha3.c:xorbuf
Line
Count
Source
514
93.2k
{
515
93.2k
    byte*       b = (byte*)buf;
516
93.2k
    const byte* m = (const byte*)mask;
517
518
    /* type-punning helpers */
519
93.2k
    union {
520
93.2k
        byte* bp;
521
93.2k
        wolfssl_word* wp;
522
93.2k
    } tpb;
523
93.2k
    union {
524
93.2k
        const byte* bp;
525
93.2k
        const wolfssl_word* wp;
526
93.2k
    } tpm;
527
528
93.2k
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
529
93.2k
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
530
91.9k
    {
531
        /* Both buffers are already aligned.  Possible to XOR by words without
532
         * fixup.
533
         */
534
535
91.9k
        tpb.bp = b;
536
91.9k
        tpm.bp = m;
537
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
538
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
539
            PRAGMA_GCC_DIAG_PUSH;
540
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
541
        #endif
542
91.9k
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
543
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
544
            PRAGMA_GCC_DIAG_POP;
545
        #endif
546
91.9k
        b = tpb.bp;
547
91.9k
        m = tpm.bp;
548
91.9k
        count &= (WOLFSSL_WORD_SIZE - 1);
549
91.9k
    }
550
1.29k
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
551
1.29k
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
552
0
    {
553
        /* Alignment can be fixed up to allow XOR by words. */
554
555
        /* Perform bytewise xor until pointers are aligned to
556
         * WOLFSSL_WORD_SIZE.
557
         */
558
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
559
0
        {
560
0
            *(b++) ^= *(m++);
561
0
            count--;
562
0
        }
563
564
0
        tpb.bp = b;
565
0
        tpm.bp = m;
566
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
567
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
568
            PRAGMA_GCC_DIAG_PUSH;
569
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
570
        #endif
571
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
572
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
573
            PRAGMA_GCC_DIAG_POP;
574
        #endif
575
0
        b = tpb.bp;
576
0
        m = tpm.bp;
577
0
        count &= (WOLFSSL_WORD_SIZE - 1);
578
0
    }
579
580
350k
    while (count > 0) {
581
257k
        *b++ ^= *m++;
582
257k
        count--;
583
257k
    }
584
93.2k
}
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
514
609
{
515
609
    byte*       b = (byte*)buf;
516
609
    const byte* m = (const byte*)mask;
517
518
    /* type-punning helpers */
519
609
    union {
520
609
        byte* bp;
521
609
        wolfssl_word* wp;
522
609
    } tpb;
523
609
    union {
524
609
        const byte* bp;
525
609
        const wolfssl_word* wp;
526
609
    } tpm;
527
528
609
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
529
70
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
530
70
    {
531
        /* Both buffers are already aligned.  Possible to XOR by words without
532
         * fixup.
533
         */
534
535
70
        tpb.bp = b;
536
70
        tpm.bp = m;
537
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
538
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
539
            PRAGMA_GCC_DIAG_PUSH;
540
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
541
        #endif
542
70
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
543
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
544
            PRAGMA_GCC_DIAG_POP;
545
        #endif
546
70
        b = tpb.bp;
547
70
        m = tpm.bp;
548
70
        count &= (WOLFSSL_WORD_SIZE - 1);
549
70
    }
550
539
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
551
539
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
552
539
    {
553
        /* Alignment can be fixed up to allow XOR by words. */
554
555
        /* Perform bytewise xor until pointers are aligned to
556
         * WOLFSSL_WORD_SIZE.
557
         */
558
2.69k
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
559
2.15k
        {
560
2.15k
            *(b++) ^= *(m++);
561
2.15k
            count--;
562
2.15k
        }
563
564
539
        tpb.bp = b;
565
539
        tpm.bp = m;
566
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
567
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
568
            PRAGMA_GCC_DIAG_PUSH;
569
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
570
        #endif
571
539
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
572
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
573
            PRAGMA_GCC_DIAG_POP;
574
        #endif
575
539
        b = tpb.bp;
576
539
        m = tpm.bp;
577
539
        count &= (WOLFSSL_WORD_SIZE - 1);
578
539
    }
579
580
2.76k
    while (count > 0) {
581
2.15k
        *b++ ^= *m++;
582
2.15k
        count--;
583
2.15k
    }
584
609
}
Unexecuted instantiation: wc_mlkem.c:xorbuf
Unexecuted instantiation: wc_mlkem_poly.c:xorbuf
internal.c:xorbuf
Line
Count
Source
514
262
{
515
262
    byte*       b = (byte*)buf;
516
262
    const byte* m = (const byte*)mask;
517
518
    /* type-punning helpers */
519
262
    union {
520
262
        byte* bp;
521
262
        wolfssl_word* wp;
522
262
    } tpb;
523
262
    union {
524
262
        const byte* bp;
525
262
        const wolfssl_word* wp;
526
262
    } tpm;
527
528
262
    if ((((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) == 0) &&
529
262
        (((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)) == 0))
530
262
    {
531
        /* Both buffers are already aligned.  Possible to XOR by words without
532
         * fixup.
533
         */
534
535
262
        tpb.bp = b;
536
262
        tpm.bp = m;
537
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
538
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
539
            PRAGMA_GCC_DIAG_PUSH;
540
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
541
        #endif
542
262
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
543
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
544
            PRAGMA_GCC_DIAG_POP;
545
        #endif
546
262
        b = tpb.bp;
547
262
        m = tpm.bp;
548
262
        count &= (WOLFSSL_WORD_SIZE - 1);
549
262
    }
550
0
    else if (((wc_ptr_t)buf & (WOLFSSL_WORD_SIZE - 1)) ==
551
0
             ((wc_ptr_t)mask & (WOLFSSL_WORD_SIZE - 1)))
552
0
    {
553
        /* Alignment can be fixed up to allow XOR by words. */
554
555
        /* Perform bytewise xor until pointers are aligned to
556
         * WOLFSSL_WORD_SIZE.
557
         */
558
0
        while ((((wc_ptr_t)b & (WOLFSSL_WORD_SIZE - 1)) != 0) && (count > 0))
559
0
        {
560
0
            *(b++) ^= *(m++);
561
0
            count--;
562
0
        }
563
564
0
        tpb.bp = b;
565
0
        tpm.bp = m;
566
        /* Work around false positives from linuxkm CONFIG_FORTIFY_SOURCE. */
567
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
568
            PRAGMA_GCC_DIAG_PUSH;
569
            PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
570
        #endif
571
0
        XorWords(&tpb.wp, &tpm.wp, count >> WOLFSSL_WORD_SIZE_LOG2);
572
        #if defined(WOLFSSL_LINUXKM) && defined(CONFIG_FORTIFY_SOURCE)
573
            PRAGMA_GCC_DIAG_POP;
574
        #endif
575
0
        b = tpb.bp;
576
0
        m = tpm.bp;
577
0
        count &= (WOLFSSL_WORD_SIZE - 1);
578
0
    }
579
580
1.31k
    while (count > 0) {
581
1.04k
        *b++ ^= *m++;
582
1.04k
        count--;
583
1.04k
    }
584
262
}
Unexecuted instantiation: keys.c:xorbuf
585
586
#endif /* !WOLFSSL_NO_XOR_OPS */
587
588
#ifndef WOLFSSL_NO_FORCE_ZERO
589
/* This routine fills the first len bytes of the memory area pointed by mem
590
   with zeros. It ensures compiler optimization doesn't skip it. */
591
WC_MISC_STATIC WC_INLINE void ForceZero(void* mem, size_t len)
592
15.8M
{
593
15.8M
    byte *zb = (byte *)mem;
594
15.8M
    unsigned long *zl;
595
596
15.8M
    XFENCE();
597
598
17.0M
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
1.23M
        if (len == 0)
600
0
            return;
601
1.23M
        *zb++ = 0;
602
1.23M
        --len;
603
1.23M
    }
604
605
15.8M
    zl = (unsigned long *)zb;
606
607
399M
    while (len >= sizeof(unsigned long)) {
608
383M
        *zl++ = 0;
609
383M
        len -= sizeof(unsigned long);
610
383M
    }
611
612
15.8M
    zb = (byte *)zl;
613
614
22.1M
    while (len) {
615
6.26M
        *zb++ = 0;
616
6.26M
        --len;
617
6.26M
    }
618
619
15.8M
    XFENCE();
620
15.8M
}
aes.c:ForceZero
Line
Count
Source
592
37.0k
{
593
37.0k
    byte *zb = (byte *)mem;
594
37.0k
    unsigned long *zl;
595
596
37.0k
    XFENCE();
597
598
60.7k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
23.7k
        if (len == 0)
600
0
            return;
601
23.7k
        *zb++ = 0;
602
23.7k
        --len;
603
23.7k
    }
604
605
37.0k
    zl = (unsigned long *)zb;
606
607
3.25M
    while (len >= sizeof(unsigned long)) {
608
3.21M
        *zl++ = 0;
609
3.21M
        len -= sizeof(unsigned long);
610
3.21M
    }
611
612
37.0k
    zb = (byte *)zl;
613
614
48.6k
    while (len) {
615
11.5k
        *zb++ = 0;
616
11.5k
        --len;
617
11.5k
    }
618
619
    XFENCE();
620
37.0k
}
arc4.c:ForceZero
Line
Count
Source
592
4
{
593
4
    byte *zb = (byte *)mem;
594
4
    unsigned long *zl;
595
596
4
    XFENCE();
597
598
28
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
24
        if (len == 0)
600
0
            return;
601
24
        *zb++ = 0;
602
24
        --len;
603
24
    }
604
605
4
    zl = (unsigned long *)zb;
606
607
128
    while (len >= sizeof(unsigned long)) {
608
124
        *zl++ = 0;
609
124
        len -= sizeof(unsigned long);
610
124
    }
611
612
4
    zb = (byte *)zl;
613
614
12
    while (len) {
615
8
        *zb++ = 0;
616
8
        --len;
617
8
    }
618
619
    XFENCE();
620
4
}
asn.c:ForceZero
Line
Count
Source
592
78.9k
{
593
78.9k
    byte *zb = (byte *)mem;
594
78.9k
    unsigned long *zl;
595
596
78.9k
    XFENCE();
597
598
78.9k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
78.9k
    zl = (unsigned long *)zb;
606
607
11.8M
    while (len >= sizeof(unsigned long)) {
608
11.7M
        *zl++ = 0;
609
11.7M
        len -= sizeof(unsigned long);
610
11.7M
    }
611
612
78.9k
    zb = (byte *)zl;
613
614
157k
    while (len) {
615
78.9k
        *zb++ = 0;
616
78.9k
        --len;
617
78.9k
    }
618
619
    XFENCE();
620
78.9k
}
Unexecuted instantiation: blake2b.c:ForceZero
Unexecuted instantiation: blake2s.c:ForceZero
Unexecuted instantiation: camellia.c:ForceZero
Unexecuted instantiation: chacha.c:ForceZero
Unexecuted instantiation: chacha20_poly1305.c:ForceZero
cmac.c:ForceZero
Line
Count
Source
592
222
{
593
222
    byte *zb = (byte *)mem;
594
222
    unsigned long *zl;
595
596
222
    XFENCE();
597
598
222
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
222
    zl = (unsigned long *)zb;
606
607
17.0k
    while (len >= sizeof(unsigned long)) {
608
16.8k
        *zl++ = 0;
609
16.8k
        len -= sizeof(unsigned long);
610
16.8k
    }
611
612
222
    zb = (byte *)zl;
613
614
222
    while (len) {
615
0
        *zb++ = 0;
616
0
        --len;
617
0
    }
618
619
    XFENCE();
620
222
}
Unexecuted instantiation: coding.c:ForceZero
curve25519.c:ForceZero
Line
Count
Source
592
17.2k
{
593
17.2k
    byte *zb = (byte *)mem;
594
17.2k
    unsigned long *zl;
595
596
17.2k
    XFENCE();
597
598
17.2k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
17.2k
    zl = (unsigned long *)zb;
606
607
147k
    while (len >= sizeof(unsigned long)) {
608
130k
        *zl++ = 0;
609
130k
        len -= sizeof(unsigned long);
610
130k
    }
611
612
17.2k
    zb = (byte *)zl;
613
614
17.2k
    while (len) {
615
0
        *zb++ = 0;
616
0
        --len;
617
0
    }
618
619
    XFENCE();
620
17.2k
}
curve448.c:ForceZero
Line
Count
Source
592
418
{
593
418
    byte *zb = (byte *)mem;
594
418
    unsigned long *zl;
595
596
418
    XFENCE();
597
598
529
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
111
        if (len == 0)
600
0
            return;
601
111
        *zb++ = 0;
602
111
        --len;
603
111
    }
604
605
418
    zl = (unsigned long *)zb;
606
607
3.23k
    while (len >= sizeof(unsigned long)) {
608
2.81k
        *zl++ = 0;
609
2.81k
        len -= sizeof(unsigned long);
610
2.81k
    }
611
612
418
    zb = (byte *)zl;
613
614
1.19k
    while (len) {
615
777
        *zb++ = 0;
616
777
        --len;
617
777
    }
618
619
    XFENCE();
620
418
}
Unexecuted instantiation: des3.c:ForceZero
Unexecuted instantiation: dh.c:ForceZero
ecc.c:ForceZero
Line
Count
Source
592
30.6k
{
593
30.6k
    byte *zb = (byte *)mem;
594
30.6k
    unsigned long *zl;
595
596
30.6k
    XFENCE();
597
598
30.6k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
30.6k
    zl = (unsigned long *)zb;
606
607
2.80M
    while (len >= sizeof(unsigned long)) {
608
2.77M
        *zl++ = 0;
609
2.77M
        len -= sizeof(unsigned long);
610
2.77M
    }
611
612
30.6k
    zb = (byte *)zl;
613
614
81.4k
    while (len) {
615
50.8k
        *zb++ = 0;
616
50.8k
        --len;
617
50.8k
    }
618
619
    XFENCE();
620
30.6k
}
Unexecuted instantiation: eccsi.c:ForceZero
ed25519.c:ForceZero
Line
Count
Source
592
2.69k
{
593
2.69k
    byte *zb = (byte *)mem;
594
2.69k
    unsigned long *zl;
595
596
2.69k
    XFENCE();
597
598
2.69k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
2.69k
    zl = (unsigned long *)zb;
606
607
110k
    while (len >= sizeof(unsigned long)) {
608
107k
        *zl++ = 0;
609
107k
        len -= sizeof(unsigned long);
610
107k
    }
611
612
2.69k
    zb = (byte *)zl;
613
614
2.69k
    while (len) {
615
0
        *zb++ = 0;
616
0
        --len;
617
0
    }
618
619
    XFENCE();
620
2.69k
}
ed448.c:ForceZero
Line
Count
Source
592
3.02k
{
593
3.02k
    byte *zb = (byte *)mem;
594
3.02k
    unsigned long *zl;
595
596
3.02k
    XFENCE();
597
598
3.30k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
280
        if (len == 0)
600
0
            return;
601
280
        *zb++ = 0;
602
280
        --len;
603
280
    }
604
605
3.02k
    zl = (unsigned long *)zb;
606
607
199k
    while (len >= sizeof(unsigned long)) {
608
196k
        *zl++ = 0;
609
196k
        len -= sizeof(unsigned long);
610
196k
    }
611
612
3.02k
    zb = (byte *)zl;
613
614
4.46k
    while (len) {
615
1.43k
        *zb++ = 0;
616
1.43k
        --len;
617
1.43k
    }
618
619
    XFENCE();
620
3.02k
}
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
592
81.7k
{
593
81.7k
    byte *zb = (byte *)mem;
594
81.7k
    unsigned long *zl;
595
596
81.7k
    XFENCE();
597
598
81.7k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
81.7k
    zl = (unsigned long *)zb;
606
607
7.94M
    while (len >= sizeof(unsigned long)) {
608
7.86M
        *zl++ = 0;
609
7.86M
        len -= sizeof(unsigned long);
610
7.86M
    }
611
612
81.7k
    zb = (byte *)zl;
613
614
81.7k
    while (len) {
615
0
        *zb++ = 0;
616
0
        --len;
617
0
    }
618
619
    XFENCE();
620
81.7k
}
Unexecuted instantiation: integer.c:ForceZero
kdf.c:ForceZero
Line
Count
Source
592
15.9k
{
593
15.9k
    byte *zb = (byte *)mem;
594
15.9k
    unsigned long *zl;
595
596
15.9k
    XFENCE();
597
598
15.9k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
15.9k
    zl = (unsigned long *)zb;
606
607
541k
    while (len >= sizeof(unsigned long)) {
608
525k
        *zl++ = 0;
609
525k
        len -= sizeof(unsigned long);
610
525k
    }
611
612
15.9k
    zb = (byte *)zl;
613
614
40.7k
    while (len) {
615
24.8k
        *zb++ = 0;
616
24.8k
        --len;
617
24.8k
    }
618
619
    XFENCE();
620
15.9k
}
Unexecuted instantiation: md2.c:ForceZero
Unexecuted instantiation: md4.c:ForceZero
Unexecuted instantiation: md5.c:ForceZero
Unexecuted instantiation: memory.c:ForceZero
Unexecuted instantiation: poly1305.c:ForceZero
pwdbased.c:ForceZero
Line
Count
Source
592
231
{
593
231
    byte *zb = (byte *)mem;
594
231
    unsigned long *zl;
595
596
231
    XFENCE();
597
598
231
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
231
    zl = (unsigned long *)zb;
606
607
1.05k
    while (len >= sizeof(unsigned long)) {
608
821
        *zl++ = 0;
609
821
        len -= sizeof(unsigned long);
610
821
    }
611
612
231
    zb = (byte *)zl;
613
614
431
    while (len) {
615
200
        *zb++ = 0;
616
200
        --len;
617
200
    }
618
619
    XFENCE();
620
231
}
random.c:ForceZero
Line
Count
Source
592
1.76M
{
593
1.76M
    byte *zb = (byte *)mem;
594
1.76M
    unsigned long *zl;
595
596
1.76M
    XFENCE();
597
598
1.76M
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
1.76M
    zl = (unsigned long *)zb;
606
607
23.6M
    while (len >= sizeof(unsigned long)) {
608
21.8M
        *zl++ = 0;
609
21.8M
        len -= sizeof(unsigned long);
610
21.8M
    }
611
612
1.76M
    zb = (byte *)zl;
613
614
5.28M
    while (len) {
615
3.52M
        *zb++ = 0;
616
3.52M
        --len;
617
3.52M
    }
618
619
    XFENCE();
620
1.76M
}
Unexecuted instantiation: ripemd.c:ForceZero
rsa.c:ForceZero
Line
Count
Source
592
421
{
593
421
    byte *zb = (byte *)mem;
594
421
    unsigned long *zl;
595
596
421
    XFENCE();
597
598
421
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
421
    zl = (unsigned long *)zb;
606
607
2.47k
    while (len >= sizeof(unsigned long)) {
608
2.05k
        *zl++ = 0;
609
2.05k
        len -= sizeof(unsigned long);
610
2.05k
    }
611
612
421
    zb = (byte *)zl;
613
614
1.00k
    while (len) {
615
588
        *zb++ = 0;
616
588
        --len;
617
588
    }
618
619
    XFENCE();
620
421
}
Unexecuted instantiation: sha.c:ForceZero
sha256.c:ForceZero
Line
Count
Source
592
1.07M
{
593
1.07M
    byte *zb = (byte *)mem;
594
1.07M
    unsigned long *zl;
595
596
1.07M
    XFENCE();
597
598
1.07M
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
1.07M
    zl = (unsigned long *)zb;
606
607
33.0M
    while (len >= sizeof(unsigned long)) {
608
32.0M
        *zl++ = 0;
609
32.0M
        len -= sizeof(unsigned long);
610
32.0M
    }
611
612
1.07M
    zb = (byte *)zl;
613
614
1.07M
    while (len) {
615
0
        *zb++ = 0;
616
0
        --len;
617
0
    }
618
619
    XFENCE();
620
1.07M
}
Unexecuted instantiation: sha3.c:ForceZero
sha512.c:ForceZero
Line
Count
Source
592
11.4M
{
593
11.4M
    byte *zb = (byte *)mem;
594
11.4M
    unsigned long *zl;
595
596
11.4M
    XFENCE();
597
598
11.4M
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
11.4M
    zl = (unsigned long *)zb;
606
607
203M
    while (len >= sizeof(unsigned long)) {
608
191M
        *zl++ = 0;
609
191M
        len -= sizeof(unsigned long);
610
191M
    }
611
612
11.4M
    zb = (byte *)zl;
613
614
11.4M
    while (len) {
615
0
        *zb++ = 0;
616
0
        --len;
617
0
    }
618
619
    XFENCE();
620
11.4M
}
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
592
450k
{
593
450k
    byte *zb = (byte *)mem;
594
450k
    unsigned long *zl;
595
596
450k
    XFENCE();
597
598
1.65M
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
1.20M
        if (len == 0)
600
0
            return;
601
1.20M
        *zb++ = 0;
602
1.20M
        --len;
603
1.20M
    }
604
605
450k
    zl = (unsigned long *)zb;
606
607
14.2M
    while (len >= sizeof(unsigned long)) {
608
13.7M
        *zl++ = 0;
609
13.7M
        len -= sizeof(unsigned long);
610
13.7M
    }
611
612
450k
    zb = (byte *)zl;
613
614
2.27M
    while (len) {
615
1.82M
        *zb++ = 0;
616
1.82M
        --len;
617
1.82M
    }
618
619
    XFENCE();
620
450k
}
tls.c:ForceZero
Line
Count
Source
592
23.2k
{
593
23.2k
    byte *zb = (byte *)mem;
594
23.2k
    unsigned long *zl;
595
596
23.2k
    XFENCE();
597
598
23.2k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
23.2k
    zl = (unsigned long *)zb;
606
607
6.18M
    while (len >= sizeof(unsigned long)) {
608
6.16M
        *zl++ = 0;
609
6.16M
        len -= sizeof(unsigned long);
610
6.16M
    }
611
612
23.2k
    zb = (byte *)zl;
613
614
23.3k
    while (len) {
615
96
        *zb++ = 0;
616
96
        --len;
617
96
    }
618
619
    XFENCE();
620
23.2k
}
tls13.c:ForceZero
Line
Count
Source
592
5.58k
{
593
5.58k
    byte *zb = (byte *)mem;
594
5.58k
    unsigned long *zl;
595
596
5.58k
    XFENCE();
597
598
5.58k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
5.58k
    zl = (unsigned long *)zb;
606
607
53.4k
    while (len >= sizeof(unsigned long)) {
608
47.8k
        *zl++ = 0;
609
47.8k
        len -= sizeof(unsigned long);
610
47.8k
    }
611
612
5.58k
    zb = (byte *)zl;
613
614
9.26k
    while (len) {
615
3.68k
        *zb++ = 0;
616
3.68k
        --len;
617
3.68k
    }
618
619
    XFENCE();
620
5.58k
}
wc_mlkem.c:ForceZero
Line
Count
Source
592
14.9k
{
593
14.9k
    byte *zb = (byte *)mem;
594
14.9k
    unsigned long *zl;
595
596
14.9k
    XFENCE();
597
598
14.9k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
0
        if (len == 0)
600
0
            return;
601
0
        *zb++ = 0;
602
0
        --len;
603
0
    }
604
605
14.9k
    zl = (unsigned long *)zb;
606
607
1.14M
    while (len >= sizeof(unsigned long)) {
608
1.13M
        *zl++ = 0;
609
1.13M
        len -= sizeof(unsigned long);
610
1.13M
    }
611
612
14.9k
    zb = (byte *)zl;
613
614
14.9k
    while (len) {
615
0
        *zb++ = 0;
616
0
        --len;
617
0
    }
618
619
    XFENCE();
620
14.9k
}
Unexecuted instantiation: wc_mlkem_poly.c:ForceZero
internal.c:ForceZero
Line
Count
Source
592
818k
{
593
818k
    byte *zb = (byte *)mem;
594
818k
    unsigned long *zl;
595
596
818k
    XFENCE();
597
598
821k
    while ((wc_ptr_t)zb & (wc_ptr_t)(sizeof(unsigned long) - 1U)) {
599
2.84k
        if (len == 0)
600
0
            return;
601
2.84k
        *zb++ = 0;
602
2.84k
        --len;
603
2.84k
    }
604
605
818k
    zl = (unsigned long *)zb;
606
607
90.7M
    while (len >= sizeof(unsigned long)) {
608
89.9M
        *zl++ = 0;
609
89.9M
        len -= sizeof(unsigned long);
610
89.9M
    }
611
612
818k
    zb = (byte *)zl;
613
614
1.55M
    while (len) {
615
738k
        *zb++ = 0;
616
738k
        --len;
617
738k
    }
618
619
    XFENCE();
620
818k
}
Unexecuted instantiation: keys.c:ForceZero
621
#endif
622
623
624
#ifndef WOLFSSL_NO_CONST_CMP
625
/* check all length bytes for equality, return 0 on success */
626
WC_MISC_STATIC WC_INLINE int ConstantCompare(const byte* a, const byte* b,
627
                                             int length)
628
127k
{
629
127k
    int i;
630
127k
    int compareSum = 0;
631
632
32.2M
    for (i = 0; i < length; i++) {
633
32.1M
        compareSum |= a[i] ^ b[i];
634
32.1M
    }
635
636
127k
    return compareSum;
637
127k
}
aes.c:ConstantCompare
Line
Count
Source
628
269
{
629
269
    int i;
630
269
    int compareSum = 0;
631
632
4.15k
    for (i = 0; i < length; i++) {
633
3.88k
        compareSum |= a[i] ^ b[i];
634
3.88k
    }
635
636
269
    return compareSum;
637
269
}
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
Unexecuted instantiation: chacha20_poly1305.c:ConstantCompare
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
628
3
{
629
3
    int i;
630
3
    int compareSum = 0;
631
632
99
    for (i = 0; i < length; i++) {
633
96
        compareSum |= a[i] ^ b[i];
634
96
    }
635
636
3
    return compareSum;
637
3
}
Unexecuted instantiation: eccsi.c:ConstantCompare
ed25519.c:ConstantCompare
Line
Count
Source
628
307
{
629
307
    int i;
630
307
    int compareSum = 0;
631
632
10.1k
    for (i = 0; i < length; i++) {
633
9.82k
        compareSum |= a[i] ^ b[i];
634
9.82k
    }
635
636
307
    return compareSum;
637
307
}
ed448.c:ConstantCompare
Line
Count
Source
628
359
{
629
359
    int i;
630
359
    int compareSum = 0;
631
632
20.8k
    for (i = 0; i < length; i++) {
633
20.4k
        compareSum |= a[i] ^ b[i];
634
20.4k
    }
635
636
359
    return compareSum;
637
359
}
Unexecuted instantiation: fe_448.c:ConstantCompare
fe_operations.c:ConstantCompare
Line
Count
Source
628
1.27k
{
629
1.27k
    int i;
630
1.27k
    int compareSum = 0;
631
632
42.1k
    for (i = 0; i < length; i++) {
633
40.8k
        compareSum |= a[i] ^ b[i];
634
40.8k
    }
635
636
1.27k
    return compareSum;
637
1.27k
}
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
628
125k
{
629
125k
    int i;
630
125k
    int compareSum = 0;
631
632
32.1M
    for (i = 0; i < length; i++) {
633
32.0M
        compareSum |= a[i] ^ b[i];
634
32.0M
    }
635
636
125k
    return compareSum;
637
125k
}
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
628
8
{
629
8
    int i;
630
8
    int compareSum = 0;
631
632
104
    for (i = 0; i < length; i++) {
633
96
        compareSum |= a[i] ^ b[i];
634
96
    }
635
636
8
    return compareSum;
637
8
}
tls13.c:ConstantCompare
Line
Count
Source
628
16
{
629
16
    int i;
630
16
    int compareSum = 0;
631
632
368
    for (i = 0; i < length; i++) {
633
352
        compareSum |= a[i] ^ b[i];
634
352
    }
635
636
16
    return compareSum;
637
16
}
Unexecuted instantiation: wc_mlkem.c:ConstantCompare
Unexecuted instantiation: wc_mlkem_poly.c:ConstantCompare
internal.c:ConstantCompare
Line
Count
Source
628
82
{
629
82
    int i;
630
82
    int compareSum = 0;
631
632
1.59k
    for (i = 0; i < length; i++) {
633
1.51k
        compareSum |= a[i] ^ b[i];
634
1.51k
    }
635
636
82
    return compareSum;
637
82
}
Unexecuted instantiation: keys.c:ConstantCompare
638
#endif
639
640
641
#if defined(WOLFSSL_NO_CT_OPS) && (!defined(NO_RSA) || !defined(WOLFCRYPT_ONLY)) \
642
    && (!defined(WOLFSSL_RSA_VERIFY_ONLY))
643
/* constant time operations with mask are required for RSA and TLS operations */
644
#warning constant time operations required unless using NO_RSA & WOLFCRYPT_ONLY
645
#endif
646
647
#if !defined(WOLFSSL_NO_CT_OPS) || !defined(NO_RSA) || !defined(WOLFCRYPT_ONLY)
648
/* Constant time - mask set when a > b. */
649
WC_MISC_STATIC WC_INLINE byte ctMaskGT(int a, int b)
650
62.7k
{
651
62.7k
    return (byte)((((word32)a - (word32)b - 1) >> 31) - 1);
652
62.7k
}
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
650
6.62k
{
651
6.62k
    return (byte)((((word32)a - (word32)b - 1) >> 31) - 1);
652
6.62k
}
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
650
56.0k
{
651
56.0k
    return (byte)((((word32)a - (word32)b - 1) >> 31) - 1);
652
56.0k
}
Unexecuted instantiation: tls13.c:ctMaskGT
Unexecuted instantiation: wc_mlkem.c:ctMaskGT
Unexecuted instantiation: wc_mlkem_poly.c:ctMaskGT
internal.c:ctMaskGT
Line
Count
Source
650
94
{
651
94
    return (byte)((((word32)a - (word32)b - 1) >> 31) - 1);
652
94
}
Unexecuted instantiation: keys.c:ctMaskGT
653
654
/* Constant time - mask set when a >= b. */
655
WC_MISC_STATIC WC_INLINE byte ctMaskGTE(int a, int b)
656
19.4k
{
657
19.4k
    return (byte)((((word32)a - (word32)b) >> 31) - 1);
658
19.4k
}
Unexecuted instantiation: aes.c:ctMaskGTE
Unexecuted instantiation: arc4.c:ctMaskGTE
Unexecuted instantiation: asn.c:ctMaskGTE
Unexecuted instantiation: blake2b.c:ctMaskGTE
Unexecuted instantiation: blake2s.c:ctMaskGTE
Unexecuted instantiation: camellia.c:ctMaskGTE
Unexecuted instantiation: chacha.c:ctMaskGTE
Unexecuted instantiation: chacha20_poly1305.c:ctMaskGTE
Unexecuted instantiation: cmac.c:ctMaskGTE
Unexecuted instantiation: coding.c:ctMaskGTE
Unexecuted instantiation: curve25519.c:ctMaskGTE
Unexecuted instantiation: curve448.c:ctMaskGTE
Unexecuted instantiation: des3.c:ctMaskGTE
Unexecuted instantiation: dh.c:ctMaskGTE
Unexecuted instantiation: ecc.c:ctMaskGTE
Unexecuted instantiation: eccsi.c:ctMaskGTE
Unexecuted instantiation: ed25519.c:ctMaskGTE
Unexecuted instantiation: ed448.c:ctMaskGTE
Unexecuted instantiation: fe_448.c:ctMaskGTE
Unexecuted instantiation: fe_operations.c:ctMaskGTE
Unexecuted instantiation: ge_448.c:ctMaskGTE
Unexecuted instantiation: ge_operations.c:ctMaskGTE
Unexecuted instantiation: hash.c:ctMaskGTE
Unexecuted instantiation: hmac.c:ctMaskGTE
Unexecuted instantiation: 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
656
19.4k
{
657
19.4k
    return (byte)((((word32)a - (word32)b) >> 31) - 1);
658
19.4k
}
Unexecuted instantiation: keys.c:ctMaskGTE
659
660
/* Constant time - mask set when a >= b. */
661
WC_MISC_STATIC WC_INLINE int ctMaskIntGTE(int a, int b)
662
188
{
663
188
    return (int)((((word32)a - (word32)b) >> 31) - 1);
664
188
}
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
662
188
{
663
188
    return (int)((((word32)a - (word32)b) >> 31) - 1);
664
188
}
Unexecuted instantiation: keys.c:ctMaskIntGTE
665
666
#ifdef WORD64_AVAILABLE
667
/* Constant time - mask set when a >= b. */
668
WC_MISC_STATIC WC_INLINE word32 ctMaskWord32GTE(word32 a, word32 b)
669
4.16M
{
670
4.16M
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
4.16M
}
aes.c:ctMaskWord32GTE
Line
Count
Source
669
1.37k
{
670
1.37k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
1.37k
}
Unexecuted instantiation: arc4.c:ctMaskWord32GTE
asn.c:ctMaskWord32GTE
Line
Count
Source
669
61.9k
{
670
61.9k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
61.9k
}
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
669
687
{
670
687
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
687
}
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
669
16.7k
{
670
16.7k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
16.7k
}
Unexecuted instantiation: integer.c:ctMaskWord32GTE
kdf.c:ctMaskWord32GTE
Line
Count
Source
669
2.84k
{
670
2.84k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
2.84k
}
Unexecuted instantiation: md2.c:ctMaskWord32GTE
md4.c:ctMaskWord32GTE
Line
Count
Source
669
24.6k
{
670
24.6k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
24.6k
}
md5.c:ctMaskWord32GTE
Line
Count
Source
669
110k
{
670
110k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
110k
}
Unexecuted instantiation: memory.c:ctMaskWord32GTE
Unexecuted instantiation: poly1305.c:ctMaskWord32GTE
pwdbased.c:ctMaskWord32GTE
Line
Count
Source
669
3.93k
{
670
3.93k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
3.93k
}
random.c:ctMaskWord32GTE
Line
Count
Source
669
125k
{
670
125k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
125k
}
Unexecuted instantiation: ripemd.c:ctMaskWord32GTE
Unexecuted instantiation: rsa.c:ctMaskWord32GTE
sha.c:ctMaskWord32GTE
Line
Count
Source
669
226k
{
670
226k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
226k
}
sha256.c:ctMaskWord32GTE
Line
Count
Source
669
226k
{
670
226k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
226k
}
Unexecuted instantiation: sha3.c:ctMaskWord32GTE
sha512.c:ctMaskWord32GTE
Line
Count
Source
669
3.29M
{
670
3.29M
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
3.29M
}
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
669
147
{
670
147
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
147
}
Unexecuted instantiation: tls.c:ctMaskWord32GTE
tls13.c:ctMaskWord32GTE
Line
Count
Source
669
7.29k
{
670
7.29k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
7.29k
}
Unexecuted instantiation: wc_mlkem.c:ctMaskWord32GTE
Unexecuted instantiation: wc_mlkem_poly.c:ctMaskWord32GTE
internal.c:ctMaskWord32GTE
Line
Count
Source
669
65.9k
{
670
65.9k
  return (word32)((((word64)a - (word64)b) >> 63) - 1);
671
65.9k
}
Unexecuted instantiation: keys.c:ctMaskWord32GTE
672
#endif
673
674
/* Constant time - mask set when a < b. */
675
WC_MISC_STATIC WC_INLINE byte ctMaskLT(int a, int b)
676
54.3k
{
677
54.3k
    return (byte)((((word32)b - (word32)a - 1) >> 31) - 1);
678
54.3k
}
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
676
6.62k
{
677
6.62k
    return (byte)((((word32)b - (word32)a - 1) >> 31) - 1);
678
6.62k
}
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
676
28.3k
{
677
28.3k
    return (byte)((((word32)b - (word32)a - 1) >> 31) - 1);
678
28.3k
}
Unexecuted instantiation: tls13.c:ctMaskLT
Unexecuted instantiation: wc_mlkem.c:ctMaskLT
Unexecuted instantiation: wc_mlkem_poly.c:ctMaskLT
internal.c:ctMaskLT
Line
Count
Source
676
19.4k
{
677
19.4k
    return (byte)((((word32)b - (word32)a - 1) >> 31) - 1);
678
19.4k
}
Unexecuted instantiation: keys.c:ctMaskLT
679
680
/* Constant time - mask set when a <= b. */
681
WC_MISC_STATIC WC_INLINE byte ctMaskLTE(int a, int b)
682
24.2k
{
683
24.2k
    return (byte)((((word32)b - (word32)a) >> 31) - 1);
684
24.2k
}
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
682
6.62k
{
683
6.62k
    return (byte)((((word32)b - (word32)a) >> 31) - 1);
684
6.62k
}
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
682
17.6k
{
683
17.6k
    return (byte)((((word32)b - (word32)a) >> 31) - 1);
684
17.6k
}
Unexecuted instantiation: keys.c:ctMaskLTE
685
686
/* Constant time - mask set when a == b. */
687
WC_MISC_STATIC WC_INLINE byte ctMaskEq(int a, int b)
688
28.3k
{
689
28.3k
    return (byte)((byte)(~ctMaskGT(a, b)) & (byte)(~ctMaskLT(a, b)));
690
28.3k
}
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
688
28.3k
{
689
28.3k
    return (byte)((byte)(~ctMaskGT(a, b)) & (byte)(~ctMaskLT(a, b)));
690
28.3k
}
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
691
692
/* Constant time - sets 16 bit integer mask when a > b */
693
WC_MISC_STATIC WC_INLINE word16 ctMask16GT(int a, int b)
694
0
{
695
0
    return (word16)((((word32)a - (word32)b - 1) >> 31) - 1);
696
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
697
698
/* Constant time - sets 16 bit integer mask when a >= b */
699
WC_MISC_STATIC WC_INLINE word16 ctMask16GTE(int a, int b)
700
0
{
701
0
    return (word16)((((word32)a - (word32)b) >> 31) - 1);
702
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
703
704
/* Constant time - sets 16 bit integer mask when a < b. */
705
WC_MISC_STATIC WC_INLINE word16 ctMask16LT(int a, int b)
706
0
{
707
0
    return (word16)((((word32)b - (word32)a - 1) >> 31) - 1);
708
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
709
710
/* Constant time - sets 16 bit integer mask when a <= b. */
711
WC_MISC_STATIC WC_INLINE word16 ctMask16LTE(int a, int b)
712
0
{
713
0
    return (word16)((((word32)b - (word32)a) >> 31) - 1);
714
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
715
716
/* Constant time - sets 16 bit integer mask when a == b. */
717
WC_MISC_STATIC WC_INLINE word16 ctMask16Eq(int a, int b)
718
0
{
719
0
    return (word16)((word16)(~ctMask16GT(a, b)) & (word16)(~ctMask16LT(a, b)));
720
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
721
722
/* Constant time - mask set when a != b. */
723
WC_MISC_STATIC WC_INLINE byte ctMaskNotEq(int a, int b)
724
6.62k
{
725
6.62k
    return (byte)((byte)ctMaskGT(a, b) | (byte)ctMaskLT(a, b));
726
6.62k
}
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
724
6.62k
{
725
6.62k
    return (byte)((byte)ctMaskGT(a, b) | (byte)ctMaskLT(a, b));
726
6.62k
}
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
727
728
/* Constant time - select a when mask is set and b otherwise. */
729
WC_MISC_STATIC WC_INLINE byte ctMaskSel(byte m, byte a, byte b)
730
30.0k
{
731
30.0k
    return (byte)((b & ((byte)~(word32)m)) | (a & m));
732
30.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
730
30.0k
{
731
30.0k
    return (byte)((b & ((byte)~(word32)m)) | (a & m));
732
30.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
733
734
/* Constant time - select integer a when mask is set and integer b otherwise. */
735
WC_MISC_STATIC WC_INLINE int ctMaskSelInt(byte m, int a, int b)
736
13.2k
{
737
13.2k
    return (b & (~(signed int)(signed char)m)) |
738
13.2k
           (a & ( (signed int)(signed char)m));
739
13.2k
}
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
736
13.2k
{
737
13.2k
    return (b & (~(signed int)(signed char)m)) |
738
13.2k
           (a & ( (signed int)(signed char)m));
739
13.2k
}
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
740
741
/* Constant time - select word32 a when mask is set and word32 b otherwise. */
742
WC_MISC_STATIC WC_INLINE word32 ctMaskSelWord32(byte m, word32 a, word32 b)
743
0
{
744
0
    return (((word32)b & (word32)(~(signed int)(signed char)m)) |
745
0
            ((word32)a & (word32)( (signed int)(signed char)m)));
746
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
747
748
/* Constant time - bit set when a <= b. */
749
WC_MISC_STATIC WC_INLINE byte ctSetLTE(int a, int b)
750
65
{
751
65
    return (byte)(((word32)a - (word32)b - 1) >> 31);
752
65
}
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
750
65
{
751
65
    return (byte)(((word32)a - (word32)b - 1) >> 31);
752
65
}
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
753
754
/* Constant time - conditionally copy size bytes from src to dst if mask is set
755
 */
756
WC_MISC_STATIC WC_INLINE void ctMaskCopy(byte mask, byte* dst, byte* src,
757
    word16 size)
758
0
{
759
0
    int i;
760
0
    for (i = 0; i < size; ++i) {
761
0
        dst[i] ^= (dst[i] ^ src[i]) & mask;
762
0
    }
763
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
764
765
#endif /* !WOLFSSL_NO_CT_OPS */
766
767
#ifndef WOLFSSL_HAVE_MIN
768
    #define WOLFSSL_HAVE_MIN
769
    #if defined(HAVE_FIPS) && !defined(min) /* so ifdef check passes */
770
        #define min min
771
    #endif
772
    /* returns the smaller of a and b */
773
    WC_MISC_STATIC WC_INLINE word32 min(word32 a, word32 b)
774
4.16M
    {
775
4.16M
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
4.16M
    defined(WORD64_AVAILABLE)
777
4.16M
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
4.16M
        word32 r = (a & ~gte_mask);
779
4.16M
        r |= (b & gte_mask);
780
4.16M
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
4.16M
    }
aes.c:min
Line
Count
Source
774
1.37k
    {
775
1.37k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
1.37k
    defined(WORD64_AVAILABLE)
777
1.37k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
1.37k
        word32 r = (a & ~gte_mask);
779
1.37k
        r |= (b & gte_mask);
780
1.37k
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
1.37k
    }
Unexecuted instantiation: arc4.c:min
asn.c:min
Line
Count
Source
774
61.9k
    {
775
61.9k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
61.9k
    defined(WORD64_AVAILABLE)
777
61.9k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
61.9k
        word32 r = (a & ~gte_mask);
779
61.9k
        r |= (b & gte_mask);
780
61.9k
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
61.9k
    }
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
774
687
    {
775
687
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
687
    defined(WORD64_AVAILABLE)
777
687
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
687
        word32 r = (a & ~gte_mask);
779
687
        r |= (b & gte_mask);
780
687
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
687
    }
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
774
16.7k
    {
775
16.7k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
16.7k
    defined(WORD64_AVAILABLE)
777
16.7k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
16.7k
        word32 r = (a & ~gte_mask);
779
16.7k
        r |= (b & gte_mask);
780
16.7k
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
16.7k
    }
Unexecuted instantiation: integer.c:min
kdf.c:min
Line
Count
Source
774
2.84k
    {
775
2.84k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
2.84k
    defined(WORD64_AVAILABLE)
777
2.84k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
2.84k
        word32 r = (a & ~gte_mask);
779
2.84k
        r |= (b & gte_mask);
780
2.84k
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
2.84k
    }
Unexecuted instantiation: md2.c:min
md4.c:min
Line
Count
Source
774
24.6k
    {
775
24.6k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
24.6k
    defined(WORD64_AVAILABLE)
777
24.6k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
24.6k
        word32 r = (a & ~gte_mask);
779
24.6k
        r |= (b & gte_mask);
780
24.6k
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
24.6k
    }
md5.c:min
Line
Count
Source
774
110k
    {
775
110k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
110k
    defined(WORD64_AVAILABLE)
777
110k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
110k
        word32 r = (a & ~gte_mask);
779
110k
        r |= (b & gte_mask);
780
110k
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
110k
    }
Unexecuted instantiation: memory.c:min
Unexecuted instantiation: poly1305.c:min
pwdbased.c:min
Line
Count
Source
774
3.93k
    {
775
3.93k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
3.93k
    defined(WORD64_AVAILABLE)
777
3.93k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
3.93k
        word32 r = (a & ~gte_mask);
779
3.93k
        r |= (b & gte_mask);
780
3.93k
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
3.93k
    }
random.c:min
Line
Count
Source
774
125k
    {
775
125k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
125k
    defined(WORD64_AVAILABLE)
777
125k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
125k
        word32 r = (a & ~gte_mask);
779
125k
        r |= (b & gte_mask);
780
125k
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
125k
    }
Unexecuted instantiation: ripemd.c:min
Unexecuted instantiation: rsa.c:min
sha.c:min
Line
Count
Source
774
226k
    {
775
226k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
226k
    defined(WORD64_AVAILABLE)
777
226k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
226k
        word32 r = (a & ~gte_mask);
779
226k
        r |= (b & gte_mask);
780
226k
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
226k
    }
sha256.c:min
Line
Count
Source
774
226k
    {
775
226k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
226k
    defined(WORD64_AVAILABLE)
777
226k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
226k
        word32 r = (a & ~gte_mask);
779
226k
        r |= (b & gte_mask);
780
226k
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
226k
    }
Unexecuted instantiation: sha3.c:min
sha512.c:min
Line
Count
Source
774
3.29M
    {
775
3.29M
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
3.29M
    defined(WORD64_AVAILABLE)
777
3.29M
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
3.29M
        word32 r = (a & ~gte_mask);
779
3.29M
        r |= (b & gte_mask);
780
3.29M
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
3.29M
    }
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
774
147
    {
775
147
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
147
    defined(WORD64_AVAILABLE)
777
147
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
147
        word32 r = (a & ~gte_mask);
779
147
        r |= (b & gte_mask);
780
147
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
147
    }
Unexecuted instantiation: tls.c:min
tls13.c:min
Line
Count
Source
774
7.29k
    {
775
7.29k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
7.29k
    defined(WORD64_AVAILABLE)
777
7.29k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
7.29k
        word32 r = (a & ~gte_mask);
779
7.29k
        r |= (b & gte_mask);
780
7.29k
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
7.29k
    }
Unexecuted instantiation: wc_mlkem.c:min
Unexecuted instantiation: wc_mlkem_poly.c:min
internal.c:min
Line
Count
Source
774
65.2k
    {
775
65.2k
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
776
65.2k
    defined(WORD64_AVAILABLE)
777
65.2k
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
778
65.2k
        word32 r = (a & ~gte_mask);
779
65.2k
        r |= (b & gte_mask);
780
65.2k
        return r;
781
#else /* WOLFSSL_NO_CT_OPS */
782
        return a > b ? b : a;
783
#endif /* WOLFSSL_NO_CT_OPS */
784
65.2k
    }
Unexecuted instantiation: keys.c:min
785
#endif /* !WOLFSSL_HAVE_MIN */
786
787
#ifndef WOLFSSL_HAVE_MAX
788
    #define WOLFSSL_HAVE_MAX
789
    #if defined(HAVE_FIPS) && !defined(max) /* so ifdef check passes */
790
        #define max max
791
    #endif
792
    WC_MISC_STATIC WC_INLINE word32 max(word32 a, word32 b)
793
0
    {
794
0
#if !defined(WOLFSSL_NO_CT_OPS) && !defined(WOLFSSL_NO_CT_MAX_MIN) && \
795
0
    defined(WORD64_AVAILABLE)
796
0
        volatile word32 gte_mask = (word32)ctMaskWord32GTE(a, b);
797
0
        return (a & gte_mask) | (b & ~gte_mask);
798
0
#else /* WOLFSSL_NO_CT_OPS */
799
0
        return a > b ? a : b;
800
0
#endif /* WOLFSSL_NO_CT_OPS */
801
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
802
#endif /* !WOLFSSL_HAVE_MAX */
803
804
#ifndef WOLFSSL_NO_INT_ENCODE
805
/* converts a 32 bit integer to 24 bit */
806
WC_MISC_STATIC WC_INLINE void c32to24(word32 in, word24 out)
807
75.5k
{
808
75.5k
    out[0] = (byte)((in >> 16) & 0xff);
809
75.5k
    out[1] = (byte)((in >>  8) & 0xff);
810
75.5k
    out[2] =  (byte)(in        & 0xff);
811
75.5k
}
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
807
1.92k
{
808
1.92k
    out[0] = (byte)((in >> 16) & 0xff);
809
1.92k
    out[1] = (byte)((in >>  8) & 0xff);
810
1.92k
    out[2] =  (byte)(in        & 0xff);
811
1.92k
}
Unexecuted instantiation: wc_mlkem.c:c32to24
Unexecuted instantiation: wc_mlkem_poly.c:c32to24
internal.c:c32to24
Line
Count
Source
807
73.6k
{
808
73.6k
    out[0] = (byte)((in >> 16) & 0xff);
809
73.6k
    out[1] = (byte)((in >>  8) & 0xff);
810
73.6k
    out[2] =  (byte)(in        & 0xff);
811
73.6k
}
Unexecuted instantiation: keys.c:c32to24
812
813
/* convert 16 bit integer to opaque */
814
WC_MISC_STATIC WC_INLINE void c16toa(word16 wc_u16, byte* c)
815
724k
{
816
724k
    c[0] = (byte)((wc_u16 >> 8) & 0xff);
817
724k
    c[1] =  (byte)(wc_u16       & 0xff);
818
724k
}
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
815
571k
{
816
571k
    c[0] = (byte)((wc_u16 >> 8) & 0xff);
817
571k
    c[1] =  (byte)(wc_u16       & 0xff);
818
571k
}
tls13.c:c16toa
Line
Count
Source
815
5.23k
{
816
5.23k
    c[0] = (byte)((wc_u16 >> 8) & 0xff);
817
5.23k
    c[1] =  (byte)(wc_u16       & 0xff);
818
5.23k
}
Unexecuted instantiation: wc_mlkem.c:c16toa
Unexecuted instantiation: wc_mlkem_poly.c:c16toa
internal.c:c16toa
Line
Count
Source
815
148k
{
816
148k
    c[0] = (byte)((wc_u16 >> 8) & 0xff);
817
148k
    c[1] =  (byte)(wc_u16       & 0xff);
818
148k
}
Unexecuted instantiation: keys.c:c16toa
819
820
/* convert 32 bit integer to opaque */
821
WC_MISC_STATIC WC_INLINE void c32toa(word32 wc_u32, byte* c)
822
423k
{
823
423k
#ifdef WOLFSSL_USE_ALIGN
824
423k
    c[0] = (byte)((wc_u32 >> 24) & 0xff);
825
423k
    c[1] = (byte)((wc_u32 >> 16) & 0xff);
826
423k
    c[2] = (byte)((wc_u32 >>  8) & 0xff);
827
423k
    c[3] =  (byte)(wc_u32        & 0xff);
828
#elif defined(LITTLE_ENDIAN_ORDER)
829
    *(word32*)c = ByteReverseWord32(wc_u32);
830
#else
831
    *(word32*)c = wc_u32;
832
#endif
833
423k
}
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
822
3.06k
{
823
3.06k
#ifdef WOLFSSL_USE_ALIGN
824
3.06k
    c[0] = (byte)((wc_u32 >> 24) & 0xff);
825
3.06k
    c[1] = (byte)((wc_u32 >> 16) & 0xff);
826
3.06k
    c[2] = (byte)((wc_u32 >>  8) & 0xff);
827
3.06k
    c[3] =  (byte)(wc_u32        & 0xff);
828
#elif defined(LITTLE_ENDIAN_ORDER)
829
    *(word32*)c = ByteReverseWord32(wc_u32);
830
#else
831
    *(word32*)c = wc_u32;
832
#endif
833
3.06k
}
tls13.c:c32toa
Line
Count
Source
822
1.21k
{
823
1.21k
#ifdef WOLFSSL_USE_ALIGN
824
1.21k
    c[0] = (byte)((wc_u32 >> 24) & 0xff);
825
1.21k
    c[1] = (byte)((wc_u32 >> 16) & 0xff);
826
1.21k
    c[2] = (byte)((wc_u32 >>  8) & 0xff);
827
1.21k
    c[3] =  (byte)(wc_u32        & 0xff);
828
#elif defined(LITTLE_ENDIAN_ORDER)
829
    *(word32*)c = ByteReverseWord32(wc_u32);
830
#else
831
    *(word32*)c = wc_u32;
832
#endif
833
1.21k
}
Unexecuted instantiation: wc_mlkem.c:c32toa
Unexecuted instantiation: wc_mlkem_poly.c:c32toa
internal.c:c32toa
Line
Count
Source
822
419k
{
823
419k
#ifdef WOLFSSL_USE_ALIGN
824
419k
    c[0] = (byte)((wc_u32 >> 24) & 0xff);
825
419k
    c[1] = (byte)((wc_u32 >> 16) & 0xff);
826
419k
    c[2] = (byte)((wc_u32 >>  8) & 0xff);
827
419k
    c[3] =  (byte)(wc_u32        & 0xff);
828
#elif defined(LITTLE_ENDIAN_ORDER)
829
    *(word32*)c = ByteReverseWord32(wc_u32);
830
#else
831
    *(word32*)c = wc_u32;
832
#endif
833
419k
}
Unexecuted instantiation: keys.c:c32toa
834
#endif
835
836
#ifndef WOLFSSL_NO_INT_DECODE
837
/* convert a 24 bit integer into a 32 bit one */
838
WC_MISC_STATIC WC_INLINE void c24to32(const word24 wc_u24, word32* wc_u32)
839
264k
{
840
264k
    *wc_u32 = ((word32)wc_u24[0] << 16) |
841
264k
              ((word32)wc_u24[1] << 8) |
842
264k
               (word32)wc_u24[2];
843
264k
}
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
839
264k
{
840
264k
    *wc_u32 = ((word32)wc_u24[0] << 16) |
841
264k
              ((word32)wc_u24[1] << 8) |
842
264k
               (word32)wc_u24[2];
843
264k
}
Unexecuted instantiation: keys.c:c24to32
844
845
846
/* convert opaque to 24 bit integer */
847
WC_MISC_STATIC WC_INLINE void ato24(const byte* c, word32* wc_u24)
848
0
{
849
0
    *wc_u24 = ((word32)c[0] << 16) | ((word32)c[1] << 8) | c[2];
850
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
851
852
/* convert opaque to 16 bit integer */
853
WC_MISC_STATIC WC_INLINE void ato16(const byte* c, word16* wc_u16)
854
701k
{
855
701k
    *wc_u16 = (word16) ((c[0] << 8) | (c[1]));
856
701k
}
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
854
102k
{
855
102k
    *wc_u16 = (word16) ((c[0] << 8) | (c[1]));
856
102k
}
tls13.c:ato16
Line
Count
Source
854
3.63k
{
855
3.63k
    *wc_u16 = (word16) ((c[0] << 8) | (c[1]));
856
3.63k
}
Unexecuted instantiation: wc_mlkem.c:ato16
Unexecuted instantiation: wc_mlkem_poly.c:ato16
internal.c:ato16
Line
Count
Source
854
595k
{
855
595k
    *wc_u16 = (word16) ((c[0] << 8) | (c[1]));
856
595k
}
Unexecuted instantiation: keys.c:ato16
857
858
/* convert opaque to 32 bit integer */
859
WC_MISC_STATIC WC_INLINE void ato32(const byte* c, word32* wc_u32)
860
0
{
861
0
#ifdef WOLFSSL_USE_ALIGN
862
0
    *wc_u32 = ((word32)c[0] << 24) |
863
0
              ((word32)c[1] << 16) |
864
0
              ((word32)c[2] << 8) |
865
0
               (word32)c[3];
866
0
#elif defined(LITTLE_ENDIAN_ORDER)
867
0
    *wc_u32 = ByteReverseWord32(*(word32*)c);
868
0
#else
869
0
    *wc_u32 = *(word32*)c;
870
0
#endif
871
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
872
873
/* convert opaque to 32 bit integer. Interpret as little endian. */
874
WC_MISC_STATIC WC_INLINE void ato32le(const byte* c, word32* wc_u32)
875
0
{
876
0
    *wc_u32 =  (word32)c[0] |
877
0
              ((word32)c[1] << 8) |
878
0
              ((word32)c[2] << 16) |
879
0
              ((word32)c[3] << 24);
880
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
881
882
883
WC_MISC_STATIC WC_INLINE word32 btoi(byte b)
884
147k
{
885
147k
    return (word32)(b - 0x30);
886
147k
}
Unexecuted instantiation: aes.c:btoi
Unexecuted instantiation: arc4.c:btoi
asn.c:btoi
Line
Count
Source
884
147k
{
885
147k
    return (word32)(b - 0x30);
886
147k
}
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
887
#endif
888
889
WC_MISC_STATIC WC_INLINE signed char HexCharToByte(char ch)
890
0
{
891
0
    signed char ret = (signed char)ch;
892
0
    if (ret >= '0' && ret <= '9')
893
0
        ret = (signed char)(ret - '0');
894
0
    else if (ret >= 'A' && ret <= 'F')
895
0
        ret = (signed char)(ret - ('A' - 10));
896
0
    else if (ret >= 'a' && ret <= 'f')
897
0
        ret = (signed char)(ret - ('a' - 10));
898
0
    else
899
0
        ret = -1; /* error case - return code must be signed */
900
0
    return ret;
901
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
902
903
WC_MISC_STATIC WC_INLINE char ByteToHex(byte in)
904
0
{
905
0
    static ALIGN64 const char kHexChar[] = {
906
0
        '0', '1', '2', '3', '4', '5', '6', '7',
907
0
        '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
908
0
    };
909
0
    return (char)(kHexChar[in & 0xF]);
910
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
911
912
WC_MISC_STATIC WC_INLINE int ByteToHexStr(byte in, char* out)
913
0
{
914
0
    if (out == NULL)
915
0
        return -1;
916
0
917
0
    out[0] = ByteToHex((byte)(in >> 4));
918
0
    out[1] = ByteToHex((byte)(in & 0xf));
919
0
    return 0;
920
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
921
922
WC_MISC_STATIC WC_INLINE int CharIsWhiteSpace(char ch)
923
0
{
924
0
#ifndef WOLFSSL_NO_CT_OPS
925
0
    return (ctMaskEq(ch, ' ') |
926
0
            ctMaskEq(ch, '\t') |
927
0
            ctMaskEq(ch, '\n')) & 1;
928
#else /* WOLFSSL_NO_CT_OPS */
929
    switch (ch) {
930
        case ' ':
931
        case '\t':
932
        case '\n':
933
            return 1;
934
        default:
935
            return 0;
936
    }
937
#endif /* WOLFSSL_NO_CT_OPS */
938
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
939
940
#if defined(WOLFSSL_W64_WRAPPER)
941
#if defined(WORD64_AVAILABLE) && !defined(WOLFSSL_W64_WRAPPER_TEST)
942
0
WC_MISC_STATIC WC_INLINE void w64Increment(w64wrapper *n) {
943
0
    n->n++;
944
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
945
946
0
WC_MISC_STATIC WC_INLINE void w64Decrement(w64wrapper *n) {
947
0
    n->n--;
948
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
949
950
0
WC_MISC_STATIC WC_INLINE byte w64Equal(w64wrapper a, w64wrapper b) {
951
0
    return (a.n == b.n);
952
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
953
954
0
WC_MISC_STATIC WC_INLINE word32 w64GetLow32(w64wrapper n) {
955
0
    return (word32)n.n;
956
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
957
958
0
WC_MISC_STATIC WC_INLINE word32 w64GetHigh32(w64wrapper n) {
959
0
    return (word32)(n.n >> 32);
960
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: internal.c:w64GetHigh32
Unexecuted instantiation: keys.c:w64GetHigh32
961
962
0
WC_MISC_STATIC WC_INLINE void w64SetLow32(w64wrapper *n, word32 low) {
963
0
    n->n = (n->n & (~(word64)(0xffffffff))) | low;
964
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
965
966
WC_MISC_STATIC WC_INLINE w64wrapper w64Add32(w64wrapper a, word32 b, byte *wrap)
967
0
{
968
0
    a.n += b;
969
0
    if (a.n < b && wrap != NULL)
970
0
        *wrap = 1;
971
0
972
0
    return a;
973
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
974
975
WC_MISC_STATIC WC_INLINE w64wrapper w64Add(w64wrapper a, w64wrapper b,
976
    byte *wrap)
977
0
{
978
0
    a.n += b.n;
979
0
    if (a.n < b.n && wrap != NULL)
980
0
        *wrap = 1;
981
0
982
0
    return a;
983
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
984
985
WC_MISC_STATIC WC_INLINE w64wrapper w64Sub32(w64wrapper a, word32 b, byte *wrap)
986
0
{
987
0
    if (a.n < b && wrap != NULL)
988
0
        *wrap = 1;
989
0
    a.n = a.n - b;
990
0
    return a;
991
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
992
993
WC_MISC_STATIC WC_INLINE byte w64GT(w64wrapper a, w64wrapper b)
994
0
{
995
0
    return a.n > b.n;
996
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
997
998
WC_MISC_STATIC WC_INLINE byte w64IsZero(w64wrapper a)
999
0
{
1000
0
    return a.n == 0;
1001
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
1002
1003
WC_MISC_STATIC WC_INLINE void c64toa(const w64wrapper *a, byte *out)
1004
0
{
1005
0
#ifdef BIG_ENDIAN_ORDER
1006
0
    XMEMCPY(out, &a->n, sizeof(a->n));
1007
0
#else
1008
0
    word64 _out;
1009
0
    _out = ByteReverseWord64(a->n);
1010
0
    XMEMCPY(out, &_out, sizeof(_out));
1011
0
#endif /* BIG_ENDIAN_ORDER */
1012
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
1013
1014
WC_MISC_STATIC WC_INLINE void ato64(const byte *in, w64wrapper *w64)
1015
0
{
1016
0
#ifdef BIG_ENDIAN_ORDER
1017
0
    XMEMCPY(&w64->n, in, sizeof(w64->n));
1018
0
#else
1019
0
    union {
1020
0
        word64 w;
1021
0
        byte b[sizeof(word64)];
1022
0
    } _in;
1023
0
    XMEMCPY(_in.b, in, sizeof(_in));
1024
0
    w64->n = ByteReverseWord64(_in.w);
1025
0
#endif /* BIG_ENDIAN_ORDER */
1026
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
1027
1028
WC_MISC_STATIC WC_INLINE w64wrapper w64From32(word32 hi, word32 lo)
1029
131k
{
1030
131k
    w64wrapper ret;
1031
131k
    ret.n = ((word64)hi << 32) | lo;
1032
131k
    return ret;
1033
131k
}
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
1029
131k
{
1030
131k
    w64wrapper ret;
1031
131k
    ret.n = ((word64)hi << 32) | lo;
1032
131k
    return ret;
1033
131k
}
Unexecuted instantiation: keys.c:w64From32
1034
1035
WC_MISC_STATIC WC_INLINE byte w64GTE(w64wrapper a, w64wrapper b)
1036
34.6k
{
1037
34.6k
    return a.n >= b.n;
1038
34.6k
}
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
1036
34.6k
{
1037
34.6k
    return a.n >= b.n;
1038
34.6k
}
Unexecuted instantiation: keys.c:w64GTE
1039
1040
WC_MISC_STATIC WC_INLINE byte w64LT(w64wrapper a, w64wrapper b)
1041
0
{
1042
0
    return a.n < b.n;
1043
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
1044
1045
WC_MISC_STATIC WC_INLINE w64wrapper w64Sub(w64wrapper a, w64wrapper b)
1046
0
{
1047
0
    a.n -= b.n;
1048
0
    return a;
1049
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
1050
1051
WC_MISC_STATIC WC_INLINE void w64Zero(w64wrapper *a)
1052
0
{
1053
0
    a->n = 0;
1054
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
1055
1056
WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftRight(w64wrapper a, int shift)
1057
0
{
1058
0
    a.n >>= shift;
1059
0
    return a;
1060
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
1061
1062
WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftLeft(w64wrapper a, int shift)
1063
0
{
1064
0
    a.n <<= shift;
1065
0
    return a;
1066
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
1067
1068
WC_MISC_STATIC WC_INLINE w64wrapper w64Mul(word32 a, word32 b)
1069
0
{
1070
0
    w64wrapper ret;
1071
0
    ret.n = (word64)a * (word64)b;
1072
0
    return ret;
1073
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
1074
1075
#else
1076
1077
WC_MISC_STATIC WC_INLINE void w64Increment(w64wrapper *n)
1078
{
1079
    n->n[1]++;
1080
    if (n->n[1] == 0)
1081
        n->n[0]++;
1082
}
1083
1084
WC_MISC_STATIC WC_INLINE void w64Decrement(w64wrapper *n) {
1085
    if (n->n[1] == 0)
1086
        n->n[0]--;
1087
    n->n[1]--;
1088
}
1089
1090
WC_MISC_STATIC WC_INLINE byte w64Equal(w64wrapper a, w64wrapper b)
1091
{
1092
    return (a.n[0] == b.n[0] && a.n[1] == b.n[1]);
1093
}
1094
1095
WC_MISC_STATIC WC_INLINE word32 w64GetLow32(w64wrapper n) {
1096
    return n.n[1];
1097
}
1098
1099
WC_MISC_STATIC WC_INLINE word32 w64GetHigh32(w64wrapper n) {
1100
    return n.n[0];
1101
}
1102
1103
WC_MISC_STATIC WC_INLINE void w64SetLow32(w64wrapper *n, word32 low)
1104
{
1105
    n->n[1] = low;
1106
}
1107
1108
WC_MISC_STATIC WC_INLINE w64wrapper w64Add32(w64wrapper a, word32 b, byte *wrap)
1109
{
1110
    a.n[1] += b;
1111
    if (a.n[1] < b) {
1112
        a.n[0]++;
1113
        if (wrap != NULL && a.n[0] == 0)
1114
                *wrap = 1;
1115
    }
1116
1117
    return a;
1118
}
1119
1120
WC_MISC_STATIC WC_INLINE w64wrapper w64Add(w64wrapper a, w64wrapper b,
1121
    byte *wrap)
1122
{
1123
    a.n[1] += b.n[1];
1124
    if (a.n[1] < b.n[1]) {
1125
        a.n[0]++;
1126
        if (wrap != NULL && a.n[0] == 0)
1127
                *wrap = 1;
1128
    }
1129
1130
    a.n[0] += b.n[0];
1131
    if (wrap != NULL && a.n[0] < b.n[0]) {
1132
        *wrap = 1;
1133
    }
1134
1135
    return a;
1136
}
1137
1138
WC_MISC_STATIC WC_INLINE w64wrapper w64Sub32(w64wrapper a, word32 b, byte *wrap)
1139
{
1140
    byte _underflow = 0;
1141
    if (a.n[1] < b)
1142
        _underflow = 1;
1143
1144
    a.n[1] -= b;
1145
    if (_underflow) {
1146
        if (a.n[0] == 0 && wrap != NULL)
1147
            *wrap = 1;
1148
        a.n[0]--;
1149
    }
1150
1151
    return a;
1152
}
1153
1154
WC_MISC_STATIC WC_INLINE w64wrapper w64Sub(w64wrapper a, w64wrapper b)
1155
{
1156
    if (a.n[1] < b.n[1])
1157
        a.n[0]--;
1158
    a.n[1] -= b.n[1];
1159
    a.n[0] -= b.n[0];
1160
    return a;
1161
}
1162
1163
WC_MISC_STATIC WC_INLINE void w64Zero(w64wrapper *a)
1164
{
1165
    a->n[0] = a->n[1] = 0;
1166
}
1167
1168
WC_MISC_STATIC WC_INLINE byte w64GT(w64wrapper a, w64wrapper b)
1169
{
1170
    if (a.n[0] > b.n[0])
1171
        return 1;
1172
    if (a.n[0] == b.n[0])
1173
        return a.n[1] > b.n[1];
1174
    return 0;
1175
}
1176
1177
WC_MISC_STATIC WC_INLINE byte w64GTE(w64wrapper a, w64wrapper b)
1178
{
1179
    if (a.n[0] > b.n[0])
1180
        return 1;
1181
    if (a.n[0] == b.n[0])
1182
        return a.n[1] >= b.n[1];
1183
    return 0;
1184
}
1185
1186
WC_MISC_STATIC WC_INLINE byte w64IsZero(w64wrapper a)
1187
{
1188
    return a.n[0] == 0 && a.n[1] == 0;
1189
}
1190
1191
WC_MISC_STATIC WC_INLINE void c64toa(const w64wrapper *a, byte *out)
1192
{
1193
#ifdef BIG_ENDIAN_ORDER
1194
    word32 *_out = (word32*)(out);
1195
    _out[0] = a->n[0];
1196
    _out[1] = a->n[1];
1197
#else
1198
    c32toa(a->n[0], out);
1199
    c32toa(a->n[1], out + 4);
1200
#endif /* BIG_ENDIAN_ORDER */
1201
}
1202
1203
WC_MISC_STATIC WC_INLINE void ato64(const byte *in, w64wrapper *w64)
1204
{
1205
#ifdef BIG_ENDIAN_ORDER
1206
    const word32 *_in = (const word32*)(in);
1207
    w64->n[0] = *_in;
1208
    w64->n[1] = *(_in + 1);
1209
#else
1210
    ato32(in, &w64->n[0]);
1211
    ato32(in + 4, &w64->n[1]);
1212
#endif /* BIG_ENDIAN_ORDER */
1213
}
1214
1215
WC_MISC_STATIC WC_INLINE w64wrapper w64From32(word32 hi, word32 lo)
1216
{
1217
    w64wrapper w64;
1218
    w64.n[0] = hi;
1219
    w64.n[1] = lo;
1220
    return w64;
1221
}
1222
1223
WC_MISC_STATIC WC_INLINE byte w64LT(w64wrapper a, w64wrapper b)
1224
{
1225
    if (a.n[0] < b.n[0])
1226
        return 1;
1227
    if (a.n[0] == b.n[0])
1228
        return a.n[1] < b.n[1];
1229
1230
    return 0;
1231
}
1232
1233
WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftRight(w64wrapper a, int shift)
1234
{
1235
     if (shift < 32) {
1236
         a.n[1] = (a.n[1] >> shift) | (a.n[0] << (32 - shift));
1237
         a.n[0] >>= shift;
1238
     }
1239
     else {
1240
         a.n[1] = a.n[0] >> (shift - 32);
1241
         a.n[0] = 0;
1242
     }
1243
     return a;
1244
}
1245
WC_MISC_STATIC WC_INLINE w64wrapper w64ShiftLeft(w64wrapper a, int shift)
1246
{
1247
     if (shift < 32) {
1248
         a.n[0] = (a.n[0] << shift) | (a.n[1] >> (32 - shift));
1249
         a.n[1] <<= shift;
1250
     }
1251
     else {
1252
         a.n[0] = a.n[1] << (shift - 32);
1253
         a.n[1] = 0;
1254
     }
1255
     return a;
1256
}
1257
1258
WC_MISC_STATIC WC_INLINE w64wrapper w64Mul(word32 a, word32 b)
1259
{
1260
    w64wrapper ret;
1261
    word16 ltlA, ltlB, ltlC, ltlD;
1262
    word32 bigA, bigB, bigC, bigD;
1263
1264
    ltlA = a & 0xFFFF;
1265
    ltlB = (a >> 16) & 0xFFFF;
1266
    ltlC = b & 0xFFFF;
1267
    ltlD = (b >> 16) & 0xFFFF;
1268
1269
    bigA = (word32)ltlA * (word32)ltlC;
1270
    bigC = (word32)ltlB * (word32)ltlC;
1271
    bigD = (word32)ltlA * (word32)ltlD;
1272
    bigB = (word32)ltlB * (word32)ltlD;
1273
1274
    ret = w64From32(0, bigB);
1275
    ret = w64ShiftLeft(ret, 16);
1276
    ret = w64Add32(ret, bigD, NULL);
1277
    ret = w64Add32(ret, bigC, NULL);
1278
    ret = w64ShiftLeft(ret, 16);
1279
    return w64Add32(ret, bigA, NULL);
1280
}
1281
1282
#endif /* WORD64_AVAILABLE && !WOLFSSL_W64_WRAPPER_TEST */
1283
#endif /* WOLFSSL_W64_WRAPPER */
1284
1285
#if defined(HAVE_SESSION_TICKET) || !defined(NO_CERTS) || \
1286
    !defined(NO_SESSION_CACHE)
1287
/* Make a word from the front of random hash */
1288
WC_MISC_STATIC WC_INLINE word32 MakeWordFromHash(const byte* hashID)
1289
6.27k
{
1290
6.27k
    return ((word32)hashID[0] << 24) | ((word32)hashID[1] << 16) |
1291
6.27k
           ((word32)hashID[2] <<  8) |  (word32)hashID[3];
1292
6.27k
}
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
1289
6.27k
{
1290
6.27k
    return ((word32)hashID[0] << 24) | ((word32)hashID[1] << 16) |
1291
6.27k
           ((word32)hashID[2] <<  8) |  (word32)hashID[3];
1292
6.27k
}
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
1293
#endif /* HAVE_SESSION_TICKET || !NO_CERTS || !NO_SESSION_CACHE */
1294
1295
1296
#if !defined(WOLFCRYPT_ONLY) && !defined(NO_HASH_WRAPPER) && \
1297
    (!defined(NO_SESSION_CACHE) || defined(HAVE_SESSION_TICKET))
1298
1299
#include <wolfssl/wolfcrypt/hash.h>
1300
1301
/* some session IDs aren't random after all, let's make them random */
1302
WC_MISC_STATIC WC_INLINE word32 HashObject(const byte* o, word32 len,
1303
                                           int* error)
1304
813
{
1305
813
    byte digest[WC_MAX_DIGEST_SIZE];
1306
1307
813
#ifndef NO_MD5
1308
813
    *error =  wc_Md5Hash(o, len, digest);
1309
#elif !defined(NO_SHA)
1310
    *error =  wc_ShaHash(o, len, digest);
1311
#elif !defined(NO_SHA256)
1312
    *error =  wc_Sha256Hash(o, len, digest);
1313
#else
1314
    #error "We need a digest to hash the session IDs"
1315
#endif
1316
1317
813
    return *error == 0 ? MakeWordFromHash(digest) : 0; /* 0 on failure */
1318
813
}
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
1304
813
{
1305
813
    byte digest[WC_MAX_DIGEST_SIZE];
1306
1307
813
#ifndef NO_MD5
1308
813
    *error =  wc_Md5Hash(o, len, digest);
1309
#elif !defined(NO_SHA)
1310
    *error =  wc_ShaHash(o, len, digest);
1311
#elif !defined(NO_SHA256)
1312
    *error =  wc_Sha256Hash(o, len, digest);
1313
#else
1314
    #error "We need a digest to hash the session IDs"
1315
#endif
1316
1317
813
    return *error == 0 ? MakeWordFromHash(digest) : 0; /* 0 on failure */
1318
813
}
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
1319
#endif /* WOLFCRYPT_ONLY && !NO_HASH_WRAPPER &&
1320
        * (!NO_SESSION_CACHE || HAVE_SESSION_TICKET) */
1321
1322
WC_MISC_STATIC WC_INLINE char* CopyString(const char* src, int srcLen,
1323
6.53k
        void* heap, int type) {
1324
6.53k
    char* dst = NULL;
1325
1326
6.53k
    if (src == NULL)
1327
4.32k
        return NULL;
1328
1329
2.21k
    if (srcLen <= 0)
1330
801
        srcLen = (int)XSTRLEN(src);
1331
1332
2.21k
    dst = (char*)XMALLOC((size_t)srcLen + 1, heap, type);
1333
2.21k
    if (dst != NULL) {
1334
2.21k
        XMEMCPY(dst, src, (size_t)srcLen);
1335
2.21k
        dst[srcLen] = '\0';
1336
2.21k
    }
1337
1338
2.21k
    return dst;
1339
6.53k
}
Unexecuted instantiation: aes.c:CopyString
Unexecuted instantiation: arc4.c:CopyString
asn.c:CopyString
Line
Count
Source
1323
6.53k
        void* heap, int type) {
1324
6.53k
    char* dst = NULL;
1325
1326
6.53k
    if (src == NULL)
1327
4.32k
        return NULL;
1328
1329
2.21k
    if (srcLen <= 0)
1330
801
        srcLen = (int)XSTRLEN(src);
1331
1332
2.21k
    dst = (char*)XMALLOC((size_t)srcLen + 1, heap, type);
1333
2.21k
    if (dst != NULL) {
1334
2.21k
        XMEMCPY(dst, src, (size_t)srcLen);
1335
2.21k
        dst[srcLen] = '\0';
1336
2.21k
    }
1337
1338
2.21k
    return dst;
1339
6.53k
}
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
1340
1341
#endif /* !WOLFSSL_MISC_INCLUDED && !NO_INLINE */
1342
1343
#endif /* WOLF_CRYPT_MISC_C */