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

Try to win on Great Game Rockies slots

June 18, 2026

The Federal Reserve paused interest rate cuts after Bitcoin fell below $88,000.

June 12, 2026

What are the next steps for HYPE June token unlock?

June 6, 2026
Add A Comment

Comments are closed.

Recent Posts

Ethereum Quantum-Proof Account Offer Could Make Wallet Protection Cheaper

June 19, 2026

Try to win on Great Game Rockies slots

June 18, 2026

Bitmine Immersion Technologies Announces Cash Dividend Of $0.1056 Per Share Of 9.50% Series A Perpetual Preferred Stock

June 18, 2026

Bitcoin Price Flashing Buy Signal: The Same Signal Is Being Delivered

June 18, 2026

Stratosphere, Pudgy Penguins And Streamex Host Founders Table VIP Dinner During ETHConf 2026 And NYC Tech Week

June 18, 2026

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

June 18, 2026

Capital B shareholders have approved the ability to raise up to $120 billion in Bitcoin funding.

June 18, 2026

Calais Becomes 1st Quantitative Hedge Fund To Deploy UBS UMINT As OES Collateral Via Bybit, ByCustody & DigiFT

June 18, 2026

HBAR outperforms XLM and LINK Developing: Bullish Signal or Noise?

June 18, 2026

Why are more online consumers reaching for cryptocurrency and Revolut?

June 17, 2026

First Block, Onpharma Company, And Crito Capital Announce First Solana Sto For U.S. Medical Device Business

June 17, 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

Ethereum Quantum-Proof Account Offer Could Make Wallet Protection Cheaper

June 19, 2026

Try to win on Great Game Rockies slots

June 18, 2026

Bitmine Immersion Technologies Announces Cash Dividend Of $0.1056 Per Share Of 9.50% Series A Perpetual Preferred Stock

June 18, 2026
Most Popular

5/27 Price Analysis: SPX, DXY, BTC, ETH, BNB, SOL, XRP, TON, DOGE, ADA

May 27, 2024

XRP, Solana, Cardano Are Now on Robinhood: What’s Changed?

November 14, 2024

Bitcoin is going to hit ‘important volatility’ and warns of cryptocurrency.

April 20, 2025
  • 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.