Correction in decryption block
diff --git a/lib/decryption/a5_1_2.h b/lib/decryption/a5_1_2.h
index fb87498..75277df 100644
--- a/lib/decryption/a5_1_2.h
+++ b/lib/decryption/a5_1_2.h
@@ -364,13 +364,13 @@
}
}
-void runA51(unsigned char AtoBkeystream[]) {
+void runA51(byte AtoBkeystream[], byte BtoAkeystream[]) {
int i;
/* Zero out the output buffers. */
- for (i = 0; i < 114; i++)
+ for (i = 0; i < 114; i++){
AtoBkeystream[i] = 0;
-
+ }
/* Generate 114 bits of keystream for the
* A->B direction. Store it, MSB first. */
@@ -378,6 +378,13 @@
clock(0, 0);
AtoBkeystream[i] = getbit();
}
+
+ /* Generate 114 bits of keystream for the
+ * B->A direction. Store it, MSB first. */
+ for (i = 0; i < 114; i++) {
+ clock(0, 0);
+ BtoAkeystream[i] = getbit();
+ }
}