The letters of the original message would be rearranged when the ribbon was uncoiled from the cylinder.Īnother approach is to write the plain text downwards and diagonally on successive “rails” of an imaginary fence, then moving up when the bottom rail is reached. The message to be encrypted was written on the coiled ribbon. The system consisted of a cylinder and a ribbon that was wrapped around the cylinder. The rail fence cipher was used by the ancient Greeks in the scytale, a mechanical system of producing a transposition cipher. Transposition cipher: Rail Fence Cipher (ZigZag Cipher) Attackers just need to find the common letters in the encrypted text (in my example the letter “I”) and experiment with substitution to break the cipher. It is vulnerable to frequency analysis since the most common letters in the English language are E, T, A, O, N, R, I, S, and H. This cipher is easy to use but also easy to crack. The wrap-around is done by using the modulo function. This is called ROT3 (Rotate 3) cipher and encryption/decryption is mathematically implemented by converting each letter to its decimal equivalent. For example, with a right shift of 3, A would be replaced by D, B would become E, and so on. It is a substitution cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down the alphabet. In crypto, the Caesar cipher is one of the earliest known systems and was used by Julus Caesar to communicate with Cicero in Rome while he was conquering Europe. Ancient civilizations used complex systems of secret symbols and the evolution of those systems are the codes and ciphers we facilitate to enable private communication today. Today carry flash storage devices stuffed with the information of the Encyclopedia Britannica in our pocket.Īs long as humans have been communicating, they tried to hide the true meaning of the written word from others. In the beginning, humans used Petroglyphs, which evolved into Pictograms (Hieroglyphs), and finally Ideograms. Speech and written communication defined early civilizations and continuously evolved with human societies. The letters at the head of the columns are then cut off, the ruling erased and the message of dots sent along to the recipient, who, knowing the width of the columns and the arrangement of the letters at the top, reconstitutes the diagram and reads what it has to say.Cryptography - Hash Functions & Digital SignaturesĬryptography - Applications History of Cryptography A dot is made for each letter of the message in the proper column, reading from top to bottom of the sheet. As described in Fletcher Pratt's Secret and Urgent, it is "written by ruling a sheet of paper in vertical columns, with a letter at the head of each column. However, it may also refer to a different type of cipher system that looks like a zigzag line going from the top of the page to the bottom. The term Zigzag cipher may refer to the Rail Fence Cipher as described above. The rail fence cipher is not very strong the number of practical keys is small enough that a cryptanalyst can try them all by hand.
For example, if we have 3 "rails" and a message of 'WE ARE DISCOVERED. When we reach the top rail, the message is written downwards again until the whole plaintext is written out. In the rail fence cipher, the plaintext is written downwards and diagonally on successive "rails" of an imaginary fence, then moving up when we reach the bottom rail.