Browsed by
Category: cryptanalysis

Atbash Cipher as an Algorhithm

Atbash Cipher as an Algorhithm

Today I realized Atbash can done as an algorithm, rather than looking up a hard-coded dictionary of an alphabet to its reversed alphabet.  You could encrypt using the alphabet’s array index as: -i +25 It’s that simple. Example:   Assuming you have a list of an alphabet, index(i) will get the plaintext chacter’s position.  Then negate it and add 25, and now you have the index position of the Atbash character.  Slick! Complete Code: Output: No more rhymes now, I mean…

Read More Read More

Atbash Cipher in Python

Atbash Cipher in Python

I just finished listening to The Da Vinci Code audiobook and am feeling inspired to noodle with some cryptograms in Python.  One of the clues in the story involves a word written Atbash.  This is a simple substitution cipher where the encrypted characters are mapped to the reverse of the alphabet: A -> Z B -> Y C -> X … Z -> A   Now let’s write a Python script to do this  It’s been a while since I…

Read More Read More