Uploaded by Lakshmi Priya B

chapter1

advertisement
UCS1505 - ICT
Unit 1
Chamundeswari Arumugam
Professor, Dept of CSE
SSN College of Engineering, Chennai
Aug 2020
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Introduction to syllabus
Unit I to II
Unit I Introduction and classical cryptography and
symmetric cryptography
Cryptography and Modern Cryptography – Setting of
Private-Key Encryption – Historical Ciphers – Basic Principles;
Perfectly Secret Encryption; Private-Key Encryption and
Pseudo randomness
Unit II Message authentication codes and collision-resistant
hash functions
Secure Communication and Message Integrity – Encryption vs.
Message Authentication – Message Authentication Codes –
Constructing Secure Message Authentication Codes –
CBCMAC – Collision-Resistant Hash Functions – NMAC and
HMAC – Constructing CCA-Secure Encryption Schemes –
Obtaining Privacy and Message Authentication.
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Introduction to syllabus
Unit III to IV
Unit III Block ciphers
Substitution-Permutation Networks – Feistel Networks – DES
– AES – Differential and Linear Cryptanalysis; One-Way
Functions – From One-Way Functions to Pseudo randomness –
Constructing Pseudorandom Generators – Constructing
Pseudorandom Permutations – Necessary Assumptions for
Private-Key Cryptography.
Unit IV Number theory & key distribution
Number Theory: Preliminaries and Basic Group Theory –
Primes, Factoring, and RSA – Cryptographic Applications of
Number-Theoretic Assumptions; Private-Key Management and
the Public-Key Revolution: Limitations of Private-Key
Cryptography – Key Distribution Centers – The Public-Key
Revolution – Diffie-Hellman Key Exchange.
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Introduction to syllabus
Unit V
Unit V Public-key encryption & digital signature
Public-Key Encryption An Overview – Definitions – Hybrid
encryption – RSA encryption The El Gamal Encryption
Scheme – Security Against Chosen-Ciphertext Attacks; Digital
Signatures Schemes: An Overview – Definitions – RSA
Signatures – The Hash-and-Sign Paradigm – Lamport’s
One-Time Signature Scheme – Signatures from Collision –
Resistant Hashing – The Digital Signature Standard –
Certificates and Public-Key Infrastructures; Authentication
Protocol: SSL and TLS.
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Unit 1 : Introduction and classical cryptography and
symmetric cryptography
Topics
1
2
3
Cryptography and Modern Cryptography – Setting of
Private-Key Encryption – Historical Ciphers – Basic Principles
Perfectly Secret Encryption
Private-Key Encryption and Pseudo randomness
Book
1
2
3
Chapter 1 - Cryptography and Modern Cryptography –
Setting of Private-Key Encryption – Historical Ciphers – Basic
Principles
Chapter 2 - Perfectly Secret Encryption
Chapter 3- Private-Key Encryption and Pseudo randomness
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Cryptography and Modern Cryptography
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Cryptography and Modern Cryptography
Cryptography - secret communication, secure systems for
ordinary people all across the globe.
Modern cryptography - study of mathematical techniques
for securing digital information, systems, and distributed
computations against adversarial attacks.
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Cryptography and Modern Cryptography
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Setting of Private-Key Encryption
Classical encryption schemes : symmetric-key setting
private key encryption : A private key is shared by the
communicating parties in advance
Cipher text : Send a message to receiver by using the shared
key to encrypt the message.
The receiver uses the same key to decrypt the ciphertext and
recover the original message.
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Setting of Private-Key Encryption(Contd..)
The syntax of encryption
A private-key encryption scheme is defined by specifying a
message space M along with three algorithms: a procedure for
generating keys (Gen), a procedure for encrypting (Enc), and
a procedure for decrypting (Dec)
Encrypting a message and then decrypting the resulting
ciphertext (using the same key) yields the original message.
Deck (Enck (m))=m.
Keys and Kerckhoffs principle.
Encryption schemes to be standardized
Utilize an encryption scheme that has undergone public
scrutiny
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Historical Ciphers and Their Cryptanalysis
historical encryption schemes
highlight the weaknesses
secure encryption
Caesars cipher
Encryption: Shifting the letters of the alphabet 3 places forward:
a was replaced with D, b with E, and so on.
z was replaced with C, y with B, and x with A.
key : shift the letters with 3 places
Message: begin
Encryption : EHJLQ
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Historical Ciphers and Their Cryptanalysis(Contd..)
shift cipher and the sufficient key-space principle.
Key k is a number between 0 and 25. Gen outputs a uniform
key k ∈ { 0, . . . , 25}.
A=0, B=1, C=2, ...,Y=24, Z=25
Enck (m1 ..ml ) = c1 .. cl , where ci = [(mi + k) mod 26].
Deck (c1 ..cl ) = m1 ..ml , where mi = [(ci - k) mod 26].
Shift Cipher insecure?
brute force attack : frequency distribution of characters in the
plaintext.
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Historical Ciphers and Their Cryptanalysis(Contd..)
shift cipher and the sufficient key-space principle(Contd..)
Encryption procedure
1 Convert the letter into the number that matches its order in the alphabet
starting from 0, and call this number X. ( A=0, B=1, C=2, ...,Y=24, Z=25)
2 Calculate: Y = (X + K) mod 26, let K=19
3 Convert the number Y into a letter that matches its order in the alphabet
starting from 0. (A=0, B=1, C=2, ...,Y=24, Z=25)
Decryption procedure
1 Convert the letter into the number that matches its order in the alphabet
starting from 0, and call this number Y. (A=0, B=1, C=2, ..., Y=24, Z=25)
2 Calculate: X= (Y - K) mod 26, where K=19
3 Convert the number X into a letter that matches its order in the alphabet
starting from 0. (A=0, B=1, C=2, ..., Y=24, Z=25)
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Historical Ciphers and Their Cryptanalysis(Contd..)
Figure: Caeser and shift code (python)
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Historical Ciphers and Their Cryptanalysis(Contd..)
Figure: Caeser and shift code with brute force code (python)
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Historical Ciphers and Their Cryptanalysis(Contd..)
Figure: Caeser and shift code(C++)
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Historical Ciphers and Their Cryptanalysis(Contd..)
Figure: brute force code(python)
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Historical Ciphers and Their Cryptanalysis(Contd..)
The mono-alphabetic substitution cipher
the key space is of size 26!
map is a fixed shift determined by the key.
does not mean the cipher is secure!
The attack relies on the facts: mapping of each letter and
frequency distribution of individual letters
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Historical Ciphers and Their Cryptanalysis(Contd..)
Figure: mono-alphabetic(python)
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Historical Ciphers and Their Cryptanalysis(Contd..)
The Vigenere (poly-alphabetic shift) cipher.
poly-alphabetic substitution cipher : key defines a
mapping that is applied on blocks of plaintext characters.
2-character block ab to DZ while mapping ac to TY
poly-alphabetic shift cipher : key is a string of letters,
encryption is done by shifting each plaintext character by the
amount indicated by the next character of the key,
Attack : length of the key.
method:: letter-frequency analysis, Kasiskis method, index of
coincidence method
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Historical Ciphers and Their Cryptanalysis(Contd..)
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Principles of Modern Cryptography
Modern cryptography - Definitions, assumptions, and proofs
Principle 1 Formal Definitions
First define what is to be constructed, study the proposed scheme, and then
prove the definition its secure as per definition.
Understand what notion of security and encryption scheme.
Definition Two components: (1) security guarantee (2) threat model.
Guarantee : Based on Encryption (1) impossible for an attacker to recover the
key (2) impossible for an attacker to recover the entire plaintext from the
ciphertext. (3) attacker already has, a ciphertext should leak no additional
information about the un- derlying plaintext.
Thread model : Based on Encryption : (1) Ciphertext-only attack (2)
Known-plaintext attack (3) Chosen-plaintext attack.
Threat modeling can identify potential security threats and vulnerabilities, quantify the seriousness of
each, and prioritize techniques to mitigate attack and protect resources.
Who might attack? Why might the system be attacked? What assets are of interest? How can these
attacks be implemented?
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Principles of Modern Cryptography
Principle 2 Precise Assumptions
Validation of assumptions
Comparison of schemes
Understanding the necessary assumptions
If the developed code does not satisfy the stated assumption,
the encryption scheme can still be instantiated using a
different component to satisfy the necessary requirements.
Principle 3 Proofs of Security
Proofs of security give an iron-clad guarantee
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Principles of Modern Cryptography
Provable Security and Real-World Security
A proof of security is always relative to the definition being
considered and the assumption(s) being used.
If the security guarantee does not match what is needed, or
the threat model does not capture the adversarys true
abilities, then the proof may be irrelevant.
Job of cryptographers to continually refine their definitions to
more closely match the real world, and to investigate their
assumptions to test their validity.
Battle between attacker and defender
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Principles of Modern Cryptography
Case study
Definition : Cryptographic Algorithms and Protocols, refers
to algorithms and protocols that provide to the software
process the services of confidentiality, integrity, authentication
and non-repudiation.
Assumption
1
2
3
4
5
6
The length of the key being used by the cryptographic
algorithm and protocol is sufficient.
Random data being used by the cryptographic
algorithm/protocol is unpredictable.
The hashing algorithm will not produce same hash for two
different inputs.
The process cannot use encryption to ensure data integrity.
The process cannot use a key more than once for a stream
cipher.
The process cannot store keys/passwords in clear text.
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Principles of Modern Cryptography
Case study
Definition: Cloud service user : cloud user is an active
member of the cloud community utilizing all different services
offer by the cloud provider including the data computation
services such as data modifications, additions, deletions,
insertions, and searches.
Assumption
1
2
3
the encryption module the Cloud service users, uses the
symmetric key algorithm to perform the data encryption and
the subsequent transmission of the secret key
the trusted third party module where the third party maintains
a database of secret keys and the subsequent exchange of
secret keys on behalf of cloud users
the service provider where all the customer’s data is stored in
data center and the request of secret keys.
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Principles of Modern Cryptography
Case study
Definition: Multi-owner data sharing scheme
Assumption
1 to enable sharing data in a multi-owner manner while still preserve data
privacy and identity privacy even in untrusted clouds.
Case study
Definition: Secure cloud storage services sharing.
Assumption
1 The sender needs to encrypt the file once only and store just one copy of
the ciphertext in a cloud that communicate with no users.
Case study
Definition: Secure cloud user
Assumption
1 the data remains encrypted and the cloud provider has no knowledge of
the key, data confidentiality is guaranteed.
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Unit 1
Assignment - 1
Develop a code using an environment of your choice, to
demonstrate the following methods:
1
2
3
4
5
6
7
8
Caesar cipher method
Shift cipher
Brute force attack
Mono alphabetic cipher
Attack on mono alphabetic cipher
Poly alphabetic substitution cipher
Poly alphabetic shift cipher
Attack on Vigenere
Document the Encryption definition, guarantee, threat model,
assumption for an encryption scheme in a domain of your
choice.
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Historical Ciphers and Their Cryptanalysis(Contd..)
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Reference
Book: Jonathan Katz, YehudaLindell, Introduction to Modern
Cryptography,2nd Edition (Chapman & Hall/CRC Cryptography
and Network Security Series), 2014.
Chamundeswari Arumugam Professor, Dept of CSESSN College of UCS1505
Engineering,
- ICT
Chennai
Unit 1
Download