Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
dbb3197
add macros and traits for implementing signature APIs
wysiwys Nov 11, 2025
2dab1d5
ed25519 public API implementation
wysiwys Nov 11, 2025
1ae48d3
update `Cargo.toml`
wysiwys Nov 11, 2025
b96d79a
update visibility
wysiwys Nov 11, 2025
bbbd869
ecdsa public API implementation
wysiwys Nov 11, 2025
0500b44
implement `sign_mut()`
wysiwys Nov 11, 2025
33d604d
libcrux-ml-dsa public API implementation
wysiwys Nov 11, 2025
a82a2f8
unify feature names
wysiwys Nov 11, 2025
e9864f3
add `libcrux-signature` crate
wysiwys Nov 11, 2025
5bf977b
add documentation
wysiwys Nov 17, 2025
104bc15
documentation
wysiwys Nov 17, 2025
279bc7b
documentation and visibility
wysiwys Nov 17, 2025
189540a
docs and visibility
wysiwys Nov 17, 2025
8953adf
simplify `KeyPair` generation
wysiwys Nov 17, 2025
46ac6da
update pre-hash buffer length
wysiwys Nov 17, 2025
8879a01
improve feature flags and imports
wysiwys Nov 17, 2025
d16a826
spacing
wysiwys Nov 17, 2025
95f7a14
re-export all parameter sets
wysiwys Nov 17, 2025
f919f4d
clean up comments
wysiwys Nov 17, 2025
2bc0a6b
update key generation in test
wysiwys Nov 17, 2025
2e82add
update method names for derand keygen
wysiwys Nov 18, 2025
9820828
separate error types for `arrayref` and `slice` variants
wysiwys Nov 18, 2025
e1dbc7e
remove placeholder error implementation
wysiwys Nov 18, 2025
c35566c
use the correct dependency paths within the workspace
wysiwys Dec 11, 2025
e3adf85
update changelogs
wysiwys Dec 11, 2025
467813b
begin adding more documentation
wysiwys Dec 17, 2025
9e6cd82
remove the `SignTypes` trait
wysiwys Dec 17, 2025
f68a07b
import `U8` in the main implementation macro
wysiwys Dec 17, 2025
3edccdc
simplify importing the `U8` type
wysiwys Dec 17, 2025
28fa7cc
reorganize module exports and docs
wysiwys Dec 17, 2025
b741d3d
document API shape with examples
wysiwys Dec 17, 2025
e7ecd3d
improve imports
wysiwys Dec 17, 2025
5fa672a
re-use the `WrongLengthError`
wysiwys Dec 17, 2025
1c70c67
additional macro documentation
wysiwys Dec 17, 2025
bde7645
clarify payload length computation and remove hacl-related docs that …
wysiwys Dec 17, 2025
298200b
documentation
wysiwys Dec 17, 2025
1c28705
update documentation to reflect that only one trait is provided
wysiwys Dec 17, 2025
5ad6450
clarify descriptions of generated structs
wysiwys Dec 17, 2025
2ad5489
add derand keygen for `KeyPair`
wysiwys Dec 17, 2025
f765759
update tests
wysiwys Dec 17, 2025
14d2948
add derand keygen methods for `KeyPair`
wysiwys Dec 17, 2025
cbf036a
update tests
wysiwys Dec 17, 2025
40160d6
module-level documentation
wysiwys Dec 17, 2025
58e5327
documentation
wysiwys Dec 17, 2025
57681f7
use `generate_pair()`
wysiwys Dec 17, 2025
4381408
update test randomness arguments
wysiwys Dec 17, 2025
fc3036c
more documentation for algorithm structs
wysiwys Dec 18, 2025
576f634
add basic Readme
wysiwys Dec 18, 2025
953897b
more documentation
wysiwys Dec 18, 2025
8cdf860
add doc comments to error types
wysiwys Dec 18, 2025
5b8389f
improve error naming and documentation
wysiwys Dec 18, 2025
4516545
update the error variant returned when verification fails
wysiwys Dec 18, 2025
0a96eee
don't call `classify()` on already-classified `bytes` array in keygen
wysiwys Dec 18, 2025
7a942d2
[Signature] Add comment about ensuring good randomness to documentation
jschneider-bensch Dec 19, 2025
f9183ec
[ML-DSA] Implement key centric API on existing key types
jschneider-bensch Dec 19, 2025
f4a3213
[Ed25519] Add `Ed25519KeyPair` type
jschneider-bensch Dec 19, 2025
7e6d666
[Ed25519] Expose only key centric API
jschneider-bensch Dec 19, 2025
2672089
[ECDSA] Rename key types
jschneider-bensch Dec 19, 2025
5158003
[ECDSA] Add `ECDSAKeyPair` type
jschneider-bensch Dec 19, 2025
5087854
[ECDSA] Expose only key centric API
jschneider-bensch Dec 19, 2025
4d93d7c
`SigningKey::random()` for ECDSA signature keygen
wysiwys Mar 17, 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
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ members = [
"crates/algorithms/aesgcm",
"crates/algorithms/aesgcm/fuzz",
"crates/utils/hacl-rs",
"crates/primitives/signature",
]

