dsmush -10 Light Poster

Hi

trying to recover an RSA encrypted 5 character word using a forward search dictionary attack in Python but having difficulty. The word was encrypted in 2 24 bit blocks (3648141 5604637) padding last block with a space

e = 5
n = 21508387

table = {}
for ptext in range(65,90):
ctext = pow(ptext,e,n)
table[ctext] = ptext
print table

I know I need to do the above so that it decrypts all combinations 3 characters long AAA AAB... ZZA ZZB, etc by making the for loop gor around 3 times before applying the pow but what I have only decrypts single characters A B C.. X Y Z as I don't know how to do it 3 times how do I get it to decrypt 3 chars at a time?

The print out I get is lots of lines that feature things like {8521919L: 65} {7688462L: 66, 8521919L: 65} but I can't see my blocks in the results and I assume that the number before the the colon is the code block and the one after is the ASCII?

Can I please get some help with this, any advice? Thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.