Skip to content

li0ard/crapto1_ts

Repository files navigation

crapto1_ts logo

crapto1_ts
Recovery keys for MIFARE Classic
docs




Installation

# from NPM
npm i @li0ard/crapto1_ts

# from JSR
bunx i jsr install @li0ard/crapto1-ts

Usage

Recovery by 2 sets of 32 bit auth

import { recovery32 } from "@li0ard/crapto1_ts" // or @li0ard/crapto1-ts

console.log(recovery32(
    uid,
    tagChallenge,
    readerChallenge,
    readerResponse,
    tagChallenge2,
    readerChallenge2,
    readerResponse2
).toString(16))

Recovery by 1 set of full 64 bit auth

import { recovery64 } from "@li0ard/crapto1_ts" // or @li0ard/crapto1-ts

console.log(recovery64(
    uid,
    tagChallenge,
    readerChallenge,
    readerResponse,
    tagResponse
).toString(16))

Links