added more keys (@equipter)
[RRG-proxmark3.git] / doc / loclass_notes.md
blob741a81023d7ec67093959da49a3111560a469dbd
1 # About LOCLASS attack
3 This document is primarily intended for understanding `hf iclass loclass` and files used with it.
5 LOCLASS aim is to recover the used masterkey for that specific reader configured in Elite mode / High Security mode.
7 LOCLASS, is a two part attack. First is the online part where you gather needed information from the reader by presenting a carefully selected CSN and save the responses to file.  For the first part you run `hf iclass sim -t 2` and take notice of the saved filename.
9 The second part is offline,  where the information gathered from the first step is used in a series of DES operations to figure out the used 
10 masterkey.
11    run `hf iclass loclass -f abc.bin`
13 If you don't have access to a iClass SE reader configured in Elite mode there is a test file which you can use.
14    `hf iclass loclass -f iclass_dump.bin` 
17 # Unit testing
18 In order to verify that loclass is actually working, there is a "unit" test mode.
19 run `hf iclass loclass --test`.
21 This test mode uses two files. 
23 - `iclass_dump.bin`
24    this is a sample file from `hf iclass sim -t 2`, with complete keytable recovery, using 128 carefully selected CSN and the file contains the MAC results from reader. 
25 - `iclass_key.bin`
26    this is file shall contain the legacy masterkey, AA1 key. loclass uses it to verify that permutation / reversing / generation of key is correct.