Bitcoin Forum
May 25, 2024, 10:41:44 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Working with encrypted remote wallet over PHP?  (Read 1001 times)
Staring Owl (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
November 19, 2013, 07:57:16 PM
 #1

For security reasons the bitcoind and wallet are on separate server from the site.
The communication between the site and bitcoind is over SSL RPC.
php on the site side

Now I would like to encrypt the wallet, but then how do i remotely decrypt it to send money?
to be honest i really don't have idea how this would work Sad

 Grin SLOT machine with generous payouts and affiliate program. BTC No registration needed BTC Start playing for real within seconds BTC Provably fair and transparent BTC You can win up to 5000 times your bet BTC Or make 30% by referring friends. ->  BitBandit.eu
moderate
Member
**
Offline Offline

Activity: 98
Merit: 10

nearly dead


View Profile
November 19, 2013, 09:16:00 PM
 #2

For security reasons the bitcoind and wallet are on separate server from the site.
The communication between the site and bitcoind is over SSL RPC.
php on the site side

Now I would like to encrypt the wallet, but then how do i remotely decrypt it to send money?
to be honest i really don't have idea how this would work Sad

I really hope you are not running any service, this is very basic usage.

First you unlock the wallet, then do the operation you want. Check out the walletpassphrase command.
Staring Owl (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
November 19, 2013, 09:39:49 PM
 #3

nah, don't worry i'm just learning Smiley

is there a sample php code that does that?

 Grin SLOT machine with generous payouts and affiliate program. BTC No registration needed BTC Start playing for real within seconds BTC Provably fair and transparent BTC You can win up to 5000 times your bet BTC Or make 30% by referring friends. ->  BitBandit.eu
moderate
Member
**
Offline Offline

Activity: 98
Merit: 10

nearly dead


View Profile
November 19, 2013, 09:44:18 PM
 #4


is there a sample php code that does that?

How do you currently use RPC through PHP ? All you do is use the walletpassphrase the same way you use other commands, passing the password you used to encrypt the wallet and a number of seconds that specifies for how long the wallet will stay decrypted.
Staring Owl (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
November 19, 2013, 10:04:19 PM
 #5

i'm passsing them through array
ok if it's that simple i'll play a bit, but still ready to use code would have been better Smiley

 Grin SLOT machine with generous payouts and affiliate program. BTC No registration needed BTC Start playing for real within seconds BTC Provably fair and transparent BTC You can win up to 5000 times your bet BTC Or make 30% by referring friends. ->  BitBandit.eu
BitCloud
Newbie
*
Offline Offline

Activity: 48
Merit: 0



View Profile
November 19, 2013, 10:10:22 PM
 #6

site should connect to intermediate which in turn issues commands to bitcoind:

site connects to:

intermediate (either on separate or bitcoind server): sanitize inputs (reject sending more than x BTC for instance) and issue walletunlock

bitcoind
Staring Owl (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
November 20, 2013, 12:39:46 PM
 #7

wait? why intermediate?
i can't just give it commands over php from the site?
not really sure i understand Sad

 Grin SLOT machine with generous payouts and affiliate program. BTC No registration needed BTC Start playing for real within seconds BTC Provably fair and transparent BTC You can win up to 5000 times your bet BTC Or make 30% by referring friends. ->  BitBandit.eu
Stake
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
November 21, 2013, 12:13:07 AM
 #8

wait? why intermediate?
i can't just give it commands over php from the site?
not really sure i understand Sad

Assuming you're using the jsonRPCClient class and have an object of the class, you can call whatever method you want by $bitcoin->methodhere('param1', 'param2');
Staring Owl (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
November 27, 2013, 01:15:15 PM
 #9

while it's unlocked for the timeout time everyone from the host  can take it right?

and seems like it needs to be unlocked for generating new addresses too, so chances are it will be unlocked good amount of the time
did i get it right?


if that's so, encrypting it, makes it only a tiny bit harder for someone from the host to take it, right?

 Grin SLOT machine with generous payouts and affiliate program. BTC No registration needed BTC Start playing for real within seconds BTC Provably fair and transparent BTC You can win up to 5000 times your bet BTC Or make 30% by referring friends. ->  BitBandit.eu
Staring Owl (OP)
Member
**
Offline Offline

Activity: 90
Merit: 10


View Profile
November 27, 2013, 01:38:24 PM
 #10

i seem to have been wrong
it seems like you can generate new addresses without unlocking with bitcoind
it's just bitcoin-qt that asks for a password for that

ok is decrypting only necessary only when sending money with bitcoind?

 Grin SLOT machine with generous payouts and affiliate program. BTC No registration needed BTC Start playing for real within seconds BTC Provably fair and transparent BTC You can win up to 5000 times your bet BTC Or make 30% by referring friends. ->  BitBandit.eu
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!