From 2c97077e00c2fa6920f36e1481159f980b3e744a Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 21 Nov 2024 05:05:11 +0000 Subject: [PATCH] Add warning about use of LTO in verify.c Signed-off-by: Hanno Becker --- mlkem/verify.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mlkem/verify.c b/mlkem/verify.c index b6b51fddb..b66ca429f 100644 --- a/mlkem/verify.c +++ b/mlkem/verify.c @@ -3,6 +3,17 @@ #include #include +// +// WARNING: +// +// The functions in this compilation unit may be susceptible to +// compiler-induced variable-time code when inlined into their call-sites. +// The purpose of having a separate compilation here is to prevent +// such potentially insecure inlining. +// +// You MUST NOT compile this file using link time optimization. +// + int verify(const uint8_t *a, const uint8_t *b, const size_t len) { uint8_t r = 0; uint64_t u;