SlideShare a Scribd company logo
CHAPTER 3CHAPTER 3
SECURE ENCRYPTION SYSTEMSSECURE ENCRYPTION SYSTEMS
IntroductionIntroduction
 There are two main types of cryptography:There are two main types of cryptography:
 symmetric (secret key) cryptographysymmetric (secret key) cryptography
 asymmetric (public key) cryptographyasymmetric (public key) cryptography
Symmetric (Secret Key)Symmetric (Secret Key)
CryptographyCryptography
Symmetric (secret key) cryptographySymmetric (secret key) cryptography
 Data is encrypted using a key.Data is encrypted using a key.
 The same key must be use to decrypt the data.The same key must be use to decrypt the data.
 The security of a symmetric cryptography rests in theThe security of a symmetric cryptography rests in the
key.key.
 Divulging the key - anyone could encrypt and decryptDivulging the key - anyone could encrypt and decrypt
the message.the message.
 Example : Data Encryption Standard (DES)Example : Data Encryption Standard (DES)
Symmetric (Secret Key)Symmetric (Secret Key)
CryptographyCryptography
Problem with Symmetric CryptographyProblem with Symmetric Cryptography
(Distribution of Keys)(Distribution of Keys)
 The main problem is getting the sender and receiverThe main problem is getting the sender and receiver
agree on the secret key without anyone else finding out.agree on the secret key without anyone else finding out.
 If they are in separate physical locations, they must trustIf they are in separate physical locations, they must trust
a courier or a phone system or some other transmissiona courier or a phone system or some other transmission
medium to prevent the disclosure of the secret key beingmedium to prevent the disclosure of the secret key being
communicated.communicated.
 Anyone who overhears or intercepts the key in transitAnyone who overhears or intercepts the key in transit
can later read, modify and forge all messages encryptedcan later read, modify and forge all messages encrypted
using that key.using that key.
Asymmetric (Public Key)Asymmetric (Public Key)
CryptographyCryptography
Asymmetric (public key) cryptographyAsymmetric (public key) cryptography
 Different keys used for encryption and decryptionDifferent keys used for encryption and decryption
 The ciphering algorithm are called the public keyThe ciphering algorithm are called the public key
algorithms becausealgorithms because one of the keys used can beone of the keys used can be
made publicmade public..
 Example : a complete stranger can use theExample : a complete stranger can use the publicpublic
encryption key to encryptencryption key to encrypt a message but only aa message but only a
specific person with the correspondingspecific person with the corresponding secretsecret
decryption key can decrypt the messagedecryption key can decrypt the message..
 In these systems, the encryption key is often calledIn these systems, the encryption key is often called
the public key and the decryption key is often calledthe public key and the decryption key is often called
the private key.the private key.
 Example : RSAExample : RSA
Asymmetric (Public Key)Asymmetric (Public Key)
CryptographyCryptography
Concern about public key algorithm:Concern about public key algorithm:
 The concern covers three categories:The concern covers three categories:
 Fortitude in providing unbreakable securityFortitude in providing unbreakable security
 PracticalityPracticality
 ApplicabilityApplicability
 Many of the algorithms are insecureMany of the algorithms are insecure
 Among secure algorithm, many are impractical –Among secure algorithm, many are impractical –
key size too large or ciphertext is much larger thankey size too large or ciphertext is much larger than
plaintextplaintext
 Only few algorithms are both secure and practical :Only few algorithms are both secure and practical :
 Some are only suitable for key distributionSome are only suitable for key distribution
 Some are only suitable for encryptionSome are only suitable for encryption
Merkle-Hellman KnapsackMerkle-Hellman Knapsack
 One of the earliest public key cryptosystem invented byOne of the earliest public key cryptosystem invented by
Ralph Merkle and Martin Hellman in 1978.Ralph Merkle and Martin Hellman in 1978.
 Is based on theIs based on the subset sum problemsubset sum problem (a special case of the(a special case of the
knapsack problemknapsack problem): given a list of numbers and a third): given a list of numbers and a third
number, which is the sum of a subset of these numbers,number, which is the sum of a subset of these numbers,
determine the subset.determine the subset.
 In general, this problem is known to beIn general, this problem is known to be NP-completeNP-complete;;
however, there are some 'easy' instances which can behowever, there are some 'easy' instances which can be
solved efficiently.solved efficiently.
 However, the scheme was broken by Adi Shamir, not byHowever, the scheme was broken by Adi Shamir, not by
attacking the knapsack problem, but rather by breaking theattacking the knapsack problem, but rather by breaking the
conversion from an easy knapsack to a hard one.conversion from an easy knapsack to a hard one.
Merkle-Hellman KnapsackMerkle-Hellman Knapsack
 What is a knapsack problem?What is a knapsack problem?
 Given N = {17, 38, 73, 4, 11, 1}
 Find a subset of N whose elements adds up to 53.
 Is it 73? No!
 How about 17? If 17, the balance would be 36 and therefore it
cannot be 17.
 38? 53 - 38 = 15 = 4 + 11.
 Therefore {38, 11, 4} is the solution
 Generally to solve it, what it needs is an NP-Complete
complexity, exponential time behavior in term off the size
of the problem, in this case the number of integers.
 needs to backtrack, discard etc….
Merkle-Hellman KnapsackMerkle-Hellman Knapsack
 The scheme is to encode a binary message as a
solution to a knapsack problem, reducing the
ciphertext to the target sum obtained by adding terms
corresponding to 1s in the plaintext.
PlaintextPlaintext 11 00 11 00 00 11 00 11 11 00 11 00
KnapsackKnapsack 11 22 55 99 2020 4343 11 22 55 99 2020 4343
 Target Sum = 1 + 5 + 43 2 + 5 + 20
= 49 = 27
Merkle-Hellman KnapsackMerkle-Hellman Knapsack
Superincreasing Knapsack
 When the elements of the set are arranged strictly such
that
ak > Σ aj from j = 1 to k-1
the knapsack problem becomes simpler This kind of
arrangement are called superincreasing.
 Example: Set of {1, 4, 11, 17, 38, 73}
 Because the elements are ordered, and an element ai is
