Uploaded by farha.jannat021

Lecture-9

advertisement
CSE-1215:Discrete
Mathematics
Lecture - 9
Syeda Tamanna Alam Monisha
Lecturer, CSE, Leading University
E-mail: monisha_cse@lus.ac.bd
NUMBER
THEORY AND
CRYPTOGRAPHY
4.3 PRIMES
AND GREATEST
COMMON DIVISORS
Discrete
Mathematics
and Its
Applications by
Rosen
7th Edition
Primes
Greatest Common Divisors
Greatest Common Divisors
Least common multiple
The Euclidean Algorithm
The Euclidean Algorithm
NUMBER
THEORY AND
CRYPTOGRAPHY
4.6 CRYPTOGRAPHY
Discrete
Mathematics
and Its
Applications by
Rosen
7th Edition
Cryptography
• Cryptography is the practice and study of techniques for secure
communication in the presence of third parties called adversaries.
• Number theory plays a key role in cryptography, the subject of
transforming information so that it cannot be easily recovered without
special knowledge.
• Number theory is the basis of many classical ciphers, first used thousands
of years ago, and used extensively until the 20th century.
• These ciphers encrypt messages by changing each letter to a different
letter, or each block of letters to a different block of letters.
Terminologies
• Cryptology:
• The scientific study of cryptography and cryptanalysis.
• Cryptography:
• Cryptography is the practice and study of techniques for secure
communication in the presence of third parties called adversaries.
• Cryptanalysis:
• Cryptanalysis is used to breach cryptographic security systems and
gain access to the contents of encrypted messages, even if the
cryptographic key is unknown.
Types Of Cryptography
• In general there are two types of cryptography:
• Symmetric Key Cryptography:
• It is an encryption system where the sender and receiver of message use a single
common key to encrypt and decrypt messages.
• Symmetric Key Systems are faster and simpler but the problem is that sender and
receiver have to somehow exchange key in a secure manner.
• Asymmetric Key Cryptography:
•
•
•
•
•
•
This is also known as Public-key cryptography
Under this system a pair of keys is used to encrypt and decrypt information
Each person in the communication has a pair of keys: a public key and a private key
A public key is used for encryption and a private key is used for decryption
Public key and private Key are different
Even if the public key is known by everyone the intended receiver can only decode it
because he alone knows the private key.
Caesar cipher
• One of the earliest known uses of cryptography was by Julius Caesar
• He made messages secret by shifting each letter three letters forward in
the alphabet
• Caesar’s encryption method can be represented by the function f
f (p) = (p + 3) mod 26
In the encrypted version of the message, the letter represented by p is
replaced with the letter represented by (p + 3) mod 26.
• To recover the original message from a secret message decryption can be
done using
f−1(p) = (p − 3) mod 26
In other words, to find the original message, each letter is shifted back
three letters in the alphabet.
Caesar cipher
Encryption
Decryption
Encryption
Caesar cipher
Shift cipher
Here the integer k is called the key where 0 ≤ 𝑘 ≤ 25 .
Download