llcrypto: Document ed25519->curve25519->ed25519 conversion behaviour.

This commit is contained in:
Gabriela Moldovan 2023-06-23 16:49:11 +01:00
parent 47606ad881
commit 1fe15c5012
1 changed files with 5 additions and 0 deletions

View File

@ -112,6 +112,11 @@ pub fn convert_curve25519_to_ed25519_private(
///
/// Note: Using the same keypair for multiple purposes (such as key-exchange and signing) is
/// considered bad practice. Don't use this function unless you know what you're doing.
///
/// It's important to note that converting a private key from ed25519 -> curve25519 -> ed25519 will
/// yield an [`ExpandedKeypair`](pk::ed25519::ExpandedKeypair) that is _not_ identical to the
/// expanded version of the original [`Keypair`](pk::ed25519::Keypair): the lower halves (the keys) of
/// the expanded key pairs will be the same, but their upper halves (the nonces) will be different.
#[cfg(any(test, feature = "keymgr"))]
pub fn convert_ed25519_to_curve25519_private(
keypair: &pk::ed25519::Keypair,