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.11.tar.gz
(7.6 MB
view details)
Built Distribution
File details
Details for the file fractus-0.1.11.tar.gz
.
File metadata
- Download URL: fractus-0.1.11.tar.gz
- Upload date:
- Size: 7.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb22c1b074842e53e23dc55c02fbff95b39df4e9b6c3b7db617c5106215f1d20 |
|
MD5 | 8e2200680bd2d56d864b26e914a3c119 |
|
BLAKE2b-256 | 395a4155b2f518e1ddad5f4f7959f3f0455bc2796e8a231fbeb86703418f6c10 |
File details
Details for the file fractus-0.1.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fractus-0.1.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 572.2 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.5.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fea2fd16c539ed5930c6d979a6f9f6ee01044382d70d117c57a7581c5b6d051a |
|
MD5 | 936e4f89f7f6b1c9864c8fb7e3f598a4 |
|
BLAKE2b-256 | b7ddb60000eb99b289e8a2641b050478953f9358933cb999ac7310b2620342fc |