Author

Topic: Need brainwallet php script (Read 1196 times)

legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
August 14, 2015, 04:10:42 AM
#9
Are you sure you would prefer a typical server-side solution (php) for something that can also be done client-side (javascript) ?

BitcoinJs works well for this, and allows you to do it completely locally & offline.

I almost never use php myself, I'm more of a python/javascript/perl/bash person, but I just have to point out for the record that you can run php in a terminal as a simple executable.  Just put it on your $PATH and call "php" with your php file as the first argument.  Say this is your file hello.php:

Code:
  echo "hello, world";
?>


Code:
$ php hello.php
hello, world
$

@OP, I hope anyone playing with brainwallets knows about this:
http://www.wired.com/2015/07/brainflayer-password-cracker-steals-bitcoins-brain/
legendary
Activity: 1442
Merit: 1186
August 13, 2015, 05:28:08 PM
#8
By far the most common is to use this as your brainwallet:

private key = Sha256(passphrase)

This is also what brainwallet.org did.

I think it would be worth noting that simply a sha256 hash of a passphrase or word will not produce a user-friendly bitcoin private key, it would have to then be converted to WIF.

http://bitcoin.stackexchange.com/questions/8247/how-can-i-convert-a-sha256-hash-into-a-bitcoin-base58-private-key

sr. member
Activity: 392
Merit: 268
Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ
August 13, 2015, 05:27:14 PM
#7
By far the most common is to use this as your brainwallet:

private key = Sha256(passphrase)

This is also what brainwallet.org did.

That's insecure. For new brainwallet applications:

1) Consider if a brainwallet is truly necessary. If not, use more secure means. If it is, go to step 2.
2) Use a "slower" key stretching function with multiple rounds (to prevent brute force attacks), and use a long and secure passphrase.
legendary
Activity: 1176
Merit: 1011
August 13, 2015, 02:39:15 PM
#6
By far the most common is to use this as your brainwallet:

private key = Sha256(passphrase)

This is also what brainwallet.org did.
newbie
Activity: 22
Merit: 0
August 13, 2015, 10:12:34 AM
#5
Important detail: what website/tool did you use to create the brainwallet? if it was brainwallet.org, use the github link posted above. The problem is there is no standardization for brainwallets, each tool works differently, some tools will give a different address + private key for the same brainwallet phrase.
sr. member
Activity: 412
Merit: 287
August 13, 2015, 07:36:29 AM
#4
JetRX: Depending on what passphrase you mean, try out https://github.com/Bit-Wasp/bitcoin-php. It's in composer too.

Some of the examples may be out of date, but an IDE will have you coding in no time.



Kazimir: Do you use electrum? That's python.. but on the client-side.
legendary
Activity: 1442
Merit: 1186
August 13, 2015, 06:41:52 AM
#3
Are you sure you would prefer a typical server-side solution (php) for something that can also be done client-side (javascript) ?

BitcoinJs works well for this, and allows you to do it completely locally & offline.

Agreed, why does it have to be PHP?
You can get the JS brainwallet code as it is still available on github from previous commits.
https://github.com/brainwallet/brainwallet.github.io/commit/fa462be9af74da30ae7e78203c11b94a0f887539
legendary
Activity: 1176
Merit: 1011
August 13, 2015, 06:37:31 AM
#2
Are you sure you would prefer a typical server-side solution (php) for something that can also be done client-side (javascript) ?

BitcoinJs works well for this, and allows you to do it completely locally & offline.
jr. member
Activity: 57
Merit: 10
August 13, 2015, 02:32:52 AM
#1
I need to get out of my Passphrase:
1. Private Key
2. Address

There is a script for php?
Jump to: