minor updates
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
//! Embedded keystore blob (standard encrypted + VAG raw).
|
||||
//! Data is stored as binary to avoid plain-text keys in config.
|
||||
//! Format: "KATK" magic, n_entries (u16 LE), then per entry: type_id (u32 LE), key (u64 LE), then "VAG " + 64 bytes.
|
||||
//! Key bytes are little-endian (LSB first); the resulting u64 matches reference hex (MSB-first notation).
|
||||
//! All manufacture keys from the encrypted keystore list are included for current and future protocols.
|
||||
//! Type 20 (Star Line) is also included so KeyStore.star_line_mf_key is populated from the same key as SL_A2-A4.
|
||||
|
||||
|
||||
@@ -33,6 +33,10 @@ pub struct ParsedKeystore {
|
||||
}
|
||||
|
||||
/// Parse the embedded keystore blob. Returns KIA/Star Line entries and VAG raw bytes.
|
||||
///
|
||||
/// Keys are stored as 8 bytes **little-endian** per entry; we load with `u64::from_le_bytes`.
|
||||
/// The resulting u64 value matches the reference/Pandora hex (e.g. KIA = 0xA8F5DFFC8DAA5CDB),
|
||||
/// which is typically written MSB-first in docs; KeeLoq uses this value as a 64-bit key.
|
||||
pub fn parse_blob(blob: &[u8]) -> Option<ParsedKeystore> {
|
||||
if blob.len() < 4 || &blob[0..4] != MAGIC {
|
||||
return None;
|
||||
|
||||
Reference in New Issue
Block a user