![]() |
BALTECH Docs |
BALTECH SDK wrapper functions reference
|
| brp_errcode brp_Sec_AuthPhase1 | ( | brp_Sec_AuthPhase1_t | params | ) |
This command initiates a 2-phase authentication.
The 2-phase authentication is required for entering a security level, if its Authorization Mode enforces a session key.
In the first phase of the 2-phase authentication, the host sends a random number (RndA) to the reader. The reader encrypts this number two times, using AES128 encryption, with the key of the Security Level specified in SecLevel , and sends the result back to the host as EncRndA. The host then has to check if the reader encrypted the number correctly. If this is the case, the reader returns the OK status code and the brp_Sec_AuthPhase2() command can be called to initiate the second phase of the 2-phase authentication procedure.
If EncRndA is invalid, the reader is configured with an invalid key, different from the one expected by the host. In this case, an error status code is returned.
| [in] | params | Struct with the following fields:
|