Cryptography: Pratiksha Patil
Cryptography: Pratiksha Patil
Cryptography: Pratiksha Patil
PRATIKSHA PATIL
CONTENTS
o Introduction
o Need of Cryptography
o Types of Attacks
o Techniques of Cryptography
o Encryption Algorithm
• Symmetric
• Asymmetric
o Digital Signature
o Visual cryptography
INTRODUCTION
What is Cryptography?
“Hidden Writing”
Integrity
Authentication
Nonrepudiation
Access Control
Availability
TYPES OF ATTACKS
A General View:
1. Criminal attacks
2. Publicity attacks
A Technical View:
1. Passive attacks
2. Modification
3. Fabrication
A Practical Side of Attacks:
1. Application level
2. Network level
ENCRYPTION DECRYPTION
CIPHER
TEXT
SENDER RECEIVER
Caesar Cipher
Monoalphabetic Cipher
Playfair Cipher
Polyalphabetic Cipher
Transposition Technique
Asymmetric
Key pairs for encryption and decryption
Key
Original
Plaintext Ciphertext Plaintext
Encryption Decryption
Symmetric Cryptosystem
ASYMMETRIC ALGORITHM
Private keys are used for decrypting.
Public keys are used for encrypting
encryption
plaintext ciphertext
public key
decryption
ciphertext plaintext
private key
SYMMETRIC ALGORITHM
International
Data Encryption
Algorithm(IDEA):
128 bits key
DATA ENCRYPTION STANDARD
Developed by IBM and it is known as the Data Encryption
Standard
It is also known as Data Encryption Algorithm
LPT RPT
16 rounds key
Final Permutation
48-32BITS
S- box Substitution
P- box Permutation
DISADVANTAGES OF DES:
Knapsack Algorithm:
P ^ k = E ( mod n )
P is the Plain message we want to encrypt
n and k are Server's public key
E is our Encrypted message we want to generate
After plugging in the values, this equation is solved as
follows:
14 ^ 7 = E ( mod 33 )
This equation says: raise 14 to the power of 7, divide this
by 33, giving the remainder of E.
105413504 / 33 = 3194348.606
3194348 * 33 = 10541348
E = 105413504 - 10541348 = 20
So, our Encrypted message is E=20. This is now the
value that the Browser is going to send to the Server.
When the Server receives this message, it then proceeds
to Decrypt it, as follows.
Decrypting the Message
Here is the decryption math the Server executes to recover the original
Plain text message which the Browser started with.
E ^ j = P ( mod n)
E is the Encrypted message just received
j is the Server's secret key
P is the Plain message we are trying to recover
n is Server's public key
After plugging in the values:
20 ^ 3 = P ( mod 33 )
8000 / 33 = ? with the remainder of P. So to calculate this remainder:
8000 / 33 = 242.424242...
242 * 33 = 7986
P = 8000 - 7986 = 14, which is exactly the Plain text message
that the Browser started with!
DIGITAL SIGNATURE
When an author signs a document, it
cannot be changed.
31
have a variety of threats
integrity
confidentiality
denial of service
authentication
need added security mechanisms
SSL (SECURE SOCKET LAYER)
transport layer security service
originally developed by Netscape
32
uses TCP to provide a reliable end-to-end service
SSL HANDSHAKE PROTOCOL
allows server & client to:
authenticate each other
to negotiate encryption
34
to negotiate cryptographic keys to be used
comprises a series of messages in phases
Establish Security Capabilities
Server Authentication and Key Exchange
Client Authentication and Key Exchange
Finish
Overview of Visual Cryptography
Share1
Share2
Encryption Decryption
The basis matrices and the collections of the encoding matrices in
the conventional (2,2) scheme can be written as:
IMPLEMENTATION
FIG 1
2 OUT OF 2 SCHEME (4 SUB PIXELS)
share1
share2
stack
4 0
1 5
random
EXAMPLE OF TWO-OUT-OF-TWO VC SCHEME:
(a) (b)
(c) (d)
HALFTONE VISUAL CRYPTOGRAPHY
1. The halftoning technique is used to convert the gray-scale image into the binary
image.
2. The methods of halftoning that we are going to use are Error Diffusion and
Direct Binary Search.
BACKGROUND Distributions of SIPs
HALFTONE VISUAL
CRYPTOGRAPHY
44
Assign the values of
all SIPs
underlying VC
scheme
ERROR FILTER
ERROR DIFFUSION
HVC VIA ERROR DIFFUSION
Threshold
block
input
Output
Grayscale 1
image 2
Threshold of
error diffusion
Quantization
error