An Online/Offline Signature Scheme Based on the Strong RSA Assumption

Ping Yu Stephen R. Tate [email protected] [email protected] Department of Computer Science and Engineering University of North Texas Denton, TX 76203

Abstract dom message, and asks the server to produce a digital sig- nature on this message using the server’s private . Then We propose an efficient scheme, which the client can authenticate the server using the server’s pub- is proved secure under the strong RSA assumption, and lic key to check if the signature is valid on its random chal- can operate in an online/offline manner, doing most of its lenge message. On a stock broker’s server there would be a work in the offline precomputation phase. The online phase, steady stream of requests during the trading day, but there which is performed after the message to be signed is known, might be times — such as immediately after financial up- is very efficient, requiring only a single modular multiplica- dates or news releases — when the number of requests is tion. Online/offline signatures are useful in settings in which extraordinarily high. And after hours there is significantly signatures need to be produced quickly either when there is less traffic. Since cryptographic computation normally is a large volume of requests or if the device performing the time consuming, with a high volume of simultaneous au- signature is not computationally powerful (such as a mobile thentication requests the server could be overwhelmed, and device). Our scheme can be seen as an online/offline exten- not be able to produce signatures in an acceptable amount sion of the traditional signature scheme of Gennaro, Halevi, of time. and Rabin (the GHR signature scheme) which did not oper- Consider also a different scenario in which a mobile de- ate in this two-phase manner, and required significant com- vice with limited computing capability needs to authenti- putation after the message was known. In contrast to an- cate itself before accessing certain network resources. A other online/offline extension of the GHR scheme, our new remote server may challenge a device with a random mes- scheme avoids the use of trapdoor hash/commitment prim- sage, asking the device to produce a signature for its mes- itives, allowing the use of a traditional hash function, im- sage. Since a mobile device has limited computing capa- proving the efficiency of the offline phase of the algorithm. bility, it might have some difficulty generating the required signature quickly. In the above two scenarios, it is highly desirable that Keywords: Digital Signature, Strong RSA Assumption, a mechanism should be deployed to expedite the authen- , Online/Offline Signing, Suitable Hash tication process. Such a mechanism does exist for digital Function. signature schemes, and is known as online/offline signing. In online/offline signing, a majority of the computation re- lated to signature generation can be completed even before 1. Introduction a message appears. Therefore, most computation can be done offline during idle time. When a message comes, only Consider a typical scenario in a distributed system: A a very simple calculation is needed to complete signature server experiences “bursty” traffic so that at times it needs generation. This mechanism is very attractive for the above to authenticate itself simultaneously to a large number scenarios. We will present such an online/offline digital sig- of client applications running on remote client machines, nature scheme in this paper. while at other times there are many idle CPU cycles. For example, this server could be a stock broker’s server and 1.1. Background the client wants to confirm that the remote server is not a spoofed server. The standard way of achieving this goal is The digital signature concept is a fundamental crypto- with a digital signature scheme: the client generates a ran- graphic primitive in modern . In such schemes,

