Skip to main content
Home

Built and signed on GitHub Actions

Works with
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score94%
Downloads1/wk
Published2 months ago (0.3.2)

Crapto1 TypeScript implement (MIFARE Classic key recovery)

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

Tip

Ported mfkey64 and mfkey32 are placed here

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))

Recovery by Nested auth

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

console.log(recoveryNested(
    uid,
    tagChallenge,
    encryptedTagChallenge,
    readerChallenge,
    readerResponse
).toString(16))

Acknowledgements

Some parts were based on or greatly inspired by these projects:

Built and signed on
GitHub Actions

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@li0ard/crapto1-ts

Import symbol

import * as crapto__ts from "@li0ard/crapto1-ts";
or

Import directly with a jsr specifier

import * as crapto__ts from "jsr:@li0ard/crapto1-ts";

Add Package

pnpm i jsr:@li0ard/crapto1-ts
or (using pnpm 10.8 or older)
pnpm dlx jsr add @li0ard/crapto1-ts

Import symbol

import * as crapto__ts from "@li0ard/crapto1-ts";

Add Package

yarn add jsr:@li0ard/crapto1-ts
or (using Yarn 4.8 or older)
yarn dlx jsr add @li0ard/crapto1-ts

Import symbol

import * as crapto__ts from "@li0ard/crapto1-ts";

Add Package

vlt install jsr:@li0ard/crapto1-ts

Import symbol

import * as crapto__ts from "@li0ard/crapto1-ts";

Add Package

npx jsr add @li0ard/crapto1-ts

Import symbol

import * as crapto__ts from "@li0ard/crapto1-ts";

Add Package

bunx jsr add @li0ard/crapto1-ts

Import symbol

import * as crapto__ts from "@li0ard/crapto1-ts";