In
cryptography, mod ''n'' cryptanalysis is an
attack
Attack may refer to:
Warfare and combat
* Offensive (military)
* Charge (warfare)
* Attack (fencing)
* Strike (attack)
* Attack (computing)
* Attack aircraft
Books and publishing
* ''The Attack'' (novel), a book
* '' Attack No. 1'', comic an ...
applicable to
block and
stream cipher
stream cipher is a symmetric key cipher where plaintext digits are combined with a pseudorandom cipher digit stream (keystream). In a stream cipher, each plaintext digit is encrypted one at a time with the corresponding digit of the keystream ...
s. It is a form of
partitioning cryptanalysis In cryptography, partitioning cryptanalysis is a form of cryptanalysis for block ciphers. Developed by Carlo Harpes in 1995, the attack is a generalization of linear cryptanalysis. Harpes originally replaced the bit sums ( affine transformations) ...
that exploits unevenness in how the
cipher
In cryptography, a cipher (or cypher) is an algorithm for performing encryption or decryption—a series of well-defined steps that can be followed as a procedure. An alternative, less common term is ''encipherment''. To encipher or encode i ...
operates over
equivalence class
In mathematics, when the elements of some set S have a notion of equivalence (formalized as an equivalence relation), then one may naturally split the set S into equivalence classes. These equivalence classes are constructed so that elements a ...
es (congruence classes)
modulo ''n''. The method was first suggested in 1999 by
John Kelsey,
Bruce Schneier, and
David Wagner and applied to RC5P (a variant of
RC5
In cryptography, RC5 is a symmetric-key block cipher notable for its simplicity. Designed by Ronald Rivest in 1994, ''RC'' stands for "Rivest Cipher", or alternatively, "Ron's Code" (compare RC2 and RC4). The Advanced Encryption Standard (AES) c ...
) and
M6 (a family of block ciphers used in the
FireWire
IEEE 1394 is an interface standard for a serial bus for high-speed communications and isochronous real-time data transfer. It was developed in the late 1980s and early 1990s by Apple in cooperation with a number of companies, primarily Sony an ...
standard). These attacks used the properties of binary addition and bit rotation modulo a
Fermat prime.
Mod 3 analysis of RC5P
For RC5P, analysis was conducted modulo 3. It was observed that the operations in the cipher (rotation and addition, both on 32-bit words) were somewhat biased over congruence classes mod 3. To illustrate the approach, consider left rotation by a single bit:
:
Then, because
:
it follows that
:
Thus left rotation by a single bit has a simple description modulo 3. Analysis of other operations (data dependent rotation and modular addition) reveals similar, notable biases. Although there are some theoretical problems analysing the operations in combination, the bias can be detected experimentally for the entire cipher. In (Kelsey et al., 1999), experiments were conducted up to seven rounds, and based on this they conjecture that as many as 19 or 20 rounds of RC5P can be
distinguished from random using this attack. There is also a corresponding method for recovering the secret
key
Key or The Key may refer to:
Common meanings
* Key (cryptography), a piece of information that controls the operation of a cryptography algorithm
* Key (lock), device used to control access to places or facilities restricted by a lock
* Key (map ...
.
Against M6 there are attacks mod 5 and mod 257 that are even more effective.
References
*
*
*
{{Cryptography navbox , block
Cryptographic attacks
Modular arithmetic