always > sum of all the lower elements, it is easy to
decide whether to discard or to include.
Merkle-Hellman KnapsackMerkle-Hellman Knapsack
Encryption Technique
 It is a public-key cryptosystem:
 public key : is the set of integers of a knapsack problem
(non-superincreasing knapsack – NSI)
 private key : is the corresponding superincreasing
knapsack - SI
 Genius of Merkle Hellman was to discover a means
to transform an SI knapsack to NSI knapsack.
 The transformation is not obvious but reversible.
Merkle-Hellman KnapsackMerkle-Hellman Knapsack
Transforming SI (Superincreasing) to NSI (Non – Superincreasing)
 Let s = {s1, s2, s3, ……sM}. Choose a multiplier w and a
modulus n such that
n > sM
(w, n) is relatively prime (no common factor)
 Then h = {h1, h2, h3, ……hM} such that
h1 = w * s1 mod n, h2 = w * s2 mod n, and so on.
Merkle-Hellman KnapsackMerkle-Hellman Knapsack
Example of transforming SI to NSIExample of transforming SI to NSI
Suppose s = {1, 2, 4, 9} and suppose w = 15
and n = 17
1 * 15 mod 17 = 15
2 * 15 mod 17 = 13
4 * 15 mod 17 = 9
9 * 15 mod 17 = 16
So H = {15, 13, 9, 16} and this is NSI.
Merkle-Hellman KnapsackMerkle-Hellman Knapsack
Example (Encrypt Process)
 Given S = {1, 2, 4, 9} (private key) and H = {15,
13, 9, 16} (public key) with w = 15, n = 17 and m
= 4 (divide the block into m bits). Message is
0100 1011 1010 0101.
 With H = {15, 13, 9, 16} the message is encoded
as follows:
[0 1 0 0] * [15, 13, 9, 16] = 13
[1 0 1 1] * [15, 13, 9, 16] = 40
[1 0 1 0] * [15, 13, 9, 16] = 24
[0 1 0 1] * [15, 13, 9, 16] = 29
Merkle-Hellman KnapsackMerkle-Hellman Knapsack
Example Decryption Process
 To decrypt, we first need to find the inverse of
15 mod 17 and this is equal to 8. Multiply all the
encrypted message C with 8 mod 17 to get the
sum si.
 Note :
S = {1, 2, 4, 9} (private key)
13 * 8 mod 17 = 2 = [0100]
40 * 8 mod 17 = 14 = [1011]
24 * 8 mod 17 = 5 = [1010]
29 * 8 mod 17 = 11 = [0101]
 The recovered message is 0100101110100101
Merkle-Hellman KnapsackMerkle-Hellman Knapsack
Inverse 15 mod 17Inverse 15 mod 17
15 * y mod 17 = 115 * y mod 17 = 1
15 * 1 mod 17 = 15 mod 17 = 1515 * 1 mod 17 = 15 mod 17 = 15
15 * 2 mod 17 = 30 mod 17 = 1315 * 2 mod 17 = 30 mod 17 = 13
15 * 3 mod 17 = 45 mod 17 = 1115 * 3 mod 17 = 45 mod 17 = 11
15 * 4mod 17 = 60 mod 17 = 915 * 4mod 17 = 60 mod 17 = 9
15 * 5 mod 17 = 75 mod 17 = 715 * 5 mod 17 = 75 mod 17 = 7
15 * 6 mod 17 = 80 mod 17 = 515 * 6 mod 17 = 80 mod 17 = 5
15 * 7 mod 17 = 105 mod 17 = 315 * 7 mod 17 = 105 mod 17 = 3
15 * 8 mod 17 = 120 mod 17 = 115 * 8 mod 17 = 120 mod 17 = 1
RSA AlgorithmRSA Algorithm
The RSA algorithm is named after Ron
Rivest, Adi Shamir and Leonard Adleman
who invented it in 1977.
The RSA algorithm can be used for both
public key encryption and digital
signatures (authentication).
RSA AlgorithmRSA Algorithm
 In RSA algorithm, there are 3 importantIn RSA algorithm, there are 3 important
steps:steps:
Key generation algorithmKey generation algorithm
EncryptionEncryption
DecryptionDecryption
RSA AlgorithmRSA Algorithm
Key Generation AlgorithmKey Generation Algorithm
 Generate two large random primes, p and q ofGenerate two large random primes, p and q of
approximately equal size such that their product n = pq isapproximately equal size such that their product n = pq is
of the required bit length (e.g: 1024 bits)of the required bit length (e.g: 1024 bits)
 Compute n = pq andCompute n = pq and phiphi ((ΦΦ) = (p-1) (q-1)) = (p-1) (q-1)
 Choose an integer e, 1< e < phi, such that gcd (e, phi) = 1Choose an integer e, 1< e < phi, such that gcd (e, phi) = 1
 Compute the secret exponent d, 1 < d < phi, such thatCompute the secret exponent d, 1 < d < phi, such that
ed = 1 (mod phi)ed = 1 (mod phi)
The public key is (n, e) and the private key is (n, d)The public key is (n, e) and the private key is (n, d)
RSA AlgorithmRSA Algorithm
Encryption processEncryption process
 Obtains the recipient B’s public key (n, e)Obtains the recipient B’s public key (n, e)
 Represent the plaintext message asRepresent the plaintext message as
positive integer m.positive integer m.
 Compute the ciphertext c = mCompute the ciphertext c = mee
mod nmod n
 Sends the ciphertext c to B (recipient)Sends the ciphertext c to B (recipient)
RSA AlgorithmRSA Algorithm
Decryption processDecryption process
Recipient B does the following:
Uses his private key (n, d) to compute
m = cd
mod n
Extracts the plaintext from the integer
representative m.
RSA AlgorithmRSA Algorithm
Example :
Key Generation:
 Let p = 11, q = 13, so
n = p*q = 143
(ΦΦ) = (p-1)(q-1) = 10 * 12 = 120
 Choose e relatively prime to (ΦΦ), say e = 11
e * d mod ΦΦ = 1
11 * d mod 120 = 1
Therefore d = 11
 Now we know : Public key ( e = 11, n = 143)
: Private key (d = 11)
p & q – prime number
n = p * q
(ΦΦ) = (p-1) (q-1)
e, n public key
d private key
RSA AlgorithmRSA Algorithm
Example :
Encryption process:
 If plaintext m = 7,
C = me
mod n
711 mod 143 = 106
Decryption process:
 To decrypt, since c = 106
 m = cd
mod n = 10611
mod 143 = 7
RSA AlgorithmRSA Algorithm
How do you calculate 711
mod 143 = 106??
711
mod 143 =
74
mod 143 * 74
mod 143 * 72
mod 143 * 71
mod 143
= 113 * 113 * 49 * 7 (mod 143)
= 12769 * 343 (mod 143)
= 42 * 57 (mod 143)
= 2394 mod 143
= 106
DES (Data Encryption Standard)DES (Data Encryption Standard)
 Invented by a team (led by Walter Tuchman)
based on a concept originated by Horst Feistel
of IBM and known as Lucifer
 Its proper name is DEA (Data Encryption
Algorithm) in US and DEA1 in other countries.
 Mandated for encryption by all federal agencies
for sensitive data.
 When used for communication, both sender and
receiver must know the same secret key, which
can be used to encrypt and decrypt the message
DES (Data Encryption Standard)DES (Data Encryption Standard)
DES CharacteristicsDES Characteristics
 Symmetric Encryption
 Combination of substitution technique and transposition
technique.
 Provide confusion by systematically substituting some
bit patterns for others.
 Provide diffusion by reordering bits.
 Uses only standard arithmetic and logical operations.
 Plaintext is encrypted in blocks of 64 bits
 56-bit key - Choosing 56 bits also allowed DES to be
implemented on a single chip
 64-bit key-block (8 parity bits embedded)
DES (Data Encryption Standard)DES (Data Encryption Standard)
 Refer to your extra notes !Refer to your extra notes !
DES (Data Encryption Standard)DES (Data Encryption Standard)
Decryption
One advantage of DES is that decryption
is essentially the same as encryption.
The key schedule is reversed.
This is due to the fact that DES is based
on a Feistel network.
DES Weak Keys
• Because of the way the key is modified at each round to get the
sub-key, certain keys are weak keys.
• Weak keys are those which are unmodified at each round, because
they contain all 1’s or all 0’s in each half of the key.
Weak Key 64-bit value Actual subkey values after
(with parity) initial permutation (2x28)
0101 0101 0101 0101 00000000 00000000
1F1F 1F1F 1F1F 1F1F 00000000 FFFFFFFF
E0E0 E0E0 E0E0 E0E0 FFFFFFFF 00000000
FEFE FEFE FEFE FEFE FFFFFFFF FFFFFFFF
DES Semi-Weak Keys
• Some pairs of keys will encrypt a given plaintext to the same
ciphertext.
• This is because they yeild only two different subkeys, each of
which is used 8 times in the algorithm.
• These pairs are known as semi-weak keys
01FE 01FE 01FE 01FE FE01 FE01 FE01 FE01
1FE0 1FE0 1FE0 1FE0 E01F E01F E01F E01F
01E0 01E0 01E0 01E0 E001 E001 E001 E001
Security of DES
• There have been two major points of criticism about DES :
– key size is too small,
– the S-boxes contained secret design criteria.
• With advances in the field of cryptanalysis and the huge
increase in available computing power, DES is no longer
considered to be very secure.
Triple-DES Algorithm
• Triple-DES is a secure variation of the Data Encryption Standard
first developed by IBM, and later in 1977 adopted by the
U.S.government.
• Triple-DES is a 192 bit (24 characters) cipher that uses three
separate 64 bit keys and encrypts data using the DES algorithm
three times. ABI- CODER uses a variation that takes a single 192
bit (24 characters) key and then;
– encrypts data using first 64 bits (8 characters)
– decrypts same data using second 64 bits (8 characters)
– encrypts same data using the last 64 bits (8 characters)
Triple DES
3 or 2 Keys?
Security of DESSecurity of DES
 1997 – 3500 machines parallel infer a1997 – 3500 machines parallel infer a
DES key in four month.DES key in four month.
 1998 - $100,000; researchers built ‘DES1998 - $100,000; researchers built ‘DES
cracker’ – DES key in four days.cracker’ – DES key in four days.
 DES secure? – great deal of cooperationDES secure? – great deal of cooperation
& money. 3 DES still beyond the power of& money. 3 DES still beyond the power of
these attacks.these attacks.
New algorithmNew algorithm
 Increasing power of computer, USIncreasing power of computer, US
National Institute of Standards andNational Institute of Standards and
Technology began the search for new,Technology began the search for new,
strong algorithm in 1995.strong algorithm in 1995.
 Many participated (15 -> 5).Many participated (15 -> 5).
 Based on not just security but also costBased on not just security but also cost
(efficiency) & ease of implementation.(efficiency) & ease of implementation.
 Winner – Rijndael a.k.a AdvancedWinner – Rijndael a.k.a Advanced
Encryption Standard (AES).Encryption Standard (AES).
DesignDesign
 UnclassifiedUnclassified
 Publicly disclosedPublicly disclosed
 Available royalty-fee worldwideAvailable royalty-fee worldwide
 Symmetric block cipher algorithms (128Symmetric block cipher algorithms (128
bits)bits)
 Usable with key size 128, 192, and 256Usable with key size 128, 192, and 256
bitsbits
AES (Rijndael)AES (Rijndael)
 Created by Vincent Rijmen & JoanCreated by Vincent Rijmen & Joan
Daemen (Dutch cryptographers).Daemen (Dutch cryptographers).
 Adopted for use by US government in DecAdopted for use by US government in Dec
2001.2001.
 Fast on simple processors.Fast on simple processors.
 Repeat cycles.Repeat cycles.
 10, 12, 14 cycles for keys of 128, 192 and10, 12, 14 cycles for keys of 128, 192 and
256 bits.256 bits.
AES cycle (round)AES cycle (round)
 Byte substitution – S-box substituting 128-Byte substitution – S-box substituting 128-
