MRADG design on Elliptic Curve Cryptography

3 downloads 12760 Views 1MB Size Report
in Figure 1 and it's included Digital Signature which used to authorize the message's sender. The symmetric cryptography is much faster than Asymmetric ...
MRADG design on Elliptic Curve Cryptography Salah A. Albermany Kufa, Iraq E-mail: [email protected] Abstract — The main problem in RADG is the static design, if Eva (third part in communication) on the network gets the design with ciphertext then she can be decrypt the ciphertext effortlessly and get information from the encrypt Message, the purpose of this paper is to develop the RADG design to be more secure in Wide area networks such as cognitive Radio Network "CRN", the purpose of this paper is to develop the RADG design to be more secure in larger network. By using RSA scheme instant of Transition function in RADG and convert the cipher text into point in specific elliptic curve, with implement pseudorandom key generation.

Index Terms—network, elliptic curve, cryptography, Public key (Key words)

Ali Hasan Alwan Kufa, Iraq E-mail: [email protected]

in Figure 1 and it's included Digital Signature which used to authorize the message's sender. The symmetric cryptography is much faster than Asymmetric cryptography but from the point of safety is a public key safer; it's using arithmetic operation like modular multiplication and required exponentiation time when attempted to encryption. From the first public key algorithms is RSA, The name came from the first latter of three scientists Ron Rivest, Adi Shamir, and Leonard Adleman, they published their method in 1977 Is one of the first public key cryptography using public key to encryption and deferent key (private key) to decryption it's based on two primes number and its products before encryption in RSA [3], the key generation are illustrated in the following steps. 

1. INTRODUCTION

Cryptography is coming from two a Greek words "kryptosgraphein" means hidden – writing or the science of encrypting and decrypting text [1]. Where the text or Message is transfer in unreadable formatted (usually called cipher text) done by encryption process. If we are divided the Cryptography into sections according to the encryption key there are two types, Symmetric key cryptography and Asymmetric key cryptography. Symmetric cryptography (referred as Secret-key ciphers) using the same key in encrypt and decrypt [2].

Key Generation: o Choose two prime number p and q o Compute product of the two prime n = p. q : Public o Compute Φ(n) = (p − 1). (q − 1) : Private o Choose e integer number (public key) where 1 < e < Φ(n) and gcd(e, Φ(n)) = 1 o Compute key inverse (private key) d = e−1 mod Φ(n) And the encryption preformed as: c = me mod n And the decryption as: m = c d mod n and the modern public key Algorithm is the Elliptic Curve "EC", there are many fields of EC such as Galois Field of large Prime number "GFP ",over Binary filed 2m where 𝑚 is an integer number , EC over 𝑍 where 𝑍 is the integer number, and etc. in this paper the main matter and discuss about EC over GFP , the general equation of EC is y 2 = x 3 + αx + β mod p Denoted by Ep (α, β) where the coefficients α, β is integer in the Galois field and p is prime number (where α, β must satisfy the equation4α3 + 27β2 ≠ 0). There are two operations in the field FP define on EC addition operation and multiplication operation (multiplication is repeated addition ex: 2P=P+P) [4] [5] [6].

Figure 1 Public key Schema

Asymmetric cryptography (referred as public-key ciphers) required public and private key to encryption/decryption shown

1

2.

MULTI-REACTION AUTOMATA DIRECT GRAPH (MRADG):

The main problem in RADG is the static design, if any one on the network gets the design with ciphertext then he/she can be decrypt the ciphertext effortlessly and get information from it , the purpose of this paper is to develop the RADG design to be more secure in Wide area networks such as cognitive Radio Network "CRN". By using RSA scheme instant of Transition function in RADG and convert the cipher text into point in specific EC. The new algorithm based on RADG design that contains three parts: Reaction states, Q states and Jump states. Each state has λ of values except the jump state that just refers to another state in Reaction states; the proposed algorithm used function f instead of the static transition function in RADG [7] , as shown in Figure 2.

2.2 TRANSITION FUNCTION:

