# Performing a dictionary attack on RSA/ECB with no padding

I have the exponent $$e=2^{16}+1$$ and modulus $$n$$ (154 digit number) of an RSA public key along with the ciphertext (64 bytes) encrypted using the same key with RSA/ECB and no padding.

I am required to decrypt the ciphertext and have two options:-

1. Find the prime factors of $$n$$, $$p$$ and $$q$$, to determine the private key which can then be used for decryption, or

2. Use a dictionary attack (~135k words)

The first option does not seem feasible to me considering how big the modulus is and so I think the second option is more likely.

My question then is, where would I begin with a dictionary attack on the above cipher text? My initial idea is to iterate through every word in the dictionary, encrypt it using the public key above and check to see if the cipher text contains the result, but words in the dictionary have lengths up to 30 so this would definitely take a while.

I think Python 3 might be acceptably fast just checking if pow(m,e,n)==c where m varies over the plaintexts appropriately converted to integer as in the encrption, and c is the ciphertext appropriately converted back to integer. For (perhaps only slightly) better speed, write a compiled program using GMP.