bit block.bit block.
 Shift row – Transposition.Shift row – Transposition.
 Mix column – left shift & XOR.Mix column – left shift & XOR.
 Add Subkey – subkey XORed with cycle.Add Subkey – subkey XORed with cycle.
-THE END-THE END-
Summary / Discussion time!Summary / Discussion time!

More Related Content

What's hot

Iris recognition system
Iris recognition systemIris recognition system
Iris recognition systemNilu Desai
 
Encryption ppt
Encryption pptEncryption ppt
Encryption ppt
Anil Neupane
 
Cryptography
CryptographyCryptography
Cryptography
research30
 
Basic Cryptography unit 4 CSS
Basic Cryptography unit 4 CSSBasic Cryptography unit 4 CSS
Basic Cryptography unit 4 CSS
SURBHI SAROHA
 
Cryptography
CryptographyCryptography
Cryptography
Sidharth Mohapatra
 
Network Security
Network SecurityNetwork Security
Network Security
MAJU
 
Cryptography
CryptographyCryptography
Overview of cryptography
Overview of cryptographyOverview of cryptography
Overview of cryptography
Roshan Chaudhary
 
Steganography and its techniques
Steganography and its techniquesSteganography and its techniques
Steganography and its techniques
Fatema Panvelwala
 
Salami attack
Salami attackSalami attack
Salami attack
SantoshKavhar
 
Encryption
EncryptionEncryption
Encryption
Jasleen Khalsa
 
Different types of attacks in internet
Different types of attacks in internetDifferent types of attacks in internet
Different types of attacks in internet
Rohan Bharadwaj
 
Digital watermarking
Digital watermarkingDigital watermarking
Digital watermarkingAnkush Kr
 
Ear recognition system
Ear recognition systemEar recognition system
Ear recognition systemPiyush Mittal
 
Cryptography
CryptographyCryptography
Cryptography
Shivanand Arur
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.pptUday Meena
 

What's hot (20)

Iris recognition system
Iris recognition systemIris recognition system
Iris recognition system
 
Encryption ppt
Encryption pptEncryption ppt
Encryption ppt
 
Digital Forensics
Digital ForensicsDigital Forensics
Digital Forensics
 
Cryptography
CryptographyCryptography
Cryptography
 
Basic Cryptography unit 4 CSS
Basic Cryptography unit 4 CSSBasic Cryptography unit 4 CSS
Basic Cryptography unit 4 CSS
 
PPT steganography
PPT steganographyPPT steganography
PPT steganography
 
Cryptography
CryptographyCryptography
Cryptography
 
Ch14
Ch14Ch14
Ch14
 
Network Security
Network SecurityNetwork Security
Network Security
 
Cryptography
CryptographyCryptography
Cryptography
 
Overview of cryptography
Overview of cryptographyOverview of cryptography
Overview of cryptography
 
Steganography and its techniques
Steganography and its techniquesSteganography and its techniques
Steganography and its techniques
 
Salami attack
Salami attackSalami attack
Salami attack
 
Encryption
EncryptionEncryption
Encryption
 
Different types of attacks in internet
Different types of attacks in internetDifferent types of attacks in internet
Different types of attacks in internet
 
Digital watermarking
Digital watermarkingDigital watermarking
Digital watermarking
 
Ear recognition system
Ear recognition systemEar recognition system
Ear recognition system
 
Cryptography
CryptographyCryptography
Cryptography
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 

Viewers also liked

Towards trusted cloud computing
Towards trusted cloud computingTowards trusted cloud computing
Towards trusted cloud computing
Sj Park
 
Protocols and Practices in Using Encryption Chapter 4
Protocols and Practices in Using Encryption Chapter 4Protocols and Practices in Using Encryption Chapter 4
Protocols and Practices in Using Encryption Chapter 4AfiqEfendy Zaen
 
OS Database Security Chapter 6
OS Database Security Chapter 6OS Database Security Chapter 6
OS Database Security Chapter 6AfiqEfendy Zaen
 
Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5AfiqEfendy Zaen
 
Basic Security Chapter 1
Basic Security Chapter 1Basic Security Chapter 1
Basic Security Chapter 1AfiqEfendy Zaen
 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2AfiqEfendy Zaen
 
Storage Area Network (San)
Storage Area Network (San)Storage Area Network (San)
Storage Area Network (San)
sankcomp
 
Network Security Chapter 7
Network Security Chapter 7Network Security Chapter 7
Network Security Chapter 7AfiqEfendy Zaen
 
Google BigTable
Google BigTableGoogle BigTable
1. chapter 1 introduction of Finance
1. chapter 1 introduction of Finance1. chapter 1 introduction of Finance
1. chapter 1 introduction of FinanceAfiqEfendy Zaen
 
10. cash flow in capital budgeting
10. cash flow in capital budgeting10. cash flow in capital budgeting
10. cash flow in capital budgetingAfiqEfendy Zaen
 

Viewers also liked (12)

Towards trusted cloud computing
Towards trusted cloud computingTowards trusted cloud computing
Towards trusted cloud computing
 
Protocols and Practices in Using Encryption Chapter 4
Protocols and Practices in Using Encryption Chapter 4Protocols and Practices in Using Encryption Chapter 4
Protocols and Practices in Using Encryption Chapter 4
 
OS Database Security Chapter 6
OS Database Security Chapter 6OS Database Security Chapter 6
OS Database Security Chapter 6
 
Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5
 
Basic Security Chapter 1
Basic Security Chapter 1Basic Security Chapter 1
Basic Security Chapter 1
 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2
 
GOOGLE BIGTABLE
GOOGLE BIGTABLEGOOGLE BIGTABLE
GOOGLE BIGTABLE
 
Storage Area Network (San)
Storage Area Network (San)Storage Area Network (San)
Storage Area Network (San)
 
Network Security Chapter 7
Network Security Chapter 7Network Security Chapter 7
Network Security Chapter 7
 
Google BigTable
Google BigTableGoogle BigTable
Google BigTable
 
1. chapter 1 introduction of Finance
1. chapter 1 introduction of Finance1. chapter 1 introduction of Finance
1. chapter 1 introduction of Finance
 
10. cash flow in capital budgeting
10. cash flow in capital budgeting10. cash flow in capital budgeting
10. cash flow in capital budgeting
 

