baseid_mdl/device.rs
1//! Device authentication and reader authentication for mDL exchange.
2
3use serde::{Deserialize, Serialize};
4
5/// Device authentication structure for mDL presentation.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct DeviceAuth {
8 /// Device signature over session transcript.
9 pub device_signature: Option<Vec<u8>>,
10 /// Device MAC over session transcript (alternative to signature).
11 pub device_mac: Option<Vec<u8>>,
12}
13
14/// Reader authentication request.
15#[derive(Debug, Clone, Serialize, Deserialize)]
16pub struct ReaderAuth {
17 /// Reader's certificate chain.
18 pub reader_certificate: Vec<u8>,
19 /// Signature over the request.
20 pub signature: Vec<u8>,
21}