At the beginning the communications parts are agreed on large number n that consist of two prime number p and q where n = p ∗ q . The numbers of Q states is started from 0 to n − 1 , also sender who's ciphering choose a random number 𝑒 between (1, Φ(n)) where the Φ(n) is the Euler's totient function, the 𝑒 number is represented the public key for transition function on condition gcd(e, Φ(n)) = 1. There are two type of transition function fQ and fR there is no difference in the internal architecture of these functions, the result for them is refers to the state within the Q set but the input of fQ is from Q states and for fR is from R states. For an example if the number of Q states is n = 33 , it's consists of two prime number p, q where p = 11 and q = 3 Φ(n) = (𝑝 − 1) ∗ (𝑞 − 1) Choose e = 13 , to find the inverse of e 𝑑 = 17 , where e ∗ 𝑑 𝑚𝑜𝑑 Φ(n) = 1

Figure 2 MRADG Design

2.1 VALUES NUMBER

In general each state either it's in Q states or R states it's have 𝜆 of values in single state expect the jump state it's don't have any values or 𝜆 = 0 then to compute the number of values in the entire design: Λ = 𝜆 ∗ (𝑚 + 𝑛 − 𝑘) Since 𝑛 = 𝑝 ∗ 𝑞 where 𝑝 and 𝑞 are large prime numbers. Where 𝑚: number of 𝑅 states, 𝑛: number of 𝑄 states , 𝑘: number of 𝐽𝑢𝑚𝑝 states

To determine the next state as illustrated in Figure 3 where it's totally depending on the current state where the cipher progress are located in this , besides to make sure the distribution of states no. is not repeated circularly to avoid that this situation must have a secondary key (the message index represent this key) . Suppose the current state number is '1' as known the '1' raised to any power remains '1' then if the cipher process started from state '1' surely all the next states will become '1' (without secondary key). Example the current state is "11", and the message index is '8' compute the next state: 𝑡𝑒𝑚𝑝 = 𝐶𝑢𝑟𝑟𝑒𝑛𝑡𝑆𝑡𝑎𝑡𝑒𝑁𝑜 + 𝑘𝑒𝑦 𝑚𝑜𝑑 𝑛 𝑁𝑒𝑥𝑡𝑆𝑡𝑎𝑡𝑒 = 𝑡𝑒𝑚𝑝𝑒 𝑚𝑜𝑑 𝑛 Then the next state is number "28" in the Q states, and so on to the rest of states. The deference of two functions 𝑓𝑄 and 𝑓𝑅 is the input state either from R state or Q state, the output always in Q state. In the backward process from the last example we have located in the state number "28" and the message index is "8" after calculate the plaintext description in section 3 then calculate the previous state : 𝑡𝑒𝑚𝑝 = (𝐶𝑢𝑟𝑟𝑒𝑛𝑡𝑆𝑡𝑎𝑡𝑒𝑁𝑜. )𝑑 𝑚𝑜𝑑 𝑛 𝑃𝑟𝑒𝑣𝑖𝑜𝑢𝑠𝑆𝑡𝑎𝑡𝑒 = 𝑡𝑒𝑚𝑝 − 𝑀𝑖𝑛𝑑𝑒𝑥 𝑚𝑜𝑑 𝑛 The previous state is "11" briefly explained in Figure 4, and so on for remains states.

Figure 3 Transition function scheme

2

3.1 KEY FOR TRANSITION FUNCTION

step 1. step 2. step 3. step 4. 1 step 5.

𝑃 ⟵ 𝑃𝑟𝑖𝑚𝑒𝑁𝑂 , 𝑞 ⟵ 𝑃𝑟𝑖𝑚𝑒𝑁𝑂 𝑛 ⟵𝑝∗𝑞 𝛷(𝑛) ⟵ (𝑝 − 1) ∗ (𝑞 − 1) 𝑒 ⟵ 𝑔𝑐𝑑(𝑟𝑎𝑛𝑑𝑜𝑚(0, 𝑛 − 1), 𝛷(𝑛)) =

d ⟵ 𝑒 −1

3.2 ENCRYPTION

Figure 4 Internal structure of MRADG 2.3 EMBEDDING

