This is a Python 3 implementation of the pen-and-paper cipher used by the Soviet spy Reino Häyhänen, codenamed "VICTOR", in the 1950s.
The vic
entrypoint has two subcommands, encrypt
and decrypt
. To encrypt something you have to pass the following as arguments to the encrypt
subcommand:
- A 10 character key for the straddling checkerboard, where two of those characters are spaces that are used for the second and third layer of the checkerboard.
- A 20 character passphrase used to derive the keys for the two transposition tables.
- A 2 digit personal ID assigned per agent. This is used to split the transposition key for the two transposition tables, thus making this too big means that the first table might end up taking up all of the key. I would recommend keeping the IDs at least under 40.
- A 6 digit date used to derive keys, and the last digit specifies where the message ID is inserted into the ciphertext.
- A 5 digit unique and random message ID.
- A plaintext message to encrypt.
To decrypt a message you have to pass the following as arguments to the decrypt
subcommand:
- A 10 character key for the straddling checkerboard, where two of those characters are spaces that are used for the second and third layer of the checkerboard.
- A 20 character passphrase used to derive the keys for the two transposition tables.
- A 2 digit personal ID assigned per agent. This is used to split the transposition key for the two transposition tables, thus making this too big means that the first table might end up taking up all of the key. I would recommend keeping the IDs at least under 40.
- A 6 digit date used to derive keys, and the last digit specifies where the message ID is inserted into the ciphertext.
- A ciphertext message to decrypt.