Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
31affff
sha2: partial-bit messages, compile-time IVs, CAVP SHAVS tests (PR #88)
dghgit Sep 6, 2026
aec1ae4
sha3: partial-byte fixes, CAVP SHA3VS tests, mem-usage bench, release…
dghgit Sep 6, 2026
d604906
sha2, hmac: add SHA-512/224 and SHA-512/256 (FIPS 180-4 s. 5.3.6) and…
dghgit Sep 6, 2026
a57d508
rng: use core::fmt in hash_drbg80090a.rs; the only part of PRs #92-#9…
dghgit Sep 6, 2026
fa0be5d
sm3: add bouncycastle-sm3 (GB/T 32905-2016) and HMAC-SM3 with factory…
dghgit Sep 6, 2026
34d7953
Partial bytes follow ASN.1 BIT STRING order (X.690 s. 8.6.2): message…
dghgit Sep 6, 2026
1140a61
release notes: SM3 partial bytes follow the ASN.1 BIT STRING order li…
dghgit Sep 6, 2026
1ad97fd
sha2, sm3: document the surviving cargo-mutants equivalences at their…
dghgit Sep 6, 2026
fe6fd58
core: split BlockCipher into block-aligned BlockCipherEncryptor/Decry…
dghgit Sep 6, 2026
58a1fed
aes-lowmemory: add bouncycastle-aes-lowmemory, a constant-time, table…
dghgit Sep 6, 2026
aa9454d
modes: add BlockPermutation trait, bouncycastle-modes with AES CBC, a…
dghgit Sep 6, 2026
f56802e
padding: add Padding trait and bouncycastle-padding (PKCS7, PaddedEnc…
dghgit Sep 6, 2026
78a4021
core, modes, aes-lowmemory: in-place block cipher API with compile-ti…
dghgit Sep 6, 2026
c5f60fb
modes: add AES CFB128 mode with AES_CFB_* aliases, aes*-cfb CLI subco…
dghgit Sep 6, 2026
2c0567e
core: ElectronicCodeBook (was BlockPermutation), slice block hooks, b…
dghgit Sep 6, 2026
157b1c8
modes: add Ecb (SP 800-38A Sec 6.1) with AES_ECB_* aliases and aes*-e…
dghgit Sep 6, 2026
f6cb787
padding: add NoPadding (errors when asked to pad) with Padding::ALWAY…
dghgit Sep 6, 2026
a1c4e41
skills: add commit-range-report, a Markdown report of a commit range …
dghgit Sep 6, 2026
9c65521
mldsa, mlkem: replace the const-generic turbofish with sealed MLDSAPa…
ounsworth Sep 7, 2026
18a353a
core-test-framework: length-gate the strength sweep and assert it is …
officialfrancismendoza Sep 8, 2026
ca68d4c
ascon: add bouncycastle-ascon (SP 800-232 Ascon-AEAD128/Hash256/XOF12…
officialfrancismendoza Sep 8, 2026
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
57 changes: 57 additions & 0 deletions .claude/skills/commit-range-report/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: commit-range-report
description: Write a Markdown report summarising a range of commits on the current branch - branch name and commit list, public API changes and new functionality with code examples, then a per-commit summary. Use when asked to report on, summarise or document the commits since a given commit or between two commits.
---

# Commit range report

Produce a `.md` report for the commits from a start commit to an end commit (default: the branch
head), in this fixed structure:

1. **Title and preamble** — one sentence on what the range delivers as a whole.
2. **Branch and commits** — the branch name, then a table of every commit in the range with its
full SHA and subject, oldest first. Note how they got there (squash merge of PR #N, cherry-pick,
new work) when the subjects say so.
3. **Public API changes and new functionality** — grouped by crate, describing the API *as it is at
the end of the range*, not each intermediate shape. For every new or changed public trait, type,
alias or CLI subcommand: a short prose explanation of what it is for and any design rule behind
it, then a code example. Traits are shown as their signatures (`pub trait ... { fn ...; }`);
types are shown in use, end to end (construct a key, call the API, assert the result). Include
the CLI with shell examples when subcommands were added.
4. **Summary of each commit** — one paragraph per commit, numbered to match the table: what changed,
why, how it was verified, and the `files changed, insertions, deletions` line from `git show --stat`.
5. **Verification at the head** — formatting, tests, docs, and any vector suites that ran.

## Arguments

`$ARGUMENTS` is `<start-sha> [<end-ref>]`. The start commit is **included** in the range. If the end
is omitted use `HEAD`. If no argument is given, ask for the start commit.

## Procedure

Gather facts from the tree and git, never from memory of the session:

```sh
git rev-parse --abbrev-ref HEAD
git log --reverse --format='%H %s' <start>~1..<end>
for c in $(git log --reverse --format=%h <start>~1..<end>); do echo "$c: $(git show --stat --format= $c | tail -1)"; done
git diff --stat <start>~1 <end> # the whole range's footprint
```

For the API section, read the *current* source of every public item the range touched: trait
definitions (`awk '/^pub trait NAME/{p=1} p{print} p&&/^}/{exit}' file`), `pub use` / `pub struct` /
`pub type` lines, umbrella re-exports in `src/lib.rs`, and the CLI's `--help` output. Prefer taking
code examples from the crate's own doctests, since those are known to compile; adapt them minimally.
Quote spec citations exactly as the code does. Do not describe an API shape that a later commit in
the range replaced, except in the per-commit summary where it is history.

For the per-commit summaries, read each commit's message and stat; where a commit was a squash merge
or a cherry-pick with conflict resolution, say how the conflicts were resolved if the message or the
diff makes it clear.

## Output

Save the report as `local/<branch-slug>_<topic>_report.md` unless the user names a path (`local/` is
excluded from git on this checkout via `.git/info/exclude`; create it if absent), and leave it
uncommitted unless asked to commit it. Tell the user where it is. Keep the prose
in the house style: short sentences, one idea each, code only in fenced blocks, no em-dashes.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ mutants.out*/

.idea/
.vscode/

# Claude Code: ignore personal/local state, but share team tooling
# (skills, slash commands, subagents, and project settings.json).
.claude/*
!.claude/settings.json
!.claude/skills/
!.claude/commands/
!.claude/agents/
.claude/settings.local.json
.claude 2/
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ cargo run --release -p mem_usage_benches --bin bench_mldsa_mem_usage

The workspace has three top-level kinds of member:

1. `crypto/*` — one sub-crate per primitive (`sha2`, `sha3`, `hmac`, `hkdf`, `mlkem`, `mlkem_lowmemory`, `mldsa`, `mldsa_lowmemory`, `rng`, `hex`, `base64`, `utils`) plus the spine crates `core`, `core-test-framework`, and `factory`. Each crate is published as `bouncycastle-<name>` and depended on internally via the `workspace.dependencies` table in the root `Cargo.toml`.
2. `src/` — the umbrella `bouncycastle` crate, which is just `pub use` re-exports of every sub-crate (e.g. `bouncycastle::sha3`, `bouncycastle::mlkem`). It exists so downstream users can pull the whole library with one dependency; it has no code of its own.
1. `crypto/*` — one sub-crate per primitive (`sha2`, `sha3`, `sm3`, `hmac`, `hkdf`, `mlkem`, `mlkem_lowmemory`, `mldsa`, `mldsa_lowmemory`, `rng`, `hex`, `base64`, `utils`) plus the spine crates `core`, `core-test-framework`, and `factory`. Each crate is published as `bouncycastle-<name>` and depended on internally via the `workspace.dependencies` table in the root `Cargo.toml`.
2. `src/` — the umbrella `bouncycastle` crate, which is just `pub use` re-exports of every sub-crate (e.g. `bouncycastle::sha3`, `bouncycastle::sm3`, `bouncycastle::mlkem`). It exists so downstream users can pull the whole library with one dependency; it has no code of its own.
3. `cli/` — the `bc-rust` binary built on top of `bouncycastle`, exposing every primitive as a streaming stdin→stdout subcommand using `clap`.
4. `mem_usage_benches/` — stand-alone binary crates that measure peak stack usage of algorithms (cannot be done via criterion).

Expand Down
10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ version = "0.1.3"

# *** Internal Dependencies ***
bouncycastle = { path = "./" }
bouncycastle-aes-lowmemory = { path = "./crypto/aes-lowmemory" }
bouncycastle-ascon = { path = "./crypto/ascon" }
bouncycastle-base64 = { path = "./crypto/base64" }
bouncycastle-modes = { path = "./crypto/modes" }
bouncycastle-core = { path = "crypto/core" }
bouncycastle-core-test-framework = { path = "./crypto/core-test-framework" }
bouncycastle-factory = { path = "./crypto/factory" }
Expand All @@ -20,9 +23,11 @@ bouncycastle-mlkem = { path = "./crypto/mlkem" }
bouncycastle-mlkem-lowmemory = { path = "./crypto/mlkem-lowmemory" }
bouncycastle-mldsa = { path = "./crypto/mldsa" }
bouncycastle-mldsa-lowmemory = { path = "./crypto/mldsa-lowmemory" }
bouncycastle-padding = { path = "./crypto/padding" }
bouncycastle-rng = { path = "./crypto/rng" }
bouncycastle-sha2 = { path = "./crypto/sha2" }
bouncycastle-sha3 = { path = "./crypto/sha3" }
bouncycastle-sm3 = { path = "./crypto/sm3" }
bouncycastle-utils = { path = "./crypto/utils" }


Expand All @@ -41,6 +46,8 @@ version.workspace = true
edition.workspace = true

[dependencies]
bouncycastle-aes-lowmemory.workspace = true
bouncycastle-ascon.workspace = true
bouncycastle-base64.workspace = true
bouncycastle-core.workspace = true
bouncycastle-factory.workspace = true
Expand All @@ -51,6 +58,9 @@ bouncycastle-mldsa.workspace = true
bouncycastle-mldsa-lowmemory.workspace = true
bouncycastle-mlkem.workspace = true
bouncycastle-mlkem-lowmemory.workspace = true
bouncycastle-modes.workspace = true
bouncycastle-padding.workspace = true
bouncycastle-rng.workspace = true
bouncycastle-sha2.workspace = true
bouncycastle-sha3.workspace = true
bouncycastle-sm3.workspace = true
Loading
Loading