METHOD AND DEVICE FOR CRYPTOGRAPHIC KEY GENERATION

Information

  • Patent Application
  • 20170163420
  • Publication Number
    20170163420
  • Date Filed
    July 10, 2015
    9 years ago
  • Date Published
    June 08, 2017
    7 years ago
Abstract
A method and a device for generation of a cryptographic key pair for use in a (generalized) Goldwasser-Micali cryptosystem. The device generates a first prime p≡1 (mod 2k), where k≧1 is an integer, and a second prime q≡3 (mod 4) or q≡1 (mod 4); computes a modulus N=pq; picks an integer y∈N\N, where N is a set of integers whose Jacobi symbol is 1 and N is a set of quadratic residues; and outputs a public key pk={N,y,k} and a private key sk={p,k}.
Description
TECHNICAL FIELD

The present disclosure relates generally to cryptography, and in particular to a cryptosystem based on the Goldwasser-Micali cryptosystem.


BACKGROUND

This section is intended to introduce the reader to various aspects of art, which may be related to various aspects of the present disclosure that are described and/or claimed below. This discussion is believed to be helpful in providing the reader with background information to facilitate a better understanding of the various aspects of the present disclosure. Accordingly, it should be understood that these statements are to be read in this light, and not as admissions of prior art.


The Goldwasser-Micali (GM) cryptosystem is a well-known public key cryptosystem that encrypts one bit of the plaintext at a time; put another way, the message space is {0,1}k, with k=1.


At EUROCRYPT 2013, Joye and Libert presented a generalized GM cryptosystem in which k bits are encrypted at a time, i.e. the message space is {0,1}k, with k≧1 [see Marc Joye and Benoit Libert. Efficient cryptosystems from 2k-th power residue symbols. In T. Johansson and P. Nguyen, editors, Advances in Cryptology—EUROCRYPT 2013, volume 7881 of Lecture Notes in Computer Science, pages 76-92. Springer, 2013.]. As in GM, the generalized scheme uses a composite N=pq where p and q are prime, and p,q≡1 (mod 2k). In addition, y∈custom-characterN\custom-characterN and the public key is pk={N,y,k} while the private key is sk={p,k}.


