Cipher Methods: A02:-Nikhil Chhabria A10: - Kabir Kanjani A11: - Yash Khatri A12: - Shubham Koshti A49: - Siraj Shaikh
Cipher Methods: A02:-Nikhil Chhabria A10: - Kabir Kanjani A11: - Yash Khatri A12: - Shubham Koshti A49: - Siraj Shaikh
Cipher Methods: A02:-Nikhil Chhabria A10: - Kabir Kanjani A11: - Yash Khatri A12: - Shubham Koshti A49: - Siraj Shaikh
● Within this substitution scheme, the plaintext MOM would be encrypted into
the ciphertext PRP.
Substitution Cipher
● This is a simple enough method by itself but very powerful if combined with other
operations.
● This type of substitution is based on a monoalphabetic substitution, because it only uses
one alphabet.
● More advanced substitution ciphers use two or more alphabets, and are referred to as
polyalphabetic substitutions .
● Example
Plaintext : ABCDEFGHIJKLMNOPQRSTUVWXYZ
● The first row here is the plaintext, and the next four rows are four sets of
substitution ciphers,which taken together constitute a single
polyalphabetic substitution cipher .
● To encode the word TEXT with this cipher, you substitute a letter from
the second row for the first letter in TEXT.
● a letter from the third row for the second letter, and so on—a process
that yields the ciphertext WKG.
● Complexities like these make this type encryption substantially more
difficult to decipher when one doesn’t have the algorithm and the key
and unknown about which is the method used for encryption.
Substitution Cipher
● A much more sophisticated way to use the Vigenère square is to use a keyword to
represent the shift. To accomplish this, you begin by writing a keyword above the
plaintext message.
● For example, suppose the plaintext message was ‘’SACK GAUL SPARE NO ONE” and the
keyword was ITALY. We thus end up with the following:
ITALYITALYITALYITA
SACKGAULSPARENOONE
● To perform the substitution, start with the first combination of keyword and message
letters IS. Use the keyword letter to locate the column, and the message letter to find the
row, and then look for the letter at their intersection.
● Thus, for column “I” and row “S” you will find the ciphertext letter “A”
● So encrypted ciphertext will be ATCVEINLDNIKEYMWGE .
Transposition Cipher
● Like the substitution operation, the transposition cipher is simple to understand, but it
can, if properly used, produce ciphertext that is difficult to decipher.
● In contrast to the substitution cipher, however, the transposition cipher or permutation
cipher simply rearranges the values within a block to create the ciphertext.
● This can be done at the bit level or at thebyte (character) level .
● Example
Key pattern :1->4, 2->8, 3->1, 4->5, 5->7, 6->2, 7->6, 8->3
Transposition Cipher
● The rail fence cipher is an easy to apply transposition cipher that jumbles up the order of the
letters of a message in a quick convenient way. It also has the security of a key to make it a
little bit harder to break.
● The Rail Fence cipher works by writing your message on alternate lines across the page, and
then reading off each line in turn. For example, the plaintext "defend the east wall" is written as
shown below, with all spaces removed.
● Depth / Rail Key : 2
The simplest Rail Fence Cipher, where each letter is written in a zigzag pattern across the page.
● The ciphertext is then read off by writing the top row first, followed by the bottom row, to get
"DFNTEATALEEDHESWL".
Transposition Cipher
● In addition to being credited with inventing a substitution cipher, Julius Caesar was
associated with an early version of the transposition cipher. Which is called columner
Transposition Cipher
● In the Caesar block cipher, the recipient of the coded message knows to fit the text to a
prime number square
● For example, if you are the recipient of the Caesar cipher write the letters of the message
into the square, filling the slots from left to right, top to bottom.
● Then you read the message from the opposite direction—that is, from top to bottom, left
to right.
● The exclusive OR operation (XOR)is a function of Boolean algebra in which two bits are
compared, and if the two bits are identical, the result is a binary 0.
● If the two bits are not the same, the result is a binary 1.
● XOR encryption is a very simple symmetric cipher that is used in many applications where
security is not a defined requirement
Exclusive OR
Example
● The above Table “Cipher” contains the bit stream that will be transmitted
when this cipher is received, it can be decrypted using the key value“V.”
● XOR encryption method is very simple to implement and equally simple to
break.
● The XOR encryption method should not be used by itself when an
organization is transmitting or storing sensitive data.
Vernam Cipher
Example
● One encryption method made popular by spy movies involves using the text
in a book as the key to decrypt a message.
● The ciphertext consists of a list of codes representing the page number, line
number, and word number of the plaintext word.
● The algorithm is the mechanical process of looking up the references from the
ciphertext and converting each reference to a word by using the ciphertext
value and the key.
● Example : from a copy of a particular popular novel, one may send the
message: 259,19,8; 22,3,8;375,7,4; 394,17,2.
● The recipient of a running key cipher must first know which book is used in
this case, suppose it is the science fiction novelAFireUpontheDeep, the 1992
TOR edition.
Book or Running Key Cipher
● To decrypt the ciphertext, the receiver acquires the book and turns to
page 259, finds line 19, and selects the eighth word in that line (which
is“sack”).
● Then the receiver turns to page 22, line 3, and selects the eighth word
again, and so forth.
● In this example, the resulting message is“SACK ISLAND SHARP PATH” .
● If dictionaries are used, the message consists of only the page number
and the number of the word on the page.
Hash Function
● Hash functions are extremely useful and appear in almost all information
security applications.
● Hash functions are mathematical algorithms that generate a message
summary or digest to confirm the identity of a specific message and to
confirm that there have not been any changes to the content.
● While they do not create a ciphertext, hash functions confirm message
identity and integrity, both of which are critical functions in e-commerce.
● Hash algorithms are public functions that create a hash value, also
known as a message digest .
● The message digest is a fingerprint of the author’s message that is
compared with the recipient’s locally calculated hash of the same
message .
Hash Function
● If both hashes are identical after transmission, the message has arrived without
modification.
● Hash functions are considered one-way operations in that the same message always
provides the same hash value .
● It is a key dependent
● hash functions are one-way, they are used in password verification systems to confirm
the identity of the user.
● In such system hash value is calculated based on originally issued password and this
message digest is stored for later comparison .
● When the user logs on for the next session, the system calculates a hash value based on
the user’s password input, and this value is compared against the stored value to confirm
identity
Hash Function
● A recent attack method called rainbow cracking has generated concern about
the strength of the processes used for password hashing .
● In general, if attackers gain access to a file of hashed passwords, they can use
a combination of brute force and dictionary attacks to reveal user passwords.
● Passwords that are poorly constructed can be easily cracked.
● Well-constructed passwords take a long time to crack even using the fastest
computers .
● by using a rainbow table a database of precomputed hashes from sequentially
calculated passwords
● the rainbow cracker simply looks up the hashed password and reads out the
text version, no brute force required.
● This type of attack is more properly classified as atime–memory tradeoff
attack.
Hash Function