21st International Conference on Advanced Information Networking and Applications Workshops (AINAW'07) 0-7695-2847-3/07 $20.00 © 2007

Authorized licensed use limited to: Edinburgh Napier University. Downloaded on October 31,2020 at 17:52:10 UTC from IEEE Xplore. Restrictions apply. a user prepares a keypair which includes a signing key and generic method to convert any signature scheme into an a verification key. The signing key is kept secret by the user online/offline one. In fact, many signature schemes based while the verification key is public for potential verifiers. on the assumption naturally have on- The user generates a string by signing a message using his line/offline versions without any further effort, while signa- signing key. This string is called the user’s signature on this ture schemes based on the strong RSA assumption generally particular message. Later a verifier can check the validity of do not have such characteristic. However, the method pro- a signature on a message using the user’s verification key. posed by Even et al. is not efficient and practical. In 2001, The idea of digital signatures was first proposed by Diffie Shamir and Tauman proposed another generic method to and Hellman [5]. Since then, numerous constructions have achieve online/offline signing [13]. Their method is based been proposed in the literature based on different secu- on a new type of hash function called a trapdoor hash func- rity assumptions. Many schemes are based on the well- tion, which is proposed by Krawczyk and Rabin [10], and known RSA assumption and a variant known as the strong allows the use of a “hash-sign-switch” paradigm. This con- RSA assumption, including PSS [1] and the Cramer-Shoup struction was further improved by Kurosawa and Schmidt- scheme [4]. Other schemes are based on variants of the dis- Samoa who weakened the requirements needed for the crete logarithm or computational/decisional Diffie-Hellman cryptographic primitives in the generic online/offline con- assumption, including Schnorr signatures [12], ElGamal struction [11]. signatures [6], and many others. As a fundamental , it is impor- 1.2. Our Results tant to clarify the exact requirements for a secure digital signature scheme. In 1988, Goldwasser et al. defined a We present a signature scheme that can be viewed as security notion for signature schemes which is called ex- an online/offline extension of the GHR scheme. As a di- istential unforgeability under adaptive chosen message at- rect online/offline design, we maintain the nice feature from tacks [9]. Since then, this notion has been widely used to GHR that standard efficient hash functions are likely to give judge whether a digital signature scheme is strong enough the necessary security. This is in contrast to generic con- to be deployed in a real application. Many digital signature structions such as that of Shamir and Tauman [13] or Kuro- schemes have been proved secure under this requirement sawa and Schmidt-Samoa [11] that require trapdoor hash in the random oracle model (e.g., Schnorr, ElGamal, PSS). or trapdoor commitment primitives, which complicate the The random oracle model abstracts a cryptographic hash scheme by introducing additional sets of keys and requiring function as a random function. Canetti et al. constructed additional complex operations (similar to public key cryp- a scheme that can be proved secure in the random oracle tographic operations) for setting up the hash function in the model, while any real implementation will result in an in- offline phase. As a consequence, our system is easier to secure construction [3]. Therefore, security proofs in the manage (with fewer keys) and is more efficient in the of- random oracle model do not necessarily imply security in fline phase. the standard model, so a proof of security in the random or- Our scheme does have two disadvantages, however. acle model can only be treated as a heuristic argument that First, while the offline phase is more efficient, the online a scheme is secure. phase is slightly slower than the Kurosawa/Schmidt-Samoa In 1999, Gennaro, Halevi and Rabin proposed a practical extension, requiring a full modular multiplication as op- digital signature scheme in the “hash-and-sign” paradigm posed to a shift and a modular reduction. Even so, our that they proved secure under adaptive chosen message at- online phase is still very efficient (a single modular mul- tacks without requiring random oracles [8]. In this paper, tiplication), so we feel this is not a serious issue. Second, we refer to their scheme as the GHR scheme. The GHR our signature scheme can fail, meaning it produces a sig- scheme requires a hash function that meets certain require- nature that will not be verified. While this is serious, we ments, but these requirements are much more realistic than prove that this failure happens only with negligible proba- assuming a random oracle. While meeting these require- bility. Many existing systems have the property that security ments in a provable way leads to some complex construc- is weak with negligible probability (for example, finding a tions, it is quite reasonable to think that widely-used effi- prime factor of an RSA modulus by chance), but are used cient hash functions (like SHA-1 or SHA-256) satisfy the and relied upon anyway, and we feel such reasoning ap- necessary requirements. While formally proving this is be- plies to our new scheme as well. We also provide a strong yond current cryptographic understanding, the use of these way to avoid this: when sufficient CPU cycles are avail- standard hash functions in GHR gives a very efficient algo- able, a validity test can be performed by the signer which rithm. will allow her to always produce a valid signature. While The notion of online/offline signatures was first intro- this extra step negates some of the efficient online phase duced by Even et al. in 1989 [7], and they proposed a improvements, in a bursty traffic situation as described ear-

21st International Conference on Advanced Information Networking and Applications Workshops (AINAW'07) 0-7695-2847-3/07 $20.00 © 2007

Authorized licensed use limited to: Edinburgh Napier University. Downloaded on October 31,2020 at 17:52:10 UTC from IEEE Xplore. Restrictions apply. lier it is possible to serve most requests with certainty, and • The strong RSA assumption holds in a model where those during high volume time with a negligible probability there exists an oracle that on input (h, M, e), returns of failure. a random R with h(R; M)=e. The rest of the paper is organized as follows. Section 2 Now we introduce the strongest notion of a secure signa- reviews some cryptographic notations and definitions. Our ture scheme, existential unforgeability under adaptive cho- online/offline signature scheme is introduced in Section 3, sen message attacks, which was proposed by Goldwasser, and its security properties in the random oracle model are Micali and Rivest [9]. The definition we give here is due to discussedinSection4.InSection5wediscusstheprop- Gennaro et al. [8]. erties needed in using a real hash function as opposed to a random oracle, and discuss the resulting security issues. Definition 4 (Secure Signatures [8]) A signature scheme Finally, we give the conclusions in Section 6. S = Gen, Sig, V er is existentially unforgeable under an adaptive chosen message attack if it is infeasible for a forger 2. Preliminaries who only knows the public key to produce a valid (message, signature) pair, even after obtaining polynomially many sig- natures on messages of its choice from the signer. This section reviews some notations and definitions Formally, for every probabilistic polynomial time forger which are used throughout the paper. algorithm F, there exists a negligible function negl() such that   Definition 1 (Special RSA Modulus) An RSA modulus k pk, sk←Gen(1 ); n = pq is called special if p =2p +1and q =2q +1    fori =1...n  where p and q also are prime numbers.    Mi ←F(pk, M1,σ1,...,Mi−1,σi−1);    ∗ Pr σi ← Sig(sk, Mi);  = negl(k). Definition 2 (Quadratic Residue Group QRn) Let Zn be    M,σ←F(pk, M1,σ1,...,Mn,σn),  the multiplicative group modulo n, which contains all pos-   M = Mi fori =1...n, and itive integers less than n and relatively prime to n.Anele- ∗ Ver(pk,M,σ)=accept. ment x ∈ Zn is called a quadratic residue if there exists an ∗ 2 a ∈ Zn such that a ≡ x mod n. The set of all quadratic ∗ ∗ 3. The Digital Signature Scheme residues of Zn forms a cyclic subgroup of Zn, which we de- note by QRn.Ifn is the product of two distinct primes, then 1 ∗ Table 1 shows our online/offline digital signature |QRn| = 4 |Zn|. scheme, which includes the system setup, sign algorithm A hash function is a function mapping arbitrary strings and verify algorithm. The system is parametrized by secu- of finite length to binary strings of fixed length. For crypto- rity parameter λ and a hash function length k,wherewe graphic purposes, we would like a hash function to satisfy require that k is polynomial in λ, and should be chosen so properties such as strong collision resistance and weak col- that the failure probability in Lemma 5 is acceptably small. lision resistance. Our scheme uses another property for a For example, a reasonable system would be produced with = 512 = 1024 hash function called “division intractability,” which was in- λ (so the modulus n is 1024 bits) and k . troduced by Gennaro et al. [8]. Informally, a hash function The online phase of the sign algorithm includes an op- is division intractable if it is infeasible to find distinct inputs tional test step — if time can be taken to perform this step, for this hash function such that the hash value of one input the sign algorithm will never fail, but at the cost of a mod- divides the product of hash values of all other inputs. This erately expensive GCD computation. On the other hand, as property is further extended by Gennaro et al. to the notion we show in Lemma 5, the probability of this test failing is of a suitable hash function H, which we outline below — negligible, so the test can be omitted if a negligible failure more detailed discussion of these concepts can be found in probability is acceptable. If the test is omitted, the online the GHR paper [8]. phase only requires a single modular multiplication. In a real application, it is desirable to have a pool of ( ) Definition 3 (Suitable Hash Function) A suitable hash si,Xi pairs available when needed. For instance, in the function has the following properties: first scenario in the introduction, the server might need a large pool to complete a large burst of authentication re- •His division intractable. quests, so b could be large (e.g., over 1000). On the other hand, for a mobile device, b can be set reasonable small — • The distributions h(R; M1), h(R; M2) induced by the a pool size of 5 or less should be enough for most situations. random choice of R, are statistically close, for every During idle time, the device produces new pairs to keep the h ∈Hand every two messages M1,M2. pool full.

21st International Conference on Advanced Information Networking and Applications Workshops (AINAW'07) 0-7695-2847-3/07 $20.00 © 2007

Authorized licensed use limited to: Edinburgh Napier University. Downloaded on October 31,2020 at 17:52:10 UTC from IEEE Xplore. Restrictions apply. System Setup — For security parameter λ and hash function length k (see text for requirements) 1. n:Picktwoλ-bit safe primes p and q (so that p =2p +1,andq =2q +1,wherep and q are also prime), and let n = pq.

2. g: Select g as a random generator of QRn. 3. H: Choose a division intractable hash function H : {0, 1}∗ →{0, 1}k. The public key is (n, g, H), and the private key is (p, q).

Sign Algorithm Offline Phase: For pool size b, Alice picks b random values si ∈R [0,pq ),fori =1, ···,b. For each si, Alice computes si Xi = g mod n.

Thus, Alice prepares a pool of size b (si,Xi) pairs in idle time.

Online Phase: For a message m, Alice computes H(m), then uses the next unused (si,Xi) pair to compute

r = si ×H(m)modp q . √ Optional test step: Test if GCD(H(m),r) ≤ 22 k — if so, the signature is ready; otherwise, Alice will continue by trying other (si,Xi) pairs.

The signature is (Xi,r).

Verify Algorithm √ For Alice’s signature (X, r) on message m, Bob verifies that GCD(H(m),r) ≤ 22 k,and XH(m) ≡ gr mod n.

Table 1. Our online/offline signature scheme

4. Security in the Random Oracle Model Lemma 1 Let n be a special RSA modulus. Given values x u, v ∈ QRn and x, y ∈ Z, GCD(x, y) 1 such that z ≡ u mod n given in the original Gennaro, Halevi, and Rabin paper [8]. can be computed efficiently. The security of our scheme relies on the following security assumption which is widely accepted in the cryptography Next, we introduce a lemma which addresses the literature. Due to the page limitation, the proofs for lemmas smoothness of a random integer. The proof for this lemma have been moved to the full version of this paper [14]. can be found as part of the proof of Lemma 6 in [8].

Assumption 1 (Strong RSA Assumption) Let n be an Lemma 2 Let√ e be a random k-bit integer. The probability 22 k RSA modulus. The Flexible RSA Problem is the problem of e being√ -smooth (all e’s prime√ factors are no larger ∗ 2 k −2 k of taking a random element u ∈ Zn and finding a pair than 2 ) is no larger than 2 . (v, e) such that e>1 and ve = u mod n.TheStrong RSA Assumption says that no probabilistic polynomial time The following lemma is used directly in the security algorithm can solve the flexible RSA problem with non- proof for our digital signature scheme — note that the con- negligible probability. dition on v is met for sufficiently large k whenever v is poly- nomial in k. First, we introduce a lemma due to Camenisch and ··· Lysyanskaya [2] which will be used for the proof of our Lemma 3 Let √e1,e2, ,ev be random k-bit integers, signature scheme. where v ≤ 20.5 k.Letj be a randomly chosen index from

21st International Conference on Advanced Information Networking and Applications Workshops (AINAW'07) 0-7695-2847-3/07 $20.00 © 2007

Authorized licensed use limited to: Edinburgh Napier University. Downloaded on October 31,2020 at 17:52:10 UTC from IEEE Xplore. Restrictions apply. [1 ] =( v ) ( ) ,v , and define E i=1√ei /ej.Ifrj is an integer message, or outputs m, x, r as a potential forgery. Let v ( ) ≤ 22 k be some polynomial upper bound on the number of queries such that GCD ej ,rj √ , then the probability that − k that F makes to the random oracle. ej divides Erj is less than 2 . We now show an efficient algorithm A,thatusesF as Our security proof uses the standard technique of simu- a subroutine, such that if F has probability  of forging a lating the signature oracle for a forgery algorithm. Unfor- signature, then A has probability  ≈ /v of solving the tunately, we cannot perfectly simulate the signature oracle, flexible RSA problem. because the distribution of the r values produced by the sign A is given a special RSA modulus n and a t ∈R QRn, algorithm depends on the unknown value pq.However,we and its goal is to find a pair (z,e) such that e>1 and e can simulate something very close to this distribution — in z ≡ t mod n. the main security theorem we use the following lemma to First, A prepares answers for the random oracle queries show that our “close” distribution is in fact close enough to that F will ask by picking v random k-bit integers establish the security of our signature scheme. e1, ···,ev and a random j ∈R [1,v]. A is betting on the Let PrD(x) denote the probability of x in distribution chance that F will use its j’th oracle query to generate the D. Then the distance between two distributions D1 and D2 forgery. is Next, A prepares answers for signature queries that F =( v ) 1 will ask. A computes E i=1 ei /ej.Ifej divides dist(D1,D2)= |PrD1 (x) − PrD2 (x)| , E,thenA outputs “failure” and halts. Otherwise, it sets 2 E x g = t mod n, and initializes the forger F ,givingitthe public key (n, g). dist(D1,D2) ≤ 1 and note that for any two distributions . A then runs the forger algorithm F , answering oracle Two distributions D1 and D2 are statistically indistinguish- queries with the help of a function SAMPLED() which gets able dist(D1,D2) if is negligible. a random sample from some distribution D, which we will Lemma 4 Let p and q be as defined in Table 1, so in par- describe at the end of the proof. Specifically, oracle queries ticular p and q are λ − 1 bit prime numbers. Consider the are answered as follows: following two distributions on pairs (r, e): • Random oracle queries for m1 ...mv are answered by • Distribution D1 is obtained by selecting e uniformly setting h(mi)=ei for each i ∈ [1,v]. from the set of k-bit integers, and r is computed as • = r = s × e mod pq,wheres is chosen uniformly from Signature oracle query for message mi,fori j,are {0 ··· − 1} answered with (mi,xi,ri) where ri = SAMPLED() the set , ,pq . Er /e and xi = t i i mod n. • Distribution D2 is obtained by selecting e uniformly from the set of k-bit integers, and r is uniformly se- If F queries the signature oracle for message mj, or halts n−1 ej {0 ··· − 1} with an output other than (mj,xj,rj ) for which x ≡ lected from the set , , 4 . √ j rj 2 k −λ+3 g mod n and GCD(ej,rj ) ≤ 2 ,thenA outputs dist(D1,D2) < 2 , so distributions D1 and D2 are “failure” and halts. Otherwise we have a valid forgery with statistically indistinguishable. e x j ≡ grj ≡ tErj mod n. Lemma 5 Let (e, r) be a pair drawn from D1,wherek ≥ 4 j ( ) is√ polynomial in λ. Then the probability that GCD e, r > 2 k k By Lemma 3, ej divides Erj with a negligi- 2 is at most √ + ν(k),whereν(k) is negligible in k. 22 k ble probability, and so with overwhelming probability GCD(ej,Erj )

21st International Conference on Advanced Information Networking and Applications Workshops (AINAW'07) 0-7695-2847-3/07 $20.00 © 2007

Authorized licensed use limited to: Edinburgh Napier University. Downloaded on October 31,2020 at 17:52:10 UTC from IEEE Xplore. Restrictions apply. with the probability that we correctly picked the correct j require random oracles or complex hash function construc- for the forgery query the overall success probability is /v. tions such as trapdoor hash functions, our scheme is secure However, we cannot sample from distribution D1 without under the less demanding requirement of a “suitable hash knowing the value pq, which is not available to us in A’s function” (as defined by Gennaro, Halevi, and Rabin [8]). simulation of the signature oracle. This both simplifies the overall system and makes the of- Instead, we use distribution D2 from Lemma 4, which fline phase more efficient, while the online phase is still very n−1 is just the uniform distribution on {0, ···, 4 − 1} and so efficient. can be efficiently sampled. The success probability of the forgery algorithm is only changed by a negligible amount, References since we showed in Lemma 4 that these two distributions are statistically indistinguishable (if the change in success [1] M. Bellare and P. Rogaway. The exact security of digital probability was more than a negligible amount, we could signatures - how to sign with and rabin. In Advances in use this very simulation as a distinguisher between D1 and Cryptology–Eurocypt’96, pages 399–416, 1996. D2). In other words, using D2 for our distribution D,the − [2] J. Camenisch and A. Lysyanskaya. A signature scheme with success probability of the forgery algorithm is at least  efficient protocols. In Third Conference on Security in Com- ( ) ( ) η λ ,whereη λ is some negligible function in λ. munication Networks (SCN), pages 268–289, 2002. A can also output “failure” if, in selecting the random or- [3] R. Canetti, O. Goldreich, and S. Halevi. The random oracle acle outputs e1, ···,ev,wehaveErj divisible by ej.How- model, revisited. In 30th Annual ACM Symposium on Theory ever, Lemma 3 established that this is another negligible of Computing, pages 209–218, 1998. probability, and so the overall probability of successfully [4] R. Cramer and V. Shoup. Signatures schemes based on the solving the flexible RSA problem is ≈ /v. strong rsa assumption. ACM Transaction on Information and System Security, 3(3):161–185, 2000. [5] W. Diffie and M. E. Hellman. New directions in cryptogra- 5. Replacing the Random Oracle phy. IEEE Transactions on Information Theory, 11:644–654, Nov. 1976. In this section, we briefly discuss using a real hash func- H [6] T. ElGamal. A public key and a signature tion instead of a random oracle. As in the GHR algo- scheme based on discrete logarithms. In Advances in Cryp- H rithm, we don’t need a completely random function for , tology — Crypto, pages 10–18, 1984. but can instead use a function which satisfies less stringent [7] S. Even, O. Goldreich, and S. Micali. On-line/off-line digital requirements and is thus realizable. signatures. In Advances in Cryptology: Crypto’89, pages Specifically, we require that the hash function be “suit- 263–277, 1990. able,” according to Definition 3. The salient properties of [8] R. Gennaro, S. Halevi, and T. Rabin. Secure hash-and- the GHR scheme which allow for the use of a suitable hash sign signatures without the random oracle. In Advances in function carry over to our modification as well, resulting in Cryptology–Eurocypt’99, pages 123–139, 1999. the following theorem. [9] S. Goldwasser, S. Micali, and R. Rivest. A digital signa- Theorem 2 If H is suitable, then the construction from Sec- ture scheme secure against adaptive chosen-message attacks. tion 3 is existentially unforgeable under an adaptive chosen SIAM J. Computing, 17:281–308, 1988. message attack, assuming the strong RSA assumption. [10] H. Krawczyk and T. Rabin. Chameleon signatures. In Symposium on Network and Distributed Systems Security Due to the similarity between our scheme and the GHR (NDSS), pages 143–154, 2000. scheme, the proof for the above theorem is similar to that for the GHR scheme [8], and is in the full version of our [11] K. Kurosawa and K. Schmidt-Samoa. New online/offline signature schemes without random oracles. In PKC 2006, paper [14]. pages 330–346, 2006. [12] C. Schnorr. Efficient signature generation for smart cards. 6. Conclusions Journal of Cryptology, 4(3):161–174, 1991.

In this paper we have presented a new efficient digital [13] A. Shamir and Y. Tauman. Improved online/offline signature schemems. In Advances in Cryptology: Crypto’01, pages signature scheme, which is proved secure under the strong 355–367, 2001. RSA assumption. Our construction works in a two-phase offline/online model, so after some offline precomputation [14] P. Yu and S. R. Tate. An online/offline signa- ture scheme based on the strong RSA assumption. that is independent of the message being signed, the on- CoPS Lab Technical Report, 2007. Available from line phase is highly efficient (just a single modular multi- http://cops.csci.unt.edu/publications/. plication). Furthermore, while other online/offline schemes

21st International Conference on Advanced Information Networking and Applications Workshops (AINAW'07) 0-7695-2847-3/07 $20.00 © 2007

Authorized licensed use limited to: Edinburgh Napier University. Downloaded on October 31,2020 at 17:52:10 UTC from IEEE Xplore. Restrictions apply.