SlideShare a Scribd company logo
Introduction to Cryptography
MUKESH MAHADEV
2014KUCP1012
IIIT KOTA
1
OVERVIEW
2
• Cryptography
•Some Basic Terminology
• Encryption & Decryption
• Transmission Technique
• Symmetric Cryptography
• Asymmetric Cryptography
• References
WHAT IS CRYPTOGRAPHY ?
3
•Cryptography is the science of using
mathematics to encrypt and decrypt data.
•Cryptography enables you to store
sensitive information or transmit it across
insecure networks so that it cannot be
read by anyone except the intended
recipient.
Some Basic Terminology
4
•Plaintext
•Encryption
•Cipher text
•Decryption
•Key
ENCRYPTION & DECRYPTION
5
WHY USE CRYPTOGRAPHY ?
6
• For “secret writing”
• To establish a shared secret when other
people are listening.
• TYPES
Mainly classified into two types :
1. Symmetric key cryptography
2. Asymmetric key cryptography
TRANSMISSION TECHNIQUE
7
Cipher
msg
Plain text – in
Cipher text - out
Should understand NOTHING
about the message
Cipher text – in
Plain text - out
SYMMETRIC KEY CRYPTOGRAPHY
BOTH SHOULD
KNOW THE KEY
8
where letters of plaintext are replaced by
other letters or by numbers or symbols or
if plaintext is viewed as a sequence of
bits, then substitution involves replacing
plaintext bit patterns with ciphertext bit
patterns
Classical Substitution Ciphers
9
Caesar Cipher
Replaces each letter by 3rd letter after
example:
meet me after the toga party
phhw ph diwhu wkh wrjd sduwb
10
Caesar Cipher
can define transformation as:
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
mathematically give each letter a number
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
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
19 20 21 22 23 24 25
then have Caesar cipher as:
c = E(p) = (p + k) mod (26)
p = D(c) = (c – k) mod (26) 11
Playfair Cipher
In this scheme, pairs of letters are encrypted, instead of
single letters as in the case of simple substitution cipher.
a 5X5 matrix of letters based on a keyword
eg. using the keyword TUTORIALS
12
Continue ..
we want to encrypt the message “hide money”
HI DE MO NE YZ
The rules of encryption are −
1).If both the letters are in the same column, take
the letter below each one
13
Continue..
2).If both letters are in the same row, take the
letter to the right of each one
3).If neither of the preceding two rules are true
ans: - QC EF NU MF ZV 14
Vigenere Cipher
This scheme of cipher uses a text string (a word) as
a key, which is then used for doing a number of
shifts on the plaintext.
example:- key is ‘point’
p → 16, o → 15, i → 9, n → 14, and t → 20.
Thus, the key is: 16 15 9 14 20.
message:- ‘attack from south east’
15
Variants of Vigenere Cipher
There are two special cases of Vigenere cipher −
1).The keyword length is same as plaintect
message. This case is called Vernam Cipher. It
is more secure than typical Vigenere cipher.
2).Vigenere cipher becomes a cryptosystem with
perfect secrecy, which is called One-time pad.
16
One-Time Pad
● The length of the keyword is same as the length
of the plaintext.
● The keyword is a randomly generated string of
alphabets.
● The keyword is used only once
17
Transposition Cipher
Mapping is performed by some sort of permutation
on the plaintext letters.
Example: take column length 5
plaintext is “golden statue is in eleventh cave”
ciphertext is ‘gnuneaoseenvltiltedasehetivc’ 18
ASYMMETRIC KEY CRYPTOGRAPHY
19
• Public key cryptography is an asymmetric
scheme that uses a Pair of keys for
encryption: a Public key, which encrypts data,
and a corresponding Private key (secret key)
for decryption.
Rivest Shamir and Adelman(RSA)
20
Encryption key- public
Decryption key- private
RSA Algorithm
21
Choose two very large prime numbers. Denote
these numbers as p and q.
Set n= p * q
f(n)=(p-1)*(q-1)
Choose any large integer, e, such that
GCD(e, f(n)) = 1 and 1<e<f(n)
Find d such that (e * d)(mod f(n)) = 1
Continue..
Encryption
C=M ^ e (mod n)
C:Cipher Text
M:Plain text
e:public key
Decryption
M=C ^ d (mod n)
C:Cipher Text
M:Plain Text
D:Private key
22
Example: RSA
Lets choose two primes: p=11 and q=13
n = p*q = 143
f(n)=(p-1)*(q-1)=120
public key, Let's choose 7 (note: both 3 and 5 do
not have a gcd of 1 with f(n)) e=7;
determine d the secret key, d=103
e⋅d=1mod f(n)
7*103=721=1mod120.
23
Example: RSA
n=143
e=7, d=103
Lets choose our plaintext message, m to be 9
Encryption:
me mod n=97mod 143=48=c
Decryption:
cd mod n = 48103 mod 143 = 9 = m
24
REFERENCE
•http://doctrina.org/How-RSA-Works-With-
Examples.html
•http://www.tutorialspoint.com/cryptography/tr
aditional_ciphers.htm
• http://en.wikipedia.org/wiki/Cryptography
• https://www.coursera.org/course/crypto
25
Thank
you….
26

