Pages:
Author

Topic: how to bury some bitcoins without even installing the client (Read 14903 times)

legendary
Activity: 1288
Merit: 1080
With the new version there is a command called new-bitcoin-key that returns a brand new key in WIF, along with its bitcoin address and its public point.  All in YAML:

Code:
$ . bitcoin.sh
$ new-bitcoin-key
---
WIF: 5HrkBfQH17QvcAshezqpXzKZRd6ogyxMF4pCgXzJG4QkW4S4en7
bitcoin address: 152PktNSb9MnfavZ76pW1Ry9sXsa17snjF
public key: 045960320CAE057C2F3CEA1D58CA587B7207E7CD0BD8104AF7C563717B14013557E926246A48C8C38ADB2E7483B57DE85A8EEB33CC52BDD037B6C87CD41E358D48

There is also a function called vanityFromPublicPoint that allows searching for a vanity address from a public point:

Code:
$ vanityFromPublicPoint 045960320CAE057C2F3CEA1D58CA587B7207E7CD0BD8104AF7C563717B14013557E926246A48C8C38ADB2E7483B57DE85A8EEB33CC52BDD037B6C87CD41E358D48  "Grondi1u"

This allows people to sell vanity addresses!  (see https://bitcointalksearch.org/topic/can-vanity-address-be-sold-83749)
full member
Activity: 154
Merit: 102
Bitcoin!
Some interesting developments of this thread can be found on this one.

Thanks for the link.
legendary
Activity: 1288
Merit: 1080
Some interesting developments of this thread can be found on this one.
legendary
Activity: 1221
Merit: 1025
e-ducat.fr
To my knowledge, the bitcoin protocol specs already make provisions for contracts (dual signature transactions): no need to split keys or specify some other mecanism until the bitcoin contracts are tested.
Gavin's ClearCoin makes use of bitcoin contracts.
newbie
Activity: 34
Merit: 0
Here are a few ideas for using these holes.  I love this bitcoin stuff!

1) escrow
2) speeding up txns

Escrow:

Make the address and put the money in the hole.  The other person can see its in the hole by looking at the block explorer.  A new escrow tool could be made to allow for creating and sending to the hole and allow peeking into the hole.  So the Seller can see its in the hole but can't take it.  Maybe they could each contribute half of a key (or use two keys) to allow making a safe hole which neither can empty.  They have to cooperate to finish the txn and release the money to the correct recipient, so its not perfect.  Maybe a few more clever idea would fix that.


Speeding up txns:

Put a chunk of money in the hole and wait for it to be confirmed.  Then the txn can proceed with the speed of delivering the keys.  Instead of sending bitcoins you would send the keys and that's fast.  If there is too much money in the hole, the extra can be reclaimed by the buyer before he ships the keys without waiting for confirmations.  Something like that maybe. 
legendary
Activity: 1372
Merit: 1008
1davout
What's the easiest way to spend this address (created thanks to Grondilu and davout contributions on my Win 7 machine):
1Q82Ur6bYsBmXRdb8QJDzPSxaTZyymD1ZB

using the private key formatted using Davout ruby script ?

You can import it directly in the client using the "importprivkey" command, however, this command is not yet part of the official client, you need to compile sipa's fork to get it (https://github.com/sipa/bitcoin.git, showwallet branch) it will rescan the chain, and the coins should be spendable from there.
legendary
Activity: 1221
Merit: 1025
e-ducat.fr
What's the easiest way to spend this address (created thanks to Grondilu and davout contributions on my Win 7 machine):
1Q82Ur6bYsBmXRdb8QJDzPSxaTZyymD1ZB

using the private key formatted using Davout ruby script ?
legendary
Activity: 1288
Merit: 1080
So basically you want to make a light bash bitcoin client.

Yes, that's the idea.

Quote
Problem is, the protocol for publishing transactions is quite complex and binary I think. And you would be relying on blockexplorer, which doesn't sound too good to me.
I like bash hackishness but within limits.

Binary is not an issue but complexity is indeed.   I'll keep looking at such a solution from times to times, as I would like to make a few bitcoin related websites with CGI I can't/don't want to have a full client on an open webserver.

