Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinas committed Mar 19, 2023
1 parent e38f327 commit 2e750e0
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 18 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions ascon-hash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ hex = "0.4"
[features]
default = ["std"]
std = ["digest/std"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
56 changes: 52 additions & 4 deletions ascon-hash/README.md
Original file line number Diff line number Diff line change
@@ -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.
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
23 changes: 9 additions & 14 deletions ascon-hash/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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)
//!
//! ```
Expand All @@ -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};
Expand Down

0 comments on commit 2e750e0

Please sign in to comment.