1. Principle of Least Privilege (POLP) This principle states that every user and program on the system should be granted only the specific rights and permissions needed to perform their tasks, with no more.
Size: 1.26 MB
Language: en
Added: Feb 28, 2025
Slides: 39 pages
Slide Content
UNIT-2
PUBLICKEYCRYPTOGRAPHYANDRSA
InformationSecurity
BY
KhushbuGarg
Assistant Professor
Jecrcu
Plain Text to Cipher Text Conversion
Techniques
Introduction
Encryption is the process of converting
plaintext into ciphertext to secure
information.
Importance:
• Used in communication, data security, and
cryptography.
Substitution Ciphers
Caesar Cipher:
• Each letter shifted by a fixed number.
• Example: HELLO → KHOOR (Shift = 3)
Vigenère Cipher:
• Uses a keyword for multiple shifts.
• Example (Keyword = 'KEY'): HELLO →
RIJVS
Transposition Ciphers
Rail Fence Cipher:
• Letters written diagonally, read row-wise.
• Example: HELLO WORLD →
HLOWRDELLOOL (Depth = 2)
Columnar Transposition:
• Text written in a grid and rearranged by
key order.
• Example (Key = 4312): HELLO → OHLLE
RSAUSE
??????toencryptamessageMthesender:
??????obtainspublickeyofrecipientPU={e,n}
??????computes:C=M
e
modn,where0≤M<n
??????todecrypttheciphertextCtheowner:
??????usestheirprivatekeyPR={d,n}
??????computes:M=C
d
modn
??????notethatthemessageMmustbesmaller
than themodulusn(blockifneeded)
WHYRSAWORKS
??????becauseofEuler'sTheorem:
??????a
ø(n)modn=1wheregcd(a,n)=1
??????inRSAhave:
??????n=p.q
??????ø(n)=(p-1)(q-1)
??????carefullychosee&dtobeinversesmodø(n)
??????hencee.d=1+k.ø(n)forsomek
??????hence:
C
d=M
e.d=M
1+k.ø(n)=M
1.(M
ø(n))
k
=M
1
.(1)
k
= M
1
= Mmodn
Diffie-HellmanSetup
•allusersagreeonglobalparameters:
•largeprimeintegerorpolynomialq
•abeingaprimitiverootmodq
•eachuser(eg.A)generatestheirkey
•choosesasecretkey(number):x
A<q
A
•computetheirpublickey:y=a
x
A
modq
•eachusermakespublicthatkeyy
A
[Continue…]
Diffie-HellmanKeyExchange
•sharedsessionkeyforusersA&BisK
AB:
K
AB
=a
x
A.
x
B
mod q
xB
B
= y
x
A
= y
Amodq
modq
(whichBcancompute)
(whichAcancompute)
•K
ABisusedassessionkeyinprivate-key
encryptionschemebetweenAliceandBob
•ifAliceandBobsubsequentlycommunicate,
theywillhavethesamekeyasbefore,unless
theychoosenewpublic-keys
•attackerneedsanx,mustsolvediscretelog
[Continue…]
Diffie-HellmanExample
•usersAlice&Bobwhowishtoswapkeys:
•agreeonprimeq=353anda=3
•selectrandomsecretkeys:
•Achoosesx
A=97,Bchoosesx
B=233
•computerespectivepublickeys:
A
•y=3
97
B
•y=3
233
mod353=40
mod353=248
(Alice)
(Bob)
•computesharedsessionkeyas:
AB B
•K=y
x
A
97
AB A
•K=y
x
B
mod353=248
mod353=40
233
=160
=160
(Alice)
(Bob)
[Continue…]
Introduction to Encryption
• Encryption is used to secure information by
converting plaintext into ciphertext.
• Symmetric encryption uses the same key
for both encryption and decryption.
• DES and AES are two widely known
symmetric encryption algorithms.
DES (Data Encryption Standard)
• Developed by IBM in the 1970s, adopted
by NIST.
• Uses a 56-bit key and encrypts data in 64-
bit blocks.
• 16 rounds of Feistel structure encryption.
• Vulnerable to brute-force attacks due to
small key size.
• Considered obsolete and replaced by AES.
AES (Advanced Encryption Standard)
• Developed by Vincent Rijmen and Joan
Daemen, adopted in 2001.
• Supports 128, 192, or 256-bit key sizes.
• Encrypts data in 128-bit blocks.
• Uses 10, 12, or 14 rounds of substitution-
permutation encryption.
• Highly secure and widely used in modern
encryption.
DES vs AES: Key Differences
• Key Size: DES (56-bit) vs AES (128, 192,
256-bit).
• Block Size: DES (64-bit) vs AES (128-bit).
• Rounds: DES (16 rounds) vs AES (10, 12,
or 14 rounds).
• Security: DES is weak against brute-force
attacks; AES is highly secure.
• Usage: DES is obsolete, AES is widely used
in modern encryption applications.
Conclusion
• DES was a pioneer in symmetric
encryption but is now outdated.
• AES is the modern standard due to its
enhanced security and flexibility.
• AES is used in secure communication, data
protection, and cybersecurity.
• Understanding these algorithms helps in
choosing the right encryption method.