Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
18874dd
ML-DSA!
ounsworth Mar 22, 2026
56f1f0b
Added mldsa-lowmemory, and other improvements
ounsworth Apr 3, 2026
c349934
mldsa-lowmemory docs fix
ounsworth Apr 3, 2026
c973bee
Turning off the benches on github
ounsworth Apr 3, 2026
20b8a93
docs typos
ounsworth Apr 3, 2026
2de6e4c
Added slow is smooth and smooth is fast philosophy
ounsworth Apr 5, 2026
aefbb6a
Merging the (mostly) completed ML-KEM and related updates to ML-DSA a…
ounsworth May 28, 2026
7f72018
addressed doc discrepancy, relates to github #6
dghgit May 29, 2026
200c1cb
commented out mlkem/tests/bc_test_data.rs because it only works on my…
ounsworth May 31, 2026
cc0f3dd
Closes github issue #6
ounsworth May 31, 2026
0fc949b
adjusted TODO list
ounsworth Jun 1, 2026
5200134
adjusted TODO list
ounsworth Jun 1, 2026
f4f5b65
tweaked quality and style guide
ounsworth Jun 2, 2026
05500ff
tweaked quality and style guide
ounsworth Jun 2, 2026
aa5d681
Exposing mlkem internal functions for testing by crucible
ounsworth Jun 13, 2026
8a0b0d7
add zeroize as a dependency in bouncycastle-core
tad-fr Jun 19, 2026
21ecce8
Replace Drop supertrait for Secret trait with ZeroizeOnDrop and imple…
tad-fr Jun 19, 2026
417b59b
Derive ZeroizeOnDrop to replace zeroize() for KeyMaterial
tad-fr Jun 19, 2026
532ba1b
propagate zeroize in bouncycastle-mldsa
tad-fr Jun 20, 2026
f640b94
propagate zeroize inbouncycastle-mldsa-lowmemory
tad-fr Jun 20, 2026
88eafdd
propagate zeroize in bouncycastle-mlkem
tad-fr Jun 20, 2026
f15fdc0
propagate zeroize in bouncycastle-mlkem-lowmemory
tad-fr Jun 20, 2026
4bcb2c0
fix whitespace overwrites
tad-fr Jun 20, 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
37 changes: 19 additions & 18 deletions .github/workflows/publish_doc_benches_to_ghpages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,22 @@ jobs:
with:
name: code_quality_stats
path: ./code_stats.txt
run_benches:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: cargo bench --all
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: bc-rust-benches
path: ./target/criterion
# the benches run crazy slow on the github agent. So there's really no point because it's not useful data.
# run_benches:
# runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main'
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - run: cargo bench --all
# - name: Save artifacts
# uses: actions/upload-artifact@v4
# with:
# name: bc-rust-benches
# path: ./target/criterion
collect_ghpages:
if: github.ref == 'refs/heads/main'
needs: [build_docs, code_stats, run_benches]
needs: [build_docs, code_stats]
runs-on: ubuntu-latest
steps:
- run: mkdir ./gh-pages
Expand All @@ -65,11 +66,11 @@ jobs:
with:
name: code_quality_stats
path: ./gh-pages/
- name: Get benches from previous job
uses: actions/download-artifact@v4
with:
name: bc-rust-benches
path: ./gh-pages/benches
# - name: Get benches from previous job
# uses: actions/download-artifact@v4
# with:
# name: bc-rust-benches
# path: ./gh-pages/benches
- name: Archive Compatibility Matrix For Download
uses: actions/upload-pages-artifact@v3
with:
Expand Down
19 changes: 18 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ before posting anything public. See [Security Policy](SECURITY.md).

If a related discussion or issue doesn't exist, and the issue is not security related, you can [open a new issue](https://github.com/bcgit/bc-java/issues/new). An issue can be converted into a discussion if regarded as one.

## Coding philosophy

> Slow is smooth, smooth is fast.

There is a time and a place for "Move fast and break things", but the source code of a crypto library is not one of them.

This project takes the philosophy that taking the time to do things right pays off in the long run, both in terms of
the runtime and memory footprint of the code, and it terms of the time required for a future maintainer to get up to speed with the code
and avoid introducing bugs due to the code being hard to understand.

