Skip to content

Commit c791925

Browse files
committed
refactor: replace blsful implementation with blst for threshold BLS signatures
- Updated dependencies in Cargo.toml and Cargo.lock to use the blst library. - Removed blsful module and its associated code, including type conversions and utility functions. - Introduced a new blst_impl module for the BLST implementation of threshold BLS signatures. - Refactored tbls module to utilize the new blst implementation. - Cleaned up error handling and types to align with the new library. - Added workspace lints and improved documentation throughout the codebase.
1 parent 67a8a53 commit c791925

10 files changed

Lines changed: 1154 additions & 2500 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ hex = { version = "^0.4.3" }
3131
serde = { version = "1.0", features = ["derive"] }
3232
serde_json = { version = "^1.0" }
3333
tokio = { version = "1", features = ["full"] }
34-
blsful = "2.5.7"
35-
rand_core = "0.9.3"
34+
blst = "0.3.13"
35+
rand_core = "0.6"
3636
thiserror = "2.0.12"
37-
rand = "0.9"
37+
rand = {version = "0.8", features = ["std_rng"]}
3838

3939
[workspace.lints.rust]
4040
missing_docs = "deny"

crates/charon-crypto/Cargo.toml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,24 @@ publish.workspace = true
88

99
[dependencies]
1010
rand.workspace = true
11-
blsful.workspace = true
11+
blst.workspace = true
1212
rand_core.workspace = true
1313
serde.workspace = true
1414
thiserror.workspace = true
15+
hex.workspace = true
1516

16-
[lints]
17-
workspace = true
17+
[lints.rust]
18+
# Allow unsafe code for blst C bindings (overrides workspace forbid)
19+
unsafe_code = "allow"
20+
missing_docs = "deny"
21+
22+
[lints.clippy]
23+
arithmetic_side_effects = "deny"
24+
cast_lossless = "deny"
25+
cast_possible_truncation = "deny"
26+
cast_possible_wrap = "deny"
27+
cast_precision_loss = "deny"
28+
cast_sign_loss = "deny"
29+
needless_return = "deny"
30+
panicking_overflow_checks = "deny"
31+
unwrap_used = "deny"

0 commit comments

Comments
 (0)