A public key encryption based on third order linear sequences
Abstract
Based on third order linear sequences, an improvement version of the Diffie-Hellman distribution key scheme and the ElGamal public key cryptosystem scheme are proposed, together with an implementation and computational cost. The security relies on the difficulty of factoring an RSA integer and on the difficulty of computing the discrete logarithm.
Full text
A PUBLIC KEY ENCRYPTION BASED ON THIRD ORDER LINEAR SEQUENCES L. EL FADIL Abstract. Based on third order linear sequences, an improvement version of the Diffie-Hellman distribution key scheme and the ElGamal public key cryptosystem scheme are proposed, together with an implementation and computational cost. The security relies on the difficulty of factoring an RSA integer and on the difficulty of computing the discrete logarithm. 1. Introduction In [1], Diffie and Hellman introduced a practical solution to the key distribution problem, allowing two parties, Alice and Bob never met, to share a secret Key by exchanging information over an open channel. In [2], ElGamal used Diffie- Hellman ideas to designe a cryptosystem whose security is based on the difficulty of solving the discrete logarithm problem. In [3, 5], It was suggested that the linear sequences can be used instead of the standard RSA. In this paper, based on the third order linear sequences, an improved version of the Diffie-Hellman distribution key and El Gamal public key cryptosystem method are proposed. This considerably reduces the computation cost of these methods. The security relies on the difficulty of factoring an RSA integer. In section 2, an investigation of the cryptographic properties of third order linear sequences, and a computational method and cost to evaluate the kth term of a third order linear sequence are given. In section 3, two cryptographic applications, their security and computational cost are analysed. 2. Third order linear sequences In this section, the main cryptographic properties of third order linear sequences are investigated. A computational method to evaluate the kth term of a third order linear sequence is given, together with an analysis of its computational cost. Throughout this paper, pis a prime integer, Fp:= ZZ/pZZ the finite field of p elements, a∈IFpand f(X) = X3−aX2+aX −1 a polynomial in IFp[X]. Denote A=IFp[X]/(f(X)) and α=¯ Xthe class of Xmodulo the principal ideal of IFp[X] generated by f(X). For every x∈A, let lxbe the linear map of Adefined by Key words and phrases. Third order linear sequence, Public-Key encryption, Quartic field extensions. 1
2 L. EL FADIL lx(y) = xy,T(x) = Tr(lx) and N(x) = det(lx) the trace and norm of x, where det(lx) is the determinant of the linear map lx, and Tr(lx) is its trace. Define a sequence s(a) as follows : sk(a) = T(αk). Since f(α) = 0 and the trace map is linear, it follows that sk+3(a) = ask+2(a)−ask+1(a) + sk(a). So, s(a) is a third order linear sequence, called the characteristic sequence generated by a. Remark. Let lkbe the endomorphism of Adefined by lk(x) = αkx, and Mkits matrix with respect to the basis (1, α, α2). So, M0= 1 0 0 0 1 0 0 0 1 ,M1= 0 0 1 1 0 −a 0 1 a and M2= 0 0 a 0−a1−a2 1a a2−a . It follows that: s0(a) = 3, s1(a) = a, and s2(a) = a2−2a. 2.1. Cryptographic properties. Let f(X) = X3−aX2+aX −1∈IFp[X], 1, α1and α2its roots in a splinting field of f(X), and let s(a) be the characteristic sequence generated by a. Then we have the following properties: (1) For every integer k,sk(a) = 1 + αk 1+αk 2and sk(a) = s−k(a). (2) For every integer k, let fk(X)=X3−sk(a)X2+sk(a)X−1. Then fk(X)=(X−1)(X−αk 1)(X−αk 2). (3) For every integers kand e,se(sk(a)) = ske(a). (4) T= (p2−1) is a period of s(a). Proof. (1) Since f(X) is the characteristic polynomial of M1, which splits in a splinting field Kof f(X), and 1, α1and α2are the roots of f(X) in K, there exists an invertible matrix Pin M3(K) such that M1=PTP−1, where T= 1x y 0α1z 0 0 α2 , where (x, y, z)∈K3. Let kbe an integer. As Mk= Mk 1,Mk=PTkP−1, where Tk= 1xkyk 0αk 1zk 0 0 αk 2 , and (xk, yk, zk)∈K3. Therefore, sk(a) = Tr(αk) = 1 + αk 1+αk 2. Let kbe an integer. Since α1α2= 1, s−k(a) = 1+α−k 1+α−k 2= 1+αk 2+αk 1= sk(a). (2) Since, sk(a) = 1 + αk 1+αk 2, 1αk 1+ 1αk 2+αk 1αk 2=αk 1+αk 2+ 1 = sk(a), and 1.αk 1αk 2= (1.α1α2)k= 1. (3) The roots of the polynomial fk(X) are 1, αk 1,αk 2. So, se(sk(a)) = 1 + (αk 1)e+ (αk 2)e=ske(a). (4) Since, αis an element of Aof norm 1, αis an invertible element of A. Set f(X)=(X−1)(X2−(a−1)X+ 1) and 4= (a−1)2−4 be the disciminant of P(X) = X2−(a−1)X+ 1. Then there are three cases:
A PUBLIC KEY ENCRYPTION BASED ON THIRD ORDER LINEAR SEQUENCES 3 (a) pdivides (a−1)2−4. Then a= 3 or a=−1 modulo p. If a= 3 modulo p, then for every k,sk(a) = 3. If a=−1 modulo p, then for every k,s2k(a) = 3 and s2k+1(a) = −1, and then 2 is the period of s(a). (b) If ((a−1)2−4 p) = 1, then f(X) splits in IFp, and α16=α2. Thus 1, α1, α2 are pairwise distinct, and then A≃IFp×IFp×IFp. Hence the exponent of the multiplicative group A∗is p−1. So, αp−1= 1. (c) If ((a−1)2−4 p) = −1, then A≃IFp×IFp2. Hence the exponent of the multiplicative group A∗is p2−1. Thus αp2−1= 1. Consequently, απ= 1. Let kand mbe two integers, sm+kπ(a) = T(αm+kπ) =T(αm(απ)k) = T(αm) = sm(a). Hence πis a period of the sequence s(a). Corollary 2. 1. For every integer esuch that gcd(e, p2−1) = 1, the map Luce:IFp−→ IFp a−→ se(a) is a one-one correspondence. Indeed, since gcd(e, p2−1) = 1, let dbe the inverse of emodulo p2−1. Then there exists an integer ksuch that de = 1 + k(p2−1). Therefore, sd(se(a)) = sde(a) = s1+k(p2−1)(a) = s1(a) = a. 2.2. Computational Method and Cost. Lemma 2. 2. Let sk(a)be the characteristic sequence generated by a. Then (i)s2n(a) = sn(a)(sn(a)−2), ii)s2n+1(a) = sn(a)sn+1(a)−sn+1(a)−sn(a)−a+ 3 Proof. i) Since αn 1αn 2= 1, sn(a)2= (1+αn 1+αn 2)2= (1+α2n 1+α2n 2)+2(αn 1+αn 2)+2 = s2n(a)+2sn(a). ii) sn(a)sn+1(a) = (1 + αn 1+αn 2)(1 + αn+1 1+αn+1 2) = (1 + α2n+1 1+α2n+1 2) + (αn 1+αn 2)+(αn+1 1+αn+1 2)+(α1+α2) = s2n+1(a) + sn(a) + sn+1(a) + a−3. Let k= 2rm, where mis an odd integer. To compute sk(a), first we compute sm(a), then s2m(a) = sm(a)(sm(a)−2), then s4m(a) = s2m(a)(s2m(a)−2),...,sk(a) =s2r−1m(a)(s2r−1m(a)−2). To compute sk(a), we need rmultiplications modulo pand we need too sm(a). Let m=Pl−1 i=0 ki2l−1−i. For every 0 ≤i<l−1, let fi+1 = 2fi+ki+1 and f0=k0. Then fl−1=k. For 0 ≤i<l−1, assume that sfi−1(a) and sfi−1+1(a) are computed. So, if ki= 0, then sfi(a) = s2fi−1(a) =
4 L. EL FADIL sfi−1(a)(sfi−1(a)−2) and sfi+1(a) = s2fi−1+1(a) = sfi−1(a)sfi−1+1(a)−sfi−1(a)− sfi−1+1(a)−a+ 3 if ki= 1, then sfi(a) = s2fi−1+1(a) = sfi−1(a)sfi−1+1(a)−sfi−1(a)−sfi−1+1(a)−a+ 3 and sfi+1(a) = s2(fi−1+1)(a) = sfi−1+1(a)(sfi−1+1(a)−2). Algorithm of computational. In put k= 2rPl−1 i=0 ki2i, where k06= 0 and kl−16= 0, out put sk. Algorithm Begin s0= 2,s1=a, for ifrom 0 to l−1do if ki= 0 then s1=s1s0−s1−s0−a+ 3, s0=s2 0−2s0else then s0=s1s0−s1−s0−a+ 3,s1=s2 1−2s1 end for s=s0, for ifrom 1 to rdo s=s2−2s. end for return (s). End. This method ensures that skcan be computed in about the same length of time as the kth power is computed in the RSA method. But in the computation of sm(a), having to compute two numbers at each stage does slow the computation down a little, but there are optimizations in the calculation which mean that the total amount of computation is only about half more than the amount needed for the RSA system. Therefore, to compute sk(a), the total number of multiplications modulo pis log2(k). 3. Main result In this section we describe some applications of third order linear sequences, in more details : Diffie-Hellman distribution key and ElGamal public key encryption scheme. Let n=pq be an RSA integer, f(X) = X3−aX2+aX −1 a polynomial in ZZn=ZZ/nZZ,A=ZZn[X]/(f(X)) and α=¯ Xthe class of Xmodulo the principal ideal (f(X)). Let s(a) be the characteristic sequence generated by a, defined in ZZnby : sk(a) = T(αk). Lemma 3. 3. α(p2−1)(q2−1) = 1 modulo n. In particular, (p2−1)(q2−1) is a period of s(a).
A PUBLIC KEY ENCRYPTION BASED ON THIRD ORDER LINEAR SEQUENCES 5 Indeed, α(p2−1)(q2−1) = (α(p2−1))(q2−1) = 1 modulo pand α(p2−1)(q2−1) = (α(q2−1))(p2−1) = 1 modulo q. 3.1. Diffie-Hellman distribution key. Suppose that Alice and Bob who both have access to the Lucas function public data (n, a) want to agree on a shared secret key KAB. This can be done using the following Lucas version of the Diffie- Hellman protocol: (1) User Alice selects 0 < xA≤nas her private key. She then computes yA=sxA(a) as her public key from the system public key nand f(X) = X3−aX2+aX −1. (2) User Bob selects 0 < xB≤nas his private key. He then computes yB=sxB(a) as his public key from the system public key nand f(X) = X3−aX2+aX −1. (3) Key-Distribution Phase: KAB =sxA(yB) = sxB(yA) is their common secret key. Remark. That (1) KAB =sxAxB(a). (2) In each exchange session, the computational cost of each user is 2log2(n). (3) If an attacker try to compute the Alice’s private key xfrom her public key y=sx(a), a polynomial fy(X) = X2−(y−1)X+ 1 is formed. According to the Lemma 1.2, αx 1and α−x 1are the roots of fy(X). As a result, once αx 1and α1are known, solving the exponent xis equivalent to solving the discrete logarithm in ZZn, which is much harder than solving the discrete logarithm in IFp, and then this method improves that presented in [3]. 3.2. ElGamal public key encryption. We now explain our improvement version of the public key system. It is based on ElGamal system, which is defined by third order linear sequences. Suppose Bob is the owner public data (p, q, a). Bob selects a small integer e such that gcd(e, (p2−1)(q2−1)) = 1 and a secret integer 0 < x ≤n. He computes dthe inverse of emodulo (p2−1)(q2−1), y=sx(a) and made public (e, y) as his public key. Given the Bob public data (n, a, e, y), Alice can encrypt a message m, where 0≤m < n, intended for Bob using the following version of the ElGamal encryption scheme as follows: Algorithm. (1) Public key: (n, a, y, e) (2) Private key: (p, q, d, x). (3) Encryption: For a message 0 ≤m < n, Alice chooses a (secret) random number 0 < k < n, and she sends Bob the ciphertext c= (c1, c2), where c1=sk(a) and c2=K+se(m), where K=sk(y).
6 L. EL FADIL (4) Decryption: For a ciphertext c= (c1, c2), Bob computes K=sx(c1), and then m=sd(c2−K), where (p, q, d, x) is its private key. Note that. (1) All computational are in ZZn. (2) sx(c1) = sx(sk(a)) = sxk(a) = sk(sx(a)) = sk(y) = Kand c2−K=se(m). (3) Since ed = 1 modulo (p2−1)(q2−1), there exists an integer lsuch that ed = 1 + l(p2−1)(q2−1). As (p2−1)(q2−1) is a period of s(m), sd(c2−K) = sd(se(m)) = sed(m) = s1+l(p2−1)(q2−1)(m) = s1(m) = m. Security analysis. Because the properties of third order linear sequences mirror those of exponentiation, public key and private key processes can be developed in an exactly analogous manner to the RSA system. This enables us to prove that any successful attack on this system would give a successful attack on the RSA and ElGamal systems [3]. Thus the security of the method relies on the difficulty of factoring an RSA integer and on the difficulty of solving the discrete logarithm in ZZn. Computational Cost. As in the standard RSA public key system, Bob chooses a small integer eand Alice chooses a relatively small integer ksuch that the computational cost for evaluating sk(a) and se(m) are low. For example e= 5, we need 3 multiplications modulo nfor computing s3(m), in average log2(k) multiplications modulo nfor computing sk(a). Totally, 4+log2(k) multiplications modulo nfor enciphering. For deciphering, once dand yare computed, we need log2(x) multiplications modulo nfor computing K=sx(c1), and log2(d) multiplications modulo nfor computing sd(c2−K). As d<n2, we need, 3log2(n) multiplications modulo n for deciphering. Totally, we need 4log2(n) on average. Acknowledgments I would like to thanks the “Centre de Recerca Matemtica” of Barcelona for their extraordinary hospitality and facilities for doing this work. As well as the professor E. Nart for his valuable comments and suggestions. References [1] W. Diffie and M. E. Hellman, New directions in cryptography, IEEE Trans. Inform. Theory, vol. IT-22, pp. 644–654, Nov. 1976. [2] T. El Gamal, “A public key cryptosystem and a signature scheme based on discrete logarithms”, IEEE Trans. Inform. Theory, vol. IT- 31, pp. 469–472, July 1985. [3] P. Smith et M. J. J. Lennon, LUC: “A new public key system”. In Proc. of the Ninth IFIP Int. Symp. on Computer Security, pp. 103–117, 1993. [4] D. H. Lehmer, “An extended theory of lucas functions”, Annals of Maths, 31 (1930), pp. 419–448. [5] G. Gong et L. Harn, “Public-Key Cryptosystems Based on Cubic Finite Field Extensions”. In IEEE Trans. Inform. Theory, vol. 45, pp. 2601–2605, 1999.
A PUBLIC KEY ENCRYPTION BASED ON THIRD ORDER LINEAR SEQUENCES 7 [6] Chi-Sung Laih, Fu-Kuan Tu, Wen-Chun Tai, “On the security of the Lucas function”, Information Processing Letters 53(1995), pp. 243–247. [7] Douglas R. Stinson, “Cryptography Theory and Practice”, Third edition 2006, Chapman, Hall/CRC, Taylor and Francis Group. Polydisciplinary Faculty of Ouarzazate Ouarzazate-Morocco E-mail address:[email protected]