Struct hpke::kem::DhP384HkdfSha384
source · pub struct DhP384HkdfSha384;
Expand description
Represents DHKEM(P-384, HKDF-SHA384)
Trait Implementations§
source§impl Kem for DhP384HkdfSha384
impl Kem for DhP384HkdfSha384
source§fn derive_keypair(ikm: &[u8]) -> (Self::PrivateKey, Self::PublicKey)
fn derive_keypair(ikm: &[u8]) -> (Self::PrivateKey, Self::PublicKey)
Deterministically derives a keypair from the given input keying material
Requirements
This keying material SHOULD have as many bits of entropy as the bit length of a
secret key, i.e., 8 * Self::PrivateKey::size()
. For X25519 and P-256, this is
256 bits of entropy.
source§fn sk_to_pk(
sk: &<DhP384 as DhKeyExchange>::PrivateKey
) -> <DhP384 as DhKeyExchange>::PublicKey
fn sk_to_pk( sk: &<DhP384 as DhKeyExchange>::PrivateKey ) -> <DhP384 as DhKeyExchange>::PublicKey
Computes the public key of a given private key
§type PublicKey = <DhP384 as DhKeyExchange>::PublicKey
type PublicKey = <DhP384 as DhKeyExchange>::PublicKey
The key exchange’s public key type. If you want to generate a keypair, see
Kem::gen_keypair
or Kem::derive_keypair
§type PrivateKey = <DhP384 as DhKeyExchange>::PrivateKey
type PrivateKey = <DhP384 as DhKeyExchange>::PrivateKey
The key exchange’s private key type. If you want to generate a keypair, see
Kem::gen_keypair
or Kem::derive_keypair
§type EncappedKey = EncappedKey
type EncappedKey = EncappedKey
The encapsulated key for this KEM. This is used by the recipient to derive the shared
secret.
source§fn gen_keypair<R: CryptoRng + RngCore>(
csprng: &mut R
) -> (Self::PrivateKey, Self::PublicKey)
fn gen_keypair<R: CryptoRng + RngCore>( csprng: &mut R ) -> (Self::PrivateKey, Self::PublicKey)
Generates a random keypair using the given RNG
Auto Trait Implementations§
impl RefUnwindSafe for DhP384HkdfSha384
impl Send for DhP384HkdfSha384
impl Sync for DhP384HkdfSha384
impl Unpin for DhP384HkdfSha384
impl UnwindSafe for DhP384HkdfSha384
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more