0% found this document useful (0 votes)
18 views

Lecture 3

Uploaded by

sobia.shafique
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Lecture 3

Uploaded by

sobia.shafique
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Data Security and

Encryption
Lecture # 3
By: Engr. Sundas Hanif
[email protected]
What is Cryptography?
• Cryptography means “secret writing”
• Cryptanalysis is the breaking of codes
• The basic component of cryptography is a
cryptosystem
• A cryptosystem is a 5-tuple (E, D, M, K, C), where
• M is the set of plaintexts,
• K the set of keys,
• C is the set of ciphertexts,
• E: M × K→ C is the set of enciphering functions,
• D: C × K → M is the set of deciphering
Types of Ciphers
• There are two basic types of ciphers
• Transposition
• Substitution
Transposition Ciphers
• Rearranges bits or characters in the data
• The letters are not changed, only their position
• First, the plaintext is written into the figure
according to some "write-in" path
• Second, the ciphertext is taken off the figure
according to some "take-off'' path
• The key consisted of the figure together with the
write-in and take-off paths
Transposition Ciphers
• Rail-Fence Cipher
With a "rail-fence“ cipher, the letters of a
plaintext message are written down in a pattern
resembling a rail fence, and then removed by
rows
Decryption—Rail-Fence Cipher
• Decrypt this– Rail Fence of depth 3
• MMTHGRETEFETEOAATEARTPY

• IOEUDSALVKRITN

• IWTKGAAAEHNSOOMKATD
Transposition Ciphers
Columnar Transposition Cipher
• The plaintext is written into a matrix by rows
• The ciphertext is obtained by taking off the
columns in some order
• Example:
Meet me at next midnight
• Key
FANCY
Class Practice
• Encrypt the following message with the help of
Transposition cipher

LEAVE THE MONEY IN THE BRIEFCASE

• Rail-Fence Cipher with the key = 3


• Columnar Cipher with Key = RED
Class Practice
• Decrypt the message
AES EAO OIT VUI NNN NEE RLC FTE LNV
LER LS
• if it was encrypted using tabular
transposition cipher with rows of length 4
characters

You might also like