patarisac / patsac

A python toolkit that I created to help me solve cryptography CTF challenges.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

patsac

patsac is a Python toolkit that I created to help me solve cryptography CTF challenges. patsac is still in development and not well-written yet.

Requirements

Installation

Make sure that you have Python 3.8.x

python3 --version

Clone the repo

git clone https://github.com/patarisac/patsac.git

Install the requirements

python3 -m pip install -r requirements.txt

Run install.sh

./install.sh

Example usage

>>> from patsac import *
>>> n = 99407569212588161532909547486944244848185101486332777428538422741011884594253
>>> e = 65537
>>> c = 78974565643224754877770524051794297924332153266350749186075781326292672588454
>>> m = rsa.fermat.attack(c,e,n)
>>> n2s(m)
b'flag{just_a_sample_flag}'
>>> 
>>> from patsac.lcg import LCG
>>> known_states = [2818206783446335158, 3026581076925130250,
...                 136214319011561377, 359019108775045580,
...                 2386075359657550866, 1705259547463444505]
>>> rng = LCG()
>>> rng.crack(known_states)
(4611686018427387847, 302080878814014441, 3613230612905734352)
>>> (rng.n, rng.m, rng.c)
(4611686018427387847, 302080878814014441, 3613230612905734352)
>>> 

About

A python toolkit that I created to help me solve cryptography CTF challenges.

License:The Unlicense


Languages

Language:Python 94.8%Language:Shell 5.2%