fix length check when reading a dictionary file
[RRG-proxmark3.git] / client / deps / id48 / README.md
blob4c8eb4e6507455e519e563a302f8e50b23af6014
1 # ID48LIB
3 ## Purpose
5 Enable reliable and repeatable key-writing and verification
6 on ID48 RFID tags.  Improve key recovery when the tag is
7 present and writable.
9 ### Why this is needed.
11 Have you ever lost data when a computer shutdown unexpectedly?
12 This occurs when the program believes the data was written,
13 but the device did not actually store the data before power
14 was lost.
16 With RFID tags, the same problem exists, except the power is
17 wirelessly provided, and may be only enough to read data
18 (writing takes more power).  Thus, it's even more critical
19 for RFID tags to validate what was written.
21 If you are bothered by unreliable processes, and enjoy a measure
22 of certainty, and need to write a new key to an ID48 tag,
23 then read on.
25 ### Problem background
27 The ProxMark3 RFID research tool has had basic support for
28 reading and writing ID48-based RFID tags (aka em4x70).  However,
29 although the code existed to write new 96-bit keys, there was no
30 way to verify that the keys were actually written to the tag.
32 This is because the keys are not directly readable from the tag
33 (by design).  The *only* way to verify that the key was successfully
34 stored on the tag is to perform an authentication against the tag,
35 using the new key that you had attempted to write, and verify that
36 the tag's response to the nonce and challenge matches.
38 Obviously, this requires the ability to calculate, given a known
39 key and nonce, the challenge to send to the tag, and the expected
40 response from the tag.  Without this, folks simply could not know
41 if the key was safely stored on the tag or not.
43 ## Capabilities
45 This library provides the ability to calculate the challenge and
46 expected response for a known key and nonce.  In addition, if
47 provided the first half of the key, and at least one successful
48 authentication trio of nonce, challenge, and response, then
49 the library can recover all potentially valid values for the
50 second half of the key.