13 #ifndef __BRP_BALTECH_API_CMDS_SEC_H__ 14 #define __BRP_BALTECH_API_CMDS_SEC_H__ 15 #include "../typedefs.h" 20 #define BRP_Sec_ErrCrypto BRP_ERR_STATUS(0x0700, 0x01) 24 #define BRP_Sec_ErrTunnel BRP_ERR_STATUS(0x0700, 0x02) 180 brp_errcode brp_Sec_Tunnel(
brp_protocol protocol,
bool ContinuousIV,
bool Encrypted,
bool MACed,
bool SessionKey,
unsigned SecLevel,
brp_buf TunnelledCmd,
size_t TunnelledCmd_len,
brp_buf* TunnelledResp,
size_t* TunnelledResp_len,
brp_mempool *mempool);
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
struct brp_mempool_object_t * brp_mempool
mempool handle.
brp_errcode brp_Sec_GetCurAcMask(brp_protocol protocol, brp_HostSecurityAccessConditionBits *AcMask)
This command retrieves the Access Condition Mask, which is applied by the reader in the current conte...
brp_errcode brp_Sec_AuthPhase1(brp_protocol protocol, unsigned SecLevel, brp_buf RndA, brp_buf *EncRndA, brp_buf *RndB, bool *ContinuousIV, bool *Encrypted, bool *MACed, bool *SessionKey, brp_mempool *mempool)
This command initiates a 2-phase authentication.
brp_errcode brp_Sec_AuthPhase2(brp_protocol protocol, brp_buf EncRndB)
This command finishes the 2-phase authentication procedure started by the brp_Sec_AuthPhase1() comman...
brp_errcode brp_Sec_GetAcMask(brp_protocol protocol, unsigned SecLevel, brp_HostSecurityAccessConditionBits *AcMask)
This command retrieves the Access Condition Mask of a specified security level.
brp_errcode brp_Sec_SetAcMask(brp_protocol protocol, unsigned SecLevel, brp_HostSecurityAccessConditionBits AcMask)
This command sets the Access Condition Mask of the security level specified in the SecurityLevel para...
brp_errcode brp_Sec_Reset(brp_protocol protocol)
This command resets the Baltech ID engine's security system.
brp_errcode brp_Sec_LockReset(brp_protocol protocol, unsigned SecLevel)
This command prevents, that a brp_Sys_FactoryReset() is run for the Security Level specified in the S...
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Every Feature in this list can be disabled by not setting the corresponding bit.
brp_errcode brp_Sec_SetKey(brp_protocol protocol, unsigned ContinuousIV, unsigned Encrypted, unsigned MACed, unsigned SessionKey, unsigned DeriveKey, unsigned SecLevel, brp_buf Key)
Sets a key and the appropriate Authorization Mode bits for a specified Security Level.
brp_errcode brp_Sec_Tunnel(brp_protocol protocol, bool ContinuousIV, bool Encrypted, bool MACed, bool SessionKey, unsigned SecLevel, brp_buf TunnelledCmd, size_t TunnelledCmd_len, brp_buf *TunnelledResp, size_t *TunnelledResp_len, brp_mempool *mempool)
This command enables to send a specific command, called the tunnelled command, to the reader (and to ...