Closed GoogleCodeExporter closed 9 years ago
Thanks for reporting issue.
Could you provide a patch for this feature ?
If not, we will try to take care at this issue ASAP.
Original comment by romu...@libnfc.org
on 8 Jun 2012 at 12:08
No, unfortunately not due to the time constraints. Perhaps sometime in the fall
i might get the time, for now i can only provide specifications for
diversification.
Original comment by ma...@unitedtickets.ee
on 8 Jun 2012 at 7:06
Yes, feel free to let us some references to implement it.
Thanks
Original comment by romu...@libnfc.org
on 8 Jun 2012 at 10:09
Please find the file attached
Original comment by ma...@unitedtickets.ee
on 8 Jun 2012 at 4:54
Attachments:
[deleted comment]
Thanks for attachement.
As we are quite busy with libnfc and ifdnfc right, I don't think we will
improve libfreefare next days.
ASAP may be not enough for some users, so if any volunteer want to take this
issue, feel free to attach patches.
Original comment by romu...@libnfc.org
on 8 Jun 2012 at 6:42
I have been trying to understand the algorithm but I am having some trouble
understanding key diversification.
If I understand correctly we need to know the master key and the 3des key to
compute diversified keys for a card ?
Signature should be something like :
- GetKey(masterKey, 3desKey, uid, blockNumber);
I have some tags that looks like mifare classic but the KeyA from the first
sector is always the same , the other keys are diversified.
Do you know if the first sector behave differently of maybe my set of tags
doesn't use that diversification algorithm...
Original comment by olifo...@gmail.com
on 13 Aug 2012 at 8:29
what 3des key? No 3des key is needed. Take a look at the first post and take a
look at DESFire diversification implementation in the project. You have to have
master key and diversification input (which is card UID and sector number) from
the output of desfire diversification take the first 6 bytes of last 16
bytes(because classic keys are smaller).
Marko
Original comment by ma...@unitedtickets.ee
on 13 Aug 2012 at 1:49
I was talking about the first part of the document (old 2ktdes based key
diversification).
Anyway I also looked at the second part of the document and the way it is done
for desfire in libfreefare.
According to the document there is some padding so that diversification input
is always 32 bytes but in libfreefare, in cmac method it use key block size
that is only 16 bytes.
I've made some slight modification to make it work as in the document.
It still doesn't explain why i have always the same key for all my tags but
only for the first block (sector 0x03). Maybe they used a custom key
diversification :/
Original comment by olifo...@gmail.com
on 13 Aug 2012 at 1:58
could be custom diversification.
sorry, i cannot help you with older diversification.
Marko
Original comment by ma...@unitedtickets.ee
on 13 Aug 2012 at 2:05
Issue moved to https://code.google.com/p/libfreefare/issues/detail?id=3
Original comment by yob...@gmail.com
on 15 Jan 2013 at 8:04
Original issue reported on code.google.com by
ma...@unitedtickets.ee
on 7 Jun 2012 at 7:02