mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
coverity: separate crypto1 fcts ARM<>host into create/destroy and init/deinit
This commit is contained in:
parent
5fcb5f0ca5
commit
39fd6b1910
8 changed files with 49 additions and 43 deletions
|
@ -571,7 +571,7 @@ void Mifare1ksim(uint16_t flags, uint8_t exitAfterNReads, uint8_t *datain, uint1
|
|||
EmSendPrecompiledCmd(&responses[ATQA]);
|
||||
|
||||
// init crypto block
|
||||
crypto1_destroy(pcs);
|
||||
crypto1_deinit(pcs);
|
||||
cardAUTHKEY = AUTHKEYNONE;
|
||||
nonce = prng_successor(selTimer, 32);
|
||||
// prepare NT for nested authentication
|
||||
|
@ -743,10 +743,10 @@ void Mifare1ksim(uint16_t flags, uint8_t exitAfterNReads, uint8_t *datain, uint1
|
|||
if (DBGLEVEL >= DBG_EXTENDED) Dbprintf("[MFEMUL_WORK] KEY %c: %012" PRIx64, (cardAUTHKEY == 0) ? 'A' : 'B', emlGetKey(cardAUTHSC, cardAUTHKEY));
|
||||
|
||||
// first authentication
|
||||
crypto1_destroy(pcs);
|
||||
crypto1_deinit(pcs);
|
||||
|
||||
// Load key into crypto
|
||||
crypto1_create(pcs, emlGetKey(cardAUTHSC, cardAUTHKEY));
|
||||
crypto1_init(pcs, emlGetKey(cardAUTHSC, cardAUTHKEY));
|
||||
|
||||
if (!encrypted_data) {
|
||||
// Receive Cmd in clear txt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue