ed25519_bip32_core/
lib.rs

1//! Ed25519 key handling using BIP32 style derivation
2//!
3//! Ed25519 is notable for its public key generation involving hashing and bit manipulations,
4//! which seemingly prevents its use for BIP32. Instead this package use the ed25519 is
5//! extended form (post-hashing).
6//!
7//! BIP32 allows derivation given a private key, of up to 2^32 children, using
8//! two different derivation scheme (soft or hard).
9//!
10//! In soft derivation, the important property is that given the parent public key,
11//! one can derive all softly derived children public key.
12
13#![cfg_attr(not(feature = "std"), no_std)]
14#![cfg_attr(not(feature = "std"), feature(error_in_core))]
15
16#![cfg_attr(feature = "with-bench", feature(test))]
17#[cfg(test)]
18#[cfg(feature = "with-bench")]
19extern crate test;
20
21#[cfg(not(feature = "std"))]
22extern crate alloc;
23
24#[cfg(not(feature = "std"))]
25extern crate core;
26
27mod derivation;
28mod hex;
29mod key;
30mod securemem;
31mod signature;
32
33#[cfg(test)]
34mod tests;
35
36#[cfg(test)]
37#[cfg(feature = "with-bench")]
38mod bench;
39
40pub use derivation::{DerivationError, DerivationIndex, DerivationScheme};
41pub use key::{PrivateKeyError, PublicKeyError, XPrv, XPub, XPRV_SIZE, XPUB_SIZE};
42pub use signature::{Signature, SignatureError, SIGNATURE_SIZE};