# This program proves that the keyspace of the affine cipher is limited
# to less than len(SYMBOLS) ^ 2.

import affineCipher, cryptomath

message = 'Make things as simple as possible, but not simpler.'
for keyA in range(2, 80):
    key = keyA * len(affineCipher.SYMBOLS) + 1

    if cryptomath.gcd(keyA, len(affineCipher.SYMBOLS)) == 1:
        print(keyA, affineCipher.encryptMessage(key, message))
@@ -103,39 +103,163 @@
 2.%0A%0A
-import affineCipher, cryptomath
+from books.CrackingCodesWithPython.Chapter14.affineCipher import encryptMessage, SYMBOLS%0Afrom books.CrackingCodesWithPython.Chapter13.cryptomath import gcd
 %0A%0Ame
@@ -363,37 +363,24 @@
  keyA * len(
-affineCipher.
 SYMBOLS) + 1
@@ -392,19 +392,8 @@
  if 
-cryptomath.
 gcd(
@@ -402,29 +402,16 @@
 yA, len(
-affineCipher.
 SYMBOLS)
@@ -442,21 +442,8 @@
 yA, 
-affineCipher.
 encr
@@ -467,8 +467,9 @@
 essage))
+%0A

Update affineKeyTest: fixed imports