- struct Crypto1State s;\r
- uint32_t ks1, nr, ks2, rr, ks3, good, c;\r
-\r
- for(c = 0; c < 8; ++c) {\r
- s.odd = odd ^ fastfwd[1][c];\r
- s.even = even ^ fastfwd[0][c];\r
- \r
- lfsr_rollback_bit(&s, 0, 0);\r
- lfsr_rollback_bit(&s, 0, 0);\r
- lfsr_rollback_bit(&s, 0, 0);\r
- \r
- lfsr_rollback_word(&s, 0, 0);\r
- lfsr_rollback_word(&s, prefix | c << 5, 1);\r
- \r
- sl->odd = s.odd;\r
- sl->even = s.even;\r
- \r
- ks1 = crypto1_word(&s, prefix | c << 5, 1);\r
- ks2 = crypto1_word(&s,0,0);\r
- ks3 = crypto1_word(&s, 0,0);\r
+ uint32_t ks1, nr, ks2, rr, ks3, c, good = 1;\r
+\r
+ for(c = 0; good && c < 8; ++c) {\r
+ sl->odd = odd ^ fastfwd[1][c];\r
+ sl->even = even ^ fastfwd[0][c];\r
+\r
+ lfsr_rollback_bit(sl, 0, 0);\r
+ lfsr_rollback_bit(sl, 0, 0);\r
+\r
+ ks3 = lfsr_rollback_bit(sl, 0, 0);\r
+ ks2 = lfsr_rollback_word(sl, 0, 0);\r
+ ks1 = lfsr_rollback_word(sl, prefix | c << 5, 1);\r
+\r