Skip to main content

Mountain/IPC/Enhanced/SecureMessageChannel/
EncryptedMessage.rs

1
2//! Serialised encrypted-message envelope - key id (so
3//! decryption can find the right key during rotation), nonce,
4//! AES-256-GCM ciphertext, HMAC tag, and a millisecond
5//! timestamp used for replay-window enforcement.
6
7use serde::{Deserialize, Serialize};
8
9#[derive(Debug, Clone, Serialize, Deserialize)]
10pub struct Struct {
11	pub key_id:String,
12
13	pub nonce:Vec<u8>,
14
15	pub ciphertext:Vec<u8>,
16
17	pub hmac_tag:Vec<u8>,
18
19	pub timestamp:u64,
20}