fffmath / ppfe-attack

Code for the paper “Partial prime factor exposure attacks on some RSA variants".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GIFP

Code for the paper “Partial prime factor exposure attacks on some RSA variants".

Introduction

This is a Python implementation of PPFE Attack based on Joachim Vandersmissen's crypto-attacks and Mengce Zheng's Boneh_Durfee_Attack.

Requirements

  • 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.

Usage

# 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

Debug

You can enable debugging by setting logging.basicConfig(filename='gifp.log', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s') in your code.

Note

It is important to note that there exist two root (-k, p+q-p0-q0) and (-k, p+q-p0-q0) in Theorem 4.

Author

You can find more information on my personal website.

License

This script is released under the MIT License. See the LICENSE file for details.

About

Code for the paper “Partial prime factor exposure attacks on some RSA variants".

License:MIT License


Languages

Language:Python 100.0%