pub struct EncryptedMessage {
pub kem_ciphertext: MlKemCiphertext,
pub aes_ciphertext: Vec<u8>,
pub nonce: [u8; 12],
pub aad_hash: [u8; 32],
}Expand description
Core PQC types from saorsa-pqc 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§
§kem_ciphertext: MlKemCiphertextML-KEM-768 ciphertext (1088 bytes)
aes_ciphertext: Vec<u8>AES-GCM encrypted data with authentication tag
nonce: [u8; 12]AES-GCM nonce (12 bytes)
aad_hash: [u8; 32]SHA-256 hash of associated data for verification
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 moreAuto Trait Implementations§
impl Freeze for EncryptedMessage
impl RefUnwindSafe for EncryptedMessage
impl Send for EncryptedMessage
impl Sync 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