Given a plaintext:
Now is the time for all good men to come to the aid of their country because the quick brown fox jumped over the lazy dog.
and a substitution ciphertext:
Mpe od yjr yo,r gpt s;; hppf ,rm yp vp,r yp yjr sof pg yjrot vpimytu nrvsidr yjr wiovl ntpem gpc ki,[rf pbrt yjr ;sxu fph/
It is trivial to come up with the substitution cipher. However, in this case, the minimum description length of the substitution cipher is not to simply pair each character with its bijection, but rather to describe the QWERTY keyboard layout parameterized with "shift your fingers right one place".
In this case, the "key" contains a 2D structure -- the QWERTY keyboard layout.
Are there general mathematical theorems capable of extracting such hidden structure?