Bitcoin Forum
June 22, 2026, 12:14:57 AM *
News: Latest Bitcoin Core release: 31.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcalc: Offline Address Calculator with Native SegWit (bc1q) & Mnemonic support  (Read 16 times)
hmisty0 (OP)
Newbie
*
Offline

Activity: 1
Merit: 0


View Profile
June 21, 2026, 07:18:03 AM
 #1



Disclaimer: Use at your own risk. Always verify the integrity of the downloaded file.




The classic offline BTC cold wallet generation tool bitaddress.org has been a staple in my beginner courses for years. However, it has two major limitations:
  • It only supports P2PKH (legacy addresses starting with 1) and does not support Native SegWit (bech32 addresses starting with bc1q) which are widely used by modern wallets today.
  • It exports raw private keys in WIF format but does NOT generate BIP-39 mnemonic phrases.
After reading the BIP-361 quantum migration proposal, I think that in the future, mnemonics will be the key credential for proving address ownership (Phase C plans to use zero-knowledge proofs for fund recovery). Having just the private key alone won't be enough. This motivated me to build the generator as follows.



🔧 Features

  • Two Entropy Sources: Brain wallet (SHA256ⁿ / password with optional #iterations) OR Secure random numbers (mouse + keyboard entropy collection via ArcFour PRNG).
  • Legacy Paths: P2PKH (uncompressed public key) + Native SegWit (compressed public key) with QR code generation.
  • Mnemonic Path: BIP39 (12/24 words) → PBKDF2 → BIP32 HD → m/84'/0'/0'/0/{0..9}.
  • Mnemonic Recovery: Restore seed and generate a list of 10 HD addresses from your mnemonic phrase.
  • Built-in Verification: Validate mnemonics, private key WIF, and address formats.
  • Bilingual UI: One-click switch between Chinese and English.
  • Fully Offline: Built with grunt into a single HTML file — open it directly in your browser, no internet connection required.


⚙️ Technical Implementation

The tool reuses core cryptographic libraries from bitaddress.org (CryptoJS, secp256k1, BigInteger, etc.), while the following modules are newly written:
  • SHA-512
  • Bech32 encoding
  • BIP39 mnemonic engine
  • BIP32 HD wallet derivation
There are no runtime dependencies — it's pure front-end JavaScript.

✅ All core test vectors pass (reusing known data from brainwallet.js). The 24-word mnemonic generated from the password "test" and the corresponding BIP84 addresses are fully consistent with standard implementations.



🔗 Links



⚠️ Disclaimer

THIS TOOL IS PROVIDED "AS IS" WITHOUT ANY WARRANTY. The algorithm and data implementations may contain errors. Please cross-validate all generated addresses using multiple independent tools before transferring any real funds. Use at your own risk.

Feedback, bug reports, and pull requests are all welcome!



Donation: bc1q4yt2sa60sx38u40msye936hst6fadqxw70vhzv



#Bitcoin #ColdWallet #BTC #OpenSource #BIP39 #BIP84 #BIP32
[/size]
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!