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
42 #else
44 #endif
45 typedef struct {
47  unsigned SecLevel;
62 #ifdef BRP_SUPPORT_LEGACY_METHODS
64 #else
66 #endif
67 typedef struct {
70  bool Encrypted;
71  bool MACed;
72  bool SessionKey;
73  unsigned DeriveKey;
74  unsigned SecLevel;
94 #ifdef BRP_SUPPORT_LEGACY_METHODS
95 brp_errcode brp_Sec_SetKey(brp_protocol protocol, bool ContinuousIV, bool Encrypted, bool MACed, bool SessionKey, unsigned DeriveKey, unsigned SecLevel, brp_buf Key);
96 #else
98 #endif
99 typedef struct {
101  unsigned SecLevel;
106  bool* Encrypted;
107  bool* MACed;
108  bool* SessionKey;
130 #ifdef BRP_SUPPORT_LEGACY_METHODS
131 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);
132 #else
134 #endif
135 typedef struct {
150 #ifdef BRP_SUPPORT_LEGACY_METHODS
152 #else
154 #endif
155 typedef struct {
158  bool Encrypted;
159  bool MACed;
161  unsigned SecLevel;
201 #ifdef BRP_SUPPORT_LEGACY_METHODS
202 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);
203 #else
205 #endif
206 typedef struct {
217 #ifdef BRP_SUPPORT_LEGACY_METHODS
219 #else
221 #endif
222 typedef struct {
224  unsigned SecLevel;
233 #ifdef BRP_SUPPORT_LEGACY_METHODS
234 brp_errcode brp_Sec_LockReset(brp_protocol protocol, unsigned SecLevel);
235 #else
237 #endif
238 typedef struct {
255 #ifdef BRP_SUPPORT_LEGACY_METHODS
257 #else
259 #endif
260 #endif
261 
size_t TunnelledCmd_len
Definition: sec.h:163
brp_protocol protocol
Definition: sec.h:207
unsigned SecLevel
Definition: sec.h:47
bool * MACed
Definition: sec.h:107
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:101
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:240
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:158
brp_buf Key
Definition: sec.h:75
unsigned SecLevel
Definition: sec.h:23
brp_buf * EncRndA
Definition: sec.h:103
bool SessionKey
Definition: sec.h:72
unsigned SecLevel
Definition: sec.h:161
struct brp_mempool_object_t * brp_mempool
mempool handle.
Definition: mempool.h:29
brp_protocol protocol
Definition: sec.h:156
brp_HostSecurityAccessConditionBits AcMask
Definition: sec.h:48
brp_protocol protocol
Definition: sec.h:136
bool MACed
Definition: sec.h:159
brp_buf * TunnelledResp
Definition: sec.h:164
brp_buf * RndB
Definition: sec.h:104
size_t * TunnelledResp_len
Definition: sec.h:165
brp_mempool * mempool
Definition: sec.h:166
bool * SessionKey
Definition: sec.h:108
bool * ContinuousIV
Definition: sec.h:105
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 brp_Sec_AuthPhase1() comman...
brp_buf TunnelledCmd
Definition: sec.h:162
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:239
brp_buf RndA
Definition: sec.h:102
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:157
brp_protocol protocol
Definition: sec.h:46
brp_protocol protocol
Definition: sec.h:223
bool * Encrypted
Definition: sec.h:106
unsigned SecLevel
Definition: sec.h:224
unsigned char * brp_buf
represents a pointer to a protocol data buffer.
Definition: common.h:61
bool SessionKey
Definition: sec.h:160
Every Feature in this list can be disabled by not setting the corresponding bit.
Definition: typedefs.h:4434
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:100
brp_buf EncRndB
Definition: sec.h:137
brp_mempool * mempool
Definition: sec.h:109