25
Presented by: Sadhana Singh M.Tech(S.E.)

Digital signature

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Digital signature

Presented by: Sadhana Singh

M.Tech(S.E.)

Page 2: Digital signature

Digital SignatureEl GamalRSAMessage AuthenticationAuthentication Using Private key CiphersHashing FunctionsPhysical Signature/Digital SignatureSHA(Secure Hash Algorithm)DSA(Digital Signature Algorithm)

Page 3: Digital signature

The private-key signs (create) signatures, and the public-key verifies signatures Only the owner can create the digital signature, hence it can be used to verify who created a message Generally don't sign the whole message (doubling the size of information exchanged), but just a digest or hash of the message.

Page 4: Digital signature

A hash function takes the message, and produces a fixed size (typically 64 to 512 bits) value dependent on the message

It must be hard to create another message with the same hash value (otherwise some forgeries are possible)

Developing good hash functions is another non-trivial problem

Page 5: Digital signature

El Gamal algorithm can also be used (with a small change) in signing messages

As in the encryption scheme, the public key will be a y = gx mod p, together with g and p

To sign a message: • Bob first chooses a random number k relative

prime to p-1• Bob computes a = gk mod p • Bob can solve the equation M = x*a + k*b (mod

p-1) for b.• The signature is the pair a and b

Page 6: Digital signature

To verify a signature:• Check that yaab mod p = gM mod p

Example:• p = 11, g = 2. Bob chooses x = 8.• y = 28 mod 11 = 3• Public key: y = 3, g = 2, p = 11• Bob wants to sign M = 5• Chooses k = 9 (gcd(9, 10) = 1)

a = 29 mod 11 = 6

Page 7: Digital signature

Example• Solve: 5 = 8*6 + 9 * b mod 10• b = 3• The signature is a = 6, b = 3• To verify the signature check that:

3663 mod 11 = 25 mod 11

Page 8: Digital signature

RSA encryption and decryption are commutative, hence it may be used directly as a digital signature scheme

Given an RSA scheme {(e,R), (d,p,q)} To sign a message, compute:

• S = Md(mod R) To verify a signature, compute:

• M = Se(mod R) = Me.d(mod R) = M(mod R) Thus know the message was signed by the

owner of the public-key

Page 9: Digital signature

Would seem obvious that a message may be encrypted, then signed using RSA without increasing it size

But have blocking problem, since it is encrypted using the receivers modulus, but signed using the senders modulus (which may be smaller)

Several approaches possible to overcome this

More commonly use a hash function to create a separate message digest which is then signed

Page 10: Digital signature

Message authentication is concerned with: • protecting the integrity of a message • validating identity of originator • non-repudiation of origin (dispute resolution)

Electronic equivalent of a signature on a message

An authenticator, signature, or message authentication code (MAC) is sent along with the message

Page 11: Digital signature

The MAC is generated via some algorithm which depends on both the message and some (public or private) key known only to the sender and receiver

The message may be of any length The MAC may be of any length, but more often

is some fixed size, requiring the use of some hash function to condense the message to the required size if this is not achieved by the authentication scheme

Need to consider replay problems with message and MAC • require a message sequence number,

timestamp or negotiated random values

Page 12: Digital signature

If a message is being encrypted using a session key known only to the sender and receiver, then the message may also be authenticated • Since only sender or receiver could have

created it • Any interference will corrupt the message

(provided it includes sufficient redundancy to detect change)

• This does not provide non-repudiation since it is impossible to prove who created the message

Page 13: Digital signature

Message authentication may also be done using the standard modes of use of a block cipher • Sometimes do not want to send encrypted messages • Can use either CBC or CFB modes and send final

block, since this will depend on all previous bits of the message

• No hash function is required, since this method accepts arbitrary length input and produces a fixed output

• Usually use a fixed known IV • This is the approached used in Australian EFT

standards AS8205 • Major disadvantage is small size of resulting MAC

