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
Release history Release notifications | RSS feed
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 details)
Built Distribution
rsacrack-1.0.1-py3-none-any.whl
(10.6 kB
view details)
File details
Details for the file rsacrack-1.0.1.tar.gz
.
File metadata
- Download URL: rsacrack-1.0.1.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7e4628595a32e8073d635718b481b44593dfd5c1b0856d26bd6fd74d361962f |
|
MD5 | 7aeabe58f3208b7abfa3d060a4172812 |
|
BLAKE2b-256 | 031a5be37977d4803829a850dff8e07e268adcf1db7d4e042d4545b87890c308 |
File details
Details for the file rsacrack-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: rsacrack-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d16c679b195b4f6643ea2543025a89cfe71a8f2bd25dc749f4972a1df6ef588f |
|
MD5 | ec65df11937e92b2914982b909f0b3de |
|
BLAKE2b-256 | 856b6be2789a62f1656dfa5c9a2151c3c61a20f0b6760e512b23cc2e3ba1d43d |