Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/graynk/diversify
Key diversification for Ultralight C tags
https://github.com/graynk/diversify
freefare go golang key-derivation libfreefare libnfc mifare mifare-ultralight nfc ultralight
Last synced: about 1 month ago
JSON representation
Key diversification for Ultralight C tags
- Host: GitHub
- URL: https://github.com/graynk/diversify
- Owner: graynk
- License: apache-2.0
- Created: 2019-06-11T08:07:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-06T09:56:16.000Z (over 3 years ago)
- Last Synced: 2024-08-03T23:29:45.449Z (4 months ago)
- Topics: freefare, go, golang, key-derivation, libfreefare, libnfc, mifare, mifare-ultralight, nfc, ultralight
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - diversify
README
# Diversification
Writer takes 16-byte 2K3DES master key as command line argument, derives from it
a new key based on UID of the tag, and then writes the new key to the tag.
If second argument is provided, then it's used as the current key.
If no second argument is provided, then the default key (BREAKMEIFYOUCAN!) is used.Reader takes master key and reads the whole card with derived key.
This works only for Mifare Ultralight C tags.
## Dependencies
I use [clausecker/freefare](https://github.com/clausecker/freefare)
that supports key diversification and has some ad-hoc fixes to work with latest
version of [libfreefare](https://github.com/nfc-tools/libfreefare) (as well as some minor bug fixes).
Obviously this means that building and installing [libnfc](https://github.com/nfc-tools/libnfc/) and
[libfreefare](https://github.com/nfc-tools/libfreefare) from
master is needed too. I'd have provided a specific version that's required, but
for some reason they have decided
to not bump the version for the past 4 years despite continuous changes to the API,
so expect things to be broken.## Usage
```
sh build.sh
output/writer 00112233445566778899AABBCCDDEEFF FFEEDDCCBBAA99887766554433221100
output/reader 00112233445566778899AABBCCDDEEFF