+"""Enciphering and deciphering using the [Autokey cipher](https://en.wikipedia.org/wiki/Autokey_cipher).
+Also attempts to break messages that use a Autokey cipher.
+"""
import math
import multiprocessing
from szyfrow.support.utilities import *
return cat(plaintext)
-
def autokey_sa_break( message
, min_keylength=2
, max_keylength=20
def autokey_sa_break_worker(message, key,
- t0, max_iterations, fitness):
-
+ t0, max_iterations, fitness):
temperature = t0
-
dt = t0 / (0.9 * max_iterations)
plaintext = autokey_decipher(message, key)