nodejs-keccak256

Audit JavaScript and TypeScript codebases for incorrect Node.js sha3-256 usage.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/luongldptit/move-ticket --skill nodejs-keccak256-luongldptit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodejs-keccak256
Source: https://github.com/luongldptit/move-ticket/tree/main/.agent/skills/nodejs-keccak256
Command: npx skills add https://github.com/luongldptit/move-ticket --skill nodejs-keccak256-luongldptit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Node.js's default crypto.createHash('sha3-256') uses the NIST-standardized SHA3 variant, not Ethereum's Keccak-256 algorithm. This silent mismatch causes critical bugs in Ethereum-related functionality including function selectors, event topics, digital signatures, storage slot calculations, and address derivation, leading to broken dApps and failed transactions with no warning from Node.

Core Features & Use Cases

  • Provides clear guidance to avoid incorrect NIST SHA3 usage in JavaScript and TypeScript Ethereum development workflows
  • Includes implementation examples for popular libraries including ethers, viem, and web3.js
  • Offers audit commands to quickly scan codebases for problematic sha3-256 crypto usage
  • Use Case: A developer building an EIP-712 signing helper can use this skill to ensure their hash outputs match Ethereum's expected Keccak-256 values, preventing invalid signatures.

Quick Start

Use the nodejs-keccak256 skill to audit your JavaScript or TypeScript codebase for incorrect Node crypto sha3-256 usage and replace it with Ethereum-compatible Keccak-256 helpers.

Frequently Asked Questions about nodejs-keccak256

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does Node.js crypto.createHash sha3-256 produce wrong Ethereum hashes?

Node.js `crypto.createHash('sha3-256')` uses the NIST-standardized SHA3 variant, not Ethereum's Keccak-256 algorithm. This silent mismatch causes critical bugs in function selectors, event topics, and digital signatures without warning.

How do I fix silent Keccak-256 hashing bugs in JavaScript Ethereum code?

To fix silent Keccak-256 hashing bugs in JavaScript, audit your codebase for incorrect Node crypto sha3-256 usage and replace it with Ethereum-compatible Keccak-256 helpers from libraries like ethers, viem, or web3.js.

Does Node.js crypto sha3-256 work for EIP-712 signatures and function selectors?

No, Node.js crypto sha3-256 does not work for EIP-712 signatures or function selectors because it uses the NIST SHA3 variant. You must use Keccak-256 to ensure hash outputs match Ethereum's expected values.

How do I audit a TypeScript codebase for incorrect sha3-256 crypto usage?

You can audit a TypeScript codebase for incorrect sha3-256 crypto usage by running scan commands to identify problematic NIST-standardized hashing and applying correct Keccak-256 implementation patterns for Ethereum development.

What's the best way to implement Keccak-256 hashing for Ethereum in Node.js?

The best way to implement Keccak-256 hashing for Ethereum in Node.js is using established libraries like ethers, viem, or web3.js, which provide correct implementation patterns for function selectors, Merkle trees, and address derivation.

When do I need Keccak-256 instead of NIST SHA3 for blockchain development?

You need Keccak-256 instead of NIST SHA3 for blockchain development when calculating Ethereum function selectors, event topics, EIP-712 signatures, Merkle trees, storage slot calculations, and public key to address derivation.