Skip to content

Commit e6d79e1

Browse files
authored
sui-crypto: introduce bls12381 support (#128)
Introduce bls12381 support, adding the ability to sign, aggregate and verify validator signatures over CheckpointSummary messages.
1 parent 72bef2c commit e6d79e1

File tree

6 files changed

+543
-7
lines changed

6 files changed

+543
-7
lines changed

crates/sui-crypto/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ pem = [
5151
"p256?/pem",
5252
"k256?/pem",
5353
]
54+
bls12381 = ["dep:blst", "dep:rand_core", "signature/std"]
5455

5556
[dependencies]
5657
signature = "2.2"
@@ -88,6 +89,9 @@ serde_json = { version = "1.0.128", optional = true }
8889
pkcs8 = { version = "0.10", optional = true, features = ["std"] }
8990
pem-rfc7468 = { version = "0.7", optional = true, features = ["std"] }
9091

92+
# bls12381 support
93+
blst = { version = "0.3.13", optional = true }
94+
9195
[dev-dependencies]
9296
bcs = { version = "0.1.6" }
9397
hex = "0.4.3"
@@ -96,6 +100,7 @@ serde_json = { version = "1.0.128" }
96100
# proptest support in tests
97101
proptest = { version = "1.6.0", default-features = false, features = ["std"] }
98102
test-strategy = "0.4.0"
103+
sui-sdk-types = { version = "0.0.6", path = "../sui-sdk-types", default-features = false, features = ["proptest"] }
99104

100105
[target.wasm32-unknown-unknown.dev-dependencies]
101106
wasm-bindgen-test = "0.3"

crates/sui-crypto/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ clippy:
1313
.PHONY: test
1414
test:
1515
cargo nextest run --all-features
16-
cargo test --doc
16+
cargo test --all-features --doc
1717

1818
.PHONY: wasm
1919
wasm:

0 commit comments

Comments
 (0)