mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
remove spurious spaces & tabs at end of lines
This commit is contained in:
parent
edc19f202a
commit
60f292b18e
249 changed files with 8481 additions and 8481 deletions
|
@ -221,7 +221,7 @@ struct Crypto1State* lfsr_recovery32(uint32_t ks2, uint32_t in)
|
|||
|
||||
// allocate memory for out of place bucket_sort
|
||||
bucket_array_t bucket;
|
||||
|
||||
|
||||
for (uint32_t i = 0; i < 2; i++) {
|
||||
for (uint32_t j = 0; j <= 0xff; j++) {
|
||||
bucket[i][j].head = malloc(sizeof(uint32_t)<<14);
|
||||
|
@ -423,7 +423,7 @@ uint32_t lfsr_rollback_word(struct Crypto1State *s, uint32_t in, int fb)
|
|||
ret |= lfsr_rollback_bit(s, BEBIT(in, 18), fb) << (18 ^ 24);
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 17), fb) << (17 ^ 24);
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 16), fb) << (16 ^ 24);
|
||||
|
||||
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 15), fb) << (15 ^ 24);
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 14), fb) << (14 ^ 24);
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 13), fb) << (13 ^ 24);
|
||||
|
@ -432,7 +432,7 @@ uint32_t lfsr_rollback_word(struct Crypto1State *s, uint32_t in, int fb)
|
|||
ret |= lfsr_rollback_bit(s, BEBIT(in, 10), fb) << (10 ^ 24);
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 9), fb) << (9 ^ 24);
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 8), fb) << (8 ^ 24);
|
||||
|
||||
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 7), fb) << (7 ^ 24);
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 6), fb) << (6 ^ 24);
|
||||
ret |= lfsr_rollback_bit(s, BEBIT(in, 5), fb) << (5 ^ 24);
|
||||
|
@ -482,7 +482,7 @@ uint32_t *lfsr_prefix_ks(uint8_t ks[8], int isodd)
|
|||
{
|
||||
uint32_t *candidates = malloc(4 << 10);
|
||||
if(!candidates) return 0;
|
||||
|
||||
|
||||
uint32_t c, entry;
|
||||
int size = 0, i, good;
|
||||
|
||||
|
@ -530,7 +530,7 @@ static struct Crypto1State* check_pfx_parity(uint32_t prefix, uint32_t rresp, ui
|
|||
}
|
||||
|
||||
return sl + good;
|
||||
}
|
||||
}
|
||||
|
||||
/** lfsr_common_prefix
|
||||
* Implentation of the common prefix attack.
|
||||
|
|
|
@ -44,7 +44,7 @@ uint32_t lfsr_rollback_word(struct Crypto1State* s, uint32_t in, int fb);
|
|||
int nonce_distance(uint32_t from, uint32_t to);
|
||||
#define SWAPENDIAN(x)\
|
||||
(x = (x >> 8 & 0xff00ff) | (x & 0xff00ff) << 8, x = x >> 16 | x << 16)
|
||||
|
||||
|
||||
#define FOREACH_VALID_NONCE(N, FILTER, FSIZE)\
|
||||
uint32_t __n = 0,__M = 0, N = 0;\
|
||||
int __i;\
|
||||
|
@ -54,7 +54,7 @@ int nonce_distance(uint32_t from, uint32_t to);
|
|||
break;\
|
||||
else if(__i)\
|
||||
__M = prng_successor(__M, (__i == 7) ? 48 : 8);\
|
||||
else
|
||||
else
|
||||
|
||||
#define LF_POLY_ODD (0x29CE5C)
|
||||
#define LF_POLY_EVEN (0x870804)
|
||||
|
|
|
@ -25,8 +25,8 @@ struct Crypto1State * crypto1_create(uint64_t key)
|
|||
struct Crypto1State *s = malloc(sizeof(*s));
|
||||
if ( !s ) return NULL;
|
||||
|
||||
s->odd = s->even = 0;
|
||||
|
||||
s->odd = s->even = 0;
|
||||
|
||||
int i;
|
||||
//for(i = 47;s && i > 0; i -= 2) {
|
||||
for(i = 47; i > 0; i -= 2) {
|
||||
|
@ -103,7 +103,7 @@ uint32_t crypto1_word(struct Crypto1State *s, uint32_t in, int is_encrypted)
|
|||
ret |= crypto1_bit(s, BEBIT(in, 5), is_encrypted) << (5 ^ 24);
|
||||
ret |= crypto1_bit(s, BEBIT(in, 6), is_encrypted) << (6 ^ 24);
|
||||
ret |= crypto1_bit(s, BEBIT(in, 7), is_encrypted) << (7 ^ 24);
|
||||
|
||||
|
||||
ret |= crypto1_bit(s, BEBIT(in, 8), is_encrypted) << (8 ^ 24);
|
||||
ret |= crypto1_bit(s, BEBIT(in, 9), is_encrypted) << (9 ^ 24);
|
||||
ret |= crypto1_bit(s, BEBIT(in, 10), is_encrypted) << (10 ^ 24);
|
||||
|
|
|
@ -20,7 +20,7 @@ int main(const int argc, const char* argv[]) {
|
|||
sscanf(argv[2],"%08x", &nt);
|
||||
sscanf(argv[3],"%016" SCNx64 ,&par_info);
|
||||
sscanf(argv[4],"%016" SCNx64 ,&ks_info);
|
||||
|
||||
|
||||
// Reset the last three significant bits of the reader nonce
|
||||
nr &= 0xffffff1f;
|
||||
|
||||
|
@ -47,7 +47,7 @@ int main(const int argc, const char* argv[]) {
|
|||
printf("%01x|\n", par[i][7]);
|
||||
}
|
||||
printf("+----+--------+---+-----+---------------+\n");
|
||||
|
||||
|
||||
state = lfsr_common_prefix(nr,rr,ks3x,par);
|
||||
lfsr_rollback_word(state,uid^nt,0);
|
||||
crypto1_get_lfsr(state,&key_recovered);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue