mintymark
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 19, 2011, 02:43:08 PM |
|
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!
|
[[ All Tips gratefully received!! ]] 15ta5d1N8mKkgC47SRWmnZABEFyP55RrqD
|
|
|
Boussac
Legendary
Offline
Activity: 1221
Merit: 1025
e-ducat.fr
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 19, 2011, 03:21:22 PM |
|
That would be greatly appreciated by all average joe's running on windows: I will try it on win 7..
|
|
|
|
grondilu (OP)
Legendary
Offline
Activity: 1288
Merit: 1080
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 20, 2011, 08:50:43 AM |
|
Instead of xxd, I guess it is possible to use perl oneliners: 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.
|
|
|
|
Boussac
Legendary
Offline
Activity: 1221
Merit: 1025
e-ducat.fr
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 23, 2011, 08:23:24 AM |
|
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](https://bitcointalk.org/Smileys/default/rolleyes.gif) $ 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
|
|
|
|
wolciph
Newbie
Offline
Activity: 33
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 25, 2011, 09:17:33 AM |
|
Instead of xxd, I guess it is possible to use perl oneliners: 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 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.
|
|
|
|
grondilu (OP)
Legendary
Offline
Activity: 1288
Merit: 1080
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 25, 2011, 01:57:53 PM |
|
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. 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.
|
|
|
|
wolciph
Newbie
Offline
Activity: 33
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 25, 2011, 04:56:57 PM |
|
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](https://bitcointalk.org/Smileys/default/cool.gif) . 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. 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.
|
|
|
|
Boussac
Legendary
Offline
Activity: 1221
Merit: 1025
e-ducat.fr
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 25, 2011, 09:13:37 PM |
|
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 ?
|
|
|
|
xali
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 163
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 26, 2011, 04:48:44 AM |
|
"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
|
someone else had been posting on my account for over a year; Every post from January 10 2017 to June 18 2018 is NOT ME Whoever this person was that got access to my account, felt the need to shill something called "bidium" in my signature very surreal. is this normal? the internet is full of crooks... watch out
|
|
|
grondilu (OP)
Legendary
Offline
Activity: 1288
Merit: 1080
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 26, 2011, 12:20:35 PM |
|
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). 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. 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.
|
|
|
|
grondilu (OP)
Legendary
Offline
Activity: 1288
Merit: 1080
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 26, 2011, 12:23:44 PM |
|
I have an older version (0.9. ![Cool](https://bitcointalk.org/Smileys/default/cool.gif) . 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. I'm not sure I understand what you mean. Sounds weird.
See my previous message.
|
|
|
|
wolciph
Newbie
Offline
Activity: 33
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 26, 2011, 09:56:37 PM |
|
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. 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://bitcointalk.org/index.php?topic=39548.0
|
|
|
|
grondilu (OP)
Legendary
Offline
Activity: 1288
Merit: 1080
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 27, 2011, 08:24:24 AM |
|
So basically you want to make a light bash bitcoin client.
Yes, that's the idea. 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. « 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.
|
|
|
|
Boussac
Legendary
Offline
Activity: 1221
Merit: 1025
e-ducat.fr
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 28, 2011, 08:47:51 PM Last edit: August 28, 2011, 09:07:37 PM by Boussac |
|
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 ? ![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fwww.microbitcoin.fr%2FQRCodes.png&t=665&c=TOEgmajeNrjRHA)
|
|
|
|
davout
Legendary
Offline
Activity: 1372
Merit: 1007
1davout
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 29, 2011, 09:35:30 AM |
|
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.
|
|
|
|
mcqueenorama
Newbie
Offline
Activity: 34
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 31, 2011, 11:05:09 PM |
|
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.
|
|
|
|
Boussac
Legendary
Offline
Activity: 1221
Merit: 1025
e-ducat.fr
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
September 01, 2011, 09:01:09 AM |
|
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.
|
|
|
|
grondilu (OP)
Legendary
Offline
Activity: 1288
Merit: 1080
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 03, 2011, 10:23:42 AM |
|
Some interesting developments of this thread can be found on this one.
|
|
|
|
btc_artist
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 154
Merit: 102
Bitcoin!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 18, 2011, 11:33:20 PM |
|
Some interesting developments of this thread can be found on this one. Thanks for the link.
|
BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
|
|
|
grondilu (OP)
Legendary
Offline
Activity: 1288
Merit: 1080
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 09, 2012, 09:51:05 AM |
|
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: $ . 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: $ vanityFromPublicPoint 045960320CAE057C2F3CEA1D58CA587B7207E7CD0BD8104AF7C563717B14013557E926246A48C8C38ADB2E7483B57DE85A8EEB33CC52BDD037B6C87CD41E358D48 "Grondi1u"
This allows people to sell vanity addresses! (see https://bitcointalk.org/index.php?topic=83749.0)
|
|
|
|
|