updated keystore and added more .sub files
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
//! 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.
|
||||
|
||||
/// Blob: KATK + 30 entries (all manufacture keys + type 20 for Star Line) + VAG 64 bytes.
|
||||
/// Blob: KATK + 41 entries (30 original + 11 Pandora new keys) + VAG 64 bytes.
|
||||
#[rustfmt::skip]
|
||||
pub const KEYSTORE_BLOB: &[u8] = &[
|
||||
b'K', b'A', b'T', b'K',
|
||||
0x1E, 0x00, // 30 entries
|
||||
0x29, 0x00, // 41 entries (30 original + 11 Pandora)
|
||||
// type 10 KIA
|
||||
0x0A, 0x00, 0x00, 0x00, 0xDB, 0x5C, 0xAA, 0x8D, 0xFC, 0xDF, 0xF5, 0xA8,
|
||||
// type 11 KIAV6A
|
||||
@@ -67,6 +67,28 @@ pub const KEYSTORE_BLOB: &[u8] = &[
|
||||
0x00, 0x00, 0x00, 0x00, 0x96, 0x15, 0x35, 0x27, 0xAB, 0x7A, 0x1A, 0xB5,
|
||||
// type 20 Star Line (same key as SL_A2-A4, for KeyStore.star_line_mf_key)
|
||||
0x14, 0x00, 0x00, 0x00, 0xDA, 0x78, 0xFE, 0xF8, 0x9B, 0xF8, 0xF7, 0x9B,
|
||||
// type 1 Pandora_M101
|
||||
0x01, 0x00, 0x00, 0x00, 0x99, 0xAE, 0x17, 0x2A, 0x9A, 0x7D, 0x1D, 0x38,
|
||||
// type 1 Pandora_PRO
|
||||
0x01, 0x00, 0x00, 0x00, 0xAC, 0x97, 0x15, 0x28, 0x7B, 0x97, 0x36, 0x1B,
|
||||
// type 1 Pandora_PRO2
|
||||
0x01, 0x00, 0x00, 0x00, 0xB9, 0x19, 0x2B, 0x39, 0x9A, 0x1E, 0xAF, 0x7E,
|
||||
// type 1 Pandora_SUBARU
|
||||
0x01, 0x00, 0x00, 0x00, 0x95, 0x79, 0x22, 0xA4, 0x34, 0xB9, 0x19, 0x35,
|
||||
// type 1 Pandora_SUZUKI
|
||||
0x01, 0x00, 0x00, 0x00, 0x73, 0xBD, 0xED, 0xDC, 0x06, 0xEF, 0x52, 0x25,
|
||||
// type 1 Pandora_DEA
|
||||
0x01, 0x00, 0x00, 0x00, 0x77, 0xB9, 0xE9, 0xD8, 0x02, 0xEB, 0x56, 0x21,
|
||||
// type 1 Pandora_GIBIDI
|
||||
0x01, 0x00, 0x00, 0x00, 0x76, 0xBA, 0xEA, 0xDB, 0x01, 0xEA, 0x55, 0x22,
|
||||
// type 1 Pandora_MCODE
|
||||
0x01, 0x00, 0x00, 0x00, 0x75, 0xBB, 0xEB, 0xDA, 0x00, 0xE9, 0x54, 0x23,
|
||||
// type 1 Pandora_Unknown_1
|
||||
0x01, 0x00, 0x00, 0x00, 0x72, 0xBC, 0xEC, 0xDD, 0x07, 0xEE, 0x53, 0x24,
|
||||
// type 1 Pandora_Unknown_2
|
||||
0x01, 0x00, 0x00, 0x00, 0x70, 0xBE, 0xEE, 0xDF, 0x05, 0xEC, 0x51, 0x26,
|
||||
// type 1 Pandora_Test_Debug_2
|
||||
0x01, 0x00, 0x00, 0x00, 0xEF, 0xCD, 0xAB, 0x89, 0x67, 0x45, 0x32, 0x01,
|
||||
b'V', b'A', b'G', b' ',
|
||||
// VAG raw 64 bytes
|
||||
0x01, 0x37, 0x6C, 0x86, 0xAD, 0xAB, 0xCC, 0x43, 0x07, 0x4D, 0xE8, 0x59, 0xC1, 0x2F, 0x36, 0xAB,
|
||||
|
||||
@@ -51,3 +51,36 @@ pub fn parse_blob(blob: &[u8]) -> Option<ParsedKeystore> {
|
||||
pub fn embedded_blob() -> &'static [u8] {
|
||||
embedded::KEYSTORE_BLOB
|
||||
}
|
||||
|
||||
/// Return all (type_id, key_u64) from the embedded blob for comparison with external key lists (e.g. Pandora).
|
||||
/// Key is stored LE in blob; returned as u64. Format as 16-char hex with format!("{:016X}", key) to match Pandora.
|
||||
#[cfg(test)]
|
||||
pub fn embedded_entries_for_compare() -> Vec<(u32, u64)> {
|
||||
parse_blob(embedded_blob()).map(|p| p.entries).unwrap_or_default()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn dump_keystore_keys_for_pandora_compare() {
|
||||
let entries = embedded_entries_for_compare();
|
||||
const NAMES: &[&str] = &[
|
||||
"KIA", "KIAV6A", "KIAV6B", "KIAV5", "Alligator", "Mongoose",
|
||||
"SL_A6-A9/Tomahawk_9010", "Pantera", "SL_A2-A4", "Cenmax_St-5", "SL_B6,B9_dop",
|
||||
"Harpoon", "Tomahawk_TZ-9030", "Tomahawk_Z,X_3-5", "Cenmax_St-7", "Sheriff",
|
||||
"Pantera_CLK", "Cenmax", "Alligator_S-275", "Guard_RF-311A", "Partisan_RX",
|
||||
"APS-1100_APS-2550", "Pantera_XS/Jaguar", "Teco", "Leopard", "Faraon", "Reff",
|
||||
"ZX-730-750-1055", "Star Line",
|
||||
"Pandora_M101", "Pandora_PRO", "Pandora_PRO2", "Pandora_SUBARU", "Pandora_SUZUKI",
|
||||
"Pandora_DEA", "Pandora_GIBIDI", "Pandora_MCODE", "Pandora_Unknown_1", "Pandora_Unknown_2",
|
||||
"Pandora_Test_Debug_2",
|
||||
];
|
||||
eprintln!("KAT embedded keystore keys (type, hex, name):");
|
||||
for (i, (ty, key)) in entries.iter().enumerate() {
|
||||
let name = NAMES.get(i).copied().unwrap_or("?");
|
||||
eprintln!(" type {} {} {}", ty, format!("{:016X}", key), name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user