length-extension-attacks-anti-pattern

Community

Prevent hash length extension attacks.

Authorigbuend
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill addresses critical security vulnerabilities in message authentication and integrity verification, specifically preventing attackers from extending valid hash-based signatures without knowing the secret key.

Core Features & Use Cases

  • Vulnerability Detection: Identifies the misuse of hash functions (MD5, SHA-1, SHA-256) in constructing message authentication codes (MACs).
  • Secure Implementation Guidance: Provides correct implementations using HMAC, which is resistant to length extension attacks.
  • Cross-Language Examples: Offers secure coding examples in Python, JavaScript, and Java.
  • Use Case: When reviewing code that uses hash(secret + message) for API signatures or data integrity, this skill helps identify the weakness and guides developers to use HMAC instead.

Quick Start

Review the current code for any instances of hash(secret + message) patterns and ensure HMAC is used for message authentication.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: length-extension-attacks-anti-pattern
Download link: https://github.com/igbuend/grimbard/archive/main.zip#length-extension-attacks-anti-pattern

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.