L
Omri Bornstein We can adjust the key by shifting the key like when i is 2 and key is [1,2,3,4,5] the shifted key will be [3,4,5,1,2] key = key[len(known_cleartext) - i%len(known_cleartext):len(known_cleartext)] + key[:len(known_cleartext) - i%len(known_cleartext)] and now it works with every known text with length 5, for example "crypt"