
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
bls12-381-keygen
Advanced tools
Minimal & secure BLS12-381 Key Generation compatible with EIP-2333, EIP-2334
Minimal BLS12-381 Key Generation compatible with EIP-2333. Can be used to generate EIP-2334 keys for ETH beacon chain.
Has only one dependency on @noble/hashes for SHA256 and HKDF.
If you're looking for actual implementation of the bls12-381 elliptic curve, use module noble-curves. The bls12-381-keygen only generates private keys, by EIP-2333 specification.
Check out live demo in iancoleman's eip2333-tool
Node.js and browser:
npm install bls12-381-keygen
The API is the following:
function deriveMaster(seed: Uint8Array): Uint8Array;
function deriveChild(parentKey: Uint8Array, index: number): Uint8Array;
function deriveSeedTree(seed: Uint8Array, path: string): Uint8Array;
const EIP2334_KEY_TYPES: readonly ["withdrawal", "signing"];
type EIP2334KeyType = typeof EIP2334_KEY_TYPES[number];
function deriveEIP2334Key(seed: Uint8Array, type: EIP2334KeyType, index: number): {
key: Uint8Array;
path: string;
};
Usage example:
import { deriveEIP2334Key, deriveSeedTree } from 'bls12-381-keygen';
const seed = (new Uint8Array(32)).fill(7); // must be random
deriveEIP2334Key(seed, 'withdrawal', 6);
// Those two are equal
const signKey1a = deriveEIP2334Key(seed, 'signing', 0);
const signKey1b = deriveSeedTree(seed, 'm/12381/3600/0/0/0');
// To generate mnemonics for EIP-2334 keystores
import { entropyToMnemonic, mnemonicToSeedSync } from '@scure/bip39';
import { wordlist } from '@scure/bip39/wordlists/english';
// bytes = some random sequence
const mnSeed = mnemonicToSeedSync(entropyToMnemonic(bytes, wordlist));
deriveEIP2334Key(mnSeed, 'signing', index);
// To generate BLS12-381 public key, use @noble crypto
import { getPublicKey } from '@noble/bls12-381';
getPublicKey(signKey1a);
MIT (c) Paul Miller (https://paulmillr.com), see LICENSE file.
FAQs
Minimal & secure BLS12-381 Key Generation compatible with EIP-2333, EIP-2334
The npm package bls12-381-keygen receives a total of 18 weekly downloads. As such, bls12-381-keygen popularity was classified as not popular.
We found that bls12-381-keygen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.