Adds optional decryption of ciphered secured packets, entirely in the browser — the key never leaves the frontend. - decode.py: _decode_secured_packet exposes 'cipher_block' (the contiguous on-wire ciphered octets CNTR..end, ready for CBC) and raw kic/kid bytes for algorithm selection. Additive only. - index.html: pure-JS DES/3DES core (FIPS 46-3 bit-array tables, parity ignored) + CBC; AES-CBC via native SubtleCrypto; both with zero IV per TS 102 225. decryptSecured() picks the algorithm from the KIc nibble (02 AES-CBC, 05 3DES-2K, 09 3DES-3K, 01 DES) with key-length validation. - UI: ciphered packets show a key-hex input + Decrypt strip below the detail table; keys are memoized per key-set for the session in an in-memory OTA_KEYS map — never sent to the server, never persisted. - Decrypted results cached by cipher_block (survive live-polling re-renders); plaintext rows rendered as CNTR/PCNTR/RC/Secured data (decrypted) alongside the ciphertext; wrong-key guard via the decrypted padding counter (PCNTR > remaining → "invalid padding"). - 3DES implementation validated byte-identical against openssl des-ede3-cbc (3-key, 2-key ×3 random vectors, single-key). No CC verification (out of scope). Tests: +2 (cipher_block contiguity, AES registry guard) — 350 total. Version 1.19.0, SW cache simtrace-analyser-v27.
23 lines
587 B
Python
23 lines
587 B
Python
"""simtrace2-pysniff — Python replacement for simtrace2-sniff."""
|
|
|
|
from .device import SniffSession, DeviceDisconnected, find_sniffer_device
|
|
from .protocol import parse_message, SniffMessage
|
|
from .gsmtap import GsmtapSender, GsmtapReceiver
|
|
from .pcap import PcapWriter
|
|
from .dump import FileDumper, format_message
|
|
|
|
__version__ = '1.19.0'
|
|
__all__ = [
|
|
'SniffSession',
|
|
'DeviceDisconnected',
|
|
'find_sniffer_device',
|
|
'parse_message',
|
|
'SniffMessage',
|
|
'GsmtapSender',
|
|
'GsmtapReceiver',
|
|
'PcapWriter',
|
|
'FileDumper',
|
|
'format_message',
|
|
'__version__',
|
|
]
|