def constrainedAES(s):
 small_key = helpers.randomKey(26)
 real_key = (small_key + str(helpers.randomNumbers()))
 cipher = AES.new(real_key)
 encrypted = EncodeAES(cipher, s)
 return (encrypted, small_key, real_key)

def constrainedAES ( s ) : small_key = helpers . randomKey ( 26 ) real_key = ( small_key + str ( helpers . randomNumbers ( ) ) ) cipher = AES . new ( real_key ) encrypted = EncodeAES ( cipher , s ) return ( encrypted , small_key , real_key )
generates a constrained aes key which is later brute forced in a loop .