Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Implementation of the ROCA attack

License

NotificationsYou must be signed in to change notification settings

brunoproduit/roca

Repository files navigation

lint_pythonCodeQLGitHub issuesGitHub forksGitHub stars

Implementation of the ROCA attack (CVE-2017-15361)

This is the implementation of the paperReturn of the Coppersmith attack.

The implementation is in python 2.7 and uses the Howgrave-Graham code fromRSA-and-LLL-attacks.

For the detection of vulnerable keys, the code from the original authors of the paper is used (detect.py)crocs-muni

PR's welcome!

Usage

$ python roca.py <path to key> -j <number of cores>
$ python optimization.py <path to key> -j <number of cores>

Test

$ cd src$ cp ../test/test_roca.py .$ python test_roca.py

Optimization

The optimization is based on an analysis of properties observed from real keys exported from affected card (Infineon JavaCard SLJ52GCA150). The parameters a' and k' turn out to have a lower entropy than stated in the original paper.

alt text

a' is fixed at the MSB and biased to be even, This is used to shrink the bruteforce range and speedup the attack.

HPC

$ sbatch slurm.sh <path to key>

Organization of the Code

data/512.pem -> Vulnerable RSA 512-bit key

LICENSE -> APACHE 2.0

README.md -> This file

requirements.txt -> Python 2.7 requirements

HPC/optimization_hpc.py -> modified attack implemetation for HPC

HPC/slurm.sh -> SLURM start script for the attack

HPC/split_iteration.py -> helper for SCRUM

src/optimization.py -> Optimized ROCA attack

src/params.py -> Used to calculate the parameters

src/roca.py -> Non-optimized attack

src/roca.sage -> Pure sage version of the attack

src/detect.py ->crocs-muni

test/test_roca.py -> Test the attack


[8]ページ先頭

©2009-2025 Movatter.jp