Diffie-Hellman:Key Exchange and Public Key Cryptosystems: Sivanagaswathi Kallam
Diffie-Hellman:Key Exchange and Public Key Cryptosystems: Sivanagaswathi Kallam
Diffie-Hellman:Key Exchange and Public Key Cryptosystems: Sivanagaswathi Kallam
Cryptosystems
Sivanagaswathi Kallam
Contents
1 Introduction 3
2 History 4
8 Future of DH 24
9 Conclusion 25
Page 1
Cryptography Diffie-Hellman
Abstract
In cryptography, key exchange is a strategy by which cryptographic
keys are exchanged between two gatherings and those keys are utilized
as a part of some cryptographic algorithms like AES. Utilizing those
keys sender and recipient exchange encrypted messages. Public key
cryptography gives a secured strategy to exchange secret keys. The
key exchange issue is the means by which gatherings exchange the keys
or data in a communication channel so that nobody else other than
sender and recipient can get those. This paper presents Diffie-Hellman
key exchange, a procedure which is one of the first public key crypto-
graphic protocols used to build up a secret key between two gatherings
over a frail channel. The protocol itself is constrained to exchange of
the keys i.e, we are not sharing data while the key exchange, we are
making a key together. We start with implementation of algorithm
i.e, by building up a mutual secret between two gatherings that can be
utilized for secret communication for exchanging information over a
public channel. Having no entity authentication mechanism, protocol
is effectively assaulted by the man-in-the-middle attack and imperson-
ation attack in practically speaking. Diffie-Hellman is appropriate for
utilization in information communication however is less frequently
utilized for information storage or archived over long period of time.
Page 2
Diffie-Hellman: Key Exchange and public key
cryptosystems
Sivanagaswathi Kallam
29 September 2015
1 Introduction
The subject of key exchange was one of the first issues addressed by a crypto-
graphic protocol. This was before the innovation of public key cryptography.
In human advancement, people around the world attempted to hide data
in composed structure when composing was created. This is presumably
the first and primitive type of encryption however is stand out to be a one
half portion of cryptography; the other half is the capacity to reproduce the
first message from its hidden structure. Cryptography is not concealing a
message, so that nobody can discover it, yet rather to leave the message
out in public in a manner that nobody aside from the proposed beneficiary
comprehends the message. The initially recorded utilization of cryptography
for correspondence was by the Spartans who (as right on time as 600 BC)
utilized a cipher device called ”the scytale” to send secret communication
between military officers. The scytale comprised of a wodden baton wrapped
with a piece of parchment inscribed with the message. Once unwrapped the
material contracted and seemed to contain some unlimited imprints; in any
case, when wrapped around another stick of indistinguishable measurements
the first content shows up.
Military employments of cryptography were the primary inspirations driv-
ing the investigation of cryptography in the past times. It was a secret
endeavor, generally attempted by enormous governments, who could conceal
all the efforts and make smokescreens important to shroud many individuals,
exercises and dynamic analysts.
In those days the huge majority of the cryptosystems were private or
symmetric key cryptosystems. In this two clients Alice and Bob select a
key ahead of time, which is their private key, then they utilize the key in
a private key cryptosystem to convey information over people in general
3
Cryptography Diffie-Hellman
2 History
The primary researchers to find and publish the ideas of Public Key Cryp-
tology were Whitfield Diffie and Martin Hellman from Stanford University,
and Ralph Merkle from the University of California at Berkeley. As so fre-
quently happens in the experimental world, the two gatherings were working
autonomously on the same issue - Diffie and Hellman on public key cryp-
tography and Merkle on public key distribution - when they got to know
about one another’s work and acknowledged there was collaboration in their
methodologies. In Hellman’s words: ”We each had a key piece of the puzzle
keeping in mind it’s actual one of us first said X, and another of us first said
Page 4
Cryptography Diffie-Hellman
Page 5
Cryptography Diffie-Hellman
Page 6
Cryptography Diffie-Hellman
By running the mathematical operation against your own private key and
the other side’s public key, you produce a value. At the point when the far
off end runs the same operation against your public key and its own private
key, that end also creates a value. The critical point is that the two qualities
produced are indentical. They are the ”shared secret” that can encrypt data
between systems.
At this point,the Diffie-Hellman operation could be viewed as complete.The
shared secret is, after all, a cryptographic key that could encrypt traffic.In any
case, fulfillment as of right now is exceptionally uncommon, on the grounds
that the shared secret is an uneven key by its mathematical nature, and all
asymmetric key systems are inherently slow. On the off chance that the two
Page 7
Cryptography Diffie-Hellman
sides are passing next to no movement, the mutual mystery may scramble
real information.But any attempt at bulk traffic encryption requires a sym-
metric key system, for example, DES, Triple DES or Advanced Encryption
Standard (AES). In most real uses of the DH protocol (SSL, TLS, SSH,
and IPSec specifically),the shared secret encrypts a symmetric key for one of
the symmetric algorithms, then transmits it safely, and the inaccessible end
decrypts it with the shared secret.
Which side of the correspondence creates and transmits the symmetric
key fluctuates. In any case, it is more regular for the initiator of the cor-
respondence to be the one that transmits the key. I ought to additionally
call attention to that some kind of arrangement ordinarily strikes choose the
symmetric algorithms,the mode of the algorithms (e.g., cipher block chain-
ing, or CBC), hash functions (MD5, SHA-1, etc.), key lengths, refresh rates,
and so on. That arrangement is taken care of by the application, and is not
a piece of Diffie-Hellman, but it is obviously an important task, since both
sides must support the same schemes for encryption for it to function.This
additionally indicates why key-administration arranging is so vital – and why
poor key administration so frequently prompts failure of systems.
When secure exchange of the symmetric key is finished, information en-
cryption and secure communication can happen (note that passing the sym-
metric key is the general purpose of the Diffie-Hellman operation). Figure
depicts data encrypted and decrypted on every end of the communication
by the symmetric key. Changing the symmetric key for expanded security
is straightforward as of right now. The longer the time a symmetric key is
in use, the less demanding it is to perform a fruitful cryptanalytic attack
against it. In this manner, changing keys frequently is important.
Page 8
Cryptography Diffie-Hellman
3. There exists a neutral element eG with respect to ?, that is, ∀ aG :
a ? e = e ? a = a. Note that the neutral element is unique and is quite
often denoted by 1 in multiplicative groups.
4. Every element aG has an inverse a−1 G such that a?a−1 = a−1 ?a = e,
where e is the neutral element. Note the inverse of a is quite often
denoted by a−1 and it is unique.
Let m be a fixed non-negative integer. The set of all residue classes mod
m is denoted by Zm , that is,
Zm = {0̄, 1̄, · · ·, m ¯− 1}
where x̄ = { yZ | ∃k Z : y = x + km }
Remark 1 The structure (Zm , ·), where
¯
ā · b̄ = ab
• Φ(1) = 1
Page 9
Cryptography Diffie-Hellman
3.5 Steps
The simplest and the original implementation of the protocol uses the mul-
tiplicative group of integers modulo p, where p is prime, and g is a primitive
root modulo p.
Figure 3: Steps of DH
A = g a mod p
B = g b mod p
Page 10
Cryptography Diffie-Hellman
4. Alice computes
K1 = B a mod p
5. Bob computes
K2 = Ab mod p
6. Alice and Bob now share a secret ie., both Bob and Alice can use this
number as their key.
3. Alice has
K1 = B a mod p
= (g b )a mod p
= (g a )b mod p
= Ab mod p
4. Bod has
K2 = Ab mod p
= (g a )b mod p
= (g b )a mod p
= B a mod p
5. Therefore
K1 = K2
Page 11
Cryptography Diffie-Hellman
Page 12
Cryptography Diffie-Hellman
g=5
p = 23
a=6
Page 13
Cryptography Diffie-Hellman
b = 15
A = g a mod p = 8
B = g b mod p = 19
4.3 Examples
4.3.1 Example1
1. Alice and Bob agree on p = 23 and g = 5.
Page 14
Cryptography Diffie-Hellman
56 mod 23 = 8
515 mod 23 = 19
4. Alice computes
196 mod 23 = 2
5. Bob computes
815 mod 23 = 2
4.3.2 Example2
Domain parameters
p = 29
α=2
Page 15
Cryptography Diffie-Hellman
Figure 6: Example of DH
4.3.3 Example3
Let’s assume that Alice wants to establish a shared secret with Bob.
A = g a mod p = 8
B = g b mod p = 19
Page 16
Cryptography Diffie-Hellman
s = B a mod p = 2
s = Ab mod p = 2
The algorithm is secure because the values of a and b, which are required
to derive s are not transmitted across the wire at all.
Page 17
Cryptography Diffie-Hellman
• That the shared key (i.e. the secret) is never itself transmitted over
the channel.
The algorithm has its share of drawbacks including
• The fact that there are expensive exponential operations involved, and
the algorithm cannot be used to encrypt messages - it can be used for
establishing a secret key only.
Page 18
Cryptography Diffie-Hellman
Page 19
Cryptography Diffie-Hellman
Page 20
Cryptography Diffie-Hellman
Page 21
Cryptography Diffie-Hellman
Page 22
Cryptography Diffie-Hellman
Page 23
Cryptography Diffie-Hellman
8 Future of DH
In spite of the fact that Diffie-Hellman is an public key algorithm, specialists
say it don’t scale well for future.As of right now it is expressed that Diffie-
Hellman keys shorter than 900 bits are not sufficiently secure. To make Diffie-
Hellman keys, which now can go to 1,024 bits, secure for the following 10 to
20 years, associations would need to grow to key lengths of no less than 2,048
bits, as per Stephen Kent, chief researcher at BBN Technologies.In the long
run, key sizes would need to grow to 4,096 bits. Researchers from the NIST’s
security technology group expect, that it is exceptionally conceivable, that
Diffie-Hellman will be broken inside of 10 years or somewhere in the vicinity.
The cryptographic security standards utilized as a part of public-key in-
frastructures, RSA and Diffie-Hellman, were presented in the 1970s. And
although they haven’t been broken, their time could be running out. That
is one reason the National Security Agency needs to move to elliptic-bend
cryptography (ECC) for cybersecurity. ECC, a complex mathematical algo-
rithm used to secure information in transit, may replace Diffie-Hellman in
light of the fact that it can give much more prominent security at a littler
Page 24
Cryptography Diffie-Hellman
key size. ECC takes less computational time and can be utilized to secure
data on smaller machines, including mobile phones, smart cards and wireless
devices.
9 Conclusion
Designing a Key exchange algorithm with 100% Accuracy is not possible.
Our Algorithm utilizes basic scientific ideas making execution simpler and in
addition avoidance from common Attacks.Security change is useful in light of
the fact that Diffie Hellman Algorithm is the premise of a few security stan-
dards and services on the internet, and if the security of the Diffie Hellman
algorithm is compromised, such frameworks will collapse. Diffie Hellman key
trade approach for key distribution gives off an impression of being one of
the favored systems utilized as a part of practice today.
The Diffie-Hellman key exchange algorithm has turned out to be a stand-
out amongst the most fascinating key distribution schemes being used today.
Nonetheless, one must know about the way that in spite of the algorithm
is safe against passive eavesdropping, it is not necessarily protected from
active attacks. Diffie-Hellman algorithm should be complemented with an
authentication mechanism.This methodology for key distribution gives off an
impression of being one of the favored routines utilized as a part of practice
today.
References
[1] Wikipedia, (2009, October 23). Diffie-Hellman problem
http://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_
problem
[2] Stewards B. Living Internet: Public Key Cryptography, (PKC)
History
http://www.livinginternet.com/i/is_crypt_pkc_inv.htm#
diffie
[3] Wikipedia (2009, November 12). Public-Key Cryptography
http://en.wikipedia.org/wiki/Public-key_cryptography
[4] Hickey, K. Government computer news, (2007, Aug 03). Encrypting
the future
https://gcn.com/Articles/2007/08/03/Encrypting-the-future.
aspx?Page=1
Page 25
Cryptography Diffie-Hellman
Page 26