From 888a141e70494817087b22000dcab1f6d72408ec Mon Sep 17 00:00:00 2001 From: Joe Subbiani Date: Thu, 24 Jun 2021 11:00:08 +0100 Subject: [PATCH] Undo use of BYTE_x macro The use of the BYTE_x macro in nist_kw did not seem appropriate in hind sight as it is working with a character array not an int Signed-off-by: Joe Subbiani --- library/nist_kw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/nist_kw.c b/library/nist_kw.c index c0eed674c..174a1eef1 100644 --- a/library/nist_kw.c +++ b/library/nist_kw.c @@ -149,7 +149,7 @@ static void calc_a_xor_t( unsigned char A[KW_SEMIBLOCK_LENGTH], uint64_t t ) size_t i = 0; for( i = 0; i < sizeof( t ); i++ ) { - A[i] ^= BYTE_0( t >> ( ( sizeof( t ) - 1 - i ) * 8 ) ); + A[i] ^= ( t >> ( ( sizeof( t ) - 1 - i ) * 8 ) ) & 0xff; } }