From 6da3dc379897d3ff991faa09449fa2ee077d3bf6 Mon Sep 17 00:00:00 2001 From: "Aaron Tulino (Aaronjamt)" Date: Tue, 23 Dec 2025 11:02:09 -0700 Subject: [PATCH] [hf seos] Minor cleanup --- client/src/cmdhfseos.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/cmdhfseos.c b/client/src/cmdhfseos.c index 4c32c8e1c..26118d972 100644 --- a/client/src/cmdhfseos.c +++ b/client/src/cmdhfseos.c @@ -511,8 +511,8 @@ static void create_mutual_auth_key(uint8_t *KEYIFD, uint8_t *KEYICC, uint8_t *RN // PrintAndLogEx(SUCCESS, "RandomIFD........................ " _YELLOW_("%s"), sprint_hex_inrow(RNDIFD, 8)); // PrintAndLogEx(SUCCESS, "hash Input....................... " _YELLOW_("%s"), sprint_hex_inrow(hash_in,ARRAYLEN(hash_in))); - uint8_t output[128]; // Buffer to store the two 32-byte keys - uint8_t hashedOutput[128]; + uint8_t output[32]; // Buffer to store the two 16-byte keys + uint8_t hashedOutput[32]; uint32_t counter = 1; // Generate the first key @@ -526,7 +526,7 @@ static void create_mutual_auth_key(uint8_t *KEYIFD, uint8_t *KEYICC, uint8_t *RN counter++; set_counter_big_endian(hash_in, counter); sha1hash(hash_in, sizeof(hash_in), hashedOutput); - memcpy(output + 20, hashedOutput, 20); + memcpy(output + 20, hashedOutput, 12); //PrintAndLogEx(SUCCESS, "key_out_temp..................... " _YELLOW_("%s"), sprint_hex_inrow(hash_in,ARRAYLEN(hash_in))); } else if (HashingAlgorithm == 0x07) { sha256hash(hash_in, sizeof(hash_in), hashedOutput);