keyfork-derive-util: add test requiring ed25519 hardened derivation
This commit is contained in:
parent
ff03fc62ad
commit
34af8dcfcd
|
@ -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]
|
||||||
|
|
Loading…
Reference in New Issue