since 64-bits is probably too small

Page 14: Digital signature

Hashing functions are used to condense an arbitrary length message to a fixed size, usually for subsequent signature by a digital signature algorithm

Good cryptographic hash function h should have the following properties: • h should destroy all homomorphic structures in

the underlying public key cryptosystem (be unable to compute hash value of 2 messages combined given their individual hash values)

Page 15: Digital signature

Properties:• h should be computed on the entire message • h should be a one-way function so that

messages are not disclosed by their signatures • It should be computationally infeasible given a

message and its hash value to compute another message with the same hash value

• Should resist birthday attacks (finding any 2 messages with the same hash value, perhaps by iterating through minor permutations of 2 messages)

Page 16: Digital signature

It is usually assumed that the hash function is public and not keyed

Traditional CRCs do not satisfy the above requirements

Length should be large enough to resist birthday attacks (64-bits is now regarded as too small, 128-512 proposed)

Page 17: Digital signature

Physical Signature is just a writing on paper whereas Digital Signature encompasses crucial parameters of identification

Physical Signature can be copied whereas It is IMPOSSIBLE to copy a Digital signature

Physical Signature does not give privacy to content whereas Digital Signature also enables encryption and thus privacy

Physical Signature cannot protect the content whereas Digital Signature protects the content

Page 18: Digital signature

SHA was designed by NIST & NSA and is the US federal standard for use with Secure Hash Algorithm) the DSA signature scheme • the algorithm is SHA, the standard is SHS

It produces 160-bit hash values

Page 19: Digital signature

SHA overview• Pad message, liker in MD5, so its length is a

multiple of 512 bits • Initialize a 5-word (160-bit) buffer

A= 67452301, B = efcdab89, C = 98badcfe, D = 10325476, E=c3d2e1f0

• Process the message in 16-word (512-bit) chunks, using 4 rounds of 20 bit operations each on the chunk & buffer

• Output hash value is the final buffer value

Page 20: Digital signature

SHA is a close relative of MD5 (based on MD4), sharing much common design, but each having differences• SHA = MD4 + “expand” transformation + extra round + better-

avalanche• MD5 = MD4 + improved bit-bashing + extra round + better-

avalanche SHA has very recently been subject to

modification following NIST identification of some concerns, the exact nature of which is not public

Current version is regarded as secure

Page 21: Digital signature

DSA was designed by NIST & NSA and is the US federal standard signature scheme (used with SHA hash algorithm)

DSA is the algorithm, DSS is the standard There was considerable reaction to its

announcement! • debate over whether RSA should have been

used • debate over the provision of a signature only

algorithm

Page 22: Digital signature

DSA is a variant on the ElGamal and Schnorr algorithms

Description of DSA • p of length 2L is a prime number, where L= 512

to 1024 bits and is a multiple of 64 • q is a 160 bit prime factor of p-1 • g = h(p-1)/q where h is any number less than p-1

with h(p-1)/q(mod p) > 1 • x is a number less than q (private key)• y = gx(mod p)

Page 23: Digital signature

Description of DSA• To sign a message M

generate random k, k<q compute r = (gk(mod p))(mod q) s = k-1.SHA(M)+ x.r (mod q) the signature is (r,s)

• To verify a signature: w = s-1(mod q) u1= (SHA(M).w)(mod q) u2= r.w(mod q) v = (gu1.yu2(mod p))(mod q) if v=r then the signature is verified

Page 24: Digital signature

Comments on DSA • was originally a suggestion to use a common

modulus, this would make a tempting target, discouraged

• it is possible to do both ElGamal and RSA encryption using DSA routines, this was probably not intended :-)

• DSA is patented with royalty free use, but this patent has been contested, situation unclear

• Gus Simmons has found a subliminal channel in DSA, could be used to leak the private key from a library - make sure you trust your library implementer

Page 25: Digital signature

THANK YOU