SlideShare a Scribd company logo
Fubswrjudskb
Frxuvh qxpehu: 4003-482 / 4005-705
Lqvwuxfwru: Lyrqd Ehcdnryd
Wrgdb’v Wrslfv:
1. Orjlvwlfv:
- Fodvv olvw
- Vboodexv
2. Wkh Pdwk
3. Zkdw lv Fubswrjudskb
4. Vrph Fodvvlfdo Fubswrvbvwhpv
Cryptography
Course number: 4003-482 / 4005-705
Instructor: Ivona Bezáková
Today’s topics:
1. Logistics:
- Class list
- Syllabus
2. The Math
3. What is Cryptography
4. Some Classical Cryptosystems
The Math
We will go beyond descriptions of cryptographic algorithms
and ways how to break them.
We will use a lot of math and CS theory in this course,
including:
- some abstract algebra (number theory, groups, rings, fields)
- some linear algebra
- some probability and information theory
- some complexity theory
It is important to be comfortable with math!
What is Cryptography
- the study of secure communication over insecure channels.
Typical scenario:
Alice Bob
Eve
What is Cryptography
Alice Bob
Eve
Private-key cryptosystems: Chapter 2 (& 4)
- Alice and Bob agree on a key beforehand
Alice: plaintext -> encryption (via the key) -> ciphertext ->
send to Bob
Bob: decrypt the ciphertext (using the key) to reconstruct
the plaintext
What is Cryptography
Eve:
- she does not know the key, she cannot decrypt… ???
- she tries to read the current message, she can also try to
figure out the key
- in our book she sometimes acts as a malicious active attacker
(usually called Mallory): corrupting Alice’s message, or
masquerading as Alice
Symmetric-key cryptosystems:
- private-key cryptosystems use (essentially) the same key for
encryption and decryption
Some Cryptanalysis Terminology
Cryptanalysis
- the process of attempting to compute the key
- the most common attack models:
- ciphertext only attack
- known plaintext attack
- chosen plaintext attack
- chosen ciphertext attack
What’s the weakest type of attack?
Cryptographic Applications
1. Confidentiality
2. Data integrity
3. Authentication
4. Non-repudiation
Classical Cryptosystems
(Starting Chapter 2, sneaking in some math from Chapter 3.)
Conventions:
- plaintext: lowercase
- CIPHERTEXT: uppercase
- Spaces and punctuations will be usually omitted.
- Letter of the alphabet will be often identifies with numbers
0,1,…,25.
Monoalphabetic Ciphers
- Each letter is mapped to a unique letter.
- Examples: shift cipher, substitution cipher, affine cipher
- We will need modular arithmetic (and we’ll introduce more
than we need in this chapter – it will all be useful later).
Modular Arithmetic
Let a, b be integers, m be a positive integer.
We write:
a ´ b (mod m)if m divides (a-b)
(Read it as: “a is congruent to b mod m”.)
Examples: (true/false)
7 ´ 5 (mod 3) 4 ´ 1 (mod 3)
7 ´ 1 (mod 3) -4 ´ -1 (mod 3)
66 ´ 0 (mod 3) -8 ´ 7 (mod 3)
Modular Arithmetic
Let a be an integer, m be a positive integer.
We use:
a mod m
to denote the remainder when a is divided by m. The
remainder is always a number from {0,1,2,…,m-1}.
Examples:
8 mod 3 = 1 mod 1 = 0 mod 2 =
63 mod 7 = -8 mod 3 =
3 mod 6 = -63 mod 7 =
Is % in Java/C/C++ the same as mod ?
Modular Arithmetic
Zm denotes the set {0,1,2,…,m-1}, with two operations:
- addition (modulo m)
- multiplication (modulo m)
Zm is a commutative ring, i.e.:
- addition and multiplication (mod m) are closed, commutative,
associative, and multiplication is distributive over addition
- 0 is the additive identity
- each element has an additive inverse
Modular Arithmetic
Zm denotes the set {0,1,2,…,m-1}, with two operations:
- addition (modulo m)
- multiplication (modulo m)
Zm is a commutative ring, i.e.:
- addition and multiplication (mod m) are closed, commutative,
associative, and multiplication is distributive over addition
- 0 is the additive identity
- each element has an additive inverse
Shift Cipher
The key k is an element of Z26.
We encrypt a letter x 2 Z26 as follows:
x  (x+k) mod 26
How to decrypt ?
x 
Remarks:
- For k=3 this is known as the Caesar cipher, attributed to
Julius Caesar.
- Shift cipher works over any Z .
Shift Cipher
How good is it ?
- the good: efficient encryption/decryption computation
- the bad: easy to attack (not very secure)
- how ?
Kerckhoff’s Principle:
- Eve knows the cipher but does not know the key.
- Always assumed in cryptanalysis.
Substitution Cipher
- Monoalphabetic cipher defined by a permutation of the
alphabet.
- Example:
abcdefghijklmnopqrstuvwxyz
ONETWHRFUISXVGABCDJKLMPQYZ
What is the key in this example ?
- Exercise:
decode: EDYBKARDOBFY
Substitution Cipher
How good is it ?
- the good: efficient encryption/decryption
- the bad(?): is it secure ?
- approach 1: try all possible keys
- is this feasible ?
Hint: frequency tables, e.g., for English see Table 2.1, page 17
Affine Ciphers
The key is a pair (®,¯) 2 Z26£Z26 such that gcd(®,26)=1.
Then, encryption is done via an affine function:
x  (®x + ¯) mod 26
How to decrypt ?
x 
Remark: The affine cipher can be defined over any Zm.
Affine Ciphers
Questions:
- How does it relate to the shift and the substitution
ciphers ?
- How many possible keys are there ?
- Why do we have the condition gcd(®,26)=1 ?
- What is ®-1
?
Affine Ciphers
Questions:
- Efficiently computable encryption and decryption ?
- Is it secure ? How to cryptanalyze ?

