timmerk / nfc-tools

Automatically exported from code.google.com/p/nfc-tools
0 stars 0 forks source link

Mifare Ultralight C : Authentication key is not unique !! #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Get a Mifare Ultralight C with default key "BREAKMEIFYOUCAN!"
2. Compile & run the attached libfreefare code (based on your 
example/mifare-ultralight-info.c)
3. You can see multiple keys working for authentication

What is the expected output? 
Everything fails except the valid key

What do you see instead?
Trying G as first letterAuthentication with key: fail
Trying H as first letterAuthentication with key: success
Trying I as first letterAuthentication with key: success

What version of the product are you using? On what operating system?
libnfc-1.6.0-rc1
libfreefare-0.3.4
Linux debian 3.0.52+ #3 PREEMPT Fri Jan 4 03:14:20 CET 2013 armv7l GNU/Linux

Please provide any additional information below.
Chip : PN532 UART via FTDI

Original issue reported on code.google.com by thomas.d...@gmail.com on 4 Jan 2013 at 6:05

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by romu...@libnfc.org on 20 Jan 2013 at 4:17

GoogleCodeExporter commented 9 years ago
Hello,

Thanks for reporting but libfreefare is not hosted here anymore...

Please use the appropriated issue tracker:
https://code.google.com/p/libfreefare/issues/list

( and feel free to provide a patch ;-) )

Original comment by romu...@libnfc.org on 4 Apr 2013 at 10:08

GoogleCodeExporter commented 9 years ago
Those are 3DES keys, it's normal that several keys work.
3DES key is a 112bit key written in 16 bytes = 128bit
If you change those 16 "parity bits" the key is still valid.

Original comment by yob...@gmail.com on 4 Apr 2013 at 11:41