Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • TRADING
  • SUBMIT
Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • TRADING
  • SUBMIT
Crypto Flexs
Home»BITCOIN NEWS»Security – Are there any major flaws in this seed-phrase encryption scheme?
BITCOIN NEWS

Security – Are there any major flaws in this seed-phrase encryption scheme?

By Crypto FlexsJuly 26, 20242 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Security – Are there any major flaws in this seed-phrase encryption scheme?
Share
Facebook Twitter LinkedIn Pinterest Email

I would like to add some security to my seed phrase storage for my existing wallet. I don’t want to make it absolutely secure, I just want to make it much harder for someone to access my funds if they find my seed phrase storage.

I am considering these approaches:

  1. Convert seed phrase to entropy
  2. Entropy encryption with password
  3. Convert the encrypted entropy into a new (longer) seed phrase.
  4. Save your encrypted seed phrase

Then, when necessary, we work backwards to retrieve the initial seed phrase.

I’ve included JS code below to demonstrate it. It’s not needed for decryption since I used AES CEB with no initial vector and an empty key salt.

I’m wondering if there’s a major flaw in my approach or code.

Please note that by using a password to secure your seed phrase vault, you increase the likelihood that you will lose access to your seed phrase vault if you forget your password.


import crypto from "crypto";
import bip39 from "bip39-light";

const algorithm = "aes-256-ecb";
const initialVector = null;
const keySize = 32;
const keySalt = "";

const inputPassword = ""; // password goes here
const inputMnemonic = ""; // 12 word seed phrase goes here

// encrypt 12-word input mnemonic to 24-word mnemonic
const encryptedMnemonic = encryptMnemonic(inputMnemonic, inputPassword);

// decrypt 24-word mnemonic back to 12-word mnemonic
const decryptedMnemonic = decryptMnemonic(encryptedMnemonic, inputPassword);

console.log( inputMnemonic, encryptedMnemonic, decryptedMnemonic );

function encryptMnemonic(mnemonic, password) 
  const key = crypto.scryptSync(password, keySalt, keySize);

  const entropy = bip39.mnemonicToEntropy(mnemonic);
    
  const cipher = crypto.createCipheriv(algorithm, key, initialVector);
  
  let encryptedEntropy = cipher.update(entropy, "hex", "hex");
  encryptedEntropy += cipher.final("hex");
  
  let encryptedMnemonic = bip39.entropyToMnemonic(encryptedEntropy);
  return encryptedMnemonic;


function decryptMnemonic(mnemonic, password) 
  const key = crypto.scryptSync(password, keySalt, keySize);

  let encryptedEntropy = bip39.mnemonicToEntropy(mnemonic);
  
  const decipher = crypto.createDecipheriv(algorithm, key, initialVector);
  
  let decryptedEntropy = decipher.update(encryptedEntropy, "hex", "hex");
  decryptedEntropy += decipher.final("hex");
    
  let decryptedMnemonic = bip39.entropyToMnemonic(decryptedEntropy);
  return decryptedMnemonic;

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

Related Posts

Bitcoin price falls below $77,000 and ETF sales exceed $1 billion.

May 19, 2026

Corpay and BVNK launch stablecoin payments across $12 billion global network

May 13, 2026

Bitcoin falls below $80,000 as spot ETF inflows exceed $1 billion

May 7, 2026
Add A Comment

Comments are closed.

Recent Posts

ORBS) Reports Total Holdings Of Approximately $337 Million, Includes OpenAI, Beast Industries, More Than 11,000 ETH And Over 283 Million WLD Tokens

May 21, 2026

Bybit Launches SPCXUSDT Pre-IPO Perpetual Contract With Up To 10x Leverage Ahead Of SpaceX’s Blockbuster IPO

May 21, 2026

Blockchain.com Announces Confidential Submission Of Draft Registration Statement For Proposed Initial Public Offering Of Class A Ordinary Shares

May 21, 2026

OSL Strengthens Asia’s Digital Asset Ecosystem with Listing of State-Supervised Gold-backed Stablecoin USDKG

May 21, 2026

MEXC Launches Ondo Tokenized Stocks Carnival With A $1,000,000 Reward Pool

May 21, 2026

OSL Strengthens Asia’s Digital Asset Ecosystem With Listing Of State-Supervised Gold-Backed Stablecoin USDKG

May 21, 2026

BC.GAME Brings A Crypto-First Betting Experience To The 2026 Football Season

May 21, 2026

SOL Negative Funding Rate Highlights Declining SOL Demand

May 21, 2026

Sui Launches Gasless Stablecoin Transfers With Support From Fireblocks

May 20, 2026

Bitcoin Ally Kevin Warsh’s Polymarket Odds Jump to 94%

May 20, 2026

AI Astrology And The Future Of Personalized Digital Ecosystems

May 20, 2026

Crypto Flexs is a Professional Cryptocurrency News Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of Cryptocurrency. We hope you enjoy our Cryptocurrency News as much as we enjoy offering them to you.

Contact Us : Partner(@)Cryptoflexs.com

Top Insights

ORBS) Reports Total Holdings Of Approximately $337 Million, Includes OpenAI, Beast Industries, More Than 11,000 ETH And Over 283 Million WLD Tokens

May 21, 2026

Bybit Launches SPCXUSDT Pre-IPO Perpetual Contract With Up To 10x Leverage Ahead Of SpaceX’s Blockbuster IPO

May 21, 2026

Blockchain.com Announces Confidential Submission Of Draft Registration Statement For Proposed Initial Public Offering Of Class A Ordinary Shares

May 21, 2026
Most Popular

Fidelity Seeks SEC Approval to Stake Proposed Ether ETF to Boost Yields

March 19, 2024

Valkyrie CIO: “Bitcoin ETF issuers may decline by the end of the year”

February 10, 2024

HKMA and HKAB establish joint task force to strengthen SME lending

August 23, 2024
  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions
© 2026 Crypto Flexs

Type above and press Enter to search. Press Esc to cancel.