Quote
Also, if you're interested, here's the project I was talking about: https://bitcointalksearch.org/topic/proof-of-authenticity-poa-using-the-bitcoin-blockchain-39548

« Another is to generate a "false" bitcoin address formed from the hash and to send a small amount of bitcoins to it (e.g. one satoshi). This is the method implemented in my script. »

This has been discussed on the forum, by Satoshi himself.  Indeed you can use the hash160ToPublicKey in order to achieve that.  You basically just need to compute a rmd160 of the data you want to timestamp, and send a small BTC amount to the corresponding bitcoin address.  The money will be lost forever, though.
newbie
Activity: 33
Merit: 0

well, I forgot to mention that my version of openssl prints an annoying "(stdin)= xxxxxxx" with the hex option.  I could use a sed 's/^.*= //' but that would be fugly.

I don't think it should do that. The output is supposed to be usable. Are you using a development version?
I'm not sure I understand what you mean. Sounds weird.
Quote

See my previous message.
So basically you want to make a light bash bitcoin client.
Problem is, the protocol for publishing transactions is quite complex and binary I think. And you would be relying on blockexplorer, which doesn't sound too good to me.
I like bash hackishness but within limits.

Also, if you're interested, here's the project I was talking about: https://bitcointalksearch.org/topic/proof-of-authenticity-poa-using-the-bitcoin-blockchain-39548
legendary
Activity: 1288
Merit: 1080
I have an older version (0.9.Cool. It also has a -hex option for most commands so "openssl dgst -hashalgo -hex" should work. And yes, I forgot about the 4 bytes. It's just that perl gives me skin rash.

well, I forgot to mention that my version of openssl prints an annoying "(stdin)= xxxxxxx" with the hex option.  I could use a sed 's/^.*= //' but that would be fugly.

Quote
I'm not sure I understand what you mean. Sounds weird.

See my previous message.
legendary
Activity: 1288
Merit: 1080
What would be very cool would be a script that creates a transaction to an other address, using raw block downloaded from blockexplorer.com and an IP found on IRC.

Just to clarify, are you suggesting to include the desired spending tx directly in a raw block and start mining it (to avoid the need to import the private key in a wallet) ?

My idea is to use bitcoinexplorer to extract the information that is necessary to write the transaction (block number, hash root and so on).

Quote
The script would have the destination address and raw block as arguments ?

Well, just the destination address, and the origin address.   The raw block would be fetched from blockexplorer.

Quote
what is this ip address business ?

We would need at least one IP of a running full client if we want to publish the transaction.  And IPs are published on irc.

member
Activity: 163
Merit: 10
"how to bury bitcoins"
you could, you know, buy some bitbills, and literally bury them!! or put in a safe or whatever. crack open 5 years later, be rich
legendary
Activity: 1221
Merit: 1025
e-ducat.fr
What would be very cool would be a script that creates a transaction to an other address, using raw block downloaded from blockexplorer.com and an IP found on IRC.

Just to clarify, are you suggesting to include the desired spending tx directly in a raw block and start mining it (to avoid the need to import the private key in a wallet) ?
The script would have the destination address and raw block as arguments ? what is this ip address business ?
newbie
Activity: 33
Merit: 0
Code:
checksum() {
    perl -we "print pack 'H*', '$1'" |
    openssl dgst -sha256 -binary |
    openssl dgst -sha256
}

hash160() {
    openssl dgst -sha256 -binary |
    openssl dgst -rmd160
}
would be sufficient in this case, since openssl outputs in hex by default.

It doesn't with my version of openssl (1.0.0d).   Also, don't forget you need to get only the first 4 bytes on checksum.
I have an older version (0.9.Cool. It also has a -hex option for most commands so "openssl dgst -hashalgo -hex" should work. And yes, I forgot about the 4 bytes. It's just that perl gives me skin rash.
Quote
Quote
Nice script by the way. I may make use of it to implement an idea that I've had for a while.

Thanks.  What would be very cool would be a script that creates a transaction to an other address, using raw block downloaded from blockexplorer.com and an IP found on IRC.
I'm not sure I understand what you mean. Sounds weird.
legendary
Activity: 1288
Merit: 1080
Code:
checksum() {
    perl -we "print pack 'H*', '$1'" |
    openssl dgst -sha256 -binary |
    openssl dgst -sha256
}

hash160() {
    openssl dgst -sha256 -binary |
    openssl dgst -rmd160
}
would be sufficient in this case, since openssl outputs in hex by default.

It doesn't with my version of openssl (1.0.0d).   Also, don't forget you need to get only the first 4 bytes on checksum.

Quote
Nice script by the way. I may make use of it to implement an idea that I've had for a while.

Thanks.  What would be very cool would be a script that creates a transaction to an other address, using raw block downloaded from blockexplorer.com and an IP found on IRC.
newbie
Activity: 33
Merit: 0
Instead of xxd, I guess it is possible to use perl oneliners:

Code:
checksum() {
    perl -we "print pack 'H*', '$1'" |
    openssl dgst -sha256 -binary |
    openssl dgst -sha256 -binary |
    perl -we 'print unpack q{H8}, join q{}, <>'
}

hash160() {
    openssl dgst -sha256 -binary |
    openssl dgst -rmd160 -binary |
    perl -we 'print unpack q{H*}, join q{}, <>'
}

Perl is usually easy to install on systems where bash is installed.

Watch for the last lines of these two functions:  they are actually different (H8 instead of H*), as the checksum function only needs the four first bytes.


THIS HAS NOT BEEN TESTED MUCH.   Please test it thorously before actually using it.

Unless I'm missing something, it seems to me that simply doing
Code:
checksum() {
    perl -we "print pack 'H*', '$1'" |
    openssl dgst -sha256 -binary |
    openssl dgst -sha256
}

hash160() {
    openssl dgst -sha256 -binary |
    openssl dgst -rmd160
}
would be sufficient in this case, since openssl outputs in hex by default.

Nice script by the way. I may make use of it to implement an idea that I've had for a while.
legendary
Activity: 1221
Merit: 1025
e-ducat.fr
Thaks for this new installment: it works beautifully as per the transcript below (only the last lines).
I have not yet tested the "spending" end though (sending coins to the address below importing the private key and spending).
Meanwhile if anyone can send me a dime (0.10 BTC) Roll Eyes

$ gpg < wallet.pem.asc |
> openssl ec -pubout |
> publicKeyToAddress

You need a passphrase to unlock the secret key for
user: "Boussac"
read EC key
2048-bit RSA key, ID 26B8AF92, created 2011-07-02

read EC key
gpg: encrypted with 2048-bit RSA key, ID 26B8AF92, created 2011-07-02
      "Boussac"
writing EC key
writing EC key
1E1wr4xtgWDVsuqUR42rDi8J5U1nhKYnKa
legendary
Activity: 1288
Merit: 1080
Instead of xxd, I guess it is possible to use perl oneliners:

Code:
checksum() {
    perl -we "print pack 'H*', '$1'" |
    openssl dgst -sha256 -binary |
    openssl dgst -sha256 -binary |
    perl -we 'print unpack q{H8}, join q{}, <>'
}

hash160() {
    openssl dgst -sha256 -binary |
    openssl dgst -rmd160 -binary |
    perl -we 'print unpack q{H*}, join q{}, <>'
}

Perl is usually easy to install on systems where bash is installed.

Watch for the last lines of these two functions:  they are actually different (H8 instead of H*), as the checksum function only needs the four first bytes.


THIS HAS NOT BEEN TESTED MUCH.   Please test it thorously before actually using it.
legendary
Activity: 1221
Merit: 1025
e-ducat.fr
That would be greatly appreciated by all average joe's running on windows: I will try it on win 7..
sr. member
Activity: 286
Merit: 251
Grondilu , good work!

A bash script, that can do this, this will help everyone understand what is happening here!

To JPL who said
>  Without having tested a method to import that private key into a Bitcoin implementation, you won't know whether you've made some subtle mistake in the first part, irreversibly donating sent money into the ether.

Its easy to test, test with a tiny tiny sum, say 0.01 BTC : if it works, you have tested it! If not perhaps you sent 0.01 btc into the aether! 
Pages:
Jump to: