Term2 Updated
Term2 Updated
A group (G) is a set of elements with a binary operation (•) that satisfies
four properties. A commutative group satisfies an extra property,
commutativity.
The set Zn* with the multiplication operator, G = < Zn*,x>, is also an
abelian group.
Let us define a set G = < {a, b, c, d}, •> and the operation as shown in
Table below.
Ring 12-5
Ring 12-6
The first operation must satisfy all the five properties of abelian group
and second operation must satisfy only two or three properties for ring &
abelian ring respectively.
Galois showed that for a field to be finite, the number of elements should
be pn, where p is a prime and n is a positive integer.
A very common field in this category is GF(2) with the set {0, 1} and two
operations, addition and multiplication, as shown in Figure below.
Finite Fields 12-9
1. Disclosure
2. Traffic Analysis
3. Masquerade
4. Content Modification
5. Sequence Modification
6. Timing Modification
7. Source Repudiation
8. Destination Repudiation
Authentication Requirements 12-11
Measures to deal with 8 requires digital signature along with few other
protocols.
Authentication Functions 12-12
At the lower level, some authenticator is generated & at the next level,
generated authenticator is used to authenticate the message.
MAC=CK(M)
M: Message
K: Secret key
C: MAC function
MAC: Message authentication code
Message Authentication Code (MAC) 12-15
MAC function Analysis 12-16
The cryptanalysis can perform MACi=CKi(M1) for all possible key values.
We can group attacks on hash function and MAC’s into two categories:
brute force attacks and cryptanalysis.
Hash functions:
For any given h, it is computationally infeasible to find x such that H(x)=h. This is
referred to as one-way property.
For any given block x, it is computationally infeasible to find y≠x with H(y)=H(x).
This is referred to as weak collision resistance.
It is computationally infeasible to find pair (x,y) such that H(x)=H(y). This is
referred to as strong collision resistance.
Security of Hash Function & MACs 12-22
One way: 2n
Weak collision resistance: 2n
Strong Collision resistance: 2n/2
Security of Hash Function & MACs 12-23
MAC:
Given a fixed message x with n-bit MAC code h=H(x), a brute force
method of finding a collision is to pick a random bit string and check if
H(y)=H(x).
There are two lines of attacks possible: Attack the key space and attack the
MAC values.
Finally the level of effort for brute force attack on a MAC algorithm can
be expressed as min(2k,2n ).
Birthday Problems 12-25
Encryption algorithm
Ciphertext
Decryption algorithm
Public Key Cryptography: Encryption 12-30
Public Key Cryptography: Authentication 12-31
RSA algorithm 12-32
Named after inventors Ron Rivest, Adi Shamir and Len Adleman.
RSA is a block cipher between 0 and n-1 for some n.
Typical size of n is 1024 bits or 309 digits.
RSA Algorithm 12-33
RSA Example 12-34
For example: A sends the same message to three recipients with the
same public exponent e=3 and the moduli n1, n2 and n3.
C1=P3 mod n1 C2=P3 mod n2 C3=P3 mod n3
Apply CRT algorithm, to find the values of P3 and thus can calculate
different values for C1, C2 & C3
Attacks on RSA 12-38
This means that if Bob finds out that the decryption exponent is
compromised, he needs to create new value of n, public key and private
key.
Attacks on RSA 12-39
For example: People in a community might let a trusted party select p &
q, calculate n and ɸ(n) and create a pair of exponents for each entity.
Using its own exponents, eve can launch probabilistic attack to factor n
and find B’s private key. (Assumtion Eve is also a part of community).
Elgamal Cryptosystem 12-40
9.46
Discrete Logarithm 12-47
9.49
Discrete Logarithm 12-50
Example 9.53
Solution
We can easily use the tabulation of the discrete logarithm in Table
9.6.
a. 4 ≡ 3x mod 7 → x = L34 mod 7 = 4 mod 7
9.51
SHA Versions
Secure Hash Algorithm (SHA-1)
• SHA was designed by NIST & NSA in 1993,
revised 1995 as SHA-1
• US standard for use with DSA signature scheme
– standard is FIPS 180-1 1995, also Internet RFC3174
– nb. the algorithm is SHA, the standard is SHS
• produces 160-bit hash values
• now the generally preferred hash algorithm
• based on design of MD4 with key differences
SHA Overview
1. pad message so its length is 448 mod 512
2. append a 64-bit length value to message
3. initialise 5-word (160-bit) buffer (A,B,C,D,E) to
(67452301,efcdab89,98badcfe,10325476,c3d2e1f0)
4. process message in 16-word (512-bit) chunks:
– expand 16 words into 80 words by mixing & shifting
– use 4 rounds of 20 bit operations on message block
& buffer
– add output to input to form new buffer value
5. output hash value is the final buffer value
SHA-1 Compression Function
• each round has 20 steps which replaces
the 5 buffer words thus:
(A,B,C,D,E) <-(E+f(t,B,C,D)+(A<<5)+Wt+Kt),A,
(B<<30),C,D)
• a,b,c,d refer to the 4 words of the buffer
• t is the step number
• f(t,B,C,D) is nonlinear function for round
• Wt is derived from the message block
• Kt is a constant value derived from sin
SHA-1 Compression Function
SHA-1 verses MD5
• brute force attack is harder (160 vs 128
bits for MD5)
• not vulnerable to any known attacks
(compared to MD4/5)
• a little slower than MD5 (80 vs 64 steps)
• both designed as simple and compact
• optimised for big endian CPU's (vs MD5
which is optimised for little endian CPU’s)
Revised Secure Hash
Standard
• NIST have issued a revision FIPS 180-2
• adds 3 additional hash algorithms
• SHA-256, SHA-384, SHA-512
• designed for compatibility with increased
security provided by the AES cipher
• structure & detail is similar to SHA-1
• hence analysis should be similar
SHA-512 Overview
SHA-512 Logic
1. Append padding bits : The message is padded, so
that padded message is 128 bits less than an integer
multiple of 1024.
• For any given block x, it is computationally infeasible to find y≠x with H(y)=H(x). This is
referred to as weak collision resistance.
• It is computationally infeasible to find pair (x,y) such that H(x)=H(y). This is referred to as
strong collision resistance.
Security of Hash Function &
MACs
• For a code of length n, the level of effort
required is proportional to the following:
• One way: 2n
• Weak collision resistance: 2n
• Strong Collision resistance: 2n/2
Security of Hash Function &
MACs
• Brute force attack:
• MAC:
• Given a fixed message x with n-bit MAC code h=H(x), a brute force method
of finding a collision is to pick a random bit string and check if H(y)=H(x).
• There are two lines of attacks possible: Attack the key space and attack the MAC values.
• Suppose the key size is k bits and that the attacker has one known text
MAC pair. Then the attacker can compute the n-bit MAC on the known text
for all possible keys.
• At least, one key is guaranteed to produce the correct match.
• This phase of attack takes a level of effort proportional to 2k
Security of Hash Function &
MACs
• Attack on MAC space:
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
13.77
13-1 COMPARISON
Topics to be discussed :
13.1.1 Inclusion
13.1.2 Verification Method
13.1.3 Relationship
13.1.4 Duplicity
13.78
13.1.1 Inclusion
13.79
13.1.2 Verification Method
13.80
13.1.3 Relationship
13.81
13.1.4 Duplicity
13.82
13-2 PROCESS
13.84
13.2.1 Need for Keys
Note
A digital signature needs a public-key system.
The signer signs with her private key; the verifier
verifies with the signer’s public key.
13.85
13.2.1 Continued
Note
A cryptosystem uses the private and public keys of
the receiver: a digital signature uses
the private and public keys of the sender.
13.86
13.2.2 Signing the Digest
13.87
13-3 SERVICES
13.88
13.3.1 Message Authentication
13.89
13.3.2 Message Integrity
Note
13.90
13.3.3 Nonrepudiation
Note
Note
13.93
13.5.1 Continued
Key Generation
Key generation in the RSA digital signature scheme is
exactly the same as key generation in the RSA
Note
In the RSA digital signature scheme, d is private;
e and n are public.
13.94
13.5.1 Continued
13.95
13.5.1 Continued
Example 13.1
As a trivial example, suppose that Alice chooses p = 823 and q = 953,
and calculates n = 784319. The value of (n) is 782544. Now she
chooses e = 313 and calculates d = 160009. At this point key
generation is complete. Now imagine that Alice wants to send a
message with the value of M = 19070 to Bob. She uses her private
exponent, 160009, to sign the message:
Alice sends the message and the signature to Bob. Bob receives the
message and the signature. He calculates
13.96
13.5.1 Continued
13.97
13.5.1 Continued
Note
When the digest is signed instead of the message itself,
the susceptibility of the RSA digital signature scheme
depends on the strength of the hash algorithm.
13.98
13.5.2 Continued
Key Generation
The key generation procedure here is exactly the same as
the one used in the cryptosystem.
Note
In ElGamal digital signature scheme, (e1, e2, p) is
Alice’s public key; d is her private key.
13.99
13.5.2 Continued
13.100
Digital Signature Standard (DSS)
US Govt approved signature scheme
designed by NIST & NSA in early 90's
published as FIPS-186 in 1991
revised in 1993, 1996 & then 2000
uses the SHA hash algorithm
DSS is the standard, DSA is the algorithm
FIPS 186-2 (2000) includes alternative RSA &
elliptic curve signature variants
DSA is digital signature only unlike RSA
is a public-key technique
DSS vs RSA Signatures
Digital Signature Standard (DSS)
Digital Signature Standard (DSS)
13.104
Digital Signature Standard (DSS)
13.105