Similar to Secure Encyrption Systems Chapter 2

Public key algorithm
Public key algorithmPublic key algorithm
Public key algorithm
Prateek Pandey
 
Alex WANG - What is the most effective cryptosystem for public-key encryption?
Alex WANG - What is the most effective cryptosystem for public-key encryption?Alex WANG - What is the most effective cryptosystem for public-key encryption?
Alex WANG - What is the most effective cryptosystem for public-key encryption?
AlexWang212277
 
CRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdfCRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdf
BhuvanaR13
 
Chapter 06 rsa cryptosystem
Chapter 06   rsa cryptosystemChapter 06   rsa cryptosystem
Chapter 06 rsa cryptosystem
Ankur Choudhary
 
ch09_rsa_nemo.ppt
ch09_rsa_nemo.pptch09_rsa_nemo.ppt
ch09_rsa_nemo.ppt
ChandraB15
 
Rsa rivest shamir adleman
Rsa rivest shamir adlemanRsa rivest shamir adleman
Rsa rivest shamir adleman
Hossain Md Shakhawat
 
Rsa
RsaRsa
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network securitypatisa
 
Cryptography Key Management.pptx
Cryptography Key Management.pptxCryptography Key Management.pptx
Cryptography Key Management.pptx
SurendraBasnet6
 
Cryptosystem An Implementation of RSA Using Verilog
Cryptosystem An Implementation of RSA Using VerilogCryptosystem An Implementation of RSA Using Verilog
Cryptosystem An Implementation of RSA Using Verilog
ijcncs
 
Ch12 Encryption
Ch12 EncryptionCh12 Encryption
Ch12 Encryptionphanleson
 
PUBLIC KEY & RSA.ppt
PUBLIC KEY & RSA.pptPUBLIC KEY & RSA.ppt
PUBLIC KEY & RSA.ppt
RizwanBasha12
 
Unit --3.ppt
Unit --3.pptUnit --3.ppt
Unit --3.ppt
DHANABALSUBRAMANIAN
 
Sasha Romijn - Everything I always wanted to know about crypto, but never tho...
Sasha Romijn - Everything I always wanted to know about crypto, but never tho...Sasha Romijn - Everything I always wanted to know about crypto, but never tho...
Sasha Romijn - Everything I always wanted to know about crypto, but never tho...
Codemotion
 

Similar to Secure Encyrption Systems Chapter 2 (20)

Public key algorithm
Public key algorithmPublic key algorithm
Public key algorithm
 
Alex WANG - What is the most effective cryptosystem for public-key encryption?
Alex WANG - What is the most effective cryptosystem for public-key encryption?Alex WANG - What is the most effective cryptosystem for public-key encryption?
Alex WANG - What is the most effective cryptosystem for public-key encryption?
 
Ch09
Ch09Ch09
Ch09
 
CRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdfCRYPTOGRAPHY (2).pdf
CRYPTOGRAPHY (2).pdf
 
Chapter 06 rsa cryptosystem
Chapter 06   rsa cryptosystemChapter 06   rsa cryptosystem
Chapter 06 rsa cryptosystem
 
Rsa
RsaRsa
Rsa
 
50620130101002
5062013010100250620130101002
50620130101002
 
ch09_rsa_nemo.ppt
ch09_rsa_nemo.pptch09_rsa_nemo.ppt
ch09_rsa_nemo.ppt
 
Rsa rivest shamir adleman
Rsa rivest shamir adlemanRsa rivest shamir adleman
Rsa rivest shamir adleman
 
Rsa
RsaRsa
Rsa
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
Introduction to cryptography
Introduction to cryptographyIntroduction to cryptography
Introduction to cryptography
 
Cryptography Key Management.pptx
Cryptography Key Management.pptxCryptography Key Management.pptx
Cryptography Key Management.pptx
 
Cryptosystem An Implementation of RSA Using Verilog
Cryptosystem An Implementation of RSA Using VerilogCryptosystem An Implementation of RSA Using Verilog
Cryptosystem An Implementation of RSA Using Verilog
 
Ch12 Encryption
Ch12 EncryptionCh12 Encryption
Ch12 Encryption
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
 
The rsa algorithm
The rsa algorithmThe rsa algorithm
The rsa algorithm
 
PUBLIC KEY & RSA.ppt
PUBLIC KEY & RSA.pptPUBLIC KEY & RSA.ppt
PUBLIC KEY & RSA.ppt
 
Unit --3.ppt
Unit --3.pptUnit --3.ppt
Unit --3.ppt
 
Sasha Romijn - Everything I always wanted to know about crypto, but never tho...
Sasha Romijn - Everything I always wanted to know about crypto, but never tho...Sasha Romijn - Everything I always wanted to know about crypto, but never tho...
Sasha Romijn - Everything I always wanted to know about crypto, but never tho...
 

More from AfiqEfendy Zaen

10. short term financial planning
10. short term financial planning10. short term financial planning
10. short term financial planningAfiqEfendy Zaen
 
4. time value of money
4. time value of money4. time value of money
4. time value of money
AfiqEfendy Zaen
 
3 financial ratio
3 financial ratio3 financial ratio
3 financial ratio
AfiqEfendy Zaen
 
2. financial statement cash flow
2. financial statement cash flow2. financial statement cash flow
2. financial statement cash flow
AfiqEfendy Zaen
 

More from AfiqEfendy Zaen (8)

10. short term financial planning
10. short term financial planning10. short term financial planning
10. short term financial planning
 
9. cost of capital
9. cost of capital9. cost of capital
9. cost of capital
 
8. stock valuation
8. stock valuation8. stock valuation
8. stock valuation
 
6. risk return
6. risk return6. risk return
6. risk return
 
6. bond valuation
6. bond valuation6. bond valuation
6. bond valuation
 
4. time value of money
4. time value of money4. time value of money
4. time value of money
 
3 financial ratio
3 financial ratio3 financial ratio
3 financial ratio
 
2. financial statement cash flow
2. financial statement cash flow2. financial statement cash flow
2. financial statement cash flow
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 

