Skip to main content

Mountain/IPC/Enhanced/SecureMessageChannel/
EncryptedMessage.rs

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