Skip to content
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
72 changes: 72 additions & 0 deletions .github/workflows/cshake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: cshake

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

defaults:
run:
working-directory: cshake

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"

# Cancels CI jobs when new commits are pushed to a PR branch
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
set-msrv:
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
with:
msrv: 1.85.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@v6
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack build --target ${{ matrix.target }} --each-feature

test:
needs: set-msrv
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- ${{needs.set-msrv.outputs.msrv}}
- stable
steps:
- uses: actions/checkout@v6
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack test --feature-powerset

minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}
72 changes: 72 additions & 0 deletions .github/workflows/turbo-shake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: turbo-shake

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

defaults:
run:
working-directory: turbo-shake

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"

# Cancels CI jobs when new commits are pushed to a PR branch
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
set-msrv:
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master
with:
msrv: 1.85.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@v6
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack build --target ${{ matrix.target }} --each-feature

test:
needs: set-msrv
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- ${{needs.set-msrv.outputs.msrv}}
- stable
steps:
- uses: actions/checkout@v6
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack test --feature-powerset

minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
working-directory: ${{ github.workflow }}
36 changes: 27 additions & 9 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ members = [
"bash-hash",
"belt-hash",
"blake2",
"cshake",
"fsb",
"gost94",
"groestl",
Expand All @@ -24,6 +25,7 @@ members = [
"sm3",
"streebog",
"tiger",
"turbo-shake",
"whirlpool",
]

Expand All @@ -32,5 +34,5 @@ opt-level = 2

[patch.crates-io]
sha1 = { path = "sha1" }
sha3 = { path = "sha3" }
turbo-shake = { path = "turbo-shake" }
whirlpool = { path = "whirlpool" }
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ easily used for bare-metal or WebAssembly programming by disabling default crate
| [Bash] hash | [`bash‑hash`] | [![crates.io](https://img.shields.io/crates/v/bash-hash.svg)](https://crates.io/crates/bash-hash) | [![Documentation](https://docs.rs/bash-hash/badge.svg)](https://docs.rs/bash-hash) | 1.85 | :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) | 1.85 | :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) | 1.85 | :green_heart: |
| [cSHAKE] | [`cshake`] | [![crates.io](https://img.shields.io/crates/v/cshake.svg)](https://crates.io/crates/cshake) | [![Documentation](https://docs.rs/cshake/badge.svg)](https://docs.rs/cshake) | 1.85 | :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) | 1.85 | :green_heart: |
| [GOST R 34.11-94][GOST94] | [`gost94`] | [![crates.io](https://img.shields.io/crates/v/gost94.svg)](https://crates.io/crates/gost94) | [![Documentation](https://docs.rs/gost94/badge.svg)](https://docs.rs/gost94) | 1.85 | :yellow_heart: |
| [Grøstl] (Groestl) | [`groestl`] | [![crates.io](https://img.shields.io/crates/v/groestl.svg)](https://crates.io/crates/groestl) | [![Documentation](https://docs.rs/groestl/badge.svg)](https://docs.rs/groestl) | 1.85 | :green_heart: |
Expand All @@ -40,6 +41,7 @@ easily used for bare-metal or WebAssembly programming by disabling default crate
| [SM3] (OSCCA GM/T 0004-2012) | [`sm3`] | [![crates.io](https://img.shields.io/crates/v/sm3.svg)](https://crates.io/crates/sm3) | [![Documentation](https://docs.rs/sm3/badge.svg)](https://docs.rs/sm3) | 1.85 | :green_heart: |
| [Streebog] (GOST R 34.11-2012) | [`streebog`] | [![crates.io](https://img.shields.io/crates/v/streebog.svg)](https://crates.io/crates/streebog) | [![Documentation](https://docs.rs/streebog/badge.svg)](https://docs.rs/streebog) | 1.85 | :yellow_heart: |
| [Tiger] | [`tiger`] | [![crates.io](https://img.shields.io/crates/v/tiger.svg)](https://crates.io/crates/tiger) | [![Documentation](https://docs.rs/tiger/badge.svg)](https://docs.rs/tiger) | 1.85 | :green_heart: |
| [TurboSHAKE] | [`turbo-shake`] | [![crates.io](https://img.shields.io/crates/v/turbo-shake.svg)](https://crates.io/crates/turbo-shake) | [![Documentation](https://docs.rs/turbo-shake/badge.svg)](https://docs.rs/turbo-shake) | 1.85 | :green_heart: |
| [Whirlpool] | [`whirlpool`] | [![crates.io](https://img.shields.io/crates/v/whirlpool.svg)](https://crates.io/crates/whirlpool) | [![Documentation](https://docs.rs/whirlpool/badge.svg)](https://docs.rs/whirlpool) | 1.85 | :green_heart: |

NOTE: the [`blake3`] crate implements the `digest` traits used by the rest of the hashes in this repository, but is maintained by the BLAKE3 team.
Expand Down Expand Up @@ -94,6 +96,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
[`bash‑hash`]: ./bash-hash
[`belt‑hash`]: ./belt-hash
[`blake2`]: ./blake2
[`cshake`]: ./cshake
[`fsb`]: ./fsb
[`gost94`]: ./gost94
[`groestl`]: ./groestl
Expand All @@ -113,6 +116,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
[`sm3`]: ./sm3
[`streebog`]: ./streebog
[`tiger`]: ./tiger
[`turbo-shake`]: ./turbo-shake
[`whirlpool`]: ./whirlpool

[//]: # (footnotes)
Expand All @@ -138,6 +142,7 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
[Bash]: https://apmi.bsu.by/assets/files/std/bash-spec241.pdf
[BelT]: https://ru.wikipedia.org/wiki/BelT
[BLAKE2]: https://en.wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE2
[cSHAKE]: https://csrc.nist.gov/pubs/sp/800/185/final
[FSB]: https://en.wikipedia.org/wiki/Fast_syndrome-based_hash
[GOST94]: https://en.wikipedia.org/wiki/GOST_(hash_function)
[Grøstl]: https://en.wikipedia.org/wiki/Grøstl
Expand All @@ -158,3 +163,4 @@ Unless you explicitly state otherwise, any contribution intentionally submitted
[Streebog]: https://en.wikipedia.org/wiki/Streebog
[Whirlpool]: https://en.wikipedia.org/wiki/Whirlpool_(cryptography)
[Tiger]: http://www.cs.technion.ac.il/~biham/Reports/Tiger/tiger/tiger.html
[TurboSHAKE]: https://keccak.team/turboshake.html
11 changes: 11 additions & 0 deletions cshake/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.1.0 (UNRELEASED)
- Initial release with implementation moved from the `sha3` crate ([#815])

[#815]: https://github.com/RustCrypto/hashes/pull/815
30 changes: 30 additions & 0 deletions cshake/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[package]
name = "cshake"
version = "0.1.0"
authors = ["RustCrypto Developers"]
edition = "2024"
rust-version = "1.85"
documentation = "https://docs.rs/sha3"
readme = "README.md"
repository = "https://github.com/RustCrypto/hashes"
license = "MIT OR Apache-2.0"
keywords = ["sha3", "keccak", "hash", "xof", "digest"]
categories = ["cryptography", "no-std"]
description = "Implementation of the cSHAKE family of extendable-output functions (XOFs)"

[dependencies]
digest = "0.11"
keccak = "0.2"

[dev-dependencies]
digest = { version = "0.11", features = ["dev"] }
hex-literal = "1"

[features]
default = ["alloc", "oid"]
alloc = ["digest/alloc"]
oid = ["digest/oid"] # Enable OID support.
zeroize = ["digest/zeroize"]

[package.metadata.docs.rs]
all-features = true
Loading
Loading