BOOLEAN FUNCTIONS IN CRYPTOLOGY AND INFORMATION SECURITY
NATO Science for Peace and Security Series This Series presents the results of scientific meetings supported under the NATO Programme: Science for Peace and Security (SPS). The NATO SPS Programme supports meetings in the following Key Priority areas: (1) Defence Against Terrorism; (2) Countering other Threats to Security and (3) NATO, Partner and Mediterranean Dialogue Country Priorities. The types of meeting supported are generally “Advanced Study Institutes” and “Advanced Research Workshops”. The NATO SPS Series collects together the results of these meetings. The meetings are co organized by scientists from NATO countries and scientists from NATO’s “Partner” or “Mediterranean Dialogue” countries. The observations and recommendations made at the meetings, as well as the contents of the volumes in the Series, reflect those of participants and contributors only; they should not necessarily be regarded as reflecting NATO views or policy. Advanced Study Institutes (ASI) are high level tutorial courses to convey the latest developments in a subject to an advanced level audience. Advanced Research Workshops (ARW) are expert meetings where an intense but informal exchange of views at the frontiers of a subject aims at identifying directions for future action. Following a transformation of the programme in 2006 the Series has been re named and re organised. Recent volumes on topics not related to security, which result from meetings supported under the programme earlier, may be found in the NATO Science Series. The Series is published by IOS Press, Amsterdam, and Springer Science and Business Media, Dordrecht, in conjunction with the NATO Public Diplomacy Division. Sub Series A. B. C. D. E.
Chemistry and Biology Physics and Biophysics Environmental Security Information and Communication Security Human and Societal Dynamics
Springer Science and Business Media Springer Science and Business Media Springer Science and Business Media IOS Press IOS Press
http://www.nato.int/science http://www.springer.com http://www.iospress.nl
Sub Series D: Information and Communication Security
Vol. 18
ISSN 1874 6268
Boolean Functions in Cryptology and Information Security
Edited by
Bart Preneel Katholieke Universiteit Leuven, Leuven, Belgium and IBBT, Belgium
and
Oleg A. Logachev Lomonosov University, Moscow, Russia
Amsterdam • Berlin • Oxford • Tokyo • Washington, DC Published in cooperation with NATO Public Diplomacy Division
Proceedings of the NATO Advanced Study Institute on Boolean Functions in Cryptology and Information Security Zvenigorod, Moscow region, Russia 8 18 September 2007
© 2008 IOS Press. All rights reserved. All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, without prior written permission from the publisher. ISBN 978 1 58603 878 6 Library of Congress Control Number: 2008927993 Publisher IOS Press Nieuwe Hemweg 6B 1013 BG Amsterdam Netherlands fax: +31 20 687 0019 e mail:
[email protected] Distributor in the UK and Ireland Gazelle Books Services Ltd. White Cross Mills Hightown Lancaster LA1 4XS United Kingdom fax: +44 1524 63232 e mail:
[email protected]
Distributor in the USA and Canada IOS Press, Inc. 4502 Rachael Manor Drive Fairfax, VA 22032 USA fax: +1 703 323 3668 e mail:
[email protected]
LEGAL NOTICE The publisher is not responsible for the use which might be made of the following information. PRINTED IN THE NETHERLANDS
Boolean Functions in Cryptology and Information Security B. Preneel and O.A. Logachev (Eds.) IOS Press, 2008 © 2008 IOS Press. All rights reserved.
v
Preface The NATO-Russia Advanced Study Institute “Boolean Functions in Cryptology and Information Security” was held in Zvenigorod (Moscow region, Russia) from September 8 to 18, 2007. The ASI was sponsored by NATO in cooperation with Lomonosov University, Moscow, and the Russian Foundation for Basic Research. The Organizing Committee of the ASI was headed by co-directors Bart Preneel (Katholieke Universiteit Leuven and IBBT, Belgium) and Oleg Logachev (Lomonosov University, Moscow, Russia). The Information Security Institute of Lomonosov University, Moscow was responsible for the local organization of the ASI. We would like to thank many people for their cooperation, and in particular Mikhail Anokhin and Nikolay Varnovsky. The ASI was attended by 61 participants from 11 countries. The ASI program included lectures of invited professors and talks of ASI students. We would like to acknowledge our invited professors for their contributions: Sergey Agievich (Belarus), Valeriy Alekseev (Russia), Vladimir Anashin (Russia), Yuri Borissov (Bulgaria), Nicolas Courtois (France), Thomas Cusick (USA), Sergey Gashkov (Russia), Andrew Klapper (USA), Gohar Kyureghyan (Armenia), Philippe Langevin (France), Oleg Logachev (Russia), Subhamoy Maitra (India), Miodrag Mihaljevi´c (Serbia), Svetla Nikova (Belgium), Valentin Nosov (Russia), Bart Preneel (Belgium), François Rodier (France), Pantelimon St˘anic˘a (Romania), Yuriy Tarannikov (Russia), Peter Wild (Australia), Jacques Wolfmann (France), Yuliang Zheng (Australia). The proceedings of ASI are divided into three parts: lectures of invited professors, talks of students, and some open problems.
March 2008
Bart Preneel Oleg Logachev
This page intentionally left blank
vii
Contents Preface Bart Preneel and Oleg Logachev
v
Invited Talks Bent Rectangles Sergey Agievich
3
On Algebraic Algorithms Deciding Properties of Discrete Functions Valeriy Alekseev
23
Non-Archimedean Theory of T-Functions Vladimir Anashin
33
Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited Yuri Borissov, An Braeken, Svetla Nikova and Bart Preneel
58
On Boolean Functions with Generalized Cryptographic Properties An Braeken, Ventzislav Nikov, Svetla Nikova and Bart Preneel
73
Conjectures on the Number of Balanced Boolean Functions of Bounded Degree Thomas W. Cusick
97
Bit-Parallel Circuits for Arithmetic in Finite Fields Sergey B. Gashkov and Igor S. Sergeev
104
On a Family of Perfect Nonlinear Binomials Tor Helleseth, Gohar Kyureghyan, Geir Jarle Ness and Alexander Pott
126
Classification of Boolean Quartic Forms in Eight Variables Philippe Langevin and Gregor Leander
139
Local Affinity of Boolean Mappings Oleg A. Logachev, Valery V. Yashchenko and Mikhail P. Denisenko
148
Boolean Functions on Odd Number of Variables Having Nonlinearity Greater Than the Bent Concatenation Bound Subhamoy Maitra
173
Decimation Based Algebraic and Correlation Attacks and Design of Boolean Functions Miodrag J. Mihaljević
183
Constructing Families of Latin Squares over Boolean Domains Valentin A. Nosov
200
On Almost Perfect Nonlinear Boolean Functions François Rodier
208
viii
On the Nonexistence of Homogeneous Rotation Symmetric Bent Boolean Functions of Degree Greater Than Two Pantelimon Stănică
214
On Correlation Immune Boolean Functions Yuriy Tarannikov
219
A Cyclic Code Approach of Bent Functions over F2 and » 4 Jacques Wolfmann
232
On Balanced Nonlinear Boolean Functions Yuliang Zheng and Xian-Mo Zhang
243
Students’ Talks On Properties of Correlation Immune Functions with High Nonlinearity Anton Botev
283
Constructing Boolean Functions with Extremal Properties Andrey Khalyavin
289
Tight Bounds Between Algebraic Immunity and Nonlinearities of High Orders Mikhail Lobanov
296
On Implementation of One Type of Recursive Construction Sergey G. Shipunov
307
On Impossibility of Uniform Distribution of Codewords over Spheres Maria Yarykina
315
On the Structure of the Spectrum Support of Boolean Functions Alexander Zverev
331
Some Open Problems Open Problems in Boolean Function Theory. The Cryptographer’s View
343
Subject Index
353
Author Index
355
Invited Talks
This page intentionally left blank
Boolean Functions in Cryptology and Information Security B. Preneel and O.A. Logachev (Eds.) IOS Press, 2008 © 2008 IOS Press. All rights reserved. doi:10.3233/978-1-58603-878-6-3
3
Bent Rectangles Sergey AGIEVICH 1 Belarusian State University, Minsk, Belarus Abstract. We study generalized regular bent functions using a representation by bent rectangles, that is, a particular class of matrices with certain rows and columns. We characterize affine transformations of bent rectangles, propose new constructions of biaffine and bilinear bent squares, study partitions of a vector space into affine planes of equal dimension, and use such partitions to build bent rectangles. We illustrate the concept of bent rectangles by examples for the Boolean case. Keywords. Walsh–Hadamard transform, bent function, regular bent function, bent rectangle, partitioning Vn into disjoint affine planes
Introduction Boolean bent functions were introduced by Rothaus [1] and Dillon [2], and since then have been widely studied in view of their interesting algebraic and combinatorial properties and because of their applications in signal processing, coding theory, and cryptography. For a surveys on bent functions, see [3,4]. In the present paper we study bent functions using a representation by bent rectangles. Rows of such rectangles consist of the Walsh–Hadamard coefficients of restrictions of a target bent function to a subset of variables. Normalized columns also consist of the Walsh–Hadamard coefficients of some Boolean functions. The notion of bent rectangles was introduced in [5]. A special kind of rectangles, all elements of which are of the same magnitude, was proposed in [6]. Authors of [7] also extensively dealt with restrictions of bent functions and actually used 2- and 4-row bent rectangles. In [8, preliminary version], bent squares are used to construct bent functions recursively. We extend the results of [5] in the following directions. In Sections 1, 2 we modify the concept of bent rectangles to the generalized regular bent functions over an arbitrary quotient ring of integers (see [9]). In Section 3 we describe affine transformations of bent rectangles. In Section 5 we propose new constructions of bent functions, which are based on biaffine and bilinear mappings. In Section 6 we study partitions of a vector space into affine planes of same dimension and use such partitions to construct bent rectangles. Additionally, in Section 4 we use bent rectangles to illustrate some known properties of Boolean bent functions. 1 National
Research Center for Applied Problems of Mathematics and Informatics, Belarusian State University, Nezavisimosti av., 4, 220030 Minsk, Belarus; E-mail:
[email protected].
4
S. Agievich / Bent Rectangles
1. Functions Let Zq be the ring of integers modulo q which we identify with the set {0, 1, . . . , q − 1}. ◦
◦
Denote by Zq the set of all qth roots of unity in C and √ by χ : Zq → Zq the additive character defined by χ(a) = exp(2πia/q), where i = −1. The ring of integers modulo a prime q is a field. We emphasize this fact by writing Fq instead of Zq . The set Vn = Znq consists of all vectors a = (a1 , . . . , an ), ai ∈ Zq , and forms a group under vector addition. If q is prime, then Vn is the n-dimensional vector space over the field Fq . Let Fn be the set of all functions Vn → Zq . A function f ∈ Fn depends on n variables x1 , . . . , xn , which are the coordinates of an argument x. Given J = {j1 , . . . , jm } ⊆ {1, . . . , n}, the restriction of f (x) to (xj1 , . . . , xjm ) is a function ob/ J. tained from f by substituting certain constants for variables xj for j ∈ ◦
◦
◦
Starting with f , construct the function f : Vn → Zq , f (x) = χ(f (x)), and the function f: Vn → C,
f(u) =
◦
f (x)χ(u · x),
u ∈ Vn .
x∈Vn
Here u · x = u1 x1 + . . . + un xn and the bar indicates complex conjugation. It is f ≡ c, c ∈ Zq , for convenient to assume that F0 consists functions ◦ of constant ◦ ◦ which f = f ≡ χ(c). Denote F n = f : f ∈ Fn , Fn = f : f ∈ Fn . ◦
The mapping f → f (or f → f) is called the Walsh–Hadamard transform. Since
qn 0
χ(a · u) =
u∈Vn
if a = 0, otherwise
◦
for each a ∈ Vn , the inverse transform f → f can be defined as follows: ◦
f (x) = q −n
◦
f (y)
y∈Vn
= q −n
χ(u · (x − y))
u∈Vn ◦
f (y)χ(u · y)χ(u · x)
u∈Vn y∈Vn
= q −n
f(u)χ(u · x).
u∈Vn
The Walsh–Hadamard transform is often used in cryptography, coding theory, signal processing to derive some properties of f . In many cases it is important to use functions f with maxu |f(u)| as small as possible. Due to the Parseval’s identity 2 f (u) = q 2n , u∈Vn
5
S. Agievich / Bent Rectangles
we have maxu f (u) ≥ q n/2 , where the equality holds if and only if f (u) = q n/2 ,
u ∈ Vn .
(1)
If f satisfies (1), then it is called a bent function. If, additionally to (1), f(u) ∈ ◦
q n/2 Zq for all u, then f is called a regular bent function. Let Bn be the set of all regular bent functions of n variables. In the sequel, all subscripts, superscripts and other notation defined for Fn will be ◦ ◦ used also for subsets of Fn . For example, Bn = f : f ∈ Bn , Bn = f : f ∈ Bn . ◦
Note that Bn = q n/2 B n .
2. Rectangles Let m, k be nonnegative integers and f ∈ Fm+k . Define a function f : Vm+k → C by f (u, v) =
χ(f (u, y) + v · y),
u ∈ Vm ,
v ∈ Vk ,
(2)
y∈Vk
and call it a rectangle of f . Denote by F m,k the set of all such rectangles. In the case m = k we also call f a square of f . To each function f there correspond different rectangles of the sets F 0,m+k = ◦ Fm+k , F 1,m+k−1 ,. . . , F m+k−1,1 , F m+k,0 = F m+k . These rectangles are interrelated with each other. For example, if f ∈ F m,k and f ∗ ∈ F m+1,k−1 , then
f (u, v, v ) =
◦
f (u, y, y )χ(vy + v · y )
y∈Zq y ∈Vk−1
=
f ∗ (u, y, v )χ(vy),
v ∈ Vk−1 ,
y∈Zq
and conversely, f ∗ (u, v, v ) =
1 f (u, y, v )χ(vy). q y∈Zq
For a fixed u call the mapping v → f (u, v) a column of f . Analogously, for a fixed v call the mapping u → f (u, v) a row of f . By definition, each row of f is an element of Fk . If furthermore each column of f multiplied by q (m−k)/2 is an element of Fm , then call the rectangle f bent.
6
S. Agievich / Bent Rectangles
Our results are based on the following proposition, first stated in [5] for the case q = 2. Note that for m = 0 this proposition can be considered as a definition of regular bent functions. Proposition 1. A function f ∈ Fm+k is regular bent if and only if a rectangle f ∈ F m,k is bent. Proof. Let f ∈ Bn , n = m + k. Define the function g ∈ Fn by the rule g(v, u) = q −n/2 f(−u, v), ◦
u ∈ Vm ,
v ∈ Vk ,
and determine the corresponding rectangle g ∈ F k,m : g(v, u) = q −n/2
f(−x, v)χ(u · x)
x∈Vm
= q −n/2
◦
f (w, y)χ(−x · w + v · y + u · x)
x∈Vm w∈Vm y∈Vk
=q
−n/2
◦
f (w, y)χ(v · y)
y∈Vk w∈Vm
= q m−n/2
χ((w − u) · x)
x∈Vm
◦
f (u, y)χ(v · y)
y∈Vk
= q (m−k)/2 f (u, v). Therefore, each column of f multiplied by q (m−k)/2 is an element of Fm and f is bent. Conversely, if f is bent, then g(v, u) = q (m−k)/2 f (u, v) is well defined rectangle ◦ that corresponds to the function g(v, u), g(v, u) = q −n/2 f(u, v). Hence f(u, v) ∈ ◦
q n/2 Zq for all u, v and f is regular bent. It is convenient to identify f ∈ F m,k with the q m × q k matrix F whose rows and columns are indexed by lexicographically ordered vectors of Vm and Vk respectively and whose elements are the values f (u, v). The definition of F puts restrictions on its rows. The bentness of F puts additional restrictions on columns. We can draw an analogy with latin rectangles and this analogy justify the use of the term “bent rectangle”. If F corresponds to a bent rectangle f ∈ Bm,k and satisfies restrictions on rows and columns, then G = q (m−k)/2 F
T
also satisfies such restrictions and corresponds to
a bent rectangle g ∈ B k,m . Call the transformation f → g a transposition of f . During the proof of Proposition 1 we actually showed that g(v, u) = q −n/2 f(−u, v), ◦
u ∈ Vm ,
v ∈ Vk .
S. Agievich / Bent Rectangles
7
We will often use affine functions l(x) = b · x + c, where x, b ∈ Vn and c ∈ Zq , as primitives for constructing bent rectangles. Denote by An the set of all affine functions in n variables. The function l that corresponds to l has a quite simple form: q n χ(c) if u = b, l(u) = 0 otherwise. This fact immediately gives us the following construction. Example 1 (Maiorana–McFarland’s construction). Consider a bent square f ∈ B n,n such that all its rows and columns belong to An . The matrix F associated with f has the following form: each its row and each column contains exactly one element of the set ◦
q n Zq , all other elements are zero. This implies that there exists a permutation π : Vn → Vn and a function φ ∈ Fn such that ◦ q n φ(u) if v = π(u), f (u, v) = 0 otherwise. Consequently, f (x, y) = π(x) · y + φ(x) and we obtain a bent function belonging to well-known Maiorana–McFarland’s class.
3. Affine Transformations Let GLn (AGLn ) be the general linear (affine) group of transformations of Vn = Znq . We identify GLn with the set of all invertible n × n matrices over Zq and denote by In the identity matrix of GLn . An element σ ∈ AGLn is specified by a pair (A, a), A ∈ GLn , a ∈ Vn , and acts as follows: σ(x) = xA + a. Extend the action of AGLn to functions f with domain Vn in a natural way: σ(f )(x) = f (xA + a). Call functions f, g ∈ Fn affine equivalent if there exist σ = (A, a) ∈ AGLn and l ∈ An , l(x) = b · x + c, such that g(x) = σ(f )(x) + l(x) = f (xA + a) + b · x + c. If f and g are affine equivalent, then χ(f (xA + a) + x · (b − u) + c) g(u) = x∈Vn
=
χ(f (y) + (y − a)A−1 · (b − u) + c)
y∈Vn
=
y∈Vn
χ(f (y) − (y − a) · (u − b)(A−1 )T + c)
(3)
8
S. Agievich / Bent Rectangles
and g(u) = χ(v · a + c)f(v),
v = (u − b)(A−1 )T .
(4)
Therefore, the functions f and g are, in some sense, also affine equivalent: there exist σ ∗ ∈ AGLn and l∗ ∈ An such that ◦
g(u) = σ ∗ (f)(u)l∗ (u). It is useful to find a relation between rectangles f , g ∈ F m,k of affine equivalent functions f and g. For example, g ∈ Bn if and only if f ∈ Bn and a correspondence between f and g can be used to perform the affine classification of regular bent functions. Let n = m + k, where m, k ≥ 1. Divide the vector x ∈ Vn into two parts: x = (x1 , x2 ), x1 ∈ Vm , x2 ∈ Vk , and introduce the following elementary transformations f → g: A1) A2) B1) B2) C1) C2)
g(x) = f (x1 A1 + a1 , x2 ), where A1 ∈ GLm , a1 ∈ Vm ; g(x) = f (x1 , x2 A2 ) + a2 · x2 , where A2 ∈ GLk , a2 ∈ Vk ; g(x) = f (x) + b1 · x1 + c, where b1 ∈ Vm , c ∈ Zq ; g(x) = f (x1 , x2 + b2 ), where b2 ∈ Vk ; g(x) = f (x1 , . . . , xm−1 , xm − xm+1 , xm+1 , xm+2 . . . , xn ); g(x) = f (x1 , . . . , xm−1 , xm , xm+1 − xm , xm+2 , . . . , xn ).
Proposition 2. Every affine transformation f → g of the form (3) can be realized using only elementary transformations A1–C2. Under these transformations, the rectangles f , g ∈ F m,k are related as follows: A1) g(u, v) = f (uA1 + a1 , v), T A2) g(u, v) = f (u, (v − a2 )B2 ), where B2 = (A−1 2 ) ;
B1) g(u, v) = χ(b1 · u + c)f (u, v); B2) g(u, v) = χ(b2 · v)f (u, v); C1) g(u , u, v, v ) = (1/q) x,y∈Zq f (u , x, y, v )χ((u − x)(v − y)); C2) g(u , u, v, v ) = χ(uv)f (u , u, v, v ). Here u ∈ Vm , v ∈ Vk , u ∈ Vm−1 , v ∈ Vk−1 , u, v ∈ Zq . Proof. To prove the first part of the proposition, we will show that GLn is generated by its subgroups
G1 =
M1 0 0 Ik
: M1 ∈ GLm ,
G2 =
Im 0 0 M2
: M2 ∈ GLk
and additional matrices R and S of the following linear transformations:
S. Agievich / Bent Rectangles
9
x → xR = (x1 , . . . , xm−1 , xm − xm+1 , xm+1 , xm+2 , . . . , xn ), x → xS = (x1 , . . . , xm−1 , xm , xm+1 − xm , xm+2 , . . . , xn ). It is known that the group GLn (Zm ) is generated by matrices of the following transformations of a vector x (cf., e.g., [10]): 1) multiplication of the coordinates xi by invertible elements of Zm , 1 ≤ i ≤ n; 2) subtraction of xj from xi , 1 ≤ i, j ≤ n, i = j. The groups G1 and G2 contain matrices that realize all transformations of the first type and transformations of the second type for 1 ≤ i, j ≤ m and m + 1 ≤ i, j ≤ n. We can subtract any different coordinates of x using additional matrices R and S. For example, the subtraction of xj , m + 1 ≤ j ≤ n, from xi , 1 ≤ i ≤ m, can be realized by the following steps: (a) interchange xi and xm using some matrix in G1 , (b) interchange xm+1 and xj using some matrix in G2 , (c) subtract xm+1 from xm using R, (d) interchange xi and xm , xm+1 and xj again. Thus the group generated by G1 , G2 , R, and S contains all matrices of the first and the second types and hence coincides with GLn (Zm ). The second part of the proposition is checked by direct calculations. Consider, for example, the transformation C1. We have g(u , u, v, v ) =
g(u , u, x, y )χ(vx + v · y ) ◦
x∈Zq y ∈Vk−1
=
◦
f (u , u − x, x, y )χ(vx + v · y )
x∈Zq y ∈Vk−1
=
◦
f (u , x, u − x, y )χ(v(u − x) + v · y )
x∈Zq y ∈Vk−1
=
1 q
χ(v(u − x) + v · y )
x∈Zq y ∈Vk−1
×
◦
f (u , x, z, y )χ((u − x − z)y)
y,z∈Zq
=
1 χ((u − x)(v − y)) q x,y∈Zq
×
◦
f (u , x, z, y )χ(yz + v · y )
z∈Zq y ∈Vk−1
=
1 f (u , x, y, v )χ((u − x)(v − y)) q x,y∈Zq
and the required identity holds. Therefore, we can realize any affine transformation of a rectangle F by affine permutations of its rows (A1) and columns (A2) and by multiplying its elements by qth roots
10
S. Agievich / Bent Rectangles
of unity (B1, B2, C2). The remaining transformation C1 is a single method of changing the elements of F in magnitude. Example 2 (cells). For the case q = 2 it is convenient to illustrate the transformations C1, C2 in the following way. Divide F into the cells, that is, the submatrices
f (u , 0, 0, v ) f (u , 0, 1, v )
,
f (u , 1, 0, v ) f (u , 1, 1, v )
u ∈ Vm−1 ,
v ∈ Vk−1 ,
and during the transformations modify all of the cells simultaneously by the rules
C1 :
αβ γδ
1 → 2
α+β+γ−δ α+β−γ+δ , α − β + γ + δ −α + β + γ + δ
C2 :
αβ γδ
→
α β . γ −δ
4. Illustrations In this section we consider the case q = 2 and give examples to illustrate the usage of bent rectangles for the analysis of some known properties of bent functions. Note that in the Boolean case each bent function is regular and Bn = ∅ only for even n. Start with some useful definitions and facts. We identify a Boolean function f ∈ Fn of x = (x1 , . . . , xn ) with its algebraic normal form, that is, a polynomial of the ring F2 [x1 , . . . , xn ] reduced modulo the ideal (x21 − x1 , . . . , x2n − xn ). Denote by deg f the degree of such a polynomial. Following [11], introduce the set Pn,r ⊆ Fn of plateaued functions of order r: f ∈ Pn,r if f(u) ∈ {0, 2n−r/2 } for all u ∈ Vn (more precisely, f has exactly 2r nonzero values ±2n−r/2 ). It is clear that An = Pn,0 , Bn = Pn,n . Finally, recall the following result of [5]. Lemma 1. Let q = 2, f1 , f2 , f3 , f4 ∈ Fn and 1 f1 (u) + f2 (u) + f3 (u) + f4 (u) , g(u) = 2
u ∈ Vn .
The function g ∈ Fn if and only if f1 (x) + f2 (x) + f3 (x) + f4 (x) = 1,
x ∈ Vn .
Under this condition, g(x) = f1 (x)f2 (x) + f1 (x)f3 (x) + f2 (x)f3 (x). Now we give some examples. Example 3 (sums of bent functions). It is well-known (see [1]) that if f1 ∈ Bm and f2 ∈ Bk , then f (x, y) = f1 (x) + f2 (y) is also bent. Indeed, the rectangle f ∈ F m,k has the ◦ form f (u, v) = f (u)f2 (v) and obviously satisfies the restrictions on columns. 1
11
S. Agievich / Bent Rectangles
Example 4 (degrees of bent functions). Let f ∈ B2n , n ≥ 2. In [1], Rothaus proved that deg f ≤ n. We give a new proof of this fact. Suppose to the contrary that deg f = k > n, i.e., the polynomial f (x1 , . . . , x2n ) contains a monomial of degree k. Without loss of generality, assume that f contains the monomial xm+1 xm+2 . . . x2n , m = 2n − k. Then there are an odd number of 1’s among the values g(y) = f (0, y), y ∈ Vk , and g(0) = 2r, where r is odd. This is impossible when k = 2n since in this case g(0) = f(0) ∈ {±2n }. Therefore k < 2n and consequently m > 0. Consider f ∈ B m,k . We have f (0, 0) = g(0) = 2r and 2(m−k)/2 f (0, 0) either an odd integer or a rational number. Since functions of Fm take only even values, the restrictions on columns of f are not satisfied, a contradiction. Example 5 (2-row bent rectangles). Let f ∈ B1,n−1 . By definition, the columns of f belong to the set 2n/2−1 F1 . Since F1 = A1 , each column takes exactly one nonzero n−1,n−2 . This fact was pointed out value ±2n/2 . It means that all rows of f are in P in [11]. In Proposition 5 we will describe how to construct (2n − 2)|Bn−2 |2 bent rectangles of B1,n−1 . For example, such a construction allows to obtain all 896 elements of B 1,3 . Example 6 (4-row bent rectangles). Consider a rectangle f ∈ B2,n−2 . Since every function of F2 is either affine or bent, the possible values of f are exhausted by 0, ±2n/2−1 , ±2n/2 . ◦ If we restrict to the numbers ±2n/2−1 , then each column of f belongs to 2n/2−1 B2 , takes an odd number of negative values, and a product of these values is exactly −22n−4 . This result was proved in [12]. If we restrict ourselves to the numbers 0, ±2n/2 , then we obtain a bent rectangle n−2,n−4 . Proposition 5 will give 8(2n−2 − 1)(2n−3 − 1)(7 · all rows of which are in P 2n−3 − 13)|Bn−4 |4 such rectangles for n ≥ 4. Example 7 (Rothaus’ construction). Let f1 , f2 , f3 , f4 ∈ Bn satisfy f1 (y) + f2 (y) + f3 (y) + f4 (y) = 1 for all y ∈ Vn . In [1], Rothaus showed that the function f (u1 , u2 , y) = f1 (y)f2 (y) + f1 (y)f3 (y) + f2 (y)f3 (y) + u1 (f1 (y) + f2 (y)) + u2 (f1 (y) + f3 (y)) + u1 u2 is bent. We give another proof of this fact using the rectangle f ∈ F 2,n . Lemma 1 implies that f has the following form: ⎧ f1 (v) + f2 (v) + f3 (v) − f4 (v) ⎪ ⎪ ⎪ 1 ⎨f1 (v) − f2 (v) + f3 (v) + f4 (v) f (u1 , u2 , v) = 2⎪ f1 (v) + f2 (v) − f3 (v) + f4 (v) ⎪ ⎪ ⎩ f1 (v) − f2 (v) − f3 (v) − f4 (v)
if u1 if u1 if u1 if u1 ◦
= u2 = 0, = 0, u2 = 1, = 1, u2 = 0, = u2 = 1.
(5)
Choose an arbitrary v and construct the function h ∈ F2 : h(0, 0) = 2−n/2 f1 (v), ◦ ◦ ◦ h(0, 1) = 2−n/2 f2 (v), h(1, 0) = 2−n/2 f3 (v), h(1, 1) = −2−n/2 f4 (v). By (5), the vth
12
S. Agievich / Bent Rectangles
h. Hence f satisfies restrictions on columns and f is column of f coincides with 2n/2−1 bent. Note that the function f (u1 , u2 , y) can take all the values 0, ±2n/2−1 , ±2n/2 and the Rothaus construction yields more subtle 4-row rectangles than we consider in the previous example. Example 8 (Carlet’s transformation). Let f ∈ B2n , E ⊂ V2n be an affine plane of dimension k ≥ n, and φE ∈ F2n be the support of E, that is, φE (x) = 1 if and only if x ∈ E. In [13, p. 94], Carlet obtained conditions on a function g defined by g(x) = f (x) + φE (x) to be bent. Let us prove yet another condition: g ∈ B2n if and only if fE ∈ Pk,2(k−n) , where fE is a restriction of f to E, that is, fE (y) = f (φ−1 (y)) for some affine bijection φ : E → Vk . Without loss of generality, assume that E = {(0, a) : a ∈ Vk }. Consider the rectangles f ∈ B2n−k,k and g ∈ F 2n−k,k . They differ only in the first row: f (0, v) = fE (v),
g(0, v) = −fE (v).
h(u) = 2n−k f (u, v) and h (u) = Let fE (v) = 0 for some v. Consider the normed rows 2n−k g(u, v). The functions h ∈ F2n−k and h differ only in signs of their (nonzero) values at u = 0. Therefore, h ∈ F2n−k if and only if h(0) = ±22n−k . Under this condition, fE (v) = f (0, v) = 2k−n h(0) = ±2n . Consequently, g is bent if and only if fE takes only the values 0, ±2n , that is, fE ∈ Pk,2(k−n) . Example 9 (normal bent functions). Following [14], call a function f ∈ B2n (weakly) normal if its restriction to some n-dimesional plane is affine. In other words, f is normal if there exists an affine equivalent function g such that M (g) = max g(u, v) = 2n , u,v∈Vn
g ∈ Bn,n .
Using the affine classification of bent functions of 6 variables (see [1]), one can check that every f ∈ B6 is normal. We give a direct proof of this fact by applying the results of Section 3. d2 φ that takes Write φ ∼ α1d1 α 2 . . . for a function d1 values α1 , d2 values α2 , and so h ∼ 81 07 or h ∼ 61 27 or h ∼ 44 04 . Since all rows and columns on. If h ∈ F3 , then of f ∈ B3,3 are in F3 , we have M (f ) ∈ {4, 6, 8}. Let M (f ) = 4. Applying the elementary transformations A1, A2 (i.e., permuting rows and columns) and B1, B2 (i.e., changing signs of rows and columns), we can arrange elements of f into one of the following cells:
44 , 40
4 4 , 4 −4
44 . 44
13
S. Agievich / Bent Rectangles
Then apply C1, C2:
4 4 C1 6 2 −−→ , 22 40
4 4 4 −4
C1
−−→
80 , 00
44 44
4 4 80 C1 −−→ −−→ , 4 −4 00 C2
and obtain a rectangle that takes the value ≥ 6. So it is sufficient to treat the case M (f ) = 6 only. In this case we proceed in a similar manner: A1, A2, B1, B2, C2
−−−−−−−−−−−−→
6 2 2 −6
C1
−−→
8 0 , 0 −4
and obtain a rectangle that takes the value 8, which is required. Example 10 (the number of bent functions). If g ∈ Pn,2 , that is, g(ai ) = 2n−1 χ(bi ) for some bi ∈ F2 and distinct ai ∈ Vn , i = 1, 2, 3, 4, then by Lemma 1 (i) a1 + a2 + a3 + a4 = 0, (ii) b1 + b2 + b3 + b4 = 1. In [5], we proposed an algorithm to construct bent squares f ∈ B n,n all rows and n,2 . The algorithm arranges nonzero elements columns of which are elements of An ∪ P in the matrix F subject to the condition (i) and defines signs of elements subject to (ii). Counting different outputs of the algorithm, we obtain constructive lower bounds for |Bn,n |. In particular, the algorithm provides 1559994535674013286400 > 270.4 distinct bent squares of B4,4 and, consequently, |B8 | > 270.4 .
5. Biaffine and Bilinear Bent Squares Consider a mapping π : Vn × Vn → Vn . As previously, for a fixed v call the mapping u → π(u, v) a restriction of π to u, and for a fixed u call the mapping v → π(u, v) a restriction to v. Say that π is biaffine (bilinear) if all its restrictions to u and v are affine (linear) transformations of Vn . A biaffine mapping is nonsingular if all its restrictions are invertible. A bilinear mapping is nonsingular if all its restrictions to u for v = 0 and to v for u = 0 are invertible. Choose an arbitrary function g ∈ Fn and construct a bent square f ∈ B n,n such that the corresponding matrix F consists almost only of the values of g permuted in ◦
some order and multiplied by elements of Zq . Informally speaking, we “scatter” values of g over F . Relation (4) between the Walsh–Hadamard coefficients of affine equivalent functions allows us to make such a scattering using a nonsingular biaffine or bilinear mapping. The obtained constructions are given by the following two easily verified propositions. Proposition 3 (biaffine bent squares). Let π be a nonsingular biaffine mapping Vn × Vn → Vn , g ∈ Fn , φ ∈ F2n , and all restrictions of φ(u, v) to u ∈ Vn and v ∈ Vn are affine functions. Then the square
14
S. Agievich / Bent Rectangles ◦
f (u, v) = φ(u, v) g (π(u, v)) is bent. Proposition 4 (bilinear bent squares). Let π be a nonsingular bilinear mapping Vn × Vn → Vn , g ∈ Fn , φ be defined as in the previous proposition, and h, h ∈ Fn be such that h(0) = h (0),
◦
h(u) = φ(u, 0) g (0),
◦
h (v) = φ(0, v) g (0),
u, v ∈ Vn \ {0}.
Then the square f (u, v) =
h(0)
if u = v = 0,
◦
φ(u, v) g (π(u, v)) otherwise
is bent. Note that any function of the form φ(u1 , . . . , un , v1 , . . . , vn ) =
n
αij ui vj +
i,j=1
n
βi ui +
i=1
n
γi vi + δ,
i=1
αij , βi , γj , δ ∈ Zq . satisfies the condition of the above propositions. Note also that in Proposition 4 we can easily construct h and h if g(0) = 0. Indeed, in this case it is sufficient to choose h = h ≡ c, c ∈ Zq . In Proposition 3 we can use the following nonsingular biaffine mapping π(u, v) = uA + vB + uC1 vT , . . . , uCn vT + d, where d ∈ Vn and A, B, C1 , . . . , Cn are n × n matrices over Zq such that A + (C1 vT , . . . , Cn vT ) and B + (C1T uT , . . . , CnT uT ) are invertible for every v and u. Further, each nonsingular bilinear mapping π has the form π(u, v) = uAv ,
(6)
where Av are n × n matrices over Zq such that (i) A0 = 0 and Av ∈ GLn for all nonzero v ∈ Vn ; (ii) Av+v = Av + Av for all v, v ∈ Vn . Indeed, considering restrictions of π to u, we get (6). Since each such restriction for v = 0 must be invertible, Av ∈ GLn for all nonzero v. For each fixed u the mapping v → uAv must be linear. Therefore, uAv+v = u(Av + Av ) for all v and v , which yields (ii) and the first part of (i). Assume further that q is prime. The structure R = {Av : v ∈ Vn } is related to some concepts of projective geometry. Consider the following subspaces of V2n :
15
S. Agievich / Bent Rectangles
E∞ = {(0, v) : v ∈ Vn },
Ev = {(u, uAv ) : u ∈ Vn },
v ∈ Vn .
(7)
Every such subspace is of dimension n, the intersection of any two different subspaces is zero subspace, and, consequently, the union of the subspaces is V2n . A set of subspaces with these properties is called a spread of V2n . Observe that the condition (ii) is too strong for the set (7) to be a partial spread. We need only that A − A ∈ GLn for all distinct A, A ∈ R (with the additional property In ∈ R such a set R is called a quasifield). Spreads are used in the following well-known construction of bent functions. Example 11 (Dillon’s construction). Consider a spread (7) determined by a set R = {Av : v ∈ Vn }. Choose c ∈ Fq and an arbitrary function g ∈ Fn such that g(0) = c. In [2], Dillon actually proved that the function f ∈ F2n , c if x ∈ E∞ , f (x) = g(v) if x ∈ Ev , is regular bent. The corresponding bent square f ∈ B n,n has the form f (u, v) =
q n χ(c)
if u = v = 0, y∈Vn g(y)χ(uAy · v) otherwise. ◦
We see that the Dillon’s bent squares are similar to the bilinear ones. In particular, if elements of R satisfy the conditions (i) and (ii), then the Dillon’s construction is covered by Proposition 3 under the choice h = h ≡ c, φ ≡ 0, π(u, v) = vBuT , where the matrices Bu are such that uAy = yBu for all u, y ∈ Vn . Remark that the Maiorana–McFarland’s bent squares can be represented in the form of Proposition 4 with the only change that g is necessarily affine. The simple form of g in this case allows to relax the conditions of the proposition: we can use an arbitrary φ and choose π(u, v) such that all its restrictions to u and v are bijections (not necessarily affine).
6. Partitioning Vn into Affine Planes Let q be prime and L be a linear subspace of Vn = Fnq of dimension r. Write the latter as L < Vn , dim L = r. Recall that the number of distinct r-dimensional subspaces of Vn is given by the Gaussian coefficient
(q n − 1)(q n−1 − 1) . . . (q n−r+1 − 1) n , = r q (q r − 1)(q r−1 − 1) . . . (q − 1)
0 ≤ r ≤ n.
Let E = L + b be an affine plane obtained by a shift of L by a vector b ∈ Vn . The plane E is the image of the affine mapping π : Vr → Vn , w → wA + b, under a suitable choice of the r × n matrix A over Fq of rank r.
16
S. Agievich / Bent Rectangles
Given g ∈ Fr , construct the function h ∈ Fn , h(x) = g xAT + b · x,
x ∈ Vn .
(8)
Call the transformation g → h a stretching of g to the plane E. Under the stretching h(v) =
◦
g(xAT )χ((b − v) · x)
x∈Vn
= q −r
x∈Vn w∈Vr
= q −r
w∈Vr
g(w)
g(w)χ(xAT · w + (b − v) · x)
χ((π(w) − v) · x)
x∈Vn
and, consequently, q n−r g(π −1 (v)) if v ∈ E, h(v) = 0 otherwise.
(9)
Consider bent rectangles f ∈ Bm,n , m = n−r that have all rows of the form (9) and all columns in the set q r/2 Am . Such bent rectangles were first introduced by Carlet [15] for the case q = 2. Note that after the transposition of f we obtain the rectangle f ∗ ∈ B n,m that corresponds to the so called (see [16]) partial affine bent function f ∗ ∈ Bn+m : each restriction of f ∗ (x, y) to x ∈ Vn is affine. Proposition 5 (partitions into affine planes). Let m, r be nonnegative integers, n = m + r, u ∈ Vm , v ∈ Vn , and q m gu (πu−1 (v)) if v ∈ Eu , f (u, v) = 0 otherwise, where gu ∈ Br and πu are mappings Vr → Vn such that Eu = πu (Vr ) are affine planes of dimension r. If the planes {Eu } are nonintersecting and therefore determine a partition of Vn , then f ∈ B m,n . Example 12. Let q = 2. Choose the following partition of V4 into the planes of dimension 2: E(0,0) = {(0, 0, 0, 0), (0, 0, 0, 1), (0, 0, 1, 0), (0, 0, 1, 1)}, E(0,1) = {(0, 1, 0, 0), (0, 1, 0, 1), (1, 1, 0, 0), (1, 1, 0, 1)}, E(1,0) = {(0, 1, 1, 0), (0, 1, 1, 1), (1, 0, 0, 0), (1, 0, 0, 1)}, E(1,1) = {(1, 0, 1, 0), (1, 0, 1, 1), (1, 1, 1, 0), (1, 1, 1, 1)}. Using this partition, we construct the rectangle f ∈ B 2,4 with the matrix
S. Agievich / Bent Rectangles
17
⎛
⎞ ±8 ±8 ±8 ±8 0 0 0 0 0 0 0 0 0 0 0 0 ⎜ 0 0 0 0 ±8 ±8 0 0 0 0 0 0 ±8 ±8 0 0 ⎟ ⎟ F =⎜ ⎝ 0 0 0 0 0 0 ±8 ±8 ±8 ±8 0 0 0 0 0 0 ⎠ 0 0 0 0 0 0 0 0 0 0 ±8 ±8 0 0 ±8 ±8 where signs of the elements are determined by unspecified bent functions gu ∈ B2 . It is convenient to assume that every one-element subset of a vector space is an affine plane of dimension 0 and that B0 = F0 . Then under r = 0 the above proposition gives us all Maiorana–McFarland’s bent squares. In general, Proposition 5 allows to construct (q m )!cq (n, m)|Bn−m |q
m
distinct regular bent functions of n+m variables. Here cq (n, m) is the number of distinct unordered partitions of Vn = Fnq into q m affine planes of dimension n − m. To obtain bounds on cq (n, m), consider some partition {E1 , E2 , . . . , Eqm } counted by cq (n, m). Let Ei = Li + bi , where Li < Vn , bi ∈ Vn , and W = L1 ∩ L2 ∩ . . . ∩ Lqm . Call the partition {Ei } primitive if W = {0}. Denote by c∗q (n, m) the number of distinct unordered primitive partitions of Vn into planes of dimension n − m. Suppose that {Ei } is not primitive, that is, d = dim W ≥ 1. Then Vn can be represented as the direct sum U ⊕ W , U < Vn , dim U = n − d, and each plane Ei takes the form {u + w : u ∈ Ei , w ∈ W }, where Ei = Ei ∩ U is an affine plane of U of dimension n − m − d. The planes E1 , E2 , . . . , Eq m determine a primitive partition of U . There are c∗q (n − d, m) ways to choose such a partition, nd q ways to choose W and, consequently, cq (n, m) =
n−m
d=0
n c∗q (n − d, m). d q
(10)
Denote by Li + Lj the subspace of Vn consisting of the sums v + v , where v runs over Li and v runs over Lj . For each distinct i, j ∈ {1, 2, . . . , q m } we have dim(Li ∩ Lj ) = dim Li + dim Lj − dim(Li + Lj ) ≥ (n − m) + (n − m) − n = n − 2m. If dim(Li ∩ Lj ) = n − 2m, then Li + Lj = Vn and bj − bi = v + v for some v ∈ Li , v ∈ Lj . It means that |Ei ∩ Ej | = |Li ∩ (Lj + v + v )| = |(Li − v) ∩ (Lj + v )| = |Li ∩ Lj | = 0, a contradiction. Hence dim(Li ∩ Lj ) ≥ n − 2m + 1.
(11)
18
S. Agievich / Bent Rectangles
Under m = 1 this inequality yields that L1 = . . . = Lq = W , where dim W = n − 1. Therefore, c∗q (1, 1) = 1, c∗1 (n, 1) = 0 for n ≥ 2, and
cq (n, 1) =
n n−1
q
c∗q (1, 1)
qn − 1 . = q−1
For the case q = 2 we also obtain the estimate
n n 1 + 98 = (2n − 1)(2n−1 − 1)(7 · 2n−1 − 13) c2 (n, 2) = n−2 2 n−3 2 3 (cf. Example 6) using the following result. Lemma 2. c∗2 (2, 2) = 1, c∗2 (3, 2) = 98, and c∗2 (n, 2) = 0 for n ≥ 4. Proof. The first equality is trivial. Further, if q = 2 then each partition of V3 into two8! element subsets is also the partition into affine planes. There are 4!2 4 = 105 such distinct (unordered) partitions and
3 ∗ c∗2 (2, 2) = 98 c2 (3, 2) = 105 − 1 2 of them are primitive. We prove the third equality by a contradiction. Suppose that n ≥ 4 and {Ei = Li +bi : i = 1, 2, 3, 4} is a primitive partition of Vn into planes of dimension n−2. Let us analyze the properties of such hypothetical partition which help to reveal a contradiction. A. Let U = L1 + L2 + L3 + L4 . Prove that U = Vn . Note that dim U ≥ dim L1 = n − 2. If dim U = n − 2, then L1 = L2 = L3 = L4 and the partition {Ei } is not primitive for n ≥ 3. Suppose that dim U = n − 1 and let, without loss of generality, U = {(x, 0) : x ∈ Vn−1 }. Denote Ui = Ei ∩ U . Since {Ei } is a partition, Ei = Ui + (0, . . . , 0, bi ) for some bi ∈ F2 , where there are two 0’s and two 1’s among {bi }. Assume for simplicity that b1 = b2 and therefore b3 = b4 . Then U1 ∪ U2 = Vn−1 and U3 ∪ U4 = Vn−1 . As we show later, this yields L1 = L2 and L3 = L4 . Now using (11) we obtain dim(L1 ∩ L2 ∩ L3 ∩ L4 ) = dim(L1 ∩ L3 ) ≥ n − 3 and the partition {Ei } is not primitive for n ≥ 4. B. Prove that dij = dim(Li ∩ Lj ) = n − 3 for all 1 ≤ i < j ≤ 4. By (11), dij ∈ {n − 3, n − 2}. Suppose that dij = n − 2 for some i and j, say for i = 3 and j = 4. Then L3 = L4 , dim(L1 ∩ L2 ∩ L3 ∩ L4 ) = dim(L1 ∩ L2 ∩ L3 ) = dim(L1 + L2 + L3 ) −
dim Li +
≥ n − 3(n − 2) + 3(n − 3) = n − 3, and the partition {Ei } is not primitive for n ≥ 4.
dij
19
S. Agievich / Bent Rectangles
C. Prove that dijk = dim(Li ∩ Lj ∩ Lk ) ∈ {n − 4, n − 3} for all 1 ≤ i < j < k ≤ 4 and moreover dijk = n − 3 for n > 4. Indeed, dijk ≤ dij = n − 3 and dijk = dim Li + dim(Lj ∩ Lk ) − dim(Li + (Lj ∩ Lk )) ≥ (n − 2) + (n − 3) − dim(Li + Lj ) = n − 4. If some coefficient dijk is equal to n − 3, say d123 = n − 3, then dim((L1 ∩ L2 ∩ L3 ) + L4 ) = d123 + dim L4 − dim(L1 ∩ L2 ∩ L3 ∩ L4 ) = (n − 3) + (n − 2) + 0 = 2n − 5. On the other hand, dim((L1 ∩ L2 ∩ L3 ) + L4 ) ≤ dim(L1 + L4 ) = n − 1 and we obtain the inequality 2n − 5 ≤ n − 1, which does not hold for n > 4. Putting A, B, and C together, we get dim(L1 ∩ L2 ∩ L3 ∩ L4 ) =
dim Li −
dij +
= 4(n − 2) − 6(n − 3) +
dijk − dim
Li
dijk − n
≥ 4(n − 2) − 6(n − 3) + 4(n − 4) − n = n − 6. Consequently, the partition {Ei } is primitive only if n ≤ 6 and dijk = 3n − 10. We need to check these conditions. If n = 4, then two coefficients dijk are equal to n − 3 = 1, say d123 = d124 = 1. Then dim(L1 ∩ L2 ∩ L3 ∩ L4 ) = 1, a contradiction. If n = 5, then there exists dijk = n − 3 = 2, a contradiction to the second part of C. Finally, if n = 6, then dim(L1 ∩ L3 ) = dim L1 + dim L3 − dim(L1 + L3 ) ≤ 8 − dim((L1 ∩ L2 ) + (L3 ∩ L4 )) = 8 − (dim(L1 ∩ L2 ) + dim(L3 ∩ L4 ) − dim(L1 ∩ L2 ∩ L3 ∩ L4 )) = 8 − (3 + 3 − 0) = 2 that contradicts B. The above lemma allows to find all partitions of Vr+2 into planes of dimension r. This will be done in the proof of the next result. Proposition 6. Let q = 2, r ≥ 2, f ∈ B2,r+2 be constructed by Proposition 5 and f (u, x), u ∈ V2 , x ∈ Vr+2 , be a corresponding bent function. Then f can be transformed into one of the following functions:
20
S. Agievich / Bent Rectangles
g(u, x) = u1 u2 (g1 (x3 , y) + g2 (x3 , y) + g3 (x3 , y) + g4 (x3 , y)) + u1 (g1 (x3 , y) + g2 (x3 , y) + x2 ) + u2 (g1 (x3 , y) + g3 (x3 , y) + x1 ) + g1 (x3 , y),
(12)
g(u, x) = u1 u2 (g1 (x3 , y) + g2 (x3 , y) + g3 (x2 , y) + g4 (x2 , y) + x2 + x3 ) + u1 (g1 (x3 , y) + g2 (x3 , y) + x2 ) + u2 (g1 (x3 , y) + g3 (x2 , y) + x1 ) + g1 (x3 , y),
(13)
g(u, x) = u1 u2 (g1 (x3 , y) + g2 (x1 , y) + g3 (x1 + x2 + x3 , y) + g4 (x2 , y) + x1 ) + u1 (g1 (x3 , y) + g2 (x1 , y) + x2 ) + u2 (g1 (x3 , y) + g3 (x1 + x2 + x3 , y) + x2 + x3 ) + g1 (x3 , y),
(14)
where x = (x1 , x2 , x3 , y), y ∈ Vr−1 , gi ∈ Br , by affine permutations acting only on the variables u or x. Proof. Consider partitions of V3 into planes of dimension 1. Denote such a plane {b, b+ e} by [b, e]. Let ei be the vector of V3 having only the ith coordinate nonzero. It is easy to check that every partition of V3 can be transformed into one of the following {[0, e3 ], [e2 , e3 ], [e1 , e3 ], [e1 + e2 , e3 ]}, {[0, e3 ], [e2 , e3 ], [e1 , e2 ], [e1 + e3 , e2 ]}, {[0, e3 ], [e2 , e1 ], [e2 + e3 , e1 + e2 + e3 ], [e1 + e3 , e2 ]} by an affine permutation of coordinates. Choose some of these partitions, replace each its plane [b, e] by [b, e] ⊕ Vr−1 = {(b, 0) + α(e, y) : α ∈ F2 , y ∈ Vr−1 } and obtain the partition of Vr+2 into the planes of dimension r. Call such a partition canonical (for example, a canonical partition was used in Example 12). Lemma 2 implies that each partition of Vr+2 can be transformed into some canonical one by an affine permutation of coordinates. Define a canonical ordering on planes of a partition such that if a plane P precedes a plane Q, then min P lexicographically precedes min Q, where minima are taken w.r.t. the lexicographical order (cf. Example 12). Let a bent rectangle f be constructed by Proposition 5 using a partition {Eu }. By an affine permutation of columns of f , the partition {Eu } can be transformed into some canonical one and by an affine permutation of rows, the canonical ordering of planes can be achieved. Thus, it is sufficient to consider bent rectangles g built by the canonical partitions {Eu } under the canonical ordering and determine the corresponding bent
S. Agievich / Bent Rectangles
21
functions g(u, x). To do this, we can use the stretching equations (8), (9) to calculate the restrictions of g to x and then utilize the representation g(u1 , u2 , x) =
(u1 + α1 + 1)(u2 + α2 + 1)g(α1 , α2 , x).
α1 ,α2 ∈F2
For example, if g is built by the third canonical partition, then its restrictions to x look as follows: g(0, 0, x) = g1 (x3 , y), g(0, 1, x) = g2 (x1 , y) + x2 , g(1, 0, x) = g3 (x1 + x2 + x3 , y) + x2 + x3 , g(1, 1, x) = g4 (x2 , y) + x1 + x3 and we obtain (14). It is interesting that if f ∈ B2,r+2 is constructed by Proposition 5 and f1 (x), f2 (x), f3 (x), f4 (x) are the restrictions of f (u, x) to x, then all the functions fi + fj , 1 ≤ i < j ≤ 4, are balanced, that is, they take the values 0 and 1 equally often. Indeed, if g(u, x) has one of the forms (12)–(14), then each sum of two its distinct restrictions to x is balanced. This easily follows from the form of g, the fact that h(x) = h∗ (x1 , . . . , xk−1 , xk+1 , . . . , xr+2 ) + xk , and all derived functions σ(h)(x), σ ∈ AGLr+2 , are balanced. By Proposition 6, f can be obtained from g by separate affine permutations of u and x. But a permutation of u only rearranges the restrictions, and a permutation of x does not change the balance of their sums.
7. Conclusion The author plans to continue this paper and discuss the duality between bent functions, the properties of bent rectangles with a small number of rows, and the affine classification of cubic Boolean bent functions.
References [1] O.S. Rothaus, On “bent” functions, J. Comb. Theory A 20 (1976), 300–305. [2] J. Dillon, A survey of bent functions, NSA Technical Journal, Special Issue (1972), 191–215. [3] C. Carlet, Recent results on binary bent functions, J. of Combinatorics, Information and System Sciences 24 (1999), 275–291. [4] H. Dobbertin and G. Leander, A survey of some recent results on bent functions, Sequences and Their Applications: Third International Conference (SETA’2004, Seoul, Korea, October 24–28, 2004), Lecture Notes in Computer Science 3486 (2005), Springer, 1–29. [5] S. Agievich, On the representation of bent functions by bent rectangles, Probabilistic Methods in Discrete Mathematics: Fifth International Conference (Petrozavodsk, Russia, June 1–6, 2000), Utrecht, Boston: VSP, 2002, 121–135. [6] C.A. Adams and S.E. Tavares, Generating and counting binary bent sequences, IEEE Trans. on Inform. Theory IT-36 (1990), 1170–1173.
22
S. Agievich / Bent Rectangles
[7] A. Canteaut and P. Charpin, Decomposing bent functions, IEEE Trans. on Inform. Theory IT-49 (2003), 2004–2019. [8] H. Dobbertin and G. Leander, Cryptographer’s Toolkit for Construction of 8-Bit Bent Functions, Cryptology ePrint Archive, Report 2005/089, http://eprint.iacr.org/. [9] P.V. Kumar, R.A. Scholtz, and L. R. Welch, Generalized bent functions and their properties, J. of Comb. Theory A 40 (1985), 90–107. [10] B.L. van der Waerden, Algebra II, Springer-Verlag, Berlin, Heidelberg, New York, 1967. [11] Y. Zheng and X.M. Zhang, Plateaued functions, Information and Communication Security: Second International Conference (ICICS’99, Sydney, Australia, November 9–11, 1999), Lecture Notes in Computer Science 1726, Springer, 284–300. [12] B. Preneel, W. Van Leekwijck, L. Van Linden, R. Goevarts, and J. Vanderwalle, Propagation characteristics of Boolean functions, Proc. of EUROCRYPT’90 (Aarhus, Denmark, May 21–24, 1990), Lecture Notes in Computer Science 437 (1991), Springer, 161–173. [13] C. Carlet, Two new classes of bent functions, Proc. of EUROCRYPT’93 (Lofthus, Norway, May 23–27, 1993), Lecture Notes in Computer Science 765 (1994), Springer, 77–101. [14] H. Dobbertin, Construction of bent functions and balanced Boolean functions with high nonlinearity, Fast Software Encryption: Second International Workshop (Leuven, Belgium, December 14–16, 1994), Lecture Notes in Computer Science 1008 (1995), Springer, 61–74. [15] C. Carlet, On the confusion and diffusion properties of Maiorana–McFarland’s and extended Maiorana– McFarland’s functions, Special Issue “Complexity Issues in Coding and Cryptography”, dedicated to Prof. H. Niederreiter on the occasion of his 60th birthday, J. of Complexity 20 (2004), p. 182–204. [16] O.A. Logachev, A.A. Salnikov, and V.V. Yashchenko, Bent functions and partitions of a Boolean cube, Formal Power Series and Algebraic Combinatorics: 12th International Conference (FPSAC’00, Moscow, Russia, June 26–30, 2000), 2000, 43–48 (In Russian).
Boolean Functions in Cryptology and Information Security B. Preneel and O.A. Logachev (Eds.) IOS Press, 2008 © 2008 IOS Press. All rights reserved. doi:10.3233/978-1-58603-878-6-23
23
On Algebraic Algorithms Deciding Properties of Discrete Functions1 Valeriy ALEKSEEV Lomonosov University, Moscow, Russia Abstract. In this paper we introduce the notion of logical semiring and give examples of using such semirings in designing fast algorithms for discrete problems. Keywords. Algorithm, complexity, Boolean function, discrete function
Algorithms for combinatorial problems usually exploit only combinatorial methods and sometimes it is a hard problem to enhance the efficiency of such algorithms in this setting. Conversion of a combinatorial problem into an algebraic problem can open a possibility to use powerful algebraic transformations and can help in searching for algorithms with less complexity. This paper explores some conversions of such kind and gives some examples of using such transformations. We consider here the problem of deciding properties of Boolean and other discrete (k-valued) functions. It is well known that the complexity of this problem depends essentially on the representation of its instances. Consider the following example. Let S and S1 be any finite posets and let R(y1 , y2 ) and R1 (y1 , y2 ) be the partial order relations over S and S1 , respectively. Define the relation Rn over Cartesian degree α = (α1 , . . . , αn ) | ∀ i αi ∈ S} as follows S n = { R
n
α , β ≡ ∀ j R(αj , βj ).
(1)
, β ∈ S n the following Then a mapping f : S n → S1 is said to be monotone iff for any α implication holds R
n
α , β =⇒ R1 f ( α), f β .
(2)
Consider the problem of checking if a given Boolean function f is monotone. The complexity of this problem depends essentially on the representation chosen. If functions are specified by formulas then this problem is NP-complete. If they are represented only by polynomials then there exists an algorithm for this problem with polynomial complexity. In what follows we consider the representation of Boolean and other discrete functions by strings of their values according to some fixed order of all tuples of values of variables. As the model of computation, one can use RAM machines [1], but for simplisity we consider nonuniform case. Namely, we consider deciding properties of functions by 1 This
work was partially supported by the Russian Foundation for Basic Research (grants no. 06-01-00438, 07-01-00154).
24
V. Alekseev / On Algebraic Algorithms Deciding Properties of Discrete Functions
families of Boolean circuits. Each circuit solves this problem for all functions with a fixed number of variables. Input of such a circuit is a string of values of a function (binary codes of this values in the case k-valued functions) and output is equal to 1 (“yes”) or to 0 (“no”). Complexity measure is defined to be the size of this Boolean circuit. Let a function f : S n → S1 be specified by the string of all its values and we are to check if f is monotone. One can simply check implication (2) for all pairs α ∈ S n , β ∈ S n and then take the conjunction of all the results. If we denote |S|n = N (this is of the same order as the length of input), then the number of such verifications is N 2 . Using the transitivity we can only check those pairs α ∈ S n , β ∈ S n that differ only in one position reducing the number of verifications to O(N n) = O(N log N ). Using a more sophisticated √technique Voronenko [2] designed an algorithm for this problem with complexity O(N log N log log N ). But if we generalize this problem a little then the situation is not that simple. Let now R(y1 , y2 ) and R1 (y 1 , y2 ) be arbitrary relations over sets S and S1 , re, β over S n by (1). By U (R, R1 ) we denote the set of spectively. Define the Rn α all functions f : S n → S1 satisfying (2). Consider again the problem: given f , decide whether f ∈ U (R, R1 ). For simplicity, let S = {0, 1, . . . , k − 1}, S n be ordered lexicographically, and f be specified by the string of all its values according to this order. Let N = k n . For this problem, also there is an algorithm with complexity O(N 2 ), but it is not that simple to reduce this complexity in general. The next theorem shows how to find a faster algorithm using a simple reduction of this decision problem to evaluating algebraic expression. Theorem 1. For fixed relations R over S and R1 over S1 there is an algorithm with bit complexity O(N log N ) that decides whether f ∈ U (R, R1 ). Proof. Statement f ∈ / U (R, R1 ) can be represented by the following logical formula ∃α = (α1 , . . . , αn ) ∃ β = (β1 , . . . , βn )
α), f β . ∀ j R(αj , βj ) & ¬R1 f (
This formula can be transformed into the form ∃ p(∈ S1 ) ∃ q(∈ S1 ) ∃ α ∃ β ∀ j R(αj , βj ) & (f ( α) = p) & f β = q & ¬R1 (p, q) . Since quantifiers are over finite sets, one can replace them by disjunctions and conjunctions: R(α1 , β1 )R(α2 , β2 ) · · · R(αn , βn )(f ( α) = p) f β = q . (p,q):¬R1 (p,q) α
β
Since the first disjunction is over a finite set and complexity of computing logical values of all “f ( α) = p” and “f β = q” is O(N ) for fixed p, q, one needs only to prove that expression
V. Alekseev / On Algebraic Algorithms Deciding Properties of Discrete Functions
α
R(α1 , β1 ) · · · R(αn , βn )xα yβ
25
(3)
β
for a given setting of variables xα , yβ can be evaluated with bit complexity O(N log N ). But now we can use algebraic transformations. Denote (α 0 and (β1 , . . . , βn−1 ) by β0 , so that α = ( α0 , αn ), 1 , . . . , αn−1 ) by α β = β0 , βn . Then (3) can be written as:
R(α1 , β1 ) · · · R(αn−1 , βn−1 )
α 0 β 0
=
αn β n
R(α1 , β1 ) · · · R(αn−1 , βn−1 )
α 0 β 0
=
R(αn , βn )xα 0 ,αn yβ0 ,βn αn
xα 0 ,αn
βn :R(αn ,βn )
R(α1 , β1 ) · · · R(αn−1 , βn−1 )xα 0 ,αn
αn α 0 β 0
yβ0 ,βn
βn :R(αn ,βn )
⎛ ⎝ = R(α1 , β1 ) · · · R(αn−1 , βn−1 )xα 0 ,αn z αn
yβ0 ,βn
β0 ,αn
α 0 β 0
⎞ ⎠
where zβ0 ,αn = βn :R(αn ,βn ) yβ0 ,βn . The expression in parentheses for a fixed αn is again of the form (3). Thus we have reduced our problem for n to k similar problems for n − 1. Let L(N ) = L1 (n) be the minimum bit complexity of computing (3). Because calculation of all zβ0 ,αn and taking the disjunction over αn take at most O(k n ) operations, we have L1 (n) ≤ kL1 (n − 1) + O(k n ). Substituting N for n, one can rewrite this as
L(N ) ≤ kL
N k
+ O(N ).
It is well known [1] and easy to show that the last inequality implies L(N ) = O(N log N ). In the proof of Theorem 1 we used Boolean algebra over {0, 1} with operations of disjunction and conjunction. Now we turn to ideas that provide for opportunity to use more powerful algebras. Definition 1. A set A with two operations + and · is said to be a commutative semiring iff the following holds for all its elements: 1) a + b = b + a, ab = ba; 2) (a + b) + c = a + (b + c), (ab)c = a(bc); 3) (a + b)c = (ac) + (bc).
26
V. Alekseev / On Algebraic Algorithms Deciding Properties of Discrete Functions
Example 1. The set {0, 1} with operations of disjunction and conjunction is a commutative semiring. This semiring is denoted by S2 . Definition 2. A commutative semiring A is said to be logical iff there is a homomorphism of A onto S2 . If A0 and A1 are preimages of 0 and 1 w.r.t. such a homomorphism then we denote this logical semiring by (A0 , A1 ). Note: if (A0 , A1 ) is a logical semiring then A0 can be considered as generalized false and A1 can be considered as generalized truth. In this setting operations of addition and multiplication in A0 ∪ A1 can be considered as disjunction and conjunction. Example 2. Let N be the set of all natural numbers. Then (0, N) with usual operations of addition and multiplication is a logical semiring because it is easy to see that for a, b ∈ N ∪ {0} we have a + b ∈ N iff a ∈ N or b ∈ N and a · b ∈ N iff both a ∈ N and b ∈ N. Example 3. Let Z0 ( ), Z+ ( ) be the set of all polynomials in with integer coefficients and free terms equal to 0 (respectively, from N). Then (Z0 ( ), Z+ ( )) with usual operations of addition and multiplication is a logical semiring. Example 4. Let A0 ∪ A1 be any linearly ordered set and a < b for all a ∈ A0 , b ∈ A1 . Then (A0 , A1 ) with operations max and min is a logical semiring. The main idea of using logical semirings is as follows. Let we have to evaluate some expression T over S2 . We can instead consider some logical semiring (A0 , A1 ) and replace all 0 by any element from A0 all 1 by any element from A1 and evaluate the resulting expression T over (A0 , A1 ). If the result is in A0 then T = 0, otherwise T = 1. Moreover, we can make computations not only over (A0 , A1 ), but over any semiring A ⊇ A0 ∪ A1 and use a more suitable algebraic structure of A (for example we can use Z instead of (0, N)). Let now S = {0, 1}, S1 be arbitrary finite set and consider all f : S n → S1 . Let α = R(y1 , . . . , ym ) be any relation over S. Then define the relation Rn over S n = { (α1 , . . . , αn ) | ∀ i αi ∈ S} as follows R
n
α , β, . . . , δ ≡ ∀ j R(αj , βj , . . . , δj ).
If R1 (y1 , . . . , ym ) is any relation over S1 then define the set U (R, R1 ) to be the set of all functions f : S n → S1 satisfying the implication Rn ( α1 , . . . , α m ) =⇒ R1 (f ( α1 ), . . . , f ( αm ))
(4)
for any α 1 , . . . , α m in S n . (Note: the sets of type U (R, R1 ) are used extensively in Boolean and multiple-valued logics.) Consider now the set U (R, R1 ) where R1 (y1 , y2 , y3 , y4 ) is arbitrary relation over S1 and R(y1 , y2 , y3 , y4 ) is the next relation over S: R(y1 , y2 , y3 , y4 ) ≡ (y1 + y2 + y3 + y4 = 0
(mod 2)).
V. Alekseev / On Algebraic Algorithms Deciding Properties of Discrete Functions
27
(Note: if S1 = S and R1 = R, then U (R, R1 ) is the set of all linear Boolean functions.) Algorithm for deciding whether f ∈ U (R, R1 ) based on implication (4) has complexity of order at least N 4 , where N = 2n and n is the number of variables. Theorem 2. Let f (x1 , . . . , xn ) be specified by string of all its values. Then there exists an algorithm with bit complexity O(N log3 N ) for deciding whether f ∈ U (R, R1 ). Proof. According to (4), the property f ∈ / U (R, R1 ) can be represented in the following form: ∃α ∃ β ∃ γ ∃ δ
R (α, β, γ, δ) & ¬R1 n
f ( α), f β , f ( γ ), f δ
In the same way as in Theorem 1, we can reduce this problem to evaluating over S2 the following expression:
T =
α
β
γ
R(α1 , β1 , γ1 , δ1 ) & · · · & R(αn , βn , γn , δn )xα yβ zγ vδ .
δ
But now we replace T , which is defined over S2 , by the following expression T over the logical semiring (0, N):
T =
α
β
γ
t(α1 , β1 , γ1 , δ1 ) · · · t(αn , βn , γn , δn )xα yβ zγ vδ
δ
where t(α, β, γ, δ) = 0 if R(α, β, γ, δ) is false and t(α, β, γ, δ) = 2 if R(α, β, γ, δ) is true. Now one only needs to evaluate T because T > 0 if and only if T = 1. It is easy to see that 1 1 1 1
t(α, β, γ, δ)xα yβ zγ vδ
α=0 β=0 γ=0 δ=0
= (x0 + x1 )(y0 + y1 )(z0 + z1 )(v0 + v1 ) + (x0 − x1 )(y0 − y1 )(z0 − z1 )(v0 − v1 ). Thus if we denote (α1 , . . . , αn−1 ) by α 0 , (β1 , . . . , βn−1 ) by β0 , (γ1 , . . . , γn−1 ) by γ 0 , and (δ1 , . . . , δn−1 ) by δ0 , then we can transform T over Z as follows:
28
V. Alekseev / On Algebraic Algorithms Deciding Properties of Discrete Functions
T =
α 0
×
0 β
γ 0
t(α1 , β1 , γ1 , δ1 ) · · · t(αn−1 , βn−1 , γn−1 , δn−1 )
0 δ
1 1 1 1
t(αn , βn , γn , δn )xα 0 ,αn yβ0 ,βn zγ0 ,γn vδ0 ,δn
αn =0 βn =0 γn =0 δn =0
=
α 0
0 β
γ 0
0 δ
t(α1 , β1 , γ1 , δ1 ) · · · t(αn−1 , βn−1 , γn−1 , δn−1 )
× (xα 0 ,0 + xα 0 ,1 ) yβ0 ,0 + yβ0 ,1 (zγ0 ,0 + zγ0 ,1 ) vδ0 ,0 + vδ0 ,1 ! + (xα 0 ,0 − xα 0 ,1 ) yβ0 ,0 − yβ0 ,1 (zγ0 ,0 − zγ0 ,1 ) vδ0 ,0 − vδ0 ,1 . − + + + − − − Let xα 0 ,0 + xα 0 ,1 = x+ 0 ,0 − xα 0 ,1 = xα α 0 , xα 0 and yβ 0 , zγ 0 , vδ 0 , yβ 0 , zγ 0 , vδ 0 be defined similarly. Then
T =
α 0
+
0 β
γ 0
0 δ
α 0
0 β
γ 0
0 δ
+ + + t(α1 , β1 , γ1 , δ1 ) · · · t(αn−1 , βn−1 , γn−1 , δn−1 )x+ α 0 y zγ 0 v β0
δ0
− − − t(α1 , β1 , γ1 , δ1 ) · · · t(αn−1 , βn−1 , γn−1 , δn−1 )x− α 0 y zγ 0 v . β0
δ0
Let L(N ) = L1 (n) be the minimum number of arithmetic operations over Z required for evaluating T . Then we have L1 (n) ≤ 2L1 (n − 1) + O(2n ) + + + − − − − n because computing of all x+ α 0 , yβ 0 , zγ 0 , vδ 0 , xα 0 , yβ 0 , zγ 0 , vδ 0 takes at most O(2 ) operations. Using N = 2n , one can rewrite this as
L(N ) ≤ 2L
N 2
+ O(N ).
It is well known [1] that the last inequality implies L(N ) = O(N log N ). Our algorithm for evaluating T is described as recursive. We have n = log2 N cycles of recursion and the length of all integers can increase at most by a constant in each step. Thus the length of all integers in this algorithm is O(log N ) and the number of bit operations is O(N log N ) · O(log2 N ) = O(N log3 N ). In the proof of the above theorem we used the logical semiring (0, N) and calculations were in its extension, namely, the set of integers. In the next example we use the same logical semiring (0, N), but calculations are over the complex numbers. Consider the set P2∗ of all partial Boolean functions (“partial” means that function can take values 0, 1 or ∗ (undefined)). A set A of partial Boolean functions is said to be complete iff any function in P2∗ can be represented by a formula over A. Consider the problem of checking completeness of a given set A of partial Boolean functions. It is well known that the same problem for the set P2 of all total Boolean functions reduces
V. Alekseev / On Algebraic Algorithms Deciding Properties of Discrete Functions
29
to checking if a given function belongs to one of 5 special classes (Post theorem). If functions are specified by strings of their values then for 4 of these classes this can be done with complexity O(N ). The last is the class of all monotone Boolean functions and by the result of Voronenko [2] one can check if a Boolean function is monotone with √ complexity O(N log N log log N ). From this result it follows √ that we can check if the set of Boolean functions is complete with complexity O(N log N log log N ). Consider now the problem of checking completeness of a set of partial Boolean functions. Let R(y1 , . . . , ym ) be any relation over E2 = {0, 1}. Then we define the relation R∗ (y1 , . . . , ym ) over {0, 1, ∗} as follows: R∗ (y1 , . . . , ym ) ≡ ∃ j (yj = ∗) ∨ R(y1 , . . . , ym ). Consider the following relations over E2 : R1 (y) ≡ (y = 0); R2 (y) ≡ (y = 1); R3 (y1 , y2 ) ≡ (y1 = 0) & (y2 = 1); R4 (y1 , y2 ) ≡ (y1 ≤ y2 ); R5 (y1 , y2 ) ≡ (y1 = y2 ); R6 (y1 , y2 , y3 , y4 ) ≡ y1 + y2 + y3 + y4 = 0 (mod 2); R7 (y1 , y2 , y3 , y4 ) ≡ (y1 = y2 ) & (y3 = y4 ) ∨ (y1 = y3 ) & (y2 = y4 ). Let also ∗ denote nowhere defined function. Theorem 3 (Freivald [3]). A set A of partial Boolean functions is complete if and only if it does not belong to any of the following 8 classes: P2 ∪{∗}, U (Ri , Ri∗ ), i = 1, 2, . . . , 7. Note that classes U (Ri , Ri ), i = 1, 2, 4, 5, 6, in P2 are Post classes of functions preserving 0, preserving 1, monotone functions, self-dual functions and linear functions. Classes U (Ri , Ri∗ ), i = 1, 2, 4, 5, in P2∗ are classes of partially defined Boolean functions that can be extended to total Boolean function of corresponding Post class. But this does not hold for U (R6 , R6∗ ). If L is the set of all linear Boolean functions and L∗ is the set of all partially defined Boolean functions that can be extended to linear Boolean functions then there exists a continuum of closed classes between L and L∗ as well as between L∗ and U (R6 , R6∗ ) [4]. Algorithm for checking if function belongs to one of the 8 Freivald classes based on implication (4) has complexity at least of order N 4 . One can prove the next theorem. Theorem 4. If partial Boolean functions are represented by strings of their values then for checking the completeness of a system A of partial Boolean functions there exists an algorithm with bit complexity O(N log2 3 log N log log N log log log N ), where N is the total length of the strings representing all functions from A. Proof. According to Theorem 3 one only needs to check for each of the 8 Freivald classes if all functions of the set A belong to this class. By Theorems 1 and 2 one can check if a function belongs to one of first 6 classes with complexity O(N log N ) and if it belongs to U (R6 , R6∗ ) with complexity O(N log3 N ). The only problem is to check if a function belongs to the last class U (R7 , R7∗ ). The predicate R7 is true only for 6 tuples of length 4. Thus the predicate R7n is true for 6n = (2n )log2 6 tuples of 4 strings of length n. Hence if a function has n variables and we check implication (4) for U (R7 , R7∗ ) only when the left-hand side of implication log 6 is true then we can reduce the complexity of checking for one function to O(N1 2 ) where N1 = 2n and for all functions to O(N log2 6 ). Further reduction is not that simple. Let λ be a complex root of the equation λ2 + λ + 1 = 0 (this means that λ3 = 1). It is easy to check that
30
V. Alekseev / On Algebraic Algorithms Deciding Properties of Discrete Functions
(x0 + x1 )(y0 + y1 )(z0 + z1 )(t0 + t1 ) + (x0 + λx1 ) y0 + λ2 y1 z0 + λ2 z1 (t0 + λt1 ) + x0 + λ2 x1 (y0 + λy1 )(z0 + λz1 ) t0 + λ2 t1 = hijrs xi yj zr ts
(5)
with hijrs = 3 if R7 (ijrs) is true and hijrs = 0 if R7 (ijrs) is false. So we can use the logical semiring (0, N) and proceed almost along the same lines as we have done in the proof of Theorem 2. Thus one can reduce the problem of checking if f (x1 , . . . , xn ) belongs to U (R7 , R7∗ ) to evaluating some algebraic expression and then reduce this problem for n to 3 similar problems for n−1 using (5). Therefore, if N1 = 2n , for the number of arithmetic operations we have
L(N1 ) ≤ 3L
N1 2
+ O(N1 ),
log 3 from which it follows [1] that L(N1 ) = O N1 2 . We can use in our calculations only numbers a + λb with integer a and b and code them by pairs of integers in binary representation. We have log2 N1 iteration steps. Thus the lengths of codes of all numbers in algorithm are O(log N1 ) = O(log N ). We can add or multiply such numbers with O(log N log log N log log log N ) bit operations [1]. So the total number ofbit operations log 3 for one function in n variables is O N1 2 log N log log N log log log N . Because for function f (x) = xlog2 3 we have f (x1 ) + f (x2 ) ≤ f (x1 + x2 ), the total number of bit log2 3 log N log log N log log log N operations for all functions is O N Now consider an example where a more powerful logical semiring of polynomials is used. Let S = {0, 1}, S1 be arbitrary finite set and consider all f : S n → S1 . Consider the set U (R, R1 ), where R1 (y1 , y2 , y3 ) is arbitrary relation over S1 and R(y1 , y2 , y3 ) is the following relation over S: R(y1 , y2 , y3 ) ≡ (y1 + y2 + y3 ≥ 2). Algorithm for deciding whether f ∈ U (R, R1 ) based on implication (4) has complexity of order at least N 3 where N = 2n and n is the number of variables. Theorem 5. Let f (x1 , . . . , xn ) be specified by the string of all its values. Then there exists an algorithm with bit complexity O(N log5 N ) for deciding whether f ∈ U (R, R1 ). Proof. Let Z0 ( ), Z+ ( ) be the sets of all polinomials in with integer coefficients and free terms equal to 0 (respectively, from N). Then the pair (Z0 ( ), Z+ ( )) with usual operations of addition and multiplication is a logical semiring. As in the proof of Theorem 2, one can reduce the problem of deciding whether f (x1 , . . . , xn ) ∈ U (R, R1 ) to evaluating over (Z0 ( ), Z+ ( )) the following expression: T =
α
β
γ
t(α1 , β1 , γ1 ) · · · t(αn , βn , γn ) · xα yβ zγ ,
31
V. Alekseev / On Algebraic Algorithms Deciding Properties of Discrete Functions
where Z0 ( ) if R(α, β, γ) is false, t(α, β, γ) ∈ Z+ ( ) if R(α, β, γ) is true.
(6)
and xα , yβ , zγ take values in Z0 ( ) or Z+ ( ) (for example, 0 and 1). Consider the next equality: 1 {[x1 (1 + ) + x0 ][y1 (1 + ) + y0 ][z1 (1 + ) + z0 ] − x1 y1 z1 }
= x1 y1 z1 (3 + 3 + 2 ) + (x0 y1 z1 + x1 y0 z1 + x1 y1 z0 )(1 + 2 + 2 ) + (x0 y0 z1 + x0 y1 z0 + x1 y0 z0 )( + 2 ) + x0 y0 z0 2 . to (6) and thus we take this Note that coefficients in xα , yβ , zγ in this sum correspond = ( γ0 , γn ), xα ,1 (1 + coefficients as t(α, β, γ). Denote α = ( α0 , αn ), β = β0 , βn , γ 0
) + xα 0 ,0 = pα 0 , yβ0 ,1 (1 + ) + yβ0 ,0 = qβ0 , zγ0 ,1 (1 + ) + zγ0 ,0 = rγ0 . Then we have t(α1 , β1 , γ1 ) · · · t(αn−1 , βn−1 , γn−1 ) T = α 0
0 β
γ 0
1 1 1
×
t(αn , βn , γn )xα 0 ,αn yβ0 ,βn zγ0 ,γn
αn =0 βn =0 γn =0
1 = t(α1 , β1 , γ1 ) · · · t(αn−1 , βn−1 , γn−1 ) · pα 0 qβ0 rγ0
α 0
−
0 β
γ 0
1 t(α1 , β1 , γ1 ) · · · t(αn−1 , βn−1 , γn−1 ) · xα 0 ,1 yβ0 ,1 zγ0 ,1 .
α 0
0 β
γ 0
Let Z{ } be the set of all Laurent polynomials in with a finite number of terms of negative degrees. Thus the problem of evaluating T over Z{ } for n is reduced to the same problem for n − 1. If N = 2n then for the minimum number L(N ) of arithmetic operations required for evaluating T over Z{ } we have:
L(N ) ≤ 2L
N 2
+ O(N ).
This implies [1] that L(N ) = O(N log N ). When calculating pα 0 , qβ0 , rγ0 , the maximum degree of these polynomials and the maximum length of coefficients can increase at most by a constant. We have log2 N iteration cycles. Thus the degrees of all polynomials and the lengths of all coefficients the algorithm are O(log 4 N ). We can add or multiply 2 in 2 such polynomials with O log N · O log N = O log N bit operations. (One can improve this bound by using faster multiplication of polinomials and integers [1].)
32
V. Alekseev / On Algebraic Algorithms Deciding Properties of Discrete Functions
The method proposed in the present paper reduces problems of searching for fast algorithms to problems of searching for suitable logical semirings and appropriate algebraic transformations. This method can be used for designing fast algorithms on discrete structures.
References [1]
A.V. Aho, J.E. Hopcroft, J.D. Ullman, The design and analysis of computer algorithms, Addison-Wesley, 1976. [2] A.A. Voronenko, On the complexity of recognition of monotonicity, Mathematical problems of cybernetics, issue 8, Moscow, Nauka, 1999, 301–303 (in Russian). [3] R.V. Freivald, Criterion of completeness of partial functions of algebra of logic and of multiple-valued logic, DAN SSSR 167 (1966), 1249–1250 (in Russian). [4] V.B. Alekseev and A.A. Voronenko, On some closed classes in partial two-valued logic, Discrete mathematics (Russian), 6(4) (1994), 58–79 (in Russian). English translation: Discrete mathematics and application, 4(5) (1994), 401–419.
Boolean Functions in Cryptology and Information Security B. Preneel and O.A. Logachev (Eds.) IOS Press, 2008 © 2008 IOS Press. All rights reserved. doi:10.3233/978-1-58603-878-6-33
33
Non-Archimedean Theory of T -Functions Vladimir ANASHIN 1 , Lomonosov University, Moscow, Russia Abstract. Loosely speaking, a T -function is a mapping from k-bit words into r-bit words such that each i-th bit of image depends only on low-order bits 0, . . . , i of the pre-image. For example, all arithmetic operations (addition, multiplication) are T -functions, all bitwise logical operations (XOR, AND, etc.) are T -functions. Any composition of T -functions is a T -function as well. Thus T -functions are natural computer word-oriented functions. It turns out that T -functions are continuous (and often differentiable!) functions with respect to the so-called 2-adic distance. This enables one apply 2-adic analysis to construct wide classes of T -functions with provable cryptographic properties (long period, balance, uniform distribution, high linear complexity, etc.). We consider stream ciphers constructed out of T -functions as specific automata that could be associated to dynamical systems on the space of 2-adic integers and apply the theory of non-Archimedean dynamical systems to study important cryptographic properties of these ciphers. Keywords. Pseudorandom generator, T -function, stream cipher, ergodic function, balanced function, Latin square, p-adic analysis
Introduction An n-variate triangular function (a T -function for short) is a mapping ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ α0 , α1 , α2 , . . . → Φ0 α0 , Φ1 α0 , α1 , Φ2 α0 , α1 , α2 , . . . , where αi↓ ∈ Bn is a Boolean columnar n-dimensional vector; B = {0, 1}, and Φ↓i : (Bn )i+1 → Bm maps (i + 1) Boolean columnar vectors α0↓ , . . . , αi↓ to m-dimensional n-dimensional columnar Boolean vector Φ↓i α0↓ , . . . , αi↓ . Accordingly, a univariate T -function f is a mapping f
(χ0 , χ1 , χ2 , . . .) → (ψ0 (χ0 ); ψ1 (χ0 , χ1 ); ψ2 (χ0 , χ1 , χ2 ); . . .), where χj ∈ {0, 1}, and each ψj (χ0 , . . . , χj ) is a Boolean function in Boolean variables χ0 , . . . , χj . T -functions may be viewed as mappings from non-negative integers 1 Information
Security Institute, Lomonosov University, 119192 Michurinsky prosp., 1, Moscow, Russia; E-mail:
[email protected],
[email protected].
34
V. Anashin / Non-Archimedean Theory of T-Functions
to non-negative integers: e.g., a univariate T -function f sends a number with the base-2 expansion χ0 + χ1 · 2 + χ2 · 22 + · · · to the number with the base-2 expansion ψ0 (χ0 ) + ψ1 (χ0 , χ1 ) · 2 + ψ2 (χ0 , χ1 , χ2 ) · 22 + · · · Further in the paper we refer to these Boolean functions ψ0 , ψ1 , ψ2 , . . . as coordinate functions of a T -function f . If we restrict T -functions to the set of all numbers whose base-2 expansions are not longer than k, we sometimes refer these restrictions as T functions on k-bit words. Important examples of T -functions are basic machine instructions: • integer arithmetic operations (addition, multiplication,. . . ); • bitwise logical operations (OR, XOR, AND, NOT); • some their compositions (masking, shifts towards high order bits, reduction modulo 2k ). Since obviously a composition of T -functions is a T -function (for instance, any polynomial with integer coefficients is a T -function), the T -functions are natural transformations of binary words that can be performed by digital computers and that is why they recently have attracted attention of researches in computer science and cryptology. Although in cryptology the term “T -function” was suggested only in 2002, by Klimov and Shamir, see [1], in mathematics the mappings we refer as T -functions are known more than 50 years, however, under other names. For instance, in automata theory Yablonsky et. al. studied the so-called determined functions since 1950-th, see [2]. Actually, a determined function is a function that could be represented by an automaton. Consider an automaton with a binary input and binary output; then each infinite input string of 0s and 1s the automaton transforms into an infinite output string of 0s and 1s (we suppose that the initial state is fixed). Note that every outputted i-th bit depends only on the inputted i-th bit and on the current state of the automaton. Yet the current state depends only on the previous state and on the (i − 1)-th input bit. Hence, for every i = 1, 2, . . ., the i-th outputted bit depends only on bits 1, 2, . . . , i of the input string, and so the transformation of all infinite binary strings performed by the automaton is a T -function. We note here that Yablonsky and his succeedors were mostly interested in such properties of determined functions as completeness of various systems of functions, methods of constructing automata representing given function, etc. It worth notice also that determined functions were studied in a more general setting, for arbitrary K-letter inputs/outputs. T -functions were also studied in algebra, and also in much more general setting: T -functions are a special case of the so-called compatible mappings; namely, any T function on k-bit words is a compatible mapping of a residue ring modulo 2k . Recall that a transformation f : A → A on an algebraic system A (that is, of a set endowed with operations ω ∈ Ω) is called compatible whenever f agrees with all congruences of A; that is, f (a) ∼ f (b) whenever a ∼ b, where ∼ is a congruence of A.
V. Anashin / Non-Archimedean Theory of T-Functions
35
Recall that a congruence ∼ is an equivalence relation that agrees with all operations ω of A: ω(a1 , . . . , ar ) ∼ ω(b1 , . . . , br ) whenever ai ∼ bi , i = 1, 2, . . . , r, r is the arity of ω. It is obvious that a compatible transformation on the residue ring Z/2k Z modulo 2k is a T -function on k-bit words (under a natural one-to-one correspondence between Bk and Z/2k Z, when an k-bit word from Bk is considered as a base-2 expansion of an integer): In the case A = Z/2k Z is a residue ring modulo 2k the compatibility of f yields a≡b
(mod 2s ) =⇒ f (a) ≡ f (b) (mod 2s ),
for all s ≤ k, which is merely an equivalent definition of a (univariate) T -function on k-bit words. For further results on compatible functions on rings and other algebras see a 30-year old monograph [3] and references therein. We note here that among other important results, within this theory were obtained criteria for invertibility of polynomial mappings over rings; actually Theorem 3 mentioned below is a far-going generalization of this result. Since the early 1990-th the non-Archimedean theory of T -functions emerged, which treated T -functions as continuous transformations on the space Z2 of 2-adic integers and studied corresponding dynamics. The first publications in this area were [4] and [5]; the importance of T -functions for pseudorandom generation and cryptology was explicitly stated in these papers as well. Within this theory it was demonstrated that T -functions are continuous transformations with respect to the 2-adic metrics, and that invertibility (resp., single cycle property) of T -functions correspond to measure preservation (resp., ergodicity) of these continuous transformations. This approach supplies a researcher with a number of effective tools from the non-Archimedean (actually, 2-adic) analysis to determine whether a given T -function is invertible or has a single cycle property, to study distribution and structure of output sequences, to construct wide classes of T -functions with prescribed properties, etc. We discuss this approach further in the present paper. We note that this theory was developed in a more general setting, for arbitrary prime p, and not necessarily for p = 2, which corresponds to the case of T -functions. However, in the paper we consider the case p = 2 only, although most of results mentioned below remain true (after proper modification) in a general case as well. Last, but not least: T -functions under the name of triangular Boolean mappings were studied in the theory of Boolean functions. Within this theory there were obtained important criteria for invertibility and a single cycle property of a T -function, in terms of coordinate Boolean functions ψ0 , ψ1 , ψ2 , . . .. The criteria are a mathematical folklore circulating at least since 1970th among mathematicians dealing with the theory of Boolean functions; we reproduce these criteria below in Section 2. The paper is organized as follows: • in Section 1 we consider a PRNG as an automaton and argue that T -functions with a single cycle property could serve as state update functions, whereas balanced T -functions could serve as filters; • in Section 2 we recall mathematical folklore criteria for invertibility/single cycle property of a univariate T -function, in terms of algebraic normal forms of coordinate functions; • in Section 3 we recall basic notions concerning 2-adic numbers and demonstrate that any T -function is a continuous function of 2-adic variables;
36
V. Anashin / Non-Archimedean Theory of T-Functions
f
xi+1 = f (xi ) state update
xi
F
output
yi = F (xi )
Figure 1. Pseudorandom number generator.
• in Section 4 we recall basic notions of ergodic theory and demonstrate that balancedness (in particular, invertibility) and single cycle property of a T -function correspond to, accordingly, measure preservation and ergodicity; • in Section 5 we explain how to use 2-adic differentiation to determine whether a T -function is balanced, invertible, or has a single cycle property; • in Section 6 we consider interpolation series, with the same purpose; • in Section 7 we discuss how complex are recurrence sequences whose recurrence laws are T -functions, with respect to linear complexity and structural properties; • we conclude in Section 8.
1. Stream Ciphers and Pseudorandom Number Generators A pseudorandom generator, or a pseudorandom number generator (a PRNG for short) is an algorithm that takes a short random string (which is called a key, or a seed) and stretches it into a much longer sequence, a keystream, which looks like random; that is, passes certain statistical tests. The schematics of a typical PRNG is shown in Figure 1. The function f : A → A is called the state update function, whereas the function F : A → B is called the output function (or filter). In software development it is convenient (although not necessary) that A = Bn , B = Bm , and we restrict our considerations to this case. We usually associate Bk either with the residue ring Z/2k Z modulo 2n , or with a Cartesian power (Z/2r Z)s in case k = rs. Actually, within the scope of the paper we speak about stream cipher meaning the latter is a pseudorandom generator which is used for encryption: The produced keystream is XORed with a plaintext resulting in ciphertext. However, not every PRNG is suitable for stream encryption. Stream ciphers are cryptographically secure PRNGs; that is, they must not only produce statistically good sequences, but also they must withstand cryptanalyst’s attacks; however, this issue is outside the scope of the paper. The output sequence of the PRNG is necessarily periodic, and the length of the period must be as long as possible: too short period makes the output sequence of the PRNG statistically bad and vulnerable to attacks. To make the period of the PRNG the longest
V. Anashin / Non-Archimedean Theory of T-Functions
37
possible (i.e., of length 2n ), one must take the state update function f : Z/2n Z → Z/2n Z with a single cycle property; that is, f must permute elements of Z/2n Z cyclically. In this case we also say that f is transitive modulo 2n . The state update sequence x0 , x1 = f (x0 ), . . . , xi+1 = f (xi ) = f i+1 (x0 ), . . . of n-bit words will have then the longest possible period (of length 2n ), and strict uniform distribution; that is, each n-bit word will occur within the period exactly once. In order not to spoil the uniform distribution, one may take a balanced output function F : Z/2n Z → Z/2m Z as a filter. That is, to each m-bit word the mapping F maps the same number of n-bit words (hence; m ≤ n). For m = n balanced mappings are just invertible (that is, bijective, one-to-one) mappings. We say also that the function F on n bit words is bijective modulo 2n whenever the mapping F : Z/2n Z → Z/2n Z is invertible. Note that whenever both n and m are multiples of k, n = ks and m = kr, one can associate the set Bn (resp., Bm ) to respective cartesian powers (Z/2k Z)s and (Z/2k Z)r of the residue ring Z/2k Z and thus to speak of balance modulo 2k of the function F . If a PRNG is to be implemented in software, one must know how to construct single cycle (respectively, balanced) mappings out of basic machine instructions which include integer arithmetic operations (addition, multiplication,. . . ) and bitwise logical operations (OR, XOR, AND, NOT,. . . ). Further in the paper we discuss the relevant techniques.
2. Algebraic Normal Forms It is well known how to determine whether a univariate T -function f
(χ0 , χ1 , χ2 , . . .) → (ψ0 (χ0 ); ψ1 (χ0 , χ1 ); ψ2 (χ0 , χ1 , χ2 ); . . .) is invertible (or, accordingly, has a single cycle property) whenever its coordinate functions ψj (χ0 , . . . , χj ) are represented via algebraic normal forms. Recall that the algebraic normal form (the ANF for short) of a Boolean function ψj (χ0 , . . . , χj ) is the representation of this function via ⊕ (addition modulo 2, that is, “exclusive or”) and · (multiplication modulo 2, that is, “and”, or conjunction). In other words, the ANF of the Boolean function ψ is its representation in the form ψ(χ0 , . . . , χj ) = beta ⊕ β0 χ0 ⊕ β1 χ1 ⊕ . . . ⊕ β0,1 χ0 χ1 ⊕ . . . , where β, β0 , . . . ∈ {0, 1}. Recall also that the weight of the Boolean function ψj in (j + 1) variables is the number of (j + 1)-bit words that satisfy ψj ; that is, the weight is the cardinality of the truth set of the Boolean function ψj . The following theorem is a mathematical folklore known since 1970th: Theorem 1. A univariate T -function f is invertible if and only if for each j = 0, 1, . . . the Boolean function ψj in Boolean variables χ0 , . . . , χj is linear with respect to the variable χj ; that is, f is invertible if and only if the ANF of each ψj is of the form
38
V. Anashin / Non-Archimedean Theory of T-Functions
ψj (χ0 , . . . , χj ) = χj ⊕ φj (χ0 , . . . , χj−1 ), where φj is a Boolean function that does not depend on the variable χj . The univariate T -function f has a single cycle property if and only if, additionally, all Boolean functions φj are of odd weight. The latter takes place if and only if φ0 = 1, and the full degree of the Boolean function φj for j ≥ 1 is exactly j, that is, the ANF of φj contains a monomial χ0 · · · χj−1 . Thus, f has a single cycle property if and only if ψ0 (χ0 ) = χ0 ⊕ 1, and for j ≥ 1 the ANF of each ψj is of the form ψj (χ0 , . . . , χj ) = χj ⊕ χ0 · · · χj−1 ⊕ θj (χ0 , . . . , χj−1 ), where the weight of θj is even; i.e., deg θj ≤ j − 1. Note 1. Actually the bit-slice technique of Klimov and Shamir, which they introduced in [1], is just a re-statement of Theorem 1. Unfortunately, areas of applications of Theorem 1 are rather restricted: To determine with the use of this theorem whether a given composition of arithmetic and bitwise logical operators is invertible (or whether it has a single cycle property) is possible only for rather simple compositions like the mapping x → x + x2 OR C considered in [1]. The latter mapping is transitive modulo 2n if and only if C ≡ 5 (mod 8) or C ≡ 7 (mod 8); see [6, Example 3.14] or [7, Example 4.9] for the proof based on Theorem 1. Earlier in 1999 Kotomina [8] applied Theorem 1 to prove the following statement resulting in the so called add-xor generators, which are extremely fast: The T -function f (x) = (. . . ((((x + c0 ) XOR d0 ) + c1 ) XOR d1 ) + · · · is transitive modulo 2n (n ≥ 2) if and only if it is transitive modulo 4. The following proposition, whose proof is also based on Theorem 1, gives a method to construct new invertible T -functions (respectively, T -functions with a single cycle property), out of given T -functions: Proposition 1 ([6,7]). Let F be an (n+1)-variate T -function such that for all z1 , . . . , zn the T -function F (x, z1 , . . . , zn ) is invertible with respect to the variable x. Then the composition F (f (x), 2g1 (x), . . . , 2gn (x)) is invertible for arbitrary T -functions g1 , . . . , gn and any invertible T -function f . Moreover, if f has a single cycle property, then f (x + 4g(x)), f (x XOR (4g(x))), f (x) + 4g(x), and f (x) XOR (4g(x)) have a single cycle property, for arbitrary T function g. Although Theorem 1 can be applied to verify invertibility/single cycle property of some T -functions, it is highly doubtful that one can prove, with the use of Theorem 1 only, that, e.g., the following function is a T -function with a single cycle property (it is!):
2 (x+1)AND(1/5) 1−2x 1 (x + 2x) XOR (1/3) x 2+ + x +2 3 3 2x + 3 ⎞ ⎛
2 xAND(1/5) 5−2x (x − 1) XOR (1/3) ⎠. + 2 NOT ⎝ 2x + 1
V. Anashin / Non-Archimedean Theory of T-Functions
39
We need more delicate tools than Theorem 1 to study complicated compositions of basic machine instructions. These tools can be derived from the p-adic dynamical systems theory.
3. 2-Adic Integers and T -Functions As it follows directly from the definition, any T -function is well-defined on the set Z2 of all infinite binary sequences . . . δ2 (x)δ1 (x)δ0 (x) = x, where δj (x) ∈ {0, 1}, j = 0, 1, 2, . . .. Arithmetic operations (addition and multiplication) with these sequences could be defined via standard “school-textbook” algorithms of addition and multiplication of natural numbers represented by base-2 expansions. Each term of a sequence that corresponds to the sum (respectively, to the product) of two given sequences could be calculated by these algorithms within a finite number of steps. Thus, Z2 is a commutative ring with respect to the addition and multiplication defined in this manner. The ring Z2 is called the ring of 2-adic integers. The ring Z2 contains a subring Z of all rational integers: For instance, . . . 111 = −1, since +
. . .1111 . . .0001 . . .0000
Moreover, the ring Z2 contains all rational numbers that can be represented by irreducible fractions with odd denominators. For instance, the following calculations show that . . . 01010101 × . . . 00011 = . . . 111, i.e., that . . . 01010101 = −1/3 since . . . 00011 = 3 and . . . 111 = −1: . . .010101 . . .000011 . . .010101 + . . .10101 . . .111111
×
Sequences with only a finite number of 1s correspond to non-negative rational integers in their base-2 expansions, sequences with only a finite number of 0s correspond to negative rational integers, while eventually periodic sequences (that is, sequences that become periodic at a certain place) correspond to rational numbers represented by irreducible fractions with odd denominators: For instance, 3 = . . . 00011, −3 = . . . 11101, 1/3 = . . . 10101011, −1/3 = . . . 1010101. So the j-th term δj (u) of the corresponding sequence u ∈ Z2 is merely the j-th digit of the base-2 expansion of u whenever u is a non-negative rational integer, u ∈ N0 = {0, 1, 2, . . .}. What is important, the ring Z2 is a metric space with respect to the metrics (distance) d2 (u, v) defined by the following rule: d2 (u, v) = u − v2 = 1/2n , where n is the smallest non-negative rational integer such that δn (u) = δn (v), and d2 (u, v) = 0 if no such n exists (i.e., if u = v). For instance d2 (3, 1/3) = 1/8. The function d2 (u, 0) = u2 is a norm of a 2-adic integer u, and ord2 u = − log2 u2 2 is a 2-adic valuation of u. Note that for u ∈ N0 the valuation ord2 u is merely the exponent of the highest power of 2 that divides u (thus, loosely speaking, ord2 0 = ∞, thus 02 = 0).
40
V. Anashin / Non-Archimedean Theory of T-Functions
Once the metric is defined, one defines notions of convergent sequences, limits, continuous functions on the metric space, and derivatives if the space is a commutative ring. For instance, with respect to the so defined metric d2 on Z2 the following sequence tends to −1 = . . . 111, 1, 3, 7, 15, 31, . . . , 2n − 1, . . . −→ −1, d2
bitwise logical operators (such as XOR, AND, . . . ) define continuous functions in two variables, the function f (x) = x XOR a is differentiable everywhere on Z2 for every rational integer a: Its derivative is −1 for negative a, and 1 in the opposite case. Reduction modulo 2n of a 2-adic integer v, i.e., setting all terms of the corresponding sequence with indices greater than n − 1 to zero (that is, taking the first n digits in the representation of v) is just an approximation of a 2-adic integer v by a rational integer with precision 1/2n : This approximation is an n-digit positive rational integer v AND (2n − 1); the latter will be denoted also as v mod 2n . Actually a processor operates with approximations of 2-adic integers with respect to 2-adic metrics: When the overflow happens, i.e., when a number that must be written into an n-bit register consists of more than n significant bits, the processor just writes only n low order bits of the number into the register thus reducing the number modulo 2n . Thus, precision of the approximation is defined by the bitlength of machine words of the processor. What is most important within the scope of the paper is that all T -functions are continuous functions of 2-adic variables, since all T -functions satisfy Lipschitz condition with the constant 1 with respect to the 2-adic metrics, and vice versa. Indeed, it is obvious that the function f : Z2 → Z2 satisfies the condition f (u) − f (v)2 ≤ u − v2 for all u, v ∈ Z2 if and only if f is compatible, since the inequality a−b2 ≤ 1/2k is just equivalent to the congruence a ≡ b (mod 2k ). A similar property holds for multivariate T -functions. So we conclude: T -functions = compatible functions = 1-Lipschitz functions The observation we just have made implies that the non-Archimedean (namely, the 2-adic) analysis can be used in the study of T -functions. For instance, one can prove that the following functions satisfy Lipschitz condition with a constant 1 and thus are T -functions (so we can use them in compositions to construct PRNGs): • subtraction, −: (u, v) → u − v; • exponentiation, ↑: (u, v) → u↑v = (1+2u)v , and in particular raising to negative powers, u ↑ (−n) = (1 + 2u)−n ; • division, //: u // v = u · (v ↑ (−1)) = u/(1 + 2v). We summarize: • T -functions on n-bit words are just approximations of 2-adic compatible functions (i.e., 1-Lipschitz functions) with precision 2−n w.r.t. the 2-adic metric: That is, a T -function on n-bit words is just a reduction modulo 2n of a 2-adic 1Lipschitz function.
V. Anashin / Non-Archimedean Theory of T-Functions
41
• To study properties of T -functions one can use 2-adic analysis , since compatible functions are continuous w.r.t. the 2-adic metric. • In addition to the basic machine instructions, to construct T -functions one can use also subtraction, division by an odd integer, raising an odd integer to a certain power. All these considerations after proper modifications remain true for arbitrary prime p, and not only for p = 2, thus leading to the notion of a p-adic integer, and to p-adic analysis. For formal introduction to p-adic analysis, exact notions and results see any relevant book, e.g., [9,10]. Although most of results mentioned further also remain true for arbitrary prime p, in the paper we consider only the case p = 2 since we are dealing with T -functions. For the relevant theory for arbitrary prime p see [4,5,11,12,6,13,14,15]. The latter theory provides tools to construct non-linear pseudorandom generators modulo arbitrary N , which is not necessarily a power of a prime. However, these generators are out of the scope of the present paper.
4. The 2-Adic Ergodic Theory and T -Functions Now we describe connections between PRNGs and the 2-adic ergodic theory. Recall that a dynamical system on a measurable space S is a triple (S; μ; f ), where S is a set endowed with a measure μ, and f : S → S is a measurable function; that is, an f -preimage of any measurable subset is a measurable subset. These basic definitions from dynamical system theory, as well as the following ones, could be found in [16]; see also [17] as a comprehensive monograph on various aspects of dynamical systems theory. A trajectory of a dynamical system is a sequence x0 , x1 = f (x0 ), . . . , xi = f (xi−1 ) = f i (x0 ), . . . of points of the space S, x0 is called an initial point of the trajectory. If F : S → T is a measurable mapping to some other measurable space T with a measure ν (that is, if an F preimage of any ν-measurable subset of T is a μ-measurable subset of S), the sequence F (x0 ), F (x1 ), F (x2 ), . . . is called an observable. Note that the trajectory formally looks like the sequence of states of a pseudorandom generator, whereas the observable resembles the output sequence. A mapping F : S → Y of a measurable space S into a measurable space Y endowed with probabilistic measures μ and ν, respectively, is said to be measure preserving (or, sometimes, equiprobable) whenever μ(F −1 (S)) = ν(S) for each measurable subset S ⊂ Y. In the case S = Y and μ = ν, a measure preserving mapping F is said to be ergodic whenever for each measurable subset S such that F −1 (S) = S one has either μ(S) = 1 or μ(S) = 0. Recall that to define a measure μ on some set S we should assign non-negative real numbers to some subsets that are called elementary. All other measurable subsets are compositions of these elementary subsets with respect to countable unions, intersections, and complements. Elementary subsets in Z2 are balls B2−k (a) = a + 2k Z2 of radii 2−k (in other words, co-sets with respect to the ideal generated by 2k ). To each ball we assign a number μ2 (B2−k (a)) = 1/2k . This way we define a probabilistic measure on the space Zp ,
42
V. Anashin / Non-Archimedean Theory of T-Functions
μ2 (Z2 ) = 1. The measure μ2 is called a (normalized) Haar measure on Z2 . The normalized Haar measure on Zn2 can be defined in a similar manner. In other words, the ball a + 2k Z2 (of radius 2−k ) is a set of all 2-adic integers that are congruent to a modulo 2k ; and the measure of this ball is μ2 (a + 2k Z2 ) = 2−k . For example, · · · ∗ ∗ ∗ ∗ ∗ 0101 = 5 + 16 · Z2 = −1/3 + 16 · Z2 is a ball of radius (and of measure) 1/16 centered at the point 5 (or, which is the same, at the point −1/3); all 2-adic numbers that are congruent to 5 modulo 16 form this ball. Note that the sequence {si }∞ i=0 of 2-adic integers is uniformly distributed (with respect to the normalized Haar measure μ2 on Z2 ) if and only if it is uniformly distributed modulo 2k for all k = 1, 2, . . .; That is, for every a ∈ Z/2k Z relative numbers of occurrences of a within initial segment of length of the sequence {si mod 2k } of residues modulo 2k are asymptotically equal, i.e., lim→∞ A(a, )/ = 1/2k , where A(a, ) = |{si ≡ a (mod 2k ) : i < }|, see [16] for details. Thus, strictly uniformly distributed sequences are uniformly distributed in the usual meaning of the theory of distributions of sequences. Moreover, the following theorem (which was announced in [12] and proved in [18]) holds. Theorem 2. For m = n = 1, an 1-Lipschitz mapping F : Zn2 → Zm 2 preserves the normalized Haar measure μ2 on Z2 (resp., is ergodic with respect to μ2 ) if and only if it is bijective (resp., transitive) modulo 2k for all k = 1, 2, 3, . . .. For n ≥ m, the mapping F preserves measure μ2 if and only if it induces a balanced mapping of (Z/2k Z)n onto (Z/2k Z)m , for all k = 1, 2, 3, . . .. In other words, the theorem states that • for univariate T -functions, measure preservation is equivalent to the invertibility modulo 2k for all k ∈ N; • for multivariate T -functions, i.e., for F : Zn2 → Zm 2 , measure preservation is k equivalent to the balancedness modulo 2 for all k ∈ N; • ergodicity is equivalent to the single cycle property modulo 2k for all k ∈ N This theorem implies in particular that whenever one chooses an ergodic T -function f : Z2 → Z2 as a state transition function of a PRNG (see Figure 1), and a measurepreserving T -function F : (Z/2k Z)n → (Z/2k Z)m as an output function of the PRNG, both the sequence of states and output sequence of the PRNG are uniformly distributed with respect to the Haar measure. This implies that reduction of these sequences modulo 2n results in strictly uniformly distributed sequences of binary words. Note also that any number that is longer than a word bitlength of a computer, is reduced modulo 2n automatically. Thus, Theorem 2 points out a way to construct generators of uniformly distributed sequences out of standard computer instructions. To construct a PRNG, one must answer the following questions: What compositions of basic machine instructions are measure-preserving? are ergodic? Given a composition of basic machine instructions, is it measure-preserving? is it ergodic? 5. Uniformly Differentiable T -Functions In this section we answer the questions raised at the end of Section 4 for some special class of T -functions, which is, however, rather wide.
V. Anashin / Non-Archimedean Theory of T-Functions
43
First we recall some known results from the long history of pseudorandom generators (which is described in, e.g., a book of Donald Knuth [19]). From these results, one could notice that, loosely speaking, the behavior of a mapping modulo 2N , where N is large, is totally determined by the behavior of this mapping modulo 2n , where n is small. • Linear Congruential Generator (Hull and Dobell, 1962). The mapping x → a · x + b, where a, b ∈ Z, is a permutation with a single cycle property modulo 2N , N ≥ 2 if and only if it is a permutation with a single cycle property modulo 4. • Bijectivity Criterion for Polynomials with Integer Coefficients (known since 1960; proved and re-proved by a number of authors). The mapping x → f (x), where f is a polynomial with rational integer coefficients, is bijective modulo 2N , N ≥ 2 if and only if it is bijective modulo 4. • Quadratic Generator (Coveyou, 1969). The mapping x → f (x), where f is a quadratic polynomial with rational integer coefficients, is transitive modulo 2N , N ≥ 3 if and only if it is transitive modulo 8. It worth notice here that in 1980-th M.V. Larin proved that the word “quadratic” in the latter statement could be omitted! The result circulated as a manuscript that time, a journal publication [20] appeared much later. The statements mentioned above demonstrate obvious similarities in the nature. Why? To answer this question, we need a notion of a derivative modulo 2k , which was originally introduced in [4,5,12]. By the definition, for points a = (a1 , . . . , an ) and b = (b1 , . . . , bn ) of Zn2 the congruence a ≡ b (mod 2s ) means that ai − bi 2 ≤ 2−s (or, which is the same, that ai = bi + ci 2s for suitable ci ∈ Z2 , i = 1, 2, . . . , s); that is a − b2 ≤ 2−s . Definition 1. A function F = (f1 , . . . , fm ) : Zn2 → Zm 2 is said to be differentiable modulo 2k at the point u = (u1 , . . . , un ) ∈ Zn2 if there exists a positive integer rational N and an n × m matrix Fk (u) over Z2 (called the Jacobi matrix modulo 2k of the function F at the point u) such that for every positive rational integer K ≥ N and every h = (h1 , . . . , hn ) ∈ Zn2 the congruence F (u + h) ≡ F (u) + hFk (u) (mod 2k+K )
(1)
holds whenever h2 ≤ p−K . In case m = 1 the Jacobi matrix modulo 2k is called a differential modulo 2k . In the case m = n a determinant of the Jacobi matrix modulo 2k is called a Jacobian modulo 2k . Entries of the Jacobi matrix modulo 2k are called partial derivatives modulo 2k of the function F at the point u. Note 2. To be more exact, the definition speaks of differentiable modulo 2k functions with integer valued derivatives; actually the notion of a differentiable modulo 2k function is a somewhat wider one. However, it turns out that if a T -function is differentiable modulo 2k in a wider sense, it is necessarily differentiable modulo 2k in the sense of Definition 1, so throughout the paper we use the notion of differentiability modulo 2k in that (narrower) meaning.
44
V. Anashin / Non-Archimedean Theory of T-Functions
A partial derivative (respectively, a differential) modulo 2k is denoted via ∂k∂fkix(u) j n ∂k F (u) (respectively, as dk F (u) = i=1 ∂k xi dk xi ). Since the notion of a function that is differentiable modulo 2k is very important for the theory that follows, we discuss this notion in detail. Compared to differentiability, the differentiability modulo 2k is a weaker restriction. Speaking loosely, in a univariate case (m = n = 1), Definition 1 just yields that F (u + h) − F (u) ≈ Fk (u) h Note that whenever ≈ (“approximately”) stands for an “arbitrarily high precision” one obtains a common definition of differentiability; however, if ≈ stands for a “precision that is not worse than 2−k ”, one obtains the differentiability modulo 2k . We note that the notion of a derivative modulo 2k has no direct analog in classical Calculus: A derivative with a precision up to the k-th digit after the point, being often used in common speech, is meaningless from the rigorous point of view since there is no distinguished base in real analysis. However, this notion is meaningful in 2-adic analysis since there is a distinguished base; namely, base-2. It is obvious that whenever a function is differentiable, it is differentiable modulo k 2 for all k = 1, 2, . . ., and in this case the derivative modulo 2k is just a reduction of a derivative modulo 2k (note that according to Definition 1 partial derivatives modulo 2k are determined up to a summand that is 0 modulo 2k ). Thus, we can associate to each partial derivative modulo 2k a unique element of the ring Z/2k Z; a Jacobi matrix modulo 2k at each point u ∈ Zn2 thus can be considered as a matrix over the ring Z/2k Z. For the functions that are differentiable modulo 2k for some k, the “rules of differentiation modulo 2k ” have the same (up to congruence modulo 2k instead of equality) form as for usual differentiation. For instance, if both functions G : Zs2 → Zn2 and k F : Zn2 → Zm 2 are differentiable modulo 2 at the points, respectively, v = (v1 , . . . , vs ) and u = G(v), then a composition F ◦ G : Zs2 → Zm 2 of these functions is uniformly k differentiable modulo 2 at the point v, all its partial derivatives modulo 2k at this point are 2-adic integers, and (F ◦ G)k (v) ≡ Gk (v)Fk (u) (mod 2k ). k Definition 2. A function F : Zn2 → Zm 2 is said to be uniformly differentiable modulo 2 on Zn2 if and only if there exists K ∈ N such that congruence (1) holds simultaneously for all u ∈ Zn2 as soon as hi 2 ≤ 2−K , (i = 1, 2, . . . , n). The least of these K is denoted Nk (F ).
Recall that all partial derivatives modulo 2k of a uniformly differentiable modulo 2k function F are periodic functions with period 2Nk (F ) , see [4, Proposition 2.12]. Thus, each partial derivative modulo 2k could be considered as a function defined on (and valuated in) the residue ring Z/2Nk (F ) Z. Moreover, if a continuation F of the function n k F = (f1 , . . . , fm ) : Nn0 → Nm 0 to the space Z2 is a uniformly differentiable modulo 2 function on Zn2 , then one can simultaneously continue the function F and all its (partial) derivatives modulo 2k to the whole space Zn2 . Consequently, we may study if necessary (partial) derivatives modulo 2k of the function F instead of those of F and vice versa. For example, a partial derivative ∂k∂fkix(u) modulo 2k vanishes modulo 2k at no point of j " " " ∂k fi (u) " (n) ∂k fi (u) n k Z2 (that is, ∂k xj ≡ 0 (mod 2 ) for all u ∈ Z2 , or, the same " ∂k xj " > 2−k 2
45
V. Anashin / Non-Archimedean Theory of T-Functions
everywhere on Zn2 ) if and only if ∂k∂fkix(u)
≡ 0 (mod 2k ) for all u ∈ {0, 1, . . . , 2Nk (F ) − j 1}. Note that differentiation modulo 2k could naturally be implemented as a computer program since this differentiation just implies (for a univariate F ) estimation of the fraction (F (u + h) − F (h))/h with a k-bit precision, i.e., evaluation of the first n low order bits of the base-2 expansion of the corresponding number. To calculate a derivative of, for instance, a state transition function, which is a composition of basic machine instructions, one needs to know derivatives of these “elementary” functions, such as arithmetic and bitwise logical operations. Now we briefly introduce a 2-adic analog of a “table of derivatives” of a classical Calculus. Example 1. Derivatives of bitwise logical operations. 1. A function f (x) = x AND c is uniformly differentiable on Z2 for any c ∈ Z; f (x) = 0 for c ≥ 0, and f (x) = 1 for c < 0, since f (x + 2n s) = f (x), and f (x + 2n s) = f (x) + 2n s for n ≥ l(|c|), where l(|c|) is the bit length of absolute value of c (mind that for c ≥ 0 the 2-adic representation of −c starts with 2l(c) −c in less significant bits followed by . . . 11: −1 = . . . 111, −3 = . . . 11101, etc.). 2. A function f (x) = x XOR c is uniformly differentiable on Z2 for any c ∈ Z; f (x) = 1 for c ≥ 0, and f (x) = −1 for c < 0. This immediately follows from Item 1 since u XOR v = u + v − 2(x AND v) (the latter identity can be easily verified). Thus (x XOR c) = x + c − 2(x AND c) = 1 + 2 · (0 for c ≥ 0; −1 for c < 0). 3. In the same manner it could be shown that functions x mod 2n , NOT(x) and x OR c for c ∈ Z are uniformly differentiable on Z2 , and (x mod 2n ) = 0, (NOT x) = −1, (x OR c) = 1 for c ≥ 0, (x OR c) = 0 for c < 0. 4. A function f (x, y) = xXORy is not uniformly differentiable on Z22 (as a bivariate function), yet it is uniformly differentiable modulo 2 on Z22 ; from Item 2 it follows that its partial derivatives modulo 2 are 1 everywhere on Z22 . Here is how it works altogether. Example 2. A function f (x) = x + (x2 OR 5) is uniformly differentiable on Z2 , and f (x) = 1 + 2x · (x OR 5) = 1 + 2x. Example 3. A function F (x, y) = (f (x, y), g(x, y)) = (x XOR 2(x AND y), (y + 3x3 ) XOR x) is uniformly differentiable modulo 2 as a bivariate function, and N1 (F ) = 1; namely
1x+1 F (x + 2 t, y + 2 s) ≡ F (x, y) + (2 t, 2 s) · 0 1 n
m
n
m
(mod 2k+1 )
= F1 (x, y) is a Jacobi for all m, n ≥ 1 (here k = min{m, n}). The matrix 10 x+1 1 matrix modulo 2 of F ; here is how we calculate partial derivatives modulo 2: for instance,
46
V. Anashin / Non-Archimedean Theory of T-Functions
∂1 (y + 3x3 ) ∂1 (u XOR x) ∂1 x ∂1 (u XOR x) ∂1 g(x, y) = · · + ∂1 x ∂1 x ∂1 u ∂ x ∂1 x 3 1 u=y+3x u=y+3x3 = 9x2 · 1 + 1 · 1 ≡ x + 1
(mod 2).
Note that a partial derivative modulo 2 of the function 2(x AND y is always 0 modulo 2 because of the multiplier 2: the function x AND y is not differentiable modulo 2 as bivariate function, yet 2(x AND y) is. So the Jacobian of the function F is det F1 ≡ 1 (mod 2). n Now let F = (f1 , . . . , fm ) : Zn2 → Zm 2 and f : Z2 → Z2 be T -functions that are uniformly differentiable on Zn2 modulo 2. This is a relatively weak restriction since all uniformly differentiable on Zn2 functions, as well as functions that are uniformly differentiable on Zn2 modulo 2k for some k ≥ 1, are uniformly differentiable on Zn2 modulo 2; ∂F k−1 F k−1 note that ∂x ≡ ∂∂kkxFi ≡ ∂∂k−1 ). xi (mod 2 i
Theorem 3 ([4,5,12]). A T -function F : Zn2 → Zm 2 is measure preserving whenever it k is balanced modulo 2 for some k ≥ N1 (F ) and the rank of its Jacobi matrix F1 (u) modulo 2 is exactly m at all points u = (u1 , . . . , un ) ∈ (Z/2k Z)n . In case m = n these conditions are also necessary, i.e., the function F preserves measure if and only if it is bijective modulo 2k for some k ≥ N1 (F ) and det(F1 (u)) ≡ 1 (mod 2) for all u = (u1 , . . . , un ) ∈ (Z/2k Z)n . Moreover, in the considered case these conditions imply that F preserves measure if and only if it is bijective modulo 2N1 (F )+1 . That is, if the mapping u → F (u) mod 2N1 (F ) is balanced, and if the rank of the Jacobi matrix F1 (u) modulo 2 is exactly m at all points u ∈ (Z/2N1 (F ) Z)n then each mapping u → F (u) mod 2r of (Z/2r Z)n onto (Z/2r Z)m (r = 1, 2, 3, . . .) is balanced, i.e., each point u ∈ (Z/2r Z)m has the same number of preimages in (Z/2r Z)m . It worth notice here that for n > m the sufficient conditions of Theorem 3 are not necessary: a two-variate polynomial F (x, y) = 2x + y 3 serves as a counterexample, see [12]. It is an open problem to characterize multivariate measure preserving T functions F : Zn → Zn for n > m; this is not known even for multivariate polynomials with integer coefficients. Moreover, even the case n = 2 and m = 1 for these polynomials is not studied. Theorem 3 can be applied to construct wide classes of Latin squares of order 2k ×2k . Recall that a Latin square is an N × N matrix such that each its row and each column is a permutation of N symbols, say, of numbers 0, 1, . . . , N − 1. Latin squares are popular objects of combinatorics and algebra (in algebra they are known under the name of binary quasigroups); they are also used in coding theory and in some cryptographic schemes (under the name of multipermutations). It is obvious that an N × N Latin square F = (ij ), i, j, ij ∈ N = {0, 1, . . . , N − 1}, defines a bivariate mapping f : N × N → N (by the rule f (i, j) = ij ), which is bijective with respect to each variable, and vice versa. We say that a bivariate T -function f defines a Latin square modulo 2k whenever a reduced mapping f mod 2k : Z/2k Z × Z/2k Z → Z/2k Z defines a Latin square on N = Z/2k Z. Now Theorem 3 immediately implies the following Corollary 1. A uniformly differentiable T -function f (x, y) defines a Latin square modulo 2k for some (equivalently, for any) k > N1 (f ) if and only if it defines a Latin square
V. Anashin / Non-Archimedean Theory of T-Functions
47
modulo 2N1 (F ) and ∂1 f∂(x,y) ≡ ∂1 f∂(x,y) ≡ 1 (mod 2). Moreover, these conditions holds 1x 1y if and only if f defines a Latin square modulo 2N1 (F )+1 . Indeed, in view of Theorem 3, the function f is bijective modulo 2k with respect to either variable if and only if f is bijective modulo 2N1 (f ) with respect to either variable, and ∂1 f∂(x,y) ≡ ∂1 f∂(x,y) ≡ 1 (mod 2); and these conditions are equivalent to the 1x 1y bijectivity modulo 2N1 (f )+1 of the function f with respect to either variable. For instance, the T -function f (x, y) = x + y + (x2 XOR y 2 ) defines a Latin square modulo 2k for all k = 1, 2, . . .. Actually with the use of more sophisticated techniques based on the full version of Theorem 3 (for arbitrary prime p, and not only for p = 2), it is possible to construct mutually orthogonal Latin squares, which can be used as block mixers for block ciphers, as cipher combiners, etc. However, this theme is outside the scope of the paper. Yet more examples of how Theorem 3 works: Example 4. We consider some T -functions that were studied in [1] to demonstrate techniques of Theorem 3. 1. A mapping (x, y) → F (x, y) = (x XOR 2(x AND y), (y + 3x3 ) XOR x) mod 2r of (Z/2r Z)2 onto (Z/2r Z)2 is bijective for all r = 1, 2, . . .. Indeed, the T -function F is bijective modulo 2N1 (F ) = 2 (direct verification) and det(F1 (u)) ≡ 1 (mod 2) for all u ∈ (Z/2Z)2 (see the table of derivatives in Example 1 and Examples 2, 3 thereafter). 2. The following mappings of Z/2r Z onto Z/2r Z are bijective for all r = 1, 2, . . .: x → (x + 2x2 ) mod 2r , x → (x + (x2 OR 1)) mod 2r , x → (x XOR (x2 OR 1)) mod 2r .
Indeed, all three T -functions are uniformly differentiable modulo 2, and N1 = 1 for all of them. So it suffices to prove that all three mappings are bijective modulo 2, i.e., as mappings of the residue ring Z/2Z modulo 2 onto itself (this could be checked by direct calculations), and that their derivatives modulo 2 vanish at no point of Z/2. The latter also holds, since the derivatives are, respectively, 1 + 4x ≡ 1
(mod 2),
1 + 2x · 1 ≡ 1
(mod 2),
1 + 2x · 1 ≡ 1
(mod 2),
since (x2 OR 1) = 2x · 1 ≡ 1 (mod 2), and (x XOR C)1 ≡ 1 (mod 2), see Example 1.
48
V. Anashin / Non-Archimedean Theory of T-Functions
3. The following closely related variants of the previous mappings of Z/2r onto Z/2r are not bijective for all r = 1, 2, . . .: x → (x + x2 ) mod 2r , x → (x + (x2 AND 1)) mod 2r , x → (x + (x3 OR 1)) mod 2r , since they are T -functions that are not bijective modulo 2. 4. (See [21], also [1, Theorem 1].) Let P (x) = a0 +a1 x+· · ·+ad xd be a polynomial with integral coefficients. Then P (x) is a permutation polynomial modulo 2n (that is, is bijective modulo 2n ), n > 1, if and only if a1 is odd, (a2 + a4 + · · · ) is even, and (a3 + a5 + · · · ) is even. In view of Theorem 3 we need to verify whether the two conditions hold: first, whether P is bijective modulo 2, and second, whether P (z) ≡ 1 (mod 2) for z ∈ {0, 1}. The first condition gives that P (0) = a0 and P (1) = a0 + a1 + a2 + · · · ad must be distinct modulo 2; hence a1 + a2 + · · · ad ≡ 1 (mod 2). The second condition implies that P (0) = a1 ≡ 1 (mod 2), P (1) ≡ a1 +a3 +a5 + · · · ≡ 1 (mod 2). Now combining all this together we get a2 + a3 + · · · ad ≡ 0 (mod 2) and a3 + a5 + · · · ≡ 0 (mod 2), hence a2 + a4 + · · · ≡ 0 (mod 2). 5. As a bonus, we can use exactly the same proof to get exactly the same characterization of bijective modulo 2r (r = 1, 2, . . .) mappings of the form x → P (x) = a0 XORa1 xXOR· · ·XORad xd mod 2r since uXORv is uniformly differentiable modulo 2 as a bivariate function, and its derivative modulo 2 is exactly the same as the derivative of u + v, and besides, u XOR v ≡ u + v (mod 2). Note that formally Theorem 3 can be applied only to the class of all T -functions that are uniformly differentiable modulo 2, which is narrower than the class of all T functions. However, it turns out that if a univariate T -function is not uniformly differentiable modulo 2 then it cannot be measure preserving. Namely, the following proposition holds, which in fact is just a restatement of a corresponding assertion of Theorem 1. Proposition 2 ([4,5]). If a T -function g : Z2 → Z2 preserves measure then it is uniformly differentiable modulo 2 and its derivative modulo 2 is always 1 modulo 2. Now the techniques introduced above could also be applied to characterize ergodic functions and thus to answer a question raised at the beginning of this section: Theorem 4 ([4,5,12]). Let a T -function f : Z2 → Z2 be uniformly differentiable modulo 4. Then f is ergodic if and only if it is transitive modulo 2N2 (f )+2 . Example 5. In [1] there is stated that “. . . the invertibility nor the cycle structure of x + (x2 OR 5) could be determined by his (i.e., mine—V.A.) techniques”. See however how it could be immediately done with the use of Theorem 4: The function f (x) = x + (x2 OR 5) is uniformly differentiable on Z2 , thus, it is uniformly differentiable modulo 4 (see Examples 1 and 2), and N2 (f ) = 3. Now to prove that f is ergodic, in view of Theorem 4 it suffices to demonstrate that f induces a permutation with a single cycle on Z/32Z. Direct calculations show that a string 0, f (0) mod 32, f 2 (0) mod 32 =
V. Anashin / Non-Archimedean Theory of T-Functions
49
f (f (0)) mod 32, . . . , f 31 (0) mod 32 is a permutation of a string 0, 1, 2, . . . , 31, thus ending the proof. Concluding the section, we note that no analog of Theorem 4 exists for multivariate T -functions: Indeed, if an ergodic T -function F : Zn2 → Zn2 is uniformly differentiable modulo 2, then necessarily n = 1, see [12]. However, multivariate ergodic T -functions that are not uniformly differentiable modulo 2 do exist, see [13]. Actually the problem of complete description of ergodic T -functions is solved only in a univariate case (see the next section); it is still open for a multivariate case.
6. Interpolation Series In this section we represent univariate T -functions as interpolation series to examine whether the function is measure-preserving, or ergodic. Contrasting to the techniques of Section 5, the techniques of interpolation series can be applied to arbitrary T -function, and not to a differentiable one. Moreover, with the use of these techniques we obtain a general method to construct measure-preserving (respectively, ergodic) T -function out of a given arbitrary T -function. We start with another (equivalent) characterization of univariate T -functions in terms of interpolation series. It is not difficult to see that every mapping f : N0 → Z2 (or, respectively, f : N0 → Z) admits one and only one representation in the form of so-called Mahler interpolation series
x ai f (x) = , i i=0 ∞
(2)
where xi = x(x − 1) · · · (x − i + 1)/i! for i = 1, 2, . . ., and x0 = 1; ai ∈ Z2 (respectively, ai ∈ Z), i = 0, 1, 2, . . .. This statement can be easily proved directly, substituting successively x = 0, 1, 2, . . . to (2) and solving the corresponding equation with unknown ax . However, if f is uniformly continuous on N0 with respect to the 2-adic distance, it can be uniquely expanded to a uniformly continuous function on Z2 since Z is dense in f converges Z2 . Hence the interpolation series for x uniformly on Z2 . The following is true ∞ (see, e.g., [10]): The series f (x) = i=0 ai i , (ai ∈ Zp , i = 0, 1, 2, . . .) converges uniformly on Z2 if and only if limpi→∞ ai = 0, where lim2 is a limit with respect to the 2-adic distance; hence uniformly convergent series defines a uniformly continuous function on Z2 . The following theorem holds: Theorem 5 ([4,5]). The function f : Z2 → Z2 represented by (2) is a T -function if and only if ai ≡ 0
(mod 2log2 i )
for all i = 2, 3, 4, . . .. (Here and after for a real α we denote α an integral part of α, i.e., the nearest to α rational integer not exceeding α.)
50
V. Anashin / Non-Archimedean Theory of T-Functions
Note that the number log2 i for i = 1, 2, 3, . . . has a “physical meaning”: it is the number of digits in a base-2 representation of i, decreased by 1; that is, a bitlength of i, decreased by 1. So within the context of the paper it is reasonable to assume that log2 0 = 0. Now we can give a general characterization of measure-preserving (resp., ergodic) T -functions: Theorem 6 ([4,5]). A function f : Z2 → Z2 is a measure preserving T -function if and only if it can be represented as
x ci 2log2 i +1 f (x) = c0 + x + i i=1 ∞
(x ∈ Z2 ).
The function f is an ergodic T -function if and only if it can be represented as f (x) = 1 + x +
∞
ci 2
log2 (i+1) +1
i=1
x i
(x ∈ Z2 ),
where c0 , c1 , c2 . . . ∈ Z2 . x Using the identity Δ xi = i−1 , where Δ is a difference operator, Δu(x) = u(x + 1) − u(x), we immediately deduce from Theorems 5 and 6 the following easy method to construct a measure preserving or ergodic T -function out of an arbitrary T -function: Corollary 2 ([12]). Each ergodic (respectively, each measure preserving) T -function f : Z2 → Z2 can be represented as f (x) = 1 + x + 2 · Δg(x) (respectively as f (x) = d + x + 2 · g(x)) for suitable d ∈ Z2 and a T -function g : Z2 → Z2 ; and vice versa. Here are how these techniques work: Example 6. For any odd 2-adic integer a = 1 + 2m, the T -function f (x) = ax + ax is transitive modulo 2n , for all n = 1, 2, . . . Indeed, in view of Theorem 6 the function f is an ergodic T -function f (x) = x since ∞ ∞ x i i x (1 + 2m)x + (1 + 2m) = x + 2mx + i=0 m 2 i = 1 + x + 4m 1 + i=2 mi 2i xi and i ≥ log2 (i + 1) + 1 for all i = 2, 3, 4, . . .. This generator may be of practical value since it uses not more than n + 1 multiplications modulo 2n of n-bit numbers; of course, one should use calls to the look-up table j a2 mod 2n , j = 1, 2, 3, . . . , n−1. The latter table must be precomputed, corresponding calculations involve n − 1 multiplications modulo 2n . Yet more results that can be proved by these techniques, see [4,12,6,7]: • A polynomial with integer coefficients is ergodic if and only if it is transitive modulo 8 (this was originally proved by Larin, see [20], however, by other methods). These T -functions give rise to non-linear congruential generators.
V. Anashin / Non-Archimedean Theory of T-Functions
51
• The T -function F (x) = a0 + b1 · (x XOR a1 ) + b2 · (x XOR a2 ) + · · · is ergodic if and only if it is transitive modulo 4. • The T -function b + b0 · (x AND 1) + b1 · (x AND 2) + b2 · (x AND 22 ) + · · · is ergodic if and only if b ≡ 1 (mod 2), b0 ≡ 1 (mod 4), and bj ≡ 1 (mod 2) for all j = 1, 2, 3, . . .. The equivalent statement reads that the function F (x) = a + a0 · δ0 (x) + a1 · δ1 (x) + · · · is an ergodic T -function if and only if a2 = 1, a0 ≡ 1 (mod 4), and aj 2 = 2−j for j = 1, 2, . . .. Since (1/2j )(x AND 2j ) = δj (x), the j-th bit in the base-2 expansion of x, these T -functions give rise to a class of self-shrinking generators. • For arbitrary polynomials u(x), v(x) ∈ Z2 [x] the entire function F (x) =
v(x) 2 · u(x) + 1
is ergodic if and only if it is transitive modulo 8. These T -functions give rise to a family of inversive generators, the ones based on taking multiplicative inverses modulo 2k . • A polynomial f (x) ∈ Q[x] of degree d with rational (and not necessarily integer!) coefficients is integer-valued (that is, f (Z2 ) ⊂ Z2 )) compatible, and ergodic if and only if f takes integral values at the points 0, 1, . . . , 2log2 (deg f ) +3 − 1, and the mapping z → f (z) mod 2log2 (deg f ) +3 , is compatible and transitive on Z/2log2 d +3 (i.e., modulo the biggest power of 2 not exceeding 8d); i.e., to verify whether all three properties hold simultaneously, one has to make approximately 8d evaluations of f (x). Note that any T -function on n-bit words could be represented by a polynomial of this kind! By the way, the example of a “wild” T -function with a single cycle property mentioned at the very end of Section 2 was constructed with the use of results introduced in the present section.
7. Properties of State Update Sequences In this section we discuss some distribution and structural properties of the sequence Z = x0 , x1 , x2 , . . ., where x1 = f (x0 ), x2 = f (x1 ), . . . , xi+1 = f (xi ) = f i+1 (x0 ), . . . , generated by the ergodic T -function f , that is, by the T -function with a single cycle property on n-bit words for all n = 1, 2, 3, . . .. Actually in cryptology we are more interested in properties of the output sequence of a PRNG since namely this sequence is used for stream encryption. On the one hand, properties of the latter sequence strongly depend on a specific design (and discussion of various designs of stream ciphers based on T -functions is outside the scope of the paper).
52
V. Anashin / Non-Archimedean Theory of T-Functions
However, on the other hand, these properties are highly influenced by the properties of the state update sequence, which we are going to discuss in this section. In view of space/time constraints we discuss only linear complexity of the state update sequence and structural properties of coordinate sequence δj (Z): δj (x0 ), δj (x1 ) = δj (f (x0 )), . . . , δj (xi+1 ) = δj (f (xi )) = δj (f i+1 (x0 )), . . . 7.1. Linear Complexity The sequence Z is the sequence of 2-adic integers, i.e., Z is the sequence over Z2 , which is a commutative ring. However, in computer implementations of PRNG we use the sequence of residues Z mod 2n = x0 mod 2n , x1 mod 2n , . . . modulo 2n of the sequence Z, where n is a bitlength of a processor. The sequence Z mod 2n is a sequence over Z/2n Z, which is also a commutative ring. Definition 3. Let Z = {zi }∞ i=0 be a sequence over a commutative ring R. Let there exist c, c0 , c1 , . . . , cr−1 ∈ R (not all equal to 0) such that for all i = 0, 1, 2, . . . holds c+
r−1
cj · zi+j = 0.
(3)
j=0
The smallest r with this property is called linear complexity λR (Z) of the sequence Z over the ring R. Note that when R is a two-element field GF(2), the latter definition gives us a common definition of a linear complexity of a binary sequence, which the length of the shortest linear feedback shift register (LFSR) that produces the given sequence. The notion of linear complexity over a commutative ring has a “geometrical meaning”: For instance, if R = Z/2n Z; then geometrically equation (3) means that all the points z
i , n 2
zi+1 zi+r−1 , ,..., 2n 2n
i = 0, 1, 2, . . . ,
of a unit r-dimensional Euclidean hypercube fall into parallel hyperplanes. For instance, with the use of linear complexity over the residue ring Z/2n Z we can study distribution of r-tuples of the sequence produced by an ergodic T -function on n-bit words. We already know that this sequence, being considered as the sequence of elements over Z/2n Z is strictly uniformly distributed: Every element from Z/2n Z occurs at the period exactly once. But what about distribution of consecutive pairs of elements? Triples? etc. It varies. . . For example, although every transitive linear congruential generator xi+1 = a+b·xi (mod 2n ) produces a strictly uniformly distributed sequence over Z/2n Z, linear complexity over Z/2n Z of this generator is only 2; hence, distribution of pairs in produced sequences is rather poor: All the points that correspond to pairs of consecutive numbers
53
V. Anashin / Non-Archimedean Theory of T-Functions
Figure 2. Linear congruential generator 3 + 5x.
Figure 4. Generator x+x2 ORC, with C = 101.
Figure 3. Polynomial generator of degree 8.
Figure 5. Same generator, C = 10010000101010111.
with
fall into a small number of parallel straight lines in a unit square, and this picture does not depend on n, see Figure 2. Another example: The already mentioned T -function x + x2 OR C introduced by Klimov and Shamir has a single cycle property whenever C ≡ 5 (mod 8), or C ≡ 7 (mod 8), see [1]. However, distribution of pairs of consecutive terms in the sequence produced by this T -function varies from satisfactory (when there are few 1’s in more significant bit positions, see Figure 4) to poor (when there are more 1’s in these positions, see Figure 5); we consider sequences modulo 217 in both cases. This is not easy to find a T -function that guarantees good distribution of pairs. For instance, this problem is not completely solved even for quadratic ergodic polynomials with integer coefficients (see, e.g., [22,23] and a survey [24]). However, with respect to the linear complexity over residue ring the sequence Z mod 2n over Z/2n Z, generated by a compatible integer-valued ergodic polynomial f (x) ∈ Q[x] (see the very end of Section 6) of degree ≥ 2, is “asymptotically good”; cf.
54
V. Anashin / Non-Archimedean Theory of T-Functions
Figure 3 for distribution of pairs for a corresponding polynomial generator of degree 8. Namely, the following theorem holds: Theorem 7 ([12]). Whenever f ∈ Q[x] is an integer-valued compatible ergodic polynomial, then the linear complexity over the residue ring Z/2n Z of the corresponding sequence Z mod 2n = {f i (x0 ) mod 2n }∞ i=0 grows unboundedly with n, n limn→∞ λZ/2n Z (Z mod 2 ) = ∞. Moreover, the growth rate of λZ/2n Z (Z mod 2n ) is not slower than log n. Actually it is not known today whether log n is a sharp bound in this theorem; the sharp bound is, may be, much better, hopefully about n. Also, for practical purposes it would be highly desirable to find other T -functions f for which the conclusion of Theorem 7 holds, especially these ones that admit simple (and fast!) implementation in software or in hardware. 7.2. Coordinate Sequences An obvious drawback of the sequence produced by an ergodic T -function f is that the less significant is the bit, the shorter is the period of the sequence it outputs: Although the length of the period of the sequence Z mod 2n = {x0 mod 2n , x1 = f (x0 ) mod 2n , x2 = f (x1 ) mod 2n , . . .} of n-bit words is 2n , the length of the period of the j-th bit sequence (of the j-th coordinate sequence) δj (Z) = {δj (x0 ), δj (x1 ), δj (x2 ), . . . , δj (xi+1 ), . . .} is only 2j+1 , (j = 0, 1, . . . , n − 1). The following proposition can be easily proved: Proposition 3. The j-th coordinate sequence δj (Z) = s0 , s1 , . . . is a purely periodic binary sequence, and 2j+1 is the length of its shortest period. The second half of the period is a bitwise negation of the first half, i.e., si+2j ≡ si + 1 (mod 2) for each i = 0, 1, 2, . . .. The linear complexity λGF(2) (δj (Z)) of the j-th coordinate sequence δj (Z) over the field GF(2) is exactly 2j + 1. The proposition means, loosely speaking, that the j-th coordinate sequence is as complex as the first half of its period. So it is important to know what sequences of length 2j could be outputted as the first half of the period of the j-th coordinate sequence; more formally, what values are taken by the rational integer γ = s0 + s1 2 + s2 22 + · · · + j s2j −1 22 −1 , for the j-th coordinate sequence δj (Z) = s0 , s1 , s2 , . . .. In other words, let γj (f, z) ∈ N0 be such a number that its base-2 expansion agrees with the first half of the period of the j th coordinate sequence; i.e., let 2j −1
γj (f, z) = δj (f (z)) + 2 · δj (f (z)) + 4 · δj (f (z)) + · · · + 2 0
1
j
2
· δj f
2j −1
(z) .
Obviously, 0 ≤ γj (f, z) ≤ 22 − 1. The following natural question should be answered: Given an ergodic T -function f : Z2 → Z2 and a 2-adic integer z ∈ Z2 , what infinite
55
V. Anashin / Non-Archimedean Theory of T-Functions
2j
string γ0 = γ0 (f, z), γ1 = γ1 (f, z), γ2 = γ2 (f, z), . . . (where γj ∈ 0, 1, . . . , 2 − 1 for j = 0, 1, 2, . . . ) can be obtained? And the answer is: any one. Namely, the following theorem holds (which, interestingly, was proved by a “purely 2-adic” argument). Theorem 8 ([6,7]). Let Γ = {γj ∈ N0 : j = 0, 1, 2, . . .} be an arbitrary sequence j of non-negative rational integers that satisfy 0 ≤ γj ≤ 22 − 1 for j = 0, 1, 2, . . .. There exists an ergodic T -function f : Z2 → Z2 and a 2-adic integer z ∈ Z2 such that δj (z) = δ0 (γj ), δ0 (f i (z)) ≡ γ0 + i (mod 2), and #
i δj (f i (z)) ≡ δi mod 2j (γj ) + j 2
$ (mod 2)
for all i, j ∈ N. Note 3. The sequence {i/2j mod 2}∞ i=1 is merely a binary sequence of alternating gaps and runs (i.e., blocks of consecutive 0s or 1s, respectively) of length 2j each.
8. Conclusion In the paper, we considered an approach treating T -functions as continuous mappings of the space Z2 of 2-adic integers. Within this approach were obtained important criteria (and sufficient conditions) for invertibility (resp., single cycle property) of T -functions in terms of measure preservation (resp., ergodicity) of corresponding mappings. Also, within this approach were obtained important results on distribution of produced sequences, their structure, etc. Actually the paper treats a pseudorandom number generator based on T -functions as an (autonomous) dynamical system in the phase space Z2 and demonstrates how effectively methods of the non-Archimedean dynamics work being applied to these generators. For demonstration purposes, in the paper we mentioned only results that do not involve too specific p-adic techniques and that can be easily understood on the base of analogies with a real (thus, Archimedean) analysis. That’s why a number of important results were omitted. For instance, we have not mentioned that distribution of k-tuples in sequences produced by T -functions with a single cycle property satisfy Knuth’s criterion of randomness, that coordinate sequences are good not only with respect to linear complexity (cf. Proposition 3), but also with respect to the -error linear complexity and the 2-adic complexity, see [6,7,15]. Also, we have not considered effective remedies of [6,15] to cure the unpleasant “low order bit effect” mentioned in Subsection 7.2. Due to space/time constraints we had to omit an important theme of non-autonomous dynamical systems [6,13,15] that leads to methods of combination of PRNGs into a new one, thus resulting into a flexible stream ciphers which change their recurrence laws during encryption. The latter theory exploits techniques (that is called skew products in ergodic theory, or wreath products in algebra) and thus is a generalization of the theory presented above: Actually, any T -function can be viewed as a specific composition of wreath products. In connection with what was said, we can recommend [14] for further reading.
56
V. Anashin / Non-Archimedean Theory of T-Functions
Finally, we had to omit everything concerning very important class of computer instructions based on operations with flags (e.g., any IF-operator uses flags). Actually, the corresponding mathematical tools are more sophisticated: They are based on noncommutative group theory and involve non-commutative Calculus. The corresponding theory is under development now and will be covered by future publications; some issues of this theory are mentioned in [11].
References [1] A. Klimov and A. Shamir, A new class of invertible mappings, In B.S.Kaliski Jr. et al., editors, Cryptographic Hardware and Embedded Systems 2002, Lect. Notes in Comp. Sci. 2523 (2003), SpringerVerlag, 470–483. [2] S.V. Yablonsky, Basic notions of cybernetics, In Problems of Cybernetics, Fizmatgiz, 1959 (in Russian). [3] Hans Lausch and Wilfried Nöbauer, Algebra of Polynomials, North-Holl. Publ. Co., American Elsevier Publ. Co., 1973. [4] V. Anashin, Uniformly distributed sequences of p-adic integers, Mathematical Notes 55 (1994), 109– 133. [5] V. Anashin, Uniformly distributed sequences over p-adic integers, In A.J. van der Poorten, I. Shparlinski, and H.G. Zimmer, editors, Proc. of International Conf. “Number theoretic and algebraic methods in computer science” (Moscow, June–July 1993), World Scientific, 1995, 1–18. [6] V. Anashin, Pseudorandom number generation by p-adic ergodic transformations, 2004. Available from http://arxiv.org/abs/cs.CR/0401030. [7] V. Anashin, Non-archimedean ergodic theory and pseudorandom generators, The Computer Journal, 2007 (to appear). [8] L. Kotomina, Fast nonlinear congruential generators, Diploma Thesis, Russian State University for the Humanities, Moscow, 1999. [9] N. Koblitz, p-adic Numbers, p-adic Analysis, and Zeta-functions, Springer-Verlag, 1977. [10] K. Mahler, p-adic Numbers and their Functions, Cambridge tracts in Mathematics 76 (1980), Cambridge Univ. Press. [11] V. Anashin, Uniformly distributed sequences in computer algebra, or how to constuct program generators of random numbers, J. Math. Sci. 89 (1998), 1355–1390. [12] V. Anashin, Uniformly distributed sequences of p-adic integers, II, Discrete Math. Appl. 12 (2002), 527–590. Preprint available from http://arXiv.org/abs/math.NT/0209407. [13] V. Anashin, Pseudorandom number generation by p-adic ergodic transformations: An addendum, 2004, Available from http://arxiv.org/abs/cs.CR/0402060. [14] V.S. Anashin, Non-Archimedean Analysis, T -functions, and Cryptography, Lomonosow Moscow State University, International Summer School “Mathematical Methods and Technologies in Computer Science” Lecture Notes edition, 2006. Preprint available from http://arXiv.org/abs/cs.CR/0612038. [15] V.S. Anashin, Wreath products in stream cipher design, In Proc. of the International Security and Counteracting Terrorism Conference (Moscow, 2–3 November, 2005), Lomonosov Moscow State University, NATO-Russia Counsil. Moscow, 2006, 135–161. Preprint available from http://arXiv.org/abs/cs.CR/0602012. [16] L. Kuipers and H. Niederreiter, Uniform Distribution of Sequences, John Wiley & Sons, N.Y. etc., 1974. [17] A. Katok and B. Hasselblatt, Introduction to the Modern Theory of Dynamical Systems, Cambridge University Press, 1998. [18] V. Anashin, Ergodic transformations in the space of p-adic integers, In Andrei Yu. Khrennikov, Zoran Raki´c, and Igor V. Volovich, editors, Proc. of 2nd International Conference “p-adic Mathematical Physics” (Belgrade, Serbia and Montenegro, 15–21 September, 2005), AIP Conference Proceedings 826 (2006), 3–24, Melville, New York, American Institute of Physics. Preprint available from http://arXiv.org/abs/math.DS/0602083. [19] D. Knuth, The Art of Computer Programming, volume 2, Addison-Wesley, Third edition, 1998. [20] M.V. Larin, Transitive polynomial transformations of residue class rings, Discrete Mathematics and Applications 12 (2002), 127–140.
V. Anashin / Non-Archimedean Theory of T-Functions
57
[21] R. Rivest, Permutation polynomials modulo 2w , Finite fields and appl. 7 (2001), 287–292. [22] F. Emmerich, Equidistribution properties of quadratic congruential pseudorandom numbers, J. Comput. Appl. Math. 79 (1997), 207–217. [23] J. Eichenauer-Herrmann, Quadratic congruential pseudorandom numbers: distribution of lagged pairs, J. Comput. Appl. Math. 79 (1997), 75–85. [24] J. Eichenauer-Herrmann, E. Herrmann, and S. Wegenkittl, A survey of quadratic and inversive congruential pseudorandom numbers, Lect. Notes in Statistics 127 (1998), Springer-Verlag, 66–97.
58
Boolean Functions in Cryptology and Information Security B. Preneel and O.A. Logachev (Eds.) IOS Press, 2008 © 2008 IOS Press. All rights reserved. doi:10.3233/978-1-58603-878-6-58
Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited1 Yuri BORISSOV a An BRAEKEN b Svetla NIKOVA c,2 and Bart PRENEEL c a Institute of Mathematics and Informatics, Bulgarian Academy of Sciences, Sofia, Bulgaria b Department Industrial Sciences and Technology, Erasmus Hogeschool Brussel, Brussels, Belgium c Department Electrical Engineering, ESAT/COSIC, Katholieke Universiteit Leuven, Leuven, Belgium and IBBT, Belgium Abstract. Based on classification of Boolean cubic forms of seven variables given by X.D. Hou in 1996, we show how to efficiently classify the cosets of RM(1, 7) in RM(3, 7) under the action of the general affine group AGL(7, 2). At the same time the sizes of the orbits are determined. We discuss also, the correctness of our computations. Keywords. Boolean function, general affine group, Reed–Muller code, affine equivalence class
Introduction The interest in studying the different types of equivalence classes of Boolean functions dates already from 1960s. Its original application was in the design of switching circuits. There exists a huge amount of works on classification with respect to the action of various groups. A thorough survey on the literature is given in the textbook by Logachev, Salnikov and Yashchenko [1]. Let Vn be n-dimensional binary vector space. A Boolean function f in n variables is a mapping from Vn into V1 . We will denote by Fn the set of all Boolean functions in n variables. Let AGL(n, 2) be the group of affine transformations of variables: x → Ax + b, where A is nonsingular n × n binary matrix and b ∈ Vn is an arbitrary vector. We consider linear subspaces of Fn , invariant under the action of AGL(n, 2). For instance, binary polynomials whose degree does not exceed a fixed r ≤ n, constitute such a subspace (the truth tables of all such polynomials form the so-called Reed–Muller code RM(r, n) of order r and length 2n ). 1 This
work was supported in part by the Concerted Research Action (GOA) Ambiorics 2005/11 of the Flemish Government, by the European Commission through the IST Programme under Contract IST-2002507932 ECRYPT and the IAPP–Belgian State–Belgian Science Policy BCRYPT. 2 Corresponding Author: Svetla Nikova, Department Electrical Engineering, ESAT/COSIC, Katholieke Universiteit Leuven, Leuven, Belgium and IBBT, Belgium; E-mail:
[email protected].
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
59
In this paper we are interested in classification of the cosets of the RM(1, n) (first order Reed–Muller code) under the action of the general affine group AGL(n, 2). We will use the terms “affine equivalence class” and “orbit” as synonyms. For small values of n there are several known classifications: In 1972, Berlekamp and Welch [2] classified F5 into 48 affine equivalence classes using algebraic technique. In 1991, Maiorana [3] proved the existence of 150 357 orbits for n = 6 by means of computer search (see also http://www.isrc.qut.edu.au/people/fuller/). In 1995, using group-theoretical technique and computer search, Hou [4](among other things) computed the number of orbits in RM(3, 7)/ RM(1, 7) (namely 179 orbits). However, he has given neither the representatives nor the orbit sizes. In the present paper we are focused on this problem (partially considered in an earlier version [5]). We should also mention that in 1980 J. Denev and V. Tonchev established an asymptotic bound [6]. Their main result states that the number of affine equivalence classes of n the cosets of RM(1, n) is asymptotically equal to 22 −n−1 /| AGL(n, 2)|. This paper is organized as follows. In next section we recall some definitions, facts and formulate the problem. Then we explain our approach to the considered problem for classification of the cosets of RM(1, 7) in RM(3, 7). In fourth section we discuss the correctness of our computations. Finally, we end with some conclusions. All numerical results are present in the Appendix.
1. Definitions and Preliminaries First, for the sake of completeness we give the definitions of Walsh transform, autocor relation function and derivative of a Boolean function. Below stands for the ordinary integer summation, while + is used for the modulo 2 summation or component-wise modulo 2 summation when vectors are involved. A Boolean function f is uniquely determined by its Walsh transform, which is an integer-valued function over Vn that can be defined for all ω ∈ Vn as Wf (ω) =
(−1)f (x)+x·ω = 2n − 2 wt(f + x · ω).
x∈Vn
Here the dot product or scalar product of the vectors x = (x1 , x2 , . . . , xn ) and ω = (ω1 , ω2 , . . . , ωn ) is defined as x · ω = x1 ω1 + x2 ω2 + · · · + xn ωn . The weight of a function f is equal to the number of nonzero positions in the truth table of f and is denoted by wt(f ). We also, recall the definition of the autocorrelation function (or spectrum) of a Boolean function f , which is an integer-valued function over Vn that can be defined for all ω ∈ Vn as rf (ω) =
(−1)f (x)+f (x+ω) .
x∈Vn
Related to the autocorrelation spectrum is the definition of derivative of f with respect to the vector ω ∈ Vn as a Boolean function Dω f (x) = f (x) + f (x + ω).
60
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
Definition. Two cosets of RM(r, n) with representatives f and g, respectively, are called affine equivalent when g(x) = f (Ax + b) + h(x) for some nonsingular A, b and h, where h is a Boolean function of degree ≤ r. In other words two cosets are affine equivalent if they belong to the same orbit under the action of AGL(n, 2) over the quotient space RM(n, n)/ RM(r, n). The general problem we consider in this paper is the following: Problem. Classify the cosets of RM(1, n) under the action of the general affine group AGL(n, 2) i.e., find the number of affine equivalence classes (orbits) and describe a representative for each class. This problem is related to the determination of the weight distribution of the cosets of the RM(1, n) or equivalently, to the approximation of Boolean functions by the affine functions (i.e., the Boolean functions whose degree is ≤ 1). Let us recall the following proposition (see, e.g., [7]). Proposition. The distribution of the absolute values of the Walsh transform is an affine invariant, i.e., for every two affine equivalent functions these distributions are equal. Similarly, every two affine equivalent functions have equal distributions of the absolute values of their autocorrelation spectra. Finally, we recall that the so-called Boolean forms are those functions which are represented by the binary homogenous polynomials.
2. Our Approach In order to overcome the large computational complexity of the problem for classifying RM(3, 7)/ RM(1, 7) we apply two main ideas: • We search for the representatives of different orbits of RM(3, 7)/ RM(1, 7) under the action of AGL(7, 2), starting from representatives of the eleven nontrivial orbits of RM(3, 7)/ RM(2, 7) as described by Hou [8] (independent work on that classification is given in [9]). For each such coset run through all functions which are sum of the representative with a quadratic Boolean form of 7 variables. So, we explore the space of 11 · 221 possibilities, which is feasible computational task. • To distinguish the affine inequivalent cosets of RM(1, 7) we use a special kind of invariant described as follows: For every explored function f compute all its 254 restrictions with respect to hyperplanes of the finite Euclidean geometry EG(7, 2) and determine the affine equivalence classes of RM(3, 6)/ RM(1, 6) to which they belong. The last task involves computation of derivatives with respect to all directions as well as the Walsh and the autocorrelation spectrum of functions in 6 variables. In this way a vector of length 34 (distribution of the classes) is obtained whose components are the frequencies of the classes to which restrictions of f belong. Clearly, this vector is an affine invariant since every hyperplane is
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
61
transformed into hyperplane under the action of an affine transformation. It turns out that this invariant is capable to discriminate the 179 affine inequivalent cosets (see the Appendix). Simultaneously, we count the sizes of the orbits. Note that similar types of invariants are described by Brier and Langevin for the problem of classification of Boolean cubic forms of nine variables [10]. Herein, we describe more formally the algorithm for the problem involved in computation of the basic affine invariant. Namely, if f is a cubic Boolean function in 6 variables, how to determine the class of the coset of RM(1, 6) to which f belongs: Step 1. Determine the class of f in RM(3, 6)/ RM(2, 6): For every ω ∈ V6 \ 0 (a) Compute the derivative Dω f . (b) Determine the class of Dω f in RM(2, 6)/ RM(1, 6) and store it (according to Dickson’s theorem [11] there are four of them). The collected distribution of classes of RM(2, 6)/ RM(1, 6) uniquely determines the class of f in RM(3, 6)/ RM(2, 6) (there exist 6 different distributions of this type) [8]. Step 2. Knowing the class of f in RM(3, 6)/ RM(2, 6), and computing the affine invariants connected with the Walsh and autocorrelation spectrum (see the Proposition), we uniquely determine the class of f in RM(3, 6)/ RM(1, 6). There are 34 such distributions [4].
3. The Correctness of Computations Before stating the next theorem, we will introduce a new notation. For a cubic Boolean form f of n variables and arbitrary ω ∈ Vn , let fω be the binary polynomial obtained from Dω f by deleting all linear terms. Clearly, fω is a quadratic Boolean form. We will need the following modification of a theorem which was for the first time stated by Desaki, Fujiwara and Kasami in [12]. Theorem. (i) Δf = {fω | ω ∈ Vn } is a linear subcode of RM(2, n). (ii) Let the subspace δf of RM(2, n) is defined by RM(2, n) = Δf ⊕ δf . Then δf is invariant under the transformation x → x + a for any a ∈ Vn (⊕ stands for direct sum). (iii) The size of any orbit consisting of affine equivalent cosets of RM(1, n) in f + RM(2, n) is divisible by 2dim Δf . In fact, this theorem could be stated in a more general settings. However, this particular form is sufficient for our goals here. The interested reader is referred to [12] for the proof. Using part (iii), we are able to check our computations. For example, the dimension of Δf4 is 6, and the cardinalities of all 10 cosets with representatives having cubic part f4 are divisible by 64, as can be seen from the Appendix. The proof of part (iii) of the Theorem implies also the possibility for further reduction of computational complexity by a factor of 2dim Δf confining the exploration in the space (f + δf )/ RM(1, n).
62
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
Remark. Independently, this classification problem was considered in the work of Meng Qing-shu et al. [13]. In their paper, however, only the numbers of the orbits of RM(3, 7)/ RM(1, 7) in each of the representatives of the twelve orbits of RM(3, 7)/ RM(2, 7) are given. The results are consistent with ours.
4. Conclusion In the present paper we describe an approach to the problem for classification of the cosets of RM(1, 7) in RM(3, 7) under the action of the group AGL(7, 2). The affine invariant we make use of discriminates the 179 orbits of RM(3, 7)/ RM(1, 7). We count the size of any such orbit as well as we present a representative. Finally, by using a theorem from Coding Theory we are able to check our computations for correctness. This theorem can also be used to reduce the computational complexity of the task and might help the next case n = 8 to be attacked.
Acknowledgements Yuri Borissov wishes to thank the Division of Electronics and Information Engineering at Chonbuk National University, R. of Korea for their hospitality while preparing the final version of this paper.
References [1] O. A. Logachev, A. A. Salnikov, and V. V. Yashchenko, Boolean Functions in Coding Theory and Cryptography, Moscow, 2004 (in Russian). [2] E.R. Berlekamp and L.R. Welch, Weight distribution of the cosets of (32, 6) Reed–Muller code, IEEE Transactions on Information Theory IT-18(1) (1972), 203–207. [3] J. A. Maiorana, A classification of the cosets of the Reed–Muller code R(1, 6), Mathematics of Computation 57(195) (1991), 403-414. [4] X.-D. Hou, AGL(m, 2) acting on RM(r, m)/ RM(s, m), Journal of Algebra 171 (1995), 921–938. [5] A. Braeken, S. Nikova, Y. Borissov, and B. Preneel, Classification of cubic Boolean functions in 7 variables, Proc. of the 26th Symposium on Information Theory in the Benelux 2005, May 19-20, 2005, Brussels, Belgium, 285–292. [6] J. D. Denev and V. D. Tonchev, On the number of equivalence classes of Boolean functions under a transformation group, IEEE Transactions on Information Theory IT-26(5) (1980), 625–626. [7] B. Preneel, Analysis and design of cryptographic hash functions, Ph.D. Thesis, Katholieke Universiteit Leuven, 1993. [8] X.-D. Hou, GL(m, 2) acting on R(r, m)/R(r − 1, m), Discrete Mathematics 149 (1996), 99–122. [9] A.V. Cheremushkin, Methods of affine and linear classification of binary functions, Proc. of the Russian Academy of Sciences. Academy of Cryptography of Russian Federation. Procedings on Discrete Mathematics 4 (2001), 273–314. [10] E. Brier and Ph. Langevin, Classification of Boolean cubic forms of nine variables, IEEE Information Theory Workshop 2003, 179–182. [11] F.J. MacWilliams and N.J.A. Sloane, The Theory of Error-Correcting Codes, Elsevier Science Publishers B.V., 1977. [12] Y. Desaki, T. Fujiwara, and T. Kasami, The weight distributions of extended binary primitive BCH codes of length 128, IEEE Transactions on Information Theory, IT-43(4) (1997), 1364–1371. [13] Meng Qing-shu, Yang min, Zhang Huan-guo, and Liu Yu-zhen, Analysis of affinely equivalent Boolean functions, Cryptology ePrint Archive, Report 2005/025, http://eprint.iacr.org/.
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
63
Table 1. Representatives of RM(3, 7)/ RM(2, 7) together with sizes of orbits Class
Representative
ν(3, 7, f )
f1 f2
0 123
1 11 811
f3 f4 f5 f6 f7
123 + 245 123 + 456 123 + 245 + 346 123 + 145 + 246 + 356 + 456 127 + 347 + 567
2 314 956 45 354 240 59 527 440 21 165 440 1 763 776
123 + 456 + 147 123 + 245 + 346 + 147 123 + 456 + 147 + 257 123 + 145 + 246 + 356 + 456 + 167 123 + 145 + 246 + 356 + 456 + 167 + 247
2 222 357 760 238 109 760 17 778 862 080 444 471 552 13 545 799 680
f8 f9 f10 f11 f12
Appendix Denote by ν(r, n, f ) the number of cosets in the orbit containing f + RM(r − 1, n). The values of ν(3, 7, fi ) for the twelve representatives fi , 1 ≤ i ≤ 12 of RM(3, 7)/ RM(2, 7) are represented in Table 1. The sizes of orbits and the distributions of absolute values of the Walsh and autocorrelation spectra of the 179 affine equivalence classes of RM(3, 7)/ RM(1, 7) can be found in the next table. Table 2. Coset of RM(3, 7) f1
f2
0 12 14 + 23 16 + 25 + 34 0 14
Walsh Transform
Autocorrelation Function
1 2 667 330 708
(0, 127), (128, 1) (0, 124), (64, 4) (0, 112), (32, 16)
1 763 776 8
(0, 64), (16, 64) (0, 120), (32, 7), (96, 1) (0, 118), (32, 8), (64, 2) (0, 112), (32, 16)
(128, 128) (0, 96), (128, 32) (0, 120), (128, 32) (0, 126), (128, 2) (64, 112), (128, 16) (0, 72), (64, 48), (128, 8) (0, 108), (64, 16), (128, 4) (0, 126), (128, 2) (0, 96), (64, 28), (128, 4) (0, 114), (64, 12), (128, 2) (0, 123), (64, 4), (128, 1) (0, 120), (64, 7), (128, 1) (32, 64), (64, 60), (128, 4)
840
24 + 15
11 760
16 + 24 + 34 45
20 160 17 920
45 + 17 + 26
752 640
(0, 64), (16, 64) (0, 96), (16, 28), (48, 2) (0, 88), (16, 32), (32, 8) (0, 64), (16, 64)
47 + 56
917 504
(8, 112), (24, 16)
32
(0, 96), (16, 30), (48, 1), (80, 1)
16 + 45
f3
Number of Cosets ( × ν(7, 3, f ))
0
3 766 320
64
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
Table 2 (continued). Coset of RM(3, 7) 13
320
14
480
16
23 040
26
96
26 + 13
960
26 + 14
1 440
26 + 17
23 040
34 + 13 + 15
f4
Number of Cosets ( × ν(7, 3, f ))
192
Walsh Transform
Autocorrelation Function
(0, 115), (32, 12), (64, 1) (0, 92), (16, 28), (48, 4) (0, 92), (16, 30), (32, 4), (48, 2) (0, 94), (16, 32), (64, 2) (0, 112), (32, 16)
(0, 36), (32, 64), (64, 24), (128, 4) (0, 48), (32, 64), (64, 12), (128, 4) (0, 78), (32, 32), (64, 16), (128, 2) (0, 66), (64, 60), (128, 4) (0, 102), (64, 24), (128, 2) (0, 114), (64, 12), (128, 2) (0, 60), (32, 64), (128, 1) (0, 60), (32, 64), (128, 4) (0, 90), (32, 32), (128, 2) (0, 126), (128, 2) (0, 123), (64, 4), (128, 1) (0, 108), (32, 16), (64, 3), (128, 1) (0, 105), (32, 16), (64, 6), (128, 1) (0, 111), (32, 16), (128, 1) (0, 96), (32, 16), (64, 15), (128, 1) (0, 111), (32, 16), (128, 1) (0, 105), (32, 16), (64, 6), (128, 1) (0, 96), (32, 16), (64, 15), (128, 1) (32, 98), (64, 28), (128, 2) (0, 48), (32, 66), (64, 12), (128, 2)
(0, 88), (16, 32), (32, 8) (0, 88), (16, 32), (32, 8) (0, 112), (32, 16)
34 + 16
69 120
13 + 15 + 26 + 34 34 + 26 + 17
576 69 120
(0, 88), (16, 32), (32, 8) (0, 64), (16, 64) (0, 64), (16, 64)
36 + 17
983 040
(8, 112), (24, 16)
46 + 17
491 520
46 + 35 + 17
184 320
(0, 76), (16, 48), (32, 4) (0, 64), (16, 64)
67
184 320
67 + 13
327 680
67 + 14
491 520
67 + 34 + 14 + 13
196 608
0
64
14
3 136
17
7 168
15 + 24
18 816
24 + 17
150 528
34 + 25 + 16
10 752
34 + 25 + 17
301 056
(8, 120), (24, 4), (40, 4) (0, 64), (16, 64) (0, 76), (16, 48), (32, 4) (8, 120), (24, 4), (40, 4) (0, 64), (8, 49), (24, 14), (72, 1) (0, 64), (8, 49), (24, 12), (40, 2), (56, 1) (0, 48), (8, 56), (16, 14), (24, 8), (48, 2) (0, 64), (8, 46), (24, 15), (40, 3) (0, 44), (8, 56), (16, 16), (24, 8), (32, 4) (0, 64), (8, 42), (24, 21), (40, 1) (0, 32), (8, 56), (16, 32), (24, 8)
(0, 72), (32, 42), (64, 13), (128, 1) (0, 72), (32, 50), (64, 4), (128, 2) (0, 96), (32, 26), (64, 5), (128, 1) (0, 84), (32, 42), (128, 2) (0, 108), (32, 18), (64, 1), (128, 1)
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
Table 2 (continued). Coset of RM(3, 7)
f5
47 + 17
100 352
47 + 25 + 17
131 360
47 + 35 + 26 + 16
602 112
0 12 + 13
448 1 792
15
14 336
17
114 688
12 + 13 + 25 14 + 25 25 + 15 + 16
448 1 344 14 336
25 + 17
344 064
26 + 17
344 064
27
3 584
27 + 13
10 752
27 + 14
10 752
27 + 15
114 688
27 + 16
43 008
35 + 26 + 25 + 12 + 13 + 14 35 + 26 + 25 + 17
64
Walsh Transform
Autocorrelation Function
(0, 38), (8, 60), (16, 24), (24, 2), (32, 2), (40, 2) (0, 38), (8, 56), (16, 24), (24, 8), (32, 2) (0, 32), (8, 56), (16, 32), (24, 8) (0, 91), (16, 32), (32, 4), (64, 1) (0, 92), (16, 30), (32, 4), (48, 2) (0, 90), (16, 31), (32, 6), (48, 1) (8, 116), (24, 10), (40, 2) (0, 112), (32, 16)
(0, 87), (32, 34), (64, 6), (128, 1)
(0, 88), (16, 32), (32, 8) (0, 88), (16, 32), (32, 8) (0, 76), (16, 48), (32, 4) (8, 112), (24, 16) (0, 80), (16, 46), (48, 2) (0, 88), (16, 32), (32, 8) (0, 76), (16, 48), (32, 4) (8, 112), (24, 16) (0, 76), (16, 48), (32, 4) (0, 64), (16, 64)
114 688
(0, 64), (16, 64)
3 584
(0, 64), (16, 64)
43 008
(0, 64), (16, 64)
56 + 17
458 752
(8, 112), (24, 16)
56 + 25 + 17
458 752
(0, 70), (16, 56), (32, 2) (0, 64), (8, 45), (24, 18), (56, 1) (0, 64), (8, 46), (24, 15), (40, 3)
35 + 27 + 13 + 14 35 + 27 + 16
f6
Number of Cosets ( × ν(7, 3, f ))
0 12 + 13
3 584 21 504
(0, 99), (32, 26), (64, 2), (128, 1) (0, 105), (32, 22), (128, 1) (0, 18), (32, 96), (64, 12), (128, 2) (0, 54), (32, 64), (64, 8), (128, 2) (0, 60), (32, 64), (64, 2), (128, 2) (0, 84), (32, 40), (64, 3), (128, 1) (0, 54), (32, 64), (64, 8), (128, 2) (0, 90), (32, 32), (64, 4), (128, 2) (0, 78), (32, 48), (128, 2) (0, 93), (32, 32), (64, 2), (128, 1) (0, 102), (32, 24), (64, 1), (128, 1) (0, 69), (32, 48), (64, 10), (128, 1) (0, 87), (32, 32), (64, 8), (128, 1) (0, 105), (32, 16), (64, 6), (128, 1) (0, 102), (32, 24), (64, 1), (128, 1) (0, 93), (32, 32), (64, 2), (128, 1) (0, 126), (128, 2) (0, 111), (32, 16), (128, 1) (0, 123), (64, 4), (128, 1) (0, 111), (32, 16), (128, 1) (0, 99), (32, 28), (128, 1) (0, 99), (32, 28), (128, 1) (0, 36), (32, 90), (128, 2) (0, 60), (32, 66), (128, 2)
65
66
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
Table 2 (continued). Coset of RM(3, 7) 17
f8
129 024
Walsh Transform
Autocorrelation Function (0, 81), (32, 46), (128, 1)
23 + 14
645 120
23 + 14 + 12
516 096
(0, 32), (8, 60), (16, 32), (24, 2), (40, 2) (0, 64), (8, 42), (24, 21), (40, 1) (0, 38), (8, 56), (16, 24), (24, 8), (32, 2) (0, 32), (8, 56), (16, 32), (24, 8) (8, 126), (56, 1), (72, 1) (0, 90), (16, 31), (32, 6), (48, 1) (8, 120), (24, 4), (40, 4) (0, 76), (16, 48), (32, 4) (8, 112), (24, 16)
23 + 15
483 840
(8, 112), (24, 16)
34+25+23+16+14
368 640
(0, 64), (16, 64)
23 + 15 + 14
f7
Number of Cosets ( × ν(7, 3, f ))
7 680
23 + 16
1 290 240
25 + 17
645 120
0
128
12
43 008
13
40 320
0
128
15
768
17
1 024
15 + 23
3 072
23 + 17
2 048
15 + 24
1 152
25
4 608
25 + 16
9 216
25 + 17
18 432
(0, 37), (8, 64), (16, 24), (32, 2), (64, 1) (0, 38), (8, 64), (16, 22), (32, 2), (48, 2) (0, 48), (8, 55), (16, 16), (24, 7), (40, 1), (56, 1) (0, 48), (8, 52), (16, 16), (24, 10), (40, 2) (0, 60), (8, 50), (24, 13), (32, 4), (40, 1) (0, 34), (8, 64), (16, 24), (32, 6) (0, 36), (8, 64), (16, 23), (32, 4), (48, 1) (0, 34), (8, 64), (16, 24), (32, 6) (0, 48), (8, 52), (16, 16), (24, 10), (40, 2)
(0, 84), (32, 42), (128, 2) (0, 93), (32, 34), (128, 1) (0, 105), (32, 22), (128, 1) (16, 64), (64, 63), (128, 1) (0, 45), (16, 64), (64, 18), (128, 1) (0, 48), (16, 64), (64, 15), (128, 1) (0, 57), (16, 64), (64, 6), (128, 1) (0, 60), (16, 64), (64, 3), (128, 1) (0, 60), (16, 64), (64, 3), (128, 1) (0, 63), (16, 64), (128, 1) (16, 32), (32, 82), (64, 13), (128, 1) (0, 36), (16, 32), (32, 50), (64, 9), (128, 1) (0, 27), (16, 32), (32, 58), (64, 10), (128, 1) (0, 63), (16, 32), (32, 26), (64, 6), (128, 1) (0, 54), (16, 32), (32, 34), (64, 7), (128, 1) (0, 72), (16, 32), (32, 18), (64, 5), (128, 1) (0, 48), (16, 32), (32, 42), (64, 5), (128, 1) (0, 66), (16, 32), (32, 26), (64, 3), (128, 1) (0, 57), (16, 32), (32, 34), (64, 4), (128, 1)
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
Table 2 (continued). Coset of RM(3, 7)
Number of Cosets ( × ν(7, 3, f ))
Walsh Transform
Autocorrelation Function (0, 75), (16, 32), (32, 18), (64, 2), (128, 1) (0, 66), (16, 32), (32, 26), (64, 3), (128, 1) (0, 57), (16, 32), (32, 34), (64, 4), (128, 1) (0, 75), (16, 32), (32, 18), (64, 2), (128, 1) (0, 48), (16, 32), (32, 42), (64, 5), (128, 1) (0, 66), (16, 32), (32, 26), (64, 3), (128, 1) (0, 84), (16, 32), (32, 10), (64, 1), (128, 1) (0, 66), (16, 32), (32, 26), (64, 3), (128, 1) (0, 84), (16, 32), (32, 10), (64, 1), (128, 1) (0, 72), (16, 32), (32, 22), (64, 1), (128, 1) (0, 72), (16, 32), (32, 22), (64, 1), (128, 1) (0, 72), (16, 32), (32, 22), (64, 1), (128, 1) (0, 72), (16, 32), (32, 22), (64, 1), (128, 1) (0, 81), (16, 32), (32, 14), (128, 1) (0, 72), (16, 32), (32, 22), (64, 1), (128, 1) (0, 81), (16, 32), (32, 14), (128, 1) (0, 63), (16, 32), (32, 30), (64, 2), (128, 1) (0, 72), (16, 32), (32, 22), (64, 1), (128, 1)
25 + 23 + 16
18 432
(0, 48), (8, 48), (16, 16), (24, 16)
25 + 23 + 17
18 423
27
24 576
27 + 15
73 728
27 + 23
12 288
27 + 15 + 23
36 684
34 + 25 + 16
4 608
(0, 48), (8, 50), (16, 16), (24, 13), (40, 1) (0, 38), (8, 60), (16, 24), (24, 2), (32, 2), (40, 2) (0, 38), (8, 56), (16, 24), (24, 8), (32, 2) (0, 46), (8, 56), (16, 15), (24, 8), (32, 2), (48, 1) (0, 44), (8, 56), (16, 16), (24, 8), (32, 4) (0, 22), (8, 64), (16, 40), (32, 2)
34 + 27 + 23
12 288
34 + 27 + 23 + 15
36 864
35 + 26
12 288
(0, 48), (8, 48), (16, 16), (24, 16)
35 + 26 + 17
36 864
(0, 28), (8, 64), (16, 32), (32, 4)
35 + 26 + 23 + 17
12 288
(0, 28), (8, 64), (16, 32), (32, 4)
27 + 35
147 456
35 + 27 + 16
147 456
35 + 27 + 34
147 456
35 + 27 + 23 + 16
147 456
57 + 27
147 456
57 + 27 + 16
294 912
(0, 38), (8, 56), (16, 24), (24, 8), (32, 2) (0, 32), (8, 56), (16, 32), (24, 8) (0, 38), (8, 56), (16, 24), (24, 8), (32, 2) (0, 32), (8, 56), (16, 32), (24, 8) (0, 38), (8, 58), (16, 24), (24, 5), (32, 2), (40, 1) (0, 38), (8, 56), (16, 24), (24, 8), (32, 2)
(0, 44), (8, 56), (16, 16), (24, 8), (32, 4) (0, 32), (8, 56), (16, 32), (24, 8)
67
68
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
Table 2 (continued). Coset of RM(3, 7)
f9
f10
Number of Cosets ( × ν(7, 3, f ))
57 + 34 + 27 + 16
147 456
57 + 36 + 27
589 824
Walsh Transform
Autocorrelation Function
(0, 32), (8, 56), (16, 32), (24, 8) (0, 35), (8, 56), (16, 28), (24, 8), (32, 1) (8, 119), (24, 7), (40, 1), (56, 1) (8, 116), (24, 10), (40, 2)
(0, 81), (16, 32), (32, 14), (128, 1) (0, 75), (16, 32), (32, 20), (128, 1)
0
1 024
15
21 504
17
14 336
(0, 78), (16, 47), (32, 2), (48, 1)
23 + 17
14 336
(0, 88), (16, 32), (32, 8)
25 + 16
86 016
(0, 76), (16, 48), (32, 4)
26 + 15
43 008
(8, 112), (24, 16)
27 + 17 + 15
57 344
(8, 112), (24, 16)
35 + 27 + 16 + 15
24 576
(0, 64), (16, 64)
56
229 376
(0, 76), (16, 48), (32, 4)
56 + 17
229 376
(8, 114), (24, 13), (40, 1)
56 + 16 + 15
688 128
(0, 76), (16, 48), (32, 4)
56 + 27 + 15
688 128
(8, 112), (24, 16)
768
(0, 40), (8, 57), (16, 24), (24, 6), (56, 1) (0, 38), (8, 60), (16, 23), (24, 4), (32, 2), (48, 1) (0, 40), (8, 58), (16, 24), (24, 3), (40, 3) (0, 40), (8, 56), (16, 24), (24, 6), (40, 2)
0
13
9 216
15
1 536
16
9 216
(16, 64), (32, 56), (64, 7), (128, 1) (0, 36), (16, 64), (32, 24), (64, 3), (128, 1) (0, 27), (16, 64), (32, 32), (64, 4), (128, 1) (0, 27), (16, 64), (32, 32), (64, 4), (128, 1) (0, 45), (16, 64), (32, 16), (64, 2), (128, 1) (0, 54), (16, 64), (32, 8), (64, 1), (128, 1) (0, 54), (16, 64), (32, 8), (64, 1), (128, 1) (0, 63), (16, 64), (128, 1) (0, 42), (16, 64), (32, 20), (64, 1), (128, 1) (0, 42), (16, 64), (32, 20), (64, 1), (128, 1) (0, 42), (16, 64), (32, 20), (64, 1), (128, 1) (0, 51), (16, 64), (32, 12), (128, 1) (0, 12), (16, 48), (32, 64), (64, 3), (128, 1) (0, 33), (16, 48), (32, 44), (64, 2), (128, 1) (0, 36), (16, 48), (32, 40), (64, 3), (128, 1) (0, 42), (16, 48), (32, 36), (64, 1), (128, 1)
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
Table 2 (continued). Coset of RM(3, 7)
Number of Cosets ( × ν(7, 3, f ))
23 + 14
18 432
15 + 23
9 216
23 + 16
36 864
23 + 16 + 13
18 432
24 + 15
768
24 + 16
9 216
26 + 16
9 216
27 + 17 + 16
18 432
27 + 23 + 17 + 13
512
27 + 23 + 17 + 13
512
27+23+17+16+13
9 216
34 + 16
6 144
34 + 16 + 13
36 864
34 + 17 + 16 + 13
18 432
34+23+17+16+13
36 864
34 + 26 + 23
3 072
34 + 26 + 23 + 14
3 072
34+26+23+17+13
6 144
Walsh Transform
Autocorrelation Function
(0, 46), (8, 54), (16, 16), (24, 9), (32, 2), (40, 1) (0, 36), (8, 60), (16, 24), (24, 4), (32, 4) (0, 36), (8, 60), (16, 24), (24, 4), (32, 4) (0, 46), (8, 52), (16, 16), (24, 12), (32, 2) (0, 40), (8, 54), (16, 24), (24, 9), (40, 1) (0, 40), (8, 52), (16, 24), (24, 12)
(0, 45), (16, 48), (32, 32), (64, 2), (128, 1) (0, 57), (16, 48), (32, 20), (64, 2), (128, 1) (0, 54), (16, 48), (32, 24), (64, 1), (128, 1) (0, 54), (16, 48), (32, 24), (64, 1), (128, 1) (0, 60), (16, 48), (32, 16), (64, 3), (128, 1) (0, 66), (16, 48), (32, 12), (64, 1), (128, 1) (0, 54), (16, 48), (32, 24), (64, 1), (128, 1) (0, 54), (16, 48), (32, 24), (64, 1), (128, 1) (0, 36), (16, 48), (32, 40), (64, 3), (128, 1) (0, 36), (16, 48), (32, 40), (64, 3), (128, 1) (0, 54), (16, 48), (32, 24), (64, 1), (128, 1) (0, 63), (16, 48), (32, 16), (128, 1)
(0, 40), (8, 54), (16, 24), (24, 9), (40, 1) (0, 40), (8, 54), (16, 24), (24, 9), (40, 1) (0, 48), (8, 52), (16, 15), (24, 12), (48, 1) (0, 58), (8, 52), (24, 12), (32, 6) (0, 46), (8, 52), (16, 16), (24, 12), (32, 2) (0, 30), (8, 60), (16, 32), (24, 4), (32, 2) (0, 40), (8, 52), (16, 24), (24, 12) (0, 30), (8, 60), (16, 32), (24, 4), (32, 2) (0, 30), (8, 60), (16, 32), (24, 4), (32, 2) (0, 36), (8, 60), (16, 24), (24, 4), (32, 4) (0, 24), (8, 60), (16, 40), (24, 4) (0, 40), (8, 52), (16, 24), (24, 12)
(0, 63), (16, 48), (32, 16), (128, 1) (0, 63), (16, 48), (32, 16), (128, 1) (0, 63), (16, 48), (32, 16), (128, 1) (0, 51), (16, 48), (32, 28), (128, 1) (0, 75), (16, 48), (32, 4), (128, 1) (0, 63), (16, 48), (32, 16), (128, 1)
69
70
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
Table 2 (continued). Coset of RM(3, 7) 36
98 304
36 + 13
32 768
36 + 15 + 13
98 304
36 + 24 + 15
32 768
37
73 728
37 + 14
73 728
37 + 16
294 912
37 + 25 + 13
6 144
37 + 25 + 13 + 14
18 432
37 + 23 + 15 + 13
18 432
37 + 23 + 16
37 + 25 + 24 + 15 + 14 + 13 37 + 24 + 23 + 16 37 + 36
147 456
6 144
147 456 98 304
37 + 36 + 13
294 912
37 + 36 + 15
294 912
37+36+24+15+13 f11
Number of Cosets ( × ν(7, 3, f ))
0
98 304 6 144
Walsh Transform
Autocorrelation Function
(0, 33), (8, 60), (16, 28), (24, 4), (32, 3) (0, 40), (8, 54), (16, 24), (24, 9), (40, 1) (0, 40), (8, 52), (16, 24), (24, 12) (0, 27), (8, 60), (16, 36), (24, 4), (32, 1) (0, 38), (8, 58), (16, 24), (24, 5), (32, 2), (40, 1) (0, 38), (8, 56), (16, 24), (24, 8), (32, 2) (0, 35), (8, 56), (16, 28), (24, 8), (32, 1) (0, 40), (8, 56), (16, 23), (24, 8), (48, 1) (0, 44), (8, 56), (16, 16), (24, 8), (32, 4) (0, 38), (8, 56), (16, 24), (24, 8), (32, 2) (0, 38), (8, 56), (16, 24), (24, 8), (32, 2) (0, 32), (8, 56), (16, 32), (24, 8)
(0, 57), (16, 48), (32, 22), (128, 1)
(0, 32), (8, 56), (16, 32), (24, 8) (0, 35), (8, 58), (16, 28), (24, 5), (32, 1), (40, 1) (0, 38), (8, 56), (16, 24), (24, 8), (32, 2) (0, 35), (8, 56), (16, 28), (24, 8), (32, 1) (0, 32), (8, 56), (16, 32), (24, 8) (0, 30), (8, 64), (16, 31), (32, 2), (48, 1)
(0, 51), (16, 48), (32, 28), (128, 1) (0, 63), (16, 48), (32, 16), (128, 1) (0, 69), (16, 48), (32, 10), (128, 1) (0, 48), (16, 48), (32, 30), (64, 1), (128, 1) (0, 60), (16, 48), (32, 18), (64, 1), (128, 1) (0, 63), (16, 48), (32, 16), (128, 1) (0, 36), (16, 48), (32, 42), (64, 1), (128, 1) (0, 48), (16, 48), (32, 30), (64, 1), (128, 1) (0, 60), (16, 48), (32, 18), (64, 1), (128, 1) (0, 57), (16, 48), (32, 22), (128, 1) (0, 72), (16, 48), (32, 6), (64, 1), (128, 1) (0, 69), (16, 48), (32, 10), (128, 1) (0, 51), (16, 48), (32, 28), (128, 1) (0, 57), (16, 48), (32, 22), (128, 1) (0, 63), (16, 48), (32, 16), (128, 1) (0, 69), (16, 48), (32, 10), (128, 1) (16, 96), (32, 30), (64, 1), (128, 1)
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
Table 2 (continued). Coset of RM(3, 7)
Walsh Transform
Autocorrelation Function
5 120
(0, 24), (8, 64), (16, 39), (48, 1)
23 + 12
15 360
(0, 34), (8, 64), (16, 24), (32, 6)
23 + 17
61 440
25
30 720
(0, 48), (8, 50), (16, 16), (24, 13), (40, 1) (0, 28), (8, 64), (16, 32), (32, 4)
27
737 280
(0, 12), (16, 96), (32, 18), (64, 1), (128, 1) (0, 12), (16, 96), (32, 18), (64, 1), (128, 1) (0, 12), (16, 96), (32, 18), (64, 1), (128, 1) (0, 24), (16, 96), (32, 6), (64, 1), (128, 1) (0, 21), (16, 96), (32, 10), (128, 1)
27 + 14
245 760
23
34+25+17+16+14
27 + 34
27 + 23 + 24 f12
Number of Cosets ( × ν(7, 3, f ))
10 240
983 040
2 048
0
129 024
12
16 128
16 + 15 + 13
32 256
17 + 15 + 13 + 12
128
23
110 592
23 + 12
258 048
23 + 12 + 13
129 024
23 + 15
387 072
23 + 15 + 13
387 072
(0, 38), (8, 56), (16, 24), (24, 8), (32, 2) (0, 32), (8, 58), (16, 32), (24, 5), (40, 1) (0, 48), (8, 48), (16, 16), (24, 16) (0, 35), (8, 56), (16, 28), (24, 8), (32, 1) (0, 60), (8, 48), (24, 16), (32, 4) (0, 39), (8, 56), (16, 24), (24, 7), (32, 1), (40, 1) (0, 36), (8, 58), (16, 27), (24, 6), (48, 1) (0, 34), (8, 60), (16, 28), (24, 3), (32, 2), (40, 1) (0, 28), (8, 63), (16, 36), (56, 1) (0, 36), (8, 56), (16, 28), (24, 7), (40, 1) (0, 37), (8, 58), (16, 24), (24, 6), (32, 3) (0, 39), (8, 54), (16, 24), (24, 10), (32, 1) (0, 34), (8, 58), (16, 28), (24, 6), (32, 2) (0, 39), (8, 54), (16, 24), (24, 10), (32, 1)
(0, 21), (16, 96), (32, 10), (128, 1) (0, 24), (16, 96), (32, 6), (64, 1), (128, 1) (0, 27), (16, 96), (32, 4), (128, 1) (16, 96), (32, 30), (64, 1), (128, 1) (0, 36), (16, 64), (32, 27), (128, 1) (0, 24), (16, 64), (32, 39), (128, 1) (0, 36), (16, 64), (32, 27), (128, 1) (16, 64), (32, 63), (128, 1) (0, 42), (16, 64), (32, 21), (128, 1) (0, 42), (16, 64), (32, 21), (128, 1) (0, 48), (16, 64), (32, 15), (128, 1) (0, 48), (16, 64), (32, 15), (128, 1) (0, 48), (16, 64), (32, 15), (128, 1)
71
72
Y. Borissov et al. / Classification of the Cosets of RM(1, 7) in RM(3, 7) Revisited
Table 2 (continued). Coset of RM(3, 7)
Number of Cosets ( × ν(7, 3, f ))
23 + 15 + 13 + 12
43 008
25 + 16 + 13
48 384
25+17+15+12+13
8 064
34 + 25 + 12
258 048
34 + 25 + 16 + 12
258 048
34 + 26 + 17 + 15 + 14 + 13 + 12
32 256
Walsh Transform
Autocorrelation Function
(0, 45), (8, 54), (16, 16), (24, 10), (32, 3) (0, 34), (8, 58), (16, 28), (24, 6), (32, 2) (0, 28), (8, 60), (16, 36), (24, 3), (40, 1) (0, 36), (8, 54), (16, 28), (24, 10) (0, 31), (8, 58), (16, 32), (24, 6), (32, 1) (0, 28), (8, 58), (16, 36), (24, 6)
(0, 36), (16, 64), (32, 27), (128, 1) (0, 48), (16, 64), (32, 15), (128, 1) (0, 48), (16, 64), (32, 15), (128, 1) (0, 54), (16, 64), (32, 9), (128, 1) (0, 54), (16, 64), (32, 9), (128, 1) (0, 60), (16, 64), (32, 3), (128, 1)
Boolean Functions in Cryptology and Information Security B. Preneel and O.A. Logachev (Eds.) IOS Press, 2008 © 2008 IOS Press. All rights reserved. doi:10.3233/978-1-58603-878-6-73
73
On Boolean Functions with Generalized Cryptographic Properties1 An BRAEKEN a Ventzislav NIKOV b Svetla NIKOVA c,2 and Bart PRENEEL c a Department Industrial Sciences and Technology, Erasmus Hogeschool Brussel, Brussels, Belgium b Innovation and Development Center Leuven, NXP Semiconductors, Belgium c Department Electrical Engineering, ESAT/COSIC, Katholieke Universiteit Leuven, Leuven, Belgium and IBBT, Belgium Abstract. By considering a new metric, we generalize cryptographic properties of Boolean functions such as resiliency and propagation characteristics. These new definitions result in a better understanding of the properties of Boolean functions and provide a better insight in the space defined by this metric. This approach leads to the construction of “hand-made” Boolean functions, i.e., functions for which the security with respect to some specific monotone sets of inputs is considered, instead of the security with respect to all possible monotone sets with the same cardinality, as in the usual definitions. In this way, we are able to relax some trade-offs between important properties of Boolean functions. We show relations between resilient Boolean functions, linear codes, monotone span programs, and orthogonal arrays in this generalized setting. Keywords. Boolean function, resiliency, propagation characteristic, monotone set
Introduction For any two binary vectors x = (x1 , x2 , . . . , xn ) and y = (y1 , y2 , . . . , yn ) in Fn2 , define the sets δ(x, y) = {i : xi = yi } and sup(x) = {i : xi = 0}. Denote the size of a set A with |A|. Then the Hamming distance between the binary vectors x and y is equal to d(x, y) = |δ(x, y)| and the Hamming weight of x is wt(x) = | sup(x)|. It was noted that δ(x, y) has properties similar to a metric and sup(x) has properties similar to a norm [3,4]. 1 This
work was supported in part by the Concerted Research Action (GOA) Ambiorics 2005/11 of the Flemish Government, by the European Commission through the IST Programme under Contract IST-2002507932 ECRYPT and the IAPP–Belgian State–Belgian Science Policy BCRYPT. The material in this paper was presented in part at the 5th International Conference on Cryptology in India, Indocrypt 2004, Madras, December 20–22, 2004 [1] and in the 11th International Computing and Combinatorics Conference, COCOON 2005, Kunming, August 16–19, 2005 [2]. 2 Corresponding Author: Svetla Nikova, Department Electrical Engineering, ESAT/COSIC, Katholieke Universiteit Leuven, Leuven, Belgium and IBBT, Belgium; E-mail:
[email protected].
74
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
Our goal is to use δ(x, y) instead of the Hamming distance and sup(x) instead of the Hamming weight and to explore the properties of this new space. For this purpose we consider monotone increasing and monotone decreasing sets. A set Δ is called monotone decreasing if for each set in Δ, its subsets belong to Δ. Similarly, a set Γ is said to be monotone increasing if for each set in Γ its supersets belong to Γ. As it has already been shown in [4], this new space with monotone sets can be used to generalize notions such as codes, minimum distance of a code, minimal codewords, generator and parity check matrices of a code, packing and covering, error-correcting capabilities, etc. In addition, monotone sets are widely used in Secret Sharing Schemes (SSS) to describe the sets of players which are allowed (disallowed) to reconstruct a secret. It has been recently pointed out [4] that the security of (verifiable) SSS can be derived from the properties of this space. This paper focuses on Boolean functions. In particular, we generalize the definition of t-resilient functions to functions which are resilient with respect to a monotone decreasing set Δ. Analogously, the parameters for defining the propagation characteristics (PC) of functions are replaced by monotone decreasing sets. Our aim is to provide a new insight to the previous results and to give a better understanding of which structural properties contribute in which way to known results. Moreover, relations between monotone span programs, linear codes, orthogonal arrays, and resilient functions in this generalized setting are shown. Motivation Very often the properties of resiliency and PC imply strong requirements to the rest of the parameters of a Boolean function. This leads to some trade-offs between them, since all relevant properties cannot be satisfied simultaneously. For example, Siegenthaler’s inequality [5] states that d ≤ n−t−1, where d is the algebraic degree, n is the dimension and t is the order of resiliency. By exactly defining which components need to satisfy a certain order of resiliency or PC, we can strengthen the weaker components by using other constructions and achieve in this way an optimal design. By means of example, we present a modified version of the combination generator (see Section 2.6 for concrete examples). Let Δ be the set consisting of all subsets of LFSRs for which the sum of the lengths is shorter than the security parameter for the (fast) correlation attack [6,7,8]. It is known that the feedback polynomials of the combining LFSRs should be primitive with distinct degrees in order to obtain maximum linear complexity [9]. Using t-resilient functions the degrees of LFSRs’ polynomials are uniformly chosen. But considering Δ-resilient functions instead, allows us to choose the degrees non-uniformly as well as to relax the requirements to the rest of the function parameters like nonlinearity, algebraic degree, etc. Using a Δ-resilient function as combiner f , the (fast) correlation attack can be avoided. Moreover, the degree of the function f should be high in order to counter the linear synthesis by Berlekamp–Massey [10]. Note that in this model the trade-off defined by the Siegenthaler’s inequality can be relaxed to another form as shown in Section 2.2. In order to preclude more recent algebraic attacks, one should also require that the function has no low degree multiples [11], but the algebraic immunity is out of scope of this paper.
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
75
The set Δ for defining the resiliency contains again the subsets of LFSRs for which the sum of the lengths is smaller than the security parameter for the (fast) correlation attack. Previous Work The first steps in considering generalizations of classical t-resiliency and functions satisfying PC properties has been made in [12]. The authors extended the properties of resiliency and propagation characteristics with respect to subspaces. So, our definitions can be seen as natural extensions of the definitions by Canteaut et al., instead of subspaces, to collections of subspaces. We also refer to the research on almost resilient functions and functions satisfying almost PC properties [13,14,15]. There, the concept is different and is based on probabilities but it is also introduced for relaxing the parameters and for avoiding (or relaxing) the trade-offs. Recently in [16] quasi-immune Boolean functions were defined. It turns out to be the first example of criterion which is looser than known criteria like correlation-immunity and resiliency. This relaxation is achieved by requiring not the same threshold for all variables. Organization of the Paper The paper is organized as follows. In Sect. 1, we give some background and preliminaries. Sect. 2 deals with Δ-resilient functions. We first investigate the notions algebraic and numerical degree, nonlinearity and divisibility results for the Walsh coefficients. Then different constructions are identified amongst the other we mention the constructions of Siegenthaler, Camion et al., Maiorana–MacFarland, the Direct sum and the Partial-Spread constructions. Next we establish a connection between linear codes, monotone span programs, Δ-resilient functions, and Δ-orthogonal arrays. We also give two concrete examples of Δ-resilient functions that have better trade-off between degree/nonlinearity and resiliency compared with the classical theory. In Sect. 3 we generalize functions which satisfy SAC and PC of some monotone decreasing sets. Then a relation between them and Δ-resilient functions is proven. In this setting we also investigate the question when a function may possess linear structures. Finally we investigate the algebraic degree and show several constructions of PC functions with respect to mononotone decreasing set Δ. The material in this paper has been partially presented in [1] and [2].
1. Background Define the set P = {1, . . . , n} and denote the power set of P by P (P). The set Γ (Γ ⊆ P (P)) is called monotone increasing if for each set A in Γ, each set containing A is also in Γ. Similarly, the set Δ (Δ ⊆ P (P)) is called monotone decreasing, if for each set B in Δ each subset of B is also in Δ. A monotone increasing set Γ can be described efficiently by the set Γ− consisting of the minimal elements (sets) in Γ, i.e., the elements in Γ for which no proper subset is also in Γ. Similarly, the set Δ+ consists of the maximal elements (sets) in Δ, i.e., the elements in Δ for which no proper superset is also in Δ.
76
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
We set Γ = Δc (Δc = P (P) \ Δ). Note that Γ is monotone increasing if and only if Δ is monotone decreasing. The dual sets Δ⊥ and Γ⊥ to Γ and Δ, respectively, are defined by Γ⊥ = {A : Ac ∈ Δ} and Δ⊥ = {A : Ac ∈ Γ}. It is easy to see that Δ⊥ is monotone decreasing and Γ⊥ is monotone increasing. For two monotone decreasing sets Δ1 and Δ2 define Δ1 Δ2 = {A = A1 ∪ A2 : A1 ∈ Δ1 , A2 ∈ Δ2 }. Note that Δ1 Δ2 is again a monotone decreasing set. As it has been pointed out in [3,4], δ(x, y) has similar properties as a metric and sup(x) has similar properties as a norm. Notice that sup(x) and δ(x, y) = sup(x − y) are subsets of P and that P is partially ordered (i.e., x y if and only if sup(x) ⊆ sup(y)). For a vector u ∈ Fn2 , let u = u ⊕ 1 (where 1 denotes the all-1 vector), i.e., sup(u) = sup(u)c . The dot product w · x is equal to the component-wise inner product. For an element A ∈ Δ \ {0}, the subspace defined by A is given by UA = {u : sup(u) ⊆ A}. The dual UA⊥ of the subspace UA is the subspace consisting of the elements x such that x · y = 0 for all y ∈ UA . Consequently, UA⊥ is defined by Ac , i.e., UA⊥ = UAc = {u : sup(u) ⊆ Ac }. Let f (x) = f (x1 , . . . , xn ) be a Boolean function on Fn2 . The Walsh transform Wf of a Boolean function f (x) plays an important role in our work. It is a real-valued function, which is defined as follows Wf (w) = (−1)f (x)+w·x . x∈Fn 2
A function with equally distributed outputs is called a balanced function. It is clear that for balanced functions Wf (0) = 0. A Boolean function f (x) on Fn2 is said to be a plateaued function [17,18] if its Walsh transform Wf takes only three values 0 and ±λ, where λ is a positive integer, called the amplitude of the plateaued function. The nonlinearity Nf of a Boolean function f , which is defined by the minimum distance of the function to the set of affine functions A, i.e., Nf = ming∈A d(f, g), can be expressed using its Walsh transform as follows: Nf = 2n−1 − (1/2) maxw∈Fn2 |Wf (w)|. Other representations of a Boolean function f (x) are the algebraic normal form (ANF) %
f (x) =
au xu ,
au ∈ F2 ,
λu xu ,
λu ∈ C.
u∈Fn 2
and the numerical normal form (NNF)
f (x) =
u∈Fn 2
The degree of the ANF is called the algebraic degree or shortly degree (denoted by deg(f )), the degree of the NNF is called the numerical degree of the Boolean function. The autocorrelation rf of a Boolean function f on Fn2 is a real-valued transformation, defined by −n
rf (u) = 2
x∈Fn 2
(−1)f (x)+f (x+u) .
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
77
We will also need an important property of the sum of characters (see e.g., [19, p. 263]). Lemma 1. For any subspace V ⊆ Fn2 , we have x∈V
(−1)
w·x
=
|V | if w ∈ V ⊥ ; 0 otherwise.
(1)
2. Δ-Resilient Functions 2.1. Definition and Relation with the Classical Definition of Resiliency In this section we generalize the definitions of resilient and correlation-immune (CI) functions with respect to a monotone decreasing set Δ. We assume that the set Δ is the maximal possible monotone decreasing set for which the function satisfies the corresponding property. The monotone increasing set Γ corresponding with Δ is defined by Γ = Δc . Definition 1. Let f (x) = f (x1 , . . . , xn ) be a Boolean function on Fn2 and Δ be a monotone decreasing set. Then f (x) is called Δ-resilient iff f (x)⊕w ·x is a balanced function for all w such that sup(w) ∈ Δ. Furthermore, f (x) is called Δ-CI iff f (x) ⊕ w · x is a balanced function for all w such that sup(w) ∈ Δ \ {∅}. When Δ = {A : |A| ≤ t} the definitions of Δ-resilient function and t-resilient function, (resp. Δ-CI function and t-CI function) coincide. The property balancedness of f (x) ⊕ w · x can be translated in terms of Walsh spectrum into Wf (w) = 0. Denote the set of vectors which have zero Walsh value by ZWf , then Δ ⊆ {sup(u) : u ∈ ZWf }. Note that ZWf ∩ Γ is not necessarily empty. We stress here that Δ is a collection of subspaces, i.e., it is not necessarily a subspace itself. Example 1. Consider the sets Δ+ and Γ− in the set F42 : Δ+ = {{1, 2}, {3, 4}} and Γ− = {{1, 4}, {2, 4}, {1, 3}, {2, 3}}. It is easy to verify that Γ = Δc and Γ ∩ Δ = ∅. A function which is Δ-resilient has zero Walsh coefficients for the inputs w, where sup(w) ∈ {∅, {1}, {2}, {3}, {4}, {1, 2}, {3, 4}}, i.e., for the vectors w ∈ {(0, 0, 0, 0), (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1), (1, 1, 0, 0), (0, 0, 1, 1)}. Next we establish the relationship with the classical definition of resiliency. For the monotone sets Γ and Δ define the parameters t1 = min{|A| : A ∈ Γ− } and
t2 = max{|A| : A ∈ Δ+ }.
From the definition of t1 and the fact that Γ is a monotone increasing set, each subset of size t1 −1 belongs to Δ, which implies that a Δ-resilient function is also (t1 −1)-resilient. Analogously, a Δ-CI function is (t1 − 1)-CI. The parameter t2 defines the maximum dimension of a subspace in which the Δ-resilient function is resilient. The following theorem shows a necessary and sufficient condition for Δ-resilient functions concerning its balancedness properties on affine subspaces.
78
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
Theorem 1. A Boolean function f on Fn2 is Δ-resilient if and only if f is balanced when restricted to any of the affine subspaces a + UA , where A ∈ Δ⊥ and a ∈ Fn2 . Proof. It suffices to show that a Boolean function f on Fn2 is resilient on the subspace V if and only if f is balanced on the affine subspaces a + V ⊥ , for all a ∈ Fn2 . Assume f is resilient on the subspace V , or equivalently Wf (v) = 0 for all v ∈ V . Now, for all a ∈ Fn2 using Eq. (1) the following equations are equivalent:
(−1)a·v Wf (v) = 0
v∈V
(−1)a·v
x∈a+V ⊥
(−1)f (x)
(−1)f (x)+v·x = 0
x∈Fn 2
v∈V
(−1)(a+x)·v +
v∈V
|V |
(−1)f (x)
⊥ x∈a+V /
(−1)(a+x)·v = 0
v∈V
(−1)f (x) = 0.
x∈a+V ⊥
The proof of the converse part of the theorem follows from the equivalence of the above equations. Remark 1. From the definition of resiliency, we deduce that if at most t components of a t-resilient function are fixed (this defines a subspace V of dimension n − t), the output is balanced. The previous theorem generalizes this property by proving that the function is also balanced on all affine subspaces of V ⊥ . Example 2. A possible truth table of the Δ-resilient function defined by Example 1 is given by the vector (0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0). This function is exactly 1resilient. Moreover the function is resilient with respect to two subspaces of dimension 2 whose basis is given by e1 , e2 ! and e3 , e4 !, where ei is the all zero vector except for position i. One can check that the conditions of Theorem 1 are satisfied. 2.2. Algebraic and Numerical Degree Theorem 2. For a Δ-resilient function f on Fn2 all ANF coefficients au of f with sup(u) ∈ Γ⊥ and wt(u) > 1 are equal to zero. If sup(u) ∈ Γ⊥ and wt(u) = 1 then au = 1. Proof. The Siegenthaler’s inequality deg(f ) ≤ n − t − 1 for t-resilient functions on Fn2 relies on the observation that the coefficient au of the term xu in the ANF of f satisfies the following relation [20] au = 2wt(u)−1 − 2− wt(u)−1
Wf (w) mod 2.
(2)
wu
Consider now u with sup(u) ∈ Γ⊥ : then sup(u) ∈ Δ and hence sup(w) ⊆ sup(u) ∈ Δ for all w u. By definition of Δ-resilient functions Wf (w) = 0 for sup(w) ∈ Δ. Therefore au = 0 for all u such that sup(u) ∈ Γ⊥ and wt(u) > 1, but when
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
79
sup(u) ∈ Γ⊥ and wt(u) = 1 we obtain au = 1. Note that this is a generalization of the Siegenthaler’s inequality for t-resilient functions since if Δ = {A : |A| ≤ t} we have Γ⊥ = {B : |B| ≥ n − t}. Remark 2. For a Δ-CI function f on Fn2 all coefficients au from the ANF of f with sup(u) ∈ Γ⊥ , wt(u) > 1 and Wf (0) = 2n ± 2n−wt(u)−1 are equal to zero. If sup(u) ∈ Γ⊥ , wt(u) = 1 and Wf (0) = 2n − 2n−2 then au = 1. The proof for Δ-CI functions is analogous to the previous proof. This result generalizes the Siegenthaler’s inequality for t-CI functions of degree d, i.e., t ≤ n − d. Remark 3. Notice that because of the factor mod 2 in (2) the coefficient au is 1 for u such that sup(u) ⊆ [Δ⊥ ]+ and Wf (u) = ±2n−wt(u)+1 . The maximum weight of such u defines the normal algebraic degree of the Boolean function. Knowledge of the coefficients of the ANF of f enables us to derive bounds (upper and lower) on the nonlinearity as shown in [21, Theorem 18 and Theorem 30]. We now generalize the definition of degree to this new setting. Definition 2. Define a monotone decreasing set Deg = {A : A ⊆ sup(u), au = 0}. We call the set Deg+ the “degree-set” of f . Remark 4. The “degree-set” of f satisfies the following relation: Deg ⊆ Δ⊥ ∪ {A : A ∈ Γ⊥ , |A| = 1} Moreover, the equality does not always hold; it is even possible that Deg+ ∩[Δ⊥ ]+ = ∅. Example 3. Applying Theorem 2 to the function of Example 1, we obtain that all coefficients au for u such that sup(u) ∈ Γ⊥ are zero, which gives additional information compared to the Siegenthaler’s inequality. Note that [Γ⊥ ]− = {{3, 4}, {1, 2}} and [Δ⊥ ]+ = {{2, 4}, {2, 3}, {1, 4}, {1, 3}}. Because the ANF of f is given by x1 x3 ⊕ x1 x4 ⊕ x2 x3 ⊕ x2 x4 ⊕ x1 ⊕ x3 , the equality Deg+ = [Δ⊥ ]+ holds in this example. Theorem 3. For a Δ-resilient function f (x) on Fn2 all coefficients λu from NNF of g(x) = f (x) ⊕ x1 ⊕ · · · ⊕ xn with sup(u) ∈ Γ⊥ are equal to zero. Moreover, all coefficients λu from NNF of g with sup(u) ∈ [Δ⊥ ]+ are non-zero. Proof. In [22] the authors characterize a t-resilient function f by the numerical degree of the function g(x) = f (x) ⊕ x1 ⊕ · · · ⊕ xn . Analogous to the Siegenthaler’s inequality the numerical degree of function g(x) is less than or equal to n − t − 1. The proof uses the connection between Walsh coefficients, i.e., Wf (w) = Wg (w) and the observation that the coefficient λu of the term xu in the NNF of g satisfies the following relation λu = 2−n (−2)wt(u)−1
Wg (w).
(3)
uw
Consider now u with sup(u) ∈ Γ⊥ : then sup(u) ∈ Δ and hence sup(v) ⊆ sup(u) ∈ Δ for all v u. By rewriting (3) into
80
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
λu = 2−n (−2)n−wt(u)−1
Wf (v)
(4)
vu
and by using the definition of Δ-resilient functions, we obtain that λu = 0 for all u such that sup(u) ∈ Γ⊥ . Note that there is one-to-one mapping between the coefficients λu equal to zero and the resiliency (see (4)). Namely let f be Δ-resilient and assume that there exists a zero coefficient λu from the NNF of g with sup(u) ∈ [Δ⊥ ]+ then f is (Δ ∪ sup(u))-resilient. As a consequence, the numerical degree of the function is equal to max{|A| : A ∈ [Δ⊥ ]+ }. Remark 5. From the previous proof, it is easy to derive that for Δ-CI functions f the coefficients λu of the NNF of g are nonzero if sup(u) ∈ Γ⊥ and also if sup(u) ∈ [Δ⊥ ]+ when Wf (0) = −Wf (u). 2.3. Nonlinearity In this section we improve the divisibility results on the Walsh coefficients of resilient functions which leads to an upper bound on the nonlinearity. Let fv be the (n − wt(v))variable function formed from f for which xj = 0 if vj = 1. The divisibility result by Sarkar and Maitra [23] can be generalized in the following way: Theorem 4. Let f be a Δ-resilient function on Fn2 . Then the Walsh coefficients of f satisfy the following divisibility conditions: Wf (v) ≡ 0 (mod 2t3 (v)+1 ), where sup(v) ∈ Γ and t3 (v) = min{wt(w) : w v, sup(w) ∈ Γ− }. Proof. In [24] the following relation has been proven:
Wf (u) = 2wt(v) Wfv (0) = 2n − 2wt(v)+1 wt(fv ).
(5)
uv
Choose v ∈ Γ− , hence for any u v we have u ∈ Δ thus Wf (u) = 0. Then the relation (5) reduces to Wf (v) = 2n − 2wt(v)+1 wt(fv ), which proves the result for v ∈ Γ− because wt(v) = t3 (v). We will not consider the trivial case when Γ− = {P}. We proceed further by induction on the weight of v. Let v∈ Γ \ Γ− . Then from relation (5) we have Wf (v) = 2n − 2wt(v)+1 wt(fv ) − uv Wf (u). By the hypothesis Wf (u) ≡ 0 (mod 2t3 (u)+1 ) for any u v and u ∈ Γ. Because t3 (v) is increasing for decreasing weight of v, it follows that t3 (u) > t3 (v) for all u v, u ∈ Γ, which completes the induction step and the proof. Remark 6. Note that t3 (v) ≥ t1 = t + 1 for v with sup(v) ∈ Γ, therefore we have a stronger result comparing to the divisibility of 2t+2 proven in [23] for t-resilient functions, since some of the coefficients are divisible by a higher power of 2. Now we extend the result of Carlet and Sarkar in [24], namely Wf (v) ≡ 0 (mod 2t+2+(n−t−2)/ deg(f ) ).
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
81
Theorem 5. Let f be a Δ-resilient function on Fn2 . Then the Walsh coefficients of f satisfy the following divisibility conditions: Wf (v) ≡ 0 (mod 2t3 (v)+1+(n−t3 (v)−1)/t4 (v) ), where sup(v) ∈ Γ and with parameters t3 (v) (as defined in Theorem 4) and t4 (v) = max{|A| : A ∈ Deg+ , A ⊆ sup(u) with u v, sup(u) ∈ Γ− }. Proof. Let f be a Δ-resilient function. If sup(v) ∈ Γ− , then for any u v we have u ∈ Δ thus Wf (u) = 0. Hence (5) reduces to Wf (v) = 2n − 2wt(v)+1 wt(fv ). Applying McEliece’s [25] theorem for cyclic codes on fv we obtain that wt(fv ) ≡ 0 (mod 2(n−t3 (v)−1)/t4 (v) ), since t3 (v) = wt(v) and t4 (v) = deg(fv ). This proves the result for v with sup(v) ∈ Γ− . Let sup(v) ∈ Γ \ Γ− . By the hypothesis Wf (u) ≡ 0 (mod 2t3 (u)+1+(n−t3 (u)−1)/t4 (u) ) for any u v and sup(u) ∈ Γ. Since t4 (u) is increasing with respect to wt(u) we obtain that Wf (u) ≡ 0 (mod 2t3 (u)+1+(n−t3 (u)−1)/t4 (v) ) for any u v and sup(u) ∈ Γ. Note that by Remark 4 the degree offv is less or equal to t4 (v). Rewrite (5) in the form Wf (v) = 2n − 2wt(v)+1 wt(fv ) − uv Wf (u). To conclude the proof note that t3 (u) is decreasing with respect to wt(u) and that t4 (v) ≥ deg(fv ). Remark 7. The parameters t3 (v) and t4 (v) satisfy an inequality similar to the Siegenthaler’s inequality: t3 (v) + t4 (v) ≤ n. Thus Theorem 5 improves the result from Theorem 4 when t3 (v) and/or t4 (v) are smaller. Example 4. Consider again the function of Example 1. By definition of Γ− and Deg+ (see Example 3), the parameters t3 (v) = 2 and t4 (v) = 1 for all v ∈ Γ. Consequently, the Walsh values of the function are divisible by 8. The divisibility results of the Walsh coefficients for Δ-resilient functions result in bounds on the nonlinearity of these functions. Since the proof is similar to the one of [24], we only state the theorem. Theorem 6. Let f be a Δ-resilient function on Fn2 . Denote L1 = max {t3 (v) + 1 + (n − t3 (v) − 1)/t4 (v)}, sup(v)∈Γ
L2 =
min {t3 (v) + 1 + (n − t3 (v) − 1)/t4 (v)}
sup(v)∈Γ
and let nlmax(n) be the maximum possible nonlinearity for n-variable functions. Then 1. If n is even and L1 > n/2 − 1, then Nf ≤ 2n−1 − 2L1 .
82
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
2. If n is even and L1 ≤ n/2 − 1, then Nf ≤ 2n−1 − 2n/2−1 − 2L2 . 3. If n is odd and 2n−1 − 2L1 ≤ nlmax(n), then Nf ≤ 2n−1 − 2L1 . 4. If n is odd and 2n−1 − 2L1 > nlmax(n), then Nf is less than or equal to the highest multiple of 2L2 which is not greater than nlmax(n). 2.4. Constructions of Δ-Resilient Functions Lemma 2. If f is a Δ-resilient function on Fn2 , then g(x) = f (x) ⊕ 1 and h(x) = f (x1 ⊕ c1 , . . . , xn ⊕ cn ) where c ∈ Fn2 are Δ-resilient. Proof. The theorem follows immediately from the definition of Δ-resiliency and the fact that Wf (w) = Wh (w) = −Wg (w) for all w ∈ Fn2 . 2.4.1. The Constructions of Siegenthaler and Camion et al. Theorem 7. Let f1 and f2 be two Δ-resilient functions on Fn2 . The function f on Fn+1 2 defined by f (x1 , . . . , xn+1 ) = xn+1 f1 (x1 , . . . , xn ) ⊕ (1 ⊕ xn+1 )f2 (x1 , . . . , xn ) = Δ P ({n + 1}). Furthermore, if w ∈ Γ and for any u w is Δ-resilient, where Δ =Δ ∪ P (sup(w)). it holds that Wf1 (u) + Wf2 (u) = 0 then f is Δ-resilient, where Δ Proof. Let λ = (λ1 , . . . , λn ) and λ = λ, λn+1 . The Walsh coefficients of f satisfy the following relation: λn+1 . Wf1 λ Wf (λ) = Wf2 λ + (−1)
(6)
∈ Δ. Since f1 and f2 are Δ-resilient functions If λ satisfies sup(λ) ∈ Δ, then sup λ it follows (from (6)) that Wf (λ) = 0. we have the following two cases: If λ satisfies sup(λ) ∈ Δ • sup(λ) ∈ Δ P ({n + 1}), for which it is already proven that Wf (λ) = 0. • sup(λ) ∈ P (sup(w)) for some w ∈ Γ. We have now that λn+1 = 0 and thus Wf (λ) = Wf1 (λ) + Wf2 (λ) = 0 since λ w. Remark 8. We extend Siegenthaler’s result [5] that states “if f1 and f2 are t-resilient then f is t-resilient” by showing that if f1 and f2 are Δ-resilient, then f is Δ-resilient. Similarly, we generalize the result of Camion et al. [26] which states “if also for all v such that wt(v) = t + 1 holds that Wf1 (v) + Wf2 (v) = 0, f is (t + 1)-resilient”, because we show that if f1 and f2 are Δ-resilient then f is Δ-resilient. The following corollary can be derived. Corollary 1. Let f (x) = w · x be a linear function on Fn2 and wt(w) = d, i.e., without lost of generality we can suppose that f (x) = x1 ⊕ . . . ⊕ xd . Then f (x) is &d i=1 P ({1, . . . , n} \ {i}) -resilient function.
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
Proof. Note that Δ =
&
d i=1
83
P ({1, . . . , n} \ {i}) could be rewritten as Δ = P ({d +
1, . . . , n}) {A : A ⊂ {1, . . . , d}}. It is easy to see now that {1, . . . , d} ∈ / Δ and hence f is (d − 1)-resilient. Also in accordance with Theorem 2 we have {i} ∈ Γ⊥ for i = 1, . . . , d. 2.4.2. Direct Sum and Secondary Constructions Theorem 8. Let f1 be a Δ1 -resilient function on Fn2 1 and f2 be a Δ2 -resilient function on Fn2 2 then the direct sum f : Fn2 1 × Fn2 2 : (x, y) → f (x, y) = f1 (x) ⊕ f2 (y) is a Δ = Δ1 Δ2 S -resilient function on Fn2 1 +n2 where S = {∅, {1}, · · · , {n1 }, {n1 + 1}, · · · , {n2 + n1 }}. Proof. For λ = (λ1 , λ2 ), where λ1 ∈ Fn2 1 and λ2 ∈ Fn2 2 , the Walsh coefficient equals to at least one Wf (λ1 , λ2 ) = Wf1 (λ1 )Wf2 (λ2 ). For each λ = (λ1 , λ2 ) with sup(λ) ∈ Δ, of λi satisfies sup(λi ) ∈ Δi , since all elements of S have weight maximum one. Remark 9. The classical theorem says that for the direct sum of a t1 -resilient function and t2 -resilient function yields a (t1 + t2 + 1)-resilient function [27], which is reflected here by the set Δ. The following lemma shows how to construct new Δ -resilient functions from a given Δ-resilient function where Δ ⊆ Δ. This theorem is an extension of Theorem 3 from [28]. Lemma 3. Consider a Boolean function f on Fn2 which is Δ-resilient. If there exists a subspace W and a subset Δ ⊆ Δ such that UA ∩ W = ∅ for all A ∈ Δ and the restriction of f to W ⊥ is equal to the constant c, then the function f obtained from f by replacing the constant c by the constant c ⊕ 1 for all elements of W ⊥ is Δ -resilient. Proof. Recall that by equation (1) for v ∈ UA we have x∈W ⊥ (−1)1+v·x = 0. Thus the Walsh value of v ∈ UA can be computed as follows: Wf (v) = (−1)f (x)+v·x x∈Fn 2
=
x∈W ⊥
=
(−1)f (x)+v·x +
(−1)f (x)+v·x
x∈W / ⊥
(−1)f (x)+v·x
x∈W / ⊥
=
(−1)f
(x)+v·x
x∈W / ⊥
=
(−1)f
x∈W ⊥
= Wf (v).
(x)+v·x
+
x∈W / ⊥
(−1)f
(x)+v·x
84
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
The following construction is a generalization of the change of basis construction. Lemma 4. Let Δ be a set containing less than n elements. Then any Boolean function f on Fn2 which has at least n linearly independent vectors w ∈ Fn2 such that Wf (w) = 0 can be transformed into a Δ-resilient function. Proof. For a nonsingular matrix D, it holds that g(x) = f (D−1 x) if and only if Wg (w) = Wf (Dw). Taking n linearly independent vectors which have zero Walsh value as rows of D, leads to the construction of a Δ-resilient function. 2.4.3. The Maiorana–MacFarland and Partial-Spread Constructions Theorem 9. Let φ be a function from Fn−r into Fr2 and let g be an arbitrary Boolean 2 , then the function f defined by function on Fn−r 2 Fr2 × Fn−r → F2 : (x, y) → f (x, y) = x · φ(y) ⊕ g(y) 2 is Δ-resilient with Δ = {A : ∃ y ∈ F2n−r such that sup(φ(y)) ⊆ A}c . Moreover, if φ is injective (resp. takes each value exactly 2 times), the function is plateaued with amplitude 2r (resp. 2r+1 ). Proof. Calculate the Walsh spectrum of the function (see [28]) (−1)x·φ(y)+g(y)+x·u+y·v = 2r Wf (u, v) = x∈Fr2 , y∈F2n−r
(−1)g(y)+y·v ,
y∈φ−1 (u)
where u ∈ Fr2 and v ∈ F2n−r . As a consequence, Wf (u, v) = 0 if there exists no y such that φ(y) = u. Remark 10. This construction always leads to P ({r + 1, . . . , n}) ⊆ Δ because φ is a into Fr2 . It is clear that the higher the weight of the elements in the mapping from Fn−r 2 image of φ are, the higher the values t2 and |Δ| are. In [28], Carlet showed how to construct resilient functions using the construction of bent functions in the class PS ap (a subclass of the Partial-Spreads class introduced in [29]). We generalize this construction for Δ-resilient functions. In this construction, the field Fn2 is identified with the field F2n . The isomorphism can be chosen such that the dot product is equal to TrF2n (xy), where TrF2n is the trace map from F2n to F2 . The notion of resiliency depends on the choice of the dot product on F2n . For aneven characteristic, there exists a dual basis {α1 , . . . , αn } n such that TrF2n (xy) = i=1 xi yi = x · y. Recall that for each linear mapping φ : F2n → F2m there exists a mapping φ∗ : F2m → F2n (called the adjoint) such that for every x ∈ F2m , y ∈ F2n one has that TrF2m (xφ(y)) = TrF2n (yφ∗ (x)) or in other words x · φ(y) = y · φ∗ (x). Theorem 10. Let g be a Boolean function on F2m , φ a linear mapping from F2n into F2m and a ∈ F2m such that a + φ(y) = 0 for all y ∈ F2n . Then the Boolean function f which is defined by
x F2m × F2n → F2 : (x, y) → f (x, y) = g + b · y, a + φ(y)
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
85
with b ∈ F2n is Δ-resilient with Δ = {A : ∃ z ∈ F2m such that sup(φ∗ (z) + b) ⊆ A}c . Proof. We refer to [28] for the computation of the Walsh transform for f in (u, v) ∈ F2m × F2n : (−1)g(z)+(b+v)·y+z(a+φ(y))·u Wf (u, v) = z∈F2m , y∈F2n
=
∗
(−1)g(z)+(b+v)·y+(za)·u+φ
z∈F2m , y∈F2n
=
z∈F2m
= 2n
(−1)g(z)+(za)·u
(uz)·y
∗
(−1)(b+v+φ
(uz))·y
y∈F2n
(−1)g(z)+u·(az) .
z∈F2m , φ∗ (uz)+v+b=0
If (u, v) ∈ Δ, then the set {z ∈ F2m : φ∗ (uz) + v + b = 0} is empty. Consequently Wf (u, v) is equal to 0 for all (u, v) ∈ Δ. Remark 11. Note that P ({1, . . . , m}) ⊆ Δ. The higher the weight of the elements of D is, the higher t2 (corresponding to the order of resiliency) and |Δ| are. Remark 12. Note that for the extensions, we concentrated on the basic constructions. The more complicated constructions due to for instance Tarannikov in [30,31], can be generalized in the same way using the methods as presented above. 2.5. Relations with Codes and Orthogonal Arrays 2.5.1. Codes The following construction shows a relation between Δ-resilient functions and linear [n, k, d]-codes, which is a generalization of a result from [32]. Lemma 5. Let G be a generator matrix of an [n, k, d]-code C and let f be a balanced function on Fn2 . Define ' Δu = P ({1, . . . , n} \ sup(u)) {A : A ⊂ sup(u)} for u ∈ C. T Then f (xG ) is a ( u∈C Δu )-resilient function. Proof. Denote F : Fn2 → Fk2 as the function x → xGT . We use the relation, derived in [33,34], between the Walsh coefficients of f ◦ F and the Walsh coefficients of f and lw ◦ F , where lw ◦ F denotes the linear combination of the components of F defined by w: −k Wf (w)Wlw ◦F (v), ∀v ∈ Fn2 . (7) Wf ◦F (v) = 2 w∈Fk 2
Note that the function lw ◦ F = w · xGT = wG · x is linear and thus by Corollary 1 lw ◦ F is a Δu -resilient function, where u = wG is a codeword of C. Now (7) concludes the proof.
86
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
' Remark 13. Because {A : |A| ≤ d−1} ⊆ u∈C Δu , Lemma 5, generalizes the property that the function f (xGT ) is at least (d − 1)-resilient as proven in [32]. Lemma 5 can also be immediately translated in the new setting by making use of a generalization of the linear [n, k, d]-code, called the [n, k, Δ] error-set correcting code. is a code of dimension k, length n and for which codewords x An [n, k, Δ]-code C satisfy sup(x) ∈ Γ, where Γ = Δc . Lemma 6. Let G be the generator matrix of an [n, k, Δ]-code and g(x) = f (xGT ), where f is a balanced algebraic non-degenerate Boolean function on Fk2 with k ≤ n. Then g is at least Δ-resilient. Moreover, if f is resilient in α (Wf (α) = 0), then g is also resilient in sup(αG). Let us show how to construct these [n, k, Δ]-codes. As derived in [4], the generator matrix of the code can be defined by using the matrix M of a Monotone Span Program. Definition 3 ([35]). A Monotone Span Program (MSP) M is defined by the quadruple (F, M, , ψ), where F is a finite field, M is a matrix (with m rows and d ≤ m columns) over F, ψ : {1, . . . , m} → {1, . . . , n} is a surjective functions and = (1, 0, . . . , 0) is a fixed non-zero vector, called target vector. The size of M is the number of rows and is denoted as size(M). The properties that matrix M (from the MSP M) possesses are in one-to-one correspondence with a monotone increasing set Γ. In this case it is said that M computes Γ. Definition 4 ([4]). An MSP M is called Δ-non-redundant (denoted by Δ-rMSP) when v = 0 ∈ ker(M T ) ⇐⇒ sup(v) ∈ Δ. It is shown in [4] how the generator matrix of an [n, k, Δ]-code can be deduced from the results in [36]. Theorem 11 ([4]). Let M be a Δ-rMSP computing Γ and let M ⊥ be the matrix of the dual M⊥ MSP computing Γ⊥ . Then a generator matrix G of an [n + 1, k, Δ]-code is given by G = ( | (M ⊥ )T ). Note that it is not trivial from the previous relation how to immediately construct [n + 1, k, Δ]-codes. Although, we could observe the following relations. It is well known that there is a one-to-one correspondence between ideal LSSS (with dealer P0 and defined on set of players P = {1, . . . , n}) and matroids over the set S = {0, 1, . . . , n} = {P0 } ∪ P. On the one hand, a relation between linear codes (constructed by means of MSPs) and SSS was shown in [4]. On the other hand, the relation between SSS and matroids was found in [37]. Consequently, it follows logically that also matroids and linear codes are related, as explicitly derived in [2]. Definition 5 ([38]). A matroid M = (S, I) is a finite set S and a collection I of subsets of S (called the independent sets) such that ∅ ∈ I, I is monotone decreasing, if U, V ∈ I with |U | = |V | + 1, then there exists x ∈ U \ V such that V ∪ x ∈ I. The maximal independent sets are called the bases. If B = {Bi : i ∈ I} is the set of bases of a matroid M, then the dual matroid M∗ of a matroid M is defined by the set of bases B ∗ = {S \ Bi : i ∈ I}.
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
87
Theorem 12 ([2]). The parity check matrix of an [n + 1, k, Δ]-code is a matroid defined on the set of column indices S = {0, 1, . . . , n} with independent set I = Δ. The generator matrix of an [n + 1, k, Δ]-code is equivalent to a matroid defined on the set S = {0, 1, . . . , n} with an independent set I ∗ = Δ∗ (the dual matroid of (S, I)). Example 5. Consider the [5, 3, Δ]-code with its corresponding dual the [5, 2, Δ∗ ]-code where (Δ∗ )+ = {{2, 3, 5}, {1, 3, 5}, {1, 2, 5}, {2, 4, 5}, {1, 4, 5}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}}, Δ+ = {{1, 4}, {2, 4}, {3, 4}, {1, 3}, {2, 3}, {3, 5}, {2, 5}, {1, 5}}. The generator matrix G and parity check matrix H of the code are given by: ⎞ ⎛
10110 1 1 1 0 0 . G = ⎝0 1 1 1 0⎠ , H = 00111 00011 The linearly independent sets of columns in H correspond to the elements of Δ, while the linearly independent sets of columns in G correspond to the elements of Δ∗ . Then g(x) = f (xGT ) = f (x1 ⊕ x3 ⊕ x4 , x2 ⊕ x3 ⊕ x4 , x4 ⊕ x5 ), where f is an arbitrary balanced Boolean function on F32 , represents a Δ-resilient Boolean function. If f (x1 , x2 , x3 ) = x1 x3 ⊕ x2 , we can say more. Since Wf (α) = 0 for α ∈ V = {(0, 0, 0), (1, 0, 0), (0, 0, 1), (1, 0, 1)}, we compute sup(αG) for all α ∈ V , which belong to V = {{}, {1, 3, 4}, {4, 5}, {1, 3, 5}}. Consequently, following Lemma 6, the function g(x) = f (xGT ) = (x1 ⊕ x3 ⊕ x4 )(x4 ⊕ x5 ) ⊕ x2 ⊕ x3 ⊕ x4 represents a Δ -resilient function with Δ+ = {{1, 3, 4}, {1, 3, 5}, {4, 5}, {2, 4}, {2, 3}}. Clearly Δ does not represent the independent sets of a matroid on {1, . . . , 5}, since the cardinality of the elements are not equal. 2.5.2. Orthogonal Arrays Let us consider a generalized definition of orthogonal arrays. Definition 6. An orthogonal (M, n, q, Δ) array is an M × n matrix V with entries from a set of q elements, strength Δ which is a decreasing monotone set and index μ. Any set A ∈ [Δ⊥ ]+ of columns of V contains all q |A| possible row vectors exactly μ = M q −|A| times. If Δ = {A : |A| ≤ k}, then the definition of an (M, n, q, k) orthogonal array is obtained. The relation between linear [n, k, d]-codes and (q k , n, q, d⊥ − 1) orthogonal arrays as mentioned in [25, Theorem 8] can be translated as follows: Theorem 13. Let [C] be the M ×n array consisting of all codewords of an [n, k, Δ]-code. Then the array [C] will define a (q k , n, q, Δ(C⊥ )) orthogonal array. Consequently, by Theorem 12, Δ represents the independent sets of a matroid which means that the definition of a generalized orthogonal array only depends on the rank of the corresponding matroid.
88
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
Orthogonal arrays have important applications in statistics, more precisely in fractional factorial experiments [39]. The rows of the array represents the experiments or tests to be performed and the columns correspond to different variables. By basing the experiment on an orthogonal array, one ensures that all possible combinations of variables determined by Δ⊥ occur equally often. Consequently, this type of generalized orthogonal array is certainly interesting since in general we do not want to investigate all possible combinations but only sets of combinations. Orthogonal arrays are also equivalent to affine structures, transversal designs, cartesian authentication codes, and local perfect randomizers. Consequently, equivalence can also be expressed between their generalized forms. As shown in [26], the extended truth table of a k-CI function f on Fn2 forms an (M, n, 2, k) orthogonal array, where the extended truth table is defined as the wt(f ) × n table with rows determined by the elements x for which f (x) = 1. A natural generalization in the new metric is given in the next theorem. Theorem 14. A Boolean function f on Fn2 is Δ-CI if its extended truth table is an (M, n, 2, Δ) orthogonal array. 2.6. Example of Modified Combination Generator We give some concrete examples of the modified combination generator as explained in the introduction. 1. Suppose the generator consists of 5 LFSRs of lengths 61, 63, 21, 31, and 33 respectively. Let the security parameter for the (fast) correlation attack be equal to 60. Consequently in order to be secure against the (fast) correlation attack, we need a combination function which is resilient with respect to the 3rd , 4th , 5th and also the 3rd + 4th , 3rd + 5th LFSR, i.e., a Δ resilient function with Δ = {{3, 4}, {3, 5}}. The function f (x1 , . . . , x5 ) = x2 x3 x4 x5 ⊕ x1 x2 x3 ⊕ x1 x4 ⊕ x3 x5 ⊕ x1 ⊕ x2 satisfies this property. Remark that this function has degree 4 and nonlinearity 10. High degree and high nonlinearity are important properties for resisting other attacks like for instance Berlekamp–Massey attack [10] and best affine approximation attack [40]. 2. The function f (x1 , . . . , x5 ) = x1 x2 x3 ⊕ x1 x4 ⊕ x2 x5 ⊕ x3 is a Δ-resilient function with Δ = {{1, 2}, {1, 4}, {1, 5}, {2, 4}, {2, 5}, {4, 5}}. Moreover, the function has degree 3 and maximum nonlinearity 12. The LFSRs of the corresponding modified combination generator with security parameter 60 should have for instance lengths 21, 23, 61, 25, and 27 respectively. When we consider the same models of combination generators in the classical theory, the combination function should be in both cases 2-resilient in order to resist (fast) correlation attacks. Following Siegenthaler’s inequality, the corresponding function has degree less than or equal to 2. Note that now using Δ-resilient functions the choice of the lengths of the LFSRs may not be uniform, which is the case when we use t-resilient functions. Non uniform LFSRs can play an important role for obtaining a compact hardware design. This also allows to relax the requirements to the rest of the parameters like nonlinearity, algebraic degree, etc. Moreover, by Carlet–Sarkar’s result on the divisibility of the Walsh coefficients, the maximum Walsh value is greater or equal than 16, resulting in a nonlinearity less than or equal to 8.
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
89
These examples are just illustrative and need to be scaled up in order to be used in reality. However, it already shows the advantages of considering resiliency with respect to specified monotone sets since the strong trade-offs between resiliency and degree, resiliency and nonlinearity can be avoided.
3. Functions Satisfying Propagation Characteristics with Respect to Δ-Sets Analogously to the definitions of Δ-resilient and Δ-correlation immune (CI) function, we define functions which satisfy the propagation characteristic of degree Δ1 and of order Δ2 (PC(Δ1 ) of order Δ2 ), the propagation characteristic of degree Δ1 (PC(Δ1 )), and the strict avalanche criteria of order Δ2 (SAC(Δ2 )), where Δ, Δ1 , Δ2 are monotone decreasing sets. Definition 7. For two monotone decreasing sets Δ1 and Δ2 the function f satisfies PC(Δ1 ) of order Δ2 iff for every w, such that sup(w) ∈ Δ1 \ {∅} the function f (x) ⊕ f (x ⊕ w) is Δ2 -CI. If Δ2 = ∅, the function f is said to be PC(Δ1 ). If Δ1 = {A : |A| = 1}, the function f satisfies SAC(Δ2 ). Again if Δ1 = {A : |A| ≤ } and Δ2 = {B : |B| ≤ k} the definitions of PC(Δ1 ) function of order Δ2 and PC() function of order k, PC(Δ1 ) function and PC() function; SAC(Δ2 ) function and SAC(k) function coincide. The property balancedness of f (x) ⊕ f (x ⊕ w) implies for the autocorrelation rf (w) = 0. 3.1. A Relation with Δ-Resilient Functions We generalize the well-known relation p + t ≤ n − 1 between the order of resiliency t and the degree of propagation p of a Boolean function on Fn2 as proven in [41,42]. Theorem 15. For a Δ1 -resilient function on Fn2 which satisfies PC of degree Δ2 holds ⊥ that Δ2 ∩ Γ⊥ 1 = ∅ and Δ1 ∩ Γ2 = ∅. Proof. The Wiener–Khintchine theorem establishes a relation between the squared Walsh and autocorrelation coefficients of a function in Fn2 [43]: rf (u) = 2−n
Wf (x)2 (−1)x·u .
x∈Fn 2
Based on it, the following relation, with respect to any linear subspace V , was derived in [44]: u∈V
rf (u) =
1 Wf (x)2 . ⊥ |V | ⊥
(8)
x∈V
Let A be an arbitrary element of Δ2 \ {0}. Note that the coefficient rf (0) is equal to 2n . Now applying the definition of PC of degree Δ2 we obtain u∈UA
rf (u) = rf (0) = 2n =
1 Wf (x)2 . ⊥ |UA | ⊥ x∈UA
90
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
Thus |UA⊥ | 2n =
Wf (x)2 =
⊥ x∈UA
Wf (x)2 .
x∈UAc
As a consequence Ac ∈ / Δ1 or also A ∈ / Γ⊥ 1 because otherwise the right side of the equation above would be zero. This holds for all A ∈ Δ2 and thus Δ2 ∩Γ⊥ 1 = ∅, which is ⊥ ⊥ equivalent to Δ2 ⊆ Δ1 . This in turn is equivalent to Γ2 ⊆ Γ1 , equivalent to Δ1 ⊆ Δ⊥ 2 and finally equivalent to Δ1 ∩ Γ⊥ = ∅. 2 3.2. Linear Structures Next we derive a condition for the existence of linear structures for a Δ1 -resilient function which satisfies PC(Δ2 ). A linear structure of a function is an element a ∈ Fn2 for which f (x) ⊕ f (x ⊕ a) is a constant. Linear structures should be avoided, for example, in order to resist differential attacks [45]. Theorem 16. Let f be a Δ1 -resilient function on Fn2 that satisfies PC(Δ2 ). If there − ⊥ + exists a non-empty element A ∈ Δ+ 2 ∩ [Δ1 ] , then all b with sup(b) = B, B ∈ Γ2 and A ⊂ B are linear structures of f . ⊥ + Proof. Let A ∈ Δ+ 2 ∩ [Δ1 ] . From (8) for V = UA and the assumption, we deduce that 2 n ⊥ there exists x, such that sup(x) = Ac ∈ Γ− 1 and Wf (x) = 2 |UA | since Wf (y) = 0 for all y ∈ UA⊥ , y = x (sup(y) ∈ Δ1 ). Next we apply (8) for V = UB , where B ∈ Γ− 2 and A ⊂ B:
rf (0) + rf (b) =
2 Wf (x)2 . ⊥ |UA | ⊥ x∈UB
Because UB⊥ ⊆ UA⊥ , there are two possibilities: 1) sup(x) ⊆ UB⊥ , which leads to rf (b) = 2n ; 2) sup(x) UB⊥ , which leads to rf (b) = −2n . The fact that |rf (b)| = 2n implies that b is linear structure of f . The following theorem gives a condition on the existence of linear structures for functions which satisfy PC(Δ). The proof is similar to the one of Theorem 16. Theorem 17. Let f be a Boolean function on Fn2 that satisfies PC(Δ). If there exists an element x ∈ Fn2 \ {0} such that sup(x) ∈ A⊥ for A ∈ Δ+ which satisfies Wf (x) = 2n−|UA |/2 , then all b with sup(b) = B and B ∈ Γ− , A ⊆ B are linear structures of f . 3.3. Algebraic Degree First note that the functions satisfying PC(P(P )) are the perfect nonlinear functions (bent functions of characteristic two). From the definition of resiliency, we deduce that for a Boolean function on Fn2 which satisfies PC(Δ1 ) of order Δ2 , the functions f (x) ⊕ f (x ⊕ w) are Δ2 -resilient for all w ∈ Δ1 \ {0}. By Theorem 1, the functions f (x) ⊕
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
91
f (x ⊕ w) are balanced for all w ∈ Δ1 \ {0} on any of the subspaces a + UA , where A ∈ Δ⊥ 2. The following theorem generalizes the bound on the degree d of a function on Fn2 satisfying the SAC(k) property [43], namely d ≤ n − k − 1. Theorem 18. If f satisfies SAC of order Δ then all coefficients au from the ANF of f with sup(u) ∈ Γ⊥ are equal to zero. Moreover, for all sets A ∈ Γ⊥ we have |A| > 1. Proof. Assume that au = 1 for u such that sup(u) ∈ Γ⊥ or equivalently sup(u) ∈ Δ. The function fu will have maximum degree wt(u) which contradicts the PC(1) property. Note that a function of maximum degree has a non-zero autocorrelation spectrum [43]. The condition |A| > 1 for all A ∈ Γ⊥ comes from the fact that a linear function does not satisfy PC(1). Corollary 2. For functions satisfying PC(Δ1 ) of order Δ2 , where |A| > 1 for all A ∈ ⊥ Γ⊥ 2 , the ANF coefficients au of f with sup(u) ∈ Γ2 are equal to zero. 3.4. Constructions The set of functions which satisfy PC(Δ1 ) of order Δ2 are globally invariant under the complementation of any of its coordinates, composition with any permutation on {1, . . . , n} which keeps Δ1 , Δ2 invariant, and the addition of any affine function. We first generalize the change of basis construction. Theorem 19. Let Δ be a set containing less than n elements. Then any Boolean function f on Fn2 which has at least n linearly independent vectors w such that rf (w) = 0 can be transformed into a function that satisfies the PC criterion of degree Δ. The best known and general construction for PC() functions of order k is due to Kurosawa and Satoh [46]. This construction uses linear codes. It was later generalized by Carlet [47] who also takes nonlinear codes into account. We present these constructions and show how to derive generalized properties of the obtained functions. Theorem 20. Let g be an arbitrary function on Fs2 and Q be an s × t-matrix. Define Δ1 on {1, . . . , t} and Δ2 on {t+1, . . . , t+s}. Let G1 be the generator matrix of a [t, h, Δ1 ]code and let G2 be the generator matrix of a [s, h, Δ2 ]-code. Define the function f on as follows: Fs+t 2 f (x1 , . . . , xs , y1 , . . . , yt ) = [x1 , . . . , xs ]Q[y1 , . . . , yt ]T ⊕ g(x1 , . . . , xs ). ⊥ Set Q = GT2 G1 then the function f satisfies PC(Δ ) of order Δk , where Δ = Δ⊥ 1 Δ2 and Δk = Δ1 Δ2 .
Proof. Analogous to the proof in [46] it is easy to see that if the matrix Q satisfies the following two conditions then f satisfies PC(Δ ) of order Δk : • sup(Qa) ∈ / Δk for any a ∈ Ft2 , a = 0 and sup(a) ∈ Δ ; • sup(bQ) ∈ / Δk for any b ∈ Fs2 , b = 0 and sup(b) ∈ Δ .
92
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
Next we verify that Q = GT2 G1 satisfies both conditions. Indeed by Definition 4 G1 a = (M1⊥ )T a = 0 if sup(a) ∈ Δ⊥ 1 and thus by Theorem 11 sup(Qa) = T T / Δ1 . Analogous bG2 = bM2⊥ = 0 if sup(b) ∈ Δ⊥ sup(G2 (G1 a)) ∈ 2 and thus T / Δ2 . These checks conclude the proof. sup(bQ) = sup((bG2 )G1 ) ∈ Remark 14. Let Δk = {A : |A| ≤ k} and Δ = {B : |B| ≤ }, then Δ⊥ = {B : ⊥ |B| ≤ n − 1 − }. So, it is easy to verify that Δk ⊆ Δ (in this case) corresponds to k + ≤ n − 1. Constructions of functions satisfying propagation characteristics that are not based on codes have been proposed by Gouget [48]. We now give two examples of them. defined by Theorem 21. Let f be a Boolean function on F2n+1 2 f : Fn2 × Fn2 × F2 → F2 : (x, y, z) → z(g(x) ⊕ y1 ⊕ · · · ⊕ yn ) ⊕ x · y, where g is an arbitrary function on Fn2 . If g(1) = 1, then f is balanced. The function f satisfies the properties: 1. PC(Δ) with Δ = {{1, . . . , 2n}, A1 , . . . , An }, where Ai = {1, . . . , 2n+1}\{i}. 2. PC(Δ1 ) of order Δ2 with the property that Δ1 Δ2 = Δ. Proof. We refer to [48] for the proof of the balancedness of f . In order to proof the first part of the theorem, we compute the derivative of f with respect to (a, b, c) ∈ Fn2 × Fn2 × F2 : Da,b,c f (x, y, z) = z(g(x) ⊕ g(x ⊕ a)) ⊕ c(g(x ⊕ a) ⊕ y1 ⊕ · · · ⊕ yn ⊕ b1 ⊕ · · · ⊕ bn ) ⊕ z(b1 ⊕ · · · ⊕ bn ) ⊕ a · y ⊕ b · x ⊕ a · b. It is easy to check that if sup(a, b, c) ⊆ Δ, the derivative Da,b,c f (x, y, z) becomes a linear function in the y-variables. This also means that Da,b,c f (x, y, z) is a balanced function. For the second part of the proof, let A ∈ Δ1 and B ∈ Δ2 such that A ∪ B ∈ Δ. Then the derivative with respect to B of the function obtained by fixing the variables corresponding to A is again a function which will linearly depend on y. The next construction from [48] is a generalization of the construction of Honda et al. and can reach a high degree [49]. Theorem 22. Let f be a Boolean function on Fn2 defined by f : Fs2 × F2n−s−1 × F2 → F2 : (x, y, z) → f1 (x) ⊕ f2 (y) ⊕ f3 (z) ⊕ x · φ(y) ⊕ z(x1 ⊕ · · · ⊕ xn ), where f1 , f2 , f3 are functions on Fs2 , Fn−s−1 and F2 respectively. The function φ is a 2 n−s−1 s into F2 . Then f satisfies the propagation criterion of order mapping from F2 Δ = {{∅, {1}, {2}, . . . , {s}} Δ2 {∅, {n}}} ∪ {Δ1 {∅, {n}}}, where Δ1 and Δ2 are defined on {1, . . . , s} and {s + 1, . . . , n − 1} respectively, if and only if φ satisfies the properties:
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
93
1) the function x · φ(y) is balanced if and only if sup(x) ∈ Δ1 ; 2) the function φ(y)⊕φ(y ⊕x) is different from the all-zero and the all-one function for all x such that sup(x) ∈ Δ2 . Proof. Let compute the derivative of f with respect to the triple (a, b, c) ∈ Fs2 ×Fn−s−1 × 2 F2 : D(a,b,c) f (x, y, z) = Da f1 (x) ⊕ Db f2 (y) ⊕ Dc f3 (z) ⊕ x · (φ(y) ⊕ φ(y ⊕ b)) ⊕ a · φ(y ⊕ b) ⊕ z(a1 ⊕ · · · ⊕ as ) ⊕ c(x1 ⊕ · · · ⊕ xs ⊕ a1 ⊕ · · · ⊕ as ). Note first that when wt(a) = 1 the derivative is a linear function in z, hence {{1}, {2}, . . . , {s}} P ({s + 1, . . . , n − 1}) {∅, {n}} ∈ Δ. On the other hand, when wt(a) = 0 and sup(b) ∈ Δ2 the second condition ensures that the derivative is balanced independently of wt(c). Thus Δ2 {∅, {n}} ∈ Δ2 . Therefore combining both observations (and taking into account the monotone decreasing property) we derive that {{∅, {1}, {2}, . . . , {s}} Δ2 {∅, {n}}} ∈ Δ. Last notice that when wt(b) = 0 and sup(a) ∈ Δ1 the first condition ensures that the derivative is balanced. So, we have also that Δ1 {∅, {n}} ∈ Δ which completes the proof.
4. Conclusions and Open Problems In this paper we have shown that many classical notions, constructions and results from the theory of cryptographic properties of Boolean functions can be extended to a more general setting: t-resiliency and PC properties can be represented as Δ-resiliency or PC properties with respect to Δ, where Δ = {A : |A| ≤ t}. Instead of working with numbers, we work with sets, which give us more flexibility in satisfying incompatible requirements as shown in Sect. 2.6. We have also defined analogous notions for the algebraic and the numerical degree of a Boolean function. Then we have proven equivalent results to most of the known inequalities in this new setting. It is much easier to adjust the parameters of a function, when one works with sets compared to numbers. When a trade-off needs to be achieved between parameters of a function, we can easily reduce a set (e.g., Δ) with some of its elements in order to satisfy the condition, comparing to the previous case where we need to reduce the number (e.g., t to t − 1 for example) discarding all sets of a fixed cardinality (e.g., with cardinality t). This approach gives more insight and better understanding in the behaviour of a Boolean function. More precisely, it allows us to determine which structural properties contributes to different known results like for instance the Siegenthaler’s inequality. Future work will investigate if these insights lead to new constructions of t-resilient functions (functions satisfying PC properties) by going over special monotone set resilient function (PC functions). We leave as an open question whether such functions exist for any Δ. In the theory of Secret Sharing Schemes (SSS), a scheme (or equivalently a monotone increasing set) is called ideal if each player has a share of minimal size. But it is known that for “many” monotone sets there is no ideal scheme, i.e., there is no finite field in which the SSS is ideal. This also corresponds to the question of representability of a matroid. For Boolean
94
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
functions we consider only this ideal case, since every coordinate (input) in the function is considered as a player’s share. Thus in the binary field there are monotone sets Γ for which there does not exist a corresponding MSP (equivalently matroid or SSS). It seems likely that there exist sets Δ for which there does not exist a corresponding Δ-resilient function. Another interesting problem is to generalize and study the notions of resiliency and PC for vectorial Boolean functions. For these functions, the definitions have more freedom since sets of input and output can be considered. Zigzag functions [50], used in the context of oblivious transfer, are a particular example of such Δ-resilient vectorial functions. Properties from access structures can be used to derive the properties of these functions as shown in [51].
References [1] A. Braeken, V. Nikov, S. Nikova, and B. Preneel, On Boolean Functions with Generalized Cryptographic Properties, Proc. of Indocrypt 2004, LNCS 3348 (2004), Springer-Verlag, 119–134. [2] A. Braeken, V. Nikov, and S. Nikova, Error-Set Codes and Related Objects, Proc. of COCOON 2005, LNCS 3595 (2005), Springer-Verlag, 577–585. [3] S. Fehr and U. Maurer, Linear VSS and Distributed Commitments Based on Secret Sharing and Pairwise Checks, Proc. of Crypto 2002, LNCS 2442 (2002), Springer-Verlag, 565–580. [4] V. Nikov and S. Nikova, On a Relation Between Verifiable Secret Sharing Schemes and a Class of ErrorCorrecting Schemes, Proc. of WCC 05, Springer-Verlag, 2005. Full version: Cryptology ePrint Archive, Report 2003/210, http://eprint.iacr.org/. [5] T. Siegenthaler, Correlation-Immunity of Nonlinear Combining Functions for Cryptographic Applications, IEEE Trans. Information Theory (1984), 776–780. [6] T. Siegenthaler, Decrypting a Class of Stream Ciphers Using Ciphertext Only, IEEE Trans. Computers (1985), 81–85. [7] W. Meier and O. Staffelbach, Fast Correlation Attacks on Certain Stream Ciphers, J. of Cryptology (1992), 67–86. [8] T. Johansson and F. Jönsson, Fast Correlation Attacks Based on Turbo Code Techniques, Proc. of Crypto 1999, LNCS 1666 (1999), Springer-Verlag, 181–197. [9] R.A. Rueppel and O.J. Staffelbach, Products of Linear Recurring Sequences with Maximum Complexity, IEEE Trans. Information Theory 33(1) (1987), 124–131. [10] J.L. Massey, Shift-Register Synthesis and BCH Decoding, IEEE Trans. Information Theory (1969), 122–127. [11] N. Courtois and W. Meier, Algebraic Attacks on Stream Ciphers with Linear Feedback, Proc. of Eurocrypt 2003, LNCS 2656 (2003), Springer-Verlag, 345–359. [12] A. Canteaut, C. Carlet, P. Charpin, and C. Fontaine, Propagation Characteristics and CorrelationImmunity of Highly Nonlinear Boolean Functions, Proc. of Eurocrypt 2000, LNCS 1807 (2000), Springer-Verlag, 507–522. [13] K. Kurosawa, T. Johansson, and D.R. Stinson, Almost k-wise Independent Sample Spaces and Their Cryptologic Applications, J. of Cryptology 14(4) (2001), 231–253. [14] K. Kurosawa, Almost Security of Cryptographic Boolean Functions, Cryptology ePrint Archive, Report 2003/075, http://eprint.iacr.org/. [15] Y. Dodis, A. Sahai, and A. Smith, On Perfect and Adaptive Security in Exposure Resilient Functions, Proc. of Eurocrypt 2001, LNCS 2045 (2001), Springer-Verlag, 301–324. [16] A. Gouget and H. Sibert, Revisiting correlation-immunity in filter generators, Proc. of 14th International Workshop on Selected Areas in Cryptography (SAC 2007), Ottawa, Canada, LNCS (2007), SpringerVerlag. [17] C. Carlet and E. Prouff, On Plateaued Functions and Their Constructions, Proc. of Fast Software Encryption 2003, LNCS 2887 (2003), Springer-Verlag, 57–78. [18] Y. Zheng and X.M. Zhang, Plateaued Functions, Proc. of International Conference on Information and Communications Security, LNCS 1726 (1999), Springer-Verlag, 284–300.
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
95
[19] D. Jungnickel, Finite Fields. Structure and Arithmetics, BI, Wissenschaftverslag, 1992. [20] G.Z. Xiao and J.L. Massey, A spectral Characterization of Correlation-Immune Combining Functions, IEEE Trans. Information Theory 34 (1988) 569–571. [21] Y. Zheng, X.M. Zhang, and H. Imai, Connections Between Nonlinearity and Restrictions, Terms and Hypergraphs of Boolean Functions, Proc. of IEEE International Symposium on Information Theory 1998, IEEE Press, 439 (1998). [22] C. Carlet and P. Guillot, Bent, Resilient Functions and the Numerical Normal Form, Discrete Mathematics and Theoretical Computer Science (2001), 87–96. [23] P. Sarkar and S. Maitra, New directions in Design of Resilient Boolean Functions, Cryptology ePrint Archive, Report 2000/009, http://eprint.iacr.org/. [24] C. Carlet and P. Sarkar, Spectral Domain Analysis of Correlation Immune and Resilient Boolean Functions, Finite fields and Applications 8 (2002) 120–130. [25] F.J. MacWilliams and N.J.A. Sloane, The Theory of Error-Correcting Codes, North Holland, Amsterdam, 1977. [26] P. Camion, C. Carlet, P. Charpin, and N. Sendrier, On Correlation Immune Functions, Proc. of Crypto 1991, LNCS 576 (1992), Springer-Verlag, 86–100. [27] Y. Zheng and X.M. Zhang, Cryptographically Resilient Functions, IEEE Trans. Information Theory 43(5) (1997), 1740–1747. [28] C. Carlet, More Correlation-Immune and Resilient Functions over Galois Fields and Galois Rings, Proc. of Eurocrypt 1997, LNCS 1233 (1997), Springer-Verlag, 422–433. [29] J. Dillon, Elementary Hadamard Difference Sets, Ph.D. Thesis, University of Maryland, 1974. [30] Y. Tarannikov, On Resilient Boolean Functions with Maximal Possible Nonlinearity, Proc. of Indocrypt 2000, LNCS 2247 (2001), Springer-Verlag, 19–30. [31] Y. Tarannikov, New Constructions of Resilient Boolean Functions with Maximal Nonlinearity, Proc. of Fast Software Encryption, LNCS 2355 (2001), Springer-Verlag, 66–77. [32] C.-K. Wu and E. Dawson, Construction of Cryptographic Correlation-Immune Boolean Functions, Proc. of Information and Communications Security 1997, LNCS 1334 (1997) Springer-Verlag, 170–180. [33] J. Daemen, R. Govaerts, J. Vandewalle, Correlation Matrices, Proc. of Fast Software Encryption 1994, LNCS 1008 (1995), Springer-Verlag, 275–285. [34] K. Gupta and P. Sarkar, Improved Construction of Nonlinear Resilient S-Boxes, Proc. of Asiacrypt 2002, LNCS 2501 (2002), Springer-Verlag, 466–483. [35] M. Karchmer and A. Wigderson, On Span Programs, Proc. of 8th Annual Structure in Complexity Theory Conference (1993), 102–111. [36] M. Van Dijk, Secret Key Sharing and Secret Key Generation, Ph.D. Thesis, 1997, TU Eindhoven. [37] E. Brickell and D. Davenport, On the classification of ideal secret sharing schemes, J. of Cryptology 4 (1991), 123–134. [38] D. Welsh, Matroid Theory, Academic Press, London, 1976. [39] A.S. Hedayat, N.J.A. Sloane, and J. Stufken, Orthogonal Arrays: Theory and Applications, SpringerVerlag, New York, 1999. [40] C. Ding, G. Xiao, and W. Shan, Stability Theory of Stream Ciphers, Springer, 1991. [41] Y. Zheng and X.M. Zhang, On Relationship Among Avalanche, Nonlinearity, and Propagation Criteria, Proc. of Asiacrypt 2000, LNCS 1976 (2000), Springer-Verlag, 470–483. [42] P. Charpin and E. Pasalic, On Propagation Characteristics of Resilient Functions, Proc. of Selected Areas in Cryptography 2002, LNCS 2595 (2002), Springer-Verlag, 356–365. [43] B. Preneel, W. Van Leekwijck, L. Van Linden, R. Govaerts, and J. Vandewalle, Propagation Characteristics of Boolean Functions, Proc. of Eurocrypt 1990, LNCS 473 (1991), Springer-Verlag, 161–173. [44] A. Canteaut, C. Carlet, P. Charpin, and C. Fontaine, On Cryptographic Properties of the Cosets of RM(1, m), IEEE Trans. Information Theory 47(4) (2001), 1494–1513. [45] E. Biham, Differential Cryptanalysis of the Full 16-Round DES, Proc. of Crypto 1992, LNCS 740 (1993), Springer-Verlag, 487–496. [46] K. Kurosawa and T. Satoh, Design of SAC / PC() of order k Boolean Functions and Three Other Cryptographic Criteria, Proc. of Eurocrypt 1997, LNCS 1233 (1997), Springer-Verlag, 434–449. [47] C. Carlet, On Cryptographic Propagation Criteria for Boolean Functions, Information and Computation 151(1–2) (1999), 32–56. [48] A. Gouget, Etude des propriétés cryptographiques des fonctions booléennes et algorithme de confusion pour le chiffrement symétrique, Ph.D. Thesis, Université de Caen, 2004.
96
A. Braeken et al. / On Boolean Functions with Generalized Cryptographic Properties
[49] T. Honda, T. Satoh, T. Iwata, and K. Kurosawa, Probabilistic higher order differential attack and higher order bent functions, Proc. of SAC 1997, LNCS 1556 (1997), Springer-Verlag, 64–72. [50] G. Brassard, D. Crépeau, and M. Sántha, Oblivious Transfers and Intersecting Codes, IEEE Transaction on Information Theory, special issue in coding and complexity 42(6) (1996), 1769–1780. [51] A. Braeken, V. Nikov, and S. Nikova, Zigzag Functions and Related Objects in New Metric, Proc. of the 8th Nordic Combinatorial Conference, 45–58, 2004. [52] C. Carlet, On the Coset Weight Divisibility and Nonlinearity of Resilient Functions, Sequences and their Applications 2001, Discrete Mathematics and Theoretical Computer Science, 131–144, 2001. [53] C. Carlet, Partially-Bent Functions, Designs, Codes and Cryptography 3(2) (1993), 135–145. [54] S. Chee, S. Lee, D. Lee, and S.H. Sung, On the Correlation Immune Functions and Their Nonlinearity, Proc. of Asiacrypt 1996, LNCS 1163 (1996), Springer-Verlag, 232–243. [55] J. Daemen, Cipher and Hash Function Design, Ph.D. Thesis, Katholieke Universiteit Leuven, 1995. [56] P. Langevin, On the Covering Radius of RM(1, 9) in RM(3, 9), Proc. of Eurocode 1990, Coding Theory and Applications, LNCS 514 (1991), Springer-Verlag, 51–59. [57] K. Martin, Discrete Structures in the Theory of Secret Sharing, Ph.D. Thesis, Royal Holloway and Bedford New College, 1993. [58] J. Seberry, X.-M. Zhang, and Y. Zheng, Relationship Between Propagation Characteristics and Nonlinearity of Cryptographic Functions, Journal of Universal Computer Science 1(2) (1995), 136–150. [59] D. Stinson, Combinatorial Designs and Cryptography, Surveys in combinatorics, Cambridge University Press, New York, NY, 1993. [60] Y. Zheng and X.M. Zhang, Strong Linear Dependence of Unbiased Distribution on Non-Propagative Vectors, Proc. of Selected Areas in Cryptography 1999, LNCS 1758 (1999), Springer-Verlag, 92–105.
Boolean Functions in Cryptology and Information Security B. Preneel and O.A. Logachev (Eds.) IOS Press, 2008 © 2008 IOS Press. All rights reserved. doi:10.3233/978-1-58603-878-6-97
97
Conjectures on the Number of Balanced Boolean Functions of Bounded Degree Thomas W. CUSICK 1 State University of New York at Buffalo, NY, USA Abstract. We state several conjectures which provide good upper and lower bounds for the number of balanced Boolean functions in n variables with degree less than or equal to k. We give proofs for several special cases and give some reasons why we think that the conjectures are true. We believe that the conjectures will be very useful for further research. Keywords. Boolean function, balanced function, Reed–Muller code
Introduction This paper contains five conjectures on Boolean functions in n variables with degree bounded by k, plus proofs of some special a cases. We shall use the following notations throughout: The binomial coefficient b is denoted by C(a, b). The number of elements in a set S is denoted by #S. The function f is always a Boolean function in n variables. The weight of a function f is the usual Hamming weight, which we denote by wt(f ). A function f in n variables is balanced if wt(f ) = 2n−1 . We define B(k, n) = number of balanced functions of degree ≤ k in n variables; P (k, n) = 21+C(n,1)+C(n,2)+···+C(n,k) = number of functions of degree ≤ k in n variables. We let R(k, n) denote the Reed–Muller code of degree k and length 2n , so the codewords of R(k, n) are exactly the truth tables of all of the Boolean functions of degree ≤ k in n variables and #R(k, n) = P (k, n) (in other words, the dimension of the code R(k, n) k is j=0 C(n, j)). We let # Bal(S) denote the number of balanced functions in the set S of Boolean functions. Now we can state the five conjectures. The first one concerns the quotient group R(k + 1, n)/R(k, n) for k > 0. 1 State
University of New York at Buffalo, Department of Mathematics, Buffalo, NY 14260, USA; E-mail:
[email protected].
98
T.W. Cusick / Conjectures on the Number of Balanced Boolean Functions of Bounded Degree
Conjecture 1. Given k > 0, for each function f with degree k + 1 we have # Bal(f + R(k, n)) < B(k, n), that is, the coset R(k, n) in R(k + 1, n)/R(k, n) contains more balanced functions than any other coset. Conjecture 2. For each k, 1 ≤ k ≤ n − 1, we have 2C(n,k+1) B(k, n) > B(k + 1, n). Conjecture 3. For each k, 1 ≤ k ≤ n − 1, we have B(k, n) B(k + 1, n) < . P (k + 1, n) P (k, n) Conjecture 4. For each k, 3 ≤ k ≤ n − 1, we have 2[(n−1)/k]
B(k + 1, n) B(k, n) ≤ 2[(n−1)/(k+1)] . P (k + 1, n) P (k, n)
Note: Conjecture 4 strengthens Conjecture 3 when k divides n − 1, and holds with equality when k = n − 1. Conjecture 5. For each k, c, we have 2[(n−1)/k]
B(k, n + 1) B(k, n) < 2[n/k] . P (k, n + 1) P (k, n)
If n > 10, we can strengthen this slightly: 2[(n−1)/k]
B(k, n + 1) B(k, n) ≤ 2([n/k]−1/2) . P (k, n + 1) P (k, n)
Note that it is not true that B(k, n)/P (k, n) decreases as n increases, though Conjecture 5 implies this is true except perhaps when k divides n. For example, computation gives B(3, 7)/P (3, 7) = 0.29 . . . > B(3, 6)/P (3, 6) = 0.20 . . . . These five conjectures were first stated in my paper with my student Younhwan Cheon [1].
1. Discussion of the Conjectures It is easy to see that Conjectures 2 and 3 follow from Conjecture 1, and that Conjectures 2 and 3 are logically equivalent. The conjectures are motivated by the well known theorem of McEliece [2,3] (see also the discussion in the book of MacWilliams and Sloane [4, p. 447]). McEliece’s Theorem. The weight of any Boolean function of degree ≤ k in n variables is divisible by 2[(n−1)/k] .
T.W. Cusick / Conjectures on the Number of Balanced Boolean Functions of Bounded Degree
99
The conjectures can be thought of as attempts to make more precise the role played by the powers of 2 in the weights of the codewords of R(k, n). In particular, we believe that McEliece’s Theorem reflects some properties of R(k, n) which distinguish these codes from random ones. We next explain these (conjectural) properties. Suppose C is a code of length N and dimension K, and let Ai denote the number of codewords of weight i for 0 ≤ i ≤ N . Define ai = Ai /2K . Now it is not hard to show (see [4, p. 287, Problem (8)]) that ai is well approximated by the binomial distribution, that is, ai ≈ 2−N C(N, i)
for 0 ≤ i ≤ N.
(1)
A classic paper of Sidel’nikov [5] shows that this is in fact true for any code C whose dual code has a large minimum distance (see the discussion in [4, p. 282–288]). If the code R(k, n) (length 2n , dimension 1 + C(n, 1) + C(n, 2) + · · · + C(n, k)) behaved in accordance with Eq. (1), then we would have C(2n , 2n−1 )P (k, n) . B(k, n) ≈ 22 n
(2)
Eq. (2) would imply that B(k, n)/P (k, n) is independent of k, but we believe (Conjectures 3 and 4) that B(k, n)/P (k, n) decreases as k increases, especially when k divides n − 1 (Conjecture 4). In fact Conjecture 4 implies 2[(n−1)/k] C(2n , 2n−1 )P (k, n) , B(k, n) ≥ 22 n
3≤k ≤n−1
(3)
instead of Eq. (2) (the easy proof is given in [1, p. 104, Th. 3.3]). The extra factor of 2[(n−1)/k] in (3) leads to the decrease in B(k, n)/P (k, n) as k increases. We think McEliece’s theorem is responsible for this, because it requires that the weights in the codes R(k, n) cannot be too close together, that is, they must “clump”. Thus the clumping of weights in R(k, n) changes the behavior of these codes as compared with random ones. We believe that the lower bound in Eq. (3) is very sharp in many cases. Computation shows that the lower bound agrees with the exact value to 34 significant figures for B(5, 9) ≈ 6.9 × 10113 ; the exact value of B(5, 9) is given in [6]. Note that we have exact formulas for B(k, n) when k = 1, 2, n − 1 or n, and the inequality in Eq. (3) actually holds as an equality when k = n − 1. From Conjectures 4 and 5 we can prove (the details are in [1, p. 105, Th. 4.2]) the following upper bound for B(k, n): 2[(n−1)/k] P (k, n) √ , B(k, n) < π2n−1
3 ≤ k ≤ n − 2.
(4)
We can see that the lower bound in Eq. (3) and the upper bound in Eq. (4) are asymptotically the same by using the formula (easily derived from Stirling’s formula for m!) √ n (5) C(2n , 2n−1 ) = 22 (1 − c2−n ) π2n−1 , where c > 0 is a constant.
100
T.W. Cusick / Conjectures on the Number of Balanced Boolean Functions of Bounded Degree
2. Special Cases of Conjecture 1 The case k = n − 1 of Conjecture 1 is very simple, because there are only two cosets in R(n, n)/R(n−1, n), and the coset R(n−1, n) has all of the balanced functions because of the well known fact that wt(f ) is odd for any function f in n variables with degree n. Another simple proof of this is given in [1, p. 103, Th. 2.5]. The case k = 1 of Conjecture 1 follows from the known weight distribution of R(2, n), as we see in the proof of the following theorem. Theorem 1. The case k = 1 of Conjecture 1 is true. In fact, each of the 2C(n,2) cosets of R(2, n)/R(1, n) has one of the following weight distributions for some integer r: Weight Number of functions 2n−1 − 2n−r−1 22r 2n−1 2n+1 − 22r+1 2n−1 + 2n−r−1 22r Coset R(1, n) has the distribution for r = 0, and all other cosets have the distribution for some r satisfying 1 ≤ r ≤ [n/2]. Proof. The assertion in the theorem about coset R(1, n) is clear, since any nonconstant linear function is balanced. The other assertions in the theorem follow from the known weight distribution of R(2, n), which is explained in [4, p. 433–443]. It follows from the discussion there that any coset other than R(1, n) has a positive rank r, 1 ≤ r ≤ [n/2], such that the weight distribution is determined by r and in fact is given by the table in Theorem 1 (see [4, p. 44, Th. 5]). This proves Theorem 1. More is known about the cosets of R(2, n)/R(1, n). Hou [7, p. 101] proved that R(2, n)/R(1, n) has [n/2] + 1 orbits (that is, sets of cosets with the same weight distribution), and orbit representatives are R(1, n) and gi + R(1, n), where gi = x1 x2 + x3 x4 + · · · + x2i−1 x2i ,
1 ≤ i ≤ [n/2].
The dual code of R(k, n) is R(n − k − 1, n) for 0 ≤ k ≤ n − 1 [4, p. 375] and we can compute the weight distribution of any code from its dual code [4, p. 125–130]. Since the weight distribution of R(1, n) is simple, we can compute a detailed description of the weight distribution of R(n − 2, n). This turns out to be enough to enable us to prove the next theorem. Theorem 2. The case k = n − 2 of Conjecture 1 is true. In fact, we have B(n − 2, n) = 2−n [C(2n , 2n−1 ) + (2n − 1)C(2n−1 , 2n−2 )]
(6)
and all of the 2n − 1 cosets of R(n − 1, n)/R(n − 2, n) other than R(n − 2, n) have the same number of balanced functions, namely # Bal(f + R(n − 2, n)) = 2−n [C(2n , 2n−1 ) − C(2n−1 , 2n−2 )], where f is any function of degree n − 1.
(7)
T.W. Cusick / Conjectures on the Number of Balanced Boolean Functions of Bounded Degree
101
We will give the proof after one preliminary lemma. We shall need the Krawtchouk polynomials [4, p. 130] defined by Pk (x; N ) =
k
(−1)j C(x, j)C(N − x, k − j),
k = 0, 1, 2, . . .
(8)
j=0
Lemma 1. Let Di denote the number of codewords of weight i for 0 ≤ i ≤ 2n in the code R(n − 2, n). Let Pk (x) denote the polynomial Pk (x; 2n ). Then Dk = 2−(n+1) [Pk (0) + (2n+1 − 1)Pk (2n−1 ) + Pk (2n )],
0 ≤ k ≤ 2n
(9)
and in particular D2n−1 = 2−n [C(2n , 2n−1 ) + (2n − 1)C(2n−1 , 2n−2 )].
(10)
Proof. Let Ai denote the number of codewords of weight i for 0 ≤ i ≤ 2n in the code R(1, n). Since R(n − 2, n) is the dual code of R(1, n), we have the formula n
Dk = 2−(n+1)
2
Aj Pk (j),
0 ≤ k ≤ 2n
(11)
j=0
(see [4, p. 129, Eq. (13)]) which gives the connection between the weight distribution of a code and its dual code. Since only three of the Ai are nonzero, Eq. (9) follows from Eq. (11), and the only values of Pk (j) which we need are Pk (0) = C(2n , k),
Pk (2n ) = (−1)k C(2n , k)
(12)
and Pk (2
n−1
k )= (−1)j C(2n−1 , j)C(2n−1 , k − j)
(13)
j=0
(with the conventions C(0, 0) = 1 and C(0, j) = 0 for j > 0, Eqs. (12) and (13) follow immediately from Eq. (8)). When k = 2n−1 , Eqs. (12) and (13) combined with the familiar binomial coefficient identity n−1 2
(−1)j C(2n−1 , j)2 = C(2n−1 , 2n−2 )
j=0
give Eq. (10). Of course D2n−1 in Lemma 1 is equal to B(n − 2, n) by definition, so Eq. (10) proves Eq. (6) in Theorem 2. If we define E(n − 1, n) = number of balanced functions of degree n − 1 in n variables,
102
T.W. Cusick / Conjectures on the Number of Balanced Boolean Functions of Bounded Degree
then the obvious formula B(n − 1, n) = C(2n , 2n−1 ) combined with Eq. (6) gives E(n − 1, n) = (1 − 2−n )[C(2n , 2n−1 ) − C(2n−1 , 2n−2 )].
(14)
Proof of Theorem 2. We have already seen that Eq. (10) in Lemma 1 gives Eq. (6) in the theorem. We see from Eq. (14) that the average number of balanced functions of degree n − 1 in the 2n − 1 cosets of R(n − 1, n)/R(n − 2, n) which contain such functions is exactly the right-hand side of Eq. (7). This proves Eq. (7) provided that we can show that all of those 2n − 1 cosets have the same number of balanced functions. This is true because there are only two orbits (that is, sets of cosets with the same weight distribution) in R(n − 1, n)/R(n − 2, n); the orbit count follows from the fact that it is trivial that R(1, n)/R(0, n) has two orbits, and by duality (see [8, p. 166] for example) the same is true for R(n − 1, n)/R(n − 2, n). Alternatively, it is not hard to see that there is a change of basis (linear transformation with determinant 1) which maps any coset g + R(n − 2, n), where g has degree n − 1, to any other such coset, in such a way that balanced functions are mapped to balanced functions (of course any change of basis preserves function weights). Thus the proof of Theorem 2 is complete. The case k = n − 3 of Conjecture 1 is not yet proved. Imitating the proof of Theorem 2 does not seem to work. Since the weight distribution of R(2, n) is known, we can in principle compute explicitly the weight distribution of the dual code R(n − 3, n). One way of doing this was given by Hou [8], but the explicit description for R(n − 3, n) seems to be too complex to allow the technique used in the proof of Theorem 2 to be carried out. We can give some interesting computational evidence for the truth of the case k = n − 3. This is so despite the fact that very few non-obvious values of B(k, n) can be computed, due to the huge size of the needed calculations. (The 11 known values as of 2007 are given in [1, p. 104, Table 1].) We define Av(n − 3, n) =
B(n − 2, n) − B(n − 3, n) 2C(n,2) − 1
to be the average number of balanced functions of degree n − 2 in the cosets of R(n − 2, n)/R(n − 3, n) which contain such functions and we define Q(n − 3, n) =
Av(n − 3, n) , B(n − 3, n)
which is the ratio of the average to the total number of balanced functions in R(n − 3, n). Conjecture 1 says Q(n − 3, n) < 1 (this inequality is also exactly the case k = n − 3 of Conjecture 2), and we believe that Q(n − 3, n) is actually very close to 1 for n > 5. This is the same thing as saying that, for n > 5, the inequality in Conjecture 2 for k = n − 3 is also an approximate equality. Table 1 gives numerical evidence for our conjecture that Q(n − 3, n) is very close to 1 for n > 5. We only have data for 4 ≤ n ≤ 7 since the value of B(5, 8) has not been computed exactly. Of course we can exactly compute B(n − 2, n) for all n from Eq. (6), but no such exact formula for B(n − 3, n) is known.
T.W. Cusick / Conjectures on the Number of Balanced Boolean Functions of Bounded Degree
103
Table 1. Numerical evidence for the closeness of Q(n − 3, n) to 1 when n > 5 n
Q(n − 3, n)
Av(n − 3, n)
4 .44
13.33
5 .5
18, 338
6 .999008
8.73683 ×
1011
B(n − 3, n)
B(n − 2, n)
30
870
36, 518
18, 796, 230
874, 731, 154, 374
2.86348 × 1016
7 .99999999996766 8.922497198704 × 1028 8.922497198992 × 1028 1.871183284 × 1035
References [1] [2] [3] [4] [5] [6]
[7] [8]
Th.W. Cusick and Y. Cheon, Counting balanced Boolean functions in n variables with bounded degree, Experimental Mathematics 16 (2007), 101–105. R.J. McEliece, On periodic sequences from GF(q), J. Combinatorial Theory, Ser. A 10 (1971), 80–91. R.J. McEliece, Weight congruences for p-ary cyclic codes, Discrete Mathematics 3 (1972), 177–192. F.J. MacWilliams and N.J.A. Sloane, The Theory of Error-Correcting Codes, Elsevier, Amsterdam, 1977. V.M. Sidel’nikov, Weight spectrum of binary Bose–Chaudhuri–Hocquenghem codes, Problems of Information Transmission 7 (1971), 11–17. T. Sugita, T. Kasami, and T. Fujiwara, Weight distributions of the third and fifth order Reed– Muller codes of length 512, Technical Report NAIST-IS-TR96006, Nara Institute of Science and Technology, 1996, available online at http://isw3.aist-nara.ac.jp/IS/TechReport2/ report/96006.ps. X. Hou, GL(m, 2) acting on R(r, m)/R(r − 1, m), Discrete Mathematics 149 (1996), 99–122. X. Hou, The eigenmatrix of the linear association scheme on R(2, m), Discrete Mathematics 237 (2001), 163–184.
104
Boolean Functions in Cryptology and Information Security B. Preneel and O.A. Logachev (Eds.) IOS Press, 2008 © 2008 IOS Press. All rights reserved. doi:10.3233/978-1-58603-878-6-104
Bit-Parallel Circuits for Arithmetic in Finite Fields1 Sergey B. GASHKOV a and Igor S. SERGEEV a,2 a Moscow State University, Moscow, Russia Abstract. The paper surveys methods of constructing bit-parallel circuits for arithmetic operations in finite fields. Keywords. Galois field, multiplication, inversion, Boolean circuit, depth, complexity
Introduction Efficient implementation of arithmetic in finite fields is of primary importance for cryptography, coding theory, digital signal processing etc. (see, for example [1,2,3,4,5,6,7,8, 9,10]). In this survey we consider only Boolean circuits for arithmetic operations in finite fields. Another term: bit-parallel circuits. Boolean circuits for multiplication and inversion in finite fields are implemented physically on chips and are tailored for particular applications. These circuits are usually called multipliers and invertors. In practice the main interest lies in fields of characteristic two, but some fields of odd characteristic are also involved. In the last case elements of a field are coded by binary strings. Boolean circuits are composed from Boolean two-input cells (or gates) AND, NAND, OR, NOR, XOR, XNOR, connected by wires. Depth of a given circuit is the length of the longest directed path, connecting primary input and output of the circuit. Complexity of a given circuit (in other words, size of a circuit) is the number of cells in it. This notion is very close to the notion of bit complexity of computation (program). As usual, complexity (depth) of a Boolean function is defined as a minimum of complexities (depths) of circuits implementing it. All necessary definitions may be found in [11,12]. Minimization of the depth and the complexity of circuits is one of the central and practically important problems in the complexity theory. The field of order q is denoted by GF(q). Elements of GF(q n ) may be represented by polynomials over GF(q) of degree at most n − 1. If elements of GF(q n ) are represented in the standard basis 1 This
work was partially supported by the Russian Foundation for Basic Research (grant no. 05-01-00994), Sci. Sch. (5400.2006.1), OMN RAN “Algebraic and combinatorial methods of mathematical cybernetics” program (project “Synthesis and complexity of control systems”). 2 Address of the authors: Department of Discrete Mathematics, Moscow State University, Leninskie Gory, Moscow, Russia; E-mail:
[email protected] (S.B. Gashkov),
[email protected] (I.S. Sergeev).
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
105
Bα = {α0 , α1 , . . . , αn−1 } (the element α ∈ GF(q n ) is called the generator of Bα ), then multiplication in Bα amounts to polynomial multiplication modulo an irreducible polynomial g(x) over 2 n−1 GF(q) such that g(α) = 0. If the conjugate elements α, αq , αq , . . . , αq are linearily independent over GF(q), then they form a basis α
q0
q1
q n−1
B = α ,α ,...,α
,
which is called normal basis with generator α. (Theoretical background on finite fields may be found in [5,13].) Complexity of implementation of multiplication and inversion in GF(q) are denoted by M (GF(q)) and I(GF(q)) respectively. We also introduce notation DM (GF(q)) and DI (GF(q)) respectively for the depth of the operations. Similar notation is used for other operations. Sometimes it is convenient to consider calculations over subfield GF(p). For corresponding complexity and depth measures we use the same (p) notation with upper indices (p) like M (p) (GF(q)) or DI (GF(q)).
1. Integer Arithmetic Circuits implementing elementary numeric operations (namely, operations modulo p, where p is prime) are used as building blocks for circuits implementing operations in finite fields (of order pn ). This is why we discuss also some issues related to implementation of integer arithmetic. Complexity of addition (subtraction) of n-bit numbers (corresponding circuits are usually called adders or subtractors) is known to be A(n) = 5n−3 [14]. (A method due to V.M. Khrapchenko [15] allows one to build an adder of depth log n + (2 + o(1)) log n (here and further on “log” denotes binary logarithm); complexity of this circuit can be reduced to (8 + o(1))n [16]. In practice, when n is no more than several thousands, other methods result in better circuits. Some techniques for building such adders are presented in [16] (including ternary method due to M.I. Grinchuk with depth bound 1.262 log n + 2.05). The reader can find a comprehensive analysis of theoretical aspects of implementation of multiplication in [17]. In the present paper we consider mainly practical aspects. Complexity of multiplication of n-bit numbers is denoted by M (n). It is well known that the complexity of a standard multiplier is 6n2 − 8n + O(1). Standard multiplier can be constructed so that its depth reduced to O(log n) (using a method, proposed independently by G.K. Stolyarov [18], A. Avizienis [19], Yu.P. Ofman [20] and C. Wallace [21]). Minimization of the depth of a standard multiplier is one of extensively studied problems of computer science. To the best of our knowledge, the best current asymptotic upper bound is 4.44 log n + O(1) (see [22]). More practical method leads to the depth estimate 5 log n + 5 [23]. This method also provides a benefit in terms of complexity. The earliest method of reducing complexity of an integer multiplier is due to A.A. Karatsuba [20] (at that time he was a post-graduated student of Moscow State University (MSU), the problem was set by A.N. Kolmogorov). The recursive complexity estimate of Karatsuba’s integer multiplier is
106
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
M (2n) ≤ 3M (n) + 52n − 9. The upper bound for n = 2s is M (n) ≤
1463 log 3 ·n − 52n + 4.5. 54
Karatsuba’s multiplier has lower size than a standard one for n ≥ 17. But its depth is O(log2 n). Similarly to the case of standard multiplier, the depth of Karatsuba’s multiplier can be reduced to O(log n) (see, e.g., [12]). In [24] somewhat better construction was presented, but in any case multiplicative constants in estimates for depth and complexity are exceedingly large for practical applications (the depth of Karatsuba’s multiplier can be further reduced to (10 + o(1)) log n causing further increasing of the multiplicative constant in estimate for complexity [23]). Asymptotically better multiplier was constructed by A.L. Toom [25] (at that time he was a student of MSU, his scientific adviser was O.B. Lupanov). Toom’s multiplier was improved by A. Schönhage and V. Strassen [26] (see also [27]). The complexity of the last multiplier is O(n log n log log n), and the depth is O(log n) (more precisely, a bound (9 + o(1)) log n can be achieved [23]). The best known multiplier can be constructed by M. Fürer’s method [28], its complexity is n log n2log
∗
n
,
but its depth is O(log n log∗ n), where log∗ n is defined by log . . . log n = 1. *+ , ) log∗ n
Evidently the last two multipliers both can not find applications in cryptography, due to large multiplicative constants in estimates. Pollard’s multiplier [1,29] seems to have more chances for finding practical applications, but also could not be used in cryptography. As follows from [30], the complexity of Pollard’s multiplier is less than Karatsuba’s one only for n > 222 . In that paper bounds 30634n log n + 393n for the complexity and 349 log n + 50 for the depth of Pollard’s circuit was claimed under the restriction n < 201326604. From practical point of view Toom’s method is the best known. Using Toom’s method, A.A. Burtzev has built a multiplier with recursive estimate of complexity M (4n) ≤ 7M (n) + 662n + 1085, which leads for n = 4s , s ≥ 4, to the upper complexity bound M (n) ≤ 402.5nlog4 7 −
1085 662 n− . 3 6
In particular, M (1024) ≤ 1279651. Karatsuba’s method gives worse bound in this case. Efficient implementation of division seems to be an even more complicated problem. Circuits with asymptotically best known complexity (of the same order as for mul-
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
107
tiplication) can be constructed following Cook’s method [31]. The depth of such circuits is O(log2 n). The method of [32] allows one to reduce it to O(log n log log n). The size is of the same order as for O(log n)-depth multipliers in both cases. Employing Fürer’s technique leads to a circuit with somewhat higher estimated depth. In [33] division circuits of depth O( −2 log n) and complexity O(n1+ ) for any positive parameter were constructed. However, all proposed methods except for the first one seem to be of academic interest only. 1.1. Prime Field Arithmetic Arithmetic in a finite field of prime order p is just the integer arithmetic modulo p. Complexity of addition (or subtraction) modulo n-bit number p can be estimated as 2A(n) + O(1). For Mersenne primes p = 2n − 1 this bound can be reduced to A(GF(p)) = 7n − 5. The depth in the last case is the same up to O(1) as the depth of integer addition-subtraction (i.e., theoretically (1 + o(1)) log n and practically 1.262 log n + O(1)). The same depth bound holds also for Fermat prime p = 2n + 1, the complexity in this case is A(GF(p)) = 9n + O(1). Multiplication by 2k in the Mersenne prime field for any integer k amounts to the cyclic shift which costs nothing in terms of circuit complexity. Complexity of multiplication by integer C, where C mod p can be represented as a sum of l(C) powers of two, can be estimated as M (C, p) ≤ (l(C) − 1)A(GF(p)). For instance, M (17, p) ≤ A(GF(p)). Analogously for multiplication by 2k in Fermat prime field the following complexity and depth estimates can be obtained: M (2k , p) ≤ 5A(GF(p))/9 + O(1), DM (2k , p) = (1 + o(1)) log n ≤ 2 log n. In the general case of multiplication by C complexity estimate takes a form M (C, p) ≤ (l(C) − 1)A(GF(p)) + (5n + O(1))l(C). For instance, M (3, p) ≤ 14A(GF(p))/9 + O(1). Estimates 6n2 − n + O(1) and 4.97 log n + O(1) are known for complexity and depth of a standard multiplier modulo Mersenne prime p. In the Fermat case analogous estimates are 6n2 + 11n + O(1) and 4.97 log n + O(1). Complexity of multiplication modulo arbitrary prime p is bounded as M (GF(p)) ≤ 3M (log p) + O(log p), where M (n) is the complexity of multiplication of n-bit numbers. See, for instance [34, 35] (the method perhaps comes back to [31,36]). We also refer the reader to [35,27] for comparison with modular polynomial multiplication.
2. Multiplication in General Finite Fields Let Mq,f (n) be the total number of operations over GF(q) (or the complexity over GF(q)) required for multiplication of polynomials modulo f , deg f = n. Similarly one
108
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
can define mq,f (n)—multiplicative complexity and aq,f (n)—additive complexity (i.e., the number of multiplicative and additive operations over GF(q) respectively). Then M (GF(q n )) ≤ Mq,f (n)M (GF(q)) for any irreducible polynomial f (x) over GF(q). To be more precise, M (GF(q n )) ≤ mq,f (n)M (GF(q)) + aq,f (n)A(GF(q)). We also use the notation Mq (n) for the complexity over GF(q) of multiplication of polynomials of degree less than n. Analogously mq (n) and aq (n) denote multiplicative and additive complexity. Strassen’s method [36] (see also [27,35]) implies that for any f mq,f (n) ≤ 3mq (n),
aq,f (n) ≤ 3aq + O(n).
If f (x) is a sum of k monomials, then Mq,f (n) ≤ Mq (n) + (2k + 1)n, and if q = 2 then M2,f (n) ≤ M2 (n) + kn. It is well-known hypothesis that one can always choose an irreducible polynomial f with k ≤ 5. Therefore Mq,f (n) ≤ Mq (n)(1 + o(1)). In [37] (see also [27]) is proved that estimates mq (n) = O(n log n) and aq (n) = O(n log n log log n) can be achieved simultaneously. In [38] a multiplicative constant in this estimate was refined. But both methods seem not to be applicable in cryptography or coding theory. The reason will be explained below. It is known (see, e.g., [29]) that in the case 2n − 1 ≤ q the multiplicative complexity of multiplication in GF(q n ) is 2n − 1. The main idea of upper bound was proposed by A.L. Toom [25] and the proof of the lower bound is due to S. Winograd. It was shown in [39] that in the general case multiplicative complexity is O(n) as well. The reader can find improved estimates in [40] and in several papers by Ballet et al., see, e.g., [41]. On the other hand additive complexity of these methods is not that low. Therefore the above methods seem to have no practical applications. 2.1. Polynomial Multiplication First, consider the case of binary polynomial multiplication. Complexity and depth estimates of the “school” method are M (n) = n2 + (n − 1)2 ,
DM (n) = 1 + #log2 n$.
For n ≈ 1000 one has M (n) ≈ 2000000, D(n) = 11. The recursive complexity estimates for Karatsuba’s method look as follows M (2n) ≤ 3M (n) + 8n − 4, M (2n + 1) ≤ 2M (n + 1) + M (n) + 8n − 2, implying for n = 2k , k ≥ 3, the next relations:
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
M (n) ≤
55 k 3 − 8n + 2, 9
109
DM (n) ≤ 3k − 3.
In particular, for n = 1024 we have M (n) ≤ 352665, D(n) ≤ 27. Using Schönhage’s [37] FFT method a circuit for cyclic convolution with complexity Z(2187) ≤ 428351 and depth DZ (2187) ≤ 46, or a circuit with bounds Z(2187) ≤ 430537 and DZ (2187) ≤ 34 can be constructed. As a corollary we have M (1024) ≤ M (1093) ≤ 430537,
DM (1024) ≤ DM (1093) ≤ 34.
In this case Karatsuba’s multiplier is more efficient. On the other hand, Karatsuba’s method for convolution allows one to build circuits with Z(2048) ≤ 1066183,
DZ (2048) ≤ 30.
In this case FFT method is preferable. Another example: multiplication modulo x1458 +x729 +1 can be implemented using FFT method with complexity 273850, and depth 33. In this case Karatsuba’s method again plays over. There also exists D. Cantor’s method [42] for polynomial multiplication over finite fields. The asymptotic complexity of this method is slightly greater than FFT’s, but for some medium-sized fields Cantor’s method may be preferable. In [43] a modification of Cantor’s method and some applications to polynomial factorization were considered. 2.2. Multiplication in Standard Bases Various architectures of multipliers for standard bases were proposed in [44,45,46]. Generally complexity and depth of these multipliers are estimated as O(n2 ) and O(log n) respectively. It was shown in [47], that sometimes using a standard basis with irreducible polynomials of maximum weight, i.e., polynomials of the form 1 + x + · · · + xm−1 + xm+1 + · · · + xn , offers a benefit. Multipliers of asymptotic complexity O(nlog 3 ) can be constructed following Karatsuba’s method. Some aspects of application of Karatsuba’s method to multiplication in GF(2n ) are discussed in [48,49]. For example, multiplication in GF(21024 ), when an irreducible polynomial is taken to be x1024 + x19 + x6 + x + 1, can be implemented by a circuit with M (GF(21024 )) ≤ 356865,
DM (GF(21024 )) ≤ 31.
110
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
2.3. Multiplication in Normal Bases Numerous methods for multiplication in normal bases are known by now, e.g., [5,50, 51,52,53,54]. Let T = (ti,j ) be a matrix, whose i-th row is the vector of entries of i ααq ∈ GF(q n ) with respect to normal basis B α . A number of nonzero entries in the matrix T is called complexity of the basis B α and is denoted C(B α ). If ξ=
n−1
qi
xi α ,
i=0
ζ=
n−1
yj α q
j
j=0
are some elements of GF(q n ), then the product π = ξζ may be computed by the formula π=
n−1 m=0
pm α
qm
,
pm =
n−1
ti−j,m−j xi yj = A(S m (x), S m (y)),
i,j=0
where S m (v) is the cyclic shift of a given vector v by m positions, A(u, v) is the bilinear form associated with the matrix A = (ai,j ), with the condition ai,j = ti−j,−j and indices i − j and −j are handled modulo n. This Massey–Omura algorithm [50] for multiplication over normal basis B in GF(q n ) requires n(2C(B)+n−1) operations over the subfield GF(q). In [51] a more efficient algorithm with the bound n(C(B)+3n−2)/2 was proposed. But both these bounds are at best quadratic in n, and cubic in the worst case. Alternatively, an idea of transition to the standard basis representation of the field elements may be exploited. Usual method for implementation of such transition rests on the fact that transition is a linear operator over the subfield GF(q). Thus, the transition can be implemented by a circuit of O(n2 / logq n) complexity and O(log n) depth. This is a corollary to a classical result due to O.B. Lupanov [55]. In [56] circuits for transition between standard and normal bases with complexity O(n1.806 ) and depth O(log n) were constructed. (The same estimate for the complexity of single-direction transition had been proven earlier in [57] with a worse depth bound.) Such transition circuits allow to perform multiplication in GF(q n ) using O(n1.806 ) operations over GF(q) in depth O(log n). In [56] another construction for transition circuits was proposed, which implies for any normal basis B that the following estimates hold simultaneously: √ M (q) (GF(q n )) = O( nC(B) + n1.667 + n1.5 log q log n log log n), √ (q) DM (GF(q n )) = O( n log q log n). Particularly, if B is a low complexity basis, i.e., C(B) = O(n1.167 ), and q is small enough, i.e., log q = o(n0.167 ), then M (q) (GF(q n )) = O(n1.667 ). But multiplicative constants in the estimates above are pessimistic. For some special but important cases better bounds are known. Normal bases in GF(q n ) of the minimal complexity 2n − 1 are called optimal normal bases (ONB). All these bases were enumerated in [58]. Any ONB belongs to one of three types. ONB of type I exists iff n + 1 = p is a prime number, and q is a primitive element modulo p. Type II and III ONB exist iff q = 2m , (m, n) = 1, 2n + 1 = p is a prime, and either 2 is
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
111
a primitive element modulo p (type II) or n is odd and −2 is a primitive element modulo p (type III). There are also various kinds of low complexity normal bases with C(B) = O(n) [59,60,52,61]. Using the method of [62] the following bound for the type k Gauss normal basis may be obtained: M (GF(q n )) ≤ (Mq (kn) + 7kn − 8)M (GF(q)). In the particular case of q = k = 2 (which is the ONB case) this result was obtained later in [53] independently and was patented. For the type I ONB one has M (GF(q n )) ≤ (Mq (n) + 7n − 8)M (GF(q)). For the type II and III ONB the bounds M (q) (GF(q n )) ≤ 3Mq (n) + O(n log n), M (GF(2n )) ≤ 3M (n) +
3n log n + O(n) 2
were proved in [54]. Under certain conditions the latter bound may be improved. For example [9], if n = 3 · 2k − 1 and ONB of type II or III exists, then for the complexity and the depth of multiplication in this basis we have M (GF(2n )) ≤ M (n) +
7n log n + 4n, 2
DM (GF(2n )) ≤ D(n) + 2 log n + 2 log log n + O(1). In particular, M (GF(2191 )) ≤ 31600,
D(GF(2191 )) ≤ 44.
For comparison, a method of the paper [51] implies the bound M (GF(2191 )) ≤ 90916. Note, that some of the algorithms presented above use for multiplication in the particular fields GF(q n ) a linear number of multiplications in GF(q).
3. Inversion in General Finite Fields The best known asymptotic complexity estimate for inversion in a standard basis of GF(q n ) is O(n log2 n log log n) that follows from the fast extended GCD Schönhage’s algorithm [63] (see also [64,27] and modification of the algorithm in [65]). The depth of the circuit is O(n) and the method seems to be not applicable in cryptography. Usual binary GCD algorithm can be implemented by a circuit of complexity O(n2 ) and even greater depth O(n log n). The latter method looks more practical, however all known GCD-based algorithms are intrinsically sequential. In practice, this methods are used for software implementation only.
112
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
3.1. Addition Chain Method A sequence of natural numbers a0 = 1, a1 , . . . , am = n, in which each number ai is a sum aj + ak , where j, k < i (indices j and k may coincide), is called an addition chain for n. Parameter m is called a length of the addition chain. The length of the shortest addition chain for n is denoted by l(n). Comprehensive study of addition chains including all classical results may be found in [66]. Put λ(n) = log n. It is known that l(n) = λ(n) + (1 + o(1))
λ(n) . λ(λ(n))
The upper bound is due to A. Brauer [67] and proof of the lower bound is due to P. Erd˝os. Evidently raising to the n-th power using only multiplications corresponds to conn structing of an addition chain for n. Fermat’s identity x = xq for any x ∈ GF(q n ) implies that inversion in GF(q n ) is equivalent to raising to the power q n − 2. This forms background for the use of addition chains in constructing invertors. A.Brauer [67] proposed an appropriate way to build an addition chain for 2n − 1 starting from an addition chain for n. His method easily extends to calculation of (q n − 1)/(q − 1) where multiplications by q are used instead of doubling steps. n Denote y = x(q −q)/(q−1) . To calculate inverse fast, one can use identity x−1 = n y(xy)−1 , as proposed in [68]. Clearly, xy ∈ GF(q), as far as (xy)q−1 = xq −1 = 1. n−1 For computation of y = (x(q −1)/(q−1) )q either Brauer’s or Itoh–Tsujii [68] method can be used (actually, the latter is just a special case of Brauer’s method). To finish calculations one has to multiply x by y (it is simpler than in the general case, due to the fact that the product belongs to subfield) and divide by xy ∈ GF(q). In the case q = 2 one needs only calculate y = x−1 . Less elegant approach based on the formula x−1 = x(q
n−1
−1)q q−2
x
was followed in [69]. Let F (GF(q n )) and DF (GF(q n )) denote the complexity and the depth of the circuit k implementing a Frobenius operation x → xq in GF(q n ). Let also d(n) denote the depth of a shortest addition chain for n. Using the addition chain method and a result of paper [70] a standard basis invertor with complexity and depth (q) n (q) n (q) n I (GF(q )) ≤ (l(n − 1) + 1) M (GF(q )) + F (GF(q )) + n = O(n1.667 ), (q) (q) (q) n n n DI (GF(q )) ≤ (d(n − 1) + 1) DM (GF(q )) + DF (GF(q )) + 1 = O(log2 n) can be constructed. The same scheme of calculations in the case of a normal basis implies the following bounds: I (q) (GF(q n )) ≤ (l(n − 1) + 1)M (q) (GF(q n )) + n = O(n1.806 ), (q)
(q)
DI (GF(q n )) ≤ (d(n − 1) + 1)DM (GF(q n )) + 1 = O(log2 n),
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
113
since the Frobenius operation is simply a cyclic shift of a field element coefficients in the normal basis, which has zero complexity. Additive terms n in both complexity bounds and 1 in both depth bounds can be omitted in the case q = 2. For a smooth number n the complexity of this invertors may be decreased, but at the cost of increasing their depth. The above estimates based on the A.Brauer’s (1939) method seem to be hardly familiar to cryptographers. Some particular cases of the Brauer’s method like Itoh–Tsujii method [68] or TYT-method [71] are frequently cited and exploited. These methods does not provide optimal complexity (for example, method [71] yields to the general Brauer’s for n = 24, 44, 47, . . . ). Using the Brauer’s method some very recent results can be improved straightforwardly, e.g., the complexity bounds [72] for inversion in the fields GF(2384 ), GF(2480 ) (see details in [73], see also [69]). To minimize the depth of invertor we may use a version of right-to-left binary method (see [66,73]). The method allows one to build a minimal depth δ(n) = #log2 n$ addition chain for n with the length λ(n) + ν(n) − 1, where ν(n) is the number of 1’s in the binary representation of n. The length of such a chain is at most 2λ(n), this bound is tight. Using a modified Yao’s method [74], an addition chain for n with the depth δ(n) + 1 and asymptotically minimal length λ(n) +
λ(n) O(λ(n)λ(λ(λ(n)))) + λ(λ(n)) (λ(λ(n)))2
was constructed in [73]. Thereby, a standard-basis invertor of complexity
I (q) (GF(q n )) ≤
λ(n) λ(n − 1) + (1 + o(1)) λ(λ(n)) × M (q) (GF(q n )) + F (q) (GF(q n ))
and depth (q) DI (GF(q n ))
≤ (δ(n) + 1)
(q) DM (GF(q n ))
+
(q) DF (GF(q n ))
+1
can be constructed. Analogous bounds for normal basis take the form:
I
(q)
(q)
(GF(q )) ≤ n
λ(n) λ(n − 1) + (1 + o(1)) λ(λ(n))
M (q) (GF(q n )),
(q)
DI (GF(q n )) ≤ (δ(n − 1) + 1)DM (GF(q n )) + 1. Actually, for any n ≤ 228 there exists a minimal length chain of the depth at most δ(n) + 1. For any n ≤ 1024 there exists a minimal length chain of the depth at most δ(n) + 2.
114
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
3.2. Logarithmic Depth Method The GF(q n ) invertors of logarithmic depth (over GF(q)) invertors were presented in [75,76] (the former paper considers the binary case). The authors didn’t estimate complexity and depth of the circuits more tightly than nO(1) and O(log n) respectively. In fact, the multiplicative constants involved are rather large. Invertor in GF(2n ) of the depth (6.44 + o(1)) log n and complexity (2/3)n4 + o(n4 ) was constructed in [77] (the result holds for an arbitrary field basis). In the same paper a standard basis invertor with the depth O(log n) and complexity O(n1.667 ) was constructed. The latter result was extended in [78] to the case of the general field GF(q n ). As a corollary, a normal basis invertor of complexity O(n1.806 ) and depth O(log n) can be constructed. This method [78] looks like a parallel version of addition chain method. It involves multiple multiplications. We denote complexity and depth of multiplication of m elements in the field GF(q n ) by M M (m, GF(q n )) and DM M (m, GF(q n )) respectively. Combining ideas from [79,33,32] the following bounds for multiple multiplication circuit were proved in [78]: MM
(q)
n
c
1+ 1+l−3
(m, GF(q )) = O l m
n
(log(mn) log log(mn) + l ) , 3
DM M (m, GF(q n )) = O(l log m + −1 log n), (q)
where l is a natural, is a positive parameters and c is a certain constant. The use of multiple multiplications rests on the following result [77,78]: let m = √ r # n$, r ∈ N. Then raising to the power (q n −q)/(q −1) in GF(q n ) can be implemented by a circuit with complexity and depth (2r − 1)(mF (GF(q n )) + M M (m, GF(q n ))) + (r − 1)M (GF(q n )), 2(DF (GF(q n )) + DM M (m, GF(q n ))) + DM (GF(q n )) + (r − 2) max{DF (GF(q n )) + DM M (m, GF(q n )), DM (GF(q n ))} respectively. As before, two more operations are required to finish inversion. Finally, for any r ∈ N a standard basis invertor with the following complexity and depth estimates can be constructed: I (q) (GF(q n )) = O(rn1/r (nw + n1.5 log n log log n)), (q)
DI (GF(q n )) = O(r log n), where w is somewhat smaller then 1.667. One can set r to be large enough to obtain a logarithmic depth circuit of complexity O(n1.667 ). Better bounds in both standard and normal cases may be obtained if the transition between the bases is performed fast. Denote by T (GF(q n )) and DT (GF(q n )) complexity and depth of a transition circuit (bilateral transition is considered). Then exploiting an idea that multiplication is faster in standard bases and Frobenius operation is faster in normal bases the following bounds for the inversion in either of the bases could be obtained [78]:
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
115
√ + O R R n T (q) (GF(q n )), (GF(q )) = O R n (q) (q) n n DI (GF(q )) = O R log n + DT (GF(q )) , I
(q)
n
b 1+2/R
where b < 2.12 and R is a natural parameter which is either constant or some very slowly growing function with respect to n. Therefore, if a transition circuit of almost linear complexity and logarithmic depth exists, then a logarithmic depth invertor of almost linear complexity can be constructed. For instance, an invertor in type k Gauss normal basis of the field GF(q n ) of complexity O( −b n1+ ) and depth O( −1 log n), where > 0, can be constructed under the condition k = o(log n). All the above logarithmic depth circuits are of minor actual significance though some application-oriented modifications increasing asymptotic complexity are possible.
4. Arithmetic in Composite Fields In [49] the authors proposed an architecture for parallel multipliers in GF(24n ). Different approaches to implementing arithmetic in composite fields were described in [80,81,51, 45]. Combining [54,56], one can prove that if n and m are coprime, then for some normal basis M (q) (GF(q nm )) = O(nm(m0.806 + n0.806 )). Particularly, if n = Ω(m), then M (q) (GF(q N )) = O(N 1.403 ),
N = nm.
If N is an -smooth number, i.e., N = n1 . . . nm , all ni are coprime, n1 + · · · + nm = O(N ), then M (q) (GF(q N )) = O(N 1+0.806 ). But the depth of this circuit is prohibitively high. 4.1. Multiplication and Inversion in Towers of Fields For the tower of fields GF(2n ), n = 2k , multiplier and invertor of complexity M (GF(2n )) = O(n1.58 ),
I(GF(2n )) = O(n1.58 )
were constructed in [82]. The method implies, for example, M (GF(21024 )) ≤ 357992,
I(GF(21024 )) ≤ 538033.
But the depth of the invertor is Ω(log3 n). In [83] it was proved that for any > 0 and any natural m > 1 one may choose a basis in the field GF(2n ), n = ms , s ≥ s , in such way that M (GF(2n )) < n1+/2 ,
I(GF(2n )) < n1+ .
116
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
In particular, estimates M (GF(2162 )) ≤ 19525,
I(GF(2162 )) ≤ 106278,
M (GF(2486 )) ≤ 158468,
I(GF(2486 )) ≤ 481789
were obtained employing a method with the next asymptotic complexity bounds for n = 8 · 3k : I(GF(2n )) = O nlog3 5 ,
M (GF(2n )) = O nlog3 5 .
The method looks more appropriate when n is of order of several thousands. The depth is also high. Further, for n = 2 · 3k M (GF(2n )) < n(log3 n) I(GF(2n )) < n(log3 n)
log2 log3 n +O(1) 2 log2 log3 n +O(1) 2
, .
4.2. Minimization of Inversion Depth in Composite Fields Methods to be observed in this section aim at constructing depth-efficient circuits for practical values of field’s order, though theoretically their depth is estimated as Ω(log2 n). Suppose that n is odd, DM (GF(2n )) ≥ DS (GF(2n )) + 1, where S(GF(2n )) is the complexity of squaring in GF(2n ). Applying a method from the paper [84], one can construct invertor and multiplier with the following recursive bounds on the complexity and the depth: M (GF(22n )) ≤ 3M (GF(2n )) + 4n,
DM (GF(22n )) ≤ DM (GF(2n )) + 2,
I(GF(22n )) ≤ I(GF(2n )) + 3M (GF(2n )) + S(GF(2n )) + 2n, DI (GF(22n )) ≤ DI (GF(2n )) + 2DM (GF(2n )) + 1. All results mentioned in the rest of this subsection were obtained in [85,86]. Suppose that (n, 3) = 1, B2 = {α, α2 , α4 } is the ONB in GF(23 ), where α3 = α2 + 1, and B1 is any basis in GF(2n ), DM (GF(2n )) ≥ DS (GF(2n )) + 2, then for multiplication in B = B1 ⊗ B2 we have M (GF(23n ) ≤ 6M (GF(2n )) + 12n,
DM (GF(23n )) ≤ DM (GF(2n )) + 3.
Further, for inversion in B we have the following recursions: I(GF(23n )) ≤ I(GF(2n )) + 9M (GF(2n )) + 3S(GF(2n )) + 8n, DI (GF(23n )) ≤ DI (GF(2n )) + 3DM (GF(2n )) + 1. If B1 is a normal basis, then S(GF(2n )) = 0.
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
117
If in the field tower GF(((2n )2 )2 ) the ONB {α1 , α12 } and the standard basis {1, α2 }, where α12 + α1 = 1, α22 + α2 = α1 , are chosen, then for the complexity and the depth of a multiplier the next relations hold M (GF(24n )) ≤ 9M (GF(2n )) + 20n,
DM (GF(24n )) ≤ DM (GF(2n )) + 4.
If we choose a normal basis in GF(2n ), then one can construct an invertor with the following recursive relations for complexity and depth I(GF(24n )) ≤ 14M (GF(2n )) + 14n + I(GF(2n )), DI (GF(24n )) ≤ 3DM (GF(2n )) + 2 + max{DI (GF(2n )), 2}. Suppose that (n, 5) = 1, B2 = {α, α2 , α4 , α8 , α16 }, where α5 = α4 + α2 + α + 1, B1 is any normal basis in GF(2n ) and B = B1 ⊗ B2 . Then for the multiplication in the basis B the next relations hold: M (GF(25n )) ≤ 15M (GF(2n )) + 40n,
DM (GF(25n ) ≤ DM (GF(2n )) + 4,
and for inversion: I(GF(25n )) ≤ I(GF(2n )) + 91M (GF(2n )) + 117n, DI (GF(25n ) ≤ DI (GF(2n )) + 3DM (GF(2n )) + 1 + max{DM (GF(2n )), 6}. The field GF(26n ) can be represented as an extension of GF(2n ) of degree 6. We choose in GF(26 ) an ONB B2 = {α, α2 , α4 , α8 , α16 , α32 }, where α6 = α5 +α4 +α+1. Also we choose in GF(2n ) arbitrary basis B1 and consider the basis B = B1 ⊗ B2 in GF(26n ). Suppose that DM (GF(2n )) ≥ DS (GF(2n )) + 2. Then for multiplication and inversion in B one has: M (GF(26n )) ≤ 21M (GF(2n )) + 60n,
DM (GF(26n )) ≤ DM (GF(2n )) + 4,
I(GF(26n )) ≤ I(GF(2n )) + 42M (GF(2n )) + 5S(GF(2n )) + 65n, DI (GF(26n )) = 4DM (GF(2n )) + 4 + max{DI (GF(2n )), 4}. Suppose that (n, 2) = 1, B1 = {α1 , α12 } ⊗ {1, α2 }, where α12 + α1 = 1, α22 + α2 = α1 and B2 = B1 ⊗ {1, α3 }, where α32 + α3 = α1 α2 , B is arbitrary basis in GF(2n ), then for the basis B2 ⊗ B in GF(28n ) the following relations hold: M (GF(28n )) ≤ 27M (GF(2n )) + 80n,
DM (GF(28n )) ≤ DM (GF(2n )) + 7.
If B is the normal basis, then I(GF(28n )) ≤ I(GF(2n )) + 45M (GF(2n )) + 101n, DI (GF(28n )) ≤ 4DM (GF(2n )) + 8 + max{DI (GF(2n )), 6}.
118
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
Table 1. I(GF(2n ))
DI (GF(2n ))
10
220
14
12
293
16
15
590
20
16
499
23
20
905
21
24
1 162
24
30
1 925
29
36
4 438
30
40
3 355
30
120
36 230
54
210
88 000
67
330
171 009
71
690
712 655
101
n
If we choose in GF(24 ) an ONB B1 = {α, α2 , α4 , α8 }, where α4 = α3 +α2 +α+1, then in GF(28 ) there exists a basis B2 = B1 ⊗ {1, β}, such that β 2 + β = α. One can choose in GF(2n ) a normal basis B and consider the basis B2 ⊗ B in GF(28n ). For the chosen basis in GF(28n ) the following bounds for the complexity and the depth are valid: M (GF(28n )) ≤ 30M (GF(2n )) + 82n,
DM (GF(28n )) ≤ DM (GF(2n )) + 5,
I(GF(28n )) ≤ I(GF(2n )) + 52M (GF(2n )) + 88n, DI (GF(28n )) ≤ 4DM (GF(2n )) + 6 + max{DI (GF(2n )), 2}. Let (n, 30) = 1. Then in GF(230n ) a normal basis can be chosen and multiplier and invertor can be constructed to prove relations: M (GF(230n )) ≤ 315M (GF(2n )) + 1140n, DM (GF(230n )) ≤ DM (GF(2n )) + 8, I(GF(230n )) ≤ I(GF(2n )) + 566M (GF(2n )) + 1537n, DI (GF(230n )) ≤ 6DM (GF(2n )) + 17 + max{DI (GF(2n )) + max{DM (GF(2n )), 6}, DM (GF(2n )) + 8}. Table 1 shows bounds on the depth and complexity of inversion in certain fields of characteristic 2. 5. Arithmetic in Pseudo-Mersenne Fields A prime number q of the form 2n ± c, where c is small, is called pseudo-Mersenne prime number. Several techniques for implementing multiplication in pseudo-Mersenne fields GF(q n ), n = 2k , 3k , were proposed in [87,88]. Special bases (so called optimal tower bases) were used.
S.B. Gashkov and I.S. Sergeev / Bit-Parallel Circuits for Arithmetic in Finite Fields
119
5.1. Multiplication in Optimal Tower Fields Improving the results of [87], in [88] multipliers of complexity
1 ≤ 3k M (GF(q)) + 5(3k − 2k )A(GF(q)) + (3k − 1)M (α0 , q), 2 k 2 ≤ 6k M (GF(q)) + 5(6k − 3k )A(GF(q)) + (6k − 1)M (α0 , q) M GF q 3 5
M GF q
2k
were constructed, where x