More Related Content

PPTX
Cryptography and its types and Number Theory .pptx
GoharCh3
 
PPTX
Introduction to cryptography part2-final
Taymoor Nazmy
 
KEY
Cryptography for developers
Kai Koenig
 
PPTX
RC CNS unit 2.pptx types of algorithms in cns
swethajosephsastry
 
PPTX
Cryptography chap#6.pptx
HamnaMalik31
 
PPTX
2 Mathematics of Cryptographyy chapter 2
ShivaniSehrawat3
 
PDF
internal assement 3
Saturnin Pugnet
 
Cryptography and its types and Number Theory .pptx
GoharCh3
 
Introduction to cryptography part2-final
Taymoor Nazmy
 
Cryptography for developers
Kai Koenig
 
RC CNS unit 2.pptx types of algorithms in cns
swethajosephsastry
 
Cryptography chap#6.pptx
HamnaMalik31
 
2 Mathematics of Cryptographyy chapter 2
ShivaniSehrawat3
 
internal assement 3
Saturnin Pugnet
 

Similar to crypto_1vdgfhhhggggjjgghghghgggghhhhhfhhhhhhjhvcgghcghggg (20)

PPTX
Cryptology
Rupesh Mishra
 
PPTX
Chapter 3.0.pptx and image processing of security
yhalemayalu
 
PPT
Session-1 CRYPTO_Intro_basics_part1.0.ppt
VarshaSaini48
 
PPTX
IEDA 3302 e-commerce_secure-communications.pptx
ssuser6d0da2
 
PPTX
Cryptography in discrete structure .pptx
ayeshaimtiaz067
 
PPT
Cryptography
nayakslideshare
 
PPT
Cipher techniques
Mohd Arif
 
PPT
Encryptolog y-1216310707267721-9
Shan Raja
 
PPT
Cryptography - An Overview
ppd1961
 
PPS
Itt project
Harish Kumar
 
PDF
3 Basics of Cryptography Basics of Cryptography
MohammedMorhafJaely
 
PPTX
Cryptography
David Hoen
 
PPTX
Cryptography
Young Alista
 
PPTX
Cryptography
James Wong
 
PPTX
Cryptography
Luis Goldster
 
PPTX
Cryptography
Tony Nguyen
 
PPTX
Cryptography
Harry Potter
 
PPTX
Cryptography
Fraboni Ec
 
PDF
Cryptanalysis - basic ciphers and a bit more
Things Lab
 
