C API for BALTECH SDK

§ brp_mutual_authenticate()

BRP_LIB brp_errcode brp_mutual_authenticate ( brp_protocol  protocol,
int  security_level,
brp_sec_key  key,
int *  req_auth_modes,
brp_sec_key  session_key 
)

Does a mutual authentication and generates a session key.

This command is only for low-level usage. Instead of using it, it is recommended to use the high-level wrapper brp_create_secure_channel()

This lowlevel operation is usually used only internally by brp_create_crypto() and is not needed by end users.

Parameters
protocoldevice against which the library shall authenticate
security_levelsecurity level that shall be authenticated
keythe key that shall be used to establish a secure channel
req_auth_modesa bitmask of auth modes that are required
session_keysession key that can be used by brp_secured_exec_cmd(). Maybe NULL, if sessionkey is not needed.