Using rainbow tables to find encryption keys of block ciphers? Hi I have a question in mind.


  Let's consider a block cipher whose key length is 36 bits.
  The bit-length of the plaintext is 256 bits, but there are only 16 possible plaintexts $m_0, m_1, . . . , m_{15}$. The encryptions are carried out in ECB mode and thus no IV is involved. We want to build a rainbow table such that, on input a ciphertext, we can readily find the key and the plaintexts. 


How do we go about constructing a rainbow table for this purpose?
Define a function that takes the 4-bit plaintext identifier and the 36-bit key as input. For the purpose of the rainbow table you can treat it as an opaque 40-bit value.

The output of this function is the ciphertext you get when you encrypt the plaintext corresponding to the identifier with the specified key.

One you have this function, you can proceed with the rainbow table creation like you'd do for any other function.