From 64b34fb9d6ac0a65dee28139d02cbc318b10445a Mon Sep 17 00:00:00 2001 From: Scratchcat1 Date: Tue, 9 Jan 2018 13:46:28 +0000 Subject: [PATCH] Add files via upload -Fixed keyspace mistake. --- AATC_Crypto.py | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) diff --git a/AATC_Crypto.py b/AATC_Crypto.py index d620a38..926578c 100644 --- a/AATC_Crypto.py +++ b/AATC_Crypto.py @@ -1,5 +1,5 @@ #AATC crypto module -import codecs,recvall,ast,binascii,os,AATC_Config,AATC_CryptoBeta +import codecs,recvall,ast,os,AATC_Config,AATC_CryptoBeta from Crypto.Cipher import AES,PKCS1_OAEP from Crypto.PublicKey import RSA @@ -196,26 +196,7 @@ def SetEncryptionKeys(self,AESKey,IV): - - - - - - - - - - - - - - - - - - - - + ############################################## @@ -242,8 +223,8 @@ def SplitData(self,data): def GenerateKeys(AES_KeySize): - AESKey = binascii.b2a_hex(os.urandom(AES_KeySize//2)) # Here to allow regeneration of AES key while still in loop if required. - IV = binascii.b2a_hex(os.urandom(AES_KeySize//2)) + AESKey = os.urandom(AES_KeySize) # Here to allow regeneration of AES key while still in loop if required. + IV = os.urandom(AES_KeySize) return AESKey,IV