OSDP.Net icon indicating copy to clipboard operation
OSDP.Net copied to clipboard

Add a Secure Mode setting for PD

Open bytedreamer opened this issue 2 months ago • 0 comments

When the PD is in secure mode, only certain commands are allowed to be processed in the clear. The OSDP spec version 2.2.1 outline the proper behavior.

Unsecured communication (USC) is any packet not sent through a Secure Channel Session (SCS). For an unsecured PD (using SCBK_D ), USC commands from the ACU and replies from the PD are allowed. Once a SCS is established, communication between the ACU and PD shall adhere to the SCS packet format (use of SCB and MAC). The only exceptions are osdp_BUSY or osdp_NAK error code 0x01 Message check character(s) error (bad checksum/ or bad cyclic redundancy check). Interleaving USC packets during communication in a SCS is NOT allowed.

If a PD is configured to operate in a OSDP-SC Ffully Ssecurityed Mode (see D.7D.7) or is paired via user SCBK the following commands and replies may be allowed outside of SCS for the purpose of network configuration, maintenance, and establishing the SCS: Function Command Reply ID Report osdp_ID osdp_PDID Capabilities Report osdp_CAP osdp_PDCAP Communication Configuration osdp_COMSET osdp_COM Challenge and Secure Session Initialization osdp_CHLNG osdp_CCRYPT Server's Random Number and Server Cryptogram osdp_SCRYPT osdp_RMAC_I Negative Acknowledge osdp_NAK PD Busy osdp_BUSY

The PD shouldmay respond with OSDPosdp_NAK error 0x06 Encrypted Command Required if it receives any other USC command while configured for OSDP-SC full securityFully Secured Mode. The manufacturer of the PD may choose NOT to allow osdp_ID, osdp_PDID, osdp_CAP,

bytedreamer avatar Apr 06 '24 19:04 bytedreamer