Chaocipher

From Fōrmulæ wiki
Jump to: navigation, search

This page is a solution to the task Chaocipher in the Rosetta Code, written in Fōrmulæ.

Description (from Rosetta Code)

Description

The Chaocipher was invented by J.F.Byrne in 1918 and, although simple by modern cryptographic standards, does not appear to have been broken until the algorithm was finally disclosed by his family in 2010.

The algorithm is described in this paper by M.Rubin in 2010 and there is a C# implementation here.

Task

The task is to code the algorithm in your language and to test that it works with the plaintext 'WELLDONEISBETTERTHANWELLSAID' used in the paper itself.

Program

The following program can be used to either encryt or decrypt text.

ChaoCipherCode.png

Use cases

To encrypt text (encrypt flag set to true):

ChaoCipherCase01.png

To decrypt text (encrypt flag set to false):

ChaoCipherCase02.png