Professional Documents
Culture Documents
Debdeep Mukhopadhyay Assistant Professor Department of Computer Science and Engineering Indian Institute of Technology Kharagpur INDIA -721302
What is an S-Box?
S-Boxes are Boolean mappings from {0,1}m {0,1}n
m x n mappings
Thus there are n component functions each being a map from m bits to 1 bit
in other words, each component function is a Boolean function in m Boolean variables
Boolean Function
A Boolean function is a mapping from {0,1}m {0,1}
A Boolean function on n-inputs can be represented in minimal sum (XOR +) of products (AND .) form:
f(x1,,xn)=a0+a1. x1 ++an. xn+ a1,2.x1.x2++ an-1,n.xn-1.xn+ +a1,2,..,n x1.x2 ...xn
The ANF form is canonical If the and terms have all zero co-efficients we have an affine function If the constant term is further 0, we have a linear function
Boolean Function
A Boolean function is a mapping from {0,1}m {0,1}
f : n {0,1} be a Boolean Function. Binary sequence ( f ( 0 ), f (1 ),..., f ( 2n 1 )) is called the Truth Table of f
} is called sequence of f
Balanced Function
A Boolean function is said to be balanced if its truth table has equal number of ones and zeros. The Hamming weight of a binary sequence is the number of ones
Non-linearity
The non-linearity of a Boolean function can be defined as the distance between the function and the set of all affine functions.
N
f
= m in g n d ( f , g )
w h e re A n is th e s e t o f a ll a ffin e fu n c tio n s o v e r n
d ( f , g ) = 2n 1
1 < , > 2
Each row of Hn is the sequence of a linear function in x belonging to {0,1}n Each row, li is the sequence of the Boolean function,
g ( x) =< i , x >, i is the binary representation of i Note that i and x are not sequences, but they are binary tuples of length n
Example
f(x)=x1x2 ^ x3 does not satisfy SAC? Why? Consider =(001) f(x)^f(x^e1) is balanced, e1=(100) f(x)^f(x^e2) is balanced, e2=(010) f(x)^f(x^e3) is balanced, e3=(111)
1 0 0 A= 0 1 0 1 1 1
Bent Functions
Non-linearity of Boolean functions have an upper bound
N f 2 n 1 2 2
n 1
Functions which achieve this are called Bent functions They satisfy PC for all But they are always unbalanced Bent functions exist for even values of n
Example
f(x)=x1x2 ^ x3x4 is a Bent function in 4 variables If f is a Bent function
so is f ^ (affine function) f(xA ^ B) for a non-singular binary matrix A is also Bent
Exercise
Enumerate 8 distinct linear functions in 5 variables, x1, x2, x3, x4, x5 Concatenate their Truth-tables to obtain an 8 input, 5 output function. Store the resultant mapping as a 8x5 SBox. What is the non-linearity of your SBox? Does is satisfy SAC? If not, modify the function to do so.
Further Reading
J. Seberry, Zhang, Zhang, Cryptographic Boolean Functions via Group Hadamard Matrices, AJC Journal of Combinatorics, vol 10, 1994 K. Nyberg, Differentially Uniform Mappings for Cryptography, Eurocrypt 1993 K. Nyberg, Perfect Non-linear SBoxes, Eurocrypt 1991
10
11