More Related Content

What's hot

caeser chiper
caeser chiper caeser chiper
caeser chiper
Shafiqah Emilia
 
Caesar cipher
Caesar cipherCaesar cipher
Caesar cipher
Ramadhi Irawan
 
Traditional symmetric-key cipher
Traditional symmetric-key cipherTraditional symmetric-key cipher
Traditional symmetric-key cipher
Vasuki Ramasamy
 
A Concise Introduction to Cryptographic Concepts
A Concise Introduction to Cryptographic ConceptsA Concise Introduction to Cryptographic Concepts
A Concise Introduction to Cryptographic Concepts
Gokul Alex
 
What is Cryptography?
What is Cryptography?What is Cryptography?
What is Cryptography?
Pratik Poddar
 
Cryptography
CryptographyCryptography
Cryptography
Pratiksha Patil
 
My cryptography
My cryptographyMy cryptography
My cryptography
NAVYA RAO
 
Cyber security
Cyber securityCyber security
Cyber security
SAKSHIMAHADIK
 
Cryptology
CryptologyCryptology
Cryptology
Rupesh Mishra
 
Cryptography
CryptographyCryptography
Cryptography
prasham95
 
Cryptography
CryptographyCryptography
Cryptography
KARNAN L S
 
Encryption
EncryptionEncryption
Encryption
vasanthimuniasamy
 
Cryptography ppt by vaishnavi khandelwal
Cryptography ppt by vaishnavi khandelwal Cryptography ppt by vaishnavi khandelwal
Cryptography ppt by vaishnavi khandelwal
VaishnaviKhandelwal6
 
Crytography
CrytographyCrytography
Crytography
Subesh Kumar Yadav
 
Cryptography
CryptographyCryptography
Cryptography
IGZ Software house
 
Cryptography
CryptographyCryptography
Cryptography
subodh pawar
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
Uday Meena
 
Network security cryptography ppt
Network security cryptography pptNetwork security cryptography ppt
Network security cryptography ppt
Thushara92
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
Md. Afif Al Mamun
 
Bakiya
BakiyaBakiya

What's hot (20)

caeser chiper
caeser chiper caeser chiper
caeser chiper
 
Caesar cipher
Caesar cipherCaesar cipher
Caesar cipher
 
Traditional symmetric-key cipher
Traditional symmetric-key cipherTraditional symmetric-key cipher
Traditional symmetric-key cipher
 
A Concise Introduction to Cryptographic Concepts
A Concise Introduction to Cryptographic ConceptsA Concise Introduction to Cryptographic Concepts
A Concise Introduction to Cryptographic Concepts
 
What is Cryptography?
What is Cryptography?What is Cryptography?
What is Cryptography?
 
Cryptography
CryptographyCryptography
Cryptography
 
My cryptography
My cryptographyMy cryptography
My cryptography
 
Cyber security
Cyber securityCyber security
Cyber security
 
Cryptology
CryptologyCryptology
Cryptology
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Encryption
EncryptionEncryption
Encryption
 
Cryptography ppt by vaishnavi khandelwal
Cryptography ppt by vaishnavi khandelwal Cryptography ppt by vaishnavi khandelwal
Cryptography ppt by vaishnavi khandelwal
 
Crytography
CrytographyCrytography
Crytography
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Network security cryptography ppt
Network security cryptography pptNetwork security cryptography ppt
Network security cryptography ppt
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Bakiya
BakiyaBakiya
Bakiya
 

Similar to Introduction to cryptography

Cryptography and applications
Cryptography and applicationsCryptography and applications
Cryptography and applications
thai
 
Introduction to cryptography part2-final
Introduction to cryptography  part2-finalIntroduction to cryptography  part2-final
Introduction to cryptography part2-final
Taymoor Nazmy
 
