*/\r
void lfsr_rollback_byte(struct Crypto1State *s, uint32_t in, int fb)\r
{\r
- int i;\r
+/* int i;\r
for (i = 7; i >= 0; --i)\r
lfsr_rollback_bit(s, BEBIT(in, i), fb);\r
+*/\r
+// unfold loop 20160112\r
+ lfsr_rollback_bit(s, BEBIT(in, 7), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 6), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 5), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 4), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 3), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 2), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 1), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 0), fb);\r
}\r
/** lfsr_rollback_word\r
* Rollback the shift register in order to get previous states\r
*/\r
void lfsr_rollback_word(struct Crypto1State *s, uint32_t in, int fb)\r
{\r
+/*\r
int i;\r
for (i = 31; i >= 0; --i)\r
lfsr_rollback_bit(s, BEBIT(in, i), fb);\r
+*/\r
+// unfold loop 20160112\r
+ lfsr_rollback_bit(s, BEBIT(in, 31), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 30), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 29), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 28), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 27), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 26), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 25), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 24), fb);\r
+\r
+ lfsr_rollback_bit(s, BEBIT(in, 23), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 22), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 21), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 20), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 19), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 18), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 17), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 16), fb);\r
+\r
+ lfsr_rollback_bit(s, BEBIT(in, 15), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 14), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 13), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 12), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 11), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 10), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 9), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 8), fb);\r
+\r
+ lfsr_rollback_bit(s, BEBIT(in, 7), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 6), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 5), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 4), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 3), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 2), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 1), fb);\r
+ lfsr_rollback_bit(s, BEBIT(in, 0), fb);\r
}\r
\r
/** nonce_distance\r