Cryptology
Rupesh Mishra
 
Chapter 3.0.pptx and image processing of security
yhalemayalu
 
Session-1 CRYPTO_Intro_basics_part1.0.ppt
VarshaSaini48
 
IEDA 3302 e-commerce_secure-communications.pptx
ssuser6d0da2
 
Cryptography in discrete structure .pptx
ayeshaimtiaz067
 
Cryptography
nayakslideshare
 
Cipher techniques
Mohd Arif
 
Encryptolog y-1216310707267721-9
Shan Raja
 
Cryptography - An Overview
ppd1961
 
Itt project
Harish Kumar
 
3 Basics of Cryptography Basics of Cryptography
MohammedMorhafJaely
 
Cryptography
David Hoen
 
Cryptography
Young Alista
 
Cryptography
James Wong
 
Cryptography
Luis Goldster
 
Cryptography
Tony Nguyen
 
Cryptography
Harry Potter
 
Cryptography
Fraboni Ec
 
Cryptanalysis - basic ciphers and a bit more
Things Lab
 
Ad

More from sultanahimed3 (12)

PPT
ITE_PC_v40_Chapter15.pptinnovation technology coursinnovation technology coursee
sultanahimed3
 
PPT
ITE_PC_v40_Chapter16.pptAFAAN OROMOO AKKA AFAAN LAMMAFFAFAAN OROMOO AKKA AFAA...
sultanahimed3
 
PPT
ITE_PC_v40_ChaptAFAAN OROMOO AKKA AFAAN LAAFAAN OROMOO AKKA AFAAN LAMMAFFAATT...
sultanahimed3
 
PPT
ITE_PC_v40_Chapter2fffffghhhbbbbbbbbbbbb
sultanahimed3
 
PPT
ITE_PC_v40_Chapter16.pptfffddddddddddddddddddddd
sultanahimed3
 
PPT
ITE_PC_v40_Chapter2.pptggghhhhhhhhhhhhhhhh
sultanahimed3
 
PPTX
SQL UNIT FOUR.pptxDiscDiscoverabilitDiscoverability Scorey Scoreoverability S...
sultanahimed3
 
PPT
01SoftwEng.pptInnovation technology pptInnovation technology ppt
sultanahimed3
 
PPT
Ch_5.pptInnovation technology ppInnovation technology pptt
sultanahimed3
 
PPT
Ch_4.pptInnovation technology pptInnovation technology ppt
sultanahimed3
 
PPT
Ch_3.pptInnovation technology Innovation technology pptppt
sultanahimed3
 
PPT
CInnovation technology pptgggrgrrrrrrrrrrrrgr
sultanahimed3
 
ITE_PC_v40_Chapter15.pptinnovation technology coursinnovation technology coursee
sultanahimed3
 
ITE_PC_v40_Chapter16.pptAFAAN OROMOO AKKA AFAAN LAMMAFFAFAAN OROMOO AKKA AFAA...
sultanahimed3
 
ITE_PC_v40_ChaptAFAAN OROMOO AKKA AFAAN LAAFAAN OROMOO AKKA AFAAN LAMMAFFAATT...
sultanahimed3
 
ITE_PC_v40_Chapter2fffffghhhbbbbbbbbbbbb
sultanahimed3
 
ITE_PC_v40_Chapter16.pptfffddddddddddddddddddddd
sultanahimed3
 
ITE_PC_v40_Chapter2.pptggghhhhhhhhhhhhhhhh
sultanahimed3
 
SQL UNIT FOUR.pptxDiscDiscoverabilitDiscoverability Scorey Scoreoverability S...
sultanahimed3
 
01SoftwEng.pptInnovation technology pptInnovation technology ppt
sultanahimed3
 
Ch_5.pptInnovation technology ppInnovation technology pptt
sultanahimed3
 
Ch_4.pptInnovation technology pptInnovation technology ppt
sultanahimed3
 
Ch_3.pptInnovation technology Innovation technology pptppt
sultanahimed3
 
CInnovation technology pptgggrgrrrrrrrrrrrrgr
sultanahimed3
 
Ad

Recently uploaded (20)

PPTX
AgentX UiPath Community Webinar series - Delhi
RohitRadhakrishnan8
 
