Skip to main content

A module to crack rsa.

Project description

Rsacrack is a library to carck rsa.

Install

Stable Version:

pip install -U rsacrack

Beta Version:

pip install --pre -U rsacrack

[Usage]

from rsacrack import crack_key
from rsa import newkeys, encrypt, decrypt, PublicKey, PrivateKey
from secrets import choice
from string import printable
from binascii import b2a_hex

key = newkeys(90)
pub_key = eval(str(key[0]).split('PublicKey')[1])
msg = choice(printable).encode('ascii')
encrypted = encrypt(msg, key[0])

priv_key = crack_key(pub_key)
hacked = decrypt(encrypted, PrivateKey(*priv_key)).decode('utf-8')
print(f'Plain Text: {msg.decode()}')
print(f'Cipher Text (HEX): {b2a_hex(encrypted).decode()}')
print(f'Hacked Plain Text: {hacked}')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rsacrack-1.0.1.tar.gz (11.0 kB view hashes)

Uploaded Source

Built Distribution

rsacrack-1.0.1-py3-none-any.whl (10.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page