[workspace.package]
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/benches/ecdsa_p256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use criterion::{criterion_group, criterion_main, BatchSize, Criterion};

use benchmarks::util::*;
use libcrux_ecdsa::{
p256::{Nonce, PrivateKey, PublicKey},
p256::{Nonce, SigningKey, VerificationKey},
DigestAlgorithm,
};

Expand All @@ -19,7 +19,7 @@ fn sign(c: &mut Criterion) {
let mut rng = rand::rng();

let sk: [u8; 32] = hex_str_to_array(SK_HEX);
let sk = PrivateKey::try_from(&sk).unwrap();
let sk = SigningKey::try_from(&sk).unwrap();
let nonce = Nonce::random(&mut rng).unwrap();
let msg = b"sample";

Expand Down Expand Up @@ -93,9 +93,9 @@ fn verify(c: &mut Criterion) {
let mut rng = rand::rng();

let pk = hex_str_to_bytes(PK_HEX);
let pk = PublicKey::try_from(pk.as_slice()).unwrap();
let pk = VerificationKey::try_from(pk.as_slice()).unwrap();
let sk: [u8; 32] = hex_str_to_array(SK_HEX);
let sk = PrivateKey::try_from(&sk).unwrap();
let sk = SigningKey::try_from(&sk).unwrap();
let nonce = Nonce::random(&mut rng).unwrap();
let msg = b"sample";
let sig = libcrux_ecdsa::p256::sign(DigestAlgorithm::Sha256, &msg[..], &sk, &nonce)
Expand Down
6 changes: 6 additions & 0 deletions crates/algorithms/ecdsa/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ 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.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

- [#1241](https://github.com/cryspen/libcrux/pull/1241):
- Rename `PrivateKey` -> `SigningKey`, `PublicKey` -> `VerificationKey`
- Add key-centric signature public APIs

## [0.0.4] (2025-11-05)

- [#1061](https://github.com/cryspen/libcrux/pull/1061): Add `std` feature gate for `libcrux-ecdsa`
Expand Down
17 changes: 13 additions & 4 deletions crates/algorithms/ecdsa/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
[package]
name = "libcrux-ecdsa"
description = "Formally verified ECDSA signature library"
name = "libcrux-ecdsa"
readme = "Readme.md"
version = "0.0.4"

authors.workspace = true
license.workspace = true
homepage.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
libcrux-p256 = { version = "=0.0.4", path = "../p256", features = [
"expose-hacl",
] }
libcrux-sha2 = { version = "=0.0.4", path = "../sha2" }
libcrux-secrets = { version = "=0.0.4", path = "../../utils/secrets" }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workspace dependencies?

libcrux-traits = { version = "=0.0.4", path = "../../../traits" }
rand = { version = "0.9", optional = true, default-features = false }

[features]
default = ["rand", "std"]
rand = ["dep:rand"]
std = ["rand?/std"]

# This doesn't check the secret independence of the implementation, but sets the
# exposed API into secret independence checking mode.
expose-secret-independence = [
"libcrux-secrets/check-secret-independence",
"libcrux-traits/check-secret-independence",
]

[dev-dependencies]
rand_core = { version = "0.9" , features = ["os_rng"] }
rand_core = { version = "0.9", features = ["os_rng"] }
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.138"
Loading