Cryptography Based Three Pass Cryptosystem Information Technology Essay

Published: November 30, 2015 Words: 2948

The basic functionality of cryptography is to hide information. Encryption is the process of transforming information so that it is unintelligible to an intruder, and decryption as the process of transforming the encrypted information so that it is intelligible again. The information in its original form is known as plain text, and the encrypted message is called cipher text. Cryptographic techniques assume an important role to protect private data being transported over a public network. The classical cryptographic techniques are classed in two kinds of cryptosystems: symmetric and asymmetric. In symmetric systems, a single secret key should be shared among the communicating nodes. In asymmetric systems, each node has two keys, one of them is kept secret and the other one is publicly available. In such case, there is no need to share the same key to communicate each other. The advantage of symmetric algorithms over asymmetric ones is their low computational complexity. The implementation of cryptography protocols without the need of key exchange is still a less investigated area [6].

One fundamental question arises as to why keys are necessary. (Why not just choose one encryption function and its corresponding decryption function?) Having functions associated with keys means that if the functions are revealed, then the scheme does not need to be redesigned, but simply the keys can be changed. In fact, keys are very critical to the functionality of cryptographic algorithms and it is sound cryptographic practice to change keys frequently.

Traditional cryptosystems (commonly known as symmetric systems or secret key systems) require the sender and the receiver to share a key known only to them. Knowledge of the key allows the decipherment of the cipher text, hence the need for secrecy. This system requires that e = d. Secret key cryptography is perceived to have an extensive history. The most common algorithm used for secret key systems is the Data Encryption Algorithm (DEA) defined by the Data Encryption Standard (DES). Other schemes include Triple DES, IDEA, RC4, RC5, Blowfish, and Twofish. Though these systems provide strong security, they suffer from many disadvantages including [4]:

Key distribution/exchange: In a two-party communication, the key must remain secret and must be known to both the sender and receiver before the transaction. Thus the two parties must take great care in exchanging the key so that an eavesdropper does not obtain it.

Key management: In a large network, there are many key pairs to be managed. Moreover, to guarantee security, the key should be changed frequently, perhaps for each communication session.

Thus, classical secret key systems create problems of trust. Moreover, the requirements of authentication, integrity, and non-repudiation discussed above are impossible to achieve in such scenario.

For years it was believed that the only possibility to solve the key distribution problem was to send some physical medium - a disk for example - containing the key. In the digital era, this requirement is clearly unpractical. In addition, it is not possible to check whether this medium was intercepted - and its content copied - or not.

The difficulty of distributing keys has been one of the major limitations on the use of conventional cryptographic technology .In order for the sender and receiver to make use of a physically secure channel such as registered mail for key distribution, they must be prepared to wait while the keys are sent, or have made prior preparation for cryptographic communication.

In cryptography, the three pass protocol for sending messages is a framework which allows one party to securely send a message to a second party without the need to exchange or distribute encryption keys. The basic concept of the three pass protocol is that each party has a private encryption key and a private decryption key. The two parties use their keys independently, first to encrypt the message, and then to decrypt the message. This protocol assumes that encryption is commutative, i.e.

{{x}y}z = {{x}z}y.

The initiator A encrypts his message M by his secret key Ka, then B encrypts the message he received by his secret key Kb. Since{{M}Ka}Kb={{M}Kb}Ka, the agent A can decrypt it and send {M}Kb to B. Then, using Kb, B can retrieve M [8].

The implementation of cryptography protocols without the need of key exchange is still a less investigated area. Shamir presented the first idea of an algorithm in this area, named as "No Key Protocol".

The main goal of security standards is to facilitate the widespread use of cryptographically sound and well-accepted techniques, promote interoperability and help ensure ongoing detailed analysis by cryptographers through clear, complete, and public specification of baseline techniques. The main objectives of this discussion is to provide a framework which allows one party to securely send a message to a second party without the need to exchange or distribute encryption keys, to provide a methodology for obtaining high-speed implementations of authentication protocols and encrypted mail techniques while using fewer bits for the keys ,to reduce the overhead of keys distribution and to analyze the overhead (communication and computation) of this System.

II. Related Previous Work

Classical secret key systems create problems of trust. A public key cryptosystem and asignature scheme based on discrete algorithms is difficult to compute because of the complexity of computingdiscrete logarithms over finite fields [5].

Moreover, the requirements of authentication, integrity, and non-reputability are impossible to achieve in Key distribution scenario. In recent years, elliptic curve cryptography (ECC) has gained widespread exposure and acceptance, and has already been included in many security standards. Engineering of ECC is a complex, interdisciplinary research field encompassing such fields as mathematics, computer science, and electrical engineering. discipline of cryptographic engineering as quantum three pass protocols [9]. In particular, we show that the requirements of efficiency and security considered at the implementation stage affect not only mere low-level, technological aspects but also, significantly, higher level choices, ranging from finite field arithmetic up to curve mathematics and protocols. In order for the sender and receiver to make use of a physically secure channel such as registered mail for key distribution, they must be prepared to wait while the keys are sent, or have made prior preparation for cryptographic communication [7]. A protocol over unsecured channel for exchanging messages without sharing any key between two parties can be defined which provides more security in such scenario.

II.A THREE PASS PROTOCOL

The first Three-Pass Protocol was the Shamir Three-Pass Protocol developed in 1980.

The protocol requires the sender and receiver to have two private keys for encrypting and decrypting messages. The Shamir algorithm uses exponential modulo a large prime as both the encryption and decryption functions. That is E(e,m) = me mod p and D(d,m) = md mod p where p is a large prime. For any encryption exponent e in the range 1..p-1 with gcd(e,p-1) = 1. The corresponding decryption exponent d is chosen such that de ≡ 1 (mod p-1). It follows from fermat's theorem that D(d,E(e,m)) = mde mod p = m.

The Shamir protocol has the desired commutativity property since E(a,E(b,m)) = mab mod p = mba mod p = E(b,E(a,m)).

Quantum three pass protocol is also proposed in which the key is not shared between users unlike the one-time pad system [9].

II.B ELLIPTIC CURVE CRYPTOGRAPHY

An elliptic curve is defined in a standard, two dimensional x, y Cartesian coordinate system by an equation of the form [1]:

y2 = x3 + ax + b [2.1]

ELLIPTIC curves have been extensively studied for over a hundred years, and there is a vast literature on the topic. Originally pursued mainly for aesthetic reasons, elliptic curves have recently become a tool in several important applied areas, including coding theory, pseudorandom bit generation, and number theory algorithms.

In 1985, Koblitz and Miller independently proposed using the group of points on an elliptic curve defined over a finite field in discrete log cryptosystems.

Today elliptic curves are used widely in public key cryptosystems. They also provide a methodology for obtaining efficient implementations of network security protocols. Since their introduction, a broad discussion on their security and efficiency has been carried on. It is this very efficiency that makes them so interesting for us today. We investigate what an elliptic curve is, and what its algebraic properties are. Given any field F ─ thus a set with two operations, addition and multiplication that "know about" each other ─ we can consider solutions to various types of equations with coefficients in F. An elliptic curve E over the field F is given by a cubic equation of the form y2 = x3 + ax + b [1] [2].

II.C DISCRETE LOGARITHM BASED TPP

"Three Pass Cryptosystem based on Discrete Logarithms" shows a scheme of three pass protocol using Discrete Logarithms. This scheme, based on discrete logarithms is unique in that it is highly resistant to any 'cipher text only' attacks and relies for its strength on the difficulty of computing discrete logarithms.

III. ALGORITHM FOR THREE PASS CRYPTOSYSTEM USING ECC

Security is a major part of today's society, when an information is transferred in network by a network devices it is always prone to attack, many types of attack are possible on the information which is being transferred in a network such as "Birthday Attack", "cipher- text only attack" etc. So the major part of this project is to prevent the information from masquerades by using the concept of "No-Key distribution Public Key Encryption Scheme" [3].

The two machines which are connected in a network one act as a client and another as a server the machine1 transfers the encrypted data to server (machine2) in the form of a text file. Machine2 now act as a client and perform another encryption on it and send it to other (machine1). Then machine1 remove its encryption and send it again to machine2 which by removing its encryption get the original text.

Figure 3.1 Architecture of Three Pass cryptosystem using ECC

Figure 3.1 describes how message can be passed between two entities using three passes. All existing protocols for elliptic curve cryptosystems assume that the curve E, the field Fq and a point P on the curve are all public. This algorithm assume that only the curve E and Fq are public, keeping the random point G secret, which make attacking the cryptosystem harder by the eavesdropper.

The proposed protocol is also secure against the "man-in-the-middle" attack allows an eavesdropper to monitor communication between two parties Message transferring based on En(a, b) can be set up as follows :The two parties agreed on the Elliptic curve equation over Fp

Ep (a, b): Y2 = x3 + ax + b [3.1]

n is the order of curve and p is the modulus and these are global parameters Suppose a user 'A' needs to send a message M to another user 'B', then the communication is progressed as follows:-

Step 1: 'A' selects a prime integer k1 such that 1< k1 <n and a random point g1 on curve and encrypts M using key k1, generating a cipher text C, which is sent to 'B'.

C1 = M+ k1 .g1 (mod p) [3.2]

Thus 'A; has masked the plain text M by adding it with k1 times of g1 where k1 and g1 are secret random number selected by 'A' and not known to anyone else.

Step 2: 'B' receives C1 ,encrypts it further using a secret random number k2 and another random point g2 on curve such that

1< k2 <n generating a cipher text C2 and sends to C2 'A'.

C2= (C1)+ k2 . g2(mod p) [3.3]

= (M + k1 .g1 (mod p)) +k2 . g2 (mod p)

Thus ,'B' has further masked M using the random number k2 and random point g2, which is known to 'B' alone.

Step 3: Now 'A' receives the cipher text C2 and decrypts it partially by adding it with k1.(- g1 ) as follows and transmits the resulting partially decrypted cipher text C3to 'B'.

