Bitcoin Forum
May 25, 2024, 09:04:26 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Can a bitcoin address be generated by PHP ?  (Read 924 times)
BitCoinDream (OP)
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
July 24, 2014, 02:40:23 PM
 #1

I'm looking for Bitcoin address generation code using PHP without any external call to BitcoinD. Can anyone please help me out ?


FeelTheBeat
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
July 24, 2014, 03:07:26 PM
 #2

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


▄▄▄███████▄▄▄
▄▄█████▀▀''`▀▀█████▄▄
▄███P'            `YY██▄
▄██P'                  `Y██▄
███'                      `███
███'                         ███
▄██'   ▄█████▄▄  ,▄▄▄▄▄▄▄▄▄▄p   ███
▄██▀  ,████▀P▀███.`██████████P   ▀██▄
███[ ,████ __. ███.   ,▄████▀    ███
███[ ]████████████[  ▄████▀       ███
███[ `████   ,oo2 ▄████▀'       ,███
▀██▄  `████▄▄█████d███████████   ▄██▀
▀██.   `▀▀▀▀▀▀"  Y▀▀▀▀▀▀▀▀▀▀▀  ,██▀
███.                        ,███
▀██▄                      ▄██▀
▀███▄_                 ,███▀
▀███▄▄_          _▄▄███▀
▀▀████▄▄ooo▄▄█████▀
▀▀███████▀▀'

365

TM

EZ365 is a digital ecosystem that combines
the best aspects of online gaming, cryptocurrency
trading
and blockchain education. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

..WHITEPAPER..    ..INVESTOR PITCH..

.Telegram     Twitter   Facebook

                       .'M████▀▀██  ██
                      W█Ws'V██  ██▄▄███▀▀█
                     i█████m.~M████▀▀██  ███
                     d███████Ws'V██  ██████
                     ****M██████m.~███f~~__mW█
          ██▀▀▀████████=  Y██▀▀██W ,gm███████
      g█████▄▄▄██   █A~`_WW Y█  ██!,████████
   g▀▀▀███   ████▀▀`_m████i!████P W███  ██
 _███▄▄▄██▀▀▀███Af`_m███   █W ███A ]███  ██
__ ~~~▀▀▀▀▄▄▄█*f_m██████   ██i!██!i███████
Y█████▄▄▄▄__. i██▀▀▀██████████ █!,██████
 8█  █▀▀█████.!██   ██████████i! █████
 '█  █  █   █W M█▄▄▄██████   ██ !██
  !███▄▄█   ██i'██████████   ██
   Y███████████.]██████████████
   █   ███████b ███   ██████
   Y   █   █▀▀█i!██   ████
    V███   █  █W Y█████
      ~~▀███▄▄▄█['███
            ~~*██

Play

            │
    │      ███
    │      ███
    │      ███
    │   │  ███
   ███  │  ███
   ███ ███ ███
 │  ███ ███ ███
███ ███ ███ ███
███ ███  │   │
███ ███  │   │
 │   │
 │

Trade

           __▄▄████▄▄
     __▄▄███████████████▄▄▄
 _▄▄█████████▀▀~`,▄████████████▄▄▄
 ~▀▀████▀▀~`,_▄▄███████████████▀▀▀
   d█~  =▀███████████████▀▀
   ]█! m▄▄ '~▀▀▀████▀▀~~ ,_▄▄
  ,W█. *████▄▄__ '  __▄▄█████
  !██P  █████████████████████
   W█. - ██████████████████▀
  i██[   ~ ▀▀█████████▀▀▀
 g███!
Y███

Learn
BitCoinDream (OP)
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
July 24, 2014, 04:31:39 PM
 #3

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 ?

FeelTheBeat
Hero Member
*****
Offline Offline

Activity: 700
Merit: 500



View Profile
July 24, 2014, 04:39:34 PM
 #4

Yes looks like that in some situations it is not secure enough but my knowledge is too low for better understanding.


▄▄▄███████▄▄▄
▄▄█████▀▀''`▀▀█████▄▄
▄███P'            `YY██▄
▄██P'                  `Y██▄
███'                      `███
███'                         ███
▄██'   ▄█████▄▄  ,▄▄▄▄▄▄▄▄▄▄p   ███
▄██▀  ,████▀P▀███.`██████████P   ▀██▄
███[ ,████ __. ███.   ,▄████▀    ███
███[ ]████████████[  ▄████▀       ███
███[ `████   ,oo2 ▄████▀'       ,███
▀██▄  `████▄▄█████d███████████   ▄██▀
▀██.   `▀▀▀▀▀▀"  Y▀▀▀▀▀▀▀▀▀▀▀  ,██▀
███.                        ,███
▀██▄                      ▄██▀
▀███▄_                 ,███▀
▀███▄▄_          _▄▄███▀
▀▀████▄▄ooo▄▄█████▀
▀▀███████▀▀'

365

TM

EZ365 is a digital ecosystem that combines
the best aspects of online gaming, cryptocurrency
trading
and blockchain education. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

..WHITEPAPER..    ..INVESTOR PITCH..

.Telegram     Twitter   Facebook

                       .'M████▀▀██  ██
                      W█Ws'V██  ██▄▄███▀▀█
                     i█████m.~M████▀▀██  ███
                     d███████Ws'V██  ██████
                     ****M██████m.~███f~~__mW█
          ██▀▀▀████████=  Y██▀▀██W ,gm███████
      g█████▄▄▄██   █A~`_WW Y█  ██!,████████
   g▀▀▀███   ████▀▀`_m████i!████P W███  ██
 _███▄▄▄██▀▀▀███Af`_m███   █W ███A ]███  ██
__ ~~~▀▀▀▀▄▄▄█*f_m██████   ██i!██!i███████
Y█████▄▄▄▄__. i██▀▀▀██████████ █!,██████
 8█  █▀▀█████.!██   ██████████i! █████
 '█  █  █   █W M█▄▄▄██████   ██ !██
  !███▄▄█   ██i'██████████   ██
   Y███████████.]██████████████
   █   ███████b ███   ██████
   Y   █   █▀▀█i!██   ████
    V███   █  █W Y█████
      ~~▀███▄▄▄█['███
            ~~*██

Play

            │
    │      ███
    │      ███
    │      ███
    │   │  ███
   ███  │  ███
   ███ ███ ███
 │  ███ ███ ███
███ ███ ███ ███
███ ███  │   │
███ ███  │   │
 │   │
 │

Trade

           __▄▄████▄▄
     __▄▄███████████████▄▄▄
 _▄▄█████████▀▀~`,▄████████████▄▄▄
 ~▀▀████▀▀~`,_▄▄███████████████▀▀▀
   d█~  =▀███████████████▀▀
   ]█! m▄▄ '~▀▀▀████▀▀~~ ,_▄▄
  ,W█. *████▄▄__ '  __▄▄█████
  !██P  █████████████████████
   W█. - ██████████████████▀
  i██[   ~ ▀▀█████████▀▀▀
 g███!
Y███

Learn
binford
Newbie
*
Offline Offline

Activity: 52
Merit: 0


View Profile
July 24, 2014, 04:58:08 PM
 #5

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
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
July 24, 2014, 05:04:40 PM
 #6

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.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
BitCoinDream (OP)
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
July 25, 2014, 05:26:12 PM
 #7

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...

Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
July 25, 2014, 05:31:58 PM
 #8

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.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
BitCoinDream (OP)
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
July 25, 2014, 05:38:18 PM
 #9

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() ?


Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
July 25, 2014, 05:39:28 PM
Last edit: July 25, 2014, 05:50:27 PM by Remember remember the 5th of November
 #10

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.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
BitCoinDream (OP)
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
July 25, 2014, 06:19:41 PM
 #11

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 ?

Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
July 26, 2014, 12:37:21 PM
 #12

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.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
BitCoinDream (OP)
Legendary
*
Offline Offline

Activity: 2324
Merit: 1204

The revolution will be digital


View Profile
July 26, 2014, 05:46:56 PM
 #13

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.

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!