Nis Chapter 3
Nis Chapter 3
Application of cryptography:
DIGITAL SIGNATURE
Data Hiding: The original use of cryptography is to hide something that has
been written.
Electronic payment: When electronic payments are sent through a network, the
biggest risk is that the payment message will alter. Cryptographic technique will
Message Authentication: One cannot entirely prevent someone from tampering with the network and
changing the message, but if this happens it can certainly be detected. This process of checking the integrity of
• CipherText:
• Unreadable text OR Understandable text.
• Enciphering or encryption:
• The process by which plaintext is converted into ciphertext.
DEFINATIONS
• . Deciphering or Decryption:
• Recovering plaintext from cipher text.
CRYPTOGRAPHY
Cryptograph
Readable Unreadable
ic
message message
ALGORITHM
DEFINATIONS
• Encryption:
The process of encoding plain text into cipher text message is known
as Encryption.
• Decryption:
The process of transforming cipher text message into plain text or
original text is known as Decryption.
• Cipher Text:
--When a plain text message is codified using any suitable
scheme/method , the resulting message is called as cipher text.
Sender…plain text…Encrypt…..cipher text
Receiver….cipher text….decrypt…plain text
• Cryptanalysis
Cryptanalysis is the technique of decoding messages from a non-
readable format back to readable format.( without knowing how they
were initially converted from readable format to non-readable format )
• Cryptology :
cryptanalysis.
CLASSICAL ENCRYPTION TECHNIQUES
##Substitution Ciphers
• Caesar cipher
• Monoalphabetic ciphers
• Playfair cipher
• Polyalphabetic ciphers
##Transposition (permutation) Ciphers
Julius Caesar.
• The Caesar cipher involves replacing each letter of the alphabet with the letter standing
• For example,
• Note that the alphabet is wrapped around, so that the letter following Z is A.
• Plain: 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
• Cipher: 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
MONO-ALPHABETIC CIPHERS
REPLACED BY A ALSO.)
POLYGRAM SUBSTITUTION CIPHER
1) secret key cryptography(symmetric) - uses single key for both encryption and
decryption.
2) Public key cryptography(asymmetric) – uses one key for encryption and another
for decryption
Symmetric key cryptography: Involves the use of same key for encryption and
decryption.
• Asymmetric key cryptography : Involves the use of one key for encryption and
another, different key for decryption
SYMMETRIC CRYPTOGRAPHY/ENCRYPTION
SYMMETRIC CRYPTOGRAPHY/ENCRYPTION
private-key / single-key/symmetric
Symmetric encryption is a type of encryption where only one key (a secret key) is
used to both encrypt and decrypt electronic information.
The symmetric encryption must exchange the key so that it can be used in the
decryption process.
This encryption method differs from asymmetric encryption where a pair of keys,
one public and one private, is used to encrypt and decrypt messages.
One of the chief weaknesses of symmetric key cryptography lies in the use of one
key.
If the key is exposed beyond the sender and the receiver, it is possible for an
attacker to decrypt the message and can alter it, and pass it to the receiver in
place of the original message.
Since such issues are present, symmetric key cryptography by itself provides only
confidentiality, and not integrity
SYMMETRIC CRYPTOGRAPHY/ENCRYPTION
**Encryption algorithm divided into two types:
Block cipher
Stream cipher
It is also possible for a block cipher to act as a stream cipher by setting a block
size of 1 bit.
A large majority of the encryption algorithms in use at present are block ciphers.
Although block ciphers are often slower than stream ciphers, they tend to be more efficient.
ASYMMETRIC CRYPTOGRAPHY
Public key cryptography(asymmetric) – uses one key for encryption and another
for decryption.
ASYMMETRIC CRYPTOGRAPHY
ASYMMETRIC CRYPTOGRAPHY
asymmetric systems use two keys . One of the keys can be publicly shared (public key), while the
other must be kept in private (private key).
Asymmetric algorithms are more complex and slower than the symmetric ones.
One key used for encryption and another, different key for decryption.
• Asymmetric algorithms rely on one key for encryption and a different but related key for decryption.
The use of steganography can be combined with encryption as an extra step for hiding
or protecting data.
The word steganography is derived from the Greek words steganos (meaning hidden or
covered)
1)COVER MEDIUM: is the data or media (i.e text/audio data/video data) in which
cover media
4)REDUNDANT BITS: Bits or Data in cover medium that can be modified without
compromising integrity
STEGANOGRAPHY
DIGITAL SIGNATURE
1). Signing part: It allows the sender to create his digital signature.
2). Verification part: It is used by the receiver for verifying the signature after
receiving the message.
Generation and Verification of digital signatures
Generation and Verification of digital signatures:
Working: 1. Message digest is used to generate the signature. The message digest (MD) is calculated from
the plaintext or message.
3. Then, the sender sends this encrypted message digest with the plaintext or message to the receiver
4. The receiver calculates the message digest from the plain text or message he received.
5. Receiver decrypts the encrypted message digest using the sender‟s public key. If both the MDs are not
same then the plaintext or message is modified after signing
Advantages of Digital Signatures
Step 3: After the 16th round the 32-bit LPT and 32-bit RPT are integrated
which forms a 64-bit block again and then the final permutation is
applied to this 64-bit block, to obtain the 64-bit cipher text.
DES-DATA ENCRYPTION STANDARD
Rounds in Data Encryption Standard :Each round of DES performs the
same function. So, below are the steps of the function performed in each round
of DES algorithm:
1. Key Transformation: -In DES initial key size is 64-bit which is reduced to
the 56-bit key. This is done by discarding every 8th bit from the 64-bit key. So,
for each round of DES, this 56-bit key is used. In the key transformation step,
this 56-bit is transformed to the 48-bit key.
2. Expansion Permutation: -In the first step of encryption, during the initial
permutation of DES, the 64-bit plain text is permuted and we have 32-bit LPT
and 32-bit RPT. Now, the expansion permutation is performed on the 32-bit RPT
which transforms it from 32-bit to 48- bit. The 32-bit LPT is untouched during
the process.
3. S-box Substitution:-The input to S-box is 48-bit resultant block of
expansion permutation. In S-box substitution, the input 48-bit block is
transformed to 32-bit block
4. P-box Permutation:- The 32-bit output obtained from s-box substitution is
provided as an input to P-box. Here, the 32-bit input is simply permuted and
send to the next step.
DES-DATA ENCRYPTION STANDARD
5. XOR and Swap:-
In this step, the 32-bit LPT of the initial 64-bit plain text is XOR with the
output of P-box permutation. The result of the XOR is the new RPT for next
round and the old RPT is swapped with LPT.
DES Decryption:-
The same Data Encryption Standard algorithm used for encrypting the plain
text is also used to decrypting the cipher text. But the algorithm is
reversed, such as the initial and final permutation events are reversed.
Even the sequence of the sub keys applied in 16 rounds of DES is also
reversed.