Given a plaintext message m=Σi=0k−12i with mi∈{0,1}, the corresponding ciphertext c is formed as c=ymx2k mod N for some random element x∈custom-characterN*. Plaintext message m is then recovered from the ciphertext c as the unique integer in [0,2k [satisfying the relation











[


(

y
p

)


2
k


]

m





(

c
p

)


2
k





(

mods





p

)

.






(
1
)







where







(

y
p

)


2
k





denotes the 2k-th power residue symbol of y modulo p, defined as








(

y
p

)


2
k


=

y


p
-
1


2
k







mods p. (It is noted that a mods p represents the absolute smallest residue of a modulo p, namely, the complete set of absolute smallest residues are: −(p−1)/2, . . . , −1, 0, 1, . . . , (p−1)/2). Doing so 2nd power residue symbol (i.e., when k=1) boils down to the classical Legendre symbol.) Solving Eq. (1) can be carried out with a variation of the Poligh-Hellman algorithm; see section 3.2 of the previously mentioned article.


The generalized GM cryptosystem as described in the previously mentioned article meets the standard security notion of semantic security under the quadratic residuosity assumption and the squared Jacobi symbol assumption [see the article with the same name by the same authors published in the Cryptology ePrint Archive as Report 2013/435].


In order to facilitate comprehension, the following notation is introduced. As already mentioned, let N=pq be the product of two (odd) primes p and q. The set of integers whose Jacobi symbol is 1 is denoted by custom-characterN,








N

=

{



a


N
*


|

(

a
N

)


=
1

}


;




the set of quadratic residues is denoted by custom-characterN,








N

=

{



a


N
*


|

(

a
p

)


=


(

a
q

)

=
1


}


;




and the set of integers whose Jacobi symbol is −1 is denoted by custom-characterN,







N

=


{



a


N
*


|

(

a
N

)


=

-
1


}

.





It is to be noted that custom-characterN is a subset of custom-characterN.


Definition 1 (Quadratic Residuosity Assumption).


Let RSAGen be a probabilistic algorithm that, given a security parameter κ, outputs primes p and q such that p, g≡1 (mod 2k), and their product N=pq. The Quadratic Residuosity (k−QR) assumption asserts that the function AdvDk−QR(1k), defined as the distance








Pr


[





(

x
,
N

)


=



1




x



R



N


]


-


Pr
[





(

x
,
N

)


=
1




x





R




N


\






N




]







is negligible for any probabilistic polynomial-time distinguisher custom-character; the probabilities are taken over the experiment of running (N,p,q)←RSAGen(1κ) and choosing at random x∈custom-characterN and x∈custom-characterN\custom-characterN.


Definition 2 (Squared Jacobi Symbol Assumption).


Let RSAGen be a probabilistic algorithm that, given a security parameter κ, outputs primes p and g such that p, q≡1 (mod 2k), and their product N=pq. The Squared Jacobi Symbol (k−SJS) assumption asserts that the function AdvDk−SJS(1κ), defined as the distance








Pr


[





(



y
2


mod





N

,
N

)


=



1




y



R



N


]


-


Pr
[





(



y
2


mod





N

,
N

)


=
1




y





R



N



]







is negligible for any probabilistic polynomial-time distinguisher custom-character; the probabilities are taken over the experiment of running (N,p,q)←RSAGen (1κ) and choosing at random y∈custom-characterN and custom-characterN.


The case k=1 corresponds to the GM cryptosystem which has indistinguishable encryptions (semantic security) solely under the standard Quadratic Residuosity assumption.


It is also noted that the generalized GM requires a special prime generation algorithms for the generation of p and q during key generation.


It will therefore be appreciated that it is desirable to provide a generalized GM cryptosystem whose semantic security solely relies on a quadratic residuosity assumption and in which the key generation is simplified.


The present disclosure provides such a generalized GM cryptosystem.


SUMMARY

In a first aspect, the disclosure is directed to a method for generation of a cryptographic key. A device generates a first prime p≡1 (mod 2k), where k≧1 is an integer; generates a second prime q≡3 (mod 4) or q≡1 (mod 4), q≢1 (mod 2k); computes a modulus N that is a multiple of the product between the first prime p and the second prime q; picks an integer y∈custom-characterN\custom-characterN, where custom-characterN is the set of integers whose Jacobi symbol is 1 and custom-characterN is the set of quadratic residues; and outputs a public key pk={N,y,k}.


In a first embodiment, the device generates a private key sk={p,k}. It is advantageous that the device stores the private key sk.


In a second embodiment, the public key pk is for use in a cryptosystem in which a message m∈custom-character, where custom-character={0,1}k, is encrypted by picking a random x∈custom-characterN* and calculating a ciphertext c=ymx2k mod N.


In a second aspect, the invention is directed to a cryptographic device comprising a processing unit configured to: generate a first prime p≡1 (mod 2k), where k≧1 is an integer; generate a second prime q≡3 (mod 4) or q≡1 (mod 4), q≢1 (mod 2k); compute a modulus N that is a multiple of the product between the first prime p and the second prime q; pick an integer y∈custom-characterN\custom-characterN, where custom-characterN is the set of integers whose Jacobi symbol is 1 and custom-characterN is the set of quadratic residues; and output a public key pk={N,y,k}.


In a first embodiment, the processing unit is further configured to generate a private key sk={p,k}. It is advantageous that the processing unit is configured to store the private key sk, preferably in a memory or in the processing unit.


In a second embodiment, the processing unit is configured to output the public key via a communication interface. It is advantageous that the processing unit is configured to use a communication protocol to output the public key via the communication interface.


In a third embodiment, the cryptographic device belongs to one of the group of: a mobile device, a communication device, a game device, a set top box, a TV set, a tablet, a laptop and a cryptographic chip.


In a fourth embodiment, the public key pk is for use in a cryptosystem in which a message m∈custom-character, where custom-character={0,1}k, is encrypted by picking a random x∈custom-characterN* and calculating a ciphertext c=ymx2k mod N.


In a third aspect, the disclosure is directed to a computer program product storing instructions that, when executed by a processor, perform the method of the first aspect.





BRIEF DESCRIPTION OF DRAWINGS

Preferred features of the present disclosure will now be described, by way of non-limiting example, with reference to the accompanying drawings, in which:



FIG. 1 illustrates a first preferred embodiment; and



FIG. 2 illustrates a second preferred embodiment.





DESCRIPTION OF EMBODIMENTS

It will be shown that, quite surprisingly, a small modification to the key generation procedure of the generalized GM cryptosystem enables its semantic security to rely solely on a quadratic residuosity assumption.


As already mentioned, the generalized GM cryptosystem defines primes p and q such that p,q≡1 (mod 2k). It is however observed that the decryption process only involves prime p.


This observation makes it possible to develop a new proof technique that allows to prove the semantic security when q≡3 (mod 4). Remarkably, the new security proof (presented hereafter for completeness) solely assumes the quadratic residuosity assumption for RSA moduli N=pq where p≡1 (mod 2k) and q≡3 (mod 4).


Furthermore, a close inspection of the security proof offered in the article published in the Cryptology ePrint Archive shows that the very same proof carries on when q≡1 (mod 4). The proof crucially requires that the square roots of a square in custom-characterN* all have the same Jacobi symbol. This is readily satisfied when −1∈custom-characterN, or equivalently when p,q≡1 (mod 4).


Security Analysis (q≡3 (Mod 4))


Let N=pq be the product of two primes p and q with p≡1 (mod 2k) for some k≧1. Let







N

=

{


x
|

(

x
N

)


=
1

}





and custom-characterN={x2|x∈custom-characterN*}. For 0≦i≦k, consider the subsets Di of custom-characterN given by Di={y2i mod N|y∈custom-characterN\custom-characterN} and define the subgroup of 2k-th residues Rk={y2k mod N|y∈custom-characterN*}.


Lemma 1.

Let N=pq be the product of two large primes p and q where p≡1 (mod 2k) for some k≧1 and q≡3 (mod 4). Then, for any w∈custom-characterN, letting W:=w2i−1 for a given 1≦i≦k, gives W∈Rk∪Uj=1k−1Dj.


Further, if w is uniform over custom-characterN, then W is uniform over Dj with probability






1

2

j
-
i
+
1






for i≦j≦k−1 and W is uniform over Rk with probability







1

2

k
-
i



.




Proof.

It is assumed that w is uniform over custom-characterN.


The case i=k (which includes the case k=1) yields W=w2k−1 with w∈custom-characterN. It is then readily verified that W is uniform over Rk with probability 1.


It is henceforth supposed that i≦k−1 and k≧2. In particular, this implies p≡1 (mod 4) and thus







(


-
1

p

)

=
1.




Denoting by (ŵp, ŵq) the CRT representation of a square root ŵ of w (i.e., ŵp=ŵ mod p and ŵq=w mod q), the four square roots of w modulo N are given by (±ŵp,±ŵq). Since








(




-
1





q



)

=

-
1


,




it can be assumed without loss of generality that








(



w
^

q

q

)

=

(



w
^

p

p

)


,




or equivalently that ŵ∈custom-characterN. If ŵ∈custom-characterN the process can be re-iterated, and so on. More generally, t is defined as the largest integer in {1, . . . , k−i} such that w=ŵ2t for some ŵ∈custom-characterN. It is then possible to write W=ŵ2t+i−1 for some ŵ∈custom-characterN. It is worth noting that since t is the largest integer in the set {1, . . . , k−i}, ŵ∈custom-characterN only when t=k−i. Defining j=t+i−1 (observe that i≦j≦k−1), gives W=ŵ2j∈Dj if ŵ∉custom-characterN (i.e., ŵ∈custom-characterN\custom-characterN) and W=ŵ2k−1∈Rk if ŵ∈custom-characterN. The probability that W∈Dj (for i≦j≦k−1) is Pr [w=ŵ2t and









w
^



N


]

=


1

2
t


=

1

2

j
-
i
+
1








and the probability that W∈Rk is







Pr


[

W





j
=
i


k
-

1








D
j



]


=


1
-




j
=
i


k
-
1




1

2

j
-
i
+
1





=


1

2

k
-
i



.






Theorem 1.

For RSA moduli N=pq such that p≡1 (mod 2k) and q≡3 (mod 4), the Gap 2k-Residuosity assumption (defined in the previously mentioned paper published at EUROCRYPT) holds if the k QR assumption (see Definition 1) holds. More precisely, for any Probabilistic Polynolial Time (PPT) distinguisher custom-character against the latter, there exists a k−QR distinguisher custom-character with comparable running time and for which








Adv


Gap
-

2
k

-
Res




(

1
K

)






k
+
1

2

·



Adv


k
-
QR




(

1
K

)


.






[Here the k−QR assumption is defined for RSA moduli N=pq such that p≡1 (mod 2k) and q≡3 (mod 4).]


Proof.

Let custom-character be an adversary against Gap−2k−Res running in time t. Write:








ε

i






=

Pr


[





(

x
,
N

)


=

1


x



R



D
i




]



,




for i∈{0, . . . , k−1} and







ε
k

=


Pr


[





(

x
,
N

)


=

1


x



R



R
k




]


.





The advantage of custom-character against Gap−2k−Res is:






custom-character(1κ)=|ε0−εk|.


First k distinguishers custom-character1, . . . , custom-characterk against k−QR are constructed as follows. custom-characteri takes as input an RSA modulus N=pq, with p≡1 (mod 2k) and q≡3 (mod 4), and an element w∈custom-characterN. Its task is to decide whether w is uniform over custom-characterN\custom-characterN or uniform over custom-characterN. To this ends, custom-characteri chooses a random element zcustom-charactercustom-characterN* . It then defines x=z2iw2i−1 mod N and feeds custom-character with (x,N).

    • If w is uniform over custom-characterN\custom-characterN, x is clearly uniform over Di−1. Therefore, in that case, custom-character outputs 1 with probability εi−1.
    • If w is uniform over custom-characterN, custom-character outputs 1 with probability










j
=
i

k




1

2

j
-
i
+
1





ε
j



+


1

2

k
-
i





ε
k








    •  according to Lemma 1.


      Therefore, the (signed) advantage of custom-characteri in solving k−QR is










a
i

=



ε

i
-
1


-

(





j
=
i

k




1

2

j
-
i
+
1





ε
j



+


1

2

k
-
i





ε
k



)


=


ε

i
-
1


-




j
=
8

k




2

i
-
1




β
j



ε
j









with







β
j

=

1

2
j






for j∈{1, . . . , k−1} and







β
k

=


1

2

k
-
1



.





The following probability distribution custom-character over {1, . . . ,k} is considered:








Pr

X



R







(

X
=
i

)


=


p
i

=

{





2

k
+
1






if





i

=
1






1

k
+
1






if





i


2




.







An adversary B against k QR is defined as follows: B chooses a random icustom-charactercustom-character and feeds custom-characteri with its k−QR challenge. The advantage of custom-character is:











Adv


k
-
QR




(

1
K

)


=








i
=
1

k




p
i



a
i











=









i
=
1

k




p
i



ε

i
-
1




-




i
=
1

k




p
i






j
=
i

k




2

i
-
1




β
j



ε
j














=









j
=
0


k
-
1





p

j
+
1




ε
j



-




j
=
1

k






i
=
1

j




2

i
-
1




p
i



β
j



ε
j













=








p
1



ε
0


+




j
=
1


k
-
1





(


p

j
+
1


-




i
=
1

j




2

i
-
1




p
i



β
j




)



ε
j



-




i
=
1

k




2

i
-
1




p
i



β
k



ε
k






.








For j∈{1, . . . , k−1},







β
j

=

1

2
j






and:













i
=
1

j




2

i
-
1




p
i



β
j



=







i
=
1

j




2

i
-
j
-
1




p
i



=



2

-
j




p
1


+




i
=
2

j




2

i
-
j
-
1




p
j











=





2

1
-
j




1

k
+
1




(

1
+




i
=
2

j



2

i
-
2




)


=


2

1
-
j




1

k
+
1




2

j
-
1










=




1

k
+
1


=


p

j
+
1


.









In addition:













i
=
1

k




2

i
-
1




p
i



β
k



=







i
=
1

k




2

i
-
k




p
i



=


1

k
+
1




(


2

2
-
k


+




i
=
2

k



2

i
-
k




)









=




2

2
-
k




1

k
+
1




(

1
+




i
=
2

k



2

i
-
2




)








=




2

k
+
1


.








Therefore, the advantage of custom-character is









Adv


k
-
QR




(

1
K

)


=






2

k
+
1




ε
0


+
0
-


2

k
+
1




ε
k





=


2

k
+
1





Adv


Gap
-

2
k

-
Res




(

1
K

)





,




which concludes the proof.



FIG. 1 illustrates a first embodiment in which q≡3 (mod 4).



FIG. 1 shows a cryptographic device 110 comprising an interface 111 configured for communication with other devices (not shown), at least one hardware processing unit (“CPU”) 112 and memory 113. The cryptographic device also comprises other necessary hardware and software components such as internal connections, but these are not shown to simplify the illustration. Also shown is a non-transitory computer program storage medium 114 that stores instruction that, when executed by a processing unit, perform the key generation method KeyGen of the first embodiment.


In more detail, the proposed encryption scheme of the preferred embodiment is the tuple (KeyGen, Encrypt, Decrypt) defined as follows:

  • KeyGen(1κ) Given a security parameter κ, KeyGen defines an integer k≧1, randomly generates primes p≡1 (mod 2k), step S10, and q≡3 (mod 4), step S11, and sets, step S12, N=pq. It also picks, step S13, y∈custom-characterN\custom-characterN. The public key pk={N,y,k} and the private key sk={p,k} are output, step S14.
  • Encrypt(pk,m) Let custom-character={0,1}k. To encrypt a message m∈custom-character (seen as an integer in {0, . . . , 2k−1}), Encrypt picks a random x∈custom-characterN* and returns the ciphertext c=ymx2k mod N.
  • Decrypt(sk,c) Given c∈custom-characterN* and the private key sk={p,k}, the algorithm first computes






z
=


(

c
p

)


2
k






  •  and then finds m∈{0, . . . , 2k−1} such that the relation









[


(

y
p

)


2
k


]

m

=

z






(

mods

p

)






  •  holds.




FIG. 2 illustrates a second embodiment in which q≡1 (mod 4). It is noted that the case where k=2 corresponds to the prior art Generalized GM.



FIG. 2 shows a cryptographic device 120 comprising an interface 121 configured for communication with other devices (not shown), at least one hardware processing unit (“CPU”) 122 and memory 123. The cryptographic device also comprises other necessary hardware and software components such as internal connections, but these are not shown to simplify the illustration. Also shown is a non-transitory computer program storage medium 124 that stores instruction that, when executed by a processing unit, perform the key generation method KeyGen of the first embodiment.


In more detail, the proposed encryption scheme of the second preferred embodiment is the tuple (KeyGen, Encrypt, Decrypt) defined as follows:

  • KeyGen(1κ) Given a security parameter κ, KeyGen defines an integer k≧1, randomly generates primes p≡1 (mod 2k), step S20, and q≡1 (mod 4), step S21, and sets N=pq; step S22. It also picks y∈custom-characterN\custom-characterN, step S23. The public key pk={N,y,k} and the private key sk={p,k} are output, step S24.
  • Encrypt(pk,m) Let custom-character={0,1}k. To encrypt a message m∈custom-character (seen as an integer in {0, . . . , 2k−1}), Encrypt picks a random x∈custom-character*N and returns the ciphertext c=ymx2k mod N.
  • Decrypt(sk,c) Given c∈custom-character*N and the private key sk={p,k}, the algorithm first computes






z
=


(

c
p

)


2
k






  •  and then finds m∈{0, . . . , 2k−1} such that the relation









[


(

y
p

)


2
k


]

m

=

z






(

mods

p

)






  •  holds.



It is noted that q≡1 (mod 2k) also means that q≡1 (mod 4), but the present method can make it easier to generate q since there are more possibilities. A variant excludes q≡1 (mod 2k).


In a variant, the modulus N is equal to a integer multiple of the product of the primes p, q.


According to specific embodiments, the interface 111, 121 is can be a wireline interface (for example a bus interface such as USB (Universal Serial Bus)) or a wireless interface (such as a IEEE 802.11 interface, WiFi® or a Bluetooth® interface); the interface can be a wide area network interface, a local area network interface or a HDMI (High Definition Multimedia Interface) interface.


According to different embodiments, the cryptographic device 110, 120 uses a communication protocol such as HTTP, IP, or FLUTE to transmit the public key.


According to different embodiments, the cryptographic device 110, 120 stores the private key in a memory, such as a random access memory (RAM) or in the processing unit 112, 122.


According to different embodiments, the cryptographic device 110, 120 belongs to a set comprising:

    • a mobile device;
    • a communication device;
    • a game device;
    • a set top box;
    • a TV set;
    • a tablet (or tablet computer);
    • a laptop; and
    • a cryptographic chip.


A advantage of the first preferred embodiment, i.e., when q≡3 (mod 4)) is security. The notion of semantic security is already met under a quadratic residuosity assumption. In particular, the squared Jacobi symbol assumption is not necessary.


A second advantage of the first preferred embodiment (and also the second, i.e., when q≡1 (mod 4)) is a simplified key generation process. Only prime p requires a specialized prime generation algorithm as the one described by Joye and Paillier [see Marc Joye and Pascal Paillier. Fast generation of prime numbers on portable devices: An update. In L. Goubin and M. Matsui, editors, Cryptographic Hardware and Embedded Systems—CHES 2006, volume 4249 of Lecture Notes in Computer Science, pages 160-173. Springer, 2006]. It is noted that a random (form-free) prime p is congruent to 3 (mod 4) with a probability of ½ (it is congruent to 1 (mod 4) otherwise). Form-free primes are much easier to generate than other primes.


Each feature disclosed in the description and (where appropriate) the claims and drawings may be provided independently or in any appropriate combination. Features described as being implemented in hardware may also be implemented in software, and vice versa. Reference numerals appearing in the claims are by way of illustration only and shall have no limiting effect on the scope of the claims.

Claims
  • 1. A method for generation of a cryptographic key comprising, in a device: generating a first prime p≡1 (mod 2k), where k≧1 is an integer;generating a second prime q≡3 (mod 4) or q≡1 (mod 4), q≡1 (mod 2k);computing a modulus N that is a multiple of the product between the first prime p and the second prime q;picking an integer y∈N\N, where N is the set of integers whose Jacobi symbol is 1 and N is the set of quadratic residues; andoutputting a public key pk={N,y,k}.
  • 2. The method of claim 1, further comprising generating a private key sk={p,k}.
  • 3. The method of claim 2, further comprising storing the private key sk.
  • 4. The method of claim 1, wherein the public key pk is for use in a cryptosystem in which a message m∈, where ={0,1}k, is encrypted by picking a random x∈N* and calculating a ciphertext c=ymx2k mod N.
  • 5. A cryptographic device comprising at least one processing unit configured to: generate a first prime p≡1 (mod 2k), where k≧1 is an integer;generate a second prime q≡3 (mod 4) or q≡1 (mod 4), q≡1 (mod 2k);compute a modulus N that is a multiple of the product between the first prime p and the second prime q;pick an integer y∈N\N, where N is the set of integers whose Jacobi symbol is 1 and N is the set of quadratic residues; andoutput a public key pk={N,y,k}.
  • 6. The cryptographic device of claim 5, wherein the at least one processing unit is further configured to generate a private key sk={p,k}.
  • 7. The cryptographic device of claim 6, wherein the at least one processing unit is configured to store the private key sk.
  • 8. The cryptographic device of claim 7, wherein the at least one processing unit is configured to store the private key sk in a memory or in the at least one processing unit.
  • 9. The cryptographic device of claim 5, wherein the at least one processing unit is configured to output the public key via a communication interface.
  • 10. The cryptographic device of claim 9, wherein the at least one processing unit is configured to use a communication protocol to output the public key via the communication interface.
  • 11. The cryptographic device of claim 5, wherein the cryptographic device belongs to one of the group of: a mobile device, a communication device, a game device, a set top box, a TV set, a tablet, a laptop and a cryptographic chip.
  • 12. The cryptographic device of claim 5, wherein the public key pk is for use in a cryptosystem in which a message m∈, where ={0,1}k, is encrypted by picking a random x∈N* and calculating a ciphertext c=ymx2k mod N.
  • 13. A non-transitory computer program product storing instructions that, when executed by a at least one processor, perform the method of claim 1.
Priority Claims (1)
Number Date Country Kind
14306135.6 Jul 2014 EP regional
PCT Information
Filing Document Filing Date Country Kind
PCT/EP2015/065807 7/10/2015 WO 00