M8 (cipher)


In cryptography, M8 is a block cipher designed by Hitachi in 1999. The algorithm negotiates introduced in 1997 M6, with the modified key length, which is enlarged to 64 bits or more. This cipher operates with Feistel network and designed to reach high performance on small implementation or 32 bits devices. For instance, by using round numbers = 10 it present encryption speed at 32 Mbps for dedicated hardware of 6K gates and 25 MHz clock or 208 Mbps for program, that uses C-language and Pentium-I 266 MHz. Due to the openness of description, it should not be used in open or multivendor software.

Structure of algorithm

Basic structure

The structural characteristics are that the cipher is based on substitution-permutation block like DES. There are 3 kinds of calculations: 32-bit circular rotation, addition in modulus 232 and 32 bits-wise XOR. Actual function may be different each round. Key is used to be calculated using its value and that defines actual function each round.
After decision process, which is using round number, decision and expansion keys, the algorithm gets basic function or. Then it is used either by key scheduler, that products 256 bits execution key, and encryption/decryption block.
Algorithm decision key is consist of 24 bits. First 9 bits determine calculations: 0 means addition in 232modulus, 1 means bit-wise XOR. Other 3 blocks for 5 bits define left circular rotations. Algorithm expansion key concludes 3 blocks for 32bits, which determine α,β and γ.
The difference between basic function is only in the order of permutations: does it in the end, - at the beginning of calculation block.

Structure of basic functions

The structure has 9 blocks of calculations and 3 optionally blocks of left circle rotations.

It has a 64-bit block size and also 64-bit key length. It is Feistel cipher with S-blocks, that are dependent on large execution key.

At the start, there is permutation for. Then algorithm takes the first block of plaintext and makes calculation 1 using KL, then it optionally does rotation and goes to calculation 2. The it repeats, but there is α instead of KL. Then it uses β for doing cal. 5. Then algorithm does calculations and rotation, described earlier, but using KR. Further, it is used γ to do calc.8 and obtained result calculates with the other block of plaintext. In conclusion, algorithm permutates blocks.

For the it is the same, excluding the order of permutation and calculations of blocks.

Key schedule

The execution key obtains from 256-bit key expansion key, which divides into 2 identical set of four 64-bit blocks K0–K3, and 64 bit of data key. Every block of key expansion key is used to calculate with 32 bit of data key by and gives eight 32-bit blocks of expansion key on the output.

Encryption

Obtained expansion key divides into 4 pair block of 32-bit. This block divides into 32 bits of left and right range it is used to do calculations with 64-bit plaintext blocks using 4 subsequent steps. Then obtained ciphertext encrypts again using the same pairs of block of expansion key and the same steps round times.

Decryption

To decrypt cipher text it is enough to do the same operation, but using the another basic function.

Modes of operation

As determined in ISO 8372 or ISO/IEC 101116 there are 4 applicable modes:
  1. Electronic Codebook mode
  2. *The simplest encryption mode. Using this plaintext divides into blocks, which encrypts separately. The disadvantage of this method is the lack of diffusion. It means that data hides not enough well and it is not recommended to use for cryptographic protocols at all.
  3. Cipher Block Chaining mode
  4. *In this mode each block of plaintext is XORed with the previous before being encrypted. Every block will depend on all previous blocks and it should be used initialization vector in the first block to make each message unique.
  5. Cipher Feedback mode
  6. *This mode mode, a close relative of CBC, makes a block cipher into a self-synchronizing stream cipher. Operation is very similar; in particular, CFB decryption is almost identical to CBC encryption performed in reverse.
  7. Output Feedback mode
  8. *This mode makes a block cipher into a synchronous stream cipher. It generates keystream blocks, which are then XORed with the plaintext blocks to get the ciphertext. Just as with other stream ciphers, flipping a bit in the ciphertext produces a flipped bit in the plaintext at the same location. This property allows many error correcting codes to function normally even when applied before encryption.
    Because of the symmetry of the XOR operation, encryption and decryption are exactly the same.

    Cryptoanalysis

Once this pair is identified, the key can be easily extracted from this pairing, and the cipher is broken because of vulnerability to known-plaintext attacks.
The process of finding a slid pair can be different but follows the same basic scheme.One uses the fact that it is relatively easy to extract the key from just one iteration of F. Choose any pair ofplaintext-ciphertext pairs, and check to see what the keys corresponding to and are. If these keys match, this is a slid pair; otherwise move on to the next pair.
With plaintext-ciphertext one slid pair is expected. The number of false-positives depends on structure of the algorithm. False-positives can be reduced by applying keys to different message-cipherkey pair, because it is very low possibility for a good cipher, that the wrong key can correctly encrypt >2 messages.
Sometimes the structure of the cipher greatly reduces the number of plaintext-ciphertext pairs needed, and thus also a large amount of the work.
The clearest of these examples is the Feistel cipher using a cyclic key schedule.The reason for this is given a the search is for a. This reduces the possible paired messages from down to and so at most plaintext-ciphertext pairs are needed in order to find a slid pair.