# Fractus
Fractus is a cryptographic attack library written in rust. It is also available through python
## Run
### Rust
`cargo add fractus`
```rust
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`
```python
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
- [x] MD4
- [x] MD5
- [x] SHA0
- [x] SHA1
- [x] SHA2_224
- [x] SHA2_256
- [x] SHA2_512
- [x] Ripemd128
- [x] Ripemd160
- [x] Ripemd256
- [x] Ripemd320
- [x] Whirlpool
Raw data
{
"_id": null,
"home_page": null,
"name": "fractus",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "crypto, attack",
"author": "GlacierSG <iamglaciersg@gmail.com>",
"author_email": "GlacierSG <iamglaciersg@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/39/5a/4155b2f518e1ddad5f4f7959f3f0455bc2796e8a231fbeb86703418f6c10/fractus-0.1.11.tar.gz",
"platform": null,
"description": "\n# Fractus\nFractus is a cryptographic attack library written in rust. It is also available through python\n\n## Run\n### Rust\n`cargo add fractus`\n\n```rust\nuse fractus::sha2_256;\n\nlet m = b\"abc\";\nlet h = sha2_256::compute(&m);\nlet e = b\"cde\";\nlet mut c = m.to_vec();\nc.extend(sha2_256::padding(m.len()));\nc.extend(e);\nlet e = sha2_256::extend(&h, m.len(), e);\nassert_eq!(e, sha2_256::compute(c));\n```\n\n### Python\n`pip install fractus`\n\n```python\nfrom fractus import sha2_256\n\nm = b'secret' + b'abc'\nh = sha2_256.compute(m)\ne = b'test'\nassert sha2_256.extend(h, len(m), e) == sha2_256.compute(m + sha2_256.padding(len(m)) + e)\n```\n\n## Features\n### Length Extension Attack\n- [x] MD4\n- [x] MD5\n- [x] SHA0\n- [x] SHA1\n- [x] SHA2_224\n- [x] SHA2_256\n- [x] SHA2_512\n- [x] Ripemd128\n- [x] Ripemd160\n- [x] Ripemd256\n- [x] Ripemd320\n- [x] Whirlpool\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Cryptographic attack library for Rust and Python",
"version": "0.1.11",
"project_urls": {
"Source Code": "https://github.com/GlacierSG/fractus"
},
"split_keywords": [
"crypto",
" attack"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b7ddb60000eb99b289e8a2641b050478953f9358933cb999ac7310b2620342fc",
"md5": "936e4f89f7f6b1c9864c8fb7e3f598a4",
"sha256": "fea2fd16c539ed5930c6d979a6f9f6ee01044382d70d117c57a7581c5b6d051a"
},
"downloads": -1,
"filename": "fractus-0.1.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "936e4f89f7f6b1c9864c8fb7e3f598a4",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": null,
"size": 572225,
"upload_time": "2024-09-18T19:03:44",
"upload_time_iso_8601": "2024-09-18T19:03:44.169696Z",
"url": "https://files.pythonhosted.org/packages/b7/dd/b60000eb99b289e8a2641b050478953f9358933cb999ac7310b2620342fc/fractus-0.1.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "395a4155b2f518e1ddad5f4f7959f3f0455bc2796e8a231fbeb86703418f6c10",
"md5": "8e2200680bd2d56d864b26e914a3c119",
"sha256": "cb22c1b074842e53e23dc55c02fbff95b39df4e9b6c3b7db617c5106215f1d20"
},
"downloads": -1,
"filename": "fractus-0.1.11.tar.gz",
"has_sig": false,
"md5_digest": "8e2200680bd2d56d864b26e914a3c119",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7595925,
"upload_time": "2024-09-18T19:03:50",
"upload_time_iso_8601": "2024-09-18T19:03:50.921682Z",
"url": "https://files.pythonhosted.org/packages/39/5a/4155b2f518e1ddad5f4f7959f3f0455bc2796e8a231fbeb86703418f6c10/fractus-0.1.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-18 19:03:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "GlacierSG",
"github_project": "fractus",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "fractus"
}