Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
matrix:
include:
- package: commonware-cryptography
cargo_flags: ""
cargo_flags: "--features commonware-cryptography/unsafe-mlock"
file_suffix: ""
benchmark_name: "commonware-cryptography"
- package: commonware-storage
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/slow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
matrix:
include:
- package: commonware-cryptography
cargo_flags: ""
cargo_flags: "--features commonware-cryptography/unsafe-mlock"
- package: commonware-storage
cargo_flags: ""
- package: commonware-storage
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ tracing.workspace = true
[dev-dependencies]
commonware-conformance.workspace = true
commonware-consensus = { path = ".", features = ["mocks"] }
commonware-cryptography = { workspace = true, features = ["unsafe-mlock"] }
commonware-math.workspace = true
commonware-resolver = { workspace = true, features = ["mocks"] }
commonware-runtime = { workspace = true, features = ["test-utils"] }
Expand Down
8 changes: 8 additions & 0 deletions cryptography/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ aws-lc-rs.workspace = true
version = "0.2.15"
features = ["js"]

[target.'cfg(unix)'.dependencies]
libc.workspace = true

[dev-dependencies]
anyhow.workspace = true
commonware-conformance.workspace = true
Expand All @@ -61,6 +64,7 @@ crate-type = ["rlib", "cdylib"]

[features]
default = [ "std" ]
unsafe-mlock = []
parallel = [ "blake3/rayon", "commonware-parallel/std", "std" ]
mocks = [ "std" ]
arbitrary = [
Expand Down Expand Up @@ -98,16 +102,19 @@ std = [
name = "bls12381"
harness = false
path = "src/bls12381/benches/bench.rs"
required-features = ["unsafe-mlock"]

[[bench]]
name = "ed25519"
harness = false
path = "src/ed25519/benches/bench.rs"
required-features = ["unsafe-mlock"]

[[bench]]
name = "secp256r1"
harness = false
path = "src/secp256r1/benches/bench.rs"
required-features = ["unsafe-mlock"]

[[bench]]
name = "sha256"
Expand All @@ -128,3 +135,4 @@ path = "src/lthash/benches/bench.rs"
name = "handshake"
harness = false
path = "src/handshake/benches/bench.rs"
required-features = ["unsafe-mlock"]
2 changes: 1 addition & 1 deletion cryptography/src/bls12381/dkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ pub struct DealerPrivMsg {

impl DealerPrivMsg {
/// Creates a new `DealerPrivMsg` with the given share.
pub const fn new(share: Scalar) -> Self {
pub fn new(share: Scalar) -> Self {
Self {
share: Secret::new(share),
}
Expand Down
2 changes: 1 addition & 1 deletion cryptography/src/bls12381/primitives/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ pub struct Share {

impl Share {
/// Creates a new `Share` with the given index and private key.
pub const fn new(index: u32, private: Private) -> Self {
pub fn new(index: u32, private: Private) -> Self {
Self {
index,
private: Secret::new(private),
Expand Down
2 changes: 1 addition & 1 deletion cryptography/src/handshake/key_exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct SharedSecret {

impl SharedSecret {
/// Creates a new SharedSecret wrapping the given x25519 shared secret.
const fn new(secret: x25519_dalek::SharedSecret) -> Self {
fn new(secret: x25519_dalek::SharedSecret) -> Self {
Self {
secret: Secret::new(secret),
}
Expand Down
Loading
Loading