crapto1_ts
Recovery keys for MIFARE Classic
docs
# from NPM
npm i @li0ard/crapto1_ts
# from JSR
bunx i jsr install @li0ard/crapto1-ts
Tip
Ported mfkey64 and mfkey32 are placed here
import { recovery32 } from "@li0ard/crapto1_ts" // or @li0ard/crapto1-ts
console.log(recovery32(
uid,
tagChallenge,
readerChallenge,
readerResponse,
tagChallenge2,
readerChallenge2,
readerResponse2
).toString(16))
import { recovery64 } from "@li0ard/crapto1_ts" // or @li0ard/crapto1-ts
console.log(recovery64(
uid,
tagChallenge,
readerChallenge,
readerResponse,
tagResponse
).toString(16))
import { recoveryNested } from "@li0ard/crapto1_ts" // or @li0ard/crapto1-ts
console.log(recoveryNested(
uid,
tagChallenge,
encryptedTagChallenge,
readerChallenge,
readerResponse
).toString(16))
Some parts were based on or greatly inspired by these projects:
- crapto1 - Original version in C
- Crapto1Sharp - Version in C#
- mfkey32nested - Recovery by nested auth (by @doegox)