Environment
libosdp 3.1.0 (Python, PyPI)
PD: HID Signo, OSDP v2, SCBK provisioned
CP: Python osdp.ControlPanel
Last working: 3.0.8
Observed
CMD: CAP(62) REPLY: PDCAP(46)
StateChange: [Cap-Detect] -> [SC-Chlng] (SC-Inactive)
Failed to verify PD cryptogram
SC Failed. Retry with SCBK-D
Downgrading to 3.0.8 fixes it with zero other changes.
Suspected cause
The adaptive CRC/checksum change in v3.1.0 ("CP: Add adaptive checksum/CRC-16 support with automatic fallback"). In osdp_cp.c, the REPLY_PDCAP handler clears PD_FLAG_CP_USE_CRC if the PD's CHECK_CHARACTER_SUPPORT compliance level has bit 0 unset, and osdp_phy.c now conditions PKT_CONTROL_CRC on that flag. In v3.0.8 CP-sent packets were always CRC-16 framed.
This runs after PDCAP but before CMD_CHLNG, so the first SC handshake packet goes out checksum-framed on v3.1.0. HID Signo appears to expect CRC-16 on the SC handshake (as do other implementations, e.g. ICT AN-321), so its REPLY_CCRYPT no longer matches what the CP computes.
Environment
libosdp 3.1.0 (Python, PyPI)
PD: HID Signo, OSDP v2, SCBK provisioned
CP: Python osdp.ControlPanel
Last working: 3.0.8
Observed
CMD: CAP(62) REPLY: PDCAP(46)
StateChange: [Cap-Detect] -> [SC-Chlng] (SC-Inactive)
Failed to verify PD cryptogram
SC Failed. Retry with SCBK-D
Downgrading to 3.0.8 fixes it with zero other changes.
Suspected cause
The adaptive CRC/checksum change in v3.1.0 ("CP: Add adaptive checksum/CRC-16 support with automatic fallback"). In osdp_cp.c, the REPLY_PDCAP handler clears PD_FLAG_CP_USE_CRC if the PD's CHECK_CHARACTER_SUPPORT compliance level has bit 0 unset, and osdp_phy.c now conditions PKT_CONTROL_CRC on that flag. In v3.0.8 CP-sent packets were always CRC-16 framed.
This runs after PDCAP but before CMD_CHLNG, so the first SC handshake packet goes out checksum-framed on v3.1.0. HID Signo appears to expect CRC-16 on the SC handshake (as do other implementations, e.g. ICT AN-321), so its REPLY_CCRYPT no longer matches what the CP computes.