mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
style
This commit is contained in:
parent
3a18fe6ea1
commit
fb0eb35710
5 changed files with 89 additions and 89 deletions
|
@ -2854,7 +2854,7 @@ out:
|
||||||
PrintAndLogEx(INFO, "found keys:");
|
PrintAndLogEx(INFO, "found keys:");
|
||||||
|
|
||||||
//print keys
|
//print keys
|
||||||
if ( SectorsCnt == 1)
|
if (SectorsCnt == 1)
|
||||||
printKeyTableEx(SectorsCnt, e_sector, GetSectorFromBlockNo(blockNo));
|
printKeyTableEx(SectorsCnt, e_sector, GetSectorFromBlockNo(blockNo));
|
||||||
else
|
else
|
||||||
printKeyTable(SectorsCnt, e_sector);
|
printKeyTable(SectorsCnt, e_sector);
|
||||||
|
|
|
@ -324,7 +324,7 @@ __attribute__((force_align_arg_pointer))
|
||||||
*nested_worker_thread(void *arg) {
|
*nested_worker_thread(void *arg) {
|
||||||
struct Crypto1State *p1;
|
struct Crypto1State *p1;
|
||||||
StateList_t *statelist = arg;
|
StateList_t *statelist = arg;
|
||||||
statelist->head.slhead = lfsr_recovery32(statelist->ks1, statelist->nt ^ statelist->uid);
|
statelist->head.slhead = lfsr_recovery32(statelist->ks1, statelist->nt_enc ^ statelist->uid);
|
||||||
|
|
||||||
for (p1 = statelist->head.slhead; * (uint64_t *)p1 != 0; p1++) {};
|
for (p1 = statelist->head.slhead; * (uint64_t *)p1 != 0; p1++) {};
|
||||||
|
|
||||||
|
@ -391,10 +391,10 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo,
|
||||||
statelists[i].uid = uid;
|
statelists[i].uid = uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&statelists[0].nt, package->nt_a, sizeof(package->nt_a));
|
memcpy(&statelists[0].nt_enc, package->nt_a, sizeof(package->nt_a));
|
||||||
memcpy(&statelists[0].ks1, package->ks_a, sizeof(package->ks_a));
|
memcpy(&statelists[0].ks1, package->ks_a, sizeof(package->ks_a));
|
||||||
|
|
||||||
memcpy(&statelists[1].nt, package->nt_b, sizeof(package->nt_b));
|
memcpy(&statelists[1].nt_enc, package->nt_b, sizeof(package->nt_b));
|
||||||
memcpy(&statelists[1].ks1, package->ks_b, sizeof(package->ks_b));
|
memcpy(&statelists[1].ks1, package->ks_b, sizeof(package->ks_b));
|
||||||
|
|
||||||
|
|
||||||
|
@ -422,14 +422,14 @@ int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBlockNo,
|
||||||
savestate = *p1;
|
savestate = *p1;
|
||||||
while (Compare16Bits(p1, &savestate) == 0 && p1 <= statelists[0].tail.sltail) {
|
while (Compare16Bits(p1, &savestate) == 0 && p1 <= statelists[0].tail.sltail) {
|
||||||
*p3 = *p1;
|
*p3 = *p1;
|
||||||
lfsr_rollback_word(p3, statelists[0].nt ^ statelists[0].uid, 0);
|
lfsr_rollback_word(p3, statelists[0].nt_enc ^ statelists[0].uid, 0);
|
||||||
p3++;
|
p3++;
|
||||||
p1++;
|
p1++;
|
||||||
}
|
}
|
||||||
savestate = *p2;
|
savestate = *p2;
|
||||||
while (Compare16Bits(p2, &savestate) == 0 && p2 <= statelists[1].tail.sltail) {
|
while (Compare16Bits(p2, &savestate) == 0 && p2 <= statelists[1].tail.sltail) {
|
||||||
*p4 = *p2;
|
*p4 = *p2;
|
||||||
lfsr_rollback_word(p4, statelists[1].nt ^ statelists[1].uid, 0);
|
lfsr_rollback_word(p4, statelists[1].nt_enc ^ statelists[1].uid, 0);
|
||||||
p4++;
|
p4++;
|
||||||
p2++;
|
p2++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ typedef struct {
|
||||||
uint32_t uid;
|
uint32_t uid;
|
||||||
uint32_t blockNo;
|
uint32_t blockNo;
|
||||||
uint32_t keyType;
|
uint32_t keyType;
|
||||||
uint32_t nt;
|
uint32_t nt_enc;
|
||||||
uint32_t ks1;
|
uint32_t ks1;
|
||||||
} StateList_t;
|
} StateList_t;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue