 Cryptography
• Cryptography is a technique of securing information and
communications through use of codes so that only those
person for whom the information is intended can understand
it and process it.
• It preventing unauthorised access to information.
• The prefix “crypt” means “hidden” and suffix“graphy” means
“writing”.
• Techniques used for cryptography : In todays age of
computers cryptography is often associated with the process
where an ordinary plain text is converted to cipher text which
is the text made such that intended receiver of the text can
only decode it and this process is known as encryption.
• The process of conversion of cipher text to plain text this is
known as decryption.
Terminology used in Cryptography
1. Plaintext and ciphertext:The original message,before being transformed is
called plaintext.After the message transformed it is called as ciphertext.
2. Encryption Algorithm:The encryption algorithm is the algorithm that
performs various substitution and transformation on the plaintext.Encryption
is the process of changing plaintext into ciphertext.
3. Decryption Algorithm:The process of changing ciphertext into plaintext is
known as decryption.
4. Key:A key is a number(set of numbers)that the cipher,as an
algorithm,operates on.It is also act as input to the encryption algorithm.
Encryption Process
It is the process of converting plain text into cipher text using key.
Encryption is a technique of translation of data into a secret
code(ciphertext).
Encryption
Decryption Process
It is a process of converting cipher text into plain text using key.
Decryption is a technique of decoded data (ciphertext)into original
data(plaintext). A secret key used for decryption.
Decryption
Plaintext Ciphertext
Plaintext Ciphertext
 Encryption Model
• Encryption model involves transforming plaintext message into
cipher text messages that are to be decrypted only by the intended
receiver.
• Both sender and receiver agree upon a secret key to be used in
encrypting and decrypting.
• To convert the plaintext ciphertext, the encryption operation takes
two parameters as input. They are the original message(p) and
key(k).
• The encryption algorithm uses an encryption function which will
produce different ciphertext values for the same plaintext values
using different key values.
• Figure shows a conventional encryption model that consist of three
components namely sender(yogita),the receiver(Amar) and
attacker(Eavesdropper).
The main objectives of this model is to enable yogita and amar to
communicate over an insecure channel in a such a way that the
attacker should not understand the original plaintext.
• Initially Yogita is generating tha plaintext P and sends it to the
encryption algorithm.
Yogita Amar
Encryption
algorithm
Decryption
algorithm
Eavesdropper
Key generator
Secure
channel
The encryption algorithm uses an encryption function to convert
plaintext P into the ciphertext C using a key value K.
After computing a ciphertext ,Yogita transmit it through insecure
channel. At the receiver side(amar),the ciphertext is converted back
into the original plaintext using the same key with the help of
decryption algorithm.
Cryptography
• Cryptography is a art of codifying messages, so that they becomes
unreadable. It is the science of using mathematics to encrypt and
decrypt data.
• Cryptography is the art of secret writing. The user can secure
his/her message using different techniques of cryptography. User
can securely store or transmit the message using these techniques.
• Cryptography system or cryptosystem convert a plaintext message
to a ciphertext message using a cryptographic key.
Welcome to
unipune
RHs %$ s89
(cipher text)
Cryptography
system
Fundamentally there are two types of Cryptosystem
1. Symmetric key Encryption
2. Asymmetric key Encryption
Symmetric key Encryption
• The encryption process where same key are used for encrypting
and decrypting the information is known as symmetric key
encryption.
• Symmetric cryptography are sometimes referred to as secret key
cryptosystems.
• Examples of symmetric key encryption methods are Digital
Encryption Standards(DES),Triple-DES(3DES),IDEA and
BLOWFISH.
Asymmetric key Encryption
• The encryption where different key are using for encrypting and
decrypting the information is known as Asymmetric key encryption.
• Though the keys are different, they are mathematically related and
hence,retrieving the plaintext by decrypting ciphertext.
Encryption - Cipher
Cipher is a method for encrypting messages
• Encryption algorithms are standardized & published
• The key which is an input to the algorithm is secret
 Key is a string of numbers or characters
 If same key is used for encryption & decryption the algorithm is called
