Currently, the API uses only ephemeral secret keys for Diffie-Hellman & everything else is forced to use the bare x25519 function.
This PR implements another secret key type, StaticSecret. We have two secret key types, EphemeralSecret & StaticSecret, & one public key type, PublicKey. This enables users to be able to save & load secret keys using StaticSecret & allows us to use the same logic to create PublicKeys from both secret key types.
In a key exchange, you don't have a way to know whether or not they'll ever reuse their secret key. Since creating a PublicKey is a conversion from a secret key, this name better reflects that the value might not be ephemeral.
Currently, the API uses only ephemeral secret keys for Diffie-Hellman & everything else is forced to use the bare
x25519
function.This PR implements another secret key type,
StaticSecret
. We have two secret key types,EphemeralSecret
&StaticSecret
, & one public key type,PublicKey
. This enables users to be able to save & load secret keys usingStaticSecret
& allows us to use the same logic to createPublicKey
s from both secret key types.In a key exchange, you don't have a way to know whether or not they'll ever reuse their secret key. Since creating a
PublicKey
is a conversion from a secret key, this name better reflects that the value might not be ephemeral.