6 releases

Uses new Rust 2024

new 0.3.1 Apr 21, 2025
0.3.0 Apr 17, 2025
0.2.1 Apr 17, 2025
0.2.0 Mar 21, 2023
0.1.0 Jun 3, 2022

#1682 in Cryptography

Download history 22/week @ 2024-12-30 174/week @ 2025-01-06 158/week @ 2025-01-13 133/week @ 2025-01-20 128/week @ 2025-01-27 185/week @ 2025-02-03 268/week @ 2025-02-10 116/week @ 2025-02-17 574/week @ 2025-02-24 596/week @ 2025-03-03 525/week @ 2025-03-10 305/week @ 2025-03-17 333/week @ 2025-03-24 328/week @ 2025-03-31 358/week @ 2025-04-07 642/week @ 2025-04-14

1,671 downloads per month
Used in 6 crates

Apache-2.0 OR MIT

135KB
473 lines

Usage (Hashing)

use ascon_hash::{AsconHash256, Digest};

let mut hasher = AsconHash256::new();
hasher.update(b"some bytes");
let digest = hasher.finalize();
assert_eq!(&digest[..], b"\xe9\x09\xc2\xf6\xda\x9c\xb3\x02\x84\x23\x26\x5c\x8f\x23\xfc\x2d\x26\xbf\xc0\xf3\xdb\x70\x46\x83\xef\x16\xb7\x87\xa9\x45\xed\x68");

Usage (XOF)

use ascon_hash::{AsconXof128, ExtendableOutput, Update, XofReader};

let mut xof = AsconXof128::default();
xof.update(b"some bytes");
let mut reader = xof.finalize_xof();
let mut dst = [0u8; 5];
reader.read(&mut dst);
assert_eq!(&dst, b"\x8c\x7d\xd1\x14\xa0");

Ascon hashes

Pure Rust implementation of the lightweight cryptographic hash function AsconHash256 and the extendable output functions (XOF) AsconXOF128.

Security Notes

No security audits of this crate have ever been performed.

USE AT YOUR OWN RISK!

Minimum Supported Rust Version

This crate requires Rust 1.85 at a minimum.

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~495–720KB
~18K SLoC