Deepen AUTHENTICATE decode: P2 auth context + AUTN/AUTS decomposition

- Add a P2 spec for AUTHENTICATE (auth context bits + specific-reference-data
  flag), so P2 is displayed instead of only leaking through cmd.context.
- Fix P1 name to 'No indication' (was the misleading 'Run GSM algorithm').
- Decompose AUTN into SQN(xor)AK / AMF / MAC and AUTS into SQN(xor)AK / MAC-S
  per TS 33.102; surface 'specific reference data' key flag.
This commit is contained in:
catarrh committed 2026-08-16 21:44:57 +03:00
1 parent 35067f8d9d
commit 0fdaed503e
3 files changed
+66 -22

No files matched your search

+14 -5
View File
@@ -454,7 +454,7 @@ function cmd_description(m) {
function sw_text(m) {
const d = m.decoded;
if (!d || !d.sw) return '';
return d.sw.sw1 + ' ' + d.sw.sw2;
return (d.sw.sw1 + ' ' + d.sw.sw2).toUpperCase();
}
function sw_class(m) {
@@ -536,7 +536,11 @@ function responseRows(resp) {
if (resp.ck) rows.push(['CK', resp.ck]);
if (resp.ik) rows.push(['IK', resp.ik]);
if (resp.kc) rows.push(['Kc', resp.kc]);
if (resp.auts) rows.push(['AUTS', resp.auts]);
if (resp.auts) {
rows.push(['AUTS', resp.auts]);
if (resp.sqn_ak) rows.push(['SQN⊕AK', resp.sqn_ak + ' (concealed)']);
if (resp.mac_s) rows.push(['MAC-S', resp.mac_s]);
}
}
if (resp.code !== undefined) {
@@ -564,10 +568,15 @@ function cmdRows(cmd) {
const rows = [];
// AUTHENTICATE command body
if (cmd.context !== undefined) {
rows.push(['Auth context', cmd.context]);
if (cmd.rand !== undefined || cmd.autn !== undefined || cmd.specific_key) {
if (cmd.specific_key) rows.push(['Key', 'specific reference data']);
if (cmd.rand) rows.push(['RAND', cmd.rand]);
if (cmd.autn) rows.push(['AUTN', cmd.autn]);
if (cmd.autn) {
rows.push(['AUTN', cmd.autn]);
if (cmd.sqn_ak) rows.push(['SQN⊕AK', cmd.sqn_ak + ' (concealed)']);
if (cmd.amf) rows.push(['AMF', cmd.amf]);
if (cmd.mac) rows.push(['MAC', cmd.mac]);
}
}
// ENVELOPE fields