Function tor_llcrypto::pk::keymanip::convert_curve25519_to_ed25519_private
source · pub fn convert_curve25519_to_ed25519_private(
privkey: &StaticSecret
) -> Option<(ExpandedKeypair, u8)>
Available on crate feature
cvt-x25519
only.Expand description
Convert a curve25519 private key to an ed25519 private key (and give a sign bit) to use with it, for use in ntor key cross-certification.
Note that this formula is not standardized; don’t use it for anything besides cross-certification.
NEVER use these keys to sign inputs that may be generated by an attacker.
§Panics
If the debug_assertions
feature is enabled, this function will
double-check that the key it is about to return is the right
private key for the public key returned by
convert_curve25519_to_ed25519_public
.
This panic should be impossible unless there are implementation bugs.