pub struct EncryptedMessage {
pub ml_kem_ciphertext: Box<[u8; 1088]>,
pub aes_ciphertext: Vec<u8>,
pub nonce: [u8; 12],
pub associated_data_hash: [u8; 32],
pub version: u8,
}
Expand description
Wire format for encrypted messages
Contains all necessary components for decryption:
- ML-KEM ciphertext for key encapsulation
- AES-GCM ciphertext with authentication tag
- Nonce for AES-GCM
- Associated data hash for integrity
Fields§
§ml_kem_ciphertext: Box<[u8; 1088]>
ML-KEM-768 ciphertext (1088 bytes)
aes_ciphertext: Vec<u8>
AES-256-GCM encrypted data (variable length)
nonce: [u8; 12]
AES-GCM nonce (12 bytes)
associated_data_hash: [u8; 32]
Hash of associated data for verification
version: u8
Version for future compatibility
Implementations§
Trait Implementations§
Source§impl Clone for EncryptedMessage
impl Clone for EncryptedMessage
Source§fn clone(&self) -> EncryptedMessage
fn clone(&self) -> EncryptedMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EncryptedMessage
impl Debug for EncryptedMessage
impl Send for EncryptedMessage
impl Sync for EncryptedMessage
Auto Trait Implementations§
impl Freeze for EncryptedMessage
impl RefUnwindSafe for EncryptedMessage
impl Unpin for EncryptedMessage
impl UnwindSafe for EncryptedMessage
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