2. • Codes generally substitute different length strings of character
in the output, while Ciphers generally substitute the same
number of characters as are input.
• There are exceptions and some cipher systems may use slightly
more, or fewer, characters when output versus the number that
were input.
Definition of Code and Cipher
3. How it works?
• Codes operated by substituting according to a large codebook
which linked a random string of characters or numbers to a word
or phrase.
• When using a Cipher the original information is known as
plaintext, and the encrypted form as ciphertext. The ciphertext
message contains all the information of the plaintext message, but
is not in a format readable by a human or computer without the
proper mechanism to decrypt it.
5. 1. Morse Code
Information:
• Founded in 1836.
• By American artist Samuel Morse, with
the American physicist Joseph Henry,
and Alfred Vail.
• Note: The name "Morse code" is
misleading because, this is in fact a cipher
not a code. All the letters of the alphabet,
number from 0-9 and some punctuation
marks have been replaced by dots,
dashes or short and long beeps.
6. Working:
• Messages could be sent long-distance
electrically using the Morse code via the
telegraph.
• It was not used for concealing message,
but transmitting information as a series
of clicks, tones or lights.
• A skilled observer or listener can directly
understand the information without any
equipment.
• A basic understanding is required by pilots
and air traffic controllers.
• SOS, the most common distress signal,
recognized internationally is depicted as
three dots, three dashes and three dots. Simple example:
7. 2. Caesar Shift Cipher
• This particular cipher has been named after Julius
Caesar, since he used it himself.
• In G cipher, A becomes G, B becomes H and so on. In
Y Cipher, A becomes Y and so on.
• This particular cipher is not very difficult to decipher
and hence secret messages do not remain secret for
long.
• But on the bright side this particular cipher has been
used as the basis for creation of more complex
ciphers.
• Example:
8. 3. Enigma Code
• The Germans used this sophisticated
cipher during the Second World War.
• It involved using an Enigma machine,
which is similar to the type writer.
• All Germans had the same Enigma
machine and the initial wheel
configuration of the machine was
communicated to all the teams. When
a letter was pressed on the machine, a
cipher letter lit up on the screen.
• It got even more difficult when the
wheel rotated after certain number of
letters, so that the cipher kept on
changing.
• There could be over one hundred
trillion possible configurations and
hence was difficult to decipher
Enigma.
9. 4. Public-Key Crytography
• Public Key Cryptography is modern and is
made of two keys – the private and the
public key.
• The public key is a large number everyone
can get.
• The private key is made of two numbers
(apart from 1 and the number itself).
• These two numbers are multiplied
together and can produce the public
key. For example, the public key is 1764,
the private key can be 36 and 49
(36×49=1764).
• Without the private key, the code cannot
be deciphered.
10. 5. Transposition Cipher
• This particular cipher was used during American Civil
War and World War I to communicate sensitive
messages.
• The letters of the alphabet are rearranged based on
pre-determined key or rule.
• It could be that all the words in the message are
written backwards, or every pair of letters is
swapped. If the rearrangement rule is complex, it
might seem very difficult to decipher, however, with
modern algorithms on the computer, it can be easily
deciphered.
• For example: “the yellow car belongs to him” can
become “eht wolley rac sgnoleb ot mih” when
written backwards.
11. 6. Book Cipher
• This particular cipher involves the use of
some key, essentially in a book.
• Both the parties should have the same
book and the same edition to successfully
decipher the code.
• Locations in the book are used to replace
the plain text of the message.
• The ease of decoding depends on the how
well the key has been chosen.
• Also the book should be inconspicuous
and of the genre which is similar to the
type of messages required to be sent.
12. 7. Pigpen Cipher
• This is also referred to as Tic-Tac-Toe Cipher,
and is fairly simple substitution cipher.
• The letters of the alphabet are replaced by
fragments of a geometrical grid.
• Although its origin cannot be ascertained, it
goes back to the 18th century.
• The grid and the dots are the core elements
of the cipher.
• The alphabets are arranged in two grids,
followed by two Xs.
13. 8. Steganography
• This involves the concealment of a message,
image or a file in another message, image or file.
• The first record of its use is in 1499. Text could be
written using invisible ink between visible lines of
a text.
• The benefit of this type is that it does not arouse
suspicion like an encrypted message would.
• There are various ways in which this can be done
– physical, digital, social and using puzzles as well.
• Digital images are used largely for hiding
messages as bits.
• Various modern techniques are available by which
steganography can be performed.
14. 9. Playfair Cipher
• Here we come to the last one on the list
of types of codes and ciphers.
• The Playfair cipher is also known as the
Playfair Square.
• It was invented by Charles Wheatstone
in 1854, but is named after the person
who promoted its use.
• In this type of cipher, pairs of letters
are encrypted instead of single letters.
• Thus it is harder to decipher. It creates
600 possible digraphs as compared to
26 monographs.