Compare commits

...

5 Commits

2 changed files with 6 additions and 2 deletions

View File

@ -178,7 +178,8 @@ keyfork recover mnemonic
This guide assumes you are sharding to an `N`-of-`M` system with `I` smart This guide assumes you are sharding to an `N`-of-`M` system with `I` smart
cards per shardholder. The variables will be used in the following commands as cards per shardholder. The variables will be used in the following commands as
`$N`, `$M`, and `$I`. The smart cards will be factory reset during the process. `$N`, `$M`, and `$I`. The smart card OpenPGP slots will be factory reset during
the process.
On an airgapped system, run the following command to generate a file containing On an airgapped system, run the following command to generate a file containing
encrypted shards of a generated seed: encrypted shards of a generated seed:

View File

@ -12,7 +12,7 @@ use keyfork_derive_path_data::guess_target;
// use keyfork_derive_util::request::{DerivationError, DerivationRequest, DerivationResponse}; // use keyfork_derive_util::request::{DerivationError, DerivationRequest, DerivationResponse};
use keyforkd_models::{DerivationError, Error, Request, Response}; use keyforkd_models::{DerivationError, Error, Request, Response};
use tower::Service; use tower::Service;
use tracing::info; use tracing::{info, warn};
// NOTE: All values implemented in Keyforkd must implement Clone with low overhead, either by // NOTE: All values implemented in Keyforkd must implement Clone with low overhead, either by
// using an Arc or by having a small signature. This is because Service<T> takes &mut self. // using an Arc or by having a small signature. This is because Service<T> takes &mut self.
@ -38,6 +38,9 @@ impl std::fmt::Debug for Keyforkd {
impl Keyforkd { impl Keyforkd {
/// Create a new instance of Keyfork from a given seed. /// Create a new instance of Keyfork from a given seed.
pub fn new(seed: Vec<u8>) -> Self { pub fn new(seed: Vec<u8>) -> Self {
if seed.len() < 16 {
warn!("Entropy size is lower than 128 bits: {} bits.", seed.len() * 8);
}
Self { Self {
seed: Arc::new(seed), seed: Arc::new(seed),
} }