4#include <lib/nfc/protocols/iso14443_3a/iso14443_3a_poller.h>
19 MfClassicPollerEventTypeRequestMode,
21 MfClassicPollerEventTypeRequestReadSector,
23 MfClassicPollerEventTypeRequestSectorTrailer,
24 MfClassicPollerEventTypeRequestWriteBlock,
26 MfClassicPollerEventTypeRequestKey,
27 MfClassicPollerEventTypeNextSector,
28 MfClassicPollerEventTypeDataUpdate,
29 MfClassicPollerEventTypeFoundKeyA,
30 MfClassicPollerEventTypeFoundKeyB,
31 MfClassicPollerEventTypeKeyAttackStart,
32 MfClassicPollerEventTypeKeyAttackStop,
33 MfClassicPollerEventTypeKeyAttackNextSector,
35 MfClassicPollerEventTypeCardDetected,
36 MfClassicPollerEventTypeCardLost,
37 MfClassicPollerEventTypeSuccess,
38 MfClassicPollerEventTypeFail,
39} MfClassicPollerEventType;
45 MfClassicPollerModeRead,
46 MfClassicPollerModeWrite,
47 MfClassicPollerModeDictAttackStandard,
48 MfClassicPollerModeDictAttackEnhanced,
55 MfClassicNestedPhaseNone,
56 MfClassicNestedPhaseAnalyzePRNG,
57 MfClassicNestedPhaseDictAttack,
58 MfClassicNestedPhaseDictAttackVerify,
59 MfClassicNestedPhaseDictAttackResume,
60 MfClassicNestedPhaseCalibrate,
61 MfClassicNestedPhaseRecalibrate,
62 MfClassicNestedPhaseCollectNtEnc,
63 MfClassicNestedPhaseFinished,
64} MfClassicNestedPhase;
70 MfClassicPrngTypeUnknown,
71 MfClassicPrngTypeNoTag,
72 MfClassicPrngTypeWeak,
73 MfClassicPrngTypeHard,
80 MfClassicBackdoorUnknown,
81 MfClassicBackdoorNone,
82 MfClassicBackdoorAuth1,
83 MfClassicBackdoorAuth2,
84 MfClassicBackdoorAuth3,
219MfClassicError mf_classic_poller_get_nt(
222 MfClassicKeyType key_type,
240MfClassicError mf_classic_poller_get_nt_nested(
243 MfClassicKeyType key_type,
263MfClassicError mf_classic_poller_auth(
267 MfClassicKeyType key_type,
287MfClassicError mf_classic_poller_auth_nested(
291 MfClassicKeyType key_type,
318MfClassicError mf_classic_poller_read_block(
333MfClassicError mf_classic_poller_write_block(
352MfClassicError mf_classic_poller_value_cmd(
355 MfClassicValueCommand cmd,
369MfClassicError mf_classic_poller_value_transfer(
MfClassicPoller* instance, uint8_t block_num);
385MfClassicError mf_classic_poller_send_standard_frame(
405MfClassicError mf_classic_poller_send_frame(
428MfClassicError mf_classic_poller_send_custom_parity_frame(
448MfClassicError mf_classic_poller_send_encrypted_frame(
Definition bit_buffer.c:7
Definition mf_classic.h:111
Definition mf_classic.h:78
Definition mf_classic.h:137
Definition mf_classic.h:87
Definition mf_classic.h:95
MfClassic poller next sector event data.
Definition mf_classic_poller.h:103
uint8_t current_sector
Current sector number.
Definition mf_classic_poller.h:104
MfClassic poller key request event data.
Definition mf_classic_poller.h:130
bool key_provided
Flag indicating if key is provided.
Definition mf_classic_poller.h:132
MfClassicKey key
Key to be used by poller.
Definition mf_classic_poller.h:131
MfClassic poller read sector request event data.
Definition mf_classic_poller.h:140
MfClassicKeyType key_type
Key type to be used by poller.
Definition mf_classic_poller.h:143
bool key_provided
Flag indicating if key is provided.
Definition mf_classic_poller.h:144
uint8_t sector_num
Sector number to be read.
Definition mf_classic_poller.h:141
MfClassicKey key
Key to be used by poller.
Definition mf_classic_poller.h:142
MfClassic poller request mode event data.
Definition mf_classic_poller.h:92
const MfClassicData * data
Data to be used by poller.
Definition mf_classic_poller.h:94
MfClassicPollerMode mode
Mode to be used by poller.
Definition mf_classic_poller.h:93
MfClassic poller sector trailer request event data.
Definition mf_classic_poller.h:152
bool sector_trailer_provided
Flag indicating if sector trailer is provided.
Definition mf_classic_poller.h:155
uint8_t sector_num
Sector number to be read.
Definition mf_classic_poller.h:153
MfClassicBlock sector_trailer
Sector trailer to be used by poller.
Definition mf_classic_poller.h:154
MfClassic poller update event data.
Definition mf_classic_poller.h:113
uint8_t keys_found
Number of keys found.
Definition mf_classic_poller.h:115
uint8_t current_sector
Current sector number.
Definition mf_classic_poller.h:116
MfClassicPrngType prng_type
PRNG (weak or hard).
Definition mf_classic_poller.h:118
uint16_t nested_target_key
Target key for nested attack.
Definition mf_classic_poller.h:120
MfClassicNestedPhase nested_phase
Nested attack phase.
Definition mf_classic_poller.h:117
uint8_t sectors_read
Number of sectors read.
Definition mf_classic_poller.h:114
uint16_t msb_count
Number of unique most significant bytes seen during Hardnested attack.
Definition mf_classic_poller.h:122
MfClassicBackdoor backdoor
Backdoor type.
Definition mf_classic_poller.h:119
MfClassic poller write block request event data.
Definition mf_classic_poller.h:163
bool write_block_provided
Flag indicating if block is provided.
Definition mf_classic_poller.h:166
MfClassicBlock write_block
Block to be written.
Definition mf_classic_poller.h:165
uint8_t block_num
Block number to be written.
Definition mf_classic_poller.h:164
MfClassic poller event.
Definition mf_classic_poller.h:200
MfClassicPollerEventData * data
Pointer to event specific data.
Definition mf_classic_poller.h:202
MfClassicPollerEventType type
Event type.
Definition mf_classic_poller.h:201
MfClassic poller key attack event data.
Definition mf_classic_poller.h:175
uint8_t current_sector
Current sector number.
Definition mf_classic_poller.h:176
Definition mf_classic_poller_i.h:175
MfClassic poller event data.
Definition mf_classic_poller.h:182
MfClassicError error
Error code on MfClassicPollerEventTypeFail event.
Definition mf_classic_poller.h:183
MfClassicPollerEventDataUpdate data_update
Data update context.
Definition mf_classic_poller.h:187
MfClassicPollerEventDataSectorTrailerRequest sec_tr_data
Sector trailer request context.
Definition mf_classic_poller.h:191
MfClassicPollerEventKeyAttackData key_attack_data
Key attack context.
Definition mf_classic_poller.h:190
MfClassicPollerEventDataDictAttackNextSector next_sector_data
Next sector context.
Definition mf_classic_poller.h:185
MfClassicPollerEventDataWriteBlockRequest write_block_data
Write block request context.
Definition mf_classic_poller.h:192
MfClassicPollerEventDataReadSectorRequest read_sector_request_data
Read sector request context.
Definition mf_classic_poller.h:189
MfClassicPollerEventDataKeyRequest key_request_data
Key request context.
Definition mf_classic_poller.h:186
MfClassicPollerEventDataRequestMode poller_mode
Poller mode context.
Definition mf_classic_poller.h:184