diff --git a/README.md b/README.md index 5a255d21..17283a66 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Additionally all crates do not require the standard library (i.e. `no_std` capab | Algorithm | Crate | Crates.io | Documentation | MSRV | [Security] | |-----------|-------|:---------:|:-------------:|:----:|:----------:| +| [Ascon] hash | [`ascon-hash`] | [![crates.io](https://img.shields.io/crates/v/ascon-hash.svg)](https://crates.io/crates/ascon-hash) | [![Documentation](https://docs.rs/ascon-hash/badge.svg)](https://docs.rs/ascon-hash) | ![MSRV 1.56][msrv-1.56] | :green_heart: | | [BelT] hash | [`belt-hash`] | [![crates.io](https://img.shields.io/crates/v/belt-hash.svg)](https://crates.io/crates/belt-hash) | [![Documentation](https://docs.rs/belt-hash/badge.svg)](https://docs.rs/belt-hash) | ![MSRV 1.57][msrv-1.57] | :green_heart: | | [BLAKE2] | [`blake2`] | [![crates.io](https://img.shields.io/crates/v/blake2.svg)](https://crates.io/crates/blake2) | [![Documentation](https://docs.rs/blake2/badge.svg)](https://docs.rs/blake2) | ![MSRV 1.41][msrv-1.41] | :green_heart: | | [FSB] | [`fsb`] | [![crates.io](https://img.shields.io/crates/v/fsb.svg)](https://crates.io/crates/fsb) | [![Documentation](https://docs.rs/fsb/badge.svg)](https://docs.rs/fsb) | ![MSRV 1.41][msrv-1.41] | :green_heart: | @@ -231,6 +232,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted [deps-image]: https://deps.rs/repo/github/RustCrypto/hashes/status.svg [deps-link]: https://deps.rs/repo/github/RustCrypto/hashes [msrv-1.41]: https://img.shields.io/badge/rustc-1.41.0+-blue.svg +[msrv-1.56]: https://img.shields.io/badge/rustc-1.56.0+-blue.svg [msrv-1.57]: https://img.shields.io/badge/rustc-1.57.0+-blue.svg [//]: # (crates) @@ -273,6 +275,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted [//]: # (algorithms) +[Ascon]: https://ascon.iaik.tugraz.at [BelT]: https://ru.wikipedia.org/wiki/BelT [BLAKE2]: https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE2 [FSB]: https://en.wikipedia.org/wiki/Fast_syndrome-based_hash diff --git a/ascon-hash/Cargo.toml b/ascon-hash/Cargo.toml index 4893c9f5..0350d1ae 100644 --- a/ascon-hash/Cargo.toml +++ b/ascon-hash/Cargo.toml @@ -26,3 +26,7 @@ hex = "0.4" [features] default = ["std"] std = ["digest/std"] + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/ascon-hash/README.md b/ascon-hash/README.md index ce763945..1ac9a41e 100644 --- a/ascon-hash/README.md +++ b/ascon-hash/README.md @@ -1,11 +1,59 @@ -# Ascon hash +# RustCrypto: Ascon -Pure Rust implementation of the lightweight cryptographic hash functions [AsconHash and AsconAHash](https://ascon.iaik.tugraz.at) and the extendable output functions (XOF)AsconXOF and AsconAXOF. +[![crate][crate-image]][crate-link] +[![Docs][docs-image]][docs-link] +![Apache2/MIT licensed][license-image] +![Rust Version][rustc-image] +[![Project Chat][chat-image]][chat-link] +[![Build Status][build-image]][build-link] + +Pure Rust implementation of the lightweight cryptographic hash functions +[AsconHash and AsconAHash][1] and the extendable output functions (XOF)AsconXOF +and AsconAXOF. + +[Documentation][docs-link] ## Security Notes -This crate has received no security audit. Use at your own risk. +No security audits of this crate have ever been performed. + +USE AT YOUR OWN RISK! + +## Minimum Supported Rust Version + +This crate requires **Rust 1.56** at a minimum. + +We may change the MSRV in the future, but it will be accompanied by a minor +version bump. ## License -This crate is licensed under the MIT license. \ No newline at end of file +Licensed under either of: + + * [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) + * [MIT license](http://opensource.org/licenses/MIT) + +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. + +[//]: # (badges) + +[crate-image]: https://img.shields.io/crates/v/ascon-hash.svg +[crate-link]: https://crates.io/crates/ascon-hash +[docs-image]: https://docs.rs/ascon-hash/badge.svg +[docs-link]: https://docs.rs/ascon-hash/ +[license-image]: https://img.shields.io/badge/license-Apache2.0/MIT-blue.svg +[rustc-image]: https://img.shields.io/badge/rustc-1.56+-blue.svg +[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg +[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260041-hashes +[build-image]: https://github.com/RustCrypto/hashes/workflows/ascon-hash/badge.svg?branch=master +[build-link]: https://github.com/RustCrypto/hashes/actions?query=workflow%3Aascon-hash + +[//]: # (general links) + +[1]: https://ascon.iaik.tugraz.at diff --git a/ascon-hash/src/lib.rs b/ascon-hash/src/lib.rs index 6838d43a..9b8d4d8f 100644 --- a/ascon-hash/src/lib.rs +++ b/ascon-hash/src/lib.rs @@ -1,17 +1,15 @@ // Copyright 2022 Sebastian Ramacher // SPDX-License-Identifier: Apache-2.0 OR MIT -//! # Hashing with [Ascon](https://ascon.iaik.tugraz.at/index.html) -//! -//! This crate provides implementations of the cryptographic hashes, AsconHash -//! and AsconAHash, which are both based on the Ascon permutation. Additionally, -//! it also contains implementations of the extendable output functions AsconXOF -//! and AsconAXOF. -//! -//! ## Security Notes -//! -//! This crate has received no security audit. Use at your own risk. -//! +#![no_std] +#![cfg_attr(docsrs, feature(doc_cfg))] +#![doc = include_str!("../README.md")] +#![doc( + html_logo_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg", + html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/meta/master/logo.svg" +)] +#![warn(missing_docs)] + //! ## Usage (Hashing) //! //! ``` @@ -36,9 +34,6 @@ //! assert_eq!(&dst, b"\xc2\x19\x72\xfd\xe9"); //! ``` -#![no_std] -#![warn(missing_docs)] - use core::marker::PhantomData; use ascon::{pad, State};