symmetric
 If different keys are used for encryption & decryption the algorithm is
called asymmetric
Plain Text Encryption
Algorithm
Cipher Text Decryption
Algorithm
Plain Text
Key A Key B
Encryption - Symmetric Algorithms
• Algorithms in which the key for encryption and
decryption are the same are Symmetric
• Example: Caesar Cipher
Types:
1. Block Ciphers
– Encrypt data one block at a time (typically 64 bits, or 128 bits)
– Used for a single message
2. Stream Ciphers
– Encrypt data one bit or one byte at a time
– Used if data is a constant stream of information
Symmetric Algorithms – Caesar Cipher
Caesar Cipher is a method in which each letter in the
alphabet is rotated by three letters as shown
• Let us try to encrypt the message
• Attack at Dawn
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
Encryption
Decryption
Plain Text
Message:
Attack at Dawn
Cipher Text
Message:
Dwwdfn Dw Gdyq
Cipher:
Caesar Cipher
Algorithm
Key (3)
Plain Text
Message:
Attack at Dawn
Cipher Text
Message:
Dwwdfn Dw Gdyq
Cipher:
Caesar Cipher
Algorithm
Key (3)
• Any letter can be substituted for any other letter
– Each letter has to have a unique substitute
• There are 26! pairing of letters (~1026)
• Brute Force approach would be too time consuming
– Statistical Analysis would make it feasible to crack the key
Symmetric Algorithms - Monoalphabetic Cipher
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
M N B V C X Z A S D F G H J K L P O I U Y T R E W Q
Encrypted
Message:
Nkn, s gktc wky.
mgsbc
Message:
Bob, I love you.
Alice
Cipher:
Monoalphabetic
Cipher
Key
• Developed by Blaise de Vigenere
– Also called Vigenere cipher
• Uses a sequence of monoalpabetic ciphers in tandem
– e.g. C1, C2, C2, C1, C2
• Example
Symmetric Algorithms - Polyalphabetic Cipher
Encrypted
Message:
Gnu, n etox dhz.
tenvj
Message:
Bob, I love you.
Alice
Cipher:
Monoalphabetic
Cipher
Key
Plain Text A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
C1(k=6) F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
C1(k=20) T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
Example of Polyalphabetic
 Transposition Cipher
• Transposition cipher differs from substitution cipher.
• Transposition cipher do not simply replace one alphabet to another.
They also perform some permutation over to the plaintext
alphabet.
• A transposition cipher does not substitute one symbol for
another,instead it changes the location of the symbol.
• A symbol of the first position of the plaintext may appear in the
tenth position of the ciphertext.
• Columnar transposition is the example of common transposition
method.
• In this method ,one key is used which does not contain any
repeated letters.
• Columnar transposition is a transposition technique where the
plaintext is first written in n-length rows. The key often represents a
keyword of length n that defines the plaintext ordering of columns.
Transposition Cipher
Example
Plaintext: Please transfer one million dollar to my swiss bank
account six two.
Key: MEGABUCK
Solution Steps:
1. Write the key and give numbers to the alphabets
2. Write the plaintext horizontally, in rows, padded to fill the matrix
if the need be.
3. Write the ciphertext by columns, starting with the column whose
key letter is lowest.
Ciphertext:AFLLSKSOSELAWAIATOOSSCTCLNMOMANTESILYNT
WRNNTSOWDPAEDOBUOERIRICXB
M E G A B U C K
5 6 7 1 9 3 4 2
P l e a s e t r
A n s f e r o n
E m i l l i o n
D o l l a r s t
O m y s w i s s
B a n k a c c o
U n t s i x t w
O t w o a b c d