To represented date into the EC there is several ways, consider a curve 𝑦 2 = 𝑥 3 + 𝑎𝑥 + 𝑏 𝑚𝑜𝑑 𝑝 and the message is content number and alphabet characters (035).to encode char ‘A’ as 𝑚 = 10 within a public variable, n=20.  Compute, 𝑚𝑎 = m ∗ k + 𝑖 , where value of 𝑖 is ranged between {1, . . , 𝑘 − 1} and try to get integral value of 𝑦  Thus 𝑚𝑎 encoding as point (𝑥, 𝑦) 𝑥−1 ) [5] [6]. 𝑘



The decoding is simple 𝑚 = 𝑓𝑙𝑜𝑜𝑟 (

3.

ALGORITHEMS

Using algorithms to described clearly and understandable the encryption and decryption processes, the following table explains ambiguities abbreviations and functions in the algorithms.

step 6. 𝑆𝑡𝑎𝑡𝑒𝑛𝑜 . ⟵ 𝑟𝑎𝑛𝑑𝑜𝑚( 0 , 𝑅𝑙𝑒𝑛𝑔𝑡ℎ ) step 7. 𝑠𝑡𝑎𝑡𝑢𝑠 ⟵ 𝐼𝑁𝑅 step 8. 𝑤ℎ𝑖𝑙𝑒 ( 𝑖𝑛𝑑𝑒𝑥 < 𝑀𝑒𝑠𝑠𝑎𝑔𝑒𝑙𝑒𝑛𝑔𝑡ℎ ) step 9. 𝑖𝑓 𝑠𝑡𝑎𝑡𝑢𝑠 = 𝐼𝑁𝑅 step 10. 𝑐𝑖𝑝ℎ𝑒𝑟[𝑖𝑛𝑑𝑒𝑥] = 𝑅[𝑆𝑡𝑎𝑡𝑒𝑛𝑜 ]. 𝑔𝑒𝑡𝑉𝑎𝑙𝑢𝑒[𝑀𝑒𝑠𝑠𝑎𝑔𝑒] step 11. 𝑆𝑡𝑎𝑡𝑒𝑛𝑜 . = 𝑛𝑒𝑥𝑡_𝑠𝑡𝑎𝑡𝑒(𝑆𝑡𝑎𝑡𝑒𝑛𝑜 . , 𝑖𝑛𝑑𝑒𝑥, 𝑒, 𝑛) step 12. 𝑒𝑛𝑑 𝑖𝑓 step 13. 𝑖𝑓 ( 𝑆𝑡𝑎𝑡𝑒𝑛𝑜 . = 𝑗𝑢𝑚𝑝𝑖 ) step 14. 𝑆𝑡𝑎𝑡𝑒𝑛𝑜 . = 𝑟𝑎𝑛𝑑𝑜𝑚𝐺𝑖 step 15. 𝑒𝑛𝑓 𝑖𝑓 step 16. 𝑖𝑓 𝑆𝑡𝑎𝑡𝑢𝑠 = 𝐼𝑁𝑄 step 17. 𝑐𝑖𝑝ℎ𝑒𝑟[𝑖𝑛𝑑𝑒𝑥] = 𝑅[𝑆𝑡𝑎𝑡𝑒𝑛𝑜 ]. 𝑔𝑒𝑡𝑉𝑎𝑙𝑢𝑒[𝑀𝑒𝑠𝑠𝑎𝑔𝑒] step 18. 𝑆𝑡𝑎𝑡𝑒𝑛𝑜 . = 𝑛𝑒𝑥𝑡_𝑠𝑡𝑎𝑡𝑒(𝑆𝑡𝑎𝑡𝑒𝑛𝑜 . , 𝑖𝑛𝑑𝑒𝑥, 𝑒, 𝑛) step 19. 𝑒𝑛𝑑 𝑖𝑓 step 20. 𝐸𝑚𝑏𝑎𝑑𝑑𝑖𝑛𝑔(𝑐𝑖𝑝ℎ𝑒𝑟) step 21. 𝐸𝑛𝑑 𝑊𝑖𝑙𝑒

Table 1 RADG implementation notations

3.3 DECRYPTION

Notations 𝐫𝐚𝐧𝐝𝐨𝐦(𝟎, 𝐧) 𝐈𝐍𝐑 ,𝐈𝐍𝐐 𝐠𝐞𝐭𝐕𝐚𝐥𝐮𝐞[𝐌𝐞𝐬𝐬𝐚𝐠𝐞] 𝐧𝐞𝐱𝐭 𝐬𝐭𝐚𝐭𝐞 ()

𝐣𝐮𝐦𝐩𝐢 𝐫𝐚𝐧𝐝𝐨𝐦𝐆𝐢 𝑬𝒎𝒃𝒂𝒅𝒅𝒊𝒏𝒈() 𝒑𝒆𝒓𝒗𝒊𝒐𝒖𝒔𝒆𝒔𝒕𝒂𝒕𝒆

Details Generate random integer number between 0 and n In R states , in Q states Get the first or second value from the state Function take several parameters : previous stateno . , index as secondary key , e as transition key and n number of finite field and return number of next state Refers to one of jump states In multi Reaction it's refers to a random number in one subgroup of reaction Embedding the cipher value into specific Elliptic curve Inverse of 𝐧𝐞𝐱𝐭 𝐬𝐭𝐚𝐭𝐞 function

step 1. 𝐸𝑚𝑏𝑎𝑑𝑑𝑖𝑛𝑔−1 () step 2. [𝑠𝑡𝑎𝑡𝑢𝑠, 𝑆𝑡𝑎𝑡𝑒𝑁𝑜 ] ⟵ 𝑝𝑒𝑟𝑣𝑖𝑜𝑢𝑠𝑒𝑠𝑡𝑎𝑡𝑒 (𝑆𝑡𝑎𝑡𝑒𝑛𝑜 , 𝑀𝑒𝑠𝑠𝑎𝑔𝑒𝑙𝑒𝑛𝑔𝑡ℎ−1 , 𝑑, 𝑛) step 3. 𝑤ℎ𝑖𝑙𝑒(𝑖𝑛𝑑𝑒𝑥 ≥ 0) step 4. 𝑖𝑓 𝑆𝑡𝑎𝑡𝑢𝑠 = 𝐼𝑁𝑄 step 5. 𝑑𝑒𝑐𝑖𝑝ℎ𝑒𝑟[𝑖𝑛𝑑𝑒𝑥] = 𝑄[𝑆𝑡𝑎𝑡𝑒𝑛𝑜 ]. 𝑔𝑒𝑡𝑉𝑎𝑙𝑢𝑒[𝑀𝑒𝑠𝑠𝑎𝑔𝑒] step 6. 𝑆𝑡𝑎𝑡𝑒𝑛𝑜 . = 𝑝𝑒𝑟𝑣𝑖𝑜𝑢𝑠𝑒𝑠𝑡𝑎𝑡𝑒 (𝑆𝑡𝑎𝑡𝑒𝑛𝑜 . , 𝑖𝑛𝑑𝑒𝑥 − 1, 𝑑, 𝑛) step 7. 𝑖𝑓 (𝑣𝑎𝑙𝑢𝑒 𝑛𝑜𝑡 𝑓𝑜𝑢𝑛𝑑 𝑖𝑛 𝑄) step 8. 𝑠𝑡𝑎𝑡𝑢𝑠 ⟵ 𝐼𝑁𝑅 step 9. 𝑒𝑛𝑑 𝑖𝑓 step 10. 𝑒𝑛𝑑 𝑖𝑓 3

step 11. 𝑖𝑓 𝑆𝑡𝑎𝑡𝑢𝑠 = 𝐼𝑁𝑅 step 12. 𝑑𝑒𝑐𝑖𝑝ℎ𝑒𝑟[𝑖𝑛𝑑𝑒𝑥] = 𝑄[𝑆𝑡𝑎𝑡𝑒𝑛𝑜 ]. 𝑔𝑒𝑡𝑉𝑎𝑙𝑢𝑒[𝑀𝑒𝑠𝑠𝑎𝑔𝑒] step 13. 𝑆𝑡𝑎𝑡𝑒𝑁𝑜 = 𝑗𝑢𝑚𝑝𝑖 (𝑅𝑖 ) step 14. 𝑆𝑡𝑎𝑡𝑒𝑁𝑜 = 𝑝𝑒𝑟𝑣𝑖𝑜𝑢𝑠𝑒𝑠𝑡𝑎𝑡𝑒 (𝑆𝑡𝑎𝑡𝑒𝑛𝑜 . , 𝑖𝑛𝑑𝑒𝑥 − 1, 𝑑, 𝑛) step 15. 𝑠𝑡𝑎𝑡𝑢𝑠 ⟵ 𝐼𝑁𝑄 step 16. 𝑒𝑛𝑑 𝑖𝑓 step 17. 𝑒𝑛𝑑 𝑤ℎ𝑖𝑙𝑒

4.2 DECRYPTION:

To explain the decryption process its start backward, the receiver was receives data was embedding into specific elliptic curve and cipher of last state number in this example: Stateno . = 28 , = 17 , 𝑛 = 33 , 𝑘 = 7. Firstly compute the last state number that the decryption process is start from it, Stateno . = (2817 mod 33) − 8 = 11

False IN Q 2 19 ( 283 , 54 ) 0

0

True IN Q 29 76 ( 533 , 74 ) 1

1

True IN Q 24 48 ( 337 , 178 ) 2

1

False IN Q 4 64 ( 452 , 278 ) 3

0

True IN R 28 8 ( 57 , 332 ) 4

1

True IN Q 32 2

0

True IN Q 16 1

True IN R 22 1

17 -

( 17 , 332 )

IN R IN Q IN Q IN R IN Q IN Q IN Q IN Q

5

2 29 24 4 28 32 16 22

4

0 1 1 0 1 0 1 1

( 30 , 236 )

𝒎𝒆𝒔𝒔𝒂𝒈𝒆 𝑺𝒕𝒂𝒕𝒆𝒏𝒐 𝑺𝒕𝒂𝒕𝒖𝒔

6

𝒊

0 1 2 3 4 5 6 7

75

Table 2 Encryption Process

( 529 , 254 )

Finally the cipher values are embedding in this example will used the elliptic curve with the equation: 𝑦 2 = 𝑥 3 − 𝑥 + 188 𝑚𝑜𝑑 751 , The encryption process as shown in Table 2.

7

Each part on the communication has its own public key 𝑒 (random number where : 0 < 𝑒 < Φ(n) ) and (𝑒, 𝛷(𝑛)) = 1.

-

10 ∗ 2 = 20

-

Φ(n) = (𝑝 − 1) ∗ (𝑞 − 1)

-

𝑛 = 𝑝 ∗ 𝑞 = 33

𝑺𝒕𝒂𝒕𝒖𝒔

Before starting in encryption process there is several things that the communications part must be agree on it, two prime number 𝑝 𝑎𝑛𝑑 𝑞 in this example = 11 𝑎𝑛𝑑 𝑞 = 3 .

𝑺𝒕𝒂𝒕

4.1 Encryption:

𝑷𝒐𝒊𝒏𝒕 𝒐𝒏 𝑬𝑪 𝒗𝒂𝒍𝒖𝒆 𝒎𝒆𝒔𝒔𝒂𝒈𝒆

EXAMPLE:

𝒗𝒂𝒍𝒖𝒆 𝑷𝒐𝒊𝒏𝒕 𝒐𝒏 𝑬𝑪

19 76 48 64 8 2 4 75

( 135 , 198 ) ( 533 , 74 ) ( 337 , 178 ) ( 452 , 278 ) ( 57 , 332 ) ( 17 , 332 ) ( 30 , 236 ) ( 529 , 254 )

𝒊𝒏𝒅𝒆𝒙

4.

This section clarification the ' Algorithms' via numbers in details.

𝒔𝒆𝒂𝒓𝒄𝒉

Table 3 Decryption Process

5.

ANALYSIS

The RADG algorithm and the proposed one have an important characteristic they have produces random ciphertext, to find the relational between the deferent ciphertext there is so

The cipher is:

many criteria to measure that as illustrated in Figure 5 for fifty

{ ( 50 , 136 ) , ( 352 , 65 ), ( 291 , 16 ), ( 190 , 196 ),

executions on the same plaintext to get deferent ciphertext.

( 391 , 187 ), ( 131 , 34 ), ( 1 , 375 ), ( 170 , 274 )} And send the last 𝑠𝑡𝑎𝑡𝑒𝑛𝑜 . encryption by 𝑒 10𝑒 𝑚𝑜𝑑 𝑛 = 24 .

Also, the time required implementing encryption and decryption of a message it takes three times less than it takes in the RADG.

4

Figure 7 Authentication between two users

Figure 5 hamming weight

To calculate the proportion of interdependence between serval ciphertext illustrated in Figure 6 using Autocorrelation

As illustrated in Figure 7 first Alice tells Bob he want to communication with her, Bob sends a number (𝑅) she chosen at random, Alice encrypt the number 𝑅 with his private key and send to Bob.at the final step Bob decrypt the encrypted value by Alice public key, if she have get the same value of 𝑅 then she'll be sure of the identity of user who communicate with. And vice versa for authentication of Bob. Also the public key is provided the Digital Signature to get ensure for nonrepudiation, the receiver verify the sender identity because message only decrypt be sender's public key, and it's only encrypted private key then the sender can't longer be able to repudiation his message [9]. 5.2 INTEGRITY

To get the integrity of the message was sent the more efficient way to use one-way hash function ℎ = 𝐻(𝑀), where ℎ is more smaller than message 𝑀 , 𝐻 is the hash function and the stander on the internet is MD5 algorithm it's give 16 byte as output. It's impossible to find two message have the same hash value, the ℎ value can be describe as flag to check the message was alter or not.

6. Figure 6 Autocorrelation

5.1 AUTHENTICATION

Authentication is the method of proving one's identity to somebody else. And it's the most important topic in the security, it's provided by public key techniques in the following equation: 𝑀 = 𝐷(𝐸(𝑀)) Or 𝑀 = 𝐸(𝐷(𝑀)) Where 𝑀 is refers to Message, 𝐸 refers to public Key and 𝐷 refers to private key [1] [8].

CONCLUSION

In summary the static design and fixed ciphertext for same plaintext, is liable to guess and penetration by statistics methods. The RADG is discussed one of these problem, was the fixed ciphertext for the same plaintext.therefore the development of RADG in this paper disuses the second problem in mathematical model that replace static transition function with other math equation makes it difficult to

predict its course. As well as the less time it takes to search the developer takes a third of what was spent on the old way. 7.

REFERENCES

[1] A method for obtaining digital signatures and public-key cryptosystems. Rivest , Ronald L, Shamir , Adi and Adleman, Len. 1978. 1978, Communications of the ACM.

5

[2] A, Scott, et al. 1996. Handbook of applied cryptography. s.l. : CRC press, 1996. [3] Albermany, Salah A. and Safdar, Ghazanfar A. 2014. Keyless Security in Wireless Networks. 2014. [4] Application of message embedding technique in ElGamal Elliptic Curve Cryptosystem. Udin, Md Nizam and Halim, Suhaila Abd and Jayes, Mohd Idris and Kamarulhaili, Hailiza. 2012. 2012. [5] Boyd, Colin and Mathuria, Anish. 2013. Protocols for authentication and key establishment. s.l. : Springer Science \& Business Media, 2013. [6] Cohen, Henri and Frey, Gerhard and Avanzi, Roberto and Doche, Christophe and Lange, Tanja and Nguyen, Kim and Vercauteren, Frederik. 2005. Handbook of elliptic and hyperelliptic curve cryptography. s.l. : CRC press, 2005. [7] Kaufman, Charlie , Perlman, Radia and Speciner, Mike. 2002. Network security: private communication in a public world. s.l. : Prentice Hall Press, 2002. [8] Stallings, William. 2010. Cryptography and network security. 2010. [9] The Mathematics of the RSA Public-Key Cryptosystem. Kaliski, Burt. 2006. 2006, RSA Laboratories.

6

Table 2 Values of Q set

APPENDIX: SETS VALUES Table 1 Values of R set

Number of state 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

R set First value

Second value

38 58 45 1 10 57 31 63 78 66 37 93 35 36 56 68 7 11 77 62 30 32 15 16 67 47 73 61 14 51 2

55 52 26 12 34 25 20 72 83 50 5 80 27 43 4 60 28 59 74 22 75 39 48 70 54 21 8 76 18 17 9

Number of state 0 1 2 3 4 5 6 7 8 9 10 11 12 13

Q set First value

Second value

40 33 19 46 46 23 84 85 90 89 44 88 87 49

71 3 29 65 65 53 81 91 86 92 69 79 82 24

Figure 1 Example of State

7