blob: 35b0ee8442feea37bac0e661cb33d7923f64970d [file] [log] [blame]
Dave Rodgman40a41d02023-05-17 11:59:56 +01001/**
2 * Constant-time functions
3 *
4 * For readability, the static inline definitions are here, and
5 * constant_time_internal.h has only the declarations.
6 *
7 * This results in duplicate declarations of the form:
8 * static inline void f() { ... }
9 * static inline void f();
10 * when constant_time_internal.h is included. This appears to behave
11 * exactly as if the declaration-without-definition was not present.
12 *
13 * Copyright The Mbed TLS Contributors
14 * SPDX-License-Identifier: Apache-2.0
15 *
16 * Licensed under the Apache License, Version 2.0 (the "License"); you may
17 * not use this file except in compliance with the License.
18 * You may obtain a copy of the License at
19 *
20 * http://www.apache.org/licenses/LICENSE-2.0
21 *
22 * Unless required by applicable law or agreed to in writing, software
23 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
24 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 * See the License for the specific language governing permissions and
26 * limitations under the License.
27 */
28
29#ifndef MBEDTLS_CONSTANT_TIME_IMPL_H
30#define MBEDTLS_CONSTANT_TIME_IMPL_H
31
32#include <stddef.h>
33
34#include "common.h"
35
36#if defined(MBEDTLS_BIGNUM_C)
37#include "mbedtls/bignum.h"
38#endif
39
Dave Rodgman205295c2023-08-01 14:10:56 +010040/* constant_time_impl.h contains all the static inline implementations,
41 * so that constant_time_internal.h is more readable.
42 *
43 * gcc generates warnings about duplicate declarations, so disable this
44 * warning.
45 */
46#ifdef __GNUC__
47 #pragma GCC diagnostic push
48 #pragma GCC diagnostic ignored "-Wredundant-decls"
49#endif
50
Dave Rodgman3d574da2023-07-31 16:54:00 +010051/* Disable asm under Memsan because it confuses Memsan and generates false errors */
52#if defined(MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN)
53#define MBEDTLS_CT_NO_ASM
54#elif defined(__has_feature)
55#if __has_feature(memory_sanitizer)
56#define MBEDTLS_CT_NO_ASM
57#endif
58#endif
Dave Rodgman40a41d02023-05-17 11:59:56 +010059
60/* armcc5 --gnu defines __GNUC__ but doesn't support GNU's extended asm */
61#if defined(MBEDTLS_HAVE_ASM) && defined(__GNUC__) && (!defined(__ARMCC_VERSION) || \
Dave Rodgman3d574da2023-07-31 16:54:00 +010062 __ARMCC_VERSION >= 6000000) && !defined(MBEDTLS_CT_NO_ASM)
Dave Rodgman40a41d02023-05-17 11:59:56 +010063#define MBEDTLS_CT_ASM
64#if (defined(__arm__) || defined(__thumb__) || defined(__thumb2__))
65#define MBEDTLS_CT_ARM_ASM
66#elif defined(__aarch64__)
67#define MBEDTLS_CT_AARCH64_ASM
68#endif
69#endif
70
71#define MBEDTLS_CT_SIZE (sizeof(mbedtls_ct_uint_t) * 8)
72
73
74/* ============================================================================
75 * Core const-time primitives
76 */
77
Dave Rodgman2894d002023-06-08 17:52:21 +010078/* Ensure that the compiler cannot know the value of x (i.e., cannot optimise
Dave Rodgman40a41d02023-05-17 11:59:56 +010079 * based on its value) after this function is called.
80 *
81 * If we are not using assembly, this will be fairly inefficient, so its use
82 * should be minimised.
83 */
Dave Rodgman2894d002023-06-08 17:52:21 +010084
85#if !defined(MBEDTLS_CT_ASM)
Dave Rodgman58c80f42023-06-12 18:19:46 +010086extern volatile mbedtls_ct_uint_t mbedtls_ct_zero;
Dave Rodgman2894d002023-06-08 17:52:21 +010087#endif
88
Dave Rodgman93cec452023-07-31 12:30:26 +010089/**
90 * \brief Ensure that a value cannot be known at compile time.
91 *
92 * \param x The value to hide from the compiler.
93 * \return The same value that was passed in, such that the compiler
94 * cannot prove its value (even for calls of the form
95 * x = mbedtls_ct_compiler_opaque(1), x will be unknown).
96 *
97 * \note This is mainly used in constructing mbedtls_ct_condition_t
98 * values and performing operations over them, to ensure that
99 * there is no way for the compiler to ever know anything about
100 * the value of an mbedtls_ct_condition_t.
101 */
Dave Rodgman40a41d02023-05-17 11:59:56 +0100102static inline mbedtls_ct_uint_t mbedtls_ct_compiler_opaque(mbedtls_ct_uint_t x)
103{
104#if defined(MBEDTLS_CT_ASM)
105 asm volatile ("" : [x] "+r" (x) :);
106 return x;
107#else
Dave Rodgman2894d002023-06-08 17:52:21 +0100108 return x ^ mbedtls_ct_zero;
Dave Rodgman40a41d02023-05-17 11:59:56 +0100109#endif
110}
111
112/* Convert a number into a condition in constant time. */
113static inline mbedtls_ct_condition_t mbedtls_ct_bool(mbedtls_ct_uint_t x)
114{
115 /*
116 * Define mask-generation code that, as far as possible, will not use branches or conditional instructions.
117 *
118 * For some platforms / type sizes, we define assembly to assure this.
119 *
120 * Otherwise, we define a plain C fallback which (in May 2023) does not get optimised into
121 * conditional instructions or branches by trunk clang, gcc, or MSVC v19.
122 */
Dave Rodgmanc9ed5de2023-05-13 12:47:02 +0100123#if defined(MBEDTLS_CT_AARCH64_ASM) && (defined(MBEDTLS_CT_SIZE_32) || defined(MBEDTLS_CT_SIZE_64))
124 mbedtls_ct_uint_t s;
125 asm volatile ("neg %x[s], %x[x] \n\t"
126 "orr %x[x], %x[s], %x[x] \n\t"
127 "asr %x[x], %x[x], 63"
128 :
129 [s] "=&r" (s),
130 [x] "+&r" (x)
131 :
132 :
133 );
134 return (mbedtls_ct_condition_t) x;
Dave Rodgmanef252792023-05-13 12:48:02 +0100135#elif defined(MBEDTLS_CT_ARM_ASM) && defined(MBEDTLS_CT_SIZE_32)
136 uint32_t s;
Dave Rodgman822c9c72023-06-12 15:38:49 +0100137 /*
138 * Selecting unified syntax is needed for gcc, and harmless on clang.
139 *
140 * This is needed because on Thumb 1, condition flags are always set, so
141 * e.g. "negs" is supported but "neg" is not (on Thumb 2, both exist).
142 *
143 * Under Thumb 1 unified syntax, only the "negs" form is accepted, and
144 * under divided syntax, only the "neg" form is accepted. clang only
145 * supports unified syntax.
146 *
147 * On Thumb 2 and Arm, both compilers are happy with the "s" suffix,
148 * although we don't actually care about setting the flags.
149 *
150 * For gcc, restore divided syntax afterwards - otherwise old versions of gcc
151 * seem to apply unified syntax globally, which breaks other asm code.
152 */
153#if !defined(__clang__)
154#define RESTORE_ASM_SYNTAX ".syntax divided \n\t"
155#else
156#define RESTORE_ASM_SYNTAX
157#endif
158
159 asm volatile (".syntax unified \n\t"
160 "negs %[s], %[x] \n\t"
161 "orrs %[x], %[x], %[s] \n\t"
162 "asrs %[x], %[x], #31 \n\t"
163 RESTORE_ASM_SYNTAX
Dave Rodgmanef252792023-05-13 12:48:02 +0100164 :
165 [s] "=&l" (s),
166 [x] "+&l" (x)
167 :
168 :
Dave Rodgman822c9c72023-06-12 15:38:49 +0100169 "cc" /* clobbers flag bits */
Dave Rodgmanef252792023-05-13 12:48:02 +0100170 );
171 return (mbedtls_ct_condition_t) x;
Dave Rodgmanc9ed5de2023-05-13 12:47:02 +0100172#else
Dave Rodgman40a41d02023-05-17 11:59:56 +0100173 const mbedtls_ct_uint_t xo = mbedtls_ct_compiler_opaque(x);
174#if defined(_MSC_VER)
175 /* MSVC has a warning about unary minus on unsigned, but this is
176 * well-defined and precisely what we want to do here */
177#pragma warning( push )
178#pragma warning( disable : 4146 )
179#endif
180 return (mbedtls_ct_condition_t) (((mbedtls_ct_int_t) ((-xo) | -(xo >> 1))) >>
181 (MBEDTLS_CT_SIZE - 1));
182#if defined(_MSC_VER)
183#pragma warning( pop )
184#endif
Dave Rodgmanc9ed5de2023-05-13 12:47:02 +0100185#endif
Dave Rodgman40a41d02023-05-17 11:59:56 +0100186}
187
188static inline mbedtls_ct_uint_t mbedtls_ct_if(mbedtls_ct_condition_t condition,
189 mbedtls_ct_uint_t if1,
190 mbedtls_ct_uint_t if0)
191{
Dave Rodgmanc9ed5de2023-05-13 12:47:02 +0100192#if defined(MBEDTLS_CT_AARCH64_ASM) && (defined(MBEDTLS_CT_SIZE_32) || defined(MBEDTLS_CT_SIZE_64))
193 asm volatile ("and %x[if1], %x[if1], %x[condition] \n\t"
194 "mvn %x[condition], %x[condition] \n\t"
195 "and %x[condition], %x[condition], %x[if0] \n\t"
196 "orr %x[condition], %x[if1], %x[condition]"
197 :
198 [condition] "+&r" (condition),
199 [if1] "+&r" (if1)
200 :
201 [if0] "r" (if0)
202 :
203 );
204 return (mbedtls_ct_uint_t) condition;
Dave Rodgmanef252792023-05-13 12:48:02 +0100205#elif defined(MBEDTLS_CT_ARM_ASM) && defined(MBEDTLS_CT_SIZE_32)
Dave Rodgman822c9c72023-06-12 15:38:49 +0100206 asm volatile (".syntax unified \n\t"
207 "ands %[if1], %[if1], %[condition] \n\t"
208 "mvns %[condition], %[condition] \n\t"
209 "ands %[condition], %[condition], %[if0] \n\t"
210 "orrs %[condition], %[if1], %[condition] \n\t"
211 RESTORE_ASM_SYNTAX
Dave Rodgmanef252792023-05-13 12:48:02 +0100212 :
213 [condition] "+&l" (condition),
214 [if1] "+&l" (if1)
215 :
216 [if0] "l" (if0)
217 :
Dave Rodgman822c9c72023-06-12 15:38:49 +0100218 "cc"
Dave Rodgmanef252792023-05-13 12:48:02 +0100219 );
220 return (mbedtls_ct_uint_t) condition;
Dave Rodgmanc9ed5de2023-05-13 12:47:02 +0100221#else
Dave Rodgman1c4eaa12023-05-17 12:22:59 +0100222 mbedtls_ct_condition_t not_cond =
Dave Rodgman40a41d02023-05-17 11:59:56 +0100223 (mbedtls_ct_condition_t) (~mbedtls_ct_compiler_opaque(condition));
Dave Rodgman1c4eaa12023-05-17 12:22:59 +0100224 return (mbedtls_ct_uint_t) ((condition & if1) | (not_cond & if0));
Dave Rodgmanc9ed5de2023-05-13 12:47:02 +0100225#endif
Dave Rodgman40a41d02023-05-17 11:59:56 +0100226}
227
Dave Rodgmanb7825ce2023-08-10 11:58:18 +0100228static inline mbedtls_ct_condition_t mbedtls_ct_uint_lt(mbedtls_ct_uint_t x, mbedtls_ct_uint_t y)
Dave Rodgman40a41d02023-05-17 11:59:56 +0100229{
Dave Rodgmanc9ed5de2023-05-13 12:47:02 +0100230#if defined(MBEDTLS_CT_AARCH64_ASM) && (defined(MBEDTLS_CT_SIZE_32) || defined(MBEDTLS_CT_SIZE_64))
231 uint64_t s1, s2;
232 asm volatile ("eor %x[s1], %x[y], %x[x] \n\t"
233 "sub %x[s2], %x[x], %x[y] \n\t"
234 "bic %x[s2], %x[s2], %[s1] \n\t"
235 "and %x[s1], %x[s1], %x[y] \n\t"
236 "orr %x[s1], %x[s2], %x[s1] \n\t"
237 "asr %x[x], %x[s1], 63"
238 : [s1] "=&r" (s1), [s2] "=&r" (s2), [x] "+r" (x)
239 : [y] "r" (y)
240 :
241 );
242 return (mbedtls_ct_condition_t) x;
Dave Rodgmanef252792023-05-13 12:48:02 +0100243#elif defined(MBEDTLS_CT_ARM_ASM) && defined(MBEDTLS_CT_SIZE_32)
244 uint32_t s1;
245 asm volatile (
Dave Rodgman822c9c72023-06-12 15:38:49 +0100246 ".syntax unified \n\t"
Dave Rodgmanef252792023-05-13 12:48:02 +0100247#if defined(__thumb__) && !defined(__thumb2__)
Dave Rodgman822c9c72023-06-12 15:38:49 +0100248 "movs %[s1], %[x] \n\t"
249 "eors %[s1], %[s1], %[y] \n\t"
Dave Rodgmanef252792023-05-13 12:48:02 +0100250#else
Dave Rodgman822c9c72023-06-12 15:38:49 +0100251 "eors %[s1], %[x], %[y] \n\t"
Dave Rodgmanef252792023-05-13 12:48:02 +0100252#endif
Dave Rodgman822c9c72023-06-12 15:38:49 +0100253 "subs %[x], %[x], %[y] \n\t"
254 "bics %[x], %[x], %[s1] \n\t"
255 "ands %[y], %[s1], %[y] \n\t"
256 "orrs %[x], %[x], %[y] \n\t"
257 "asrs %[x], %[x], #31 \n\t"
258 RESTORE_ASM_SYNTAX
Dave Rodgmanef252792023-05-13 12:48:02 +0100259 : [s1] "=&l" (s1), [x] "+&l" (x), [y] "+&l" (y)
260 :
261 :
Dave Rodgman822c9c72023-06-12 15:38:49 +0100262 "cc"
Dave Rodgmanef252792023-05-13 12:48:02 +0100263 );
264 return (mbedtls_ct_condition_t) x;
Dave Rodgmanc9ed5de2023-05-13 12:47:02 +0100265#else
Dave Rodgman40a41d02023-05-17 11:59:56 +0100266 /* Ensure that the compiler cannot optimise the following operations over x and y,
267 * even if it knows the value of x and y.
268 */
Dave Rodgman74e18eb2023-05-17 12:21:32 +0100269 const mbedtls_ct_uint_t xo = mbedtls_ct_compiler_opaque(x);
Dave Rodgman40a41d02023-05-17 11:59:56 +0100270 const mbedtls_ct_uint_t yo = mbedtls_ct_compiler_opaque(y);
271 /*
272 * Check if the most significant bits (MSB) of the operands are different.
273 * cond is true iff the MSBs differ.
274 */
Dave Rodgman74e18eb2023-05-17 12:21:32 +0100275 mbedtls_ct_condition_t cond = mbedtls_ct_bool((xo ^ yo) >> (MBEDTLS_CT_SIZE - 1));
Dave Rodgman40a41d02023-05-17 11:59:56 +0100276
277 /*
278 * If the MSB are the same then the difference x-y will be negative (and
279 * have its MSB set to 1 during conversion to unsigned) if and only if x<y.
280 *
281 * If the MSB are different, then the operand with the MSB of 1 is the
282 * bigger. (That is if y has MSB of 1, then x<y is true and it is false if
283 * the MSB of y is 0.)
284 */
285
286 // Select either y, or x - y
Dave Rodgman74e18eb2023-05-17 12:21:32 +0100287 mbedtls_ct_uint_t ret = mbedtls_ct_if(cond, yo, (mbedtls_ct_uint_t) (xo - yo));
Dave Rodgman40a41d02023-05-17 11:59:56 +0100288
289 // Extract only the MSB of ret
290 ret = ret >> (MBEDTLS_CT_SIZE - 1);
291
292 // Convert to a condition (i.e., all bits set iff non-zero)
293 return mbedtls_ct_bool(ret);
Dave Rodgmanc9ed5de2023-05-13 12:47:02 +0100294#endif
Dave Rodgman40a41d02023-05-17 11:59:56 +0100295}
296
Dave Rodgmanb7825ce2023-08-10 11:58:18 +0100297static inline mbedtls_ct_condition_t mbedtls_ct_uint_ne(mbedtls_ct_uint_t x, mbedtls_ct_uint_t y)
Dave Rodgman40a41d02023-05-17 11:59:56 +0100298{
299 /* diff = 0 if x == y, non-zero otherwise */
Dave Rodgmanfe76af22023-05-17 17:45:17 +0100300 const mbedtls_ct_uint_t diff = mbedtls_ct_compiler_opaque(x) ^ mbedtls_ct_compiler_opaque(y);
Dave Rodgman40a41d02023-05-17 11:59:56 +0100301
302 /* all ones if x != y, 0 otherwise */
303 return mbedtls_ct_bool(diff);
304}
305
306static inline unsigned char mbedtls_ct_uchar_in_range_if(unsigned char low,
307 unsigned char high,
308 unsigned char c,
309 unsigned char t)
310{
311 const unsigned char co = (const unsigned char) mbedtls_ct_compiler_opaque(c);
312 const unsigned char to = (const unsigned char) mbedtls_ct_compiler_opaque(t);
313
314 /* low_mask is: 0 if low <= c, 0x...ff if low > c */
315 unsigned low_mask = ((unsigned) co - low) >> 8;
316 /* high_mask is: 0 if c <= high, 0x...ff if c > high */
317 unsigned high_mask = ((unsigned) high - co) >> 8;
318
319 return (unsigned char) (~(low_mask | high_mask)) & to;
320}
321
322
323/* ============================================================================
324 * Everything below here is trivial wrapper functions
325 */
326
Dave Rodgman40a41d02023-05-17 11:59:56 +0100327static inline size_t mbedtls_ct_size_if(mbedtls_ct_condition_t condition,
328 size_t if1,
329 size_t if0)
330{
331 return (size_t) mbedtls_ct_if(condition, (mbedtls_ct_uint_t) if1, (mbedtls_ct_uint_t) if0);
332}
333
Dave Rodgman2b4486a2023-05-17 15:51:59 +0100334static inline unsigned mbedtls_ct_uint_if(mbedtls_ct_condition_t condition,
Dave Rodgman40a41d02023-05-17 11:59:56 +0100335 unsigned if1,
336 unsigned if0)
337{
338 return (unsigned) mbedtls_ct_if(condition, (mbedtls_ct_uint_t) if1, (mbedtls_ct_uint_t) if0);
339}
340
341#if defined(MBEDTLS_BIGNUM_C)
342
Dave Rodgman585f7f72023-05-17 17:45:33 +0100343static inline mbedtls_mpi_uint mbedtls_ct_mpi_uint_if(mbedtls_ct_condition_t condition,
344 mbedtls_mpi_uint if1,
Dave Rodgman40a41d02023-05-17 11:59:56 +0100345 mbedtls_mpi_uint if0)
346{
347 return (mbedtls_mpi_uint) mbedtls_ct_if(condition,
348 (mbedtls_ct_uint_t) if1,
349 (mbedtls_ct_uint_t) if0);
350}
351
352#endif
353
Dave Rodgman98ddc012023-08-10 12:11:31 +0100354static inline size_t mbedtls_ct_size_if_else_0(mbedtls_ct_condition_t condition, size_t if1)
Dave Rodgman40a41d02023-05-17 11:59:56 +0100355{
Dave Rodgmanfe76af22023-05-17 17:45:17 +0100356 return (size_t) (condition & if1);
Dave Rodgman40a41d02023-05-17 11:59:56 +0100357}
358
Dave Rodgman98ddc012023-08-10 12:11:31 +0100359static inline unsigned mbedtls_ct_uint_if_else_0(mbedtls_ct_condition_t condition, unsigned if1)
Dave Rodgman40a41d02023-05-17 11:59:56 +0100360{
Dave Rodgmanfe76af22023-05-17 17:45:17 +0100361 return (unsigned) (condition & if1);
Dave Rodgman40a41d02023-05-17 11:59:56 +0100362}
363
364#if defined(MBEDTLS_BIGNUM_C)
365
Dave Rodgman98ddc012023-08-10 12:11:31 +0100366static inline mbedtls_mpi_uint mbedtls_ct_mpi_uint_if_else_0(mbedtls_ct_condition_t condition,
367 mbedtls_mpi_uint if1)
Dave Rodgman40a41d02023-05-17 11:59:56 +0100368{
Dave Rodgmanfe76af22023-05-17 17:45:17 +0100369 return (mbedtls_mpi_uint) (condition & if1);
Dave Rodgman40a41d02023-05-17 11:59:56 +0100370}
371
372#endif /* MBEDTLS_BIGNUM_C */
373
Dave Rodgmanb7825ce2023-08-10 11:58:18 +0100374static inline mbedtls_ct_condition_t mbedtls_ct_uint_eq(mbedtls_ct_uint_t x,
Dave Rodgman585f7f72023-05-17 17:45:33 +0100375 mbedtls_ct_uint_t y)
376{
Dave Rodgmanb7825ce2023-08-10 11:58:18 +0100377 return ~mbedtls_ct_uint_ne(x, y);
Dave Rodgman585f7f72023-05-17 17:45:33 +0100378}
379
Dave Rodgmanb7825ce2023-08-10 11:58:18 +0100380static inline mbedtls_ct_condition_t mbedtls_ct_uint_gt(mbedtls_ct_uint_t x,
Dave Rodgman40a41d02023-05-17 11:59:56 +0100381 mbedtls_ct_uint_t y)
382{
Dave Rodgmanb7825ce2023-08-10 11:58:18 +0100383 return mbedtls_ct_uint_lt(y, x);
Dave Rodgman40a41d02023-05-17 11:59:56 +0100384}
385
Dave Rodgmanb7825ce2023-08-10 11:58:18 +0100386static inline mbedtls_ct_condition_t mbedtls_ct_uint_ge(mbedtls_ct_uint_t x,
Dave Rodgman40a41d02023-05-17 11:59:56 +0100387 mbedtls_ct_uint_t y)
388{
Dave Rodgmanb7825ce2023-08-10 11:58:18 +0100389 return ~mbedtls_ct_uint_lt(x, y);
Dave Rodgman40a41d02023-05-17 11:59:56 +0100390}
391
Dave Rodgmanb7825ce2023-08-10 11:58:18 +0100392static inline mbedtls_ct_condition_t mbedtls_ct_uint_le(mbedtls_ct_uint_t x,
Dave Rodgman40a41d02023-05-17 11:59:56 +0100393 mbedtls_ct_uint_t y)
394{
Dave Rodgmanb7825ce2023-08-10 11:58:18 +0100395 return ~mbedtls_ct_uint_gt(x, y);
Dave Rodgman40a41d02023-05-17 11:59:56 +0100396}
397
398static inline mbedtls_ct_condition_t mbedtls_ct_bool_xor(mbedtls_ct_condition_t x,
399 mbedtls_ct_condition_t y)
400{
Dave Rodgmanfe76af22023-05-17 17:45:17 +0100401 return (mbedtls_ct_condition_t) (x ^ y);
Dave Rodgman40a41d02023-05-17 11:59:56 +0100402}
403
404static inline mbedtls_ct_condition_t mbedtls_ct_bool_and(mbedtls_ct_condition_t x,
405 mbedtls_ct_condition_t y)
406{
Dave Rodgmanfe76af22023-05-17 17:45:17 +0100407 return (mbedtls_ct_condition_t) (x & y);
Dave Rodgman40a41d02023-05-17 11:59:56 +0100408}
409
410static inline mbedtls_ct_condition_t mbedtls_ct_bool_or(mbedtls_ct_condition_t x,
411 mbedtls_ct_condition_t y)
412{
Dave Rodgmanfe76af22023-05-17 17:45:17 +0100413 return (mbedtls_ct_condition_t) (x | y);
Dave Rodgman40a41d02023-05-17 11:59:56 +0100414}
415
416static inline mbedtls_ct_condition_t mbedtls_ct_bool_not(mbedtls_ct_condition_t x)
417{
Dave Rodgmanfe76af22023-05-17 17:45:17 +0100418 return (mbedtls_ct_condition_t) (~x);
Dave Rodgman40a41d02023-05-17 11:59:56 +0100419}
420
Dave Rodgman205295c2023-08-01 14:10:56 +0100421#ifdef __GNUC__
422 #pragma GCC diagnostic pop
423#endif
424
Dave Rodgman40a41d02023-05-17 11:59:56 +0100425#endif /* MBEDTLS_CONSTANT_TIME_IMPL_H */