CN_CH_3 :Cryptography and Network Security
• Network security is an emerging field which helps to protect the computer from various attacks.
• Computer security means to protect information. Network security means protection of data on the network
during data transmission.
• Security in networking is based on cryptography.
• The key is some bits of information which is generated from a source called key generator.
CRYPTOGRAPHY :
       • Cryptography is technique of securing information using codes.
       • The cryptography is a combination of two words first one is crypto means hidden and second one is
       graphy means writing.
       • Cryptography is an art and science of transforming messages to make them secure.
       • Cryptography involves the process of encryption and decryption of messages using secret keys.
       • Encryption is a process which transforms the original message into an unreadable form.
       • The word steganography means “covered writing.
Encryption Algorithm :
     M
       • The encryption algorithm is the algorithm that performs various substitutions and transformations on the
       plaintext.
       • Encryption is the process of changing plaintext into cipher text.
Key:
       •A key is a number (or a set of numbers) that the cipher operates on.
       • It also acts as input to the encryption algorithm.
                       r.
       • The exact substitutions and transformations performed by the algorithm depend on the key.
       • a key is a number or a set of number that the algorithm uses to perform encryption and decryption.
Encryption Model :
       • Encryption model involves transforming plaintext messages into ciphertext messages.
       • In the traditional encryption model, there should be at least two parties to perform secure
                                        R
       communication.
       • The encryption algorithm uses an encryption function which will produce different ciphertext values.
Basic Terms in Cryptography :
       Plaintext:
                                                      oh
                • A message in its original form is called as plaintext.
                • Plaintext is the message to be encrypted.
                • Data in readable format called as cleartext.
       Ciphertext:
                • A message in the disguise form is called as ciphertext.
       Cryptology:
                                                                         it
                • It is the combination of cryptography and cryptanalysis.
                • The union/combination of cryptography and cryptanalysis is called as cryptology.
       Encryption:
                • It is the process of converting plaintext into ciphertext using key.
                • Encryption is a technique of translation of data into a secret code.
       Decryption:
                • It is the process of converting cipher text into plain text using key.
                • Decryption is a technique of translation of decoded data into original data.
SYMMETRIC KEY CRYPTOGRAPHY :
       • Symmetric key cryptography (or symmetric
       encryption) is a type of encryption technique in
       which the same key is used both to encrypt and
       decrypt messages.
       • symmetric key cryptography also called as
       single key/secret key/shared key cryptography.
       • This key is shared between sender and receiver
       and known to only sender.
       • In symmetric encryption the plaintext gets
       encrypted and then converted to the ciphertext
       using an encryption algorithm and a key.
       Advantages:
       Simple, Fast, Uses Less Computer Resources,
     M
Traditional Ciphers :
        • Traditional ciphers are called symmetric key ciphers or secret key ciphers s because the same key is used
        for encryption and decryption.
        Substitution Cipher:
                • In a substitution cipher, each letter or group of letters are replaced by another letter or group of
                        r.
                letters
                • A substitution cipher replaces one symbol with another.
                • Substitution ciphers can be categorized as either monoalphabetic ciphers or polyalphabetic ciphers.
        Transposition Cipher:
                • Transposition ciphers differ from substitution ciphers.
                • Transposition ciphers do not simply replace one alphabet with another
                                          R
                • A transposition cipher does not substitute one symbol for another, instead it changes the location
                of the symbols.
Data Encryption Standard (DES):
        • DES is a symmetric key algorithm, which means that the same key is used for encrypting and decrypting
                                                        oh
        data.
        • DES takes a 64-bit ciphertext and creates a 64-bit block of plaintext.
Electronic Code Book (ECB) Mode:
        • This mode is a most straight-forward way of processing a series of sequentially listed message blocks.
                • The user takes the first block of plaintext and encrypts it with the key to produce the first block of
        ciphertext.
                                                                             it
        • The ECB mode is deterministic.
ASYMMETRIC KEY CRYPTOGRAPHY :
     • Asymmetric Encryption also called as Public Key Cryptography and it uses two different keys - a public key
     and a private key.
     • a public key used for encryption and a private key used for decryption.
     • This encryption technique utilizes a pair of keys for the encryption and decryption processes.
     • The public key is normally used for encryption while the private key is applied for decryption of the
     message.
     Advantages:
             Convenience, Provides for Message Authentication, Provide for Non-Repudiation.
     Disadvantages:
             Slow, Uses more Computer Resources,
Sr.
                           Symmetric Key Cryptography                                             Asymmetric Key Cryptography
No.
1.    It uses a single key (secret key) for both encryption and decryption of data. It uses two different keys public key for encryption and private
                                                                                    key for decryption.
2.    Both the communicating parties share the same algorithm and the key.         Both the communicating parties should have at least one of the
                                                                                   matched pair of keys.
3.    The processes of encryption and decryption are very fast.                    The encryption and decryption processes are slower.
4.    Key distribution is a big problem.                                           Key distribution is not a problem.
5.    The size of encrypted text is usually same or less than the original text.   The size of encrypted text is usually more than the size of the
                                                                                   original text.
6.    Based on substitution and permutation of symbols (characters or bits).       Based on applying mathematical functions to numbers.
7.    It can only be used for confidentiality, i.e., only for encryption and       It can be used for confidentiality of data as well as for integrity
      decryption of data.                                                          and nonrepudiation checks (i.e., far digital signatures).
8.    DES and AES are the commonly used symmetric-encryption algorithms.           The most commonly used asymmetricencryption algorithm is
                                                                                   RSA.
         M
 Message Integrity :
         • Message integrity means that the data must arrive at the receiver exactly as it was sent.
         • There must be no changes of modifications in the data content during transmission.
         • Message integrity describes the concept of ensuring that data has not been modified.
                                r.
 Message Authentication :
         • A MAC is a cryptographic checksum on data that uses a session key to detect accidental data.
         • MAC algorithm is a symmetric key cryptographic technique to provide message authentication.
         • MAC is a short piece of information used to authenticate a message
         • in other words to confirm that the message came from the stated sender (its authenticity) and has not
         been changed
                                                      R
 Digital Signature :
         • The digital signature is a technique which is used to validate the authentication and integrity of the
         message.
         • A digital signature is a mathematical technique used to validate the authenticity and integrity of a
                                                                       oh
         message.
         • A digital signature is an electronic version of a paper signature
                                                                                               it