Information security (Symmetric encryption, cryptography, crypto-analysis)
Information security (Symmetric encryption, cryptography, crypto-analysis)Information security (Symmetric encryption, cryptography, crypto-analysis)
Information security (Symmetric encryption, cryptography, crypto-analysis)
Zara Nawaz
 
Cryptography and network security Nit701
Cryptography and network security Nit701Cryptography and network security Nit701
Cryptography and network security Nit701
Amit Pathak
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniques
babak danyal
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Security
babak danyal
 
Cryptography & Steganography
Cryptography & SteganographyCryptography & Steganography
Cryptography & Steganography
Animesh Shaw
 
EncryptionTechChap2.ppt
EncryptionTechChap2.pptEncryptionTechChap2.ppt
EncryptionTechChap2.ppt
rajirajesh8
 
Cryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptxCryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptx
RobertCarreonBula
 
4.Cryptography handout 2.pptx
4.Cryptography  handout 2.pptx4.Cryptography  handout 2.pptx
4.Cryptography handout 2.pptx
MikiAbera
 
Ch02...1
Ch02...1Ch02...1
Ch02...1
nathanurag
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
Janani S
 
Unit 1
Unit 1Unit 1
Cyptography and network security
Cyptography and network securityCyptography and network security
Cyptography and network security
Priyanka Karancy
 
SYMMETRIC CRYPTOGRAPHY
SYMMETRIC CRYPTOGRAPHY SYMMETRIC CRYPTOGRAPHY
SYMMETRIC CRYPTOGRAPHY
Santosh Naidu
 
Unit-2-IS (1).pdf
Unit-2-IS (1).pdfUnit-2-IS (1).pdf
Unit-2-IS (1).pdf
ShaikSameena24
 
Ch12 Encryption
Ch12 EncryptionCh12 Encryption
Ch12 Encryption
phanleson
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherCaesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Mona Rajput
 
Secure Encyrption Systems Chapter 2
Secure Encyrption Systems Chapter 2Secure Encyrption Systems Chapter 2
Secure Encyrption Systems Chapter 2
AfiqEfendy Zaen
 
Cryptography
CryptographyCryptography
Cryptography
Nishant Pahad
 

Similar to Introduction to cryptography (20)

Cryptography and applications
Cryptography and applicationsCryptography and applications
Cryptography and applications
 
Introduction to cryptography part2-final
Introduction to cryptography  part2-finalIntroduction to cryptography  part2-final
Introduction to cryptography part2-final
 
Information security (Symmetric encryption, cryptography, crypto-analysis)
Information security (Symmetric encryption, cryptography, crypto-analysis)Information security (Symmetric encryption, cryptography, crypto-analysis)
Information security (Symmetric encryption, cryptography, crypto-analysis)
 
Cryptography and network security Nit701
Cryptography and network security Nit701Cryptography and network security Nit701
Cryptography and network security Nit701
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniques
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Security
 
Cryptography & Steganography
Cryptography & SteganographyCryptography & Steganography
Cryptography & Steganography
 
EncryptionTechChap2.ppt
EncryptionTechChap2.pptEncryptionTechChap2.ppt
EncryptionTechChap2.ppt
 
Cryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptxCryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptx
 
4.Cryptography handout 2.pptx
4.Cryptography  handout 2.pptx4.Cryptography  handout 2.pptx
4.Cryptography handout 2.pptx
 
Ch02...1
Ch02...1Ch02...1
Ch02...1
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Unit 1
Unit 1Unit 1
Unit 1
 
Cyptography and network security
Cyptography and network securityCyptography and network security
Cyptography and network security
 
SYMMETRIC CRYPTOGRAPHY
SYMMETRIC CRYPTOGRAPHY SYMMETRIC CRYPTOGRAPHY
SYMMETRIC CRYPTOGRAPHY
 
Unit-2-IS (1).pdf
Unit-2-IS (1).pdfUnit-2-IS (1).pdf
Unit-2-IS (1).pdf
 
Ch12 Encryption
Ch12 EncryptionCh12 Encryption
Ch12 Encryption
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherCaesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
 
Secure Encyrption Systems Chapter 2
Secure Encyrption Systems Chapter 2Secure Encyrption Systems Chapter 2
Secure Encyrption Systems Chapter 2
 
Cryptography
CryptographyCryptography
Cryptography
 

Recently uploaded

Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
IJNSA Journal
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 

Recently uploaded (20)

Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMSA SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
A SYSTEMATIC RISK ASSESSMENT APPROACH FOR SECURING THE SMART IRRIGATION SYSTEMS
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 

