FACTORING THE RSA KEY WITH NEW FACTORING ALGORITHM: IMFFV3 Muhammad Usman
Akhlaque Ahmad
Computer Science Department Iqra University Islamabad, Pakistan
[email protected]
Computer Science Department Iqra University Islamabad, Pakistan
[email protected]
Abstract-- Information security is the related to save the secret information besides the misuse of the data or damage the data or expose the secret data. The information security is also to protection of Confidentiality, Integrity and Availability of the secret information. RSA is the security algorithm and it is the public key cryptosystem. So many techniques used for breaking the RSA key. Many methods like Fermat Factorization, Modified Fermat Factorization, Modified Fermat Factorization V2 and Modified Fermat Factorization V3. The purpose of these methods to decreases the computational time. In this paper, we will develop a new factoring algorithm which is Improved Modified Fermat Factorization V3 (IMFFV3). The purpose of IMFFV3 is to decrease the more computational time. We will use Hexadecimal technique. We will create a table which will be the Hexadecimal Differences Least Significant Digit Table (HLSDT). This table will contain the results of differences of two numbers. In HLSDT, the results of difference`s the analysis of least significant digits of two prime numbers. The experimental results will show the comparison between MFF, MFFV2, MFFV3 and IMFFV3. The comparison will base on computational time. Also, we will create the graphs of IMFFV3.
Key Words--
RSA; Fermat Factorization; Modified Fermat Factorization; Modified Fermat Factorization V2; Modified Fermat Factorization V3; Improved Modified Fermat Factorization V3; Digits; Tables; Graphs
I.
INTRODUCTION
Security of data is very important when send the data. Cryptography is the method to save the data on the untrusted network. Symmetric cryptography is used to save the data. In public key cryptography uses two keys; one key is a public key and the other key is known as a private key. The private key is known as symmetric key and public key is known as asymmetric key. In symmetric cryptography, both ends use the same keys for data encryption and decryption. In symmetric, anyone can
decrypt the data because both ends use same keys and there is no security. The asymmetric key was proposed by Diffie and Hellman. In a symmetric key, there are two keys to encrypt and decrypt the data. Asymmetric is also known the public key cryptography. The sender uses the public key and receiver use the private key. There are many numbers of public key algorithms, but the RSA is the well-known algorithm. In 1977, RSA was first time proposed by Rivest, Shamir and Adleman [1]. The RSA algorithm is used in information security. The basic function of the RSA is to spread the safe the data. In RSA it is very easy and simple to find the two prime numbers, but if find the factors than it’s very hard to find. In public key cryptography, there are two key uses in it. One key use for encrypting the message and other key use for decrypts the message. RSA is the asymmetric key cryptography. There are many factorization algorithms were produced for offensive RSA i.e. Quadratic Sieve (QS) [8], Multi Polynomial Quadratic Sieve (MPQS) [8], Continued Fraction (CFRAC) [9], Algorithm, Monte Carlo Factorization algorithm, Trial Division algorithm, Pollard`s Algorithms, VFactor [10], MVFactor [10], Fermat Factorization [1], Modified Fermat Factorization [2], Modified Fermat Factorization V2 [6], Modified Fermat Factorization V3 [6]. These all algorithms are based on RSA and the purpose of all these algorithms is to reduce the computational time. The Fermat Factoring algorithm (FF) was developed by Pierre de Fermat [1]. The purpose of this method was to factor the number in minimum time. The advanced or modified version of FF was MFF. It was improved the more computational time and more enhancements require in factoring algorithms. The modified version of MFF was MFFV2 and more required improvement in factoring algorithms. We propose a new method for factoring the large number. Our method is improved version of Modified Fermat Factorization V3 to decrease more computational time and increase the more computational speed. Our method is Improved Modified Fermat Factorization V3 (IMFFV3). We will trying to reduce the more
computational time. We will use hexadecimal numbers for factoring the numbers. 0, 1 4 and 9, these numbers computed in hexadecimal technique. We will create a table which will be Hexadecimal Least Significant Digit Table (HLSDT). This table used to analyze the Least 2 Significant Digits (LSD) of x, n and y . The experimental results will show the computational time of IMFFV3 and other factoring algorithms.
II.
RSA SCHEME
Take two prime numbers and kept secret (p and q). Find n, n = p * q. Find ø (n), ø (n) = (p - 1) (q - 1) Compute e, 1 < e < ø (n), gcd (e, ø (n)) = 1 Compute d, 1 < e < ø (n), e * d modø (n) = 1 Encryption
Decryption
C = m^e mod (n)
m = c^d mod (n)
Table I: Semiprime Numbers
Table I, illustrate the semiprime numbers [5]. The semiprime numbers are those numbers which are the product of two prime numbers. The factorization of semiprime number is very difficult and it is like a challenge.
III.
LITERATURE REVIEW
In 1975, pollard was proposed a method which was called the pollard`s p method [12]. This method is special purpose algorithm. The purpose of the pollard`s method was to factorize the numbers. It gets the p, to the repetition of the module the features like a loop with an end when planed. It is particularly for complex digits with minor factors. Pierre de Fermat was first time proposed the method which is Fermat Factorization in 1600 [3]. He was taking 2 2 two numbers which were x and y and the n = x - y . x equals to (p+q)/2 and y equals to (p-q)/2. After finding the x and y, then find the p and q, the p and q must be prime numbers.
The modified version of Fermat Factorization (FF) was Modified Fermat Factorization [4]. The MFF proposed in 2012. This method was improved by the FF with respect to the time. The MFF improved the more time. In FF, the equation was y = (p-q)/2 but in MFF the equation is y = √(x² - n). To find the value of x, x = ceil (√n), then finds the y, with the equation of y = √(x² - n). If y is not an integer, then adding 1 in x and then find y. When y is an integer then stop processing. After x and y, find p and q two prime numbers. p = x + y and q = x – y and n = p*q. The modified version of MFF was Modified Fermat Factorization V2 (MFFV2) [10]. This method more improves the computational time and also decreases the 2 iterations. In this method, if least significant digit of y is 2, 3, 7 or 8 than not processing these numbers. If the 2 LSD`s are 2, 3, 7 or 8 and if y is decimal than adding 1 in x. After finding x and y, find p and q, p and q must be prime numbers. The MFFV2 is better than FF and MFF. This method is better because of; it takes less computational time during processing. Kritsanapong and Sumonta were proposing a new factoring method which is Modified Fermat Factorization V3 (MFFV3) [6]. This method is improved version of MFFV2. This method takes less time of computational to MFFV2, MFF and FF. The time comparison this method is better than all factoring algorithms. This method uses the same technique which was used in MFFV2 and creates a 2 table of LSD (n), LSD (x) and LSD (y ). Due to DLSD table, it is very easy to find the numbers which check or not check. This method is better than every factoring method. The factorization of N is very complicated [7]. New factoring technique was proposed in this paper. The purpose of this paper was to reduce the more computational time and took positive n integers. The suggested work was focuses on factorization of trivial and as well as nontrivial positive integers. Also reduce the steps of the factorization on n numbers. This factorization technique was created on pollard factorization method. This paper describes the new factoring algorithm which is RAK algorithm [11]. This algorithm factor the number of the form n = pq, the p and q are two prime numbers. The computational speed dependent on the differences the q-p. The benefit of this method is an advantage of the algorithm is the ending situations in the pre-computation phase. This algorithm suggests the important development over the Fermat factoring algorithm.
IV.
PROPOSED METHOD
Decimal numbers (base-10) 2, 3, 7 and 8 not compute these numbers and this technique used in MFFV2 and MFFV3. This technique is just considers six numbers (0, 1, 4, 5, 6 and 9) out of ten and not considers four numbers (2, 3, 7 and 8). This technique
used to decrease the more computational time and more computational iterations. In hexadecimal numbers (base-16), consider just four numbers which are 0, 1, 4 and 9 and reaming twelve numbers which are 2, 3, 5, 6, 7 ,8, A, B, C, D, E and F. Due to computing four numbers, more the computational time better to the MFF, MFFV2 and MFFV3. We will use this technique in IMFFV3. The IMFFV3 algorithm is better than MFF, MFFV2 and MFFV3 because it computes four numbers and due to this, decreasing the computational time and computational iterations. We also create a table which is Hexadecimal Least Significant Digit Table (HLSDT). In this table, we mention the LSD (n), LSD (x) and LSD (y2). This method does not compute y2 in some cases that it can 2 strongly confirm that y is not a perfect square by using Hexadecimal Least Significant Digit Table 2 (HLSDT). In HLSDT, the least significant digit of y is shown in any cases of least significant digit of x and n. We used LSD (n) denoted as the least significant digit of n. The concept of HLSDT is based upon the fact of the least significant digit of y². Therefore, we will use HLSDT to the real situation for making decisions.
B. Algorithm of IMFFV3 a. b. c. d.
n is semiprime x = ceil (√n) y2 = (x2 - n) 2 if LSD of y is 0, 1, 4 or 9 then goto step 5 else goto step 6 e. if y is a perfect square then goto step 7 else goto step 6 f. x++ and goto step 3 g. p = x + y and q = x - p and q are two prime factors of n The above algorithm shows the algorithm of IMFFV3. In the first step, we take a semiprime number which is n then we find the value of x and then we will 2 2 find y . If LSD (y ) is 0, 1 4 or 9 then find y and if not these numbers, then go back and addition 1 in x. If y is a perfect square, then finds p and q, if not, then again addition 1 in x till y becomes a perfect square. C. Hexadecimal Least Significant Digit Table Table III: Hexadecimal Least Significant Digit Table
A. Hexadecimal Numbers with Square
Least Significant Digit of y
Table II: Hexadecimal Square Numbers Number
Square
Number
Square
Number
Square
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
9C4 A29 A90 AF9 B64 BD1 C40 CB1 1000 1081 1104 1189 1210 1299 1324 13B1
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
2710 27B9 28A4 2971 2A40 2B11 3100 31E1 32C4 33A9 3490 3579 3664 3751 3840 3931
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
57E4 5911 5A40 5B71 10000 10201 10404 10609 10810 10A19 10C24 10E31 11040 11251 12100 12321
In table II, discuss the hexadecimal numbers with their squares [13]. The squares proof that the LSD of each square ends with 0, 1, 4 or 9. Every 0 ends with 0, 1, 4 or 9 and every 4 ends with even (0, 2, 4, 6 or 9) number. For example 40 ends with 1000, 75 end with 3579 and 106 ends with 10C24.
LSD (x)
LSD
LSD
LSD
LSD
LSD
2
LSD
LSD
LSD
(n)
(n)
(n)
(n)
(n)
(n)
(n)
=1
=3
=5
=7
=9
= 11
= 13
= 15
(n)
0
F
D
B
9
7
5
3
1
1
0
E
C
A
8
6
4
2
2
3
1
F
D
B
9
7
5
3
8
6
4
2
0
E
C
A
4
F
D
B
9
7
5
3
1
5
8
6
4
2
0
E
C
A
6
3
1
F
D
B
9
7
5
7
0
E
C
A
8
6
4
2
8
F
D
B
9
7
5
3
1
9
0
E
C
A
8
6
4
2
10
3
1
F
D
B
9
7
5
11
8
6
4
2
0
E
C
A
12
F
D
B
9
7
5
3
1
13
8
6
4
2
0
E
C
A
14
3
1
F
D
B
9
7
5
15
0
E
C
A
8
6
4
2
Table III describes the numbers which we consider or not to be considered. The numbers which are bold and underlined not consider these numbers and we consider reaming numbers. We consider just 32 numbers out of 128 and we do not consider reaming 96 numbers. 20 numbers were used in MFFV3 out of 40 numbers its mean 50% numbers were used and reaming 50% (20
numbers) were not used. So reducing the numbers it should be reducing the more computational time. D. Combine Comparison
Table IV: Comparison of the factoring algorithm Computing y2 (Time) MFF
MFFV2
MFFV3
IMFFV3
3.47
2.56
1.19
0.03
12.15
8.38
3.51
0.05
18.24
12.39
10.42
0.13
36906499271669 = 897684413 * 41113 24196596685924063 = 1001044199 * 24171337
37.35
29.33
13.37
0.18
33.11
17.26
7.14
0.14
25%
24448711781843273 = 900897617 * 27138169
14.30
7.41
5.57
0.11
12760368869961847 = 577964389 * 22078123
8.29
4.41
3.37
0.07
IMFFV3
18181242395319571 = 1248473927 * 14562773
36.37
27.57
16.42
0.29
58805838568831889 = 318892692210271 * 21842959
55.45
38.46
32.54
0.52
145.42
107.21
89.8
0.35
36.42
25.49
18.33
0.105
n=p*q Consider Number
Not Consider Numbers
5715113619001 = 96881111 * 58991 14757923251427051 = 472529819 * 31231729
50% 75%
50%
MFFV3 Figure I
Figure I indicate the combine evaluations between MFFV3 and IMFFV3. The 50% of numbers were considered in MFFV3 and not considers the same ratio in MFFV3. The 25% of numbers were considered and 75% of the numbers were not considered in IMFFV3. V.
EXPERIMENTAL RESULTS
In experimental results, we find the results of IMFFV3 and find other algorithms, i.e. MFF, MFFV2 and MFFV3. After finding all the results, we compare IMFFV3 results with MFF, MFFV2 and MFFV3 results. The table below shows the results of IMFFV3 and MFF, MFFV2 and MFFV3. The results show that the IMFFV3 is better than other factoring algorithms. For example, n = 12760368869961847 and the two factors of n are 577964389 and 22078123.MFF take 8.29 minutes, MFFV2 takes 4.41 minutes, MFFV3 takes 3.37 minutes but IMFFV3 takes just 0.07 seconds. Its mean IMFFV3 is better than 99.15%, 98.41% and 97.92% to the MFF, MFFV2 and MFFV3 respectively. The results were implemented in Java. All the bellows experimental results were developed on a 2.53 GHz an Intel® Core i3 with 4 GB of memory.
552236712132101 = 803766641 * 687061
927660234810452681 = 7429944659 * 124854259 Mean
According to table IV, the computational speed of IMFFV3 is better than the computational speed of MFFV3, MFFV2 and MFF. In this table, we mention the LSD (n), LSD (x) and LSD (y2). This method does not compute y2 in some cases that it can strongly confirm that y2 is not a perfect square by using Hexadecimal Least Significant Digit Table (HLSDT). When n = 18181242395319571, and two factors of n are 1248473927 and 14562773 then MFF take 36.37, MFFV2 take 27.57, MFFV3 take 16.42 and IMFFV3 take 0.29. This example shows the computational time and IMFFV3 is better than MFF, MFFV2 and MFFV3.
Figure II
In Figure II, here is the mean of four factoring algorithms which are MFF, MFFV2, MFFV3 and IMFFV3. The graph also shows the IMFFV3 is better than other factoring algorithms.
VI.
CONCLUSION
The purpose of this paper to proposed a new factoring algorithm which is IMFFV3. The purpose of IMFFV3 is to reduce the more computational time and increase the computational speed. We use HLSDT in IMFFV3. In HLSDT, We use LSD (n) denoted as the least significant digit of n. The concept of HLSDT is based upon the fact of the least significant digit of y². This method does not compute y2 in some cases that it can strongly confirm that y2 is not a perfect square by using HLSDT. The experimental results showed that the IMFFV3 is better than MFF, MFFV2 and MFFV3. When n = 12760368869961847 and two factors of n are 577964389 and 22078123 then the MFF take 8.29, MFFV2 take 4.41, MFFV3 take 3.37 and IMFFV3 take 0.07. so IMFFV3 is better than other factoring algorithms. VII.
REFERENCES
[1] R.L. Rivest, A. Shamir, L. Adleman, A method for obtaining digital signatures and public key cryptosystems, Communications of ACM 21(1978) 120 – 126. [2] B. R Ambedkar, A. Gupta, P. Gautam, S. S.Bedi, An Efficient Method to Factorize the RSA Public Key Encryption, Proceeding of International Conference on Communication Systems and Network Technologies, 2011, pp. 108 – 111. [3] Mu-En Wua, Raylin Tso b, Hung-Min Sunc,On the improvement of Fermat factorization using a continued fraction technique, Future Generation Computer Systems 30, 2014 [4] Prashant Sharma, Amit Kumar Gupta, Ashish Vijay, “Modified Integer Factorization Algorithm using VFactor Method”, Advanced Computing & Communication Technologies, pp.423 – 425, 2012. [5]http://mathematica.stackexchange.com/questions/411 9 5/semi-prime-numbers [6] Kritsanapong Somsuk and Sumonta Kasemvilas, MFFV3: An Improved Integer Factorization Algorithm to Increase Computation Speed, Advanced Materials Research Vols. 931-932 (2014) [7] B R Ambedkar and S Bedi, A New Factorization Method to Factorize RSA Public Key Encryption, IJCSI International Journal of Computer Science Issues, Vol. 8,
Issue 6, No 1, November 2011. [8] J. A. Davis and D. B. Holdridge, Factorization using the quadratic sieve algorithm, In David Chaum, editor, Advances in Cryptology: Procedures of Crypto 83, pp103113. Plenum Press. [9] Neal Koblitz. A Course in Number Theory and Cryptography.New York: Springer-Verlag. [10] Kritsanapong, Somsuk & Kasemvilas, Sumonta (2013). Comparison Performance of MFFV2 and MVFactor for Factoring the Modulus. Proceeding of ICITCS 2013, Macau, China, December 16-18, 2013. [11] Naveed Anjum and Abdul Rauf Khan, Breaking the Security of RSA Public Key Cryptosystem using Factoring Algorithm cum Discrete Logarithm, International Conference on Engineering & Emerging Technologies (ICEET-2014). [12] Kritsanapong Somsuk & Kasemvilas, Sumonta (2013). MFFV2 And MNQSV2: Improved Factorization Algorithms. Proceeding of the 4th International Conference on Information Science and Applications (ICISA 2013), Pattaya, Thailand, June 24-26, 2013. [13] http://www.miniwebtool.com/hex-calculator