idorgham/gateflow/qr-crypto

Claude Code and agent skill by idorgham/gateflow

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Cryptographic QR payload signing (HMAC-SHA256), verification, replay prevention, and nonce handling for GateFlow.

Install

npx vskill@latest install idorgham/gateflow/qr-crypto

SKILL.md

The same SKILL.md was published earlier as idorgham/gateflow/qr-crypto.

SKILL: QR Cryptographic Security & Anti-Replay

Purpose

Enforce non-forgeable, time-limited, and anti-replay security standards for QR codes used in the GateFlow v9.0 ecosystem.

Core Principles

  1. HMAC Signing: All QR payloads must be signed using a server-side secret to prevent tampering.
  2. Short-Lived Tokens: QR codes must have an expiration window (e.g., 30-60 seconds) to prevent photo-sharing.
  3. One-Time Use (Nonce): Use unique nonce values per QR to prevent replay attacks during the validity window.

Implementation Rules

  • Payload Structure: { data: string, exp: number, nonce: string, signature: string }.
  • Encryption: Sensitive IDs (like residentId) should be encrypted, not just signed, if transmitted in public QR codes.
  • Verification: The Scanner App must verify:
  1. Signature integrity.
  2. Timestamp (not expired).
  3. Nonce (not previously used in the last 2 minutes).

Anti-Patterns

  • Using static IDs (e.g., userId: 123) in a QR code without a signature.
  • Storing the HMAC secret in the client/app (must be in server/secure-vault).
  • Allowing "infinite" QR validity.

Code Examples

Server-Side QR Signing (Node.js)
typescript
import { createHmac } from 'crypto';
export const generateSecureQR = (payload: any, secret: string) => {
const data = JSON.stringify({ ...payload, exp: Date.now() + 60000 });
const signature = createHmac('sha256', secret).update(data).digest('hex');
return Buffer.from(JSON.stringify({ data, signature })).toString('base64');
};
Scanner Verification Logic
typescript
const verifyQR = (encoded: string, secret: string) => {
const { data, signature } = JSON.parse(
Buffer.from(encoded, 'base64').toString()
);
const expectedSig = createHmac('sha256', secret).update(data).digest('hex');
if (signature !== expectedSig) throw new Error('Tampered QR');
const payload = JSON.parse(data);
if (Date.now() > payload.exp) throw new Error('Expired QR');
return payload;
};

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
4
7-day trend score
13

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Grok Build (Cursor)
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/idorgham/gateflow/qr-crypto/badge)](https://verified-skill.com/skills/idorgham/gateflow/qr-crypto)

Something wrong with this skill or its page? Tell us.