nodejs-keccak256

Detect Node.js sha3-256 misuse and recommend Ethereum Keccak-256 alternatives.

86|21|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/Jamkris/everything-gemini-code --skill nodejs-keccak256-jamkris
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodejs-keccak256
Source: https://github.com/Jamkris/everything-gemini-code/tree/main/skills/nodejs-keccak256
Command: npx skills add https://github.com/Jamkris/everything-gemini-code --skill nodejs-keccak256-jamkris

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ethereum uses Keccak-256, not the NIST SHA3-256 exposed by Node's crypto. Node's sha3-256 can silently produce incorrect results, breaking selectors, signatures, storage slots, and address derivation in Ethereum-related code.

Core Features & Use Cases

  • Detect and explain the mismatch between Node's sha3-256 and Ethereum Keccak-256.
  • Recommend libraries and patterns (ethers, viem, web3) for Ethereum-compatible hashing.
  • Apply to code that computes function selectors, signatures, storage slots, and addresses in JS/TS.

Quick Start

Use this skill to verify and correct Keccak-256 hashing usage in your Node.js/TypeScript projects.

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 sha3-256 produce wrong Ethereum Keccak-256 hashes?

Node's crypto sha3-256 produces wrong Ethereum Keccak-256 hashes because Ethereum uses the original Keccak algorithm, not the finalized NIST SHA3-256 standard. This mismatch silently breaks function selectors, signatures, storage slots, and address derivation in JS/TS projects.

How do I compute Ethereum Keccak-256 hashes correctly in TypeScript?

To compute Ethereum Keccak-256 hashes correctly in TypeScript, use compatible libraries like ethers, viem, or web3 instead of Node's native crypto module. These utilities implement the original Keccak-256 standard for accurate on-chain results.

When do I need Keccak-256 hashing instead of standard SHA3 in Node.js?

You need Keccak-256 hashing instead of standard SHA3 in Node.js when computing Ethereum function selectors, event signatures, storage slots, or contract addresses. Using NIST SHA3-256 in these scenarios will generate invalid data and break blockchain interactions.

What is the best way to avoid Keccak-256 pitfalls in JavaScript Ethereum projects?

The best way to avoid Keccak-256 pitfalls in JavaScript Ethereum projects is to replace Node's crypto.createHash('sha3-256') with explicit Keccak implementations or built-in hashing utilities from ethers, viem, or web3 libraries to ensure protocol compatibility.

Can I use Node's built-in crypto module for Ethereum hashing in JavaScript?

You cannot use Node's built-in crypto module for Ethereum hashing because its sha3-256 function implements the NIST standard, not Ethereum's Keccak-256. You must use dedicated web3 libraries to prevent silent hashing failures in selectors and signatures.