Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import ascon-hash #459

Merged
merged 7 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/ascon-hash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: ascon-hash

on:
pull_request:
paths:
- ".github/workflows/ascon-hash.yml"
- "ascon-hash/**"
- "Cargo.*"
push:
branches: master

defaults:
run:
working-directory: ascon-hash

env:
RUSTFLAGS: "-Dwarnings"
CARGO_INCREMENTAL: 0

jobs:
set-msrv:
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
with:
msrv: 1.56.0

build:
needs: set-msrv
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- ${{needs.set-msrv.outputs.msrv}}
- stable
target:
- thumbv7em-none-eabi
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v3
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- run: cargo build --no-default-features --target ${{ matrix.target }}

minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}

test:
needs: set-msrv
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- ${{needs.set-msrv.outputs.msrv}}
- stable
steps:
- uses: actions/checkout@v3
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo check --all-features
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --all-features
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ members = [
"tiger",
"whirlpool",
]
exclude = ["belt-hash"]
exclude = [
"ascon-hash",
"belt-hash",
]

[profile.dev]
opt-level = 2
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
11 changes: 11 additions & 0 deletions ascon-hash/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

## 0.1.1 (2023-03-17)

* Use `aead` instead of `aead-core`.
* Bump MSRV to 1.60.
tarcieri marked this conversation as resolved.
Show resolved Hide resolved
* Add benchmarks.

## 0.1 (2022-06-03)

* Initial release.
34 changes: 34 additions & 0 deletions ascon-hash/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[package]
name = "ascon-hash"
version = "0.2.0-pre"
description = "Implementation of the Ascon and AsconA hashes and XOFs"
authors = [
"Sebastian Ramacher <sebastian.ramacher@ait.ac.at>",
"RustCrypto Developers",
]
license = "Apache-2.0 OR MIT"
readme = "README.md"
edition = "2021"
documentation = "https://docs.rs/ascon-hash"
repository = "https://github.com/RustCrypto/hashes"
keywords = ["crypto", "hash", "ascon"]
categories = ["cryptography", "no-std"]
rust-version = "1.56"

[workspace]

[dependencies]
digest = { version = "0.10", default-features = false, features = ["core-api"] }
ascon = "0.3"

[dev-dependencies]
spectral = { version = "0.6", default-features = false }
hex = "0.4"

[features]
default = ["std"]
std = ["digest/std"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
Loading