Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
9 views3 pages

Ciphers

The document describes four different types of ciphers used in cryptography: the Pigpen cipher, Caesar cipher, Vigenère cipher, and Rail Fence cipher. Each cipher is explained with its method of encryption, examples, and how to derive ciphertext from plaintext. The document provides a clear overview of these encryption techniques and their historical context.

Uploaded by

mihotafhim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Ciphers

The document describes four different types of ciphers used in cryptography: the Pigpen cipher, Caesar cipher, Vigenère cipher, and Rail Fence cipher. Each cipher is explained with its method of encryption, examples, and how to derive ciphertext from plaintext. The document provides a clear overview of these encryption techniques and their historical context.

Uploaded by

mihotafhim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Pigpen cipher: The pigpen cipher (sometimes referred to as the masonic cipher, Freemason's cipher, or
tic-tac-toe cipher) is a geometric simple substitution cipher, which exchanges letters for symbols which
are fragments of a grid. The example key shows one way the letters can be assigned to the grid.

Using the Pigpen cipher key above, the message "X MARKS THE SPOT" is rendered in ciphertext as:

2. Caesar cipher: In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher,
Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques. It
is a type of substitution cipher in which each letter in the plaintext is replaced by a letter some fixed
number of positions down the alphabet.

The transformation can be represented by aligning two alphabets; the cipher alphabet is the plain
alphabet rotated left or right by some number of positions. For instance, here is a Caesar cipher using
a left rotation of three places, equivalent to a right shift of 23 (the shift parameter is used as the key):

Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher: XYZABCDEFGHIJKLMNOPQRSTUVW

©InCIS Page 1 of 3
When encrypting, a person looks up each letter of the message in the "plain" line and writes down the
corresponding letter in the "cipher" line.

Plaintext: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
Ciphertext: QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD

3. Vigenére cipher: The Vigenère cipher is a method of encrypting alphabetic text by using a series
of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic
substitution. The Vigenère cipher has been reinvented many times. The method was originally
described by Giovan Battista Bellaso in his 1553 book La cifra del. Sig.

To encrypt, a table of alphabets can be used, termed a tabula recta, Vigenère square, or Vigenère table. It
consists of the alphabet written out 26 times in different rows, each alphabet shifted cyclically to the left
compared to the previous alphabet, corresponding to the 26 possible Caesar ciphers. At different points
in the encryption process, the cipher uses a different alphabet from one of the rows. The alphabet used
at each point depends on a repeating keyword.

For example, suppose that the plaintext to be encrypted is:

ATTACKATDAWN

The person sending the message chooses a keyword and repeats it until it matches the length of the
plaintext, for example, the keyword "LEMON":

LEMONLEMONLE

Each row starts with a key letter. The remainder of the row holds the letters A to Z (in shifted order).
Although there are 26 key rows shown, you will only use as many keys (different alphabets) as there are

©InCIS Page 2 of 3
unique letters in the key string, here just 5 keys, {L, E, M, O, N}. For successive letters of the message, we
are going to take successive letters of the key string, and encipher each message letter using its
corresponding key row. Choose the next letter of the key, go along that row to find the column heading
that matches the message character; the letter at the intersection of [key-row, msg-col] is the enciphered
letter.

For example, the first letter of the plaintext, A, is paired with L, the first letter of the key. So use row L and
column A of the Vigenère square, namely L. Similarly, for the second letter of the plaintext, the second
letter of the key is used; the letter at row E and column T is X. The rest of the plaintext is enciphered in a
similar fashion:

Plaintext: ATTACKATDAWN
Key: LEMONLEMONLE
Ciphertext: LXFOPVEFRNHR

Decryption is performed by going to the row in the table corresponding to the key, finding the position of
the ciphertext letter in this row, and then using the column's label as the plaintext. For example, in row L
(from LEMON), the ciphertext L appears in column A, which is the first plaintext letter. Next we go to row
E (from LEMON), locate the ciphertext X which is found in column T, thus T is the second plaintext letter.

4. Rail Fence cipher: In the rail fence cipher, the plain text is written downwards and diagonally on
successive "rails" of an imaginary fence, then moving up when we reach the bottom rail. When we reach
the top rail, the message is written downwards again until the whole plaintext is written out.
W . . . E . . . C . . . R . . . L . . . T . . . E
. E . R . D . S . O . E . E . F . E . A . O . C .
. . A . . . I . . . V . . . D . . . E . . . N . .

Then reads off to get the ciphertext:

WECRLTEERDSOEEFEAOCAIVDEN

©InCIS Page 3 of 3

You might also like