Skip to content

Commit 89d7550

Browse files
committed
Merge branch 'small-keccak'
2 parents 8221b66 + 3af6dc4 commit 89d7550

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

src/rust/Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/rust/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ hex = { version = "0.4", default-features = false, features = ["alloc"] }
3434
num-bigint = { version = "0.4.6", default-features = false }
3535
sha2 = { version = "0.10.8", default-features = false }
3636
sha3 = { version = "0.10.8", default-features = false }
37+
# We don't rely on this dep directly, the sha3 dep does. We list it here to enable the
38+
# no_unroll feature to reduce the binary size, saving around 1528 bytes (as measured at time of
39+
# writing, this might fluctuate over time).
40+
keccak = { version = "0.1.4", default-features = false, features = ["no_unroll"] }
3741
zeroize = "1.7.0"
3842

3943
[patch.crates-io]

src/rust/bitbox02-rust-c/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ p256 = { version = "0.13.2", default-features = false, features = ["arithmetic",
3232
der = { version = "0.7.9", default-features = false, optional = true }
3333
hex = { workspace = true }
3434
sha2 = { workspace = true, optional = true }
35-
sha3 = { workspace = true, optional = true }
3635
bitcoin = { workspace = true, optional = true }
3736

3837
[features]
@@ -73,8 +72,6 @@ testing = ["bitbox02-rust/testing", "bitbox02/testing"]
7372
c-unit-testing = ["bitbox02-rust/c-unit-testing", "bitbox02/c-unit-testing"]
7473

7574
app-ethereum = [
76-
# enable this dep
77-
"sha3",
7875
# enable this feature in the deps
7976
"bitbox02-rust/app-ethereum",
8077
"bitbox02/app-ethereum",

src/rust/bitbox02-rust/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ streaming-silent-payments = { path = "../streaming-silent-payments", optional =
3636
hex = { workspace = true }
3737
sha2 = { workspace = true }
3838
sha3 = { workspace = true, optional = true }
39+
keccak = { workspace = true, optional = true }
3940
digest = "0.10.6"
4041
zeroize = { workspace = true }
4142
num-bigint = { workspace = true, optional = true }
@@ -71,6 +72,7 @@ ed25519 = [
7172
app-ethereum = [
7273
"dep:erc20_params",
7374
"dep:sha3",
75+
"dep:keccak",
7476
"dep:num-bigint",
7577
"bitbox02/app-ethereum",
7678
]

0 commit comments

Comments
 (0)