PPTX
Victory Precisions_Supplier Profile.pptx
victoryprecisions199
 
PDF
The Effect of Artifact Removal from EEG Signals on the Detection of Epileptic...
Partho Prosad
 
PPTX
Civil Engineering Practices_BY Sh.JP Mishra 23.09.pptx
bineetmishra1990
 
PPTX
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
PPTX
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
PPTX
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
PPTX
22PCOAM21 Data Quality Session 3 Data Quality.pptx
Guru Nanak Technical Institutions
 
PDF
Introduction to Data Science: data science process
ShivarkarSandip
 
PPTX
easa module 3 funtamental electronics.pptx
tryanothert7
 
PDF
Principles of Food Science and Nutritions
Dr. Yogesh Kumar Kosariya
 
PPTX
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
PDF
Biodegradable Plastics: Innovations and Market Potential (www.kiu.ac.ug)
publication11
 
PDF
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
PPT
Ppt for engineering students application on field effect
lakshmi.ec
 
PDF
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
PPTX
Introduction of deep learning in cse.pptx
fizarcse
 
PDF
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
PPTX
Color Model in Textile ( RGB, CMYK).pptx
auladhossain191
 
PPT
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 
AgentX UiPath Community Webinar series - Delhi
RohitRadhakrishnan8
 
Victory Precisions_Supplier Profile.pptx
victoryprecisions199
 
The Effect of Artifact Removal from EEG Signals on the Detection of Epileptic...
Partho Prosad
 
Civil Engineering Practices_BY Sh.JP Mishra 23.09.pptx
bineetmishra1990
 
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
22PCOAM21 Data Quality Session 3 Data Quality.pptx
Guru Nanak Technical Institutions
 
Introduction to Data Science: data science process
ShivarkarSandip
 
easa module 3 funtamental electronics.pptx
tryanothert7
 
Principles of Food Science and Nutritions
Dr. Yogesh Kumar Kosariya
 
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
Biodegradable Plastics: Innovations and Market Potential (www.kiu.ac.ug)
publication11
 
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
Ppt for engineering students application on field effect
lakshmi.ec
 
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
Introduction of deep learning in cse.pptx
fizarcse
 
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
Color Model in Textile ( RGB, CMYK).pptx
auladhossain191
 
1. SYSTEMS, ROLES, AND DEVELOPMENT METHODOLOGIES.ppt
zilow058
 

