HOME

TheInfoList



OR:

In
cryptography Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or ''-logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adve ...
, an S-box (substitution-box) is a basic component of symmetric key algorithms which performs substitution. In block ciphers, they are typically used to obscure the relationship between the key and the ciphertext, thus ensuring Shannon's property of confusion. Mathematically, an S-box is a vectorial Boolean function. In general, an S-box takes some number of input
bit The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented a ...
s, ''m'', and transforms them into some number of output bits, ''n'', where ''n'' is not necessarily equal to ''m''. An ''m''×''n'' S-box can be implemented as a
lookup table In computer science, a lookup table (LUT) is an array that replaces runtime computation with a simpler array indexing operation. The process is termed as "direct addressing" and LUTs differ from hash tables in a way that, to retrieve a value v wi ...
with 2''m'' words of ''n'' bits each. Fixed tables are normally used, as in the Data Encryption Standard (DES), but in some ciphers the tables are generated dynamically from the key (e.g. the Blowfish and the Twofish encryption algorithms).


Example

One good example of a fixed table is the S-box from DES (S5), mapping 6-bit input into a 4-bit output: Given a 6-bit input, the 4-bit output is found by selecting the row using the outer two bits (the first and last bits), and the column using the inner four bits. For example, an input "011011" has outer bits "01" and inner bits "1101"; the corresponding output would be "1001". The eight S-boxes of DES were the subject of intense study for many years out of a concern that a '' backdoor'' (a vulnerability known only to its designers) might have been planted in the cipher. The S-box design criteria were eventually published (in ) after the public rediscovery of
differential cryptanalysis Differential cryptanalysis is a general form of cryptanalysis applicable primarily to block ciphers, but also to stream ciphers and cryptographic hash functions. In the broadest sense, it is the study of how differences in information input can aff ...
, showing that they had been carefully tuned to increase resistance against this specific attack. Biham and Shamir found that even small modifications to an S-box could significantly weaken DES.


Analysis and properties

There has been a great deal of research into the design of good S-boxes, and much more is understood about their use in block ciphers than when DES was released. Any S-box where any linear combination of output bits is produced by a bent function of the input bits is termed a perfect S-box. S-boxes can be analyzed using linear cryptanalysis and
differential cryptanalysis Differential cryptanalysis is a general form of cryptanalysis applicable primarily to block ciphers, but also to stream ciphers and cryptographic hash functions. In the broadest sense, it is the study of how differences in information input can aff ...
in the form of a ''Linear Approximation Table'' (LAT) or Walsh transform and ''Difference Distribution Table'' (DDT) or autocorrelation table and spectrum. Its strength may be summarized by the ''nonlinearity'' (bent, almost bent) and ''differential uniformity'' (perfectly nonlinear, almost perfectly nonlinear).


See also

* Bijection, injection and surjection * Boolean function *
Nothing-up-my-sleeve number In cryptography, nothing-up-my-sleeve numbers are any numbers which, by their construction, are above suspicion of hidden properties. They are used in creating cryptographic functions such as hashes and ciphers. These algorithms often need rando ...
* Permutation box (P-box) * Permutation cipher * Rijndael S-box * Substitution cipher


References


Further reading

* * * * *


External links


A literature survey on S-box design



"Substitution Box Design based on Gaussian Distribution"
{{Cryptography navbox , block Cryptographic algorithms