Skip to content

Commit e06b997

Browse files
Zeroize PrivateKey (#112)
1 parent cf1337b commit e06b997

200 files changed

Lines changed: 749 additions & 15 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ repository = "https://github.com/stellar/rs-stellar-strkey"
66
authors = ["Stellar Development Foundation <info@stellar.org>"]
77
license = "Apache-2.0"
88
readme = "README.md"
9-
version = "0.0.16"
9+
version = "0.0.17"
1010
edition = "2021"
11-
rust-version = "1.81.0"
11+
rust-version = "1.87.0"
1212

1313
[features]
1414
default = []
@@ -31,7 +31,8 @@ serde_test = "1.0.177"
3131

3232
[dependencies]
3333
data-encoding = { version = "2.6.0", default-features = false }
34-
heapless = { version = "0.8", default-features = false }
34+
heapless = { version = "0.9", default-features = false, features = ["zeroize"] }
35+
zeroize = { version = "1", default-features = false, features = ["derive"] }
3536
clap = { version = "4.2.4", default-features = false, features = ["std", "derive", "usage", "help"], optional = true }
3637
serde_with = { version = "3.11.0", optional = true, features = ["hex"] }
3738
serde = { version = "1", optional = true, features = ["derive"] }

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ fuzz:
1515
fuzz-compare-v13:
1616
cargo +nightly fuzz run fuzz_compare_v13 -j 4
1717

18+
fuzz-compare-v16:
19+
cargo +nightly fuzz run fuzz_compare_v16 -j 4
20+
21+
fuzz-compare-zeroizing:
22+
cargo +nightly fuzz run fuzz_compare_zeroizing -j 4
23+
1824
# Generate coverage report as text summary and HTML with source highlighting.
1925
fuzz-coverage:
2026
rustup component add --toolchain nightly llvm-tools-preview

fuzz/Cargo.lock

Lines changed: 47 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fuzz/Cargo.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ cargo-fuzz = true
99

1010
[dependencies]
1111
libfuzzer-sys = "0.4"
12+
heapless = { version = "0.9", default-features = false, features = ["zeroize"] }
13+
zeroize = { version = "1", default-features = false }
1214

1315
[dependencies.stellar-strkey]
1416
path = ".."
@@ -17,6 +19,10 @@ path = ".."
1719
package = "stellar-strkey"
1820
version = "0.0.13"
1921

22+
[dependencies.stellar-strkey-v16]
23+
package = "stellar-strkey"
24+
version = "0.0.16"
25+
2026
[[bin]]
2127
name = "fuzz_roundtrip"
2228
path = "fuzz_targets/fuzz_roundtrip.rs"
@@ -30,3 +36,17 @@ path = "fuzz_targets/fuzz_compare_v13.rs"
3036
test = false
3137
doc = false
3238
bench = false
39+
40+
[[bin]]
41+
name = "fuzz_compare_v16"
42+
path = "fuzz_targets/fuzz_compare_v16.rs"
43+
test = false
44+
doc = false
45+
bench = false
46+
47+
[[bin]]
48+
name = "fuzz_compare_zeroizing"
49+
path = "fuzz_targets/fuzz_compare_zeroizing.rs"
50+
test = false
51+
doc = false
52+
bench = false
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MAC=U74P
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PA7QYNF7SO2SOWQ3GLR2BGMZEHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA7QYNF7SOWQ3GLR2SOWQ3GLR2BGMZEHWQ3GLR2SOWQ3GLR2BGMZEHAAAA
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
LLLDL=LL=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
I3ADPF7S7MGXUA74P7UJUAAAAAIAAAAAAPPAAAOWGXUA74P7UJUAAAAAIAAAAAAPPAAAOWQAAAAIAPA7A3GLR2BGMZEHXAVIRZA4KVWLTJJFC7AAAAAAAAAAAAAAAAAKB5

0 commit comments

Comments
 (0)