CRYPTOGRAPHY

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

CRYPTOGRAPHY

- A A N N A R AT H N A

19CSC07
KHOOR DOO !!!
DP GHWHFWLYH DQQDP.
KHOS PH VROYH WKLV FDVH
DQG
OHDUQ WKH PHWLRGV RI
FUBSWRJUDSKB DORQJ ZLWK
PH LQ WKLV MRXQHB.
CRYPTOGRAPHY
 The science of encryption, known as
cryptology, encompasses cryptography
and cryptanalysis.

 Cryptography, which comes from the


Greek words kryptos, meaning “hidden,”
and graphein, meaning “to write,” is the
process of making and using codes to
secure the transmission of information.

 Cryptanalysis is the process of obtaining


the original message (called the
plaintext) from an encrypted message
(called the ciphertext) without knowing
the algorithms and keys used to perform
the encryption.
TERMINOLOGIES:
 Algorithm: The programmatic steps used to convert an unencrypted message into an
encrypted sequence of bits that represent the message; sometimes refers to the programs
that enable the cryptographic processes.
 Cipher or cryptosystem: An encryption method or process encompassing the algorithm,
key(s) or cryptovariable(s), and procedures used to perform encryption and decryption.
 Ciphertext or cryptogram: The encoded message resulting from an encryption.
 Code: The process of converting components (words or phrases) of an unencrypted
message into encrypted components.
 Decipher: To decrypt, decode, or convert, ciphertext into the equivalent plaintext.
 Encipher: To encrypt, encode, or convert, plaintext into the equivalent ciphertext.
TERMINOLOGIES:
 Key or cryptovariable: The information used in conjunction with an algorithm to create the ciphertext
from the plaintext or derive the plaintext from the ciphertext; the key can be a series of bits used by a
computer program, or it can be a passphrase used by humans that is then converted into a series of bits
used by a computer program.
 Keyspace: The entire range of values that can be used to construct an individual key.
 Link encryption: A series of encryptions and decryptions between a number of systems, wherein each
system in a network decrypts the message sent to it and then re-encrypts it using different keys and sends
it to the next neighbor, and this process continues until the message reaches the final destination.
 Plaintext or cleartext: The original unencrypted message, or a message that has been successfully
decrypted.
 Steganography: The hiding of messages—for example, within the digital encoding of a picture or
graphic.
 Work factor: The amount of effort (usually in hours) required to perform cryptanalysis to decode an
encrypted message when the key or algorithm (or both) are unknown.
CIPHER METHODS:
SUBSTITUTIONAL
CIPHER:
Monoalphabetic
cipher
Caesar cipher
Polyalphabetic cipher
Vigenère cipher
Monoalphabetic Ciphers:
• Plaintext characters are substituted by a different alphabet stream of
characters shifted to the right or left by n positions.

ABCDEFGHIJKLMNOPQRSTUVWXYZ

DEFGHIJKLMNOPQRSTUVWXYZABC

• Caesar cipher corresponds to n = 3.


• Julius Caesar used the Caesar cipher method.
• The substitution cipher by shifting alphabets gives 26! > 4 x 1026 possibilities.
• This might appear to be too many choices to try for an exhaustive attack.
• This is a weak cipher because it would be easy to guess the pattern.
• Mono-alphabetic ciphers are vulnerable to cryptanalysis attack.
Polyalphabetic Ciphers:
• In polyalphabetic cipher, each plaintext character may be replaced by more than
one character.
• Since there are only 26 alphabets this process will require using a different
representation than the alphabets.
• Alphabets ‘A’ through ‘Z’ are replaced by 00, 01, 02, …, 25.
• We need two digits in this representation since we need to know how to reverse
the process at the decryption side.
• The most common method used is Vigenère cipher.
• Vigenère cipher starts with a 26 x 26 matrix of alphabets in
sequence.
• First row starts with ‘A’, second row starts with ‘B’, etc.
Play time!
MESSAGE = SEE ME IN MALL
KEYWORD = INFOSEC

Vigenère cipher works as follows: Decryption of ciphertext:

S E E M E I N MALL AR JAW M PU N Q Z
INFOSECINFO INFOSECINFO
AR JAW M PU N Q Z SE E M EI NMALL
Transposition Ciphers:
 Unlike substitution ciphers that replace letters with other letters, transposition ciphers
keep the letters the same, but rearrange their order according to a specific algorithm.
 For instance, in a simple columnar transposition cipher, a message might be read
horizontally but would be written vertically to produce the ciphertext.
Exclusive OR
Encryption: To see how XOR works, consider an example in which the
plaintext is the word “CAT.” The ASCII binary
 The exclusive OR operation (XOR) is a
representation of the plaintext is “01000011 01000001
function of Boolean algebra in which two
01010100”. In order to encrypt the plaintext, a key value
bits are compared, and if the two bits are
should be selected. In this case, the bit pattern for the letter
identical, the result is a binary 0.
“V” (01010110) is used, and is repeated for each character
 If the two bits are not the same, the result to be encrypted,
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.
PLAY TIME!

HI = 01101000 01101001
Key= 01010010 01000101

Encrypted Message: 00111010 00101100


Vernam Ciphers:
 Also known as the one-time pad, the Vernam cipher, which was developed by AT&T, uses a
set of characters only one time for each encryption process (hence the name one-time pad).
 The pad in the name comes from the days of manual encryption and decryption when the key
values for each ciphering session were prepared by hand and bound into an easy-to-use form
—that is, a pad of paper.
 To perform the Vernam cipher encryption operation, the pad values are added to numeric
values that represent the plaintext that needs to be encrypted.
 Each character of the plaintext is turned into a number and a pad value for that position is
added to it.
 The resulting sum for that character is then converted back to a ciphertext letter for
transmission.
 If the sum of the two values exceeds 26, then 26 is subtracted from the total.
PLAY TIME!
12 4 17 2 24
12 0 3 0 12
24 4 20 2 36
- 26

24 4 20 2 10
PLAY TIME!

Encrypted
Text:
YEUCK
PLAY TIME!

Text: MERCY
Key: MADAM
Book or Running Key Ciphers:
 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’s value and
the key (the book).
 For 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.
 Although almost any book can be used, dictionaries and thesauruses are typically the
most popular sources as they are likely to contain almost any word that might be
needed.
Book or Running Key Ciphers:
 The recipient of a running key cipher must first know which book is used—in this case,
suppose it is the science fiction novel A Fire Upon the Deep, the 1992 TOR edition.
 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.
 An even more sophisticated version might use multiple books, perhaps even in a
particular sequence for each word or phrase.
WKDQN BRX

You might also like