|
LibLogicalAccess
2.5.0
An Open Source RFID Library
|
#include <MifarePlusSL3Auth.hpp>
Public Member Functions | |
| MifarePlusSL3Auth (std::shared_ptr< ReaderCardAdapter > rca) | |
| bool | firstAuthenticate (int sector, std::shared_ptr< AES128Key > key, MifareKeyType type) |
| ByteVector | deriveKEnc () |
| ByteVector | deriveKMac () |
| ByteVector | computeWriteMac (uint8_t command_code, uint16_t block_number, const ByteVector &data) |
| ByteVector | cipherWriteData (const ByteVector &in) |
Public Attributes | |
| ByteVector | trans_id_ |
| uint16_t | write_counter_ |
| uint16_t | read_counter_ |
Private Member Functions | |
| bool | aes_first_auth_step2 () |
| bool | aes_first_auth_final (const ByteVector &encrypted_data) |
Private Attributes | |
| std::shared_ptr< ReaderCardAdapter > | rca_ |
| ByteVector | aes_key_ |
| ByteVector | rnd_a_ |
| ByteVector | rnd_b_ |
Maintain the authentication state and key for MifarePlus in security level 3.
|
explicit |
|
private |
|
private |
| ByteVector MifarePlusSL3Auth::cipherWriteData | ( | const ByteVector & | in | ) |
| ByteVector MifarePlusSL3Auth::computeWriteMac | ( | uint8_t | command_code, |
| uint16_t | block_number, | ||
| const ByteVector & | data | ||
| ) |
| ByteVector MifarePlusSL3Auth::deriveKEnc | ( | ) |
Derive KEnc for the session.
| ByteVector MifarePlusSL3Auth::deriveKMac | ( | ) |
Compute the key use for MACing.
| bool MifarePlusSL3Auth::firstAuthenticate | ( | int | sector, |
| std::shared_ptr< AES128Key > | key, | ||
| MifareKeyType | type | ||
| ) |
|
private |
|
private |
| uint16_t logicalaccess::MifarePlusSL3Auth::read_counter_ |
|
private |
|
private |
| ByteVector logicalaccess::MifarePlusSL3Auth::trans_id_ |
| uint16_t logicalaccess::MifarePlusSL3Auth::write_counter_ |
1.9.6