# For The Love of Ciphers: Félix-Marie Delastelle

## Four square cipher

`AT TA CK AT DA WN`
`    a b c d e   Z G P T F    f g h i k   O I H M U    l m n o p   W D R C N    q r s t u   Y K E Q A    v w x y z   X V S B L         M F N B D   a b c d e    C R H S A   f g h i k    X Y O G V   l m n o p    I T U E W   q r s t u    L Q Z K P   v w x y z`
`    a b c d e   Z G P T F    f g h i k   O I H M U    l m n o p   W D R C N    q r s t u   Y K E Q A    v w x y z   X V S B L         M F N B D   a b c d e    C R H S A   f g h i k    X Y O G V   l m n o p    I T U E W   q r s t u    L Q Z K P   v w x y z`
`    ATTACKATDAWN    TIYBFHTIZBSY`
`import sysfrom pycipher import Foursquarefour1='ZGPTFOIHMUWDRCNYKEQAXVSBL'four2='MFNBDCRHSAXYOGVITUEWLQZKP'phrase='ATTACK AT DAWN'if (len(sys.argv)>1):        four1=str(sys.argv[1])if (len(sys.argv)>2):        four2=str(sys.argv[2])if (len(sys.argv)>3):        phrase=str(sys.argv[3])from pycipher import Foursquares = Foursquare(four1,four2)res=Foursquare(key1=four1,key2=four2).encipher(phrase)print "Cipher: ",resprint "Decipher: ",Foursquare(key1=four1,key2=four2).decipher(res)`

## Bifid cipher

`.... . .-.. .-.. --- /      .-- --- .-. .-.. -..H    E   L    L   O  SPACE    W  O   R   L    D`
`Plain text:    H    e l    l    o    w   o   r   l    dMorse string:  ....x.x.-..x.-..x---xx.--x---x.-.x.-..x-..`
`['...', '..-', '..x', '.-.', '.--', '.-x', '.x.', '.x-', '.xx', '-..', '-.-', '-.x', '--.', '---', '--x', '-x.', '-x-','-xx', 'x..', 'x.-', 'x.x', 'x-.', 'x--', 'x-x', 'xx.', 'xx-']`
`A B C D E F G H I J K L M N O P Q R S T U V W X Y Z. . . . . . . . . - - - - - - - - - x x x x x x x x. . . - - - x x x . . . - - - x x x . . . - - - x x. - x . - x . - x . - x . - x . - x . - x . - x . -`
`AGTCDHOTQODTCJ`
`.--.x.x-x.x.-.xx.--.x..x.--.x.x.-.xx.--.x..x-.-.x-.-x.x-..xxP    e t e r ' ' p    i   p  e  r' ' p    i  c    k  e  d ' '`
`E .   S ...  H ....  B -...  1 .----  period  .-.-.-T -   U ..-  V ...-  X-..-   2 ..---  comma   --..--I ..  R .-.  F ..-.  C-.-.   3 ...--  query   .-.-.-A .-  W .--  L .-..  Y --.-  4 ....-  colon   ---...N -.  D -..  P .--.  Z --..  5 .....  s/colon -.-.-.M --  K -.-  J .---  Q --.-  6 -....  dash    -....-      G --.                  7 --...  slash   -..-.      O ---                  8 ---..  equals  -...-                             9 ----.                             0 -----`
`EPSDUCVWYM.ZLKXNBTFGORIJHAQ`
`square 1   square 2   square 3                                      1 2 3      1 2 3      1 2 3    1 E P S    1 M . Z    1 F G O    2 D U C    2 L K X    2 R I J    3 V W Y    3 N B T    3 H A Q`
`THIS IS A TEST--------------T - 233H - 331I - 322S - 113I - 322S - 113A - 332T - 233E - 111S - 113T - 233`
`THISISATEST-----------233331322113322113332233111113233`
`233 333 321 321 311 111 331 233 232 123 123`
`233 333 321 321 311 111 331 233 232 123 123T   Q   R   R   F   E   H   T   B   C   C`

## Trifid cipher (Three square)

`EPSDUCVWYM.ZLKXNBTFGORIJHAQ`
`square 1   square 2   square 3                                      1 2 3      1 2 3      1 2 3    1 E P S    1 M . Z    1 F G O    2 D U C    2 L K X    2 R I J    3 V W Y    3 N B T    3 H A Q`
`THIS IS A TEST--------------T - 233H - 331I - 322S - 113I - 322S - 113A - 332T - 233E - 111S - 113T - 233`
`THISISATEST-----------233331322113322113332233111113233`
`233 333 321 321 311 111 331 233 232 123 123`
`233 333 321 321 311 111 331 233 232 123 123T   Q   R   R   F   E   H   T   B   C   C`

## Conclusions

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. EU Citizen. Auld Reekie native. Old World Breaker. New World Creator.

## More from Prof Bill Buchanan OBE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. EU Citizen. Auld Reekie native. Old World Breaker. New World Creator.

## How to Clean Up Your Digital Trail and Keep Data Off the Dark Web

Get the Medium app