mirror of
https://github.com/armel/uv-k1-k5v3-firmware-custom.git
synced 2026-10-02 03:15:37 +00:00
Remove mysterious AES_Encrypt call
This commit is contained in:
1 parent
e008313170
commit
7c53df8d2b
1 file changed
+17
-11
+17
-11
@@ -42,6 +42,7 @@
|
||||
#include "sram-overlay.h"
|
||||
#endif
|
||||
|
||||
#define UNUSED(x) (void)(x)
|
||||
|
||||
#define DMA_INDEX(x, y) (((x) + (y)) % sizeof(UART_DMA_Buffer))
|
||||
|
||||
@@ -211,20 +212,25 @@ static void SendVersion(void)
|
||||
|
||||
static bool IsBadChallenge(const uint32_t *pKey, const uint32_t *pIn, const uint32_t *pResponse)
|
||||
{
|
||||
unsigned int i;
|
||||
uint32_t IV[4];
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
UNUSED(pKey);
|
||||
UNUSED(pIn);
|
||||
UNUSED(pResponse);
|
||||
#else
|
||||
unsigned int i;
|
||||
uint32_t IV[4];
|
||||
|
||||
IV[0] = 0;
|
||||
IV[1] = 0;
|
||||
IV[2] = 0;
|
||||
IV[3] = 0;
|
||||
IV[0] = 0;
|
||||
IV[1] = 0;
|
||||
IV[2] = 0;
|
||||
IV[3] = 0;
|
||||
|
||||
AES_Encrypt(pKey, IV, pIn, IV, true);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
if (IV[i] != pResponse[i])
|
||||
return true;
|
||||
AES_Encrypt(pKey, IV, pIn, IV, true);
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
if (IV[i] != pResponse[i])
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user