Introduction to cryptography

  • 1. Introduction to Cryptography MUKESH MAHADEV 2014KUCP1012 IIIT KOTA 1
  • 2. OVERVIEW 2 • Cryptography •Some Basic Terminology • Encryption & Decryption • Transmission Technique • Symmetric Cryptography • Asymmetric Cryptography • References
  • 3. WHAT IS CRYPTOGRAPHY ? 3 •Cryptography is the science of using mathematics to encrypt and decrypt data. •Cryptography enables you to store sensitive information or transmit it across insecure networks so that it cannot be read by anyone except the intended recipient.
  • 6. WHY USE CRYPTOGRAPHY ? 6 • For “secret writing” • To establish a shared secret when other people are listening. • TYPES Mainly classified into two types : 1. Symmetric key cryptography 2. Asymmetric key cryptography
  • 7. TRANSMISSION TECHNIQUE 7 Cipher msg Plain text – in Cipher text - out Should understand NOTHING about the message Cipher text – in Plain text - out
  • 8. SYMMETRIC KEY CRYPTOGRAPHY BOTH SHOULD KNOW THE KEY 8
  • 9. where letters of plaintext are replaced by other letters or by numbers or symbols or if plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with ciphertext bit patterns Classical Substitution Ciphers 9
  • 10. Caesar Cipher Replaces each letter by 3rd letter after example: meet me after the toga party phhw ph diwhu wkh wrjd sduwb 10
  • 11. Caesar Cipher can define transformation as: 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 mathematically give each letter a number 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 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 then have Caesar cipher as: c = E(p) = (p + k) mod (26) p = D(c) = (c – k) mod (26) 11
  • 12. Playfair Cipher In this scheme, pairs of letters are encrypted, instead of single letters as in the case of simple substitution cipher. a 5X5 matrix of letters based on a keyword eg. using the keyword TUTORIALS 12
  • 13. Continue .. we want to encrypt the message “hide money” HI DE MO NE YZ The rules of encryption are − 1).If both the letters are in the same column, take the letter below each one 13
  • 14. Continue.. 2).If both letters are in the same row, take the letter to the right of each one 3).If neither of the preceding two rules are true ans: - QC EF NU MF ZV 14
  • 15. Vigenere Cipher This scheme of cipher uses a text string (a word) as a key, which is then used for doing a number of shifts on the plaintext. example:- key is ‘point’ p → 16, o → 15, i → 9, n → 14, and t → 20. Thus, the key is: 16 15 9 14 20. message:- ‘attack from south east’ 15
  • 16. Variants of Vigenere Cipher There are two special cases of Vigenere cipher − 1).The keyword length is same as plaintect message. This case is called Vernam Cipher. It is more secure than typical Vigenere cipher. 2).Vigenere cipher becomes a cryptosystem with perfect secrecy, which is called One-time pad. 16
  • 17. One-Time Pad ● The length of the keyword is same as the length of the plaintext. ● The keyword is a randomly generated string of alphabets. ● The keyword is used only once 17
  • 18. Transposition Cipher Mapping is performed by some sort of permutation on the plaintext letters. Example: take column length 5 plaintext is “golden statue is in eleventh cave” ciphertext is ‘gnuneaoseenvltiltedasehetivc’ 18
  • 19. ASYMMETRIC KEY CRYPTOGRAPHY 19 • Public key cryptography is an asymmetric scheme that uses a Pair of keys for encryption: a Public key, which encrypts data, and a corresponding Private key (secret key) for decryption.
  • 20. Rivest Shamir and Adelman(RSA) 20 Encryption key- public Decryption key- private
  • 21. RSA Algorithm 21 Choose two very large prime numbers. Denote these numbers as p and q. Set n= p * q f(n)=(p-1)*(q-1) Choose any large integer, e, such that GCD(e, f(n)) = 1 and 1<e<f(n) Find d such that (e * d)(mod f(n)) = 1
  • 22. Continue.. Encryption C=M ^ e (mod n) C:Cipher Text M:Plain text e:public key Decryption M=C ^ d (mod n) C:Cipher Text M:Plain Text D:Private key 22
  • 23. Example: RSA Lets choose two primes: p=11 and q=13 n = p*q = 143 f(n)=(p-1)*(q-1)=120 public key, Let's choose 7 (note: both 3 and 5 do not have a gcd of 1 with f(n)) e=7; determine d the secret key, d=103 e⋅d=1mod f(n) 7*103=721=1mod120. 23
  • 24. Example: RSA n=143 e=7, d=103 Lets choose our plaintext message, m to be 9 Encryption: me mod n=97mod 143=48=c Decryption: cd mod n = 48103 mod 143 = 9 = m 24