Immediate download Fast Software Encryption Orr Dunkelman ebooks 2024
Immediate download Fast Software Encryption Orr Dunkelman ebooks 2024
com
https://ebookfinal.com/download/fast-software-encryption-
orr-dunkelman/
OR CLICK BUTTON
DOWNLOAD EBOOK
https://ebookfinal.com/download/frommer-s-niagara-region-4th-edition-
barbara-ramsay-orr/
ebookfinal.com
https://ebookfinal.com/download/multimedia-content-encryption-
techniques-and-applications-1st-edition-shiguo-lian/
ebookfinal.com
https://ebookfinal.com/download/a-first-course-in-functional-
analysis-1st-edition-orr-moshe-shalit/
ebookfinal.com
https://ebookfinal.com/download/software-metrics-and-software-
metrology-1st-edition-alain-abran/
ebookfinal.com
Simple Steps to Data Encryption A Practical Guide to
Secure Computing 1st Edition Peter Loshin
https://ebookfinal.com/download/simple-steps-to-data-encryption-a-
practical-guide-to-secure-computing-1st-edition-peter-loshin/
ebookfinal.com
https://ebookfinal.com/download/fast-feedback-second-edition-bruce-
tulgan/
ebookfinal.com
https://ebookfinal.com/download/fast-soa-1st-edition-frank-cohen/
ebookfinal.com
https://ebookfinal.com/download/fast-feng-shui-for-prosperity-
stephanie-roberts/
ebookfinal.com
https://ebookfinal.com/download/growing-software-proven-strategies-
for-managing-software-engineers-1-edition-louis-testa/
ebookfinal.com
Lecture Notes in Computer Science 5665
Commenced Publication in 1973
Founding and Former Series Editors:
Gerhard Goos, Juris Hartmanis, and Jan van Leeuwen
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
Alfred Kobsa
University of California, Irvine, CA, 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
Microsoft Research, Cambridge, MA, USA
Demetri Terzopoulos
University of California, Los Angeles, CA, USA
Doug Tygar
University of California, Berkeley, CA, USA
Gerhard Weikum
Max-Planck Institute of Computer Science, Saarbruecken, Germany
Orr Dunkelman (Ed.)
Fast
Software Encryption
13
Volume Editor
Orr Dunkelman
École Normale Supérieure
Département d’Informatique
45 rue d’Ulm, 75230 Paris CEDEX 05, France
E-mail: [email protected]
ISSN 0302-9743
ISBN-10 3-642-03316-4 Springer Berlin Heidelberg New York
ISBN-13 978-3-642-03316-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.com
© International Association for Cryptologic Research 2009
Printed in Germany
Typesetting: Camera-ready by author, data conversion by Scientific Publishing Services, Chennai, India
Printed on acid-free paper SPIN: 12731466 06/3180 543210
Preface
Fast Software Encryption 2009 was the 16th in a series of workshops on symmet-
ric key cryptography. Starting from 2002, it is sponsored by the International
Association for Cryptologic Research (IACR). FSE 2009 was held in Leuven,
Belgium, after previous venues held in Cambridge, UK (1993, 1996), Leuven,
Belgium (1994, 2002), Haifa, Israel (1997), Paris, France (1998, 2005), Rome,
Italy (1999), New York, USA (2000), Yokohama, Japan (2001), Lund, Sweden
(2003), New Delhi, India (2004), Graz, Austria (2006), Luxembourg, Luxem-
bourg (2007), and Lausanne, Switzerland (2008).
The workshop’s main topic is symmetric key cryptography, including the
design of fast and secure symmetric key primitives, such as block ciphers, stream
ciphers, hash functions, message authentication codes, modes of operation and
iteration, as well as the theoretical foundations of these primitives.
This year, 76 papers were submitted to FSE including a large portion of
papers on hash functions, following the NIST SHA-3 competition, whose work-
shop was held just after FSE in the same location. From the 76 papers, 24 were
accepted for presentation. It is my pleasure to thank all the authors of all sub-
missions for the high-quality research, which is the base for the scientific value
of the workshop. The review process was thorough (each submission received
the attention of at least three reviewers), and at the end, besides the accepted
papers, the Committee decided that the merits of the paper “Blockcipher-Based
Hashing Revisited” entitled the authors to receive the best paper award. I wish
to thank all Committee members and the referees for their hard and dedicated
work.
The workshop also featured two invited talks. The first was given by Shay
Gueron about “Intel’s New AES Instructions for Enhanced Performance and Se-
curity” and the second was given by Matt Robshaw about “Looking Back at the
eSTREAM Project.” Along the presentation of the papers and the invited talks,
the traditional rump session was organized and chaired by Dan J. Bernstein.
I would like to thank Thomas Baignères for the iChair review management
software, which facilitated a smooth and easy review process, and Shai Halevi
for the Web Submission and Review Software for dealing with the proceedings.
A special thanks is due to the organizing team. The COSIC team from
Katholieke Universiteit Leuven, headed by Program Chair Bart Preneel, did
a wonderful job in hosting the workshop. The warm welcome that awaited more
than 200 delegates from all over the world was unblemished. The support given to
the FSE 2009 workshop by the sponsors Katholieke Universiteit Leuven, Price-
WaterhouseCoppers, and Oberthur technologies is also gratefully acknowledged.
Sponsored by the
International Association for Cryptologic Research (IACR)
Program Committee
Steve Babbage Vodafone Group R&D, UK
Alex Biryukov University of Luxembourg, Luxembourg
Dan J. Bernstein University of Illinois at Chicago, USA
Joan Daemen STMicroelectronics, Belgium
Christophe De Cannière École Normale Supérieure, France
and Katholieke Universiteit Leuven, Belgium
Orr Dunkelman (Chair) École Normale Supérieure, France
Henri Gilbert Orange Labs, France
Louis Granboulan EADS Innovation Works, France
Helena Handschuh Spansion, France
Tetsu Iwata Nagoya University, Japan
Nathan Keller Hebrew University, Israel
Stefan Lucks Bauhaus-University Weimar, Germany
Mitsuru Matsui Mitsubishi Electric, Japan
Willi Meier FHNW, Switzerland
Kaisa Nyberg Helsinki University of Technology
and NOKIA, Finland
Raphael Phan Loughborough University, UK
Bart Preneel Katholieke Universiteit Leuven, Belgium
Håvard Raddum University of Bergen, Norway
Christian Rechberger Graz University of Technology, Austria
Thomas Ristenpart UC San Diego, USA
Greg Rose Qualcomm, Australia
Serge Vaudenay EPFL, Switzerland
Yiqun Lisa Yin Independent Consultant, USA
VIII Organization
Referees
Elena Andreeva Mario Lamberger
Kazumaro Aoki Changhoon Lee
Frederik Armknecht David McGrew
Jean-Philippe Aumasson Florian Mendel
Guido Bertoni Nicky Mouha
Olivier Billet Jorge Nakahara Jr.
Billy Brumley Maria Naya-Plasencia
Rafik Chaabouni Ivica Nikolić
Donghoon Chang Khaled Ouafi
Joo Yeon Cho Matthew Parker
Shanshan Duan Sylvain Pasini
Baha Dundar Chris Peikert
Ewan Fleischmann Thomas Peyrin
Chistian Forler Thomas Roche
Pasqualina Fragneto Martin Schläffer
Benedikt Gierlichs Yannick Seurin
Michael Gorski Zhijie Shi
Jian Guo Thomas Shrimpton
Risto Hakala Hervé Sibert
Miia Hermelin Dirk Stegemann
Shoichi Hirose Daisuke Suzuki
Michael Hutter Stefano Tessaro
Sebastiaan Indesteege Stefan Tillich
Kimmo Järvinen Elena Trichina
Pascal Junod Gilles Van Assche
Charanjit Jutla Martin Vuagnoux
Liam Keliher Ralf-Philipp Weinmann
Shahram Khazaei Bo-Yin Yang
Dmitry Khovratovich Scott Yilek
Jongsung Kim Erik Zenner
Matthias Krause Fan Zhang
Sponsors
Katholieke Universiteit Leuven, Belgium
PriceWaterhouseCoppers, Belgium
Oberthur technologies, Belgium
Table of Contents
Stream Ciphers
Cube Testers and Key Recovery Attacks on Reduced-Round MD6 and
Trivium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Jean-Philippe Aumasson, Itai Dinur, Willi Meier, and Adi Shamir
Invited Talk
Intel’s New AES Instructions for Enhanced Performance and
Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Shay Gueron
Block Ciphers
Revisiting the IDEA Philosophy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Pascal Junod and Marco Macchetti
1 Introduction
1.1 Cube Attacks
Cube attacks [29, 9] are a new type of algebraic cryptanalysis that exploit im-
plicit low-degree equations in cryptographic algorithms. Cube attacks only re-
quire black box access to the target primitive, and were successfully applied
to reduced versions of the stream cipher Trivium [6] in [9]. Roughly speaking,
a cryptographic function is vulnerable to cube attacks if its implicit algebraic
normal form over GF(2) has degree at most d, provided that 2d computations
of the function is feasible. Cube attacks recover a secret key through queries
to a black box polynomial with tweakable public variables (e.g. chosen plaintext
or IV bits), followed by solving a linear system of equations in the secret key
variables. A one time preprocessing phase is required to determine which queries
should be made to the black box during the on-line phase of the attack. Low-
degree implicit equations were previously exploited in [11,27,21,10] to construct
Supported by the Swiss National Science Foundation, project no. 113329.
Supported by GEBERT RÜF STIFTUNG, project no. GRS-069/07.
distinguishers, and in [32, 12, 15] for key recovery. Cube attacks are related to
saturation attacks [17] and to high order differential cryptanalysis [16].
Basics. Let Fn be the set of all functions mapping {0, 1}n to {0, 1}, n > 0,
and let f ∈ Fn . The algebraic normal form (ANF) of f is the polynomial p over
GF(2) in variables x1 , . . . , xn such that evaluating p on x ∈ {0, 1}n is equivalent
to computing f (x), and such that it is of the form1
n
2 −1
i
ai · xi11 xi22 · · · xn−1
n−1 in
xn
i=0
n
for some (a0 , . . . , a2n −1 ) ∈ {0, 1}2 , and where ij denotes the j-th digit of the
binary encoding of i (and so the sum spans all monomials in x1 , . . . , xn ). A key
observation regarding cube attacks is that for any function f : {0, 1}n → {0, 1},
the sum (XOR) of all entries in the truth table
f (x)
x∈{0,1}n
f (x1 , x2 , x3 , x4 ) = x1 + x1 x2 x3 + x1 x2 x4 + x3 .
Then summing f (x1 , x2 , x3 , x4 ) over all 16 distinct inputs makes all monomials
vanish and yields zero, i.e. the coefficient of the monomial x1 x2 x3 x4 . Instead,
cube attacks sum over a subset of the inputs; for example summing over the four
possible values of (x1 , x2 ) gives
f (x1 , x2 , x3 , x4 ) = x1 + x1 x2 (x3 + x4 ) + x3 .
that is, the evaluation of p for the chosen fixed variables. Following the termi-
nology of [9], p is called the superpoly of I in f . A cube tI is called a maxterm if
and only if its superpoly p has degree 1 (i.e., is linear but not a constant). The
polynomial f is called the master polynomial.
Given access to a cryptographic function with public and secret variables, the
attacker has to recover the secret key variables. Key recovery is achieved in two
steps, a preprocessing and an online phase, which are described below.
Online Phase. Once sufficiently many maxterms and the ANF of their super-
polys are found, preprocessing is finished and one performs the online phase.
Now the secret variables are fixed: one evaluates the superpoly’s p by summing
f (x) over all the values of the corresponding maxterm, and gets as a result a lin-
ear combination of the key bits (because the superpolys are linear). The public
variables that are not in the maxterm should be set to a fixed value, and to the
same value as set in the preprocessing phase.
Assuming that the degree of the master polynomial is d, each sum requires
at most 2d−1 evaluations of the derived polynomials (which the attacker obtains
via a chosen plaintext attack). Once enough linear superpolys are found, the key
can be recovered by simple linear algebra techniques.
1.2 MD6
Rivest presented the hash function MD6 [24, 25] as a candidate for NIST’s hash
competition2 . MD6 shows originality in both its operation mode—a parametrized
quadtree [7]—and its compression function, which repeats hundreds of times a
simple combination of XOR’s, AND’s and shift operations: the r-round compres-
sion function of MD6 takes as input an array A0 , . . . , A88 of 64-bit words, recur-
sively computes A89 , . . . , A16r+88 , and outputs the 16 words A16r+73 , . . . , A16r+88 :
2
See http://www.nist.gov/hash-competition
4 J.-P. Aumasson et al.
The proposed instances of MD6 perform at least 80 rounds (1280 steps) and at
most 168 (2688 steps). Resistance to “standard” differential attacks for collision
finding is proven for up to 12 rounds. The designers of MD6 could break at most
12 rounds with high complexity using SAT-solvers.
The compression function of MD6 can be seen as a device composed of 64 non-
linear feedback shift registers (NFSR’s) and a linear combiner: during a step the
64 NFSR’s are clocked in parallel, then linearly combined. The AND operators
(∧) progressively increase nonlinearity, and the shift operators provide wordwise
diffusion. This representation will make our attacks easier to understand.
1.3 Trivium
The stream cipher Trivium was designed by De Cannière and Preneel [6] and sub-
mitted as a candidate to the eSTREAM project in 2005. Trivium was eventually
chosen as one of the four hardware ciphers in the eSTREAM portofolio3 . Re-
duced variants of Trivium underwent several attacks [23, 19, 20, 31, 32, 10, 12, 22],
including cube attacks [9].
Trivium takes as input a 80-bit key and a 80-bit IV, and produces a keystream
after 1152 rounds of initialization. Each round corresponds to clocking three feed-
back shift registers, each one having a quadratic feedback polynomial. The best
result on Trivium is a cube attack [9] on a reduced version with 767 initialization
rounds instead of 1152.
√
Table 1. Summary of the best known attacks on MD6 and Trivium (“ ” designates
the present paper)
a cube attack, even under the assumption that the attacker does not know any-
thing about its design (i.e., assuming that the algorithm had not been published
and treating the function as a black box polynomial). By exploiting the known
internal structure of the function, we can improve the attack and recover the
128-bit key of a 14-round MD6 function in about 222 operations, which take less
than a minute on a single PC. This is the best key recovery attack announced
so far on MD6.
Then we introduce the new notion of cube tester, which combines the cube
attack with efficient property-testers, and can be used to mount distinguishers or
to detect nonrandomness in cryptographic primitives. Cube testers are flexible
attacks that are adaptable to the primitive attacked. Some cube testers don’t
require the function attacked to have a low degree, but just to satisfy some
testable property with significantly higher (or lower) probability than a random
function. To the best of our knowledge, this is one of the first explicit applications
of property-testing to cryptanalysis.
Applying cube testers to MD6, we can detect nonrandomness in reduced ver-
sions with up to 18 rounds in just 217 time. In a variant of MD6 in which all
the step constants Si are zero, we could detect nonrandomness up to 66 rounds
using 224 time. Applied to Trivium, cube testers give distinguishers on up to
790 in time 230 , and detect nonrandomness on up to 885 rounds in 227 . Table 1
summarizes our results on MD6 and Trivium, comparing them with the previous
attacks .
As Table 1 shows, all our announced complexities are quite low, and presum-
ably much better results can be obtained if we allow a complexity bound of 250
6 J.-P. Aumasson et al.
2.1 Method
Table 2 describes the diffusion of the key into the MD6 compression function
array up to step 189 (the index of the first outputted word is 89).
In contrast to the predefined private variable indexes, the attacker can choose
the indexes of the cube public variables, and improve the complexity of the attack
by choosing such cube public variables that diffuse linearly to the MD6 array
only at the later stages of the mixing process. Quadratic dependencies of an array
word on cube public variables can be eliminated if the attacker can control the
value of the array word that is ANDed with the array word containing the cube
public variables. It is easy to verify that the public variable word that is XORed
back to the MD6 array at the latest stage of the mixing process is A71 , which
is XORed in step 160 to A160 . Thus, the array word with index 71 and words
with index just under 71, seem to be a good choice for the cube public variables.
Exceptions are A68 and A69 which are mixed with the key in steps 135 and 136
and should be zeroed. We tested several cubes, and the best preprocessing results
were obtained by choosing cube indexes from A65 . One of the reason that A65
gives better results than several other words (e.g. A71 ) is that it is ANDed with
just 2 words before it is XORed again into the array in step 154, whereas A71
is ANDed with 4 words before step 170. This gives the attacker more freedom
to choose the values of the fixed public variables, and limit the diffusion of the
private and cube public variables for more rounds.Table 3 describes the diffusion
of A65 into the MD6 compression function array up to step 185 (the index of the
first outputted word is 89).
2.2 Results
We were able to prevent non-linear mixing of the cube public variables and
the private variables for more than 6 MD6 compression function rounds. This
was made possible by zeroing all the MD6 array words whose indexes are listed
in the third column of Table 2 and Table 3 (ignoring the special ”L” values).
As described in the previous section, we set the values of several of the 63
attacker controlled words, excluding A65 (from which the cube public variables
were chosen), to predefined constants that zero the words specified in the third
column. Public variables whose value does not affect the values of the listed
MD6 array words were set to zero. We were not able to limit the diffusion of the
cube public variables and the private variables as much when all the cube public
variable indexes were chosen from words other than A65 .
We describe the cube attack results on the keyed MD6 version. The results
were obtained by running the preprocessing phase of the cube attack with the
special parameters describes above. We found many dense maxterms for 13-
round MD6, with associated cubes of size 5. Each of the maxterms passed at
least 100 linearity tests, thus the maxterm equations are likely to be correct for
most keys. During the online phase, the attacker evaluates the superpolys by
summing over the cubes of size 5. This requires a total of about 212 chosen IVs.
The total complexity of the attack is thus no more than 212 .
We were able to find many constant superpolys for 14 rounds of MD6, with
associated cubes of size 7. However, summing on cubes of size 6 gives superpolys
8 J.-P. Aumasson et al.
Table 2. Diffusion of the private variables into the MD6 compression function array in
the initial mixing steps. The third column specifies the MD6 array index of the word
that is ANDed with the key-dependent array word index in the step number specified
by the first column. The output of step i is inserted into Ai . If the key-dependent
array word is diffused linearly, then L is written instead. Note that once a dependency
of an MD6 array word on the private variables can be eliminated, it does not appear
any more as key-dependent (i.e. we assume that this dependency is eliminated by the
attacker).
Table 3. Diffusion of A65 into the MD6 compression function array in the initial mixing
rounds (if the key-dependent array word is diffused linearly, then L is written instead)
of high degree in the key bits. In order to further eliminate most (but not all)
high degree terms from the superpolys obtained by summing on cubes of size
6, we added more public variable indexes from words other than A65 . The best
results were obtained by choosing the remaining indexes from A32 , A33 , A49
and A50 (which are directly XORed with key bits in steps 121, 122, 138 and
139). Using this approach, we found many dense maxterms for 14-round MD6,
with associated cubes of size 15. Some of these results are listed in Table 5
(Appendix A), many more linearly independent maxterms can be easily obtained
by choosing other cube indexes from the same words listed in Table 5. During the
online phase, the attacker evaluates the superpolys by summing over the cubes
of size 15. This requires a total of about 222 chosen IVs. The total complexity
of the attack is thus no more than 222 . In fact every IV gives many maxterms,
so the required total of chosen IVs is lower than 222 , and the total complexity
of the attack is less than 222 .
We were able to find many constant superpolys for 15 rounds of MD6, with
associated cubes of size 14. We were not able to find low degree superpolys for 15-
round MD6. However, it seems likely that low degree equation for 15-round MD6
can be obtained using approaches similar to the one we used to recover the key
for 14-round MD6. Hence we believe that cube attacks can efficiently recover the
key for 15-round MD6. Furthermore, we believe that cube key recovery attacks
will remain faster than exhaustive search for 18-19 MD6 rounds.
3 Cube Testers
3.1 Definitions
Recall that Fn denotes the set of all functions mapping {0, 1}n to {0, 1}, n > 0.
For a given n, a random function is a random element of Fn (we have |Fn | =
n
22 ). In the ANF of a random function, each monomial (and in particular, the
highest degree monomial x1 · · · xn ) appears with probability 1/2, hence a random
function has maximal degree of n with probability 1/2. Similarly, it has degree
(n − 2) or less with probability 1/2n+1 . Note that the explicit description of a
random function can be directly expressed as a circuit with, in average, 2n−1
10 J.-P. Aumasson et al.
gates (AND and XOR), or as a string of 2n bits where each bit is the coefficient
of a monomial (encoding the truth table also requires 2n bits, but hides the
algebraic structure).
Informally, a distinguisher for a family F Fn is a procedure that, given a
function f randomly sampled from F ∈ {F, Fn }, efficiently determines which
one of these two families was chosen as F . A family F is pseudorandom if and
only if there exists no efficient distinguisher for it. In practice, e.g. for hash
functions or ciphers, a family of functions is defined by a k-bit parameter of
the function, randomly chosen and unknown to the adversary, and the function
is considered broken (or, at least, “nonrandom”) if there exists a distinguisher
making significantly less than 2k queries to the function. Note that a distin-
guisher that runs in exponential time in the key may be considered as “efficient”
in practice, e.g. 2k−10 .
We would like to stress the terminology difference between a distinguisher and
the more general detection of pseudorandomness, when speaking about crypto-
graphic algorithms; the former denotes a distinguisher (as defined above) where
the parameter of the family of functions is the cipher’s key, and thus can’t be
modified by the adversary through its queries; the latter considers part of the
key as a public input, and assumes as secret an arbitrary subset of the input
(including the input bits that are normally public, like IV bits). The detection
of nonrandomness thus does not necessarily correspond to a realistic scenario.
Note that related-key attacks are captured by neither one of those scenarios.
To distinguish F Fn from Fn , cube testers partition the set of public
variables {x1 , . . . , xn } into two complementary subsets:
We illustrate these notions with the example from §1.1: recall that, given
f (x1 , x2 , x3 , x4 ) = x1 + x1 x2 x3 + x1 x2 x4 + x3 ,
f (x1 , x2 , x3 , x4 ) = x1 + x1 x2 (x3 + x4 ) + x3 .
Here the cube variables (CV) are x1 and x2 , and the superpoly variables (SV)
are x3 and x4 . Therefore, by setting a value to x3 and x4 , e.g. x3 = 0, x4 = 1,
one can compute (x3 + x4 ) = 1 by summing f (x1 , x2 , x3 , x4 ) for all possibles
choices of (x1 , x2 ). Note that it is not required for a SV to actually appear in
the superpoly of the maxterm. For example, if f (x1 , x2 , x3 , x4 ) = x1 + x1 x2 x3 ,
then the superpoly of x1 x2 is x3 , but the SV’s are both x3 and x4 .
Remark. When f is, for example, a hash function, not all inputs should be
considered as variables, and not all Boolean components should be considered
as outputs, for the sake of efficiency. For example if f maps 1024 bits to 256 bits,
one may choose 20 CV and 10 SV and set a fixed value to the other inputs. These
Cube Testers and Key Recovery Attacks 11
fixed inputs determine the coefficient of each monomial in the ANF with CV and
SV as variables. This is similar to the preprocessing phase of key-recovery cube
attacks, where one has access to all the input variables. Finally, for the sake
of efficiency, one may only evaluate the superpolys for 32 of the 256 Boolean
components of the output.
3.2 Examples
Cube testers distinguish a family of functions from random functions by testing
a property of the superpoly for a specific choice of CV and SV. This section
introduces this idea with simple examples. Consider
f (x1 , x2 , x3 , x4 ) = x1 + x1 x2 x3 + x1 x2 x4 + x3
This yields zero for any (x1 , x2 ) ∈ {0, 1}2 , i.e. the superpoly of x3 x4 is zero,
i.e. none of the monomials x3 x4 , x1 x3 x4 , x2 x3 x4 , or x1 x2 x3 x4 appears in f . In
comparison, in a random function the superpoly of x3 x4 is null with probability
only 1/16, which suggests that f was not chosen at random (indeed, we chose it
particularly sparse, for clarity). Generalizing the idea, one can deterministically
test whether the superpoly of a given maxterm is constant, and return “random
function” if and only if the superpoly is not constant. This is similar to the test
used in [10].
Let f ∈ Fn , n > 4. We present a probabilistic test that detects the presence
of monomials of the form x1 x2 x3 xi . . . xj (e.g. x1 x2 x3 , x1 x2 x3 xn , etc.):
1. choose a random value of (x4 , . . . , xn ) ∈ {0, 1}n−4
2. sum f (x1 , . . . , xn ) over all values of (x1 , x2 , x3 ), to get
f (x1 , . . . , xn ) = p(x4 , . . . , xn )
(x1 ,x2 ,x3 )∈{0,1}3
The tester accepts if δ(f, F ) = 0, rejects with high probability if f and F are
not -close, and behaves arbitrarily otherwise. Such a test captures the notion of
property-testing, when a property is defined by belonging to a family of functions
P; a property tester is thus a family tester for a property P.
Suppose one wishes to distinguish a family F Fn from Fn , i.e., given a
random f ∈ F , to determine whether F is F or Fn (for example, in Trivium,
F may be a superpoly with respect to CV and SV in the IV bits, such that
each f ∈ F is computed with a distinct key). Then if F is efficiently testable
(see [26, 14]), then one can use directly a family tester for F on f to distinguish
it from a random function.
Cube testers detect nonrandomness by applying property testers to super-
polys: informally, as soon as a superpoly has some “unexpected” property (that
is, is anormally structured) it is identified as nonrandom. Given a testable prop-
erty P Fn , cube testers run a tester for P on the superpoly function f , and
use a statistical decision rule to return either “random” or “nonrandom”. The
decision rule depends on the probabilities |P|/|Fn | and |P ∩ F |/|F | and on a
margin of error chosen by the attacker. Roughly speaking, a family F will be
distinguishable from Fn using the property P if
|P| |P ∩ F |
−
|Fn | |F |
4. c ← c + p(xC+1 , . . . , xn )
5. return D(c) ∈ {0, 1}
where D is some decision rule. A probabilistic version of the test makes N < 2S
iterations, for random distinct values of (xC+1 , . . . , xn ). Complexity is respec-
tively 2n and N · 2C .
Low Degree. A random superpoly has degree at least (S − 1) with high proba-
bility. Cryptographic functions that rely on a low-degree function, however, are
likely to have superpolys of low degree. Because it closely relates to probabilisti-
cally checkable proofs and to error-correcting codes, low-degree testing has been
well studied; the most relevant results to our concerns are the tests for Boolean
functions in [1, 28]. The test by Alon et al. [1], for a given degree d, queries the
function at about d · 4d points and always accepts if the ANF of the function
has degree at most k, otherwise it rejects with some bounded error probability.
Note that, contrary to the method of ANF reconstruction (exponential in S), the
complexity of this algorithm is independent of the number of variables. Hence,
cube testers based on this low-degree test have complexity which is independent
of the number of SV’s.
Presence of Neutral Variables. Dually to the above linearity test, one can
test whether a SV is neutral in the superpoly, that is, whether it appears in at
least one monomial. For example, the following algorithm tests the neutrality of
x1 , for N ≤ 2S−1 :
1. pick random (x2 , . . . , xS )
2. if p(0, x2 , . . . , xS ) = p(1, x2 , . . . , xS )
3. return not neutral
4. repeat steps 1 to 3 N times
5. return neutral
This test answers correctly with probability about 1 − 2−N and runs in time
N ·2C . For example, if x1 , x2 , x3 are the CV and x4 , x5 , x6 the SV, then x6 is neu-
tral with respect to x1 x2 x3 if the superpoly p(x4 , x5 , x6 ) satisfies p(x4 , x5 , 0) =
p(x4 , x5 , 1) for all values of (x4 , x5 ). A similar test was implicitly used in [12],
via the computation of a neutrality measure.
Remarks. Except low degree and constantness, the above properties do not
require the superpoly to have a low degree to be tested. For example if the
maxterm x1 x2 has the degree-5 superpoly
x3 x5 x6 + x3 x5 x6 x7 x8 + x5 x8 + x9 ,
then one can distinguish this superpoly from a random one either by detecting
the linearity of x9 or the neutrality of x4 , with a cost independent on the degree.
In comparison, the cube tester suggested in [9] required the degree to be bounded
by d such that 2d is feasible.
Note that the cost of detecting the property during the preprocessing is larger
than the cost of the on-line phase of the attack, given the knowledge of the
property. For example, testing that x1 is a neutral variable requires about N · 2C
queries to the function, but once this property is known, 2C queries are sufficient
to distinguish the function from a random one with high probability.
Finally, note that tests based on the nonrandom distribution of the monomi-
als [11, 27, 21] are not captured by our definition of cube testers, which focus
on high-degree terms. Although, in principle, there exist cases where the former
tests would succeed while cube testers would fail, in practice a weak distribution
of lower-degree monomials rarely comes with a good distribution of high-degree
ones, as results in [10] and of ourselves suggest.
Cube Testers and Key Recovery Attacks 15
4.1 Attack A
This attack considers CV, SV, and secret bits in A71 : the MSB’s of A71 contain
the CV, the LSB’s contain the 30 secret bits, and the 4 bits “in the middle” are
the SV. The other bits in A71 are set to zero. To minimize the density and the
degree of the ANF, we set Ai = Si for i = 0, . . . , 57 in order to eliminate the
constants Si from the expressions, and set Ai = 0 for i = 58, . . . , 88 in order to
eliminate the quadratic terms by “absorbing” the nonzero A22 , . . . , A57 through
AND’s with zero values.
The attack exploits the fact that A71 is the last word input linearly. We set
initial conditions on the message such that modifications in A71 are only effective
at step 160, and so CV and SV are only introduced (linearly) at step 160: in
order to absorb A71 before step 160, one needs A68 = A74 = A35 = A107 = 0,
respectively for steps 89, 92, 102, and 138.
Given the setup above, the attack evaluates the balance of the superpoly for
each of the 1024 output components, in order to identify superpolys that are
constant for a large majority of inputs (SV). These superpolys may be either
constants, or unbalanced nonlinear functions. Results for reduced and modified
MD6 are given in subsequent sections.
16 J.-P. Aumasson et al.
4.2 Attack B
This attack considers CV, SV, and secret bits in A54 , at the same positions as
in Attack A. Other input words are set by default to Si for A0 , . . . , A47 , and to
zero otherwise.
The attack exploits the fact that A54 and A71 are input linearly only once, and
that both directly interact with A143 . We set initial conditions on the message
such that CV and SV are only effective at step 232. Here are the details of this
attack:
To satisfy the above conditions, one has to choose suitable values of A1 , A18 ,
A51 , A57 , A74 . These values are constants that do not depend on the input in
A54 .
Given the setup above, the attack evaluates the balance of the superpoly for
each of the 1024 output components, in order to identify superpolys that are
constant for large majority of inputs (SV). Results for reduced and modified
MD6 are given in §4.3.
4.3 Results
5.1 Setup
We consider families of functions defined by the secret key of the cipher, and
where the IV corresponds to public variables. We first used the 23-variable index
sets identified in [8, Table 2]; even though we have not tested all entries, we
obtained the best results using the IV bits (starting from zero)
{3, 4, 6, 9, 13, 17, 18, 21, 26, 28, 32, 34, 37, 41, 47, 49, 52, 58, 59, 65, 70, 76, 78} .
IV bits that are neither CV nor SV are set to zero, in order to minimize the degree
and the density of the polynomials generated during the first few initialization
steps. Contrary to MD6, we obtain the best results on Trivium by testing the
presence of neutral variables. We look for neutral variables either for a random
key, or for the special case of the zero key, which is significantly weaker with
respect to cube testers.
In addition to the cubes identified in [8, Table 2], we were able to further
improve the results by applying cube testers on carefully chosen cubes, where the
indexes are uniformly spread (the distance between neighbors is at least 2). These
cubes exploit the internal structure of Trivium, where non linear operations are
18 J.-P. Aumasson et al.
only performed on consecutive cells. The best results were obtained using the
cubes below:
{0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 33, 36, 39, 42, 45, 48, 51, 60, 63, 66, 69, 72, 75, 79}
{0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 79}
{0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 79}
5.2 Results
We obtained the following results, by testing the neutrality of the SV in the
superpoly:
– with 23 CV, and SV in the IV, we found a distinguisher on up to 749 rounds
(runtime 223 ); SV 0, 1, 2, and 3 are neutral after 749 initialization rounds.
Using the zero key, neutral variables are observed after 755 rounds (SV 0, 1
are neutral).
– with 23 CV, and SV in the key, we observed nonrandomness after 758 initial-
ization rounds (SV 1, 2, 3 are neutral). Using the zero key, nonrandomness
was observed after 761 rounds (SV 0 is neutral).
– with 30 CV, and SV in the key, we observed nonrandomness after 772 initial-
ization rounds (SV 0, 2, 4 are neutral). Using the zero key, nonrandomness
was observed after 782 rounds (SV 2, 3, 4 are neutral).
With the the new chosen cubes we obtain the following results:
– with 24 CV, we observe that the resultant superpoly after 772 initialization
rounds is constant, hence we found a distinguisher on up to 772 rounds.
Using the neutrality test, for the zero key, we detected nonrandomness over
up to 842 rounds (the 4 first key bits are neutral).
– with 27 CV, we observe that the resultant superpoly after 785 initialization
rounds is constant, hence we found a distinguisher on up to 785 rounds.
Using the neutrality test, for the zero key, we detected nonrandomness over
up to 885 rounds (bits 0, 3, and 4 of the key are neutral).
– with 30 CV, we observe that the resultant superpoly after 790 initialization
rounds is constant, hence we found a distinguisher for Trivium with up to
790 rounds.
Better results are obtained when the SV’s are in the key, not the IV; this is
because the initialization algorithm of Trivium puts the key and the IV into
two different registers, which make dependency between bits in a same register
stronger than between bits in different registers.
In comparison, [10], testing the constantness of the superpoly, reached 736
rounds with 33 CV. The observations in [8], obtained by testing the linearity of
SV in the key, lead to detectable nonrandomness on 748 rounds with 23 CV, and
on 771 rounds with 30 CV.
Cube Testers and Key Recovery Attacks 19
6 Conclusions
1. So far cube attacks have resulted from empirical observations, so that one
could only assess the existence of feasible attacks. However, if one could
upper-bound the degree of some Boolean component (e.g. of MD6 or Triv-
ium) after a higher number of rounds, then one could predict the existence
of observable nonrandomness (and one may build distinguishers based on
low-degree tests [1]). The problem is closely related to that of bounding the
degree of a nonlinear recursive Boolean sequence which, to the best of our
knowledge, has remained unsolved.
2. Low-degree tests may be used for purposes other than detecting nonrandom-
ness. For example, key-recovery cube attacks may be optimized by exploit-
ing low-degree tests, to discover low-degree superpolys, and then reconstruct
them. Also, low-degree tests for general fields [13] may be applicable to hash
functions based on multivariate systems [4], which remain unbroken over
fields larger than GF(2) [2].
3. Our attacks on MD6 detect nonrandomness of reduced versions of the com-
pression function, and even recover a 128-bit key. It would be interesting to
extend these attacks to a more realistic scenario, e.g. that would be applica-
ble to the MD6 operation mode, and/or to recover larger keys.
4. One may investigate the existence of cube testers on other primitives that are
based on low-degree functions, like RadioGatún, Panama, the stream cipher
MICKEY, and on the SHA-3 submissions ESSENCE [18], and Keccak [3]. We
propose to use cube attacks and cube testers as a benchmark for evaluating
the algebraic strength of primitives based on a low-degree component, and
as a reference for choosing the number of rounds. Our preliminary results on
Grain-128 outperform all previous attacks, but will be reported later since
they are still work in progress.
20 J.-P. Aumasson et al.
References
1. Alon, N., Kaufman, T., Krivelevich, M., Litsyn, S., Ron, D.: Testing low-degree
polynomials over GF(2). In: Arora, S., Jansen, K., Rolim, J.D.P., Sahai, A. (eds.)
RANDOM 2003 and APPROX 2003. LNCS, vol. 2764, pp. 188–199. Springer,
Heidelberg (2003)
2. Aumasson, J.-P., Meier, W.: Analysis of multivariate hash functions. In: Nam,
K.-H., Rhee, G. (eds.) ICISC 2007. LNCS, vol. 4817, pp. 309–323. Springer, Hei-
delberg (2007)
3. Bertoni, G., Daemen, J., Peeters, M., Van Assche, G.: Keccak specifications. Sub-
mission to NIST 2008 (2008), http://keccak.noekeon.org/
4. Billet, O., Robshaw, M.J.B., Peyrin, T.: On building hash functions from mul-
tivariate quadratic equations. In: Pieprzyk, J., Ghodosi, H., Dawson, E. (eds.)
ACISP 2007. LNCS, vol. 4586, pp. 82–95. Springer, Heidelberg (2007)
5. Blum, M., Luby, M., Rubinfeld, R.: Self-testing/correcting with applications to
numerical problems. In: STOC, pp. 73–83. ACM, New York (1990)
6. De Cannière, C., Preneel, B.: Trivium. In: Robshaw, M.J.B., Billet, O. (eds.) New
Stream Cipher Designs. LNCS, vol. 4986, pp. 244–266. Springer, Heidelberg (2008)
7. Crutchfield, C.Y.: Security proofs for the MD6 hash function mode of operation.
Master’s thesis, Massachusetts Institute of Technology (2008)
8. Dinur, I., Shamir, A.: Cube attacks on tweakable black box polynomials. IACR
ePrint Archive, Report 2008/385, version 20080914:160327 (2008),
http://eprint.iacr.org/2008/385
9. Dinur, I., Shamir, A.: Cube attacks on tweakable black box polynomials. In: Joux,
A. (ed.) EUROCRYPT 2009. LNCS, vol. 5479, pp. 278–299. Springer, Heidelberg
(2009); see also [8]
10. Englund, H., Johansson, T., Turan, M.S.: A framework for chosen IV statisti-
cal analysis of stream ciphers. In: Srinathan, K., Rangan, C.P., Yung, M. (eds.)
INDOCRYPT 2007. LNCS, vol. 4859, pp. 268–281. Springer, Heidelberg (2007)
11. Filiol, E.: A new statistical testing for symmetric ciphers and hash functions. In:
Deng, R.H., Qing, S., Bao, F., Zhou, J. (eds.) ICICS 2002. LNCS, vol. 2513, pp.
342–353. Springer, Heidelberg (2002)
12. Fischer, S., Khazaei, S., Meier, W.: Chosen IV statistical analysis for key recovery
attacks on stream ciphers. In: Vaudenay, S. (ed.) AFRICACRYPT 2008. LNCS,
vol. 5023, pp. 236–245. Springer, Heidelberg (2008)
13. Kaufman, T., Ron, D.: Testing polynomials over general fields. In: FOCS, pp.
413–422. IEEE Computer Society, Los Alamitos (2004)
14. Kaufman, T., Sudan, M.: Algebraic property testing: the role of invariance. In:
Ladner, R.E., Dwork, C. (eds.) STOC, pp. 403–412. ACM, New York (2008)
15. Khazaei, S., Meier, W.: New directions in cryptanalysis of self-synchronizing
stream ciphers. In: Chowdhury, D.R., Rijmen, V., Das, A. (eds.) INDOCRYPT
2008. LNCS, vol. 5365, pp. 15–26. Springer, Heidelberg (2008)
16. Knudsen, L.R.: Truncated and higher order differentials. In: Preneel, B. (ed.) FSE
1994. LNCS, vol. 1008, pp. 196–211. Springer, Heidelberg (1995)
17. Lucks, S.: The saturation attack - a bait for Twofish. In: Matsui, M. (ed.) FSE
2001. LNCS, vol. 2355, pp. 1–15. Springer, Heidelberg (2001)
18. Martin, J.W.: ESSENCE: A candidate hashing algorithm for the NIST competi-
tion. Submission to NIST (2008)
19. Maximov, A., Biryukov, A.: Two trivial attacks on Trivium. In: Adams, C.M.,
Miri, A., Wiener, M.J. (eds.) SAC 2007. LNCS, vol. 4876, pp. 36–55. Springer,
Heidelberg (2007)
Cube Testers and Key Recovery Attacks 21
20. McDonald, C., Charnes, C., Pieprzyk, J.: Attacking Bivium with MiniSat. eS-
TREAM, ECRYPT Stream Cipher Project, Report 2007/040 (2007)
21. O’Neil, S.: Algebraic structure defectoscopy. IACR ePrint Archive, Report
2007/378 (2007), http://eprint.iacr.org/2007/378
22. Pasalic, E.: Transforming chosen iv attack into a key differential attack: how to
break TRIVIUM and similar designs. IACR ePrint Archive, Report 2008/443
(2008), http://eprint.iacr.org/2008/443
23. Raddum, H.: Cryptanalytic results on Trivium. eSTREAM, ECRYPT Stream
Cipher Project, Report 2005/001 (2006)
24. Rivest, R.L.: The MD6 hash function. Invited talk at CRYPTO 2008 (2008),
http://people.csail.mit.edu/rivest/
25. Rivest, R.L., Agre, B., Bailey, D.V., Crutchfield, C., Dodis, Y., Fleming, K.E.,
Khan, A., Krishnamurthy, J., Lin, Y., Reyzin, L., Shen, E., Sukha, J., Sutherland,
D., Tromer, E., Yin, Y.L.: The MD6 hash function – a proposal to NIST for SHA-
3, http://groups.csail.mit.edu/cis/md6/
26. Rubinfeld, R., Sudan, M.: Robust characterizations of polynomials with applica-
tions to program testing. SIAM J. Comput. 25(2), 252–271 (1996)
27. Saarinen, M.-J.O.: Chosen-IV statistical attacks on eStream ciphers. In: Malek,
M., Fernández-Medina, E., Hernando, J. (eds.) SECRYPT, pp. 260–266. INSTICC
Press (2006)
28. Samorodnitsky, A.: Low-degree tests at large distances. In: Johnson, D.S., Feige,
U. (eds.) STOC, pp. 506–515. ACM, New York (2007)
29. Shamir, A.: How to solve it: New techniques in algebraic cryptanalysis. Invited
talk at CRYPTO 2008 (2008)
30. Tao, T.: The dichotomy between structure and randomness, arithmetic progres-
sions, and the primes. In: International Congress of Mathematicians, pp. 581–608.
European Mathematical Society (2006)
31. Turan, M.S., Kara, O.: Linear approximations for 2-round Trivium. eSTREAM,
ECRYPT Stream Cipher Project, Report 2007/008 (2007)
32. Vielhaber, M.: Breaking ONE.FIVIUM by AIDA an algebraic IV differential at-
tack. IACR ePrint Archive, Report 2007/413 (2007),
http://eprint.iacr.org/2007/413
A Details on MD6
The word Si is a round-dependent constant: during the first round (i.e., the first
16 steps) Si = 0123456789abcdef, then at each new round it is updated as
Table 4. Distances of the shift operators used in MD6, as function of the step index
within a round
Step 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
ri 10 5 13 10 11 12 2 7 14 15 7 13 11 7 6 12
i 11 24 9 16 15 9 27 15 6 2 29 8 15 5 31 9
22 J.-P. Aumasson et al.
The number of rounds r depends on the digest size: for a d-bit digest, MD6
makes 40 + d/4 rounds.
Table 5. Examples of maxterm equations for 14-round MD6, with respect specified
cube are listed
1 Introduction
A common building block in stream ciphers is the Linear Feedback Shift Register
(LFSR). The bit sequence produced by an LFSR has several cryptographically
interesting properties, such as long period, low autocorrelation and balanced-
ness. LFSRs are inherently linear, so additional building blocks are needed in
order to introduce nonlinearity. A Feedback with Carry Shift Register (FCSR)
is an alternative construction, similar to an LFSR, but with a distinguishing
feature, namely that the update of the register is in itself nonlinear. The idea of
using FCSRs to generate sequences for cryptographic applications was initially
proposed by Klapper and Goresky in [8].
Recently, we have seen several new constructions based on the concept of FC-
SRs. The class of F-FCSRs, Filtered FCSRs, was proposed by Arnault and Berger
in [1]. These constructions were cryptanalyzed in [7], using a weakness in the ini-
tialization function. Also a time/memory tradeoff attack was demonstrated in the
same paper.
Another similar construction targeting hardware environments is F-FCSR-H,
which was submitted to the eSTREAM project [4]. F-FCSR-H was later up-
dated to F-FCSR-H v2 because of a weakness demonstrated in [6]. F-FCSR-H
v2 was one of the four ciphers targeting hardware that were selected for the
final portfolio at the end of the eSTREAM project. Inspired by the success,
Arnault, Berger, Lauradoux and Minier presented a new construction at In-
docrypt 2007, now targeting software implementations. It is named X-FCSR [3].
The main idea was to use two FCSRs instead of one, and to also include an
additional nonlinear extraction function inspired by the Rijndael round func-
tion. Adding this would allow more output bits per register update and thus
increase throughput significantly. Two versions, X-FCSR-256 and X-FCSR-128,
were defined producing 256 and 128 bits per register update, respectively. Ac-
cording to the specification X-FCSR-256 runs at 6.5 cycles/byte and X-FCSR-
128 runs at 8.2 cycles/byte. As this is comparable to the fastest known stream
ciphers, it makes them very interesting in software environments. For the secu-
rity of X-FCSR-256 and X-FCSR-128 we note that there have been no published
attacks faster than exhaustive key search.
In [5] a new property inside the FCSR was discovered, namely that the update
was sometimes temporarily linear for a number of clocks. This resulted in a very
efficient attack on F-FCSR-H v2 and led to its removal from the eSTREAM
portfolio.
In this paper we present a state recovery attack on X-FCSR-256. We use
the observation in [5]. The fact that two registers are used, together with the
extraction function, makes it impossible to immediately use this observation to
break the cipher. However, several additional non-trivial observations will allow
a successful cryptanalysis. The keystream is produced using state variables 16
time instances apart. By considering consecutive output blocks, and assuming
that the update is linear, we are able to partly remove the dependency of several
state variables. A careful analysis of the extraction function then allows us to
treat parts of the state independently and brute force these parts separately,
leading to an efficient state recovery attack. It is shown that the state can be
recovered using 249.3 keystream output blocks and a computational complexity
of 28.3 table lookups per output block. Note that table lookup operations are
much cheaper than testing a single key.
The paper is organized as follows. In Section 2 we give an overview of the
FCSR construction in general and the X-FCSR-256 stream cipher in particular.
In Section 3 we describe the different parts of the attack. Each part of the attack
is described in a separate subsection and in order to simplify the description
we will deliberately base the attack on assumptions and methods that are not
optimal for the cryptanalyst. Then, additional observations and more efficient
algorithms are discussed in Section 4, leading to a more efficient attack. Finally,
some concluding remarks are given in Section 5.
2 Background
This section will review the necessary prerequisites for understanding the de-
tails of the attack. FCSRs are presented separately as they are used as core
components of the X-FCSR-256 stream cipher. The X-FCSR-256 stream cipher
itself is outlined in sufficient detail for understanding the presented attack. For
remaining details, the reader is referred to the specification [3].
key and the IV, and q is a public parameter. The choice of q induces a number of
FCSR properties, the most important one being that it completely determines
the length of the period T of the keystream.
The FCSR automaton as described in [2] efficiently implements generation
of a 2-adic expansion sequence. It contains two registers, a main register M
and a carries register C. The main register M contains n cells. n−1Let M =
(mn−1 , mn−2 , . . . , m1 , m0 ) and associate M to the integer M = i=0 mi · 2i .
Let the binary representation of the positive integer d = (1 + |q|)/2 be given
n−1
by d = i=0 di · 2i . The carries register contains l active cells, l + 1 being the
number of nonzero binary digits di in d. The active carry cells are the ones in
the interval 0 ≤ i ≤ n − 2 for which di = 1, and dn−1 must always be set.
Write the carries register as C = (cn−2 , cn−3 , . . . , c1 , c0 ) and associate it to
the integer C = n−2 i=0 ci · 2 . Note that l of the bits in C are active and the
i
- pn−1 - pn−2 - - p1 - p0 -
6 6 6 6
dn−1 dn−2 dn−3 d1 d0
- - - - -
6 6 6 6 6
C(t) 0 0 c5 0 c3 c2 c1 0
6 6 6 6
M (t) - m7 - m6 ?
- m5 - m4 ?
- m3 ?
- m2 ?
- m1 - m0 -
6 6 6 6
d 1 0 1 0 1 1 1 0
X-FCSR combines Y and Z to form a 256-bit block X(t) at each discrete time
instance t according to
X(t) = Y (t) ⊕ Z(t),
where ⊕ denotes bitwise XOR, so that
Further define
where sl, sr and mix mimic the general structure of the AES round function;
The round functions operate on a 256-bit input, as defined in (1). The general
idea behind the round function operations becomes apparent if one considers
how the functions operate on the 256-bit input when it is viewed as a 4 × 8
matrix A at byte level. Let the byte entries of A be denoted ai,j with 0 ≤ i ≤ 3
and 0 ≤ j ≤ 7.
An Efficient State Recovery Attack on X-FCSR-256 27
This last equation introduces a time delay of 16 time units. The first block of
keystream is produced at t = 0 and the key schedule takes care of defining W (t)
for t < 0.
• LFSRization of FCSRs
• Combining Output Blocks
• Analytical Unwinding
• Brute-forcing the State
In Section 3.2 we describe a trick we call “LFSRization of FCSRs”. We explain
how an observation in [5] can be used to allow treating FCSRs as LFSRs. There
is a price to pay for introducing this simplification, of course, but the penalty is
not as severe as one may expect.
We observe that we can combine a number of consecutive output blocks to
effectively remove most of the dependency on X(t) introduced in (2). The LF-
SRization process works in our favor here as it provides a linear relationship
between FCSR variables. Output block combination is explored in Section 3.3.
Once a suitable combination Q of output blocks is defined, state recovery is
the next step. This is done in two parts. In Section 3.4 we explain how to work
28 P. Stankovski, M. Hell, and T. Johansson
with Q analytically to transform its constituent parts into something that will
get us closer to the state representation. As it turns out, we can do quite a bit
here. Finally, having exhausted the analytical options available to us, we bring
in the computational artillery and do the remaining job by brute-force. We find
that the state can be divided into several almost independent parts and perform
exhaustive search on each part separately. This is described in Section 3.5.
C(t) 0 0 0 0 0 0 1 0
6 6 6 6
M (t) - 1 - 1 ?
- 1 - 1 ?
- 1 ?
- 1 ?
- 0 - 0 -
6 6 6 6
d 1 0 1 0 1 1 1 0
for the basic attack. Later, in Section 4.2, we will see how we can reduce the
requirements to only four consecutive zero feedback bits per set for a complexity
of
COSTLF SRization ≤ 249.3 .
The principal reason for combining consecutive output blocks is to obtain a set
of data that is easier to analyze and work with, ultimately leading to a less
complicated way to reconstruct the cipher state. Remember that we now treat
the two FCSRs as LFSRs with the properties given in Section 3.2.
30 P. Stankovski, M. Hell, and T. Johansson
The main observation is that the modest and regular clocking of the two main
registers provides us with the following equality:
X(t) ⊕ [X(t + 1) 1] ⊕ [X(t + 1) 1] ⊕ X(t + 2) = (, 0, 0, . . . , 0, ) (3)
The shifting operations and on the left hand side denote shifting of the
corresponding 256-bit block left and right, respectively. From this point onward
we discard bits that fall over the edge of the 256 bit blocks, and we do so without
loss of generality or other such severe penalties. The right hand side is then the
zero vector1 , with the possible exception of the first and last bits which are
undetermined (and denoted ). Define
OU T (t) = out(t) ⊕ [out(t + 1) 1] ⊕ [out(t + 1) 1] ⊕ out(t + 2) (4)
in the corresponding way. We have
OU T (t) =
X(t) ⊕ [X(t + 1) 1] ⊕ [X(t + 1) 1] ⊕ X(t + 2) ⊕
W (t − 16) ⊕ [W (t − 15) 1] ⊕ [W (t − 15) 1] ⊕ W (t − 14)
=
(, 0, 0, . . . , 0, ) ⊕
W (t − 16) ⊕ [W (t − 15) 1] ⊕ [W (t − 15) 1] ⊕ W (t − 14)
≈
W (t − 16) ⊕ [W (t − 15) 1] ⊕ [W (t − 15) 1] ⊕ W (t − 14), (5)
where ≈ denotes bitwise equality except for the first and last bit. This expression
allows us to relate keystream bits to bits inside the generator that are just a few
time instances apart. This will turn out to be very useful when recovering the
state of the FCSRs. In order to further unwind equation (5) we need to take a
closer look at the constituent parts of W , namely the round function operations
sl, sr and mix.
byte from X(t − 16). Those eight bits are derived from eight bits in each of Y
and Z, totaling 16 bits, as shown in the left column of Figure 4 below.
Y (t − 15) Y (t − 15)
Y (t − 14)
Z(t − 14)
Q(t)
The next parts of (6) involves sl(X(t − 15)). The same reasoning applies here,
we need to know the full corresponding byte of X(t − 15) in order to be able to
calculate this S-box value. But, since the main registers act like LFSRs, most of
the bits we need from Y and Z for X(t − 15) have already been employed for
X(t − 16) previously. Since the two main registers are clocked only one step at
each time instance, only two more bits are needed, one from Y and one from Z.
This is illustrated by the middle column of Figure 4 below. We count 18 bits in
Y and Z so far.
In the same vein, two more bits are needed from Y and Z to calculate
sl(X(t − 14)), illustrated in the remaining part of Figure 4. This brings the
total up to 20 bits. All in all, for one byte position in Q(t) we have total bit
usage as shown in Figure 5.
So, 10 bits in Y (t − 16) and 10 bits in Z(t − 16) is what we require to be
able to calculate one specific byte position in Q(t). By restricting our attention
to the six middlemost bits of each byte in Q we accomplish two objectives; we
effectively reduce the number of unknown bits we are dealing with in Y and Z,
An Efficient State Recovery Attack on X-FCSR-256 33
Y (t − 16)
Z(t − 16)
Q(t)
and we simplify the expression for calculating the byte in Q by safely reducing
the effects of the shifting operation. Specifically, shifting one bit left or right does
not bring neighboring bytes into play.
Focusing on one single byte position gives us six equations, one for each of the
six middlemost bits, and 20 unsolved variables, one for each bit position in Y
and Z. This amounts to an underdetermined system, of course, but we can easily
add more equations by having a look at the same byte position in Q(t + 1). The
six middle bits of that byte give us six new equations at the cost of introducing
a few new variables. To see how many, we must perform the analysis for Q(t + 1)
corresponding to Figure 4. The total bit usage for one byte position in Q(t + 1)
in terms of bits in Y (t − 16) and Z(t − 16) is given in Figure 6.
Y (t − 16)
Z(t − 16)
Q(t + 1)
From this we see that the six new equations have the downside of introducing
two new variables. In total we therefore have 12 equations and 22 variables after
including Q(t+1). The system is still underdetermined, so we can add Q(t+2) as
well. This brings us to 18 equations and 24 variables, and so on. Adding Q(t + 3)
provides 24 equations for 26 variables, but at this level we will obtain a resulting
system that provides hope of being fully determined as we may also reduce the
number of variables by reusing already determined values as we scan Q byte by
byte from one end to the other to solve for bits in Y and Z. The corresponding
34 P. Stankovski, M. Hell, and T. Johansson
bit usage for our four consecutive Q’s in terms of bits in Y (t − 16) and Z(t − 16)
is illustrated in Figure 7 below.
Y (t − 16)
Z(t − 16)
Q(i)
Y (t − 16)
Z(t − 16)
Q(t)
Employing bit reuse, the total cost for the brute-forcing part becomes
solutions. These are easy to spot, though, as the succeeding equation system
will generally be unsolvable as we attempt to reuse 10 of the bits from the false
solution. And since the false solutions do not appear in abundance, we do not
compensate for this complexity wise.
This concludes the basic attack, in which we have assumed availability of four
separate sets of six consecutive zero feedback bits as described in Section 3.2.
1 1 1 7
COSTbrute−f orce < 1 + 1+ + + ... =
8 4 42 6
5 Concluding Remarks
It is clear that the design of the X-FCSR stream cipher family is not sufficiently
secure. Depending on one’s inclination, it is possible to attribute this insufficiency
to the modest clocking of the two FCSRs, the size or number of FCSRs, how
they are combined, the complexity of the round function or some other issue.
All of these factors are parts of the whole, but the key insight, however, is that
it is important not to rely on the non-linear property of FCSRs too heavily. The
LFSRization process shows that it is relatively cheap to linearize FCSRs, the
cost being roughly logarithmic in the size of active carry registers.
An Efficient State Recovery Attack on X-FCSR-256 37
More details on the last improvements and a more in-depth exposé of the
effects of the last carry bit on system solving are available in the full version
of this paper. There we also exploit the symmetry situation of requiring several
consecutive ’one’ feedback bits for an additional reduction in required keystream.
Let us end with a note on applicability to X-FCSR-128. The basic attack
presented here works for X-FCSR-128 as well, but the resulting complexity is
much less impressive. The LFSRization process is identical for both variants of
X-FCSR, as is the analytical unwinding. Enter round functions. The two registers
are 256 bits in size in both cases, but X-FCSR-128 “folds” the contents of the
registers to produce a 128-bit result, implying that more bits are condensed into
one byte position of Q as analyzed in Section 3.5. This affects cost in a negative
way, actually making the attack more expensive for X-FCSR-128. We estimate
that at least twelve consecutive Q’s are needed for a fully determined first byte
system. This leads to a guesstimated expected value of about 274 output blocks
for the attack to come through in the basic setting, each output block requiring
roughly one table lookup into a storage of at most 272 table cells.
References
1. Arnault, F., Berger, T.: F-FCSR: Design of a new class of stream ciphers. In: Gilbert,
H., Handschuh, H. (eds.) FSE 2005. LNCS, vol. 3557, pp. 83–97. Springer, Heidelberg
(2005)
2. Arnault, F., Berger, T., Lauradoux, C.: Update on F-FCSR stream cipher. eS-
TREAM, ECRYPT Stream Cipher Project, Report 2006/025 (2006),
http://www.ecrypt.eu.org/stream
3. Arnault, F., Berger, T.P., Lauradoux, C., Minier, M.: X-FCSR - a new software ori-
ented stream cipher based upon FCSRs. In: Srinathan, K., Pandu Rangan, C., Yung,
M. (eds.) INDOCRYPT 2007. LNCS, vol. 4859, pp. 341–350. Springer, Heidelberg
(2007)
4. ECRYPT. eSTREAM: ECRYPT Stream Cipher Project, IST-2002-507932,
http://www.ecrypt.eu.org/stream/
5. Hell, M., Johansson, T.: Breaking the F-FCSR-H stream cipher in real time. In:
Pieprzyk, J. (ed.) ASIACRYPT 2008. LNCS, vol. 5350, pp. 557–569. Springer, Hei-
delberg (2008)
6. Jaulmes, E., Muller, F.: Cryptanalysis of ECRYPT candidates F-FCSR-8 and F-
FCSR-H. eSTREAM, ECRYPT Stream Cipher Project, Report 2005/046 (2005),
http://www.ecrypt.eu.org/stream
7. Jaulmes, E., Muller, F.: Cryptanalysis of the F-FCSR stream cipher family. In:
Preneel, B., Tavares, S. (eds.) SAC 2005. LNCS, vol. 3897, pp. 20–35. Springer,
Heidelberg (2006)
8. Klapper, A., Goresky, M.: 2-adic shift registers. In: Anderson, R.J. (ed.) FSE 1993.
LNCS, vol. 809, pp. 174–178. Springer, Heidelberg (1994)
Key Collisions of the RC4 Stream Cipher
Mitsuru Matsui
Abstract. This paper studies “colliding keys” of RC4 that create the
same initial state and hence generate the same pseudo-random byte
stream. It is easy to see that RC4 has colliding keys when its key size
is very large, but it was unknown whether such key collisions exist for
shorter key sizes. We present a new state transition sequence of the key
scheduling algorithm for a related key pair of an arbitrary fixed length
that can lead to key collisions and show as an example a 24-byte collid-
ing key pair. We also demonstrate that it is very likely that RC4 has a
colliding key pair even if its key size is less than 20 bytes. This result is
remarkable in that the number of possible initial states of RC4 reaches
256! ≈ 21684 . In addition we present a 20-byte near-colliding key pair
whose 256-byte initial state arrays differ at only two byte positions.
1 Introduction
The RC4 stream cipher is one of the most widely-used real-world cryptosystems.
Since its development in 1980’s, RC4 has been used in various software appli-
cations and standard protocols such as Microsoft Office, Secure Socket Layer
(SSL), Wired Equivalent Privacy (WEP). The architecture of RC4 is extremely
simple and its encryption speed is remarkably fast. It has been suitable for not
only PC applications but also embedding environments.
RC4 accepts a secret key whose length is 1 to 256 bytes, where a typical
key size is 5 bytes (due to an old export regulation), 13 bytes (in the WEP
encryption) or 16 bytes. It consists of two parts; the key scheduling algorithm
(KSA) and the pseudo-random generating algorithm (PRGA). The KSA cre-
ates the 256-byte initial state from the secret key, and the PRGA generates
pseudo-random byte stream from the initial state. Either of the algorithms can
be described unambiguously in only a few lines. Due to this simplicity and wide
applicability, a vast amount of efforts have been made for cryptanalysing RC4
since its specification was made public on Internet in 1994 [1].
As early as one year after the specification of RC4 was publicly available,
it was pointed out by Roos [10] that the initial few bytes of its output stream
are strongly correlated with the key. This observation was later extended in
various ways. Mantin and Shamir [8] mounted a distinguishing attack of RC4
under the “strong distinguisher scenario” that an attacker can obtain many
short output streams using random and unrelated keys. Paul and Preneel [9]
successfully demonstrated a distinguisher that requires a total of 225 output
bytes (2 bytes/key × 224 keys).
For cryptanalysis of a real-world application using RC4, Fluhrer, Mantin and
Shamir [3] showed an attack of WEP for the first time in 2001. They found
that partial information of the key of RC4 gives non-negligible information of
its output bytes. This fact was efficiently used for mounting a passive attack,
since the initial vector of WEP is packet-variable and embedded in the key of
RC4. It was recently improved by Klein [6], and finally in 2007 Tews, Weinmann
and Pyskin [11] and Vaudenay and Vuagnoux [12] independently demonstrated
a very practical key recovery attack of the 104-bit WEP.
For another attacks, Fluhrer and McGrew [4] presented a distinguishing at-
tack of RC4 using 230.6 output bytes generated by a single key, and Mantin [7]
successfully reduced the output stream size required for the successful attack
down to 226.5 bytes and also showed how to predict output bits. More recently
Biham and Carmeli [2] concentrated on the key scheduling algorithm of RC4
and discussed how to recover a secret key from a given internal state.
This paper studies another type of weakness of the key scheduling algorithm of
RC4; that is, existence of secret keys that create the same initial state and hence
generate the same pseudo-random byte stream, which we call “colliding keys”.
It had been already pointed out by Grosul and Wallach [5] in 2000 that RC4 has
related-key key pairs that generate substantially similar hundred output bytes
when the key size is close to the full 256 bytes. In this paper we explore much
stronger key collisions in a shorter key size.
Since the total number of possible initial states of RC4 reaches 256! ≈ 21684 ,
RC4 must have colliding keys if its key size exceeds 1684/8 = 210 bytes.
Moreover, due to the birthday paradox, it is not surprising that RC4 has colliding
keys when its key size is (1684/2)/8 = 105 (or more) bytes. However, it was
unknown whether colliding keys exist in a shorter key size. The contribution of
this paper is to give a positive answer to this problem.
In this paper, we begin by demonstrating a specific example of a colliding
64-byte key pair, whose internal 256-byte state arrays differ at most two byte
positions in any step i (0≤i≤255) of the key scheduling algorithm. Then by
generalizing this example, we show a state transition pattern that is applicable
to a key pair of an arbitrary fixed length and estimate the probability that such
pattern actually takes place for randomly given key pairs with a fixed difference.
We have confirmed that our probability estimation mostly agrees with com-
puter experimental results when the key size is around 32 bytes or more. We
also demonstrate that it is very likely that RC4 has a colliding key pair even
when its key size is much shorter, say 20 bytes, while the minimal key size that
has colliding keys is still an open problem.
We further extend our observation to a near-colliding key pair; that is, a
key pair whose initial states differ at exactly two positions. In the same way as
the key collision case, we show a state transition pattern of a key pair of an
arbitrary length that can lead to a near-collision and analyze the probability
40 M. Matsui
that the pattern actually takes place. Finally we illustrate our (near-)colliding
key pair search algorithm, which has successfully found a 24-byte colliding key
pair and a 20-byte near-colliding key pair.
K1 = 45 3d 7d 3d c9 45 57 12 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
K2 = 45 3d 7e 3d c9 45 57 12 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Table 1 shows internal values in the state randomization loop for each key,
where “@XX” denotes an address of the state array. For example, at the end of
step i=02 (i.e. after the swap), j1=02, j2=03 and the state arrays differ at exactly
two positions 02 and 03. At these positions, S1[02]=02, S2[02]=03, S1[03]=03
and S2[03]=02.
Now let us take a look at this transition sequence more closely to see why/how
the distance of this key pair remains 0 or 2 at any step.
Exploring the Variety of Random
Documents with Different Content
témoin de toutes mes angoisses, j’en appelle à votre cœur loyal,
et devant l’insuffisance des mots qui traduisent si mal le fond
des sentiments, je me désespère, je me tords, je deviens
folle !…
S’il est vrai que vous allez partir bientôt, comme déjà on
l’annonce, s’il est vrai que cet épouvantable dénouement
m’attend dans quelques semaines, pourquoi me laisser
agoniser ainsi lentement ?
Pardonnez à ma raison éprouvée le ton et l’accent de ces
lignes. Je ne veux pas savoir ce qui a pu me rabaisser à vos
yeux ; je sais seulement que j’étouffe, que je sanglote et que
peut-être vous ne me croirez pas…
Javotte.
Paul était avec moi quand Olive m’a remis cette lettre. Plus
remué par cette lecture que je ne l’aurais voulu, je lui ai dit :
— C’est de Javotte. Je voudrais te la montrer, car à présent nous
ne devons plus rien nous cacher ; mais il y a là-dedans une douleur
simulée ou réelle que je ne peux pas me résigner à trahir… C’est
une femme… Sache seulement que je ne lui répondrai pas.
— Tu as raison. Je ne veux pas savoir ce qu’elle t’écrit. Que
m’importe tout ce qu’elle peut inventer à présent !… Mais tu peux
t’attendre à un bel étalage de ces phrases auxquelles malgré soi on
se laisse toujours prendre… Ce qui me rassure, c’est que notre
amitié est désormais à l’abri des entreprises de cette gredine.
Il en parle sans indulgence. Mais il faut se mettre à la place de
Paul qui constate avec un peu d’humeur involontaire que c’est à moi
et non à lui qu’elle a écrit.
Que ferai-je ? J’ai dit à Paul que je ne répondrais pas. Je relis la
lettre lentement quand je suis seul. Je suis ému ; mais ma conviction
n’est pas ébranlée. Que ferai-je ? Si je la revois, le moindre de ses
gestes m’attachera à elle mieux que la preuve la plus éclatante de
sa sincérité ? Et même si je suis convaincu qu’elle ment, en sera-t-
elle moins désirable ? Alors que m’importent ses explications ? Quoi
qu’elle dise, que ses paroles soient persuasives ou qu’elles n’aient
aucun sens, je n’entendrai pas ses paroles ; j’entendrai le son de sa
voix et je n’aurai plus de force dans les jambes. Même s’imposât-elle
le silence, qu’il lui suffirait de me regarder ; son regard m’engourdirait
le cœur. Et tint-elle les yeux baissés que la seule vue de sa bouche
dissoudrait mon courage…
Non, il ne faut pas, il ne faut pas que je la revoie.
J’ai passé l’été étendu dans mon petit kiosque, à rêver, à jouir
une dernière fois du mystérieux enchantement qui enveloppe les
hommes. Septembre est venu. Sur le rideau de sapins où mon
regard se pose, je vois s’affaiblir la lumière dont le rayonnement se
fait plus émouvant de jour en jour. C’est l’instant de la morne féerie,
des journées douces et dorées qui amollissent le cœur. Le paysage
le plus indigent se magnifie. Quelle paix rêveuse dans une allée en
septembre et en octobre ! Quelle ardente mélancolie ! De leur
décomposition prochaine, les choses semblent avoir le grand
pressentiment et l’âme cesse de se croire seule quand elle sent
autour d’elle toutes ces forces en déclin, quand elle sent dans
l’espace tant de lyrisme et de regret.
Chaque matin, la lumière en se séparant de l’ombre me trouve
déjà éveillé. Dans l’air, si limpide qu’il semble avoir été filtré par la
nuit, il y a encore des chants d’oiseaux. Ce sont les derniers de la
saison. Ils se dispersent, se fragmentent et, pendant que mon oreille
les recueille et les rassemble un à un, je crois réunir les morceaux
épars d’une page déchirée. Bientôt cette douce naissance d’une
journée nouvelle m’appelle au jardin. Je me lève. C’est le moment
où je refais connaissance avec moi-même. La glace me renvoie un
étrange visage auquel je ne parviens pas à m’accoutumer. Les
cheveux et la barbe qui ont blanchi par places d’une façon inégale,
ont l’air fané, déteint, d’une étoffe de mauvaise qualité. Il s’en
dégage une impression de disgrâce, de pauvreté, comme si une
partie de mon vêtement était usée.
Il y a, devant ma fenêtre, un sorbier dont la cime jaunit et se
dessèche parce que, sous la terre, un mal que je ne puis percevoir,
ronge ses racines. Je ressemble à ce sorbier. Le sourd travail que la
maladie poursuit en moi, c’est à mon sommet qu’il se révèle et,
parce que l’organisme a été touché dans ses parties obscures, la vie
s’éteint à la cime de l’arbre.
Il me semble que l’automne dernier, à Davos, j’ai vaguement
pensé quelque chose d’analogue. Mais là-bas, encore, je paraissais
si jeune ! J’avais l’air d’un adolescent affaibli par une rapide
croissance ; et voici que, sans transition, j’ai passé d’un extrême à
l’autre, comme au théâtre, selon la volonté de l’auteur, un
personnage vieillit de vingt ans dans l’intervalle d’un entr’acte. Il en
résulte cette surprise quotidienne que j’ai à consulter ma glace. Je
crois toujours que je me trompe, que ce n’est pas moi, que je suis
victime d’une supercherie. Alors, je descends et, dehors, si j’adresse
la parole, comme cela m’est arrivé hier, à un enfant arrêté devant ma
grille, l’enfant à demi effrayé se met à courir puis, vingt pas plus loin,
rassuré par la distance, il se retourne et dit en me désignant du
doigt :
— Ah ! ah ! le bonhomme !
Le bonhomme !…
Chaque matin, donc, je descends au jardin de mon pas de
bonhomme. Dans l’allée, le soleil est avec moi. D’une façon
affectueuse, sans peser, il touche ma faible épaule. Il m’encourage,
il m’accompagne comme un ami.
Je donne un regard aux acacias qui sont les blonds parmi les
arbres. Leur ombre légère remue sur le petit kiosque où je vais
m’étendre. A cause du rideau de sapins qui limite ma vue, je suis
comme enfermé dans un cloître de verdure. Tout se resserre autour
de moi. Tout devient plus intime. D’une forge voisine m’arrivent plus
atténuées les sonorités mélancoliques du fer que frappe le marteau.
Un rouge-gorge, sur le cerisier, veut que je l’écoute, et, quand il se
tait, j’entends la voix lointaine du coucou qui sonne les dernières
heures de l’été. Ainsi passe le temps. Parfois une reine-Claude trop
mûre roule sur le petit toit qui me protège et va se meurtrir à terre où
elle suscite aussitôt un bourdonnement de guêpes. Parfois, c’est une
poire de curé qui tombe de très haut, et, pendant qu’elle tombe, je
vois son ombre attentive courir sur le sol pour la rejoindre et la
recevoir. Ici, un insecte, dont j’ignore le nom, creuse, au prix d’efforts
inouïs, un petit trou où il se tiendra embusqué, guettant plus faible
que soi ; là, deux papillons qui se poursuivent décorent le mur de
leurs guirlandes ; et, sur les montants du kiosque que parcourent en
longues files les fourmis laborieuses, autour de ma tête, dans l’air
que les mouches emplissent de leur ballet aérien, sur chaque rosier,
où un insecte, dont j’ignore aussi le nom, pratique, à l’aide d’une
petite scie, une entaille pour y déposer ses œufs, au centre de cette
toile qu’achève l’araignée, partout, quelle hâte de vivre chez ces
êtres innombrables qui, menacés par l’hiver, remplissent avec plus
d’ardeur leur fonction belliqueuse ou débonnaire et qu’on ne
distingue pas toujours de leur milieu, telle la vrillette qu’on prendrait
pour une parcelle de bois, tel l’opâtre qui ressemble à un grain de
sable !…
Comment garder l’impression d’être une cellule isolée, ne pas
s’intéresser à tout cela, aux mille petites amies que veulent être les
fleurs pour celui qui les cultive, aux feuilles qui humblement
grandissent, se colorent, donnent un peu d’ombre, sèchent et se
détachent de l’arbre, aux racines qui sont de lentes énergies
cachées, aux liserons qu’on arrache et qu’on retrouve sous ses pas
comme autant de petites volontés patientes, au sourd travail des
forces de la vie ? Comment se refuser à jouir du plaisir secret et
inexplicable qui vous vient d’un vieux figuier penché d’une certaine
façon ou du grincement, dans la rue voisine, d’un vieux portail
évocateur de broussailles et de solitude ? Parce que mes amis me
négligent ou m’abandonnent, parce que ceux que la curiosité
ramenait à moi m’ont comblé en partant de souhaits affectueux, de
paroles d’espérance et qu’ils ne sont pas revenus, vais-je me
lamenter ?
Ne sais-je pas, ne savons-nous pas qu’il y a dans tout ce qui
réussit une vertu attirante et dans tout ce qui échoue je ne sais quoi
qui éloigne ? Nous nous sentons plus légers si, devant nous, une
hirondelle trace les courbes de son vol, tandis que la fatigue d’un
cheval qui gravit une côte nous alourdit les jambes. L’homme
recherche instinctivement les images de la joie. Nous savons donc
qu’une période d’épreuve ou d’infortune fera le vide autour de nous.
Pourquoi, lorsque les circonstances nous forcent à subir cette loi,
semblons-nous la découvrir et en éprouvons-nous une sorte de
stupéfaction triste ? On mesure sa déchéance aux réponses si
lentes qu’on reçoit à ses lettres, et qui autrefois étaient si promptes à
venir, à tant de sympathies qui se sont refroidies. Pour ma part, je
sens vivement la faute que j’ai commise aux yeux de mes meilleurs
camarades par mon obstination à demeurer malade. En ne
reprenant pas ma place dans l’activité, je me raye du nombre de
ceux qui comptent, je cesse d’être une valeur sociale. J’ai tort : je
suis coupable vis-à-vis de ceux qui croyaient à ma fortune d’avoir
déçu leurs espérances.
Il faut le reconnaître. Il y a une certaine beauté dans la réussite,
comme il y a quelque laideur dans l’insuccès. Que toutes les
conséquences de la laideur s’attachent à la défaite, qu’on éprouve
pour l’une et pour l’autre la même compassion distraite, le même
éloignement, peut-être cela n’est-il pas bon, ni juste ; mais cela est
logique dans une certaine mesure. Ce qu’on admire, c’est une
œuvre heureuse de la nature, un organisme exceptionnel, un
cerveau de génie, la beauté d’un visage, tout ce que nous tenons de
la naissance et non pas de l’effort, tout ce qui dans l’homme semble
d’essence divine. Tentez de vous surpasser avec une santé débile,
une petite taille, des dons moyens, on dira : « Ce n’est pas mal ».
L’effort n’a droit qu’à une estime secondaire. Ames vaillantes, logées
dans un corps trop faible, qui défaillez en chemin, n’attendez que
l’oubli. Si vous tombez, c’est que vous ne formiez pas un être
complet, c’est que la nature n’avait pas mis en vous les forces
nécessaires à votre aboutissement.
Certes, j’ai subi, comme chacun de nous, l’attrait du triomphe ;
mais, devant le triomphateur, j’ai toujours pensé : « Celui-là n’a plus
besoin de moi. » Lorsqu’une cause au succès de laquelle j’ai
contribué de toute mon adhésion est gagnée, ma sympathie se
renverse et je me tourne avec intérêt vers l’adversaire, vers la cause
perdue, où l’on n’avait peut-être pas tout à fait tort, cédant, malgré
moi, à cet instinct irrésistible qui m’a toujours porté à prendre le parti
du plus faible.
Je n’ignore pas combien une telle disposition risque d’affaiblir
l’énergie et je ne la conseille pas à ceux qui ne sauraient me
comprendre. La plupart des hommes vont au triomphateur. Qu’ils y
aillent !
Je ne dois pas me dire : « Pierre qui me suivait, qui m’enviait, a
vu par ma disparition s’offrir à lui les fruits qui m’attendaient. Le petit
Pascal vient d’épouser une créature adorable. Étienne approche de
la gloire. J’étais le plus décidé, le plus volontaire d’entre eux, le plus
entraîné à goûter la joie sainte du travail, l’ami de bon conseil,
jamais découragé, dont ils disaient : « Celui-là, son affaire est
bonne », et me voilà sur une chaise longue, jusqu’à ma dernière
heure. » Non, je ne dois pas me dire ces choses. Quand on accepte
courageusement un sort comme le mien, on s’avise de cette vérité
que tout a une limite : le bonheur comme la souffrance. On n’est
jamais aussi heureux qu’on le souhaite, ni aussi déshérité qu’on le
croit.
J’écris pour ceux que la vie, le mal ou l’amour ont blessés, pour
ceux qui portent au côté gauche une langueur secrète et qui, comme
moi, étendus dans un jardin, interrompent leur lecture ou leur rêverie
pour mieux sentir dans l’enveloppement affectueux d’une journée de
septembre ces douces influences qui veulent consoler…
XXIII
RÊVERIE PHILOSOPHIQUE