Some specifics:

* Respect that the innovative process sometimes requires exploring several dead-ends before you find the most elegant solution.
* Public APIs of a library should be both ergonomic and expressive. When defining a new trait or public function, ask yourself whether a programmer who is new to cryptography is likely to use this in a way that will get them into trouble.
* Variables should be well-named, well-structured, and well-commented (a comment-to-code ration of 1:1 is a goal to be strived for!). Think about memory footprint and, where possible, use unnamed scopes to allow the compiler to pop intermediate value variables off the stack as soon as they are no longer needed.
* Always run your code through `cargo mutants` and get the issue count as low as your can. As a first pass, this forces you to write thorough unit tests. As a second pass, this draws your attention to bits of your code that cannot be tested from the outside. Often this means that the code can be simplified without affecting functionality (as defined by your set of unit tests) -- "simpler code" usually means faster runtime and easier future maintenance.

## Contribute to the code

For substantial, non-trivial contributions, you may be asked to sign a contributor assignment agreement. Optionally, you can also have your name and contact information listed in [Contributors](https://www.bouncycastle.org/contributors.html).
Expand Down Expand Up @@ -56,5 +73,5 @@ Don't forget to self-review. Please follow these simple guidelines:

#### Your pull request is merged

For acceptance, pull requests need to meet specific quality criteria, including tests for anything substantial. Someone on the Bouncy Castle core team will review the pull request when there is time, and let you know if something is missing or suggest improvements. If it is a useful and generic feature it will be integrated in Bouncy Castle to be available in a later release.
Someone on the Bouncy Castle core team will review the pull request when there is time, and let you know if something is missing or suggest improvements. If it is a useful and generic feature it will be integrated in Bouncy Castle to be available in a later release.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = [ "cli", "crypto/*", "mem_usage_benches" ]
members = ["cli", "crypto/*", "mem_usage_benches"]

[workspace.package]
edition = "2024"
Expand All @@ -8,21 +8,21 @@ edition = "2024"

# *** Internal Dependencies ***
bouncycastle = { path = "./", version = "0.1.1" }
bouncycastle-base64 = { path = "./crypto/base64", version = "0.1.1"}
bouncycastle-base64 = { path = "./crypto/base64", version = "0.1.1" }
bouncycastle-core = { path = "crypto/core", version = "0.1.1" }
bouncycastle-core-test-framework = { path = "./crypto/core-test-framework", version = "0.1.1"}
bouncycastle-factory = { path = "./crypto/factory", version = "0.1.1"}
bouncycastle-core-test-framework = { path = "./crypto/core-test-framework", version = "0.1.1" }
bouncycastle-factory = { path = "./crypto/factory", version = "0.1.1" }
bouncycastle-hex = { path = "./crypto/hex", version = "0.1.1" }
bouncycastle-hkdf = { path = "./crypto/hkdf", version = "0.1.1"}
bouncycastle-hmac = { path = "./crypto/hmac", version = "0.1.1"}
bouncycastle-hkdf = { path = "./crypto/hkdf", version = "0.1.1" }
bouncycastle-hmac = { path = "./crypto/hmac", version = "0.1.1" }
bouncycastle-mlkem = { path = "./crypto/mlkem", version = "0.1.2" }
bouncycastle-mlkem-lowmemory = { path = "./crypto/mlkem_lowmemory", version = "0.1.2" }
bouncycastle-mldsa = { path = "./crypto/mldsa", version = "0.1.2" }
bouncycastle-mldsa-lowmemory = { path = "./crypto/mldsa_lowmemory", version = "0.1.2" }
bouncycastle-rng = { path = "./crypto/rng", version = "0.1.1" }
bouncycastle-sha2 = { path = "./crypto/sha2", version = "0.1.1"}
bouncycastle-sha3 = { path = "./crypto/sha3", version = "0.1.1"}
bouncycastle-utils = { path = "./crypto/utils", version = "0.1.1"}
bouncycastle-sha2 = { path = "./crypto/sha2", version = "0.1.1" }
bouncycastle-sha3 = { path = "./crypto/sha3", version = "0.1.1" }
bouncycastle-utils = { path = "./crypto/utils", version = "0.1.1" }


# *** External Dependencies ***
Expand Down
Loading