Cryptography cryptography CryptographyCryptography

  • 1.
     Cryptography • Cryptographyis a technique of securing information and communications through use of codes so that only those person for whom the information is intended can understand it and process it. • It preventing unauthorised access to information. • The prefix “crypt” means “hidden” and suffix“graphy” means “writing”. • Techniques used for cryptography : In todays age of computers cryptography is often associated with the process where an ordinary plain text is converted to cipher text which is the text made such that intended receiver of the text can only decode it and this process is known as encryption. • The process of conversion of cipher text to plain text this is known as decryption.
  • 2.
    Terminology used inCryptography 1. Plaintext and ciphertext:The original message,before being transformed is called plaintext.After the message transformed it is called as ciphertext. 2. Encryption Algorithm:The encryption algorithm is the algorithm that performs various substitution and transformation on the plaintext.Encryption is the process of changing plaintext into ciphertext. 3. Decryption Algorithm:The process of changing ciphertext into plaintext is known as decryption. 4. Key:A key is a number(set of numbers)that the cipher,as an algorithm,operates on.It is also act as input to the encryption algorithm.
  • 3.
    Encryption Process It isthe process of converting plain text into cipher text using key. Encryption is a technique of translation of data into a secret code(ciphertext). Encryption Decryption Process It is a process of converting cipher text into plain text using key. Decryption is a technique of decoded data (ciphertext)into original data(plaintext). A secret key used for decryption. Decryption Plaintext Ciphertext Plaintext Ciphertext
  • 4.
     Encryption Model •Encryption model involves transforming plaintext message into cipher text messages that are to be decrypted only by the intended receiver. • Both sender and receiver agree upon a secret key to be used in encrypting and decrypting. • To convert the plaintext ciphertext, the encryption operation takes two parameters as input. They are the original message(p) and key(k). • The encryption algorithm uses an encryption function which will produce different ciphertext values for the same plaintext values using different key values. • Figure shows a conventional encryption model that consist of three components namely sender(yogita),the receiver(Amar) and attacker(Eavesdropper).
  • 5.
    The main objectivesof this model is to enable yogita and amar to communicate over an insecure channel in a such a way that the attacker should not understand the original plaintext. • Initially Yogita is generating tha plaintext P and sends it to the encryption algorithm. Yogita Amar Encryption algorithm Decryption algorithm Eavesdropper Key generator Secure channel
  • 6.
    The encryption algorithmuses an encryption function to convert plaintext P into the ciphertext C using a key value K. After computing a ciphertext ,Yogita transmit it through insecure channel. At the receiver side(amar),the ciphertext is converted back into the original plaintext using the same key with the help of decryption algorithm.
  • 7.
    Cryptography • Cryptography isa art of codifying messages, so that they becomes unreadable. It is the science of using mathematics to encrypt and decrypt data. • Cryptography is the art of secret writing. The user can secure his/her message using different techniques of cryptography. User can securely store or transmit the message using these techniques. • Cryptography system or cryptosystem convert a plaintext message to a ciphertext message using a cryptographic key. Welcome to unipune RHs %$ s89 (cipher text) Cryptography system
  • 8.
    Fundamentally there aretwo types of Cryptosystem 1. Symmetric key Encryption 2. Asymmetric key Encryption Symmetric key Encryption • The encryption process where same key are used for encrypting and decrypting the information is known as symmetric key encryption. • Symmetric cryptography are sometimes referred to as secret key cryptosystems. • Examples of symmetric key encryption methods are Digital Encryption Standards(DES),Triple-DES(3DES),IDEA and BLOWFISH.
  • 9.
    Asymmetric key Encryption •The encryption where different key are using for encrypting and decrypting the information is known as Asymmetric key encryption. • Though the keys are different, they are mathematically related and hence,retrieving the plaintext by decrypting ciphertext.
  • 10.
    Encryption - Cipher Cipheris a method for encrypting messages • Encryption algorithms are standardized & published • The key which is an input to the algorithm is secret  Key is a string of numbers or characters  If same key is used for encryption & decryption the algorithm is called symmetric  If different keys are used for encryption & decryption the algorithm is called asymmetric Plain Text Encryption Algorithm Cipher Text Decryption Algorithm Plain Text Key A Key B
  • 11.
    Encryption - SymmetricAlgorithms • Algorithms in which the key for encryption and decryption are the same are Symmetric • Example: Caesar Cipher Types: 1. Block Ciphers – Encrypt data one block at a time (typically 64 bits, or 128 bits) – Used for a single message 2. Stream Ciphers – Encrypt data one bit or one byte at a time – Used if data is a constant stream of information
  • 12.
    Symmetric Algorithms –Caesar Cipher Caesar Cipher is a method in which each letter in the alphabet is rotated by three letters as shown • Let us try to encrypt the message • Attack at Dawn A B C D E F G H I J K L M N O P Q R S T U V W X Y Z D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
  • 13.
    Encryption Decryption Plain Text Message: Attack atDawn Cipher Text Message: Dwwdfn Dw Gdyq Cipher: Caesar Cipher Algorithm Key (3) Plain Text Message: Attack at Dawn Cipher Text Message: Dwwdfn Dw Gdyq Cipher: Caesar Cipher Algorithm Key (3)
  • 14.
    • Any lettercan be substituted for any other letter – Each letter has to have a unique substitute • There are 26! pairing of letters (~1026) • Brute Force approach would be too time consuming – Statistical Analysis would make it feasible to crack the key Symmetric Algorithms - Monoalphabetic Cipher A B C D E F G H I J K L M N O P Q R S T U V W X Y Z M N B V C X Z A S D F G H J K L P O I U Y T R E W Q Encrypted Message: Nkn, s gktc wky. mgsbc Message: Bob, I love you. Alice Cipher: Monoalphabetic Cipher Key
  • 15.
    • Developed byBlaise de Vigenere – Also called Vigenere cipher • Uses a sequence of monoalpabetic ciphers in tandem – e.g. C1, C2, C2, C1, C2 • Example Symmetric Algorithms - Polyalphabetic Cipher Encrypted Message: Gnu, n etox dhz. tenvj Message: Bob, I love you. Alice Cipher: Monoalphabetic Cipher Key Plain Text A B C D E F G H I J K L M N O P Q R S T U V W X Y Z C1(k=6) F G H I J K L M N O P Q R S T U V W X Y Z A B C D E C1(k=20) T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
  • 16.
  • 17.
     Transposition Cipher •Transposition cipher differs from substitution cipher. • Transposition cipher do not simply replace one alphabet to another. They also perform some permutation over to the plaintext alphabet. • A transposition cipher does not substitute one symbol for another,instead it changes the location of the symbol. • A symbol of the first position of the plaintext may appear in the tenth position of the ciphertext. • Columnar transposition is the example of common transposition method. • In this method ,one key is used which does not contain any repeated letters. • Columnar transposition is a transposition technique where the plaintext is first written in n-length rows. The key often represents a keyword of length n that defines the plaintext ordering of columns.
  • 18.
    Transposition Cipher Example Plaintext: Pleasetransfer one million dollar to my swiss bank account six two. Key: MEGABUCK Solution Steps: 1. Write the key and give numbers to the alphabets 2. Write the plaintext horizontally, in rows, padded to fill the matrix if the need be. 3. Write the ciphertext by columns, starting with the column whose key letter is lowest.
  • 19.
    Ciphertext:AFLLSKSOSELAWAIATOOSSCTCLNMOMANTESILYNT WRNNTSOWDPAEDOBUOERIRICXB M E GA B U C K 5 6 7 1 9 3 4 2 P l e a s e t r A n s f e r o n E m i l l i o n D o l l a r s t O m y s w i s s B a n k a c c o U n t s i x t w O t w o a b c d