nodejs-keccak256

Detect Node.js SHA3-256 usage and enforce Keccak-256 helpers from ethers, viem, or web3.

4|7|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/arbisoft/ai-skillforge --skill nodejs-keccak256-arbisoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodejs-keccak256
Source: https://github.com/arbisoft/ai-skillforge/tree/main/Claude/skills/nodejs-keccak256
Command: npx skills add https://github.com/arbisoft/ai-skillforge --skill nodejs-keccak256-arbisoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Node's crypto.createHash('sha3-256') implements NIST SHA-3, which differs from Ethereum's Keccak-256 and can silently corrupt addresses, selectors, signatures, and storage derivations.

Core Features & Use Cases

  • Ethereum-compatible hashing: use keccak256 from ethers, viem, or web3 libraries to produce Ethereum-ready hashes.
  • Guidance for Node.js projects: avoids accidental usage of Node's sha3-256 in contract interaction, signing, and data encoding.
  • Example scenarios: computing function selectors, topic hashes, EIP-712 structured data, and storage slot derivations.

Quick Start

Install and adopt an Ethereum-keccak256 helper in your Node/TS project to ensure correct hashing behavior.

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 incorrect Ethereum keccak256 hashes?

Ethereum uses Keccak-256, but Node's crypto.createHash('sha3-256') implements NIST SHA-3, producing different hashes. Use ethers, viem, or web3 keccak256 helpers to ensure Ethereum-compatible hashing for addresses and selectors.

How do I compute Ethereum function selectors and EIP-712 hashes in Node.js?

Compute Ethereum function selectors, EIP-712 structured data, and topic hashes in Node.js by importing the keccak256 helper from ethers, viem, or web3 instead of relying on native crypto modules.

What is the difference between NIST SHA3-256 and Ethereum Keccak-256 for hashing?

NIST SHA3-256 includes padding differences that Ethereum Keccak-256 does not, causing silent data corruption in storage slot derivations and signatures. Ethereum requires explicit Keccak-256 helpers to generate valid hashes.

Can I use Node's built-in crypto.createHash for Ethereum contract interactions and signing?

Node's built-in crypto.createHash('sha3-256') is not suitable for Ethereum contract interactions, signing, or data encoding. You must use Ethereum-specific keccak256 functions from web3 libraries to avoid hashing bugs.

When do I need to use an explicit keccak256 helper in JavaScript or TypeScript projects?

You need an explicit keccak256 helper when hashing Ethereum data such as function selectors, signatures, storage slots, and addresses in JavaScript or TypeScript to prevent silent corruption from Node's SHA3-256.