Tool for standard attacks on the RSA cryptosystem
Open up the terminal on the directory containing RSAPoisoner.sage and run the following command:
sage RSAPoisoner.sage
When asked to enter data, enter the integer form of the data. Except for the conversions, all other options strictly take numbers as input.
- RSA Encrypt -> Performs unpadded RSA encryption
- RSA Decrypt (d known) -> Decrypts RSA when private exponent d is known
- RSA Decrypt (factors known) -> Decrypts RSA when factors of the prime modulus N are known
- Common Modulus Attack (External) -> Uncovers plaintext given external attacker details in a common modulus situation
- Common Modulus Attack (Internal) -> Uncovers private exponent d given internal attacker details in a common modulus situation
- Small Public Exponent Attack -> Uncovers plaintext when the public exponent is too small
- Hastad's Broadcast Attack -> Uncovers plaintext broadcasted e times using Hastad's broadcast attack
- Wiener's Attack -> Attempts to uncover private exponent d using Wiener's attack
- Fermat's Factorisation -> Attemps factorisation by Fermat's factorisation method
- Twin Primes Factorisation -> Attempts factorisaton of a product of twin primes
- Extract Modulus (e known) -> Extracts the unknown prime modulus N given appropriate plaintext-ciphertext pairs when public exponent e is known
- Extract Modulus (e unknown) -> Extracts the unknown prime modulus N given appropriate plaintext-ciphertext pairs when public exponent e is unknown
- String To Long -> Converts an ASCII string to its integer representation
- Long To String -> Converts an integer to its ASCII representation
- Hex To Long -> Converts a hexadecimal to its integer value
- Long To Hex -> Converts an integer into its hexadecimal value
- String To Hex -> Converts an ASCII string to its hexadecimal value
- Hex To String -> Converts a hexadecimal value to its ASCII string
- Exit -> Exits the tool
The current version of the tool performs absolutely NO error-handling. It assumes that the user enters appropriate inputs and does not try to crash the program. I plan on implementing error-handling in the future.