Secure Encyrption Systems Chapter 2

  • 1. CHAPTER 3CHAPTER 3 SECURE ENCRYPTION SYSTEMSSECURE ENCRYPTION SYSTEMS
  • 2. IntroductionIntroduction  There are two main types of cryptography:There are two main types of cryptography:  symmetric (secret key) cryptographysymmetric (secret key) cryptography  asymmetric (public key) cryptographyasymmetric (public key) cryptography
  • 3. Symmetric (Secret Key)Symmetric (Secret Key) CryptographyCryptography Symmetric (secret key) cryptographySymmetric (secret key) cryptography  Data is encrypted using a key.Data is encrypted using a key.  The same key must be use to decrypt the data.The same key must be use to decrypt the data.  The security of a symmetric cryptography rests in theThe security of a symmetric cryptography rests in the key.key.  Divulging the key - anyone could encrypt and decryptDivulging the key - anyone could encrypt and decrypt the message.the message.  Example : Data Encryption Standard (DES)Example : Data Encryption Standard (DES)
  • 4. Symmetric (Secret Key)Symmetric (Secret Key) CryptographyCryptography Problem with Symmetric CryptographyProblem with Symmetric Cryptography (Distribution of Keys)(Distribution of Keys)  The main problem is getting the sender and receiverThe main problem is getting the sender and receiver agree on the secret key without anyone else finding out.agree on the secret key without anyone else finding out.  If they are in separate physical locations, they must trustIf they are in separate physical locations, they must trust a courier or a phone system or some other transmissiona courier or a phone system or some other transmission medium to prevent the disclosure of the secret key beingmedium to prevent the disclosure of the secret key being communicated.communicated.  Anyone who overhears or intercepts the key in transitAnyone who overhears or intercepts the key in transit can later read, modify and forge all messages encryptedcan later read, modify and forge all messages encrypted using that key.using that key.
  • 5. Asymmetric (Public Key)Asymmetric (Public Key) CryptographyCryptography Asymmetric (public key) cryptographyAsymmetric (public key) cryptography  Different keys used for encryption and decryptionDifferent keys used for encryption and decryption  The ciphering algorithm are called the public keyThe ciphering algorithm are called the public key algorithms becausealgorithms because one of the keys used can beone of the keys used can be made publicmade public..  Example : a complete stranger can use theExample : a complete stranger can use the publicpublic encryption key to encryptencryption key to encrypt a message but only aa message but only a specific person with the correspondingspecific person with the corresponding secretsecret decryption key can decrypt the messagedecryption key can decrypt the message..  In these systems, the encryption key is often calledIn these systems, the encryption key is often called the public key and the decryption key is often calledthe public key and the decryption key is often called the private key.the private key.  Example : RSAExample : RSA
  • 6. Asymmetric (Public Key)Asymmetric (Public Key) CryptographyCryptography Concern about public key algorithm:Concern about public key algorithm:  The concern covers three categories:The concern covers three categories:  Fortitude in providing unbreakable securityFortitude in providing unbreakable security  PracticalityPracticality  ApplicabilityApplicability  Many of the algorithms are insecureMany of the algorithms are insecure  Among secure algorithm, many are impractical –Among secure algorithm, many are impractical – key size too large or ciphertext is much larger thankey size too large or ciphertext is much larger than plaintextplaintext  Only few algorithms are both secure and practical :Only few algorithms are both secure and practical :  Some are only suitable for key distributionSome are only suitable for key distribution  Some are only suitable for encryptionSome are only suitable for encryption
  • 7. Merkle-Hellman KnapsackMerkle-Hellman Knapsack  One of the earliest public key cryptosystem invented byOne of the earliest public key cryptosystem invented by Ralph Merkle and Martin Hellman in 1978.Ralph Merkle and Martin Hellman in 1978.  Is based on theIs based on the subset sum problemsubset sum problem (a special case of the(a special case of the knapsack problemknapsack problem): given a list of numbers and a third): given a list of numbers and a third number, which is the sum of a subset of these numbers,number, which is the sum of a subset of these numbers, determine the subset.determine the subset.  In general, this problem is known to beIn general, this problem is known to be NP-completeNP-complete;; however, there are some 'easy' instances which can behowever, there are some 'easy' instances which can be solved efficiently.solved efficiently.  However, the scheme was broken by Adi Shamir, not byHowever, the scheme was broken by Adi Shamir, not by attacking the knapsack problem, but rather by breaking theattacking the knapsack problem, but rather by breaking the conversion from an easy knapsack to a hard one.conversion from an easy knapsack to a hard one.
  • 8. Merkle-Hellman KnapsackMerkle-Hellman Knapsack  What is a knapsack problem?What is a knapsack problem?  Given N = {17, 38, 73, 4, 11, 1}  Find a subset of N whose elements adds up to 53.  Is it 73? No!  How about 17? If 17, the balance would be 36 and therefore it cannot be 17.  38? 53 - 38 = 15 = 4 + 11.  Therefore {38, 11, 4} is the solution  Generally to solve it, what it needs is an NP-Complete complexity, exponential time behavior in term off the size of the problem, in this case the number of integers.  needs to backtrack, discard etc….
  • 9. Merkle-Hellman KnapsackMerkle-Hellman Knapsack  The scheme is to encode a binary message as a solution to a knapsack problem, reducing the ciphertext to the target sum obtained by adding terms corresponding to 1s in the plaintext. PlaintextPlaintext 11 00 11 00 00 11 00 11 11 00 11 00 KnapsackKnapsack 11 22 55 99 2020 4343 11 22 55 99 2020 4343  Target Sum = 1 + 5 + 43 2 + 5 + 20 = 49 = 27
  • 10. Merkle-Hellman KnapsackMerkle-Hellman Knapsack Superincreasing Knapsack  When the elements of the set are arranged strictly such that ak > Σ aj from j = 1 to k-1 the knapsack problem becomes simpler This kind of arrangement are called superincreasing.  Example: Set of {1, 4, 11, 17, 38, 73}  Because the elements are ordered, and an element ai is always > sum of all the lower elements, it is easy to decide whether to discard or to include.
  • 11. Merkle-Hellman KnapsackMerkle-Hellman Knapsack Encryption Technique  It is a public-key cryptosystem:  public key : is the set of integers of a knapsack problem (non-superincreasing knapsack – NSI)  private key : is the corresponding superincreasing knapsack - SI  Genius of Merkle Hellman was to discover a means to transform an SI knapsack to NSI knapsack.  The transformation is not obvious but reversible.
  • 12. Merkle-Hellman KnapsackMerkle-Hellman Knapsack Transforming SI (Superincreasing) to NSI (Non – Superincreasing)  Let s = {s1, s2, s3, ……sM}. Choose a multiplier w and a modulus n such that n > sM (w, n) is relatively prime (no common factor)  Then h = {h1, h2, h3, ……hM} such that h1 = w * s1 mod n, h2 = w * s2 mod n, and so on.
  • 13. Merkle-Hellman KnapsackMerkle-Hellman Knapsack Example of transforming SI to NSIExample of transforming SI to NSI Suppose s = {1, 2, 4, 9} and suppose w = 15 and n = 17 1 * 15 mod 17 = 15 2 * 15 mod 17 = 13 4 * 15 mod 17 = 9 9 * 15 mod 17 = 16 So H = {15, 13, 9, 16} and this is NSI.
  • 14. Merkle-Hellman KnapsackMerkle-Hellman Knapsack Example (Encrypt Process)  Given S = {1, 2, 4, 9} (private key) and H = {15, 13, 9, 16} (public key) with w = 15, n = 17 and m = 4 (divide the block into m bits). Message is 0100 1011 1010 0101.  With H = {15, 13, 9, 16} the message is encoded as follows: [0 1 0 0] * [15, 13, 9, 16] = 13 [1 0 1 1] * [15, 13, 9, 16] = 40 [1 0 1 0] * [15, 13, 9, 16] = 24 [0 1 0 1] * [15, 13, 9, 16] = 29
  • 15. Merkle-Hellman KnapsackMerkle-Hellman Knapsack Example Decryption Process  To decrypt, we first need to find the inverse of 15 mod 17 and this is equal to 8. Multiply all the encrypted message C with 8 mod 17 to get the sum si.  Note : S = {1, 2, 4, 9} (private key) 13 * 8 mod 17 = 2 = [0100] 40 * 8 mod 17 = 14 = [1011] 24 * 8 mod 17 = 5 = [1010] 29 * 8 mod 17 = 11 = [0101]  The recovered message is 0100101110100101
  • 16. Merkle-Hellman KnapsackMerkle-Hellman Knapsack Inverse 15 mod 17Inverse 15 mod 17 15 * y mod 17 = 115 * y mod 17 = 1 15 * 1 mod 17 = 15 mod 17 = 1515 * 1 mod 17 = 15 mod 17 = 15 15 * 2 mod 17 = 30 mod 17 = 1315 * 2 mod 17 = 30 mod 17 = 13 15 * 3 mod 17 = 45 mod 17 = 1115 * 3 mod 17 = 45 mod 17 = 11 15 * 4mod 17 = 60 mod 17 = 915 * 4mod 17 = 60 mod 17 = 9 15 * 5 mod 17 = 75 mod 17 = 715 * 5 mod 17 = 75 mod 17 = 7 15 * 6 mod 17 = 80 mod 17 = 515 * 6 mod 17 = 80 mod 17 = 5 15 * 7 mod 17 = 105 mod 17 = 315 * 7 mod 17 = 105 mod 17 = 3 15 * 8 mod 17 = 120 mod 17 = 115 * 8 mod 17 = 120 mod 17 = 1
  • 17. RSA AlgorithmRSA Algorithm The RSA algorithm is named after Ron Rivest, Adi Shamir and Leonard Adleman who invented it in 1977. The RSA algorithm can be used for both public key encryption and digital signatures (authentication).
  • 18. RSA AlgorithmRSA Algorithm  In RSA algorithm, there are 3 importantIn RSA algorithm, there are 3 important steps:steps: Key generation algorithmKey generation algorithm EncryptionEncryption DecryptionDecryption
  • 19. RSA AlgorithmRSA Algorithm Key Generation AlgorithmKey Generation Algorithm  Generate two large random primes, p and q ofGenerate two large random primes, p and q of approximately equal size such that their product n = pq isapproximately equal size such that their product n = pq is of the required bit length (e.g: 1024 bits)of the required bit length (e.g: 1024 bits)  Compute n = pq andCompute n = pq and phiphi ((ΦΦ) = (p-1) (q-1)) = (p-1) (q-1)  Choose an integer e, 1< e < phi, such that gcd (e, phi) = 1Choose an integer e, 1< e < phi, such that gcd (e, phi) = 1  Compute the secret exponent d, 1 < d < phi, such thatCompute the secret exponent d, 1 < d < phi, such that ed = 1 (mod phi)ed = 1 (mod phi) The public key is (n, e) and the private key is (n, d)The public key is (n, e) and the private key is (n, d)
  • 20. RSA AlgorithmRSA Algorithm Encryption processEncryption process  Obtains the recipient B’s public key (n, e)Obtains the recipient B’s public key (n, e)  Represent the plaintext message asRepresent the plaintext message as positive integer m.positive integer m.  Compute the ciphertext c = mCompute the ciphertext c = mee mod nmod n  Sends the ciphertext c to B (recipient)Sends the ciphertext c to B (recipient)
  • 21. RSA AlgorithmRSA Algorithm Decryption processDecryption process Recipient B does the following: Uses his private key (n, d) to compute m = cd mod n Extracts the plaintext from the integer representative m.
  • 22. RSA AlgorithmRSA Algorithm Example : Key Generation:  Let p = 11, q = 13, so n = p*q = 143 (ΦΦ) = (p-1)(q-1) = 10 * 12 = 120  Choose e relatively prime to (ΦΦ), say e = 11 e * d mod ΦΦ = 1 11 * d mod 120 = 1 Therefore d = 11  Now we know : Public key ( e = 11, n = 143) : Private key (d = 11) p & q – prime number n = p * q (ΦΦ) = (p-1) (q-1) e, n public key d private key
  • 23. RSA AlgorithmRSA Algorithm Example : Encryption process:  If plaintext m = 7, C = me mod n 711 mod 143 = 106 Decryption process:  To decrypt, since c = 106  m = cd mod n = 10611 mod 143 = 7
  • 24. RSA AlgorithmRSA Algorithm How do you calculate 711 mod 143 = 106?? 711 mod 143 = 74 mod 143 * 74 mod 143 * 72 mod 143 * 71 mod 143 = 113 * 113 * 49 * 7 (mod 143) = 12769 * 343 (mod 143) = 42 * 57 (mod 143) = 2394 mod 143 = 106
  • 25. DES (Data Encryption Standard)DES (Data Encryption Standard)  Invented by a team (led by Walter Tuchman) based on a concept originated by Horst Feistel of IBM and known as Lucifer  Its proper name is DEA (Data Encryption Algorithm) in US and DEA1 in other countries.  Mandated for encryption by all federal agencies for sensitive data.  When used for communication, both sender and receiver must know the same secret key, which can be used to encrypt and decrypt the message
  • 26. DES (Data Encryption Standard)DES (Data Encryption Standard) DES CharacteristicsDES Characteristics  Symmetric Encryption  Combination of substitution technique and transposition technique.  Provide confusion by systematically substituting some bit patterns for others.  Provide diffusion by reordering bits.  Uses only standard arithmetic and logical operations.  Plaintext is encrypted in blocks of 64 bits  56-bit key - Choosing 56 bits also allowed DES to be implemented on a single chip  64-bit key-block (8 parity bits embedded)
  • 27. DES (Data Encryption Standard)DES (Data Encryption Standard)  Refer to your extra notes !Refer to your extra notes !
  • 28. DES (Data Encryption Standard)DES (Data Encryption Standard) Decryption One advantage of DES is that decryption is essentially the same as encryption. The key schedule is reversed. This is due to the fact that DES is based on a Feistel network.
  • 29. DES Weak Keys • Because of the way the key is modified at each round to get the sub-key, certain keys are weak keys. • Weak keys are those which are unmodified at each round, because they contain all 1’s or all 0’s in each half of the key. Weak Key 64-bit value Actual subkey values after (with parity) initial permutation (2x28) 0101 0101 0101 0101 00000000 00000000 1F1F 1F1F 1F1F 1F1F 00000000 FFFFFFFF E0E0 E0E0 E0E0 E0E0 FFFFFFFF 00000000 FEFE FEFE FEFE FEFE FFFFFFFF FFFFFFFF
  • 30. DES Semi-Weak Keys • Some pairs of keys will encrypt a given plaintext to the same ciphertext. • This is because they yeild only two different subkeys, each of which is used 8 times in the algorithm. • These pairs are known as semi-weak keys 01FE 01FE 01FE 01FE FE01 FE01 FE01 FE01 1FE0 1FE0 1FE0 1FE0 E01F E01F E01F E01F 01E0 01E0 01E0 01E0 E001 E001 E001 E001
  • 31. Security of DES • There have been two major points of criticism about DES : – key size is too small, – the S-boxes contained secret design criteria. • With advances in the field of cryptanalysis and the huge increase in available computing power, DES is no longer considered to be very secure.
  • 32. Triple-DES Algorithm • Triple-DES is a secure variation of the Data Encryption Standard first developed by IBM, and later in 1977 adopted by the U.S.government. • Triple-DES is a 192 bit (24 characters) cipher that uses three separate 64 bit keys and encrypts data using the DES algorithm three times. ABI- CODER uses a variation that takes a single 192 bit (24 characters) key and then; – encrypts data using first 64 bits (8 characters) – decrypts same data using second 64 bits (8 characters) – encrypts same data using the last 64 bits (8 characters)
  • 34. 3 or 2 Keys?
  • 35. Security of DESSecurity of DES  1997 – 3500 machines parallel infer a1997 – 3500 machines parallel infer a DES key in four month.DES key in four month.  1998 - $100,000; researchers built ‘DES1998 - $100,000; researchers built ‘DES cracker’ – DES key in four days.cracker’ – DES key in four days.  DES secure? – great deal of cooperationDES secure? – great deal of cooperation & money. 3 DES still beyond the power of& money. 3 DES still beyond the power of these attacks.these attacks.
  • 36. New algorithmNew algorithm  Increasing power of computer, USIncreasing power of computer, US National Institute of Standards andNational Institute of Standards and Technology began the search for new,Technology began the search for new, strong algorithm in 1995.strong algorithm in 1995.  Many participated (15 -> 5).Many participated (15 -> 5).  Based on not just security but also costBased on not just security but also cost (efficiency) & ease of implementation.(efficiency) & ease of implementation.  Winner – Rijndael a.k.a AdvancedWinner – Rijndael a.k.a Advanced Encryption Standard (AES).Encryption Standard (AES).
  • 37. DesignDesign  UnclassifiedUnclassified  Publicly disclosedPublicly disclosed  Available royalty-fee worldwideAvailable royalty-fee worldwide  Symmetric block cipher algorithms (128Symmetric block cipher algorithms (128 bits)bits)  Usable with key size 128, 192, and 256Usable with key size 128, 192, and 256 bitsbits
  • 38. AES (Rijndael)AES (Rijndael)  Created by Vincent Rijmen & JoanCreated by Vincent Rijmen & Joan Daemen (Dutch cryptographers).Daemen (Dutch cryptographers).  Adopted for use by US government in DecAdopted for use by US government in Dec 2001.2001.  Fast on simple processors.Fast on simple processors.  Repeat cycles.Repeat cycles.  10, 12, 14 cycles for keys of 128, 192 and10, 12, 14 cycles for keys of 128, 192 and 256 bits.256 bits.
  • 39. AES cycle (round)AES cycle (round)  Byte substitution – S-box substituting 128-Byte substitution – S-box substituting 128- bit block.bit block.  Shift row – Transposition.Shift row – Transposition.  Mix column – left shift & XOR.Mix column – left shift & XOR.  Add Subkey – subkey XORed with cycle.Add Subkey – subkey XORed with cycle.
  • 40. -THE END-THE END- Summary / Discussion time!Summary / Discussion time!