BALTECH SDK wrapper functions reference
sec.h
Go to the documentation of this file.
1 
10 #ifndef __BRP_BALTECH_SDK_CMDS_SEC_H__
11 #define __BRP_BALTECH_SDK_CMDS_SEC_H__
12 #include "../typedefs.h"
16 #define BRP_Sec_ErrCrypto BRP_ERR_STATUS(0x0700, 0x01)
17 
20 #define BRP_Sec_ErrTunnel BRP_ERR_STATUS(0x0700, 0x02)
21 typedef struct {
23  unsigned SecLevel;
40 #ifdef BRP_SUPPORT_LEGACY_METHODS
41 brp_errcode brp_Sec_GetAcMask(brp_protocol protocol, unsigned _input_SecLevel, brp_HostSecurityAccessConditionBits* AcMask);
42 #else
44 #endif
45 typedef struct {
47  unsigned SecLevel;
62 #ifdef BRP_SUPPORT_LEGACY_METHODS
63 brp_errcode brp_Sec_SetAcMask(brp_protocol protocol, unsigned _input_SecLevel, brp_HostSecurityAccessConditionBits _input_AcMask);
64 #else
66 #endif
67 typedef struct {
70  bool Encrypted;
71  bool MACed;
72  bool SessionKey;
73  unsigned DeriveKey;
74  unsigned SecLevel;
92 #ifdef BRP_SUPPORT_LEGACY_METHODS
93 brp_errcode brp_Sec_SetKey(brp_protocol protocol, bool _input_ContinuousIV, bool _input_Encrypted, bool _input_MACed, bool _input_SessionKey, unsigned _input_DeriveKey, unsigned _input_SecLevel, brp_buf _input_Key);
94 #else
96 #endif
97 typedef struct {
99  unsigned SecLevel;
104  bool* Encrypted;
105  bool* MACed;
106  bool* SessionKey;
128 #ifdef BRP_SUPPORT_LEGACY_METHODS
129 brp_errcode brp_Sec_AuthPhase1(brp_protocol protocol, unsigned _input_SecLevel, brp_buf _input_RndA, brp_buf* EncRndA, brp_buf* RndB, bool* ContinuousIV, bool* Encrypted, bool* MACed, bool* SessionKey, brp_mempool *mempool);
130 #else
132 #endif
133 typedef struct {
148 #ifdef BRP_SUPPORT_LEGACY_METHODS
149 brp_errcode brp_Sec_AuthPhase2(brp_protocol protocol, brp_buf _input_EncRndB);
150 #else
152 #endif
153 typedef struct {
156  bool Encrypted;
157  bool MACed;
159  unsigned SecLevel;
199 #ifdef BRP_SUPPORT_LEGACY_METHODS
200 brp_errcode brp_Sec_Tunnel(brp_protocol protocol, bool _input_ContinuousIV, bool _input_Encrypted, bool _input_MACed, bool _input_SessionKey, unsigned _input_SecLevel, brp_buf _input_TunnelledCmd, size_t _input_TunnelledCmd_len, brp_buf* TunnelledResp, size_t* TunnelledResp_len, brp_mempool *mempool);
201 #else
203 #endif
204 typedef struct {
215 #ifdef BRP_SUPPORT_LEGACY_METHODS
217 #else
219 #endif
220 typedef struct {
222  unsigned SecLevel;
231 #ifdef BRP_SUPPORT_LEGACY_METHODS
232 brp_errcode brp_Sec_LockReset(brp_protocol protocol, unsigned _input_SecLevel);
233 #else
235 #endif
236 typedef struct {
253 #ifdef BRP_SUPPORT_LEGACY_METHODS
255 #else
257 #endif
258 #endif
259 
size_t TunnelledCmd_len
Definition: sec.h:161
brp_protocol protocol
Definition: sec.h:205
unsigned SecLevel
Definition: sec.h:47
bool * MACed
Definition: sec.h:105
brp_errcode brp_Sec_Reset(brp_Sec_Reset_t params)
This command resets the Baltech ID engine's security system.
brp_HostSecurityAccessConditionBits * AcMask
Definition: sec.h:24
unsigned SecLevel
Definition: sec.h:99
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
Definition: errorcodes.h:23
brp_errcode brp_Sec_GetAcMask(brp_Sec_GetAcMask_t params)
This command retrieves the Access Condition Mask of a specified security level.
brp_HostSecurityAccessConditionBits * AcMask
Definition: sec.h:238
brp_errcode brp_Sec_SetKey(brp_Sec_SetKey_t params)
Sets a key and the appropriate Authorization Mode bits for a specified Security Level.
unsigned SecLevel
Definition: sec.h:74
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
Definition: protocol.h:34
bool Encrypted
Definition: sec.h:156
brp_buf Key
Definition: sec.h:75
unsigned SecLevel
Definition: sec.h:23
brp_buf * EncRndA
Definition: sec.h:101
bool SessionKey
Definition: sec.h:72
unsigned SecLevel
Definition: sec.h:159
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:29
brp_protocol protocol
Definition: sec.h:154
brp_HostSecurityAccessConditionBits AcMask
Definition: sec.h:48
brp_protocol protocol
Definition: sec.h:134
bool MACed
Definition: sec.h:157
brp_buf * TunnelledResp
Definition: sec.h:162
brp_buf * RndB
Definition: sec.h:102
size_t * TunnelledResp_len
Definition: sec.h:163
brp_mempool * mempool
Definition: sec.h:164
bool * SessionKey
Definition: sec.h:106
bool * ContinuousIV
Definition: sec.h:103
brp_errcode brp_Sec_LockReset(brp_Sec_LockReset_t params)
This command prevents, that a Sys.FactoryReset is run for the Security Level specified in the SecLeve...
brp_protocol protocol
Definition: sec.h:22
unsigned DeriveKey
Definition: sec.h:73
brp_errcode brp_Sec_AuthPhase2(brp_Sec_AuthPhase2_t params)
This command finishes the 2-phase authentication procedure started by the Sec.AuthPhase1 command...
brp_buf TunnelledCmd
Definition: sec.h:160
brp_protocol protocol
Definition: sec.h:68
brp_errcode brp_Sec_AuthPhase1(brp_Sec_AuthPhase1_t params)
This command initiates a 2-phase authentication.
bool ContinuousIV
Definition: sec.h:69
brp_protocol protocol
Definition: sec.h:237
brp_buf RndA
Definition: sec.h:100
brp_errcode brp_Sec_Tunnel(brp_Sec_Tunnel_t params)
This command enables to send a specific command, called the tunnelled command, to the reader (and to ...
brp_errcode brp_Sec_SetAcMask(brp_Sec_SetAcMask_t params)
This command sets the Access Condition Mask of the security level specified in the SecurityLevel para...
bool Encrypted
Definition: sec.h:70
bool MACed
Definition: sec.h:71
bool ContinuousIV
Definition: sec.h:155
brp_protocol protocol
Definition: sec.h:46
brp_protocol protocol
Definition: sec.h:221
bool * Encrypted
Definition: sec.h:104
unsigned SecLevel
Definition: sec.h:222
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61
bool SessionKey
Definition: sec.h:158
Every Feature in this list can be disabled by not setting the corresponding bit.
Definition: typedefs.h:3094
brp_errcode brp_Sec_GetCurAcMask(brp_Sec_GetCurAcMask_t params)
This command retrieves the Access Condition Mask, which is applied by the reader in the current conte...
brp_protocol protocol
Definition: sec.h:98
brp_buf EncRndB
Definition: sec.h:135
brp_mempool * mempool
Definition: sec.h:107