--- Crypt-Ed25519/Ed25519.pm 2021/08/11 23:02:08 1.14 +++ Crypt-Ed25519/Ed25519.pm 2021/08/11 23:14:08 1.15 @@ -211,16 +211,24 @@ =head1 Key Exchange As an extension to Ed25519, this module implements a key exchange similar -(But not identical) to Curve25519. For this, both sides generate a keypair -and send their public key to the other side. Then both sides can generate -the same shared secret using this function: +to Curve25519, which should be compatible to other implementations of +Curv25519, depending on how the resulting shared secret is hashed. + +To do this, both sides generate a keypair and send their public key to the +other side. Then both sides can generate the same shared secret using this +function: =over =item $shared_secret = Crypt::Ed25519::key_exchange $other_public_key, $own_private_key Return the 32 octet shared secret generated from the given public and -private key. See SYNOPSIS for an actual example. +private key. + +The resulting C<$shared_key> should be hashed before use (for example, by +using it in a KDF such as HKDF). + +See SYNOPSIS for an actual example. =back