Compile: gcc -o Sigaba Sigaba.c

---------------------------------------------------

Usage: Sigaba rotorOrder orientation initPos direction infile outfile

where rotorOrder == order of cipher/cotrol rotors and order of index rotors
                    (perm of 0-9 and perm of 0-4, no spaces)
      orientation == cipher/control rotor orientations,
                0 = forward, 1 = reverse (binary 10-tuple)
      initPos == initial positions for cipher/control/index rotors
                 (10-tuple of A thru Z, 5-tuple of 0 thru 9)
      direction == 0 for encrypt, 1 for decrypt
      infile == input file name
      outfile == output file name

For example:

Sigaba 987654321043210 0000000011 ABCDEFGHIJ98765 0 plain.txt cipher.txt

----------------------------------------------------

The file cipher.txt was generated by

Sigaba 987601234501243 1100001010 AAABBCCCDD98703 0 plain.txt cipher.txt

Note that during encryption, if the plaintext is Z,
the letter X is encrypted, and if the plaintext is a space,
the letter Z is encrypted. During decryption, if a ciphertext
letter decrypts to Z, the plaintext letter is a space. For one
thing, this implies that a decrypted X could have been either
an X or a Z.
