Skip to content

Commit 91911f8

Browse files
authored
Some small fixups (#31)
* Fix up documentation whitespace. Remove trailing whitespace and apply a final line-ending character to SECURTY.md and LICENSE. Some editors lint about or silently fix these nits, so it makes for less-noisy patches if they're uniformly applied to files in the repo. * ppoprf: Fix comment typo * sharks: Prefer rebinding to mutable variable. In the documentation example, we try to recover a key from both sufficient and insufficient number of shares. The example used a `let mut secret` to store the result of both operations, however in Rust it's generally better to use a new immutable variable whenever possible. Rebinding the previous variable name is considered acceptable when it's a refinement of the same concept. * ppoprf: don't request zeroize alloc feature This feature is on by default, so it's not necessary to activate it explicitly.
1 parent 73c8543 commit 91911f8

File tree

11 files changed

+12
-12
lines changed

11 files changed

+12
-12
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,4 +370,4 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
370370
---------------------------------------------------------
371371

372372
This Source Code Form is "Incompatible With Secondary Licenses", as
373-
defined by the Mozilla Public License, v. 2.0.
373+
defined by the Mozilla Public License, v. 2.0.

SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ The code in this repository is still being actively developed, and is thus regar
66

77
## Reporting a Vulnerability
88

9-
Please report any observed issues to the [GitHub repository](https://github.com/brave-experiments/sta-rs/).
9+
Please report any observed issues to the [GitHub repository](https://github.com/brave-experiments/sta-rs/).

adss-rs/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,4 +370,4 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
370370
---------------------------------------------------------
371371

372372
This Source Code Form is "Incompatible With Secondary Licenses", as
373-
defined by the Mozilla Public License, v. 2.0.
373+
defined by the Mozilla Public License, v. 2.0.

adss-rs/SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ The code in this repository is still being actively developed, and is thus regar
66

77
## Reporting a Vulnerability
88

9-
Please report any observed issues to the [GitHub repository](https://github.com/brave-experiments/sta-rs/).
9+
Please report any observed issues to the [GitHub repository](https://github.com/brave-experiments/sta-rs/).

ppoprf/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ strobe-rs = "0.7.1"
1818
strobe-rng = { path = "../strobe-rng" }
1919
base64 = "0.13"
2020
derive_more = "0.99"
21-
zeroize = { version = "1.5.4", features = [ "alloc", "derive" ]}
21+
zeroize = { version = "1.5.4", features = [ "derive" ] }
2222

2323
[dev-dependencies]
2424
actix-web = "4.0.1"

ppoprf/src/ggm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ impl PPRF for GGM {
189189
let pfx = self.key.find_prefix(&bv)?;
190190
let pfx_len = pfx.0.len();
191191

192-
// If the prfix is smaller than the current input, then we
192+
// If the prefix is smaller than the current input, then we
193193
// need to recompute some parts of the tree. Otherwise we
194194
// just remove the prefix entirely.
195195
let mut new_pfxs: Vec<(Prefix, Vec<u8>)> = Vec::new();

sharks/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ impl Sharks {
9292
/// # let mut rng = rand_chacha::ChaCha8Rng::from_seed([0x90; 32]);
9393
/// # let mut shares: Vec<Share> = sharks.dealer_rng(&[1], &mut rng).take(3).collect();
9494
/// // Recover original secret from shares
95-
/// let mut secret = sharks.recover(&shares);
95+
/// let secret = sharks.recover(&shares);
9696
/// // Secret correctly recovered
9797
/// assert!(secret.is_ok());
9898
/// // Remove shares for demonstration purposes
9999
/// shares.clear();
100-
/// secret = sharks.recover(&shares);
100+
/// let secret = sharks.recover(&shares);
101101
/// // Not enough shares to recover secret
102102
/// assert!(secret.is_err());
103103
pub fn recover<'a, T>(&self, shares: T) -> Result<Vec<u8>, &str>

sta-rs/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,4 +370,4 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
370370
---------------------------------------------------------
371371

372372
This Source Code Form is "Incompatible With Secondary Licenses", as
373-
defined by the Mozilla Public License, v. 2.0.
373+
defined by the Mozilla Public License, v. 2.0.

sta-rs/SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ The code in this repository is still being actively developed, and is thus regar
66

77
## Reporting a Vulnerability
88

9-
Please report any observed issues to the [GitHub repository](https://github.com/brave-experiments/sta-rs/).
9+
Please report any observed issues to the [GitHub repository](https://github.com/brave-experiments/sta-rs/).

strobe-rng/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,4 +370,4 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
370370
---------------------------------------------------------
371371

372372
This Source Code Form is "Incompatible With Secondary Licenses", as
373-
defined by the Mozilla Public License, v. 2.0.
373+
defined by the Mozilla Public License, v. 2.0.

strobe-rng/SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ The code in this repository is still being actively developed, and is thus regar
66

77
## Reporting a Vulnerability
88

9-
Please report any observed issues to the [GitHub repository](https://github.com/brave-experiments/sta-rs/).
9+
Please report any observed issues to the [GitHub repository](https://github.com/brave-experiments/sta-rs/).

0 commit comments

Comments
 (0)