crypto_1vdgfhhhggggjjgghghghgggghhhhhfhhhhhhjhvcgghcghggg

  • 1. Fubswrjudskb Frxuvh qxpehu: 4003-482 / 4005-705 Lqvwuxfwru: Lyrqd Ehcdnryd Wrgdb’v Wrslfv: 1. Orjlvwlfv: - Fodvv olvw - Vboodexv 2. Wkh Pdwk 3. Zkdw lv Fubswrjudskb 4. Vrph Fodvvlfdo Fubswrvbvwhpv
  • 2. Cryptography Course number: 4003-482 / 4005-705 Instructor: Ivona Bezáková Today’s topics: 1. Logistics: - Class list - Syllabus 2. The Math 3. What is Cryptography 4. Some Classical Cryptosystems
  • 3. The Math We will go beyond descriptions of cryptographic algorithms and ways how to break them. We will use a lot of math and CS theory in this course, including: - some abstract algebra (number theory, groups, rings, fields) - some linear algebra - some probability and information theory - some complexity theory It is important to be comfortable with math!
  • 4. What is Cryptography - the study of secure communication over insecure channels. Typical scenario: Alice Bob Eve
  • 5. What is Cryptography Alice Bob Eve Private-key cryptosystems: Chapter 2 (& 4) - Alice and Bob agree on a key beforehand Alice: plaintext -> encryption (via the key) -> ciphertext -> send to Bob Bob: decrypt the ciphertext (using the key) to reconstruct the plaintext
  • 6. What is Cryptography Eve: - she does not know the key, she cannot decrypt… ??? - she tries to read the current message, she can also try to figure out the key - in our book she sometimes acts as a malicious active attacker (usually called Mallory): corrupting Alice’s message, or masquerading as Alice Symmetric-key cryptosystems: - private-key cryptosystems use (essentially) the same key for encryption and decryption
  • 7. Some Cryptanalysis Terminology Cryptanalysis - the process of attempting to compute the key - the most common attack models: - ciphertext only attack - known plaintext attack - chosen plaintext attack - chosen ciphertext attack What’s the weakest type of attack?
  • 8. Cryptographic Applications 1. Confidentiality 2. Data integrity 3. Authentication 4. Non-repudiation
  • 9. Classical Cryptosystems (Starting Chapter 2, sneaking in some math from Chapter 3.) Conventions: - plaintext: lowercase - CIPHERTEXT: uppercase - Spaces and punctuations will be usually omitted. - Letter of the alphabet will be often identifies with numbers 0,1,…,25.
  • 10. Monoalphabetic Ciphers - Each letter is mapped to a unique letter. - Examples: shift cipher, substitution cipher, affine cipher - We will need modular arithmetic (and we’ll introduce more than we need in this chapter – it will all be useful later).
  • 11. Modular Arithmetic Let a, b be integers, m be a positive integer. We write: a ´ b (mod m)if m divides (a-b) (Read it as: “a is congruent to b mod m”.) Examples: (true/false) 7 ´ 5 (mod 3) 4 ´ 1 (mod 3) 7 ´ 1 (mod 3) -4 ´ -1 (mod 3) 66 ´ 0 (mod 3) -8 ´ 7 (mod 3)
  • 12. Modular Arithmetic Let a be an integer, m be a positive integer. We use: a mod m to denote the remainder when a is divided by m. The remainder is always a number from {0,1,2,…,m-1}. Examples: 8 mod 3 = 1 mod 1 = 0 mod 2 = 63 mod 7 = -8 mod 3 = 3 mod 6 = -63 mod 7 = Is % in Java/C/C++ the same as mod ?
  • 13. Modular Arithmetic Zm denotes the set {0,1,2,…,m-1}, with two operations: - addition (modulo m) - multiplication (modulo m) Zm is a commutative ring, i.e.: - addition and multiplication (mod m) are closed, commutative, associative, and multiplication is distributive over addition - 0 is the additive identity - each element has an additive inverse
  • 14. Modular Arithmetic Zm denotes the set {0,1,2,…,m-1}, with two operations: - addition (modulo m) - multiplication (modulo m) Zm is a commutative ring, i.e.: - addition and multiplication (mod m) are closed, commutative, associative, and multiplication is distributive over addition - 0 is the additive identity - each element has an additive inverse
  • 15. Shift Cipher The key k is an element of Z26. We encrypt a letter x 2 Z26 as follows: x  (x+k) mod 26 How to decrypt ? x  Remarks: - For k=3 this is known as the Caesar cipher, attributed to Julius Caesar. - Shift cipher works over any Z .
  • 16. Shift Cipher How good is it ? - the good: efficient encryption/decryption computation - the bad: easy to attack (not very secure) - how ? Kerckhoff’s Principle: - Eve knows the cipher but does not know the key. - Always assumed in cryptanalysis.
  • 17. Substitution Cipher - Monoalphabetic cipher defined by a permutation of the alphabet. - Example: abcdefghijklmnopqrstuvwxyz ONETWHRFUISXVGABCDJKLMPQYZ What is the key in this example ? - Exercise: decode: EDYBKARDOBFY
  • 18. Substitution Cipher How good is it ? - the good: efficient encryption/decryption - the bad(?): is it secure ? - approach 1: try all possible keys - is this feasible ? Hint: frequency tables, e.g., for English see Table 2.1, page 17
  • 19. Affine Ciphers The key is a pair (®,¯) 2 Z26£Z26 such that gcd(®,26)=1. Then, encryption is done via an affine function: x  (®x + ¯) mod 26 How to decrypt ? x  Remark: The affine cipher can be defined over any Zm.
  • 20. Affine Ciphers Questions: - How does it relate to the shift and the substitution ciphers ? - How many possible keys are there ? - Why do we have the condition gcd(®,26)=1 ? - What is ®-1 ?
  • 21. Affine Ciphers Questions: - Efficiently computable encryption and decryption ? - Is it secure ? How to cryptanalyze ?