From 035928456e839bc369a8e1a61b882c78d6c32c59 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Tue, 19 Nov 2024 20:48:08 +0100 Subject: [PATCH] fixed possible WHY2_v4 security problem --- src/core/lib/utils/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/utils/misc.c b/src/core/lib/utils/misc.c index 253e32e..77d87c1 100644 --- a/src/core/lib/utils/misc.c +++ b/src/core/lib/utils/misc.c @@ -306,7 +306,7 @@ void why2_generate_text_key_chain(char *key, int *text_key_chain, int text_key_c case WHY2_v4: number_buffer_2 = text_key_chain_size - (i + 1); - number_buffer_3 = (why2_get_key_length() ^ text_key_chain_size) >> (number_buffer & (i < text_key_chain_size)); //gl fucker + number_buffer_3 = (why2_get_key_length() ^ text_key_chain_size) >> (((number_buffer ^ number_buffer_2) % 2) & (i < text_key_chain_size)); //gl fucker break; }