pub struct ExportOnly;Expand description
Export-Only pseudo-AEAD (AEAD id 0xffff).
Ciphersuites using this “AEAD” can only derive secrets through
SenderContext::export and
RecipientContext::export; Aead::seal
and Aead::open return HpkeError::NotSupported.
The [crypto::Aead] implementation below only exists to satisfy the
Aead supertrait bound and must not be called directly: HPKE never
invokes it, and it does not perform any encryption.
Trait Implementations§
Source§impl Aead for ExportOnly
impl Aead for ExportOnly
const KEY_SIZE: usize = 0
const TAG_SIZE: usize = 0
const NONCE_SIZE: usize = 0
fn encrypt_in_place( &self, _in_out: &mut [u8], _nonce: &[u8], _associated_data: &[u8], ) -> Hash
fn decrypt_in_place( &self, _in_out: &mut [u8], _nonce: &[u8], _associated_data: &[u8], _tag: &[u8], ) -> Result<(), AeadError>
fn encrypt(&self, plaintext: &[u8], nonce: &[u8], aad: &[u8]) -> Vec<u8> ⓘ
fn decrypt( &self, ciphertext: &[u8], nonce: &[u8], aad: &[u8], ) -> Result<Vec<u8>, AeadError>
Source§impl Aead for ExportOnly
impl Aead for ExportOnly
Source§const HPKE_AEAD_ID: u16 = 0xffff
const HPKE_AEAD_ID: u16 = 0xffff
The HPKE AEAD identifier (
draft-ietf-hpke-hpke-05 Section 7.3, IANA
“HPKE AEAD Identifiers”), used to build the ciphersuite suite_id.Source§const MAX_PLAINTEXT_SIZE: u64 = 0
const MAX_PLAINTEXT_SIZE: u64 = 0
Source§const MAX_CIPHERTEXT_SIZE: u64 = 0
const MAX_CIPHERTEXT_SIZE: u64 = 0
Source§fn new(key: &[u8]) -> Result<Self, HpkeError>
fn new(key: &[u8]) -> Result<Self, HpkeError>
Instantiates the cipher from
KEY_SIZE raw key bytes, as produced by
the HPKE key schedule. Read moreSource§impl Clone for ExportOnly
impl Clone for ExportOnly
impl Copy for ExportOnly
Source§impl Debug for ExportOnly
impl Debug for ExportOnly
impl Eq for ExportOnly
Source§impl PartialEq for ExportOnly
impl PartialEq for ExportOnly
impl StructuralPartialEq for ExportOnly
Auto Trait Implementations§
impl Freeze for ExportOnly
impl RefUnwindSafe for ExportOnly
impl Send for ExportOnly
impl Sync for ExportOnly
impl Unpin for ExportOnly
impl UnsafeUnpin for ExportOnly
impl UnwindSafe for ExportOnly
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