Cryptographic attack library for Rust and Python
Project description
Fractus
Fractus is a cryptographic attack library written in rust. It is also available through python
Run
Rust
cargo add fractus
use fractus::sha2_256;
let m = b"abc";
let h = sha2_256::compute(&m);
let e = b"cde";
let mut c = m.to_vec();
c.extend(sha2_256::padding(m.len()));
c.extend(e);
let e = sha2_256::extend(&h, m.len(), e);
assert_eq!(e, sha2_256::compute(c));
Python
pip install fractus
from fractus import sha2_256
m = b'secret' + b'abc'
h = sha2_256.compute(m)
e = b'test'
assert sha2_256.extend(h, len(m), e) == sha2_256.compute(m + sha2_256.padding(len(m)) + e)
Features
Length Extension Attack
- MD4
- MD5
- SHA0
- SHA1
- SHA2_224
- SHA2_256
- SHA2_512
- Ripemd128
- Ripemd160
- Ripemd256
- Ripemd320
- Whirlpool
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
fractus-0.1.12.tar.gz
(7.6 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fractus-0.1.12.tar.gz.
File metadata
- Download URL: fractus-0.1.12.tar.gz
- Upload date:
- Size: 7.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a24b784889acd6c98dbb9e532516560cd2f6976f083fd5a7449b2fec7289d445
|
|
| MD5 |
4b7429e1b46bd8c5c56bc26bf5159af3
|
|
| BLAKE2b-256 |
c6eae443f81f0e36746f156ffbdc86e7bebb806cc06be56474f66e76e43c46e7
|
File details
Details for the file fractus-0.1.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: fractus-0.1.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 696.8 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aedf10cd2a693042114b560be5e0735e361d5fad25f42aa542e9526027c165c4
|
|
| MD5 |
eb9920008882c9877a62d813c5d1ae2f
|
|
| BLAKE2b-256 |
9d996fa326919f5a34a705f7759d18dd93f38fe5fd31b28b6b1fabbb5694c2c0
|