Code for the paper “Small Public Exponent Brings More: Improved Partial Key Exposure Attacks against RSA".
Compared to previous results 1, we reduce the number of the leaked bits in
The Python implementation of our new attack is based on Joachim Vandersmissen's crypto-attacks.
-
SageMath with Python 3.11.1. SageMath 9.8 is recommended.
-
flatter (optional, for faster LLL-reduction) If flatter is not installed, you must set ifFlatter=False!!!
You can check your SageMath Python version using the following command:
$ sage -python --version
Python 3.11.1
Note: If your SageMath Python version is older than 3.11.1, some features in some scripts might not work.
Usage: sage -python <file>
For example
# Run toy exampples.
sage -python toyExampleBDF.py # Using previous attack
sage -python toyExampleBDF.py # Using our new attack
You can enable debugging by setting logging.basicConfig(filename='attack.log', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
in your code.
You can find more information on my personal website.
This script is released under the MIT License. See the LICENSE file for details.