Cryptography and Coding
Cryptography and Coding
Editorial Board
David Hutchison
Lancaster University, UK
Takeo Kanade
Carnegie Mellon University, Pittsburgh, PA, USA
Josef Kittler
University of Surrey, Guildford, UK
Jon M. Kleinberg
Cornell University, Ithaca, NY, USA
Friedemann Mattern
ETH Zurich, Switzerland
John C. Mitchell
Stanford University, CA, USA
Moni Naor
Weizmann Institute of Science, Rehovot, Israel
Oscar Nierstrasz
University of Bern, Switzerland
C. Pandu Rangan
Indian Institute of Technology, Madras, India
Bernhard Steffen
University of Dortmund, Germany
Madhu Sudan
Massachusetts Institute of Technology, MA, USA
Demetri Terzopoulos
University of California, Los Angeles, CA, USA
Doug Tygar
University of California, Berkeley, CA, USA
Moshe Y. Vardi
Rice University, Houston, TX, USA
Gerhard Weikum
Max-Planck Institute of Computer Science, Saarbruecken, Germany
Steven D. Galbraith (Ed.)
Cryptography
and Coding
13
Volume Editor
Steven D. Galbraith
Royal Holloway University of London
Mathematics Department
Egham, Surrey, TW20 0EX, UK
E-mail: [Link]@[Link]
ISSN 0302-9743
ISBN-10 3-540-77271-5 Springer Berlin Heidelberg New York
ISBN-13 978-3-540-77271-2 Springer Berlin Heidelberg New York
This work is subject to copyright. All rights are reserved, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting,
reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication
or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965,
in its current version, and permission for use must always be obtained from Springer. Violations are liable
to prosecution under the German Copyright Law.
Springer is a part of Springer Science+Business Media
[Link]
© Springer-Verlag Berlin Heidelberg 2007
Printed in Germany
Typesetting: Camera-ready by author, data conversion by Scientific Publishing Services, Chennai, India
Printed on acid-free paper SPIN: 12203093 06/3180 543210
Preface
The 11th IMA Conference on Cryptography and Coding was held at the Royal
Agricultural College, Cirencester, UK during December 18–20, 2007. As usual,
the venue provided a relaxed and convivial atmosphere for attendees to enjoy
the conference programme and discuss current and future research ideas.
The programme comprised three invited talks and 22 contributed papers. The
invited speakers were Jonathan Katz (University of Maryland, USA), Patrick
Solé (Ecole Polytechnique de l’Université de Nice-Sophia Antipolis, France) and
Whit Diffie (Sun Microsystems, USA). Special thanks are due to these speakers.
Two of the invited speakers provided papers, included in this volume, which high-
light the connections between cryptography, coding theory and discrete mathe-
matics.
The contributed talks were selected from 48 submissions. The accepted pa-
pers cover a range of topics in mathematics and computer science, including
symmetric and public key cryptography, Boolean functions, sequences, efficient
implementation and side-channel analysis.
I would like to thank all the people who helped with the conference pro-
gramme and organization. First, I thank the Steering Committee for their guid-
ance on the general format of the conference and for suggestions of members
of the Programme Committee. I also heartily thank the Programme Committee
and the sub-reviewers listed on the following pages for their thoroughness during
the review process. Each paper was reviewed by at least three people. There was
significant online discussion about a number of papers.
The submission and review process was greatly simplified by the ichair soft-
ware developed by Thomas Baignères and Matthieu Finiasz. Thanks also to Jon
Hart for running the submissions Web server and Sriram Srinivasan for designing
and maintaining the conference Web page.
Thanks go to the authors of all submitted papers. I also thank the authors
of accepted papers for revising their papers according to referee suggestions and
returning latex source files in good time. The revised versions were not checked by
the Programme Committee so authors bear full responsibility for their contents.
I thank the staff at Springer for their help with producing the proceedings.
I thank Hewlett-Packard and Vodafone for their sponsorship of this event.
Finally, I wish to thank the conference staff of the Institute for Mathematics
and its Applications, especially Lucy Nye and Sammi Lauesen, for their help
with running the conference and handling the finances.
Sponsored by
The Institute of Mathematics and its Applications
in cooperation with
Hewlett-Packard Laboratories and Vodafone Ltd.
Programme Chair
Steven Galbraith Royal Holloway University of London
Steering Committee
Bahram Honary Lancaster University
Chris Mitchell Royal Holloway
Kenny Paterson Royal Holloway
Fred Piper Royal Holloway
Nigel Smart University of Bristol
Mike Walker Vodafone Ltd. and Royal Holloway
Programme Committee
Steve Babbage Vodafone Group Services Ltd.
Nigel Boston South Carolina/Wisconsin
Pascale Charpin INRIA Rocquencourt
Liqun Chen Hewlett-Packard
Carlos Cid Royal Holloway
YoungJu Choie Postech, Korea
Arjen Lenstra EPFL, Lausanne
Alexander May Ruhr Universität Bochum
Gary McGuire University College Dublin
Alfred Menezes University of Waterloo
David Naccache Ecole Normale Supérieure
Matthew Parker University of Bergen
Matt Robshaw France Telecom
Ana Sălăgean Loughborough University
Berry Schoenmakers Technical University Eindhoven
Michael Scott Dublin City University
Amin Shokrollahi EPFL, Lausanne
Nigel Smart University of Bristol
Frederik Vercauteren K. U. Leuven
Gilles Zemor Université Bordeaux
VIII Organization
External Reviewers
Joppe Bos Christophe De Cannière Anne Canteaut
Claude Carlet Mahdi Cheraghchi Alex Dent
Fabien Galand Philippe Guillot Darrel Hankerson
Marcelo Kaihara Cedric Lauradoux Lorenz Minder
Marine Minier Stephane Manuel Ashley Montanaro
Sean Murphy Dag Arne Osvik Gregory Neven
Dan Page Kenny Paterson Benny Pinkas
Louis Salvail Amin Shokrollahi Andrey Sidorenko
Patrick Solé Martijn Stam Søren Steffen Thomsen
Eran Tromer José Villegas
Table of Contents
Invited Papers
Efficient Cryptographic Protocols Based on the Hardness of Learning
Parity with Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Jonathan Katz
Signatures I
Finding Invalid Signatures in Pairing-Based Batches . . . . . . . . . . . . . . . . . . 34
Laurie Law and Brian J. Matt
Boolean Functions
Efficient Computation of the Best Quadratic Approximations of Cubic
Boolean Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Nicholas Kolokotronis, Konstantinos Limniotis, and
Nicholas Kalouptsidis
Side Channels
Linear Complexity
Remarks on the New Attack on the Filter Generator and the Role of
High Order Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Panagiotis Rizomiliotis
Curves
Optimised Versions of the Ate and Twisted Ate Pairings . . . . . . . . . . . . . . 302
Seiichi Matsuda, Naoki Kanayama, Florian Hess, and Eiji Okamoto
RSA Implementation
Efficient 15,360-bit RSA Using Woop-Optimised Montgomery
Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
Kamel Bentahar and Nigel P. Smart
Signatures II
Multi-key Hierarchical Identity-Based Signatures . . . . . . . . . . . . . . . . . . . . . 384
Hoon Wei Lim and Kenneth G. Paterson
Jonathan Katz
Abstract. The problem of learning parity with noise (The LPN prob-
lem), which can be re-cast as the problem of decoding a random linear
code, has attracted attention recently as a possible tool for developing
highly-efficient cryptographic primitives suitable for resource-constrained
devices such as RFID tags. This article surveys recent work aimed at de-
signing efficient authentication protocols based on the conjectured hard-
ness of this problem.
1 Introduction
1.1 The LPN Problem
Fix a binary vector (i.e., a bit-string) s of length k. Given a sequence of randomly-
chosen binary vectors a1 , . . . , a along with the values of their inner-product
zi = s, ai with s, it is a simple matter to reconstruct s in its entirety as soon as
is slightly larger than k. (All that is needed is to wait until the set {ai } contains
k linearly-independent vectors.) In the presence of noise, however, where each
bit zi is flipped (independently) with probability ε, determining s becomes much
more difficult. We refer to the problem of learning s in this latter case as the
problem of learning parity with noise, or the LPN problem.
Formally, let Berε be the Bernoulli distribution with parameter ε ∈ (0, 12 ) (so
if ν ∼ Berε then Pr[ν = 1] = ε and Pr[ν = 0] = 1 − ε), and let As,ε be the
distribution defined by:
a ← {0, 1}k ; ν ← Berε : (a, s, a ⊕ ν) .
Let As,ε also denote an oracle which outputs (independent) samples according
to this distribution. Algorithm M is said to (t, q, δ)-solve the LPNε problem if
Pr s ← {0, 1}k : M As,ε (1k ) = s ≥ δ,
and furthermore M runs in time at most t and makes at most q queries to its
oracle. (This formulation of the LPN problem follows [18]; an alternative but
Supported in part by NSF CyberTrust grant #0627306 and NSF CAREER award
#0447075.
S.D. Galbraith (Eds.): Cryptography and Coding 2007, LNCS 4887, pp. 1–15, 2007.
c Springer-Verlag Berlin Heidelberg 2007
2 J. Katz
It is not too difficult to see that hardness of the LPNε problem implies the
existence of a one-way function. More interesting is that such hardness would
imply efficient and direct constructions of pseudorandom generators [3,24]; see
Lemma 1 for an indication of the basic underlying ideas. Furthermore, gener-
ating an instance of the distribution As,ε is extremely “cheap”, requiring only
k bit-wise “AND” operations and k − 1 “XOR” operations.1 Finally, as men-
tioned earlier, the best-known algorithms for solving the LPNε problem are only
slightly sub-exponential in the length k of the hidden vector. Taken together,
these observations suggest the possibility of using the LPNε problem to construct
efficient cryptographic primitives and protocols, as first suggested in [3].
Actually, if the LPNε problem is indeed “hard” enough, there is the potential
of using it to construct extremely efficient cryptographic primitives, suitable
either for implementation by humans (using pencil-and-paper) [13,14] or for
implementation on low-cost radio-frequency identification (RFID) tags [17] or
sensor nodes. Focusing on the case of RFID tags, Juels and Weis [17,25] estimate
1
This assumes that generating the appropriate random coins is “free”, which may not
be a reasonable assumption in practice.
Efficient Cryptographic Protocols Based on the Hardness of Learning Parity 3
that current RFID tags contain, in the best case, ≈ 2000 gate equivalents that
can be dedicated to performing security functions; even optimized block cipher
implementations may require many more gates than this (see [8,1] for current
state-of-the-art).
Pr s ← {0, 1}k : DAs,ε (1k ) = 1 − Pr DUk+1 (1k ) = 1 ≥ δ.
Then there exists an algorithm
M making
q = O q · δ −2 log k oracle queries,
running in time t = O t · kδ −2 log k , and such that
Pr s ← {0, 1}k : M As,ε (1k ) = s ≥ δ/4.
Let us analyze the behavior of M . First, note that with “high” probability
over choice of s and random coins for D it holds that
A
Pr D s,ε (1k ) = 1 − Pr DUk+1 (1k ) = 1 ≥ δ/2, (1)
where the probabilities are now taken only over the answers D receives from its
oracle. We restrict our attention to s, ω for which Eq. (1) holds and show that
in this case M outputs s = s with probability at least 1/2. The lemma follows.
Setting the accuracy of our estimations appropriately, we can ensure that
U
Pr D k+1 (1k ; ω) = 1 − p ≤ δ/16 (2)
except with probability at most O(1/k). Applying a union bound (and setting
parameters appropriately) we see that with probability at least 1/2 both Eqs. (2)
6 J. Katz
and (3) hold (the latter for all i ∈ [k]), and so we assume this to be the case for
the rest of the proof.
An easy observation is that if si = 0 then hybi = As,ε , while if si = 1 then
hybi = Uk+1 . It follows that if si = 0 then
hyb k
Pr D i (1 ; ω) = 1 − Pr DUk+1 (1k ; ω) = 1 ≥ δ/2
T (s, ε) R(s)
a a ← {0, 1}k
ν ← Berε
z := s, a ⊕ ν z -
?
verify: z = s, a
secret key s (note that the tag algorithm is independent of u), and let RHB s,ε,u,n
similarly denote the algorithm run by the tag reader. We denote a complete exe-
cution of the HB protocol between a party T̂ and the reader R by T̂ , RHB s,ε,u,n
and say this equals 1 iff the reader accepts.
For a passive attack on the HB protocol, we imagine an adversary A running
in two stages: in the first stage the adversary obtains q transcripts3 of (honest)
executions of the protocol by interacting with an oracle transHB s,ε,n (this models
eavesdropping); in the second stage, the adversary interacts with the reader and
tries to impersonate the tag. We define the adversary’s advantage as
def transHB ∗
Advpassive
A,HB (ε, u, n) = Pr s ← {0, 1} k
; A s,ε,n (1k ) : A, RHB
s,ε,u,n = 1 − δε,u,n .
As we will describe in Section 3.2, the HB+ protocol uses two keys s1 , s2 . We
+ +
let TsHB
1 ,s2 ,ε,n
denote the tag algorithm in this case, and let RHB
s1 ,s2 ,ε,u,n denote
the algorithm run by the tag reader. For the case of an active attack on the
HB+ protocol, we again imagine an adversary running in two stages: in the first
stage the adversary interacts at most q times with the honest tag algorithm
(with concurrent executions allowed), while in the second stage the adversary
interacts only with the reader. The adversary’s advantage in this case is
Advactive
A,HB+ (ε, u, n)
HB+
= Pr s1 , s2 ← {0, 1}k ; ATs1 ,s2 ,ε,n (1k ) : A, RHB ∗
def +
s1 ,s2 ,ε,u,n = 1 − δε,u,n .
3
Following [13,14,17], a transcript comprises only the messages exchanged between
the parties and does not include the reader’s decision of whether or not to accept.
If the adversary is given this additional information, the adversary’s advantage may
increase by (at most) an additive factor of q · εc . Note further that, since u can be
set so that the reader accepts the honest tag with all but negligible probability, this
has no effect as far as asymptotic security is concerned.
8 J. Katz
We remark that in both the HB and HB+ protocols, the tag reader’s actions
are independent of the secret key(s) it holds except for its final decision whether
or not to accept. So, allowing the adversary to interact with the reader multiple
times (even concurrently) does not give the adversary much additional advantage
(other than the fact that, as usual, the probability that the adversary succeeds in
at least one impersonation attempt scales linearly with the number of attempts).
Asymptotically, for any ε < 14 and n = Θ(k) all terms of the above expression
(other than δ) are negligible for appropriate choice of u. Thus, assuming the
hardness of the LPNε problem for ε < 1/4 and appropriate choice of n, u, the
HB protocol is secure against a passive adversary.
Proof. D, given access to an oracle returning (k + 1)-bit strings (a, z), proceeds
as follows:
∗
δ + δε,l,u,n it holds that Z and Z ∗ differ in at most u entries (since A successfully
impersonates the tag with this probability). Also, since Z̄ is distributed exactly
as the answers of an honest tag, Z̄ and Z ∗ differ in at most u positions except
∗
with probability at most εc . It follows that with probability at least δ +δε,u,n −εc
the vectors Z and Z̄ differ in at most 2u entries, and so D outputs 1 with at
least this probability.
2 u
When ε ≥ 1/4 then 2u ≥ 2ε · n ≥ n/2 and so 2−n · i=0 ni ≥ 1/2; thus,
the above theorem does not guarantee meaningful security in this case and a
different analysis is needed.
Theorem 2. For n = Θ(k) and appropriate setting of u, the HB protocol is
(asymptotically) secure for any ε < 1/2.
Proof. Let u = ε+ n, where ε+ is a constant satisfying ε < ε+ < 12 . Set ε++ to
be a constant satisfying ε+ − 2ε+ ε + ε < ε++ < 12 . The reduction D we use here
is similar to that used in the previous proof, except that D now outputs 1 only
def
if Z̄ and Z differ in at most u = ε++ · n entries.
When D’s oracle is Uk+1 , it is once again clear that D outputs 1 with proba-
u
bility 2−n · i=0 ni . Since u < n/2, this quantity is negligible in k.
When D’s oracle is As,ε then the transcripts D provides to A during the
first phase of A’s execution are distributed identically to real transcripts in an
def
execution of the HB protocol. Letting Z ∗ = (s, ā1 , . . . , s, ān ) be the vector
of correct answers to the challenge (ā1 , . . . , ān ) sent by D in the second phase,
it follows that with probability δ (i.e., the impersonation probability of A) the
vector of responses Z given by A differs from Z ∗ in at most u entries. We show
below that, conditioned on this event, Z and Z̄ differ in at most u entries with
all but negligible probability. Thus, D outputs 1 in this case with probability
negligibly close to δ. We conclude from Lemma 1 that δ must be negligible.
Let wt(Z) denote the weight of a vector Z; i.e., the number of entries of Z
equal to 1. Note that the distance between two binary vectors Z1 , Z2 is equal to
wt(Z1 ⊕ Z2 ). It remains to show that, conditioned on wt(Z ⊕ Z ∗ ) ≤ u, we have
wt(Z ⊕ Z̄) ≤ u with all but negligible probability.
Write Z = Z ∗ ⊕ w for some vector w of weight at most u = ε+ n. The vector
Z̄ is selected by the following process: choose an error vector e by setting each
position of e (independently) to 1 with probability ε, and then set Z̄ = Z ∗ ⊕ e.
We see that the probability that Z̄ differs from Z in at most u entries is equal
to the probability that
u · (1 − ε) + (n − u) · ε = (ε+ − 2ε+ ε + ε) · n.
10 J. Katz
Since ε++ is a constant strictly larger than (ε+ − 2ε+ ε + ε), a Chernoff bound
then implies that wt(w ⊕ e) ≤ ε++ n with all but negligible probability.
T (s1 , s2 , ε) R(s1 , s2 )
b ← {0, 1}k b -
a a ← {0, 1}k
ν ← Berε
z := s1 , b ⊕ s2 , a ⊕ ν z -
?
verify: z = s1 , b ⊕ s2 , a
The actual HB+ protocol consists of n parallel iterations of the basic authenti-
cation step (and so the entire protocol requires only three rounds). The protocol
also depends upon parameters u as in the case of the HB protocol, and the values
∗
εc and δε,u,n are defined exactly as there.
The following result shows that the HB+ protocol is secure against active
attacks, assuming the hardness of the LPNε problem. An important point is
that the proof does not require any rewinding of the adversary in simulating
the first phase of the attack, and the proof therefore holds even when various
executions of the HB+ protocol are run in parallel (or even concurrently).
We refer to [18] for a simpler proof when ε < 1/4, and present here only the
more complicated proof (from [19]) that deals with any ε < 1/2. This, more
complicated proof relies on known bounds on the size of constant-weight codes
having certain minimum distance [15,16,11].
Theorem 3. Let ε < 1/2 and assume the LPNε problem is hard. Let n = Θ(k)
and u = ε+ n where ε+ is a constant satisfying ε < ε+ < 1/2. Then the HB+
Efficient Cryptographic Protocols Based on the Hardness of Learning Parity 11
protocol with this setting of the parameters has negligible completeness error, and
is (asymptotically) secure against active attacks.
Proof. A standard Chernoff bound shows that the completeness error is negligi-
ble for the given setting of the parameters. For any probabilistic polynomial-time
(ppt) adversary A attacking the HB+ protocol, we construct a ppt adversary
D attempting to distinguish whether it is given oracle access to As,ε or to Uk+1
(as in Lemma 1). Relating the advantage of D to the advantage of A gives the
stated result.
D, given access to an oracle returning (k + 1)-bit strings (b, z̄), proceeds as
follows:
1. D chooses s2 ∈ {0, 1}k uniformly at random. Then, it runs the first phase
of A. To simulate a basic authentication step, D does the following: it obtains
a sample (b, z̄) from its oracle and sends b as the initial message. A replies
with a challenge a, and then D responds with z = z̄ ⊕ s2 , a.
2. When A is ready for the second phase of its attack, A sends an initial mes-
sage b1 , . . . , bn . In response, D chooses random a11 , . . . , a1n ∈ {0, 1}k , sends
these challenges to A, and records A’s response z11 , . . . , zn1 . Then D rewinds
A, chooses random a21 , . . . , a2n ∈ {0, 1}k , sends these to A, and records A’s
response z12 , . . . , zn2 .
def
3. Let zi⊕ := zi1 ⊕ zi2 and set Z ⊕ = z1⊕ , . . . , zn⊕ . Let âi = a1i ⊕ a2i and
def
ẑi = s2 , âi , and set Ẑ = (ẑ1 , . . . , ẑn ). D outputs 1 iff Z ⊕ and Ẑ differ in
fewer than u = ε++ · n entries, for some constant ε++ < 12 to be fixed later.
(recall that b1 , . . . , bn are the vectors sent by A in the first round). Define
def
Δ(a1 , . . . , an ) = fA (a1 , . . . , an ) ⊕ fcorrect (a1 , . . . , an ),
Δ1 ⊕ Δ2
= fA (a11 , . . . , a1n ) ⊕ fcorrect(a11 , . . . , a1n ) ⊕ fA (a21 , . . . , a2n ) ⊕ fcorrect(a21 , . . . , a2n )
= Z ⊕ ⊕ fcorrect(a11 , . . . , a1n ) ⊕ fcorrect (a21 , . . . , a2n ).
4
As in the proof of the previous theorem, the weight wt(Z) of a vector Z is the
number of its entries equal to 1.
Efficient Cryptographic Protocols Based on the Hardness of Learning Parity 13
D cannot compute fcorrect (a11 , . . . , a1n ) or fcorrect (a21 , . . . , a2n ) since it does not
know s1 . However, it can compute
We thus see that Z ⊕ and Ẑ differ in fewer than u entries exactly when Δ1 and
Δ2 differ in fewer than u = ε++ n entries. It is the latter probability that we
now analyze.
def
Let δ be a (positive) constant such that ε++ = 12 · (1 − δ). Let γ = 1 − 2ε+ ,
++ 2
and note that by our choice of ε we have δ < γ . Set
def 1−δ
c = + 1.
γ2 − δ
We show that for two vectors Δ1 , Δ2 chosen independently according to distri-
bution D, we have wt(Δ1 ⊕ Δ2 ) < ε++ n with (constant) probability at least c12 .
Assume not. So
1
Pr[Δ1 , Δ2 ← D : wt(Δ1 ⊕ Δ2 ) < ε++ n] < .
c2
But then, by a union bound,
1
Pr[Δ1 , . . . , Δc ← D : ∃i = j s.t. wt(Δ1 ⊕ Δ2 ) < ε++ n] < .
2
In particular, there exist c vectors Δ1 , . . . , Δc in the support of D whose pairwise
distances are all at least ε++ n = 12 · (1 − δ)n. Furthermore, each Δi has weight
at most u = 12 · (1 − γ)n since it lies in the support of D. However, the Johnson
bound [15,16] (our notation was chosen to be consistent with the formulation
in [11, Theorem 1]), which gives bounds on the size of constant-weight codes of
certain minimum distance, shows that no such set {Δi }ci=1 exists.
More generally, it remains to be seen whether the LPN problem can be used to
construct efficient cryptographic protocols for other tasks. Some hope is provided
by Regev’s result [24] showing that public-key encryption can be based on a
generalization of the LPN problem.
Acknowledgments
I would like to thank Steven Galbraith for inviting me to contribute this survey
to the 11th IMA International Conference on Cryptography and Coding Theory.
References
1. Bogdanov, A., Knudsen, L., Leander, G., Paar, C., Poschmann, A., Robshaw,
M., Seurin, Y., Vikkelsoe, C.: PRESENT: An Ultra-Lightweight Block Cipher.
In: CHES 2007. Workshop on Cryptographic Hardware and Embedded Systems
(to appear, 2007)
2. Berlekamp, E.R., McEliece, R.J., van Tilborg, H.C.A.: On the Inherent Intractabil-
ity of Certain Coding Problems. IEEE Trans. Info. Theory 24, 384–386 (1978)
3. Blum, A., Furst, M., Kearns, M., Lipton, R.: Cryptographic Primitives Based on
Hard Learning Problems. 773, 278–291 (1994)
4. Blum, A., Kalai, A., Wasserman, H.: Noise-Tolerant Learning, the Parity Problem,
and the Statistical Query Model. J. ACM 50(4), 506–519 (2003)
5. Bringer, J., Chabanne, H., Dottax, E.: HB++ : A Lightweight Authentication Pro-
tocol Secure against Some Attacks, [Link]
6. Chabaud, F.: On the Security of Some Cryptosystems Based on Error-Correcting
Codes. In: De Santis, A. (ed.) EUROCRYPT 1994. LNCS, vol. 950, pp. 131–139.
Springer, Heidelberg (1995)
7. Diffie, W., Hellman, M.: New Directions in Cryptography. IEEE Trans. Info. The-
ory 22(6), 644–654 (1976)
8. Feldhofer, M., Dominikus, S., Wolkerstorfer, J.: Strong Authentication for RFID
Systems using the AES Algorithm. In: Joye, M., Quisquater, J.-J. (eds.) CHES
2004. LNCS, vol. 3156, pp. 357–370. Springer, Heidelberg (2004)
9. Fossorier, M.P.C., Mihaljevı́c, M.J., Imai, H., Cui, Y., Matsuura, K.: A Novel
Algorithm for Solving the LPN Problem and its Application to Security Evaluation
of the HB Protocol for RFID Authentication, [Link]
10. Gilbert, H., Robshaw, M., Silbert, H.: An Active Attack against HB+ : A Provably
Secure Lightweight Authentication Protocol, [Link]
11. Guruswami, V., Sudan, M.: Extensions to the Johnson Bound (unpublished
manuscript 2001), [Link]
12. Håstad, J.: Optimal Inapproximability Results. J. ACM 48(4), 798–859 (2001)
13. Hopper, N., Blum, M.: A Secure Human-Computer Authentication Scheme. Tech-
nical Report CMU-CS-00-139, Carnegie Mellon University (2000)
14. Hopper, N., Blum, M.: Secure Human Identification Protocols. In: Boyd, C. (ed.)
ASIACRYPT 2001. LNCS, vol. 2248, pp. 52–66. Springer, Heidelberg (2001)
15. Johnson, S.M.: Upper Bound for Error-Correcting Codes. IEEE Trans. Info. The-
ory 8, 203–207 (1962)
16. Johnson, S.M.: Improved Asympototic Bounds for Error-Correcting Codes. IEEE
Trans. Info. Theory 9, 198–205 (1963)
Efficient Cryptographic Protocols Based on the Hardness of Learning Parity 15
17. Juels, A., Weis, S.: Authenticating Pervasive Devices with Human Protocols,
vol. 3621, pp. 293–308 (2005),
[Link]
pdfs/[Link]
18. Katz, J., Shin, J.-S.: Parallel and Concurrent Security of the HB and HB+ Pro-
tocols. In: Vaudenay, S. (ed.) EUROCRYPT 2006. LNCS, vol. 4004, Springer,
Heidelberg (2006)
19. Katz, J., Smith, A.: Analyzing the HB and HB+ Protocols in the Large Error Case,
Available at [Link]
20. Kearns, M.: Efficient Noise-Tolerant Learning from Statistical Queries. J.
ACM 45(6), 983–1006 (1998)
21. Kfir, Z., Wool, A.: Picking Virtual Pockets using Relay Attacks on Contactless
Smartcard Systems, [Link]
22. Kirschenbaum, I., Wool, A.: How to Build a Low-Cost, Extended-Range RFID
Skimmer, [Link]
23. Levieil, E., Fouque, P.-A.: An Improved LPN Algorithm. In: De Prisco, R., Yung,
M. (eds.) SCN 2006. LNCS, vol. 4116, pp. 348–359. Springer, Heidelberg (2006)
24. Regev, O.: On Lattices, Learning with Errors, Random Linear Codes, and Cryp-
tography. In: 37th ACM Symposium on Theory of Computing, pp. 84–93. ACM,
New York (2005)
25. Weis, S.: New Foundations for Efficient Authentication, Commutative Cryptogra-
phy, and Private Disjointness Testing. Ph.D. thesis, MIT (2006)
Galois Rings
and
Pseudo-random Sequences
1 Introduction
Since the seminal work of Claude Shannon in the 40’s the algebraic structure of
coding alphabets was a finite field. However, there was a push towards finite rings
due to modulation requirements, a 4− PSK modulation being more powerful
than an antipodal modulation, for instance [1]. This led researchers in the 70’s
to consider cyclic codes over Z/M Z, with a special attention for M a power of
a prime [2,19]. In the 90’s cyclic codes over rings received a lot of attention due
to many pure applications: the solution of the Kerdock Preparata riddle [8], and
a new construction of the Leech lattice [3], (both for M = 4), to name but a
few. In this golden dawn, new and powerful mathematical techniques arose, the
most profound being probably a p−adic analogue of the Weil bound on character
sums [10], and families of low correlation sequences (based on weighted degree
trace codes) tailored for that bound [20].
In the present decade, new engineering applications emerged that required
that machinery, and are significantly different, but not unrelated to the classical
use in Spread Spectrum and CDMA systems illustrated in [11,7], or to take a
more recent example the 3GPP standard (see [Link]). In particular an
important quantity for the safe processing of electronic equipment is the Peak
to Average Power Ratio (PAPR), signals with high dynamic range being
potentially harmful to operational amplifiers. Two models of signalling sequences
S.D. Galbraith (Eds.): Cryptography and Coding 2007, LNCS 4887, pp. 16–33, 2007.
c Springer-Verlag Berlin Heidelberg 2007
Galois Rings and Pseudo-random Sequences 17
2 Preliminaries
∞
We use the convention that ξ = 0.
The 2-adic expansion of x ∈ GR(2l , m) is given by
Ψβ : R → C∗ , x → ω Tr(βx) .
Note that for the defined above ψk and Ψβ , we have:
ψk (Tr(βx)) = Ψβk (x). (3)
Let f (X) denote a polynomial in R[X] and let
f (X) = F0 (X) + 2F1 (X) + . . . + 2l−1 Fl−1 (X)
denote its 2-adic expansion. Let di be the degree in x of Fi . Let Ψ be an arbitrary
additive character of R, and set Df to be the weighted degree of f , defined as
Df = max {d0 2l−1 , d1 2l−2 , . . . , dl−1 }.
With the above notation, we have (under mild technical conditions) the bound
| Ψ (f (x))| ≤ (Df − 1)2m/2 . (4)
x∈T
where x
is the largest integer ≤ x.
Recall the following property of the weighted degree [22, Lemma 3.1]
Lemma 3. Let f (X) ∈ R[X] and α ∈ R∗ = R\2R is a unit of R and let
g(X) = f (αX) ∈ R[X]. Then
Dg = Df ,
where Df , Dg are respectively the weighted degrees of the polynomials f (X) and
g(X).
20 P. Solé and D. Zinoviev
7
7
μ(Tr(αξ t )) = μj ψj (Tr(αξ t )) = μj Ψαj (ξ t )). (6)
j=0 j=0
n−2
7
n−2
(−1)ct = μj Ψαj (ξ t ). (7)
t=0 j=0 t=0
for all λ ∈ GR(8, m), λ = 0. Thus, the absolute value of the Right Hand Side of
(7) can be estimated from above by:
√
7
(3 2m + 1) |μj |.
j=0
Theorem 2. With notation as above, and for all phase shifts τ, 0 < τ < 2m − 1,
let
Θ(τ ) = (−1)ct (−1)ct+τ ,
t∈I
Galois Rings and Pseudo-random Sequences 21
where ct = MSB(Tr(αξ t )) and ct = MSB(Tr(α ξ t )) are two elements such that
for any pair 0 ≤ j1 , j2 ≤ 7 the following condition holds
j1 α + j2 α ξ τ = 0.
We then have the bound
√ √
|Θ(τ )| ≤ 3(2 + 2) 2m .
Proof. As we have ct = MSB(Tr(αξ t )) and ct = MSB(Tr(α ξ t )), where t ranges
between 0 and n − 2 and by (1), applying (6) and changing the order of summa-
tion, we obtain that:
7
7
n−2
Θ(τ ) = μj1 μj2 Ψj1 (αξ t )Ψj2 (α ξ t+τ ). (9)
j1 =0 j2 =0 t=0
By definition of Ψ , we have:
Ψj1 (αξ t )Ψj2 (α ξ t+τ ) = Ψβ (ξ t ),
where β = j1 α + j2 α ξ τ = 0. Applying (4), we obtain:
n−2 n−2
√
Ψj1 (αξ t )Ψj2 (α ξ t+τ ) = Ψβ (ξ t ) ≤ 3 2m + 1. (10)
t=0 t=0
7
7 2
l
−1 2 √
|μj1 μj2 | = |μj | = 2 + 2. (11)
j1 =0 j2 =0 j=0
n−2 2
l
−1
ct
(−1) = μj Ψj (f (x)). (13)
t=0 j=0 x∈T ∗
Applying (4), the absolute value of the Right Hand Side of (13) can be esti-
mated from above by:
−1
2 l
√
((Df − 1) 2m + 1) |μj |. (14)
j=0
Applying Lemma 1 the sum (14) can be estimated from above by:
√
(2l ln(2)/π + 1)(Df − 1) 2m .
The result follows.
Theorem 4. With notation as above, and for all phase shifts τ, in the range
0 < τ < 2m − 1, let (n = 2m )
n−2
Θ(τ ) = (−1)ct (−1)ct+τ ,
t=0
ct
where ct = MSB(Tr(f1 (ξ ))) and = MSB(Tr(f2 (ξ t ))). We then have the bound
t
(l ≥ 4):
2
2l √
|Θ(τ )| ≤ ln(2) + 1 [1 + (D − 1) 2m ],
π
where D = max{Df1 , Df2 } and for any pair 0 ≤ j1 , j2 ≤ 2l − 1 the following
condition holds
j1 f1 (x) + j2 f2 (xξ τ ) = 0.
Proof. As we have ct = MSB(Tr(f1 (ξ t ))) and ct = MSB(Tr(f2 (ξ t ))), where t
ranges between 0 and n − 2 and by (1), we obtain that (−1)ct is equal to:
2
l
−1 2
l
−1
t t
μ(Tr(f1 (ξ ))) = μj ψj (Tr(f1 (ξ ))) = μj Ψj (f1 (ξ t )).
j=0 j=0
By definition of Ψ , we have:
N −1
2l−1
j
Ψβ (γ ) = Ψβ(1+2λ)j (x) .
j=0 j=0 x∈T ∗
{γ t ; t = 0, 1, . . . , N − 1} = {ξ t (1 + 2λ)t ; t = 0, 1, . . . , N − 1}.
24 P. Solé and D. Zinoviev
N −1 −1 2
2l−1 m
−2
j
Ψβ (γ ) = Ψβ ((1 + 2λ)j1 ξ j2 ),
j=0 j1 =0 j2 =0
Ψβ ((1 + 2λ)j1 ξ j2 ) = Ψβ (ξ j2 ),
−1 2
2l−1 −2
m
Ψβ(1+2λ)j1 (ξ j2 ).
j1 =0 j2 =0
As we have ct = MSB(Tr(αγ t )), and by (1), we obtain that (−1)ct is equal to:
2
l
−1 2
l
−1
t t
μ(Tr(αγ )) = μj ψj (Tr(αγ )) = μj Ψαj (γ t ).
j=0 j=0
N −1 2
l
−1
N −1
ct
(−1) = μj Ψαj (γ t ). (20)
t=0 j=0 t=0
−1
N −1
2l−1
t
Ψαj (γ ) = Ψαj(1+2λ)t (x) . (21)
t=0 t=0 x∈T ∗
Galois Rings and Pseudo-random Sequences 25
Applying Lemma 3.1 of [21] to each of the 2l−1 sums over x, we obtain that:
N
−1 √
Ψαj (γ t ) ≤ 2l−1 [(2l−1 − 1) 2m + 1].
t=0
Thus, the absolute value of the Right Hand Side of (20) can be estimated from
above by:
2
l
−1
√
2l−1 [(2l−1 − 1) 2m + 1] |μj |. (22)
j=0
Recall Corollary 7.4 of [12] which states that for l ≥ 4 the following estimate
holds:
2l
−1
2l ln(2)
|μj | < + 1.
j=0
π
where ct = M SB(Tr(αγ )) and = M SB(Tr(α γ t )) are such that for any pair
t
ct
0 ≤ j1 , j2 ≤ 2l − 1 the following condition holds
j1 α + j2 α ξ τ = 0.
2
l
−1 2
l
−1
N −1
Θ(τ ) = μj1 μj2 Ψβ (γ t ).
j1 =0 j2 =0 t=0
−1
N −1
2l−1
j
Ψβ (γ ) = Ψβ(1+2λ)j (x) ,
j=0 j=0 x∈T
where 0 = β(1 + 2λ)j ∈ R so that each sum over x can be estimated using
Lemma 3.1 of [21]. Thus, we have:
N
−1 √
Ψβ (γ j ) ≤ 2l−1 [(2l−1 − 1) 2m + 1]. (24)
j=0
N
−1 √
Ψ (f (γ k ))e2πikj/N ≤ 2l−1 [Df 2m + 1]. (26)
k=0
Galois Rings and Pseudo-random Sequences 27
−1 2
2l−1 −2
m
Set fk2 (x) = f (x(1 + 2λ)k2 ). Then, expressing k as a function of k1 and k2 , the
above sum is equal to:
−1 2
2l−1 −2
m
m
−1) 2πic2 k2 j/2l−1
Ψ (fk2 (ξ k1 ))e2πic1 k1 j/(2 e .
k2 =0 k1 =0
2l−1 √ 2 2
(1 + D 2m )2 log(2N ) + 2 ,
2 −1
m π
where log stands for the natural logarithm.
28 P. Solé and D. Zinoviev
We prepare the bound on the minimum Euclidean distance of the code Sl,m,D
by a correlation approach.
Theorem 8. With notation as above, and for all phase shifts τ, in the range
0 < τ < N , let
N −1
Θ(τ ) = ω ct −ct+τ ,
t=0
where ct = Tr(f1 (γ t )) and ct = Tr(f2 (γ t )). We then have the bound (l ≥ 4):
√
|Θ(τ )| ≤ 2l−1 [(Df − 1) 2m + 1].
Proof. As we have ct = Tr(f1 (γ t )) and ct = Tr(f2 (γ t )), where t ranges between
0 and N − 1 and γ = ξ(1 + 2λ) is of order N = 2l−1 (2m − 1).
We obtain that:
N −1
Θ(τ ) = Ψ (f1 (γ t ) − f2 (γ t+τ )). (29)
t=0
By definition of Ψ , we have:
Ψ (f1 (γ t ) − f2 (γ t+τ )) = Ψ (f3 (γ t )),
where f3 (x) = f1 (x) − f2 (xγ τ ). Note that if f (x) ∈ SD then by Lemma 3
f (xγ τ ) ∈ SD since the change of variables x → xγ τ does not increase the
weighted degree. Moreover SD is an R-linear space. Thus the polynomial f3 (x)
belongs to SD along with f1 and f2 . Further, as t ranges between 0 and N − 1,
the set {γ t ; t = 0, 1, . . . , N − 1} is equal to the product
{ξ k1 ; t1 = 0, 1, . . . , 2m − 1} × {(1 + 2λ)k2 ; t = 0, 1, . . . , 2l−1 − 1}.
Thus, in (29), the sum over t is equal to
−1 2
2l−1 −2 −1 2 −2
m
2l−1 m
where gk2 (x) = f3 (x(1 + 2λ)k2 ) and for any k2 , gk2 ∈ SD . Applying (4) to each
of the 2l−1 sums:
2
m
−2 √
Ψ (fk2 (ξ t )) ≤ (Df − 1) 2m + 1.
t=0
9 Biphase Sequences
In this section, we construct biphase sequences using the composition of the
Carlet map and inverse Gray map (see [23] for details).
Let a = a0 + 2a1 + 4a2 ∈ Z8 be 2-adic expansion of a. Define two maps Z1 ,Z2
from Z8 to Z4 and a map Z from Z8 to Z4 × Z4 :
where a0 , a1 , a2 ∈ Z2 .
For any integer k ≥ 1, extend this map (also denoted by Z) to the following
map from Zk8 to Zk4 × Zk4 :
in other words
MSBZ(a0 + 2a1 + 4a2 ) = (a0 + a2 , a2 ),
obtained by taking the most significant bit in each component of Z (which are
elements of Z4 ).
In this section we consider the periodic sequences c0 , c1 , . . . of period 2(n − 1),
where n = 2m . Let β = 5ξ. Since 52 = 1 in Z8 , we have that
β n−1 = (5ξ)n−1 = 5,
Lemma 5. Let ω = e2πi/8 be a primitive 8th root of 1, and set set ψk (u) = ω ku ,
where k is an integer. Then we have that
where ut = Tr(f (β t ))
Proof. Applying Lemma 5, and changing the order of summation, we obtain that
n−2
((−1)MSB(Z1 (ut )) + (−1)MSB(Z2 (ut )) )
t=0
is equal to
n−2
(μ1 +μ5 )(Ψ1 (f (β t ))+Ψ5 (f (β t )))+(μ3 +μ7 )(Ψ3 (f (β t ))+Ψ7 (f (β t ))) , (33)
t=0
where Ψk (u) = ψk (Tr(u)) = ψ(kTr(u)). Let Ψ = Ψ1 . Then the sum (33) equals
to
Galois Rings and Pseudo-random Sequences 31
n−2
(μ1 +μ5 )(Ψ (f (β t ))+Ψ (5f (β t )))+(μ3 +μ7 )(Ψ (3f (β t ))+Ψ (7f (β t ))) . (34)
t=0
Recall that
t f (ξ t ), if t is even
f (β ) =
5f (ξ t ), if t is odd
Thus, since 52 ≡ 1 (mod 8), we have
n−2
n−2
(Ψ (f (β t )) + Ψ (5f (β t ))) = (Ψ (f (ξ t )) + Ψ (5f (ξ t ))).
t=0 t=0
n−2
n−2
(Ψ (3f (β t )) + Ψ (7f (β t ))) = (Ψ (3f (ξ t )) + Ψ (7f (ξ t ))).
t=0 t=0
Recalling that
n−2
√
Ψj (Tr(f (β t ))) ≤ (D − 1) 2m (35)
t=0
n−2
Θ(τ ) = ((−1)MSB(Z1 (ut ))−MSB(Z1 (vt+τ )) + (−1)MSB(Z2 (ut ))−MSB(Z2 (vt+τ )) ),
t=0
where ut = Tr(f1 (β t )) and vt+τ = Tr(f2 (β t+τ )). We then have the bound
√ √
|Θ(τ )| ≤ 2(2 + 2)(D − 1) 2m .
n−2
Θi (τ ) = ((−1)MSB(Z1 (uj ))+MSB(Zi (vj+τ )) .
j=0
7
7
n−2
Θ1 (τ ) = μj1 μj2 Ψj1 (f1 (β t ))Ψj2 (f2 (β t+τ )).
j1 =0 j2 =0 t=0
32 P. Solé and D. Zinoviev
By definition of Ψ , we have:
7
7
7 2 √
|μj1 μj2 | = |μj | = 2 + 2. (37)
j1 =0 j2 =0 j=0
Combining it with (36) the result follows. The constant 2 in the Theorem comes
from the contributions of Z1 and Z2 .
References
1. Berlekamp, E.R.: Algebraic coding theory. McGraw-Hill, New York (1968)
2. Blake, I.F.: Codes over integer residue rings. Information and Control 29(4), 295–
300 (1975)
3. Bonnecaze, A., Solé, P., Calderbank, A.R.: Quaternary quadratic residue codes and
unimodular lattices. IEEE Trans. Inform. Theory IT-41(2), 366–377 (1995)
4. Carlet, C., Charpin, P., Zinoviev, V., etal.: Codes, bent functions and permutations
suitable for DES-like cryptosystems. Designs Codes and Cryptography 15, 125–156
(1998)
5. Dai, Z.-D.: Binary sequences derived from ML-sequences over rings I: period and
minimal polynomial. J. Cryptology 5, 193–507 (1992)
6. Fan, S., Han, W.: Random properties of the highest level sequences of primitive
Sequences over Z2e . IEEE Trans. Inform. Theory IT-49, 1553–1557 (2003)
7. Fan, P., Darnell, M.: Sequence Design for Communications Applications. John
Wiley and sons Inc, Chichester (1996)
8. Hammons Jr., A.R., Kumar, P.V., Calderbank, A.R., Sloane, N.J.A., Solé, P.: The
Z4 -linearity of Kerdock, Preparata, Goethals and related codes. IEEE Trans. In-
form. Theory IT-40, 301–319 (1994)
9. Helleseth, T., Kumar, P.V.: Sequences with low Correlation. In: Pless, V.S., Huff-
man, W.C. (eds.) Handbook of Coding theory, North Holland, vol. II, pp. 1765–
1853 (1998)
Galois Rings and Pseudo-random Sequences 33
10. Kumar, P.V., Helleseth, T., Calderbank, A.R.: An upper bound for Weil exponen-
tial sums over Galois rings and applications. IEEE Trans. Inform. Theory IT-41,
456–468 (1995)
11. Lam, A.W.: Theory and applications of spread spectrum systems. IEEE Press, Los
Alamitos (1994)
12. Lahtonen, J., Ling, S., Solé, P., Zinoviev, D.: Z8 -Kerdock codes and pseudo-random
binary sequences. Journal of Complexity 20(2-3), 318–330 (2004)
13. Litsyn, S.: Peak Power Control in Multicarrier Communications, Cambridge (2007)
14. MacWilliams, F.J., Sloane, N.J.A.: The Theory of Error-Correcting Codes, North-
Holland (1977)
15. McDonald, B.R.: Finite Rings with Identity. Marcel Dekker, New York (1974)
16. Paterson, K.G.: On Codes with Low Peak-to-Average Power Ratio for Multi-Code
CDMA. IEEE Trans. on Inform. Theory IT-50, 550–559 (2004)
17. Paterson, K.G., Tarokh, V.: On the existence and construction of good codes with
low peak-to-average power ratios. IEEE Trans. on Inform. Theory IT-46, 1974–1987
(2000)
18. Schmidt, K.-U.: PhD thesis, On Spectrally Bounded Codes for Multicarrier Com-
munications, Vogt Verlag, Dresden, Germany (2007),
[Link] schmidtk/#publications
19. Shankar, P.: On BCH codes over arbitrary integer rings. IEEE Trans. Inform.
Theory IT-25, 480–483 (1979)
20. Shanbhag, A., Kumar, P.V., Helleseth, T.: Improved Binary Codes and Sequence
Families from Z4 -Linear Codes. IEEE Trans. on Inform. Theory IT-42, 1582–1586
(1996)
21. Solé, P., Zinoviev, D.: The Most Significant Bit of Maximum Length Sequences
Over Z2l : Autocorrelation and Imbalance. IEEE Transactions on Information The-
ory 50, 1844–1846 (2004)
22. Solé, P., Zinoviev, D.: Low Correlation, High Nonlinearity Sequences for multi-code
CDMA. IEEE Transactions on Information Theory 52, 5158–5163 (2006)
23. Solé, P., Zinoviev, D.: Quaternary Codes and Biphase Sequences from Z8 -Codes.
Problems of Information Transmission 40(2), 147–158 (2004)
24. Solé, P., Zinoviev, D.: Weighted degree trace codes for PAPR reduction. In: Helle-
seth, T., Sarwate, D., Song, H.-Y., Yang, K. (eds.) SETA 2004. LNCS, vol. 3486,
pp. 406–413. Springer, Heidelberg (2005)
25. Wan, Z.X.: Quaternary Codes. World Scientific, Singapore (1997)
26. Wan, Z.X.: Lectures on Finite Fields and Galois Rings. World Scientific, Singapore
(2003)
Finding Invalid Signatures in Pairing-Based
Batches
1 Introduction
When a large number of digital signatures need to be verified, it is sometimes pos-
sible to save time by verifying many signatures together. This process is known as
batch verification. If the batch verification fails, then it is often necessary to iden-
tify the invalid (“bad”) signature(s) that caused the batch to fail. This process
can be time consuming, so batch sizes are typically chosen to be small enough
so that most batches will be expected to pass. “Divide-and-conquer” techniques
have been proposed for identifying invalid signatures in bad batches. These meth-
ods are faster than verifying each signature individually, requiring only O(log2 N )
verifications, where N is the number of signatures in the batch [11].
The views and conclusions contained in this presentation are those of the authors
and should not be interpreted as representing the official policies, either expressed
or implied, of the National Security Agency, the Army Research Laboratory, or the
U. S. Government.
Dr. Matt’s participation was through collaborative participation in the Communi-
cations and Networks Consortium sponsored by the U. S. Army Research Labora-
tory under the Collaborative Technology Alliance Program, Cooperative Agreement
DAAD-19-01-2-0011. The U. S. Government is authorized to reproduce and dis-
tribute reprints for Government purposes notwithstanding any copyright notation
thereon.
S.D. Galbraith (Eds.): Cryptography and Coding 2007, LNCS 4887, pp. 34–53, 2007.
c Springer-Verlag Berlin Heidelberg 2007
Finding Invalid Signatures in Pairing-Based Batches 35
Several digital signature schemes have recently been proposed that are based
on bilinear pairings [2,5,6]. This is because the mathematical properties of pair-
ings can be used to design signatures with improved features such as a shorter
length or the ability to derive the public verification key from the signer’s identity
(i.e., identity-based signatures). Identity-based signatures can reduce the number
of bits that need to be transmitted because the signer does not need to transmit
his public key or certificate to the verifier. Some identity-based signatures also
have short signature lengths, making them ideal for bandwidth-constrained envi-
ronments. However, verification of these signatures often involves bilinear pairing
operations, which are relatively expensive to compute. While it may be feasible
to verify a small number of pairing-based signatures, the number of verifica-
tions required to find the invalid signatures in a large batch can be prohibitive,
even with divide-and-conquer methods. Therefore, finding faster methods for
identifying invalid signatures in bad batches is very important for pairing-based
signature schemes.
All pairing-based schemes discussed in this paper are assumed to use bilinear
pairings on an elliptic curve E, defined over Fq , where q is a large prime. G1 and
G2 are distinct subgroups of prime order r on this curve, where G1 is a subset
of the points on E with coordinates in Fq and G2 is a subset of the points on
E with coordinates in Fqd , for a small integer d. The pairing e is a map from
G1 × G2 into Fqd .
In this paper, we present an improvement to the divide-and-conquer method
for finding invalid signatures in a bad batch. We also present new, efficient meth-
ods for finding invalid signatures in some pairing-based batches. We specify these
methods for the Cha-Cheon signature scheme of [5]. However, these methods are
applicable to other pairing-based schemes with similar form, such as BLS short
signatures [2] when all signatures in the batch are applied to the same message
or signed by the same signer.
2 Background
from inserting invalid signatures that may cancel each other out, resulting in a
batch that appears valid.
Small exponents test:
Input: a security parameter l, a generator g of the group G of prime order q, and
(x1 , y1 ), (x2 , y2 ), . . . , (xn , yn ) with xi ∈ Zq and yi ∈ G.
Check: That g xi = yi for all i, 1 ≤ i ≤ n.
1. Choose n random integers r1 , . . . , rn in the range [0, 2l − 1].
n n
2. Compute x = xi ri and y = y i ri .
i=1 i=1
3. If g x = y then accept; else reject.
The probability that this test accepts a batch containing invalid signatures is
at most 2−l [1]. The order of G must be prime to prevent a weakness described
in [3]. Observe that we can set r1 = 1 without any impact on the security of this
test.
are shorter than batch signatures, but when a batch verification fails they do
not provide enough information to allow identification of the bad signatures.
Cheon et al. claimed that batch verification is not secure for Cha-Cheon and
demonstrated an attack. However, their attack is for a particular batch verifica-
tion scheme and they did not consider the batch verification methods of [1].
By applying the small exponents test to the Cha-Cheon signature we can
obtain an efficient batch verification method that can support verification of
multiple signatures by distinct signers on distinct messages. The verifier obtains
N messages mk , for k = 1 to N , and the signature (Uk , Vk ) and signer’s identity
for each message. The verifier derives each public key Qk from the signer’s iden-
tity. The verifier sets r1 = 1 and generates random values rk from [0, 2l − 1], for
k = 2 to N .
The batch is valid if
N N
e rk (Uk + H(mk , Uk ) · Qk ), S = e rk Vk , T . (1)
k=1 k=1
If this equality does not hold, then at least one signature in the batch is not
valid.
This batch verification requires only two pairings (and some other relatively
inexpensive operations). This is much more efficient than the aggregate scheme
of [6], which requires N + 1 pairings.
Costs for Simple Binary Search. If there is only one invalid signature in the
batch, there will be at most 2 verifications for each non-root level of the tree.
Therefore, as shown in [11], the maximum number of verifications to find a single
invalid signature after a batch has failed is 2log2 N .
If there are 0 < w < N/2 invalid signatures in a batch of N signatures, the
worst-case cost is 2(2log2 w − 1 + w(log2 N − log2 w)) batch verifications
when the tree is perfectly balanced. If w > N/2 then the worst-case cost is the
same as the cost for w = N/2.
Pastuszak et al. [11] also observed that if the verifier knows in advance that
the batch contains exactly one invalid signature, then the number of verifica-
tions can be reduced to log2 N . In the following section, we will show how to
modify Simple Binary Search to find a single invalid signature with log2 N ver-
ifications without advance knowledge of the number of invalid signatures. This
modified method also reduces the worst-case cost when there are multiple invalid
signatures.
For example, the Cha-Cheon Batch verification method of Section 2.2, equa-
tion (1), is equivalent to this test, where
Bk = rk (Uk + H(mk , Uk )Qk ) ,
Dk = rk Vk ,
P = S, and
R = −T.
Binary Quick’s worst-case cost (beyond the initial batch verification) is half
that of Simple Binary Search. If there are 0 < w < N/2 invalid signatures in a
batch of N signatures, the worst-case cost for this new method is
batch verifications when the tree is perfectly balanced. If w > N/2 then the cost
is the same as the cost for w = N/2.
These new methods make use of the following observation. We can insert
integer multipliers mj,k into equation (2) to obtain
N N
αj = e mj,k Bk , P e mj,k Dk , R
k=1 k=1
N
mj,k
αj = Xk .
k=1
Input: A bad batch of N message / signature pairs to be verified, along with the
identities of each signer.
Output: A list of the invalid signatures.
1. Perform an computation similar to the batch computation of equation (2),
but first multiply each Bk and Dk by the signature identifier k, (k = 1
through N ):
N N
α1 = e kBk , P e kDk , R .
k=1 k=1
Finding Invalid Signatures in Pairing-Based Batches 41
Input: A bad batch of N message / signature pairs to be verified, along with the
identities of each signer.
Output: A list of the invalid signatures.
Stage 1. Divide the N signatures into Z sectors of T ≈ N Z signatures each. Label
the sectors s1 through sZ . This stage will identify the bad sectors.
1. Compute
⎛ ⎛ ⎞ ⎞ ⎛ ⎛ ⎞ ⎞
Z Z
β1 = e ⎝ j⎝ Bk ⎠, P ⎠ e ⎝ j⎝ Dk ⎠, R⎠ .
j=1 k∈sj j=1 k∈sj
Stage 2. Now v bad sectors of T signatures each have been identified. Therefore,
there are at least v invalid signatures in the batch. Set w ← v. Stage 2 will
identify these invalid signatures.
Compute the inverses of α0 (if w is even) and γw−2 , γw−4 , . . . Search for a
w-subset of signatures x1 , . . . , xw , x1 < x2 < . . . < xw such that
w
(−1)t−1 pt
γw = (γw−t ) (8)
t=1
Cost. To simplify the cost computation, we will assume that there are w bad
sectors and exactly 1 invalid signature per sector (w = v), which is the worst case.
This is a reasonable assumption because batch verification is most useful when
most batches are valid. When a batch does fail, the number of invalid signatures
is expected to be very small (unless the batch was intentionally flooded with bad
signatures). In most cases, there is unlikely to be more than one bad signature
in any given sector.
The Stage 1 cost to identify w bad sectors in a batch with Z Sectors will be
the same as the cost for the exponentiation method of Section 4.1 to identify w
bad signatures in a batch of Z signatures. This cost is 2w pairings, 2w(Z − 1)
elliptic curve additions, w − 1 inverses in Fqd and the number of multiplications
√
in Fqd is 2 Z for w = 1 or (w−1)!8
Z w−1 for w ≥ 2.
In Stage 2, Step 1, we need to identify w invalid signatures in w distinct
bad sectors of T = N Z signatures each. (We are assuming w = v so we will be
done after Step 1.) There are wT signatures in the w bad sectors. The costs for
44 L. Law and B.J. Matt
vT
equation (7) are 2w(wT − 1) elliptic curve additions to compute k i Bk and
k=1
vT
k i Dk for i = 1 to w (see Appendix B), and 2w pairings to compute the γi ’s.
k=1
For equation (8), we will need to compute w2 inverses in Fqd .
Finally, we need to solve equation (8) for x1 , . . . , xw , where 1 ≤ xi ≤ wT .
If w = 1, then this equation reduces to the discrete logarithm problem in Fqd ,
where the exponents are from an interval of length T . This can be solved using
square-root
√ methods such as Shanks’ baby-step giant-step method [12] with only
2 T multiplications in Fqd .
For w ≥ 2, we can solve equation (8) for x1 , . . . , xw with (w−1)! 8
(wT )w−1
multiplications in Fqd (see Appendix A).
The approximate upper bound for the total cost for both stages of the Ex-
ponentiation with Sectors method to identify w bad signatures in a batch of N
signatures (assuming exactly one bad signature per sector) is 4w pairings, 2w(Z+
Z −2) elliptic curve additions, 1.5w −1
wN
1/2
inverses in Fqd and the number
of mul-
w−1
N 8 wN
tiplications in Fqd is: 2 Z 1/2 + Z for w = 1 and (w−1)! Z w−1 + Z
for w ≥ 2.
To minimize the cost, we need to select the number of sectors, Z, to balance the
work in Stage 1 and Stage√2. We can minimize the work for the most likely case,
w = 1, by choosing
√ Z = N sectors. In this case the total cost is 4w pairings,
2w((w + 1) N − 2) elliptic curve additions, 1.5w − 1 inverses in Fqd and the
8(w w−1 +1) (w−1)/2
number of multiplications in Fqd is 4(N )1/4 for w = 1 and (w−1)! N
for w ≥ 2.
5 Performance
Table 1 summarizes the approximate upper bound for the number of opera-
tions to identify a small number of invalid signatures in a bad batch for each of
the three new methods presented in this paper, and compares them to the cost
of Simple Binary Search and to the cost of verifying each signature individu-
ally. For each batch method, we have omitted the cost of the initial verification
of the entire batch. Note that other computational techniques exist that may
lower these costs in some cases, such as techniques for computing products of
pairings [8].
As shown in Table 1, Binary Quick Search is twice as fast as the worst case
for Simple Binary Search. The Exponentiation and Sector methods use fewer
pairings than Binary Quick Search, but the number of multiplications in F (q d )
for these methods increases proportionally to a power of the batch size. For very
large batch sizes, Binary Quick Search will always be the best method. However,
for reasonably sized batches of mostly valid signatures, the Exponentiation or
Sector method will often be the most efficient.
Finding Invalid Signatures in Pairing-Based Batches 45
Batch Size
w Method 16 64 256 1024 4096
N Sectors 3.67·1004
3.69·1004
3.73·1004
3.82·10 3.97·1004
04
N Sectors 7.48·1004
7.67·1004
8.07·1004
8.85·10 1.04·1005
04
Plus N point multiplications by a scalar the size of the group order r.
46 L. Law and B.J. Matt
Tables 2 and 3 compare methods for finding invalid signatures in bad batches
for Cases A and C of [7]. In Case A, the group order r is a 160-bit value, the
elliptic curve E is defined over Fq , where q is a 160-bit value, and the embedding
degree d = 6. In Case C, the group order r is a 256-bit value, q is a 256-bit value,
and the embedding degree d = 12. All costs are given in terms of the number of
multiplications (m) in Fq using the following estimates from [7]:
Batch Size
w Method 16 64 256 1024 4096
N individual 1.44·10 06
5.76·10 06
2.30·1007
9.21·10 07
3.68·1008
N Sectors 5.54·1005
6.41·10 9.89·10 2.38·10
05 05 06
7.91·1006
N Sectors 9.50·1005
2.70·1006
1.67·1007
1.29·1008
1.02·1009
Finding Invalid Signatures in Pairing-Based Batches 47
To indicate the best method for each batch size and number of invalid signatures,
the table entry with the lowest cost is given in brackets.
The results in Table 2 for Case A show that the Exponentiation method is the
most efficient method when there are one or two invalid signatures in a batch of
up to 256 signatures, with costs that are as much as 83% lower than the cost of
Binary Quick Search and 92% lower than Simple Binary Search. For batches of
1024 √ to 4096 signatures with one or two invalid signatures, the Sector method
with N sectors is the most efficient, with costs that are up to 82% lower cost
than Binary Quick Search and 91% lower than Simple Binary Search. If the batch
size is large enough, Binary Quick Search will be the most efficient method, and
the size at which this happens is smaller if there are more invalid signatures
in the batch. However, when there are 4 invalid signatures, the Exponentiation
method is still 22% faster than Binary Quick Search, and 61% faster than Simple
Binary, for batches of 16 signatures.
The results in Table 3 for Case C show that the benefit of using the Expo-
nentiation and Sector methods can be even more significant at higher security
levels. For example, the cost of the Exponentiation or Sector methods are up to
87% less than the cost of Binary Quick Search, and up to 94% less than the cost
of Simple Binary Search, for batches with up to 4096 signatures in which one or
two signatures are invalid.
6 Conclusion
We have presented two new methods for identifying invalid signatures in pairing-
based, batch signature schemes with low numbers of invalid signatures, and have
analyzed their performance. These methods are applicable to batch verification
schemes employing small exponent techniques such as the Cha-Cheon scheme
described here, or BLS [2] short signatures when all signatures in the batch are
applied to the same message or signed by the same signer. These new methods
offer significant speedups for such schemes.
We have presented Binary Quick Search, an improvement to previous “divide-
and-conquer” methods. This method is better suited for identifying larger num-
bers of invalid signatures, especially in large batches, than our other methods,
and has application to batch signature schemes that do not use pairings, includ-
ing [1,3,17].
References
1. Bellare, M., Garay, J., Rabin, T.: Fast Batch Verification for Modular Exponen-
tiation and Digital Signatures. In: Nyberg, K. (ed.) EUROCRYPT 1998. LNCS,
vol. 1403, pp. 236–250. Springer, Heidelberg (1998)
2. Boneh, D., Lynn, B., Shacham, H.: Short Signatures from the Weil Pairing. In:
Boyd, C. (ed.) ASIACRYPT 2001. LNCS, vol. 2248, pp. 514–532. Springer, Hei-
delberg (2001)
48 L. Law and B.J. Matt
3. Boyd, C., Pavlovski, C.: Attacking and Repairing Batch Verification Schemes. In:
Okamoto, T. (ed.) ASIACRYPT 2000. LNCS, vol. 1976, pp. 58–71. Springer, Hei-
delberg (2000)
4. Camenisch, J., Hohenberger, S., Pedersen, M.: Batch Verification of Short Sig-
natures. In: EUROCRYPT 2007. LNCS, vol. 4515, pp. 246–263. Springer, Hei-
delberg (2007), See also Cryptology ePrint Archive, Report 2007/172 (2007),
[Link]
5. Cha, J., Cheon, J.: An Identity-Based Signature from Gap Diffie-Hellman Groups.
In: Desmedt, Y.G. (ed.) PKC 2003. LNCS, vol. 2567, pp. 18–30. Springer, Heidel-
berg (2002)
6. Cheon, J., Kim, Y., Yoon, H.: A New ID-based Signature with Batch Verification,
Cryptology ePrint Archive, Report 2004/131 (2004),
[Link]
7. Granger, R., Page, D., Smart, N.P.: High Security Pairing-Based Cryptography
Revisited. In: Hess, F., Pauli, S., Pohst, M. (eds.) ANTS VII. LNCS, vol. 4076, pp.
480–494. Springer, Heidelberg (2006)
8. Granger, R., Smart, N.P.: On Computing Products of Pairings, Cryptology ePrint
Archive, Report 2006/172 (2006), [Link]
9. Lee, S., Cho, S., Choi, J., Cho, Y.: Efficient Identification of Bad Signatures in
RSA-Type Batch Signature. IEICE Transactions on Fundamentals of Electronics,
Communications and Computer Sciences E89-A(1), 74–80 (2006)
10. Naccache, D., M’Raihi, D., Vaudenay, S., Raphaeli, D.: Can D.S.A. be improved?
Complexity Trade-offs with the Digital Signature Standard. In: De Santis, A. (ed.)
EUROCRYPT 1994. LNCS, vol. 950, pp. 77–85. Springer, Heidelberg (1995)
11. Pastuszak, J., Michalek, D., Pieprzyk, J., Seberry, J.: Identification of Bad Signa-
tures in Batches. In: Imai, H., Zheng, Y. (eds.) PKC 2000. LNCS, vol. 1751, pp.
28–45. Springer, Heidelberg (2000)
12. Shanks, D.: Class Number, a Theory of Factorization and Genera. Proc. Symp.
Pure Math. 20, 415–440 (1969) (AMS 1971)
13. Solinas, J.: Low-Weight Binary Representations for Pairs of Integers, Technical
Report CORR 2001-41, Centre for Applied Cryptographic Research (2001)
14. Solinas, J.: Personal communication
15. Stanek, M.: Attacking LCCC Batch Verification of RSA Signatures, Cryptology
ePrint Archive, Report 2006/111 (2006), [Link]
16. Sury, B., Wang, T., Zhao, F.: Identities Involving Reciprocals of Binomial Coeffi-
cients. Journal of Integer Sequences 7, Article 04.2.8 (2004)
17. Yen, S., Laih, C.: Improved Digital Signature Suitable for Batch Verification. IEEE
Transactions on Computers 44(7), 957–959 (1995)
18. Yoon, H., Cheon, J.H., Kim, Y.: Batch verifications with ID-based signatures. In:
Park, C., Chee, S. (eds.) ICISC 2004. LNCS, vol. 3506, pp. 223–248. Springer,
Heidelberg (2005)
1 ≤ xi ≤ M.
t−1
For equation (4): B = αw , M ← N and At = (αw−t )(−1) for t = 1 to w.
(−1)t−1
For equation (6): B = βw , M ← Z and At = (βw−t ) for t = 1 to w.
(−1)t−1
For equation (8): B = γw , M ← wN
Z and At = (γw−t ) for t = 1 to w.
If we raise both sides of equation (10) to the 4th power and observe that 4x1 x2 =
(x2 + x1 )2 − (x2 − x1 )2 , equation (10) becomes
(x2 +x1 )2 (x2 −x1 )2
B 4 (A−4
1 )
(x2 +x1 )
(A2 −1 ) = (A2 −1 ) .
This can be written as
2 2
δ0 (δ1 )s (δ2 )(s) = (δ2 )(m) (11)
where
δ0 = B 4 , δ1 = A1 −4 , δ2 = A2 −1
s = x2 + x1 , m = x2 − x1
1 ≤ s ≤ 2M − 1
1 ≤ m ≤ M − 1.
To solve equation (11), the M − 1 possible values for the right hand side of the
equation, RHS(i) , are computed and stored in a search tree. Then the 2M − 1
values for the left side, LHS(i) , are computed and compared, each in log M time,
with the stored values. If a match is found, the values x1 and x2 can be easily
computed. To compute the values for the right hand side
Computing the values for the left hand side of equation (11) is performed in two
2
stages. In the first stage, the values (δ2 )(i) , which have already been computed
for the right hand side, are re-used to reduce the number of multiplications.
50 L. Law and B.J. Matt
Stage 1:
(3) (3)2 (3)2
1. Compute ζ3 = δ0 δ1 , lookup δ2 and compute LHS3 = ζ3 δ2 .
2. For 4 ≤ i < M , compute
(a) ζ(i) = ζ(i−1) δ1 ,
(i)2 (i)2
(b) lookup δ2 and compute LHS(i) = ζ(i) δ2 .
Stage 2:
1. For M ≤ i < 2M compute
(a) ζ(i) = ζ(i−1) δ1 ,
(b) (δ2 )(2i−1) = (δ2 )(2i−3) (δ2 )(2) ,
2 2
(c) (δ2 )(i) = (δ2 )(i−1) (δ2 )(2i−1) and
2
(d) LHS(i) = ζ(i) (δ2 )(i) .
Cost.
Computing the values for the right hand side requires 2M multiplications. Com-
puting the values for the left hand side requires 2M multiplications for Stage 1
and 4M for Stage 2. The total cost of using the Factor method for w = 2 is no
more than 8M multiplications in Fqd .
The Factor method can be used with the values δ0 , δ1 and δ2 as shown above,
with 1 ≤ s ≤ 2x3 − 3 and 1 ≤ m ≤ x3 − 1.
Finding Invalid Signatures in Pairing-Based Batches 51
Cost.
M −2
The Factor method is used a maximum of times to test equation (9).
w−2
Therefore, for w ≥ 2, the cost of all calls to the Factor method is bounded by
M −2 8
8M < M w−1
w−2 (w − 2)!
multiplications in Fqd .
We can establish a tighter upper bound if we consider the fact that x1 and
x2 must lie in the range [1, x3 − 1] instead of [1, M ]. The number
of times the
M − x3
Factor method is called for any given value of x3 is no more than .
w−3
Therefore, excluding the cost of computing the δ’s, the cost of the using the
Factor method for w ≥ 3 is
M−(w−3)
M − x3
8 (x3 − 1)
w−3
x3 =3
8
M−w+3
≤ x (M − x)w−3 (12)
(w − 3)! x3 =3
multiplications in Fqd .
The most significant term of (12) can be written as
⎛ ⎞
w−2
8 w−3 1
M w−1 ⎝ (−1)j−1 ⎠.
(w − 3)! j−1 j + 1
j=1
Cost of computing the δ’s. We also need to compute the different δ0 , δ1 and δ2
required for each use of the Factor method.
w−2
ut
w−2
ut
w−2
δ0 = B 4 (A−4
t ) , δ1 = (A−4
t+1 ) , δ2 = Aut+2
t
.
t=1 t=0 t=0
52 L. Law and B.J. Matt
ut
To compute δ0 in the following algorithm, all possible values of each (A−4 t ) are
computed and combined to produce the value of δ0 for each possible combination
of the values x3 , . . . , xw .
ut
Next, all possible values of (A−4 t ) are computed
for each t. Since the max-
w−2 t
imum value of each ut is less than M , we can compute all possible
t
ut w−2
values of (A−4
t ) in M t multiplications.
t
Finally, we compute the δ’s. We can compute all possible values of δ0 by
u1
computing all possible values for η1 = B 4 (A−4 1 ) and then computing all pos-
t ut
sible values for ηt = B 4
(Az ) , for 2 ≤ t ≤ w − 2, from ηt−1 and (A−4
−4 uz
t ) .
z=1
M
Since there are less than possible values of x3 , . . . , xw , we can compute
w−2
M
δ0 = ηw−2 with (w − 3) multiplications.
w−2
The method computes δ1 and δ2 in a similar fashion. The total number of
multiplications required to compute the δ’s is bounded by
w−2
w − 2
M 3 (w−3) w−2
t
3 M +(w−3) < 3 (M+1)w−2 + M . (14)
t w−2 (w−2)!
t=1
The total cost to iteratively use the Factor Method is the sum of equations (13)
and (14), but this cost is dominated by equation (13). Therefore, the approximate
number of multiplications in Fqd to solve equation (9) is
8
M w−1 (15)
(w − 1)!
for w ≥ 2.
N
t
SU Mt = k Pk (16)
k=1
for t = 1 to w. Computing these values in the obvious way would require w(N −1)
elliptic scalar multiplications by a log2 N bit-integer and w(N − 1) elliptic curve
additions. We show a method due to Solinas [14] to compute these w quantities
with only w(N − 1) elliptic curve additions.
Finding Invalid Signatures in Pairing-Based Batches 53
First, we compute
N
t+k−1
Ut = Pk
t
k=1
The cost of this algorithm is w(N − 1) elliptic curve additions. (We don’t count
the cost for the first time through the loop because the computations for t = 0
can be computed during the initial batch verification.)
We can now compute SU Mt (equation (16)) from U1 , . . . , Ut :
t
SU Mt = (−1)t−k (k!)st,k Uk (17)
k=1
where the st,k ’s are the Stirling numbers of the second kind. We can compute
SU Mt , for t = 1 to w, with only O(w2 ) operations:
SU M1 ← U1
s0 ← 0
s1 ← 1
For i = 2 to w
si ← 0
Next i
For t = 2 to w
SU Mt ← 0
For k from t downto 1 do
sk ← sk−1 + ksk
SU Mt ← k (−1)t−k sk Uk + SU Mt
Next k
Return SU Mt
Next t
For large N and small w, we can ignore the O(w2 ) operations. Therefore, the
total cost of computing SU Mt , for t = 1 to w, is approximately w(N − 1) elliptic
curve additions.
How to Forge a Time-Stamp
Which Adobe’s Acrobat Accepts
Abstract. This paper shows how to forge a time-stamp which the latest
version of Adobe’s Acrobat and Acrobat Reader accept improperly. The
target signature algorithm is RSASSA-PKCS1-v1 5 with a 1024-bit pub-
lic composite and the public key e = 3, and our construction is based
on Bleichenbacher’s forgery attack presented in CRYPTO 2006. Since
the original attack is not able to forge with these parameters, we used
an extended attack described in this paper. Numerical examples of the
forged signatures and times-stamp are also provided.
1 Introduction
In the rump session of CRYPTO 2006, held on August 2006, Bleichenbacher pre-
sented a new forgery attack [6] against the signature scheme RSASSA-PKCS1-
v1 5 (PKCS#1v1.5 for short) defined in PKCS#1 [13] and RFC 3447 [16], a
cryptographic standard developed and maintained by RSA Laboratories [13].
The attack allows an adversary to forge a valid signature on an (almost) arbi-
trary message in a very simple way, if an implementation of the signature scheme
is loose, namely, a format check in the verification is not adequate. In fact, sev-
eral implementations of PKCS#1v1.5 including OpenSSL, Firefox2 and Sun’s
JRE (Java Runtime Environment) library had this vulnerability. In response to
Bleichenbacher’s attack, US-CERT published a vulnerability note on September
2006 [7], and these implementations resist the attack now.
Since Bleichenbacher’s presentation was limited to the case when the bit-
length of the public composite n (denoted by |n|) is 3072 and the public exponent
e is 3, applicability to other parameters was unclear. Though Tews showed the
applicability of the extended forgery attack when |n| = 1024 and e = 3 [19],
other cases such as e = 17, 65537 has not been discussed yet.
In this paper, we analyze Bleichenbacher’s forgery attack and show applica-
ble composite sizes for given exponents. Then we propose the extended attack
with assuming the same implementational error, which is a generalization of the
S.D. Galbraith (Eds.): Cryptography and Coding 2007, LNCS 4887, pp. 54–72, 2007.
c Springer-Verlag Berlin Heidelberg 2007
How to Forge a Time-Stamp Which Adobe’s Acrobat Accepts 55
original attack and Tew’s extended attack. For fixed n and e, the success proba-
bility of the proposed attack is 2(|n|−15)/e−353 in the random oracle model. When
|n| = 1024 and e = 3, the proposed attack succeeds the forgery with probabil-
ity 2−16.6 which coincides the Tew’s experiment [19]. Note that the preliminary
version of the proposed attack was published in [9].
In the proposed attack, the success probability of a forgery on the chosen
message is 2(|n|−15)/e−353 . However, when the message is ‘redundant’, namely,
it includes supplementary data (such as a name of used tool, a name of author,
date) besides a body of the message and whose size is large enough, the adver-
sary can forge on the chosen message by changing the redundant part. As an
example of this scenario, we show how to forge a time-stamp defined in RFC
3161 [4] (in which 64-bit nonce space is available) with our proposed attack. Fi-
nally and most importantly, we check some verification client programs whether
they accept forged time-stamps by (1) the proposed attack and (2) a variant of
Bleichenbacher’s attack by Oiwa et al. [11]., As a result, a forged time-stamp
by the proposed attack embedded in a PDF (Portable Document Format) file
was improperly accepted by the latest version of Adobe’s Acrobat and Acrobat
Reader 1 .
The rest of this paper is organized as follows: in section 2, Bleichenbacher’s
forgery attack against PKCS#1v1.5 and analytic results are described. Then the
extended attack is proposed in section 3, and its application to the time-stamp
scheme is described in section 4. Some numerical examples of forged signatures
are in the appendix.
2 Bleichenbacher’s Attack
This section describes Bleichenbacher’s forgery attack [6] against RSASSA-
PKCS1-v1 5 (PKCS#1v1.5 for short) with the loose implementation. Let n be
an RSA composite whose size is denoted by |n| (in bit). In the followings, a
variable in the typewriter font denotes an octet string and a variable in the
Roman font denotes an integer. Two variables in the same letter correspond to
each other, namely, A is an octet representation of an integer A, vice versa.
2.1 RSASSA-PKCS1-v1 5
Let us introduce the signature scheme RSASSA-PKCS1-v1 5 defined in PKCS#1
[13]. For a given public composite n (a product of two large primes with same
size) such that |n| is a multiple of 8, a message m (to be signed) is encoded to
an integer M , an integer representation of an octet string M defined by
where PS is an octet string with ff such that |M| = |n| (and |PS| ≥ 64), T is an
identifier of the signature scheme and the hash function (Table 1), and H is an
1
The authors have already submitted the vulnerability report to a governmental or-
ganization.
56 T. Izu, T. Shimoyama, and M. Takenaka
M = 00||01||PS||00||T||H .
Then the verifier obtains a value H , an integer representation of the octet string
H , and compares whether H = H(m). If this equation holds, the signature is
accepted by the verifier.
In the implementation level, a part of the format check is sometimes inade-
quate by some reasons. For example, when an octet string
00||01||PS||00||T||H ||garbage.
Next, let us introduce Bleichenbacher’s forgery attack [6] against PKCS#1 v1.5.
Here we assume that the hash function SHA-1 and parameters |n| = 3072 and
e = 3 are used [8]. In the attack, an adversary chooses a message m̄ with arbitrary
bit-length such that
a = 2288 − (T × 2160 + H(m̄))
is divisible by 3, where T is an integer representation of the octet string TSHA1
(as in Table 1). Note that such m̄ can be obtained by generating m̄ randomly (3
trials are required on average). The adversary also computes two integers
Observe that
s̄e = (21019 − a/3 × 234 )3
= 23057 − a × 22072 + a2 /3 × 21087 − a3 /27 × 2102
= 23057 − 22360 + T × 22232 + H(m̄) × 22072 + g
= (2985 − 2288 + T × 2160 + H(m̄)) × 22072 + g.
Since an integer 2985 − 2288 + T × 2160 + H(m̄) corresponds to an octet string
00||01||ff...ff||00||T||H (the number of ff is different from that of the original
PS), s̄ is a forged signature on the message m̄, if an implementation of the
verification ignores the number of ff and the garbage g. In the forgery, the
adversary only requires to compute H(m̄), a and s̄. This is why the attack is
called “the pencil and paper attack” [6]. Note that the adversary does not use
modulus computations and thus integers n, d are not required in the forgery.
A numerical example of Bleichenbacher’s forgery attack with a 3072-bit com-
posite and e = 3 is shown in Table 7 in appendix A.
2.3 Analysis
This subsection analyzes Bleichenbacher’s forgery attack with general parame-
ters. Only SHA-1 is considered in the following, however, similar attacks and
analysis can be easily obtained for other hash functions. For simplicity, we con-
sider the public composite n with arbitrary length (rather than a multiple of 8).
Firstly, we consider the case with general n but e = 3. Since the padding
00||TSHA1 is 128-bit and the hash value is 160-bit, we use the same a as in the
original attack, namely a = 2288 − (T × 2160 + H(m̄)) such that 3|a. Let
s̄(α, β) = 2α − a/3 × 2β ,
be a forged signature. Then, we have
s̄(α, β)3 = 23α − a × 22α+β + g(α, β)
for the garbage g(α, β) = a2 /3 × 2α+2β − a3 /27 × 23β . Since s̄(α, β)3 should be in
the PKCS#1v1.5 format, we have 3α = |n|−15, namely, α = (|n|−15)/3 and |n|
should be divisible by 3. On the other hand, since the garbage should be smaller
than 22α+β , we have 2α+β > 576+α+2β−log2 3, namely, β < |n|/3−581+log2 3.
By substituting β ≥ 0 in this inequality, we have a condition on n that
|n| > 1743 − 3 log2 3 = 1738.24....
Consequently, Bleichenbacher’s attack with e = 3 is applicable to the case with
|n| ≥ 1739 with |n| is divisible by 3. More precisely, |n| can be parameterized by
|n| = 3k for k ≥ 580 and β is in a form β = 8 + 2 (0 ≤ ≤ 55) since PS is a
repetition of the octet string ff.
Next, let us discuss with general n and e. Similar to the above discussion, we
set s̄(α, β) = 2α − a/e × 2β for a = 2288 − (T × 2160 + H(m̄)) such that e|a and
α = (|n| − 15)/e. Then, we have
s̄(α, β)e = 2eα − a × 2(e−1)α+β + g(α, β)
58 T. Izu, T. Shimoyama, and M. Takenaka
and |n| − 15 is divisible by e. Also, we have 0 ≤ β < |n|/3 − 581 + log2 3 and
β ≡ 2 (mod 8) on β. Especially, we have |n| = 17k + 15 (k ≥ 575) for e = 17,
and |n| = 65537k + 15 (k ≥ 1061) for e = 65537. Consequently, Bleichenbacher’s
attack for general e is far from feasible. Even if e = 3, Bleichenbacher’s attack
cannot be applicable to 1024-bit (since 1024 is smaller than 1739) or 2048-bit
composites (since n − 15 = 2033 is not divisible by 3, 17, 65537).
where T denotes an integer representation of the octet string TSHA1 (Table 1).
Note that the integer 2192 − 2128 + T in the above equation represents √ an octet
e
string 00||01||ffffffffffffffff||00||T.
√ Next, compute√ the
e e-th root f as a
real number and its ceiling e
f . If the difference g = e
f − f is smaller than
√ √
2|n|−368 , the forgery succeeds, since the forged signature s̄ = e f + g = e f is
valid on the message m̄ with the garbage g. If g is not small, change the message
m̄ until the forgery succeeds.
Let us analyze the proposed forgery attack with general n and e. In the
failure case, some least significant
√ bits of H(m̄) in f , say t bits, differs from
the corresponding part in e f e (in other words, these t bits coincide in the
successful case), where t is a parameter determined by n√and e (see Figure 1).
In the forgery, f is (|n| − 15)-bit
√ and the integer part of e f is (|n| − 15)/e-bit,
and the uncontrolled part of f e is (e − 1)(|n| − 15)/e-bit. Thus we have a
e
Here we implicitly used the random oracle assumption. Especially, when |n| =
1024 and e = 3, this condition implies that t > 50/3 ≈ 16.6. That is, in order to
forge a signature with 1024-bit composites, the proposed forgery attack succeeds
60 T. Izu, T. Shimoyama, and M. Takenaka
m̄ “00002e36”
H(m̄) 701f0dd6 f28a0bab 4b647db8 ddcbde40 1f810d4e
f 0001ffff ffffffff ffff0030 21300906 052b0e03 021a0500 0414701f 0dd6f28a
0bab4b64 7db8ddcb de401f81 0d4e0000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
s̄ 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 0001428a 2f98d728 ae220823
1fc5cff6 ac440735 9b078378 24846240 4cebfc71 5690f34c 7119d1da 99227fd0
s̄e 0001ffff ffffffff ffff0030 21300906 052b0e03 021a0500 0414701f 0dd6f28a
0bab4b64 7db8ddcb de401f81 0d4e 06dd 391b3fd4 ace323ee de903694 dd78887f
5f8a73e0 5ea698ae 72a6bdfa cb7c359e 1f78cbee 96939eea 4d9b8f3e 47aebae3
90f4fe61 73ef7535 80c4cb88 edd95623 84b7e5ed ccc19fa3 ca64c0a2 a37e5000
with probability 2−16.6 , namely, 216.6 messages are required to forge a signature,
which is feasible in practice. Note that the proposed attack is a generalization
of the extension by Tews [19] in which 275992 ≈ 218.1 messages are required in
the experiment.
In the above construction, the number of the octet ff in f was fixed to 8 (this
is minimum for the forgery). Similar construction is possible with more octets
than 8, but requires larger composites instead.
require a condition on the target message m̄ and the attack always succeeds. As
a numerical example, a forged signature on the message m̄ (“[Link]”
[14]) with |n| = 1152 and e = 3 in Table 8 in appendix B, which succeed a
forgery for e = 3. Note that Bleichenbacher’s original attack cannot forge for
1152-bit composites nor the exponent e = 3.
On the other hand, when we set t = 160, the attack becomes most powerful
but the adversary can not control the hash value at all. In this case, the condition
(1) implies
|n| > 193e + 15 (3)
which is obtained by substituting t = 160 into the condition (1). Consequently,
we have |n| > 595 for e = 3, |n| > 3297 for e = 17 and |n| > 12648657 for
e = 65537. However, since the adversary can not control the hash value, the
success probability (in the sense that the adversary obtains the target message
m̄) is 2−160 which is beyond feasible. Another forged signature on the hash value
3.3 Comparison
A comparison between the original and proposed attacks are shown in Table 3,
where M (e) denotes the minimum bit-length of the composites to which the
attack succeeds with a general exponent e. Since exponents e = 3, 17, 65537 are
widely used, corresponding values M (3), M (17), M (65537) are also included in
the comparison. As in the table, the proposed attack with t = 160 forges with
smallest composites. Especially, it only forges for |n| = 1024 (with e = 3).
4 Time-Stamp Forgery
In the previous section, we proposed a forgery attack against PKCS#1v1.5 based
on Bleichenbacher’s attack. When |n| = 1024 and e = 3, the success probability
62 T. Izu, T. Shimoyama, and M. Takenaka
with his secret key and publishes it as a time-stamp on the document m and the
random value. By verifying the time-stamp, a verifier confirms the existence of
the document at the time described in genTime. An outline of the time-stamp
protocol is shown in Figure 2.
In the time-stamp protocol [4], PKCS#1v1.5 with SHA-1 can be used as a sig-
nature scheme. The center column in Table 4 shows an example of a time-stamp
issued by a trial time-stamp server maintained by Seiko Instruments Inc. [17] at
2006-09-21 [Link].64 on the document m (“[Link]” [15]) based on
PKCS#1v1.5 (|n| = 1024 and e = 3) with SHA-1. TSTInfo and signerInfos are
in PKCS#1v1.5 format. A verification result (se mod n) is also included in the
table, where underlined octets correspond to a hash value of signerInfos.
Table 4. (continued)
Fig. 3. Verification with the forged time-stamp by Adobe’s Acrobat Reader 8.00 (1)
Fig. 4. Verification with the forged time-stamp by Adobe’s Acrobat Reader 8.00 (2)
5 Concluding Remarks
This paper analyzes Bleichenbacher’s forgery attack against the signature scheme
RSASSA-PKCS1-v1 5 (PKCS#1v1.5) with the implementation error, and pro-
posed an extended attack. As an example, we forged a time-stamp with 1024-bit
composite and the exponent 3, and showed that the latest version of Adobe’s
Acrobat and Acrobat Reader accept the forged time-stamp improperly. Resist-
ing the original and proposed forgery attacks is easy and simple: fixing the loose
implementation is enough. Avoiding small exponents might be another counter-
measure, however, once a certificate with exponent e = 3 is issued by a trusted
party, one cannot refuse it when the verification is accepted.
As described in this paper, the proposed attack succeeds a forgery on an arbi-
trary message with redundancy when |n| = 1024 and e = 3. Though this paper
only dealt with the time-stamp, similar forgery is possible on other messages
with redundancy. One future work is a signature forgery on a message in PDF
or PS files and other is a certificate forgery. Searching loose implementations
which accept these forgeries is also required.
Acknowledgements
The authors would like to thank the program committee of the conference and
anonymous reviewers on the preliminary version of this paper for their helpful
comments and suggestions.
68 T. Izu, T. Shimoyama, and M. Takenaka
References
1. Adobe Systems Inc., Adobe Acrobat family,
[Link]
2. AEC, TrustPort. [Link]
3. Amano, E-timing EVIDENCE Verifier for Acrobat (in Japanese),
[Link]
4. Adams, C., Chain, P., Pinkas, D., Zuccherato, R.: Internet X.509 Public
Key Infrastructure: Time-Stamp Protocol (TSP), RFC 3161 (August 2001),
[Link]
5. Bleichenbacher, D.: Chosen Ciphertext Attacks against Protocols Based on RSA
Encryption Standard PKCS#1. In: Krawczyk, H. (ed.) CRYPTO 1998. LNCS,
vol. 1462, pp. 1–12. Springer, Heidelberg (1998)
6. Bleichenbacher, D.: Forging Some RSA Signatures with Pencil and Paper. In:
Dwork, C. (ed.) CRYPTO 2006. LNCS, vol. 4117, Springer, Heidelberg (2006)
7. US-CERT, Multiple RSA Implementations Fail to Properly Handle Signatures,
Vulnerability Note VU#845620 (September 5, 2006),
[Link]
8. Finney, H.: Bleichenbacher’s RSA Signature Forgery Based on Implementation
Error. e-mail (August 27, 2006),
[Link]
9. Izu, T., Takenaka, M., Shimoyama, T.: Analysis on Bleichenbacher’s Forgery At-
tack. In: WAIS 2007, pp. 1167–1174. IEEE Computer Society, Los Alamitos (2007)
10. NTT Communications, Certificates for the Internal Credit Application CA. (in
Japanese) [Link]
11. Oiwa, Y., Kobara, K., Watanabe, H.: A New Variant for an Attack Against RSA
Signature Verification using Parameter Field. In: EUROPKI 2007 (June 2007)
12. PFU, PFU time-stamp service (in Japanese), [Link]
13. RSA Laboratories, RSA PKCS #1 v2.1: RSA Cryptography Standard (June 14,
2002)
14. A digital file of [13] in WORD format,
[Link]
15. A digital file of [13]in PDF format,
[Link]
16. RSA Laboratories, Public-Key Cryptography Standards (PKCS) #1:
RSA Cryptography Specifications Version 2.1, RFC 3447 (February 2003)
[Link]
17. Seiko Instruments Inc., a trial time-stamp service (in Japanese),
[Link]
18. Seiko Instruments Inc., Chronotrust (in Japanese),
[Link]
19. Tews, E.: Real World Exploit for Bleichenbacher’s Attack on SSL. e-mail submitted
to the Cryptography Mailing List (September 14, 2006),
[Link]
How to Forge a Time-Stamp Which Adobe’s Acrobat Accepts 69
m “[Link]” [14]
H(m)f7497dac 551ec010 2f0da8f1 bc8cad52 f93476c3
s 8e33fd97 65de866e 6af1c2ee 0beea1fc 26f7207c 3c9881ef f37876a0 6332d88c
526f8102 93d21d6e 392c248a 1d2b0d6f 2f8ade54 29420bdb 78bd384c 7ef5a52f
2249759e 1edef3f3 88f5d67f c53e8e68 f3dcb403 59716aca 1c3d911d 73fb031d
8cb7b0d3 c3b4a378 02ad1ad5 595859e9 1bd61f51 95e7c275 cc0bfe93 96aee5d2
69474578 7f8b2488 95fd7676 d1dbd964 50cf6ad6 10869c65 aa1520df 508a4376
354b27b5 49677f28 5bcd54e3 b4c3aaa9 1225a955 7e630201 3343b6f8 56de4cbd
af8e227e 4c755675 71c86627 af4ea910 8ecc1d1f 00331169 597d31b5 2028877c
3904b4c1 03077f11 fe4cf28a 79e41bf3 473083ce af4039ae aa92ac62 2826fc90
aef29c49 66bfc99c 01421130 d2b6313d 07031652 1862e9d5 fb3715e7 00fc168b
abc17ac4 c3b1a83c abe59ab6 34e29539 0c51fafa 685aeeb9 c53aa717 c2cb3960
eae314b8 ba09ef93 bef18bea 59502641 08e31ffc 569ed6aa b3f145f8 d0e82466
8d2ca851 e6a279c7 474387ea 3d300923 dbbaa193 a0baf928 2668fa60 469ecc14
se mod n 0001ffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 00302130
0906052b 0e03021a 05000414 f7497dac 551ec010 2f0da8f1 bc8cad52 f93476c3
s̄ 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
07ffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe aaead6ea b6b2b18e
bd595822 b1555ac6 9f0ca790 717e556a e9678bec fb663c6e a19b4904 00000000
How to Forge a Time-Stamp Which Adobe’s Acrobat Accepts 71
Table 7. (continued)
m̄ “[Link]” [14]
H(m̄) f7497dac 551ec010 2f0da8f1 bc8cad52 f93476c3
s̄ 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
07ffffff ffffffff feaaead6 eab6b2b1 8e848b2b fc6229a1 298029f9 27529629
bb642126 87226bf8 913ab27d 52295002
s̄e 0001ffff ffffffff ffff0030 21300906 052b0e03 021a0500 0414f749 7dac551e
c0102f0d a8f1bc8c ad52f934 76c3 0000 008e30ab d25ce35d 65cd0c25 1fc29df3
37419efd 4d08694d f3b45d86 42970cbe ef3cb225 c0e88433 552da1d0 dc35aaa1
73f1189f e0b341fc 56d5c5ea 45db5483 15e79d2a 71b6235a 44891287 00bb02f9
ffabe940 83af15c8 eabb0c30 2fefc008
72 T. Izu, T. Shimoyama, and M. Takenaka
1 Introduction
Boolean functions play a prominent role in the security of cryptosystems. Their
most important cryptographic applications are in the analysis and design of s-
boxes for block ciphers, as well as, filter/combining functions for stream ciphers
[23]. In general, resistance of cryptosystems to various cryptanalytic attacks
depends on the properties of the Boolean functions used. The nonlinearity of
Boolean functions is one of the most significant cryptographic properties; it is
defined as the minimum distance from all affine functions, and indicates the
degree to which attacks based on linear cryptanalysis [21], and best affine ap-
proximations [9], are prevented. For an even number of variables the maximum
possible nonlinearity can only be attained by the so-called bent functions [25].
This work was partially supported by a Greece–Britain Joint Research & Technology
Programme, co-funded by the Greek General Secretariat for Research & Technology
(GSRT) and the British Council, under contract GSRT 132 – C.
S.D. Galbraith (Eds.): Cryptography and Coding 2007, LNCS 4887, pp. 73–91, 2007.
c Springer-Verlag Berlin Heidelberg 2007
74 N. Kolokotronis, K. Limniotis, and N. Kalouptsidis
The appearance of recent attacks, like algebraic [7] and low order approximation
attacks [12,16,18], necessitates the design of Boolean functions that cannot be
approximated efficiently by low degree functions. This problem has also been
studied in [24], where an algorithm to determine good low order approximations
by repetitive Hamming sphere sampling was presented. The computation of the
best rth order approximations and rth order nonlinearity are known to be diffi-
cult tasks, even for the case r = 2 [4]; in particular, the second order nonlinearity
is unknown, with the exception of some special cases, or when the number of
variables is adequately small.
Motivated by the aforementioned need, in this paper we focus on the efficient
computation of best quadratic approximations of a certain class of cubic Boolean
functions. This led to generalizing notions that are familiar from best affine ap-
proximations, e.g. nonlinearity is extended to 2nd order nonlinearity, defined as
the minimum distance from quadratic functions. Explicit formulas are proved
that compute all best affine (resp. quadratic) approximations of the quadratic
(resp. cubic) functions, without use of the Walsh-Hadamard transform, by ap-
plying the Shannon expansion formula. The results obtained are general, and
most importantly, they hold for an arbitrary number of variables; they focus on
the theoretical aspects of the subject rather than the algorithmic ones. Cubic
functions with maximum (within the subset considered in this paper) second or-
der nonlinearity are determined, yielding a lower bound on the covering radius
of R(2, n). It is shown that their structure is similar to that of quadratic bent
functions. Finally, a preliminary analysis of the second-order nonlinearity for
known constructions of bent functions is given, indicating potential weaknesses
when parameters are not properly chosen. Since several constructions of crypto-
graphic primitives, based on quadratic and cubic functions, have been proposed
in the literature (see e.g. [1] and [11] respectively) due to their efficient imple-
mentation, our results are of high cryptographic value when such functions need
to be applied.
The paper is organized as follows: Section 2 provides the background and in-
troduces the notation. The properties of best affine approximations of quadratic
functions are treated in Section 3, whereas Section 4 studies best quadratic ap-
proximations of cubic Boolean functions and determines efficient ways for their
computation. Constructions of bent functions are analyzed in Section 5, and
Section 6 summarizes our conclusions.
2 Preliminaries
Let f : Fn2 → F2 be a Boolean function, where F2 = {0, 1} is the binary field.
The set of Boolean functions on n variables is denoted by Bn ; they are commonly
expressed in their algebraic normal form (ANF) as
f (x1 , . . . xn ) = aj xj11 · · · xjnn , aj ∈ F 2 (1)
j ∈ Fn
2
where j = (j1 , . . . , jn ) and the sum is performed modulo 2. The algebraic degree
of function f is defined as deg(f ) = max{wt(j) : aj = 1}, where wt(j) is the
Efficient Computation of the Best Quadratic Approximations 75
where r̄i = ri + 1 denotes the complement of ri , and each fr ∈ Bn−k does not
depend on xj1 , . . . , xjk , is called the kth order Shannon’s expansion formula of
f with respect to the variables xj1 , . . . , xjk [17].
The sub-functions f0 , . . . , f2k −1 in (2) are uniquely determined from f by setting
xji = ri , 1 ≤ i ≤ k. Subsequently, we write f = f0 J · · · J f2k −1 instead of (2),
where J = {j1 , . . . , jk }, and f = f0 j f1 when J = {j}. If J = {n − k + 1, . . . , n},
the truth table of f (x1 , . . . , xn ) is constructed by concatenating the truth tables
of the sub-functions fr (x1 , . . . , xn−k ); this case will be denoted by f = f0 · · ·
f2k −1 and simply referred to as the kth order Shannon’s expansion formula of f .
The Walsh-Hadamard transform χ f (a) of the Boolean function f ∈ Bn at
a ∈ Fn2 is the real-valued function given by [20]
f (a) =
χ χf (x)(−1)a,x = 2n − 2 wt(f + φa ) (3)
x ∈ Fn
2
Any affine function v such that wt(f + v) = NLf is called a best affine ap-
proximation of f and is denoted by λf , whereas the set comprising of the best
affine approximations of f is denoted by Af ⊆ R(1, n). The definition of the
nonlinearity leads directly to the following well-known result [4].
Lemma 1. Let f ∈ Bn and v ∈ R(1, n). Then, λ ∈ Af if and only if λ + v ∈
Af +v . Further, |Af +v | = |Af |, i.e. both sets have the same cardinality.
An equivalent statement of Lemma 1, which is subsequently used, is that λf +v =
λf + v for any linear function v. Likewise, the minimum distance between f and
76 N. Kolokotronis, K. Limniotis, and N. Kalouptsidis
From (4), (5) we clearly obtain that NQf ≤ NLf . Likewise, any quadratic func-
tion u with the property wt(f + u) = NQf is said to be a best quadratic approx-
imation of f and is denoted by ξf , whereas the set comprising of best quadratic
approximations of f is denoted by Qf ⊆ R(2, n).
h
f = g0 + g2i−1 g2i , deg(g0 ) ≤ 1 and deg(gj ) = 1 (6)
i=1
where each value 2n−1 ±2n−hf −1 occurs 22hf times, and 2n−1 occurs the remain-
ing 2n+1 − 22hf +1 times.
Theorem 2. Let the Boolean function f ∈ R(2, n) be given by (6). Then, for
b = (b1 , . . . , b2h ), its best affine approximations are given by
2h
h
Af = λbf ∈ R(1, n) : λbf = g0 + bi gi + b2i−1 b2i , b ∈ F2h
2 .
i=1 i=1
Efficient Computation of the Best Quadratic Approximations 77
Proof. First note that the affine Boolean functions λbf are pairwise distinct since
from hypothesis we have that {g1 , . . . , g2h } are linearly independent; thus |Af | =
22h . Furthermore, for all b ∈ F2h
2 , we have that
h
f + λbf = g2i−1 g2i + b2i−1 g2i−1 + b2i g2i + b2i−1 b2i
i=1
h
= g2i−1 + b2i g2i + b2i−1 . (7)
i=1
Since {g1 + b2 , . . . , g2h + b2h−1 } are also linearly independent, we get that for any
choice of b ∈ F2h b
2 it holds wt(f + λf ) = 2
n−1
− 2n−1−h [20], which by Theorem
1 is the minimum distance between f and all affine functions. The fact that the
number of best affine approximations of f is 22h (equal to the number of different
λbf constructed here) concludes our proof.
λ0f = x2 + x4 λ1f = x1 + x2 + x3 + x4
λ2f = x4 + x5 λ3f = x1 + x3 + x4 + x5 + 1
Proposition
1. Let the Boolean functions f1 , . . . , fs ∈ R(2, n) be given by (6)
and si=1 gi,1 , . . . , gi,2hfi be linearly independent, s ≥ 2. Further, let bi =
(bi,1 , . . . , bi,2hfi ) be binary vectors of length 2hfi , 1 ≤ i ≤ s. Then
2hf1 +···+2hfs
λbf1 +···+fs = λbf11 + · · · + λbfss , ∀ b = (b1 , . . . , bs ) ∈ F2 . (8)
Proof. Clearly, (8) holds for s = 1; we will only prove its validity for s = 2,
since the general case is then established by induction on s. Let us write f =
f1 + f2 , and denote hf , hfi as h, hi respectively. By hypothesis we get fi =
hi 2
gi,0 + j=1 gi,2j−1 gi,2j ; since i=1 {gi,1 , . . . , gi,2hi } are linearly independent we
obtain h = h1 + h2 , and from Theorem 2 the best affine approximations of f ,
for all b ∈ F2h
2 , are given by
2h1
2h2
h
λbf = g1,0 + g2,0 + bj g1,j + b2h1 +j g2,j + b2i−1 b2i = λcf11 + λcf22
j=1 j=1 i=1
The above definition implies that a cubic function belongs to exactly one class,
due to the minimality of m (however J is not always unique). An important sub-
set of class-m functions are the separable class-m functions whose cubic terms
involve exactly one variable with index in J; all others are referred to as insep-
arable. The equivalence classes for cubic functions of certain weight found in
[13,14] are separable. An important property of class-m cubic Boolean functions
is given below.
Lemma
m 2. Let f ∈ R(3, n) be a separable class-m function, with cubic part c =
i=1 xji qi , where qi ∈ Bn−m is quadratic function not depending on variables
with index in J = {j1 , . . . , jm }. Then, from the decomposition f = f0 J · · · J
f2m −1 we get that
m−1
m
m
m
q= xji xjk i,k + xji li + q and l= xji i + l (10)
i=1 k=i+1 i=1 i=1
for some quadratic q ∈ Bn−m and linear functions l , li ∈ Bn−m that do not
depend on xj1 , . . . , xjm . Let us next introduce the auxiliary functions
s s−1 s s
s
s
g = xji qi + xji xjk i,k + xji li + q + xji i + l
i=1 i=1 k=i+1 i=1 i=1
where the parentheses are used to indicate its cubic, quadratic, and linear parts
respectively (note that g m = f whereas g 0 = q + l ), and
s
m
hsi = xjk k,i + rk i,k , 0≤s<i≤m
k=1 k=i+1
m
fr = g m−2 + ri qi + li + i + hm−2
i , 0≤r<4
i=m−1
s
2r,a = 1 + 2ai . (12)
r ∈ Fs2 i=1
Proof. Note that (12) holds for s = 1; suppose that it holds for s = k ≥ 1 and
all a = (a1 , . . . , ak ) ∈ Zk . Then, for s = k + 1 we have from (12) that
r,a
k
2(r,t),(a,b) = 1 + 2b 2 = 1 + 2b 1 + 2ai
(r,t) ∈ Fk+1
2
r ∈ Fk
2
i=1
ξfs = ξf,0
s
J · · · J ξf,2
s
m −1 , s ∈ Fm
2 (13)
s
where ξf,r = q + s, p + lr + λr+s,p for all r ∈ Fm
2 .
Proof. For fixed s ∈ Fm 2 the sub-functions in (13) have the same quadratic part
q + s, p and yield a quadratic function ξfs by Lemma 3. Indeed, by Proposition
m
1 we have λr+s,p = i=1 (ri + si )λqi , whereas (11) leads to
m
s
ξf,r = 2wt(c) q + s, p + l + 2wt(c)−1 ci li + i + ai λqi
rc i=1
m−1
m
u,v , if wt(c) = 2 (cu = cv = 1)
+ 2wt(c)−2 ci cj i,j =
i=1 j=i+1
0, if wt(c) > 2
Efficient Computation of the Best Quadratic Approximations 81
since rc (ri + si )λqi equals 2wt(c) si λqi if ci = 0 (in which case ai = 2si ), and
2wt(c)−1 λqi otherwise (where ai = 1). Thus ξfs are quadratic functions for all
s ∈ Fm2 ; their distance from f is given by
wt(f + ξfs ) = wt(r + s, p + λr+s,p ) = wt(r, p + λr,p )
r ∈ Fm
2 \{s} r ∈ Fm
2 \{0}
m
1 1
wt(f + ξfs ) =2 n−1
− 2 n−m−1−hr,p
=2 n−1
−2 n−1
+
r ∈ Fm i=1
2 2hqi +1
2
m
since i=1 gi,1 , . . . , gi,2hqi are linearly independent by hypothesis, and thus
hr,p = hr1 q1 +···+rm qm = r1 hq1 + · · · + rm hqm from Proposition 1 (whereas
the last equality is derived from Lemma 4). Next, we prove that the distance
of any other quadratic function from f is greater than wt(f + ξfs ). Assume
there exists u ∈ R(2, n), which does not coincide with ξfs for any s ∈ Fm 2 , and
u = (q + l0 ) J · · · J (q + l2 m −1 ) where lr satisfy the condition of Lemma 3.
Consequently q̃ = q + q, q1 , . . . , qm are linearly independent, otherwise u would
be identical to one of ξfs ; indeed, if q = q + s, p for some s ∈ Fm 2 then we would
have
wt(f + u) = wt(r + s, p + lr + lr )
r ∈ Fm
2 \{s}
≥ wt(r + s, p + λr+s,p ) = wt(f + ξfs )
r ∈ Fm
2 \{s}
where equality holds if and only if we set lr = lr + λr+s,p , for all r ∈ Fm
2 by
Lemma 1. Thus, in order to minimize wt(f + u) we get u = ξfs . Hence we only
consider q = q + s, p for all s ∈ Fm
2 . Then, we likewise find that
wt(f + u) = wt(q̃ + r, p + l̃r ) ≥ 2n−1 − 2n−m−1−hq̃+r,p
r ∈ Fm
2 r ∈ Fm
2
where ˜ lr = lr + lr and equality holds if and only if ˜lr = λq̃+r,p , for all r ∈ Fm
2 by
Lemma 1. The weight of f +u is minimized if q̃ is chosen such that all hq̃+r,p take
their minimum possible value. The fact q̃ + r, p = 0 implies that hq̃+r,p ≥ 1
for all r ∈ Fm 2 ; still, not
all hq̃+r,p can be made simultaneously equal to 1.
We write q̃ as q̃ = g̃0 + 1≤j≤hq̃ g̃2j−1 g̃2j , where the linear part g̃0 is obtained
by applying Dickson’s theorem on q̃. Let us define di as the number of g̃j that
are not linearly independent from gi,j of qi , and ei as the number of products
g̃2j−1 g̃2j shared by q̃, qi , 1 ≤ i ≤ m. It is then seen that 0 ≤ di ≤ 2 min{hq̃ , hqi }
and 0 ≤ ei ≤ di /2
. Further, it can be proved that hq̃+qi ≥ hq̃ + hqi − di and
82 N. Kolokotronis, K. Limniotis, and N. Kalouptsidis
the lower bound is always attained1 if di is even and ei = di /2. Thus wt(f + u)
can be minimized mbyletting q̃ have common
products g̃2j−1 g̃2j with q1 , . . . , qm .
By hypothesis i=1 gi,1 , . . . , gi,2hqi are linearly independent, leading to (for
all r ∈ Fm 2 )
m
m m
hq̃+r,p = hq̃ + ri hqi − 2ei and 0 ≤ ri ei ≤ min hq̃ , ri hqi .
i=1 i=1 i=1
m
hqi −2ei +1
Hence, we see that wt(f + u) ≥ 2 −2 n−1 n−1−hq̃
i=1 1/2 + 1/2 and
we need to examine if there exists a particular choice of parameters e1 , . . . , em
such that wt(f + u) < wt(f + ξfs ), which is equivalent to
m
1 + 2hqi
wt(f + u) < wt(f + ξfs ) ⇔ 2hq̃ −(e1 +···+em ) <1. (14)
i=1
2ei + 2hqi −ei
Since it holds 0 ≤ ei ≤ min{hq̃ , hqi }, all terms (2hqi + 1)(2hqi −ei + 2ei )−1 in
(14) are greater than or equal to 1, where equality is attained if either ei = 0
or ei = hqi = min{hq̃ , hqi }; the latter case is valid for all 1 ≤ i ≤ m only if
hq̃ ≥ max{hq1 , . . . , hqm }. Moreover, ei = 0 implies that q̃ does not have common
products with qi , whereas ei = hqi that q̃ is written as the sum of qi and another
quadratic function. Since by hypothesis q̃ = r, p, we either have 0 < ei <
min{hq̃ , hqi } for some m1 ≤ i ≤ m, or that q̃ has a product whose functions
do not depend on i=1 gi,1 , . . . , gi,2hqi , hence 2hq̃ −(e1 +···+em ) > 1, due to
0 < e1 + · · · + em < min{hq̃ , hq1 + · · · + hqm }. Therefore, in any case we get
wt(f + u) > wt(f + ξfs ).
m
By assuming that all i=1 gi,1 , . . . , gi,2hqi are linearly independent (see Re-
mark 1 below how such a constraint can be relaxed) and hqi ≥ 1, for 1 ≤ i ≤ m,
the fact hq1 +· · ·+hqm = hq1 +···+qm ≤ (n−m)/2
leads to hqi ≤ (n−3m)/2
+1.
Thus, we have the following result.
Corollary 1. With the notation of Theorem 3, for any separable class-m cubic
function f ∈ R(3, n) we have m ≤ n/3
and
m
1 1
NQf = 2 n−1
−2 n−1
+ (15)
i=1
2 2hqi +1
m
such that Q = QP . Then, from the linear independence of gi,1 , . . . , gi,2hqi
m i=1
we get hqj = i=1 pi,j hqi , and
m
m
m
hr1 q1 +···+rm qm
= rj pi,j hqi = ri hqi = hr1 q1 +···+rm
q
m
i=1 j=1 i=1
m
where ri = j=1 rj pi,j mod 2, for 1 ≤ i ≤ m. Hence, the results obtained in
Theorem 3 and Corollary 1 would still hold in this case, if we replace hqi with
the ith element of vector Q P −1 .
In the simple case of the class-1 Boolean functions, Corollary 1 gives that NQf =
2n−2 − 2n−2−hq1 with 1 ≤ hq1 ≤ (n − 1)/2
. Next, we prove that the maximum
second-order nonlinearity attained by a separable class-m cubic function grows
with m ≤ n/3
(see also Table 1 in Appendix C). Hence, class-1 functions
constitute the most cryptographically weak class with respect to second-order
nonlinearity. The security offered by class-m cubic functions, for large values of
m, is also attributed to the difficulty of finding a set J such that all the 2m
sub-functions in f = f0 J · · · J f2m −1 are quadratic (in order to find the best
quadratic approximations via the Theorem 3); the complexity of this step grows
exponentially with m, for fixed number of variables n.
Proof. In order to establish the first part we need to determine the class of sepa-
rable cubic functions with the highest second-order nonlinearity. m
From Corollary
1 we see that this is maximized if and only if the product i=1 1/2 + 1/2hqi +1
depending on m, hq1 , . . . , hqm is minimized. Since each product term is an inte-
ger less than 1, the number m of terms must be sufficiently large. However, the
constraints on the values taken by each hqi need also be considered. Let H be
the set of distinct integers from hq1 + 1, . . . , hqm + 1, and suppose a − r, a + r ∈ H
for some a > r + 1 > 1. Then, we have the property
2
1 1 1 1 1 1 1 1 1 1
+ + > ··· > + + > +
2 2a−r 2 2a+r 2 2a−1 2 2a+1 2 2a
from which we derive that maxa∈H {a} − mina∈H {a}, and the cardinality of
H, should be relatively small. Moreover, by noting that the sequence {(1/2 +
1/2a )i }i≥0 is purely decreasing for any a ∈ H (since then a ≥ 2), we conclude
that the highest possible second-order nonlinearity achieved by separable class-m
cubic Boolean functions, by Corollary 1, is given by
bm m−bm
n−1 1 1 1 1
maxclass-m NQ = 2 n−1
−2 + +
2 2am +2 2 2am +1
84 N. Kolokotronis, K. Limniotis, and N. Kalouptsidis
bm m
2am +1 + 1 1 1
= 2n−1 − 2n−1 + (16)
2am +1 + 2 2 2am +1
where am = (n − m)/2m
and bm = (n − m)/2
mod m, as a result of letting
bm functions qi have hqi = am + 1, and the remaining m − bm have hqi = am .
It is clear from (16) that for small values of m, the integer am is large and
therefore the contribution of (2am +1 + 1)(2am +1 + 2)−1 ≈ 1 is negligible (bm is
also small). So, the maximum second-order nonlinearity attained by separable
class-m cubic functions grows with m ≤ n/3
. If m = n/3
, then we have
am = 1, bm = (n mod 3)/2
, and (16) becomes
(n mod 3)/2
n/3
NQf = 2n−1 − 2
(n mod 3)/2−1 53 6 = 2n−1 − bn 12 6n/3
where the term bn equals 1 if n ≡ 0 (mod 3), (4/3)1/3 if n ≡ 1 (mod 3), and
(250/243)1/3 if n ≡ 2 (mod 3). Thus, bn ≈ 1 in all cases.
The above result also leads to a lower bound on the covering radius of the 2nd
order binary Reed-Muller code R(2, n), that is ρ(2, n) ≥ ρ3 (2, n) ≥ 2n−1 − 12 6n/3
(since we only considered cubic Boolean functions satisfying the conditions of The-
orem 3).√The lower bound given behaves well with respect to the upper bound
2n−1 − 15 2n/2−1 that has been proved in [5] (see Fig. 1 in Appendix C, and the
analysis therein). The cubic part of any separable class- n/3
Boolean function is
equivalent (under some transformation of variables y = xR) to the following
n
3
−1
y3i−2 y3i−1 y3i + y3 n3
−2 y3 n3
−1 y3 n3
+ a y3 n3
+1 y3 n3
+2
i=1
Proof. From the proof of Theorem 3 and Definition 1, we have that for all s ∈ Fm 2
the best quadratic approximation ξfs of the class-m cubic function f , with cubic
m
part c = i=1 xji qi , is such that
s
s
ξfs + f = ξf,0 + f0 J · · · J ξf,2 m −1 + f2m −1
m
= (xj1 + r̄1 ) · · · (xjm + r̄m ) (ri + si )(qi + λqi )
r ∈ Fm
2 i=1
Efficient Computation of the Best Quadratic Approximations 85
due to the linear independence of the functions in m i=1 gi,1 , . . . , gi,2hqi and
the fact that we may write λr1 q1 +···+rm qm = r1 λq1 + · · · + rm λqm , for all r ∈ Fm 2 .
By writing the above expression as the sum of those terms for which rm = 0 and
those for rm = 1, then simple calculations give
m−1
ξfs + f = (xj1 + r̄1 ) · · · (xjm−1 + r̄m−1 ) (ri + si )(qi + λqi )
r ∈ Fm−1 i=1
2
m−1
= (xj1 + r̄1 ) · · · (xjm−1 + r̄m−1 ) (ri + si )(qi + λqi )
r ∈ Fm−1 i=1
2
where the parentheses indicate its quadratic and linear part respectively.