keyfork-derive-util: add test requiring ed25519 hardened derivation

This commit is contained in:
Ryan Heywood 2023-09-25 17:11:29 -05:00
parent ff03fc62ad
commit 34af8dcfcd
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 11 additions and 0 deletions

View File

@ -102,6 +102,17 @@ fn ed25519() {
} }
} }
#[cfg(feature = "ed25519")]
#[test]
#[should_panic]
fn panics_with_unhardened_derivation() {
use ed25519_dalek::SigningKey;
let seed = hex!("000102030405060708090a0b0c0d0e0f");
let xkey = ExtendedPrivateKey::<SigningKey>::new(seed).unwrap();
xkey.derive_path(&DerivationPath::from_str("m/0").unwrap()).unwrap();
}
#[cfg(feature = "ed25519")] #[cfg(feature = "ed25519")]
#[test] #[test]
#[should_panic] #[should_panic]