for (i = 7; i >= 0; --i)\r
ret |= lfsr_rollback_bit(s, BIT(in, i), fb) << i;\r
*/\r
for (i = 7; i >= 0; --i)\r
ret |= lfsr_rollback_bit(s, BIT(in, i), fb) << i;\r
*/\r
uint8_t ret = 0;\r
ret |= lfsr_rollback_bit(s, BIT(in, 7), fb) << 7;\r
ret |= lfsr_rollback_bit(s, BIT(in, 6), fb) << 6;\r
uint8_t ret = 0;\r
ret |= lfsr_rollback_bit(s, BIT(in, 7), fb) << 7;\r
ret |= lfsr_rollback_bit(s, BIT(in, 6), fb) << 6;\r
for (i = 31; i >= 0; --i)\r
ret |= lfsr_rollback_bit(s, BEBIT(in, i), fb) << (i ^ 24);\r
*/\r
for (i = 31; i >= 0; --i)\r
ret |= lfsr_rollback_bit(s, BEBIT(in, i), fb) << (i ^ 24);\r
*/\r
uint32_t ret = 0;\r
ret |= lfsr_rollback_bit(s, BEBIT(in, 31), fb) << (31 ^ 24);\r
ret |= lfsr_rollback_bit(s, BEBIT(in, 30), fb) << (30 ^ 24);\r
uint32_t ret = 0;\r
ret |= lfsr_rollback_bit(s, BEBIT(in, 31), fb) << (31 ^ 24);\r
ret |= lfsr_rollback_bit(s, BEBIT(in, 30), fb) << (30 ^ 24);\r
ret |= lfsr_rollback_bit(s, BEBIT(in, 2), fb) << (2 ^ 24);\r
ret |= lfsr_rollback_bit(s, BEBIT(in, 1), fb) << (1 ^ 24);\r
ret |= lfsr_rollback_bit(s, BEBIT(in, 0), fb) << (0 ^ 24);\r
ret |= lfsr_rollback_bit(s, BEBIT(in, 2), fb) << (2 ^ 24);\r
ret |= lfsr_rollback_bit(s, BEBIT(in, 1), fb) << (1 ^ 24);\r
ret |= lfsr_rollback_bit(s, BEBIT(in, 0), fb) << (0 ^ 24);\r
uint32_t *lfsr_prefix_ks(uint8_t ks[8], int isodd)\r
{\r
uint32_t *candidates = malloc(4 << 10);\r
uint32_t *lfsr_prefix_ks(uint8_t ks[8], int isodd)\r
{\r
uint32_t *candidates = malloc(4 << 10);\r
for(i = 0; i < 1 << 21; ++i) {\r
for(c = 0, good = 1; good && c < 8; ++c) {\r
entry = i ^ fastfwd[isodd][c];\r
for(i = 0; i < 1 << 21; ++i) {\r
for(c = 0, good = 1; good && c < 8; ++c) {\r
entry = i ^ fastfwd[isodd][c];\r
/** lfsr_common_prefix\r
* Implentation of the common prefix attack.\r
* Requires the 28 bit constant prefix used as reader nonce (pfx)\r
/** lfsr_common_prefix\r
* Implentation of the common prefix attack.\r
* Requires the 28 bit constant prefix used as reader nonce (pfx)\r
struct Crypto1State* lfsr_common_prefix(uint32_t pfx, uint32_t rr, uint8_t ks[8], uint8_t par[8][8])\r
{\r
struct Crypto1State *statelist, *s;\r
struct Crypto1State* lfsr_common_prefix(uint32_t pfx, uint32_t rr, uint8_t ks[8], uint8_t par[8][8])\r
{\r
struct Crypto1State *statelist, *s;\r
odd = lfsr_prefix_ks(ks, 1);\r
even = lfsr_prefix_ks(ks, 0);\r
\r
odd = lfsr_prefix_ks(ks, 1);\r
even = lfsr_prefix_ks(ks, 0);\r
\r