Code for the paper “Partial prime factor exposure attacks on some RSA variants".
This is a Python implementation of PPFE Attack based on Joachim Vandersmissen's crypto-attacks and Mengce Zheng's Boneh_Durfee_Attack.
-
SageMath with Python 3.11.1. SageMath 9.8 is recommended.
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.
# sage -python attack1.py to run the code in Thm 4
sage -python attack1.py
# sage -python attack2.py to run the code in Thm 5
sage -python attack2.py
You can enable debugging by setting logging.basicConfig(filename='gifp.log', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
in your code.
It is important to note that there exist two root (-k, p+q-p0-q0) and (-k, p+q-p0-q0) in Theorem 4.
You can find more information on my personal website.
This script is released under the MIT License. See the LICENSE file for details.