Computes C3:

C3=C2+( k1.(- g1 ) mod p) [3.4] =(M + k1 .g1 (mod p) +k2 . g2 (mod p) +( k1.(- g1 ) mod p))

= M+ k2 . g2 (mod p)

Now, 'B ' removed the part of its mask by applying:

C=C3+(k2.(-g2)(modp) [3.5]

= M+ k2 . g2 (mod p) + (k2 .(-g2 ) (mod p) )

= M(plain text)

IV. Implementation and Results

This System is working for the value of p which generate more than 256 points on the curve. As we have total mapping alphanumeric characters lying between the ASCII value of (0-255). If the p is taken that generate less than 256 points on curve it will result in inappropriate result.

In the case of ECC, key generation also needs careful investigation, since the keys are not just random numbers, but special numbers (which is also quite true for RSA). Key generation may also include the generation of system parameters, such as the curve E, and the base point P along with its order n.

Condition for distinct roots is given a, b satisfying 4a3 + 27b2 mod p <> 0.

For Key the value of k is prime number must be 3<k <n. where n is order of curve.

Message can be entered manually or by using txt files. Any other format is not allowed.

Table 4.2 Completion Time of Single Encryption time of two different three pass cryptosystems

Data size

ECC based Three pass Cryptosystem

Three pass cryptosystem using Discrete Logarithms

2 KB

1-2 secs

1-2 secs

3KB

3-4 secs

4-5 secs

4 KB

3-4 secs

7-8 secs

8 KB

7-8 secs

1-1.20 min

Table 4.3 Communication time of ECC and discrete logarithm based three pass cryptosystems

File Size(in KB)

Discrete Logarithm

ECC

1 Kb

00:00:11

00:00:10

2 Kb

00:00:25

00:00:18

3 Kb

00:00:43

00:00:24

4 Kb

00:00:49

00:00:25

6 Kb

00:01:45

00:00:32

8 Kb

00:06:21

00:00:40

11 Kb

00:18:32

00:01:20

31 Kb

00:55:18

00:05:11

129 Kb

04:05:11

00:50:13

246 Kb

12:35:05

02:24:29

Comparison of these cryptosystems on different file size is shown in figure 4.18.

Figure 4.18 Time Comparison of Different Cryptosystem

From the figure 4.18 it is clear that at same key size Elliptic Curve Cryptography ECC provide much better security in comparison of Discrete logarithm based Three pass Cryptosystem.

V. Conclusion:

Although this method requires more computation but the "cipher- text only attack" is not possible on it. The attacker can determine the value only if he/she knows the value of k1, k2, g1 or g2.Since k1 and g1 is private to A and k2and g2 is private to B. hence it's not possible for the attacker to determine the message. In the case of ECC, key generation also needs careful investigation, since the keys are not just random numbers, but special numbers (which is also quite true for RSA). Key generation may also include the generation of system parameters,such as the curve E, and the base point P along with its order n. E has to be chosen in such a way that curves for which an efficient attack is known - e.g. anomalous curves - should be avoided.

Computation Overhead

As the value of P increases computations of more points need to be done shown in Figure 5.2. So, the overhead increases with the increasing value of P. But the system provides better security for the larger value of p means residue set at which curve is defined. And curve points will be calculated three more times in this three pass cryptosystem. More the number of points lies on the curve better the security will be. Figure 5.1 and Figure 5.2.As Figure 5.1 shows the Curve which is generated at very less value of p which does not provide security for ECC system as it does not generate 256 points on curve which is must for Encryption and decryption of all Alphanumeric characters.

Communication Overhead

Other public-key cryptographic systems uses only one pass to send and receive a file. But it take two more passes for secure transmission of data which results in security as well as communication overhead between two systems.

The absence of a sub-exponential time algorithm for the ECDLP[9] means that significantly smaller parameters can be used in ECC than with DSA or RSA. The advantages that can be gained from smaller parameters include speed and smaller keys or certificates. These advantages are especially important in environments where at least one of the following resources is limited:

Processing power

Storage space

Bandwidth

Power consumption

After two decades of research and development, elliptic curve cryptography (ECC)[4] has now gained widespread exposure and acceptance, and has ultimately moved from being an interesting mathematical construction to a well-established public-key cryptosystem already included in numerous standards and adopted by an increasing number of companies. In fact, ECC is no longer new, and has withstood in the last years a great deal of cryptanalysis and a long series of attacks, which makes it appear as a mature and robust cryptosystem at present. ECC has a number of advantages over other public-key cryptosystems, such as RSA, which make it an attractive alternative .In particular, for a given level of security, the size of the cryptographic keys and operands involved in the computation of EC cryptosystems are normally much shorter than other cryptosystems and, as the computational power available for cryptanalysis grows up, this difference gets more and more noticeable [4]. This is an advantageous condition especially for applications where resources such as memory and/or computing power are limited. However, the aim of the research was not to create a commercial product. The work could rather be regarded as a prototype, to be a base of a future for implementation of Cryptosystems without exchanging keys