Generating a segwit (bc1) address from a brain wallet?

1

1

Are there any brain wallet generators that can generate segwit (bc1) addresses yet?

Patoshi パトシ

Posted 2017-11-06T16:05:06.793

Reputation: 8 911

You can do it with the bitcoinjs library. https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/README.md

m1xolyd1an 2017-11-06T21:02:04.967

1But is there an example code of how to generate this address using bech?Patoshi パトシ 2017-11-06T21:27:33.833

isnt brain wallet unsafe to use? https://bitcoin.stackexchange.com/questions/8449/how-safe-is-a-brain-wallet

renlord 2017-11-06T22:39:40.373

renlord, not all brain wallets are created equal.... warp wallets are more secure than traditional brain wallets.Patoshi パトシ 2017-11-08T05:11:11.713

A Brainwallet with sufficient entropy, generated by a computer or other device with real randomness (not by a human) can be secure. However, they're still a terrible trade-off between risk of theft and risk of loss. Memory can be much more flaky than people believe it to be.Pieter Wuille 2018-05-20T01:24:56.287

Answers

1

Memory Paper Wallet has the ability to generate bc1 addresses from a brain wallet phrase.

https://www.xcubicle.com/memory-paper-wallet-bitcoin-ethereum-monero-ardor-litecoin

Patoshi パトシ

Posted 2017-11-06T16:05:06.793

Reputation: 8 911

1

Here's an example with bitcoinjs-lib:

let bitcoin = require('bitcoinjs-lib');
let assert = require('assert')
let bigi = require('bigi')


let NETWORK = bitcoin.networks.bitcoin;
let brainwallet = "This is my brain wallet and it is less secure than a CSPRNG source";
let hash = bitcoin.crypto.sha256(brainwallet);
let d = bigi.fromBuffer(hash);
let nkeyp = new bitcoin.ECPair(d);
let wif = nkeyp.toWIF();
let pubKey = nkeyp.getPublicKeyBuffer();
let scriptPubKey = bitcoin.script.witnessPubKeyHash.output.encode(bitcoin.crypto.hash160(pubKey))
let address = bitcoin.address.fromOutputScript(scriptPubKey);
console.log(address);
console.log(wif);

m1xolyd1an

Posted 2017-11-06T16:05:06.793

Reputation: 3 356

i need to try it.AMB 2018-11-06T04:49:56.417

0

You can create one here at

https://segwitaddress.org/

You can download offline file for more security.

https://github.com/coinables/segwitaddress/releases

AMB

Posted 2017-11-06T16:05:06.793

Reputation: 292

0

You could try brain2bip.com

Checkmark "Advanced wallet recovery," then select the BIP84 tab to see a list of segwit addresses and their private keys.

John C.

Posted 2017-11-06T16:05:06.793

Reputation: 49