Bitcoin Forum

Other => Beginners & Help => Topic started by: BitCoinDream on July 24, 2014, 02:40:23 PM



Title: Can a bitcoin address be generated by PHP ?
Post by: BitCoinDream on July 24, 2014, 02:40:23 PM
I'm looking for Bitcoin address generation code using PHP without any external call to BitcoinD. Can anyone please help me out ?



Title: Re: Can a bitcoin address be generated by PHP ?
Post by: FeelTheBeat on July 24, 2014, 03:07:26 PM
You can check this: https://github.com/zamgo/PHPCoinAddress

Also this script need to be patched for secure working. Look here for more: https://github.com/zamgo/PHPCoinAddress/pull/1


Title: Re: Can a bitcoin address be generated by PHP ?
Post by: BitCoinDream on July 24, 2014, 04:31:39 PM
You can check this: https://github.com/zamgo/PHPCoinAddress

Also this script need to be patched for secure working. Look here for more: https://github.com/zamgo/PHPCoinAddress/pull/1

Thank you so much... I think it'll serve my purpose. But I did not get the second link. Is not mt_rand() secure enough to generate a random seed ?


Title: Re: Can a bitcoin address be generated by PHP ?
Post by: FeelTheBeat on July 24, 2014, 04:39:34 PM
Yes looks like that in some situations it is not secure enough but my knowledge is too low for better understanding.


Title: Re: Can a bitcoin address be generated by PHP ?
Post by: binford on July 24, 2014, 04:58:08 PM
https://github.com/prusnak/addrgen

this tool uses public master key from a deterministic wallet (like electrum) and generates addresses.
i would not run anything else on a server that will be accessible from internet


Title: Re: Can a bitcoin address be generated by PHP ?
Post by: Remember remember the 5th of November on July 24, 2014, 05:04:40 PM
You can check this: https://github.com/zamgo/PHPCoinAddress

Also this script need to be patched for secure working. Look here for more: https://github.com/zamgo/PHPCoinAddress/pull/1
That pull is correct, non-cryptographically secure functions should never be used to generate pub/priv keypairs.

Also, a Bitcoin address can be generated in pretty much ANY language, not just PHP.


Title: Re: Can a bitcoin address be generated by PHP ?
Post by: BitCoinDream on July 25, 2014, 05:26:12 PM
You can check this: https://github.com/zamgo/PHPCoinAddress

Also this script need to be patched for secure working. Look here for more: https://github.com/zamgo/PHPCoinAddress/pull/1
That pull is correct, non-cryptographically secure functions should never be used to generate pub/priv keypairs.

Also, a Bitcoin address can be generated in pretty much ANY language, not just PHP.

It would have been great, if u please shared the secured PHP code...


Title: Re: Can a bitcoin address be generated by PHP ?
Post by: Remember remember the 5th of November on July 25, 2014, 05:31:58 PM
You can check this: https://github.com/zamgo/PHPCoinAddress

Also this script need to be patched for secure working. Look here for more: https://github.com/zamgo/PHPCoinAddress/pull/1
That pull is correct, non-cryptographically secure functions should never be used to generate pub/priv keypairs.

Also, a Bitcoin address can be generated in pretty much ANY language, not just PHP.

It would have been great, if u please shared the secured PHP code...
Everything you need is in that pull request.


Title: Re: Can a bitcoin address be generated by PHP ?
Post by: BitCoinDream on July 25, 2014, 05:38:18 PM
You can check this: https://github.com/zamgo/PHPCoinAddress

Also this script need to be patched for secure working. Look here for more: https://github.com/zamgo/PHPCoinAddress/pull/1
That pull is correct, non-cryptographically secure functions should never be used to generate pub/priv keypairs.

Also, a Bitcoin address can be generated in pretty much ANY language, not just PHP.

It would have been great, if u please shared the secured PHP code...
Everything you need is in that pull request.

Ok... so u mean, I just need to change the random number generator from mt_rand() to openssl_random_pseudo_bytes() ?



Title: Re: Can a bitcoin address be generated by PHP ?
Post by: Remember remember the 5th of November on July 25, 2014, 05:39:28 PM
You can check this: https://github.com/zamgo/PHPCoinAddress

Also this script need to be patched for secure working. Look here for more: https://github.com/zamgo/PHPCoinAddress/pull/1
That pull is correct, non-cryptographically secure functions should never be used to generate pub/priv keypairs.

Also, a Bitcoin address can be generated in pretty much ANY language, not just PHP.

It would have been great, if u please shared the secured PHP code...
Everything you need is in that pull request.

Ok... so u mean, I just need to change the random number generator from mt_rand() to openssl_random_pseudo_bytes() ?


Yes. Just copy the changed code in that pull.


Title: Re: Can a bitcoin address be generated by PHP ?
Post by: BitCoinDream on July 25, 2014, 06:19:41 PM
You can check this: https://github.com/zamgo/PHPCoinAddress

Also this script need to be patched for secure working. Look here for more: https://github.com/zamgo/PHPCoinAddress/pull/1
That pull is correct, non-cryptographically secure functions should never be used to generate pub/priv keypairs.

Also, a Bitcoin address can be generated in pretty much ANY language, not just PHP.

It would have been great, if u please shared the secured PHP code...
Everything you need is in that pull request.

Ok... so u mean, I just need to change the random number generator from mt_rand() to openssl_random_pseudo_bytes() ?


Yes. Just copy the changed code in that pull.

thanks, can u plz help me out here => https://bitcointalk.org/index.php?topic=709974.0 ?


Title: Re: Can a bitcoin address be generated by PHP ?
Post by: Remember remember the 5th of November on July 26, 2014, 12:37:21 PM
You can check this: https://github.com/zamgo/PHPCoinAddress

Also this script need to be patched for secure working. Look here for more: https://github.com/zamgo/PHPCoinAddress/pull/1
That pull is correct, non-cryptographically secure functions should never be used to generate pub/priv keypairs.

Also, a Bitcoin address can be generated in pretty much ANY language, not just PHP.

It would have been great, if u please shared the secured PHP code...
Everything you need is in that pull request.

Ok... so u mean, I just need to change the random number generator from mt_rand() to openssl_random_pseudo_bytes() ?


Yes. Just copy the changed code in that pull.

thanks, can u plz help me out here => https://bitcointalk.org/index.php?topic=709974.0 ?
You're in deep with that, one wrong move with rawtx and you can make a fee that is huge or simply send the coins to some wrong address.


Title: Re: Can a bitcoin address be generated by PHP ?
Post by: BitCoinDream on July 26, 2014, 05:46:56 PM
You can check this: https://github.com/zamgo/PHPCoinAddress

Also this script need to be patched for secure working. Look here for more: https://github.com/zamgo/PHPCoinAddress/pull/1
That pull is correct, non-cryptographically secure functions should never be used to generate pub/priv keypairs.

Also, a Bitcoin address can be generated in pretty much ANY language, not just PHP.

It would have been great, if u please shared the secured PHP code...
Everything you need is in that pull request.

Ok... so u mean, I just need to change the random number generator from mt_rand() to openssl_random_pseudo_bytes() ?


Yes. Just copy the changed code in that pull.

thanks, can u plz help me out here => https://bitcointalk.org/index.php?topic=709974.0 ?
You're in deep with that, one wrong move with rawtx and you can make a fee that is huge or simply send the coins to some wrong address.

In my specific requirement all the outputs of the address in question will be spent. Hence I'm not bothered about change address or big mining fee. Rather I'm concerned how do I calculate the required mining fee depending on the Tx size.