pub struct HpkeAwsLcRs<const KEY_SIZE: usize, const KDF_SIZE: usize> {
suite: HpkeSuite,
dh_kem: &'static DhKem<KDF_SIZE>,
hkdf: &'static dyn HkdfPrkExtract,
aead: &'static Algorithm,
}
Expand description
HpkeAwsLcRs
holds the concrete instantiations of the algorithms specified by the HpkeSuite.
Fields§
§suite: HpkeSuite
§dh_kem: &'static DhKem<KDF_SIZE>
§hkdf: &'static dyn HkdfPrkExtract
§aead: &'static Algorithm
Implementations§
Source§impl<const KEY_SIZE: usize, const KDF_SIZE: usize> HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>
impl<const KEY_SIZE: usize, const KDF_SIZE: usize> HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>
Sourcefn key_schedule(
&self,
shared_secret: KemSharedSecret<KDF_SIZE>,
info: &[u8],
) -> Result<KeySchedule<KEY_SIZE>, Error>
fn key_schedule( &self, shared_secret: KemSharedSecret<KDF_SIZE>, info: &[u8], ) -> Result<KeySchedule<KEY_SIZE>, Error>
fn key_schedule_labeled_expand<const L: usize>( &self, shared_secret: &KemSharedSecret<KDF_SIZE>, key_schedule_context: &[u8], label: Label, ) -> [u8; L]
Trait Implementations§
Source§impl<const KEY_SIZE: usize, const KDF_SIZE: usize> Hpke for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>
impl<const KEY_SIZE: usize, const KDF_SIZE: usize> Hpke for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>
Source§fn seal(
&self,
info: &[u8],
aad: &[u8],
plaintext: &[u8],
pub_key: &HpkePublicKey,
) -> Result<(EncapsulatedSecret, Vec<u8>), Error>
fn seal( &self, info: &[u8], aad: &[u8], plaintext: &[u8], pub_key: &HpkePublicKey, ) -> Result<(EncapsulatedSecret, Vec<u8>), Error>
Seal the provided
plaintext
to the recipient public key pub_key
with application supplied
info
, and additional data aad
. Read moreSource§fn setup_sealer(
&self,
info: &[u8],
pub_key: &HpkePublicKey,
) -> Result<(EncapsulatedSecret, Box<dyn HpkeSealer + 'static>), Error>
fn setup_sealer( &self, info: &[u8], pub_key: &HpkePublicKey, ) -> Result<(EncapsulatedSecret, Box<dyn HpkeSealer + 'static>), Error>
Set up a sealer context for the receiver public key
pub_key
with application supplied info
. Read moreSource§fn open(
&self,
enc: &EncapsulatedSecret,
info: &[u8],
aad: &[u8],
ciphertext: &[u8],
secret_key: &HpkePrivateKey,
) -> Result<Vec<u8>, Error>
fn open( &self, enc: &EncapsulatedSecret, info: &[u8], aad: &[u8], ciphertext: &[u8], secret_key: &HpkePrivateKey, ) -> Result<Vec<u8>, Error>
Open the provided
ciphertext
using the encapsulated secret enc
, with application
supplied info
, and additional data aad
. Read moreSource§fn setup_opener(
&self,
enc: &EncapsulatedSecret,
info: &[u8],
secret_key: &HpkePrivateKey,
) -> Result<Box<dyn HpkeOpener + 'static>, Error>
fn setup_opener( &self, enc: &EncapsulatedSecret, info: &[u8], secret_key: &HpkePrivateKey, ) -> Result<Box<dyn HpkeOpener + 'static>, Error>
Source§fn generate_key_pair(&self) -> Result<(HpkePublicKey, HpkePrivateKey), Error>
fn generate_key_pair(&self) -> Result<(HpkePublicKey, HpkePrivateKey), Error>
Generate a new public key and private key pair compatible with this HPKE instance. Read more
Auto Trait Implementations§
impl<const KEY_SIZE: usize, const KDF_SIZE: usize> Freeze for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>
impl<const KEY_SIZE: usize, const KDF_SIZE: usize> !RefUnwindSafe for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>
impl<const KEY_SIZE: usize, const KDF_SIZE: usize> Send for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>
impl<const KEY_SIZE: usize, const KDF_SIZE: usize> Sync for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>
impl<const KEY_SIZE: usize, const KDF_SIZE: usize> Unpin for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>
impl<const KEY_SIZE: usize, const KDF_SIZE: usize> !UnwindSafe for HpkeAwsLcRs<KEY_SIZE, KDF_SIZE>
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