/crypto_square

An Elixir process-based implementation of the Crypto Square cipher

Primary LanguageElixir

CryptoSquare

Test status

This is an Elixir implementation of a simple encoding algorithm called Crypto Square.

Just to make the implementation more "interesting" (i.e., needlessly complicated), I've split the parts of the algorithm across multiple Elixir processes :-)

Running the tests

mix test

Running the code (with canned input)

iex -S mix

Note: this command executes the code in runner.ex.

How Crypto Square works

Source: slides from my YOW West 2015 presentation

All non alphanumberic characters are removed from the plain text.

The size of the "square" (normally a rectangle) is calculated based on the length of the normalised plaintext.

The normalised plaintext is arranged into a rectangular grid.

The ciphertext is formed by "reading" down each of the columns and joining the resultant columns together.

More details about the details of the algo can be found on Exercism.