DES Encryption - Academic Science

advertisement
Symmetric and Asymmetric Cryptosystem
Anshul Gupta
RKGITW
UG Student
Radhika Mittal
RKGITW
UG Student
Abstract
Internet a p p l i c a t i o n s a r e i n c r e a s i n g r a p i d l y ,
so there is a need to protect such applications.These
applications can be protected by the use of
cryptography. Cryptography is a method used for
secure transfer of messages over a network. The
cryptography methods used are private key
cryptography
(symmetric)
and
public
key
cryptography(asymmetric).Symmetric
key
cryptography includes DES whereas asymmetric key
cryptography includes RSA. This paper includes the
description about RSA and DES and about the various
vulnerabilities and their countermeasures. Also it
comprises about the comparisons and performance
analysis of the two methods i.e. symmetric and
asymmetric.
Keywords:
Asymmetric
Key,
Rivest-ShamirAdleman(RSA),
Data
Encryption
Standard(DES),Symmetric Key.
1. Introduction:
For the purpose of security of information the
encryption algorithms used are: Symmetric (private)
and Asymmetric (public) keys encryption. In
Symmetric keys encryption or secret key encryption,
a single key is used for the purpose of encryption and
decryption. The key is being shared by both sender
and receiver. The key that is being used
used is most important in encryption and
decryption. If the key that is being used is weak then
the chances of attack increases. The key that is being
used is the strength of symmetric key encryption. Some
of the strong and weak keys of cryptography
algorithms such as RC2, DES, 3DES, RC6,
Blowfish, and AES. 64-bit key is used by RC2 and
DES both whereas three 64-bit keys are used by Triple
DES (3DES) keys and various (128,192,256) bits keys
are used by AES.(32-448)bit key is used by Blowfish ;
default 128bits whereas various (128,192,256) bits
keys [1-4] are used by RC6. The main drawback of
Sunil Kumar
RKGITW
Asstt.Prof,
Symmetric key encryption is the secure
transmission of messages over a malicious network
i.e. the problem of key distribution.
The problem of key distribution is solved using
Asymmetric Key Encryption. Two keys are used in
Asymetric: public key for encryption and private key
for decryption (E.g. RSA and Digital Signatures).
Public key is known to all whereas private key is
known only to the user. So there is no need to
distribute the keys before the transmission of
messages. It is based on mathematical functions and
is very efficient for big mobile devices.
Cryptography
Public-key
Private-key
RSA & others
Block Cipher
RC2
AES
DES
Stream Cipher
3DE
RC6
Fig 1
Symmetric encryption is faster than Asymmetric
encryption because of more computational processing
and key distribution. The classification of encryption
techniques is shown in Fig. 1
Description of the most
encryption techniques:
common
symmetric
Blowfish
DES: DES is a 64-bit block size and 64-bit key size.
At that time, many attacks and methods recorded the
weaknesses of DES, which prove it to be an insecure
block cipher.
2. Description of RSA Along with existing
vulnerabilities and their countermeasures:
2.1 RSA:
3DES is an improvement over of DES: It consists of
64 bit block size and 192 bits key size. In this
standard the encryption method applied 3 times to
DES which increase the encryption level and the
average safe time.3DES is slower than other block
cipher methods.
RC2 is a 64-bit symmetric block cipher having a
variable key size that range from 8 to 128 bits. RC2
is vulnerable to a related-key attack.
Blowfish is block cipher 64-bit block which is used
as a replacement for DES algorithm. It takes as input a
variable-length key which ranges from 32 bits to 448
bits (default 128 bits).It is license-free and available
free for all uses. It consists of 14 rounds or less.
AES is a block cipher .It has a variable key length
of128, 192, or 256 bits. it encrypts data blocks of 128
bits in 10, 12 and 14 rounds based on the key size.
AES encryption is fast; it can be implemented on
several platforms m o s t l y in small devices .
RC6 is block cipher which is derived from RC5.
It w a s designed to fulfill the requirements of the
Advanced Encryption Standard competition. RC6 has
a block size of 128 bits and k e y size of 128, 92 and
256 bits.
Public key cryptosystem is more reliable in the areas of
confidentiality and authenticity. This type of
cryptosystem is based on mathematical calculations
instead of substitution and permutations as in symmetric
cryptosystem. In this algorithm two keys are used i.e.
one for encryption and decryption. Public key is used
for encryption and private key is used for decryption of
data. This cryptosystem evolves due to the problem of
key distribution and the problem associated with the
digital signatures for the purpose of authenticity of data.
The keys used in public cryptosystem are private key
and public key. Private Key is kept secret by the user
and public key is known to all. The most common
algorithm used for public key cryptosystem is RSA.
It is a block cipher where the plain text and cipher text lies
between 0 and n-1 for some n, where n is an integer. It means,
the block size must be less than or equal to log2 (n); in this, the
block size is of 2k bits, where 2k < n <= 2k+1.
The form of Encryption and Decryption are as follows, for
some plain text M and cipher text C = Pe mod n and P = Cd
mod n. The value of n must be known by the both sender and
the receiver.
The sender knows the value of e, and only the receiver knows
the value of d. Thus, this is known as a public key encryption
algorithm. The public key includes n, the modulus, and e, the
public exponent. The private key includes n, the modulus,
which is public and appears in the public key, and d, the private
exponent, which should be kept secret.
The RSA scheme is as follows:
Select two large prime numbers p, q in such a way that
p is not equal to q, randomly and independently of
each other.
Compute n = p* q
Calculate the quotient Ø (n) = (p-1) (q-1)
Select integer e less than Ø (n) and
relatively prime with Ø (n).
Compute d such that d*e (mod Ø (n) = 1
Publish the public key pair PU={e,n}
Publish the private key pair PR={d,n}
The large prime numbers can be find by testing
random numbers of the right size with probabilistic
primarily tests which helps to eliminate quickly all
non-primes. It is necessary to note that p and q should
not be 'too close'. Moreover, if p-1 and q-1 has
only small prime factors, then n can be factored
quickly and these values of p and q should then
be discarded as well. It is necessary that the secret
private key d should be large enough.
3.
RSA Encryption
It is a block cipher. In this the input binary text is
divided into 8 bit apart. Firstly the first 8 bit text is
converted into an integer form. After that a public
key is taken from key generator and then encryption
operation is perform for that integer. Take an example
'M' is an integer then we encrypt 'M' by following
C = Pe mod n
We calculate the value of C and after that we will
convert C into a binary format. Now we will make
binary value of C as 16 bit length and record that
result in cipher txt. Similarly take another 8 bit text and
again repeat the whole process.
RSA Decryption
In a decryption process, the input binary text is divided
into 16 bit apart. The first 16 bit text is already
converted i n t o an integer form. After that a private
key’d’ is taken from key generator and decryption
operation will be performed for that integer. Take an
example ‘C’ is an integer then we encrypt ‘C’ by
following
P = Cd mod n
2.2 Vulnerabilities and their
countermeasures:
If the value of private keys is less than N0.292 , then
RSA private keys are considered to be weak. For
secure implementation, private exponent should be
larger than N0.5.
The system (N, D, and E) is considered to be insecure if
(p-1) is a product of small primes for the p that is one
of the factors of N.
If p and q are too close to each other which are used to
generate N, then Fermat’s factoring is possible, which
makes the system highly insecure. Thus, the difference
of at least N0.25 should be between the two primes.
When we implement the RSA with several key pairs,
we often choose to use the same N for all key pairs,
which saves the computation time. As the public and
private exponents always assist in factoring N, every
single member of the system will be able to factor N
with his key pair and w e w i l l use that result to
invert any public exponent to the corresponding private
exponent. For each key pair, it is necessary to generate
a new N value.
Description of DES Along the
vulnerabilities and their countermeasures:
DES:
It is a block cipher. It encrypts data in the blocks of
Size 64 bits each. The same algorithm and key are
used for both encryption and decryption, with some
differences. The length of the key is 56 bits.
DES Key Generation
The initial key is of 64 bits. Before the DES process
starts, every eight bits of the key is discarded so as to
produce a 56-bit key.
DES Encryption
DES Encryption is based on the two concepts of
cryptography i.e.: substitution and transportation
techniques..
DES consists
of 16 rounds.
The steps of substitution and transportation is
performed on each step as follows:
In the first step, the 64-bit plain text block passes
through an Initial
Permutation(IP)
function.
Initial Permutation is performed on the block of plain
text. Now, the Initial Permutation function produces
two halves of the permutated block i.e. Left Plain
Text(LPT) and Right Plain Text(RPT).Then,
each
o f t h e LPT and RPT goes through 16 rounds of
the encryption process. At the last, LPT and RPT are
joined and a Final Permutation is performed on the
resulted block and thus produces 64-bit cipher text.
DES Decryption
DES Decryption process is same as that of
encryption process b u t w i t h s o m e c h a n g e s .
The only difference between the two is the reversal of
key portions. If original key K was divided into sub
keys K1, K2, k3,…….k16 for the 16 encryption
rounds, then for the decryption , the keys are used
in reverse order i.e. K16, K15, K14,……K1
DES vulnerabilities and their counter
measures:
DES
algorithm
suffers
from some Simple
Relationships in the keys. In DES, simple relationship
is of complementary nature due to which
complementary relations between the keys resulted in
a complementary relationship between the obtained
cipher text. This vulnerability of DES reduces the
strength of the algorithm by one bit.
The DES algorithm is m o s t l y vulnerable to
Linear Cryptanalysis attacks. By such an attack, the
Algorithm can be broken down using 243 plaintexts in its
16 rounds. This vulnerability may lead to a risk while
encrypting bulk of data that may be predictable with keys
that are constant.
So, Eli Biham and Adi Shamir presented a differential
attack, by which a key can be recovered in 237 time
using 237 cipher texts.
Comparison:
Comparison of symmetric and asymmetric key
cryptography on the basis of performance analysis:
1. The approach used in DES is Symmetric while in
RSA, asymmetric approach is used.
2. In DES, encryption and decryption is faster while in
RSA, it is slow.
3. Key distribution is very difficult in DES while in
RSA, distribution of keys is easy.
4. DES has a complexity O (Log N) while in RSA
complexity is O (N3).
5. Security is moderate in DES while in RSA security is
highest.
Conclusions:
This paper presents the performance analysis of the
symmetric and asymmetric encryption algorithm. The
algorithms are DES and RSA along with their working
mechanisms. Severa1 points are concluded. First,
despite of the key distribution, DES is more suitable for
the applications, whose highest priority is decryption.
A n asymmetric key cryptographic system provides
higher security in all ways.
Second, several loop holes e x i t s i n their working
systems. Corresponding to every vulnerability there is
an alternative countermeasure but they are not so
secure as the internet applications demands are
increasing day by day. Due to the rapid advancement
of technologies like Quantum Computing, these
algorithms are now not longer safe and much secure.
4. References:
1. W.Stallings, ''Cryptography and Network Security 4th
Ed,'' Prentice Hall, 2005, PP. 58-309.
2. S.Z.S. Idrus,S.A.Aljunid,S.M.Asi, ''Performance Analysis
of Encryption Algorithms Text Length Size on Web
Browsers,'' IJCSNS International Journal of Computer
Science and Network Security, VOL.8, No.1, January
2008 ,PP 20-25.
3. Jawahar Thakur1, Nagesh Kumar2” DES, AES and
Blowfish: Symmetric Key Cryptography
Algorithms Simulation Based Performance Analysis”,
IJETAE,International Journal of Emerging Technology and
Advanced Engineering , (ISSN 2250-2459, Volume 1, Issue
2, December 2011.
4.S.Z.S. Idrus,S.A.Aljunid,S.M.Asi, ''Performance Analysis
of Encryption Algorithms Text Length Size on Web
Browsers,'' IJCSNS International Journal of Computer
Science and Network Security, VOL.8, No.1, January
2008 ,PP 20-25.
5.“History of Cryptography” Wikipedia.
<http://en.wikipedia.org/wiki/History_of_cryptography>.
6.Gustafson, H.; et al.; “A Computer Package for Measuring
the Strength of Encryption Algorithms,”; Computers &
Security, Vol 13, No. 8, 1994, Elsiver Science, Ltd., pp.
687-697.
Download