ryansquared/keyfork-mnemonic-refactors #49
|
@ -1683,7 +1683,7 @@ dependencies = [
|
||||||
"keyfork-derive-openpgp",
|
"keyfork-derive-openpgp",
|
||||||
"keyfork-derive-util",
|
"keyfork-derive-util",
|
||||||
"keyfork-entropy",
|
"keyfork-entropy",
|
||||||
"keyfork-mnemonic-util",
|
"keyfork-mnemonic",
|
||||||
"keyfork-prompt",
|
"keyfork-prompt",
|
||||||
"keyfork-qrcode",
|
"keyfork-qrcode",
|
||||||
"keyfork-shard",
|
"keyfork-shard",
|
||||||
|
@ -1771,7 +1771,7 @@ dependencies = [
|
||||||
"hmac",
|
"hmac",
|
||||||
"k256",
|
"k256",
|
||||||
"keyfork-bug",
|
"keyfork-bug",
|
||||||
"keyfork-mnemonic-util",
|
"keyfork-mnemonic",
|
||||||
"keyfork-slip10-test-data",
|
"keyfork-slip10-test-data",
|
||||||
"ripemd",
|
"ripemd",
|
||||||
"serde",
|
"serde",
|
||||||
|
@ -1798,7 +1798,7 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "keyfork-mnemonic-util"
|
name = "keyfork-mnemonic"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bip39",
|
"bip39",
|
||||||
|
@ -1817,7 +1817,7 @@ version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"keyfork-bug",
|
"keyfork-bug",
|
||||||
"keyfork-crossterm",
|
"keyfork-crossterm",
|
||||||
"keyfork-mnemonic-util",
|
"keyfork-mnemonic",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1845,7 +1845,7 @@ dependencies = [
|
||||||
"hkdf",
|
"hkdf",
|
||||||
"keyfork-bug",
|
"keyfork-bug",
|
||||||
"keyfork-derive-openpgp",
|
"keyfork-derive-openpgp",
|
||||||
"keyfork-mnemonic-util",
|
"keyfork-mnemonic",
|
||||||
"keyfork-prompt",
|
"keyfork-prompt",
|
||||||
"keyfork-qrcode",
|
"keyfork-qrcode",
|
||||||
"openpgp-card",
|
"openpgp-card",
|
||||||
|
@ -1893,7 +1893,7 @@ dependencies = [
|
||||||
"keyfork-derive-path-data",
|
"keyfork-derive-path-data",
|
||||||
"keyfork-derive-util",
|
"keyfork-derive-util",
|
||||||
"keyfork-frame",
|
"keyfork-frame",
|
||||||
"keyfork-mnemonic-util",
|
"keyfork-mnemonic",
|
||||||
"keyfork-slip10-test-data",
|
"keyfork-slip10-test-data",
|
||||||
"keyforkd-models",
|
"keyforkd-models",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
|
@ -19,7 +19,7 @@ members = [
|
||||||
"crates/util/keyfork-crossterm",
|
"crates/util/keyfork-crossterm",
|
||||||
"crates/util/keyfork-entropy",
|
"crates/util/keyfork-entropy",
|
||||||
"crates/util/keyfork-frame",
|
"crates/util/keyfork-frame",
|
||||||
"crates/util/keyfork-mnemonic-util",
|
"crates/util/keyfork-mnemonic",
|
||||||
"crates/util/keyfork-prompt",
|
"crates/util/keyfork-prompt",
|
||||||
"crates/util/keyfork-slip10-test-data",
|
"crates/util/keyfork-slip10-test-data",
|
||||||
"crates/util/smex",
|
"crates/util/smex",
|
||||||
|
|
|
@ -15,7 +15,7 @@ multithread = ["tokio/rt-multi-thread"]
|
||||||
keyfork-bug = { version = "0.1.0", path = "../../util/keyfork-bug", registry = "distrust" }
|
keyfork-bug = { version = "0.1.0", path = "../../util/keyfork-bug", registry = "distrust" }
|
||||||
keyfork-derive-util = { version = "0.2.0", path = "../../derive/keyfork-derive-util", registry = "distrust" }
|
keyfork-derive-util = { version = "0.2.0", path = "../../derive/keyfork-derive-util", registry = "distrust" }
|
||||||
keyfork-frame = { version = "0.1.0", path = "../../util/keyfork-frame", features = ["async"], registry = "distrust" }
|
keyfork-frame = { version = "0.1.0", path = "../../util/keyfork-frame", features = ["async"], registry = "distrust" }
|
||||||
keyfork-mnemonic-util = { version = "0.3.0", path = "../../util/keyfork-mnemonic-util", registry = "distrust" }
|
keyfork-mnemonic = { version = "0.3.0", path = "../../util/keyfork-mnemonic", registry = "distrust" }
|
||||||
keyfork-derive-path-data = { version = "0.1.0", path = "../../derive/keyfork-derive-path-data", registry = "distrust" }
|
keyfork-derive-path-data = { version = "0.1.0", path = "../../derive/keyfork-derive-path-data", registry = "distrust" }
|
||||||
keyforkd-models = { version = "0.2.0", path = "../keyforkd-models", registry = "distrust" }
|
keyforkd-models = { version = "0.2.0", path = "../keyforkd-models", registry = "distrust" }
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ use std::{
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub use keyfork_mnemonic_util::Mnemonic;
|
pub use keyfork_mnemonic::Mnemonic;
|
||||||
pub use tower::ServiceBuilder;
|
pub use tower::ServiceBuilder;
|
||||||
|
|
||||||
#[cfg(feature = "tracing")]
|
#[cfg(feature = "tracing")]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//!
|
//!
|
||||||
|
|
||||||
use keyfork_mnemonic_util::Mnemonic;
|
use keyfork_mnemonic::Mnemonic;
|
||||||
|
|
||||||
use tokio::io::{self, AsyncBufReadExt, BufReader};
|
use tokio::io::{self, AsyncBufReadExt, BufReader};
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ secp256k1 = ["k256"]
|
||||||
ed25519 = ["ed25519-dalek"]
|
ed25519 = ["ed25519-dalek"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
keyfork-mnemonic-util = { version = "0.3.0", path = "../../util/keyfork-mnemonic-util", registry = "distrust" }
|
keyfork-mnemonic = { version = "0.3.0", path = "../../util/keyfork-mnemonic", registry = "distrust" }
|
||||||
keyfork-bug = { version = "0.1.0", path = "../../util/keyfork-bug", registry = "distrust" }
|
keyfork-bug = { version = "0.1.0", path = "../../util/keyfork-bug", registry = "distrust" }
|
||||||
|
|
||||||
# Included in Rust
|
# Included in Rust
|
||||||
|
|
|
@ -23,7 +23,7 @@ performed directly on a master seed. This is how Keyforkd works internally.
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use keyfork_mnemonic_util::Mnemonic;
|
use keyfork_mnemonic::Mnemonic;
|
||||||
use keyfork_derive_util::{*, request::*};
|
use keyfork_derive_util::{*, request::*};
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
//! # Examples
|
//! # Examples
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use std::str::FromStr;
|
//! use std::str::FromStr;
|
||||||
//! use keyfork_mnemonic_util::Mnemonic;
|
//! use keyfork_mnemonic::Mnemonic;
|
||||||
//! use keyfork_derive_util::{*, request::*};
|
//! use keyfork_derive_util::{*, request::*};
|
||||||
//! use k256::SecretKey;
|
//! use k256::SecretKey;
|
||||||
//!
|
//!
|
||||||
|
|
|
@ -24,7 +24,7 @@ use crate::{
|
||||||
DerivationPath, ExtendedPrivateKey,
|
DerivationPath, ExtendedPrivateKey,
|
||||||
};
|
};
|
||||||
|
|
||||||
use keyfork_mnemonic_util::{Mnemonic, MnemonicGenerationError};
|
use keyfork_mnemonic::{Mnemonic, MnemonicGenerationError};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
/// An error encountered while deriving a key.
|
/// An error encountered while deriving a key.
|
||||||
|
@ -194,8 +194,8 @@ impl DerivationRequest {
|
||||||
/// # private_key::TestPrivateKey as PrivateKey,
|
/// # private_key::TestPrivateKey as PrivateKey,
|
||||||
/// # };
|
/// # };
|
||||||
/// # fn main() -> Result<(), Box<dyn std::error::Error>> {
|
/// # fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
/// let mnemonic: keyfork_mnemonic_util::Mnemonic = //
|
/// let mnemonic: keyfork_mnemonic::Mnemonic = //
|
||||||
/// # keyfork_mnemonic_util::Mnemonic::from_entropy(
|
/// # keyfork_mnemonic::Mnemonic::from_entropy(
|
||||||
/// # b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
/// # b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
||||||
/// # )?;
|
/// # )?;
|
||||||
/// let algo: DerivationAlgorithm = //
|
/// let algo: DerivationAlgorithm = //
|
||||||
|
|
|
@ -23,7 +23,7 @@ sharks = "0.5.0"
|
||||||
thiserror = "1.0.50"
|
thiserror = "1.0.50"
|
||||||
|
|
||||||
# Remote operator mode
|
# Remote operator mode
|
||||||
keyfork-mnemonic-util = { version = "0.3.0", path = "../util/keyfork-mnemonic-util", registry = "distrust" }
|
keyfork-mnemonic = { version = "0.3.0", path = "../util/keyfork-mnemonic", registry = "distrust" }
|
||||||
x25519-dalek = { version = "2.0.0", features = ["getrandom"] }
|
x25519-dalek = { version = "2.0.0", features = ["getrandom"] }
|
||||||
aes-gcm = { version = "0.10.3", features = ["std"] }
|
aes-gcm = { version = "0.10.3", features = ["std"] }
|
||||||
hkdf = { version = "0.12.4", features = ["std"] }
|
hkdf = { version = "0.12.4", features = ["std"] }
|
||||||
|
|
|
@ -13,7 +13,7 @@ use aes_gcm::{
|
||||||
use base64::prelude::{Engine, BASE64_STANDARD};
|
use base64::prelude::{Engine, BASE64_STANDARD};
|
||||||
use hkdf::Hkdf;
|
use hkdf::Hkdf;
|
||||||
use keyfork_bug::{bug, POISONED_MUTEX};
|
use keyfork_bug::{bug, POISONED_MUTEX};
|
||||||
use keyfork_mnemonic_util::{English, Mnemonic};
|
use keyfork_mnemonic::{English, Mnemonic};
|
||||||
use keyfork_prompt::{
|
use keyfork_prompt::{
|
||||||
validators::{
|
validators::{
|
||||||
mnemonic::{MnemonicSetValidator, MnemonicValidator, WordLength},
|
mnemonic::{MnemonicSetValidator, MnemonicValidator, WordLength},
|
||||||
|
|
|
@ -29,7 +29,7 @@ keyforkd-client = { version = "0.2.0", path = "../daemon/keyforkd-client", defau
|
||||||
keyfork-derive-openpgp = { version = "0.1.1", path = "../derive/keyfork-derive-openpgp", registry = "distrust" }
|
keyfork-derive-openpgp = { version = "0.1.1", path = "../derive/keyfork-derive-openpgp", registry = "distrust" }
|
||||||
keyfork-derive-util = { version = "0.2.0", path = "../derive/keyfork-derive-util", default-features = false, features = ["ed25519"], registry = "distrust" }
|
keyfork-derive-util = { version = "0.2.0", path = "../derive/keyfork-derive-util", default-features = false, features = ["ed25519"], registry = "distrust" }
|
||||||
keyfork-entropy = { version = "0.1.0", path = "../util/keyfork-entropy", registry = "distrust" }
|
keyfork-entropy = { version = "0.1.0", path = "../util/keyfork-entropy", registry = "distrust" }
|
||||||
keyfork-mnemonic-util = { version = "0.3.0", path = "../util/keyfork-mnemonic-util", registry = "distrust" }
|
keyfork-mnemonic = { version = "0.3.0", path = "../util/keyfork-mnemonic", registry = "distrust" }
|
||||||
keyfork-prompt = { version = "0.1.0", path = "../util/keyfork-prompt", registry = "distrust" }
|
keyfork-prompt = { version = "0.1.0", path = "../util/keyfork-prompt", registry = "distrust" }
|
||||||
keyfork-qrcode = { version = "0.1.0", path = "../qrcode/keyfork-qrcode", default-features = false, registry = "distrust" }
|
keyfork-qrcode = { version = "0.1.0", path = "../qrcode/keyfork-qrcode", default-features = false, registry = "distrust" }
|
||||||
keyfork-shard = { version = "0.2.0", path = "../keyfork-shard", default-features = false, features = ["openpgp", "openpgp-card", "qrcode"], registry = "distrust" }
|
keyfork-shard = { version = "0.2.0", path = "../keyfork-shard", default-features = false, features = ["openpgp", "openpgp-card", "qrcode"], registry = "distrust" }
|
||||||
|
|
|
@ -109,7 +109,7 @@ impl MnemonicSeedSource {
|
||||||
MnemonicSeedSource::Tarot => todo!(),
|
MnemonicSeedSource::Tarot => todo!(),
|
||||||
MnemonicSeedSource::Dice => todo!(),
|
MnemonicSeedSource::Dice => todo!(),
|
||||||
};
|
};
|
||||||
let mnemonic = keyfork_mnemonic_util::Mnemonic::try_from_slice(&seed)?;
|
let mnemonic = keyfork_mnemonic::Mnemonic::try_from_slice(&seed)?;
|
||||||
Ok(mnemonic.to_string())
|
Ok(mnemonic.to_string())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ use super::Keyfork;
|
||||||
use clap::{Parser, Subcommand};
|
use clap::{Parser, Subcommand};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use keyfork_mnemonic_util::{English, Mnemonic};
|
use keyfork_mnemonic::{English, Mnemonic};
|
||||||
use keyfork_prompt::{default_terminal, DefaultTerminal};
|
use keyfork_prompt::{default_terminal, DefaultTerminal};
|
||||||
use keyfork_shard::{remote_decrypt, Format};
|
use keyfork_shard::{remote_decrypt, Format};
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ use keyfork_prompt::{
|
||||||
validators::{SecurePinValidator, Validator},
|
validators::{SecurePinValidator, Validator},
|
||||||
DefaultTerminal, Message, PromptHandler,
|
DefaultTerminal, Message, PromptHandler,
|
||||||
};
|
};
|
||||||
use keyfork_mnemonic_util::Mnemonic;
|
use keyfork_mnemonic::Mnemonic;
|
||||||
|
|
||||||
use keyfork_shard::{openpgp::OpenPGP, Format};
|
use keyfork_shard::{openpgp::OpenPGP, Format};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "keyfork-mnemonic-util"
|
name = "keyfork-mnemonic"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
description = "Utilities to generate and manage seeds based on BIP-0039 mnemonics."
|
description = "Utilities to generate and manage seeds based on BIP-0039 mnemonics."
|
||||||
repository = "https://git.distrust.co/public/keyfork"
|
repository = "https://git.distrust.co/public/keyfork"
|
|
@ -1,6 +1,6 @@
|
||||||
//!
|
//!
|
||||||
|
|
||||||
use keyfork_mnemonic_util::Mnemonic;
|
use keyfork_mnemonic::Mnemonic;
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let input = std::io::stdin();
|
let input = std::io::stdin();
|
|
@ -3,7 +3,7 @@
|
||||||
//! Mnemonics can be used to safely encode data of 32, 48, and 64 bytes as a phrase:
|
//! Mnemonics can be used to safely encode data of 32, 48, and 64 bytes as a phrase:
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use keyfork_mnemonic_util::Mnemonic;
|
//! use keyfork_mnemonic::Mnemonic;
|
||||||
//! let data = b"Hello, world! I am a mnemonic :)";
|
//! let data = b"Hello, world! I am a mnemonic :)";
|
||||||
//! assert_eq!(data.len(), 32);
|
//! assert_eq!(data.len(), 32);
|
||||||
//! let mnemonic = Mnemonic::try_from_slice(data).unwrap();
|
//! let mnemonic = Mnemonic::try_from_slice(data).unwrap();
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
//! A mnemonic can also be parsed from a string:
|
//! A mnemonic can also be parsed from a string:
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use keyfork_mnemonic_util::Mnemonic;
|
//! use keyfork_mnemonic::Mnemonic;
|
||||||
//! use std::str::FromStr;
|
//! use std::str::FromStr;
|
||||||
//!
|
//!
|
||||||
//! let data = b"Hello, world! I am a mnemonic :)";
|
//! let data = b"Hello, world! I am a mnemonic :)";
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
//! verified to be safe:
|
//! verified to be safe:
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
||||||
//! use keyfork_mnemonic_util::Mnemonic;
|
//! use keyfork_mnemonic::Mnemonic;
|
||||||
//! let data = b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
//! let data = b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
||||||
//! let mnemonic = unsafe { Mnemonic::from_raw_bytes(data.as_slice()) };
|
//! let mnemonic = unsafe { Mnemonic::from_raw_bytes(data.as_slice()) };
|
||||||
//! let mnemonic_text = mnemonic.to_string();
|
//! let mnemonic_text = mnemonic.to_string();
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
//! If given an invalid length, undefined behavior may follow, or code may panic.
|
//! If given an invalid length, undefined behavior may follow, or code may panic.
|
||||||
//!
|
//!
|
||||||
//! ```rust,should_panic
|
//! ```rust,should_panic
|
||||||
//! use keyfork_mnemonic_util::Mnemonic;
|
//! use keyfork_mnemonic::Mnemonic;
|
||||||
//! use std::str::FromStr;
|
//! use std::str::FromStr;
|
||||||
//!
|
//!
|
||||||
//! // NOTE: Data is of invalid length, 31
|
//! // NOTE: Data is of invalid length, 31
|
||||||
|
@ -268,7 +268,7 @@ where
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use keyfork_mnemonic_util::Mnemonic;
|
/// use keyfork_mnemonic::Mnemonic;
|
||||||
/// let data = b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
/// let data = b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
||||||
/// let mnemonic = Mnemonic::try_from_slice(data.as_slice()).unwrap();
|
/// let mnemonic = Mnemonic::try_from_slice(data.as_slice()).unwrap();
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -290,7 +290,7 @@ where
|
||||||
/// of a factor of 4, up to 1024 bytes.
|
/// of a factor of 4, up to 1024 bytes.
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use keyfork_mnemonic_util::Mnemonic;
|
/// use keyfork_mnemonic::Mnemonic;
|
||||||
/// let data = b"hello world!";
|
/// let data = b"hello world!";
|
||||||
/// let mnemonic = Mnemonic::from_array(*data);
|
/// let mnemonic = Mnemonic::from_array(*data);
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -298,12 +298,12 @@ where
|
||||||
/// If an invalid size is requested, the code will fail to compile:
|
/// If an invalid size is requested, the code will fail to compile:
|
||||||
///
|
///
|
||||||
/// ```rust,compile_fail
|
/// ```rust,compile_fail
|
||||||
/// use keyfork_mnemonic_util::Mnemonic;
|
/// use keyfork_mnemonic::Mnemonic;
|
||||||
/// let mnemonic = Mnemonic::from_array([0u8; 53]);
|
/// let mnemonic = Mnemonic::from_array([0u8; 53]);
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// ```rust,compile_fail
|
/// ```rust,compile_fail
|
||||||
/// use keyfork_mnemonic_util::Mnemonic;
|
/// use keyfork_mnemonic::Mnemonic;
|
||||||
/// let mnemonic = Mnemonic::from_array([0u8; 1024 + 4]);
|
/// let mnemonic = Mnemonic::from_array([0u8; 1024 + 4]);
|
||||||
/// ```
|
/// ```
|
||||||
pub fn from_array<const N: usize>(bytes: [u8; N]) -> MnemonicBase<W> {
|
pub fn from_array<const N: usize>(bytes: [u8; N]) -> MnemonicBase<W> {
|
||||||
|
@ -327,7 +327,7 @@ where
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use keyfork_mnemonic_util::Mnemonic;
|
/// use keyfork_mnemonic::Mnemonic;
|
||||||
/// let data = b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
/// let data = b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
||||||
/// let mnemonic = unsafe { Mnemonic::from_raw_bytes(data.as_slice()) };
|
/// let mnemonic = unsafe { Mnemonic::from_raw_bytes(data.as_slice()) };
|
||||||
/// let mnemonic_text = mnemonic.to_string();
|
/// let mnemonic_text = mnemonic.to_string();
|
||||||
|
@ -336,7 +336,7 @@ where
|
||||||
/// If given an invalid length, undefined behavior may follow, or code may panic.
|
/// If given an invalid length, undefined behavior may follow, or code may panic.
|
||||||
///
|
///
|
||||||
/// ```rust,should_panic
|
/// ```rust,should_panic
|
||||||
/// use keyfork_mnemonic_util::Mnemonic;
|
/// use keyfork_mnemonic::Mnemonic;
|
||||||
/// use std::str::FromStr;
|
/// use std::str::FromStr;
|
||||||
///
|
///
|
||||||
/// // NOTE: Data is of invalid length, 31
|
/// // NOTE: Data is of invalid length, 31
|
|
@ -10,10 +10,10 @@ license = "MIT"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["mnemonic"]
|
default = ["mnemonic"]
|
||||||
mnemonic = ["keyfork-mnemonic-util"]
|
mnemonic = ["keyfork-mnemonic"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
keyfork-bug = { version = "0.1.0", path = "../keyfork-bug", registry = "distrust" }
|
keyfork-bug = { version = "0.1.0", path = "../keyfork-bug", registry = "distrust" }
|
||||||
keyfork-crossterm = { version = "0.27.1", path = "../keyfork-crossterm", default-features = false, features = ["use-dev-tty", "events", "bracketed-paste"], registry = "distrust" }
|
keyfork-crossterm = { version = "0.27.1", path = "../keyfork-crossterm", default-features = false, features = ["use-dev-tty", "events", "bracketed-paste"], registry = "distrust" }
|
||||||
keyfork-mnemonic-util = { version = "0.3.0", path = "../keyfork-mnemonic-util", optional = true, registry = "distrust" }
|
keyfork-mnemonic = { version = "0.3.0", path = "../keyfork-mnemonic", optional = true, registry = "distrust" }
|
||||||
thiserror = "1.0.51"
|
thiserror = "1.0.51"
|
||||||
|
|
|
@ -7,7 +7,7 @@ use keyfork_prompt::{
|
||||||
Terminal, PromptHandler,
|
Terminal, PromptHandler,
|
||||||
};
|
};
|
||||||
|
|
||||||
use keyfork_mnemonic_util::English;
|
use keyfork_mnemonic::English;
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let mut mgr = Terminal::new(stdin(), stdout())?;
|
let mut mgr = Terminal::new(stdin(), stdout())?;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
|
|
||||||
#[cfg(feature = "mnemonic")]
|
#[cfg(feature = "mnemonic")]
|
||||||
use keyfork_mnemonic_util::Wordlist;
|
use keyfork_mnemonic::Wordlist;
|
||||||
|
|
||||||
///
|
///
|
||||||
pub mod terminal;
|
pub mod terminal;
|
||||||
|
|
|
@ -158,7 +158,7 @@ pub mod mnemonic {
|
||||||
use super::Validator;
|
use super::Validator;
|
||||||
|
|
||||||
use keyfork_bug::bug;
|
use keyfork_bug::bug;
|
||||||
use keyfork_mnemonic_util::{Mnemonic, MnemonicFromStrError};
|
use keyfork_mnemonic::{Mnemonic, MnemonicFromStrError};
|
||||||
|
|
||||||
/// A mnemonic could not be validated from the given input.
|
/// A mnemonic could not be validated from the given input.
|
||||||
#[derive(thiserror::Error, Debug)]
|
#[derive(thiserror::Error, Debug)]
|
||||||
|
|
|
@ -45,7 +45,7 @@ A command line interface for generating, deriving from, and managing secrets.
|
||||||
* [`keyfork-derive-openpgp`]
|
* [`keyfork-derive-openpgp`]
|
||||||
* [`keyfork-derive-util`]
|
* [`keyfork-derive-util`]
|
||||||
* [`keyfork-entropy`]
|
* [`keyfork-entropy`]
|
||||||
* [`keyfork-mnemonic-util`]
|
* [`keyfork-mnemonic`]
|
||||||
* [`keyfork-prompt`]
|
* [`keyfork-prompt`]
|
||||||
* [`keyfork-qrcode`]
|
* [`keyfork-qrcode`]
|
||||||
* [`keyfork-shard`]
|
* [`keyfork-shard`]
|
||||||
|
@ -68,7 +68,7 @@ seed or close-to-root derivations.
|
||||||
* [`keyfork-derive-path-data`]
|
* [`keyfork-derive-path-data`]
|
||||||
* [`keyfork-derive-util`]
|
* [`keyfork-derive-util`]
|
||||||
* [`keyfork-frame`]
|
* [`keyfork-frame`]
|
||||||
* [`keyfork-mnemonic-util`]
|
* [`keyfork-mnemonic`]
|
||||||
* [`keyforkd-models`]
|
* [`keyforkd-models`]
|
||||||
* [`serde`]
|
* [`serde`]
|
||||||
* [`thiserror`]
|
* [`thiserror`]
|
||||||
|
@ -129,7 +129,7 @@ BIP-0032 derivation.
|
||||||
* [`ed25519-dalek`]: Ed25519 key parsing and arithmetic.
|
* [`ed25519-dalek`]: Ed25519 key parsing and arithmetic.
|
||||||
* [`hmac`]: Derivation of keys using HMAC.
|
* [`hmac`]: Derivation of keys using HMAC.
|
||||||
* [`k256`]: secp256k1 (K-256) key parsing and arithmetic.
|
* [`k256`]: secp256k1 (K-256) key parsing and arithmetic.
|
||||||
* [`keyfork-mnemonic-util`]
|
* [`keyfork-mnemonic`]
|
||||||
* [`ripemd`]: Generating hash for fingerprinting of BIP-0032 derived data.
|
* [`ripemd`]: Generating hash for fingerprinting of BIP-0032 derived data.
|
||||||
* [`serde`]
|
* [`serde`]
|
||||||
* [`sha2`]: Generating hashes for fingerprinting and derivation of data.
|
* [`sha2`]: Generating hashes for fingerprinting and derivation of data.
|
||||||
|
@ -145,7 +145,7 @@ M-of-N recombination of secret data using Shamir's Secret Sharing.
|
||||||
* [`card-backend-pcsc`]: PCSC support for OpenPGP-card.
|
* [`card-backend-pcsc`]: PCSC support for OpenPGP-card.
|
||||||
* [`hkdf`]: Key derivation for transport encryption keys.
|
* [`hkdf`]: Key derivation for transport encryption keys.
|
||||||
* [`keyfork-derive-openpgp`]
|
* [`keyfork-derive-openpgp`]
|
||||||
* [`keyfork-mnemonic-util`]: Encoding encrypted shards using mnemonics.
|
* [`keyfork-mnemonic`]: Encoding encrypted shards using mnemonics.
|
||||||
* [`keyfork-prompt`]
|
* [`keyfork-prompt`]
|
||||||
* [`keyfork-qrcode`]: Encoding and decoding of encrypted shards using QR codes.
|
* [`keyfork-qrcode`]: Encoding and decoding of encrypted shards using QR codes.
|
||||||
* [`openpgp-card`]: OpenPGP card support.
|
* [`openpgp-card`]: OpenPGP card support.
|
||||||
|
@ -193,7 +193,7 @@ Frame data in a length-storing checksum-verified format.
|
||||||
* [`thiserror`]
|
* [`thiserror`]
|
||||||
* [`tokio`]: Read and write from AsyncRead and AsyncWrite sources.
|
* [`tokio`]: Read and write from AsyncRead and AsyncWrite sources.
|
||||||
|
|
||||||
## `keyfork-mnemonic-util`
|
## `keyfork-mnemonic`
|
||||||
|
|
||||||
* [`hmac`]: Hash utilities.
|
* [`hmac`]: Hash utilities.
|
||||||
* [`sha2`]: Checksum of mnemonic data and hash for pbkdf2
|
* [`sha2`]: Checksum of mnemonic data and hash for pbkdf2
|
||||||
|
@ -202,7 +202,7 @@ Frame data in a length-storing checksum-verified format.
|
||||||
## `keyfork-prompt`
|
## `keyfork-prompt`
|
||||||
|
|
||||||
* [`keyfork-crossterm`]: Interacting with the terminal.
|
* [`keyfork-crossterm`]: Interacting with the terminal.
|
||||||
* [`keyfork-mnemonic-util`]
|
* [`keyfork-mnemonic`]
|
||||||
* [`thiserror`]
|
* [`thiserror`]
|
||||||
|
|
||||||
## `keyfork-plumbing`
|
## `keyfork-plumbing`
|
||||||
|
@ -210,7 +210,7 @@ Frame data in a length-storing checksum-verified format.
|
||||||
Binaries for `keyfork-entropy` and `keyfork-mnemonic-from-seed`.
|
Binaries for `keyfork-entropy` and `keyfork-mnemonic-from-seed`.
|
||||||
|
|
||||||
* [`keyfork-entropy`]
|
* [`keyfork-entropy`]
|
||||||
* [`keyfork-mnemonic-util`]
|
* [`keyfork-mnemonic`]
|
||||||
* [`smex`]
|
* [`smex`]
|
||||||
|
|
||||||
## `keyfork-slip10-test-data`
|
## `keyfork-slip10-test-data`
|
||||||
|
@ -229,7 +229,7 @@ Zero-dependency hex encoding and decoding.
|
||||||
[`keyfork-derive-util`]: #keyfork-derive-util
|
[`keyfork-derive-util`]: #keyfork-derive-util
|
||||||
[`keyfork-entropy`]: #keyfork-entropy
|
[`keyfork-entropy`]: #keyfork-entropy
|
||||||
[`keyfork-frame`]: #keyfork-frame
|
[`keyfork-frame`]: #keyfork-frame
|
||||||
[`keyfork-mnemonic-util`]: #keyfork-mnemonic-util
|
[`keyfork-mnemonic`]: #keyfork-mnemonic
|
||||||
[`keyfork-prompt`]: #keyfork-prompt
|
[`keyfork-prompt`]: #keyfork-prompt
|
||||||
[`keyfork-qrcode`]: #keyfork-qrcode
|
[`keyfork-qrcode`]: #keyfork-qrcode
|
||||||
[`keyfork-shard`]: #keyfork-shard
|
[`keyfork-shard`]: #keyfork-shard
|
||||||
|
|
Loading…
Reference in New Issue