Bacon cipher

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

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

Description (from Rosetta Code)

Bacon's cipher is a method of steganography created by Francis Bacon.

This task is to implement a program for encryption and decryption of plaintext using the simple alphabet of the Baconian cipher or some other kind of representation of this alphabet (make anything signify anything).

The Baconian alphabet:

a   AAAAA   g     AABBA   n    ABBAA   t     BAABA
b   AAAAB   h     AABBB   o    ABBAB   u-v   BAABB
c   AAABA   i-j   ABAAA   p    ABBBA   w     BABAA
d   AAABB   k     ABAAB   q    ABBBB   x     BABAB
e   AABAA   l     ABABA   r    BAAAA   y     BABBA
f   AABAB   m     ABABB   s    BAAAB   z     BABBB
  1. The Baconian alphabet may optionally be extended to encode all lower case characters individually and/or adding a few punctuation characters such as the space.
  2. It is impractical to use the original change in font for the steganography. For this task you must provide an example that uses a change in the case of successive alphabetical characters instead. Other examples for the language are encouraged to explore alternative steganographic means.
  3. Show an example plaintext message encoded and then decoded here on this page.

Program for encoding

BaconCipherCode01.png

A test:

BaconCipherCase01.png

Program for decoding

BaconCipherCode02.png

A test. Decoding the previous message:

BaconCipherCase02.png