Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AES Decryption too slow
#6
import base64
from Crypto.Cipher import AES


message = open ('aestest.txt', 'r')
results = open ('results.txt', 'w')


bloo = message.read()
decoded = base64.b64decode(bloo)

x = 0 

while x <= 99999999:

    y = "%08d" % (x)
    keyword = '546327364536211087236533' + y
    print 'Attempt number: ' + y

    
    decryptor = AES.new(keyword, AES.MODE_ECB)
    results.write(y + ' ' + decryptor.decrypt(decoded) + '\n')

    x +=1

print 'Check the results file!'

results.close()
Yes you are correct. I'm talking bytes not bits (sorry, very new to this still). so it's the last 8 bytes that are variable and only numeric.

I've posted my script above. The message to be decoded is base64 encoded to start with and it uses ECB mode for AES decryption as we know there's no IV used.

The output file size racks up quickly and that when i'm only in the 10,000 range of combinations. We're talking 200MB size.

killerrex - I'll look at your code in a minute and see if it works any better thanks.

Any other advice from anyone would be greatly appreciated.
Reply


Messages In This Thread
AES Decryption too slow - by Hairy_Ape - May-04-2018, 11:13 PM
RE: AES Decryption too slow - by killerrex - May-04-2018, 11:53 PM
RE: AES Decryption too slow - by Hairy_Ape - May-05-2018, 12:03 AM
RE: AES Decryption too slow - by killerrex - May-05-2018, 12:01 PM
RE: AES Decryption too slow - by micseydel - May-05-2018, 12:14 AM
RE: AES Decryption too slow - by Hairy_Ape - May-07-2018, 04:22 PM
RE: AES Decryption too slow - by killerrex - May-07-2018, 09:44 PM
RE: AES Decryption too slow - by Hairy_Ape - May-08-2018, 08:00 PM
RE: AES Decryption too slow - by Hairy_Ape - May-09-2018, 11:05 AM
RE: AES Decryption too slow - by killerrex - May-09-2018, 11:53 AM
RE: AES Decryption too slow - by Hairy_Ape - May-10-2018, 06:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Decryption not working if key has same symbol like text Paragoon2 0 907 Nov-11-2023, 09:32 PM
Last Post: Paragoon2
  encryption and decryption with python ibrahim 1 2,539 May-16-2020, 03:14 PM
Last Post: Larz60+
  cipher decryption tool nightfox82 0 1,939 Mar-25-2020, 06:36 AM
Last Post: nightfox82
  Regarding encryption and decryption naressh1994 1 3,220 Jan-25-2019, 07:26 AM
Last Post: buran
  What is an Encryption And Decryption Lamon112 8 8,726 Jan-14-2017, 10:14 PM
Last Post: Kebap

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020