C API for BALTECH SDK
sec.h
Go to the documentation of this file.
1 
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)
21 
24 #define BRP_Sec_ErrTunnel BRP_ERR_STATUS(0x0700, 0x02)
25 
86 brp_errcode brp_Sec_SetKey(brp_protocol protocol, unsigned ContinuousIV, unsigned Encrypted, unsigned MACed, unsigned SessionKey, unsigned DeriveKey, unsigned SecLevel, brp_buf Key);
116 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);
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);
201 brp_errcode brp_Sec_LockReset(brp_protocol protocol, unsigned SecLevel);
233 #endif
234 
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:27
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.
Definition: common.h:61
Every Feature in this list can be disabled by not setting the corresponding bit.
Definition: typedefs.h:4525
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 ...