Skip to content

Commit 25f33f2

Browse files
committed
kmac: Initial crate submission
1 parent 711f5c6 commit 25f33f2

File tree

11 files changed

+1293
-43
lines changed

11 files changed

+1293
-43
lines changed

.github/workflows/kmac.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: kmac
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/kmac.yml"
7+
- "kmac/**"
8+
- "Cargo.*"
9+
push:
10+
branches: master
11+
12+
defaults:
13+
run:
14+
working-directory: kmac
15+
16+
env:
17+
CARGO_INCREMENTAL: 0
18+
RUSTFLAGS: "-Dwarnings"
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
strategy:
24+
matrix:
25+
rust:
26+
- 1.85.0 # MSRV
27+
- stable
28+
target:
29+
- thumbv7em-none-eabi
30+
- wasm32-unknown-unknown
31+
steps:
32+
- uses: actions/checkout@v5
33+
- uses: RustCrypto/actions/cargo-cache@master
34+
- uses: dtolnay/rust-toolchain@master
35+
with:
36+
toolchain: ${{ matrix.rust }}
37+
targets: ${{ matrix.target }}
38+
- run: cargo build --no-default-features --target ${{ matrix.target }}
39+
40+
minimal-versions:
41+
# disabled until belt-block gets published
42+
if: false
43+
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
44+
with:
45+
working-directory: ${{ github.workflow }}
46+
47+
test:
48+
runs-on: ubuntu-latest
49+
strategy:
50+
matrix:
51+
rust:
52+
- 1.85.0 # MSRV
53+
- stable
54+
steps:
55+
- uses: actions/checkout@v5
56+
- uses: RustCrypto/actions/cargo-cache@master
57+
- uses: dtolnay/rust-toolchain@master
58+
with:
59+
toolchain: ${{ matrix.rust }}
60+
- uses: RustCrypto/actions/cargo-hack-install@master
61+
- run: cargo hack test --feature-powerset
62+
- run: cargo test --release --all-features

Cargo.lock

Lines changed: 109 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ members = [
55
"cbc-mac",
66
"cmac",
77
"hmac",
8+
"kmac",
89
"pmac",
910
"retail-mac",
1011
]

kmac/Cargo.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[package]
2+
name = "kmac"
3+
version = "0.1.0"
4+
description = "Keccak Message Authentication Code (KMAC)"
5+
authors = ["RustCrypto Developers"]
6+
license = "MIT OR Apache-2.0"
7+
edition = "2024"
8+
readme = "README.md"
9+
documentation = "https://docs.rs/kmac"
10+
repository = "https://github.com/RustCrypto/MACs"
11+
keywords = ["crypto", "mac", "kmac", "digest"]
12+
categories = ["cryptography", "no-std"]
13+
rust-version = "1.85"
14+
15+
[dependencies]
16+
digest = { version = "0.11.0-rc.3", features = ["mac"] }
17+
sha3 = "0.11.0-rc.3"
18+
19+
[dev-dependencies]
20+
digest = { version = "0.11.0-rc.3", features = ["dev"] }
21+
hex-literal = "1.1.0"
22+
hex = "0.4.3"

0 commit comments

Comments
 (0)