Show Posts
|
Pages: [1] 2 »
|
Smooth transaction. Thanks!
|
|
|
I did do a quick search before posting but didn't find anything. Well, anyhow, my implementation still has the advantage of being automated and not relying on trust in blockexplorer I guess.
|
|
|
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
|
|
|
I would like to thank Grondilu for his bash library (I guess we could call it that) for generating bitcoin addresses. Here is a bitpoa info file for the script, that I just made for testing purposes: file:bitpoa.bash algo:sha256 address:1Dga4BiLThvbFeA7b2sxzQx2G85uCk67kr txid:9209f8bfaa967cf2530a6a708ac12b370615ca4e4d5242e8bc28261f12522bce block:142683
You can check it with bitpoa -v -f bitpoa.bash -i bitpoa.bash.poa where bitpoa.bash.poa is this info file. But it may not work if you copy/paste due to tabbing (yes, I know: tabs are evil) and newlines. However, it should work with the file provided in the archive below. (blockexplorer link: http://blockexplorer.com/address/1Dga4BiLThvbFeA7b2sxzQx2G85uCk67kr) Megaupload link to an archive containing the script, grondilu's script and Gavin Andresen's tools: http://www.megaupload.com/?d=BR470E20(sha256sum: 76ee03f4dc494af8fe16d0340679803eeb745394dbb97d1e1e96c8ebe3d5db2a bitpoa.tar.gz) Sorry for multiple posts but I'm having problems sending it all in one chunk.
|
|
|
I can already hear the screams of "Satoshi intended the bitcoin blockchain for bitcoin transfer only" and the like but once again I am merely providing a tool which you may or may not use at your own discretion. There is also no blockchain more secure than that of bitcoin and I am afraid that a blockchain specifically for the purpose of POA may never catch on and never be secure enough against powerful adverseries. Anyhow, I do not see this method being used on a daily basis by many so it would not pose much risk of overloading the network, especially given the need for transaction fees. Bellow, is a bash script which enables creation and verification of a bitcoin POA. It requires the original bitcoin client running as a daemon for creation of a POA and Gavin Andresen's dbdump.py ( https://github.com/gavinandresen/bitcointools/tree/45f5c0030ac9a121fff504b0ffd27efc27423bde) for verification. #!/bin/bash #bitpoa: Bitcoin blockchain based proof of authenticity #Author: Wolciph #Public domain, use at your own risk set -e
#config: interactive=1 hashAlgo=sha256 amount=0.00000001 fee=0.0001 keyType=pk infoFile='info.poa'
bitcoind=~/bitcoind bitcoinDir=~/.bitcoin/ dbdump=~/bitcointools/dbdump.py
cd "$(dirname "$0")" . addrgen.so.bash #. bitpoa.conf cd - >/dev/null
_tries=5 get_transaction_block() #(txid) { #workaround to access block of transaction: local c=$($bitcoind getblockcount) local b=$($bitcoind gettransaction $1 | grep -m1 '"confirmations" :' | sed -r 's/^.*"confirmations" : ([0-9]*).*$/\1/g'; [[ ${PIPESTATUS[@]} = '0 0 0' ]]) local c2=$($bitcoind getblockcount) if (( $c2 == $c )); then echo $((c - b + 1)) elif (( _tries > 0 )); then ((_tries--)); get_transaction_block else echo "Cannot get stable blockcount. Wait until your blockchain is up\ to date and try again." >&2 return 2 fi } get_field() #(field) { grep -m1 "^$1:" | sed -r "s/^$1:(.*)$/\1/g" [[ ${PIPESTATUS[@]} = '0 0' ]] }
check_pipes() { [[ "${PIPESTATUS[@]}" =~ ^0(\ 0)*$ ]]; }
help="bitpoa Bitcoin blockchain proof of authenticity tool: Examples: These tasks require the bitcoin server to be active: Creation: $0 -cf document.txt -i info.poa -a sha256 -A 0.00000001 Finding the block: $0 -b -i info.poa This task requires the bitcoin server to be stopped: Verifying: $0 -vf document.txt -i info.poa Commands: -c, --create : create and send _amount_ coins to a new address -b, --find-block : find the block in which the new transaction is to complete the info file -v, --verify : verify a POA -f, --file= : file from which to create a hash -i, --info-file= : info file to read or write info for checking the POA -h, --hash : do not hash the file (to use if it already is a hash) -a, --algo= : the hashing algorithm; uses openssl -y, --assume-yes : do not prompt before critical operations, non-interactive -s, --secret-key : use hash in the private key (NOT IMPLEMENTED) -A, --amount= : amount of bitcoins to send (WILL BE LOST FOREVER!!!) -F, --fee= : transaction fee " #------------------
OPTS=$(getopt -o cvbf:i:ha:yA:F: \ --long create,verify,find-block,file:,info-file:,hash,algo:,assume-yes,help,amount,fee\ -n "$0" -- "$@") if [ $? != 0 ]; then echo "Terminating. Use --help for help." >&2; exit 1; fi eval set -- "$OPTS" while true; do case "$1" in -c|--create) action=create; shift;; -v|--verify) action=verify; shift;; -b|--find-block) action=findBlock; shift;; -f|--file) file="$2"; shift 2;; -i|--info-file) infoFile="$2"; shift 2;; -h|--hash) hash=1;; #the file cointains the hash -a|--algo) hashAlgo="$2"; shift 2;; #first round (followed by ripemd160) -y|--assume-yes) interactive=0; shift;; -s|--secret-key) keyType=sk; shift;; -A|--amount) amount=$2; shift 2;; -F|--fee) txfee=$2; shift 2;; --help) printf "%s" "$help" >&2; exit 0;; --) shift; break;; *) echo "Invalid argument: $1. Use --help for help." >&2; exit 1;; esac done [ -n "$1" ] && { echo "Unknown extra argument: $1" >&2; exit 1; } [ -z "$action" ] && { echo 'No action specified (-c|-v|-b)' >&2; exit 1; }
if [[ $action = findBlock ]]; then txid="$(get_field txid < $infoFile)" block=$(get_transaction_block $txid) printf "%s\n" "block:$block" >> $infoFile exit 0 fi
if [[ "$hash" = '1' ]]; then hash=$(cat "$file") else hash=$(cat "$file" | openssl dgst -$hashAlgo -hex; [[ ${PIPESTATUS[@]} = '0 0' ]];) || { echo "Error while hashing using $hashAlgo. Exiting." >&2; exit 1; } fi
if [[ $keyType = pk ]]; then h=$(xxd -p -r <<< "$hash" | openssl dgst -rmd160) address=$(hash160ToAddress $h) else exit 1 #use hash as seed for prng? fi
if [[ $action = 'create' ]]; then printf "%s\n%s\n%s\n" "file:$file" "algo:$hashAlgo" "address:$address" > $infoFile cmd="$bitcoind -paytxfee=$txfee sendtoaddress $address $amount" if [[ $interactive = '1' ]]; then echo "Warning: $amount bitcoins will be lost forever." >&2 printf '%s\n%s\n%s\n' "The following command is about to be sent to the bitcoin daemon:"\ "$cmd" "Make sure it is running. Proceed? (y/n)" >&2 read r [[ "$r" =~ ^y(es?)?$ ]] || exit 0 fi echo -n 'txid:' >> $infoFile eval $cmd >> $infoFile if [[ $interactive = '1' ]]; then printf "%s%s\n" 'You must now wait for the transaction to be '\ "integrated into a new block before launching $0 -b [...]" >&2 fi elif [[ $action = 'verify' ]]; then address2="$(get_field address < $infoFile)" if [[ "$address2" != "$address" ]]; then printf "%s\n" "FAILURE: The address is incorrect (should be $address)!" >&2 exit 5 fi block=$(get_field block < $infoFile) blockInfo="$($dbdump --block=$block)" if ! (grep -m1 "pubkey: $address" <<< "$blockInfo"); then echo "FAILURE: The address is correct but does not appear in the given block!" >&2 exit 6 fi echo "The address is correct and was published in the blockchain at around:" grep -m1 '^Time: ' <<< "$blockInfo" | sed -r 's/Time: (.*) Nonce:.*$/\1/' fi
Usage examples: These tasks require the bitcoin server to be active: Creation: ./bitpoa.bash -cf document.txt -i info.poa -a sha256 -A 0.00000001 Finding the block: ./bitpoa.bash -b -i info.poa (for creation, a second step must be taken to find the block of the transaction in order to speed up verification) This task requires the bitcoin server to be stopped: Verifying: ./bitpoa.bash -vf document.txt -i info.poa
|
|
|
The purpose of the following method and script is to permit one to provide a proof of the authenticity of a document, that is prove that a document is the original version, that it has not been altered since it's first publication. This can have several uses, such as proving authorship, or preventing an adversary from spreading disinformation or confusion about for instance the date and location of an event (e.g. if "Anonymous" wishes to coordinate a DDOS attack). Another example which triggered my interest in this is that of Breivik's manifesto of which some decided to spread altered versions in order to make the original message difficult to find and spread. (note: I do not support Breivik; I am merely providing a method that can help all people, regardless of their intention. In the end, this method benefits the Truth.)
The idea is to insert a hash of a document in a block before publishing said document. Then, as the blockchain grows, it becomes increasingly difficult to modify this block and the hash it contains, thus providing a cryptographic proof that this exact document existed at a certain point in time. So, in order to be able to prove a document of mine is authentic I would first have to publish it's hash in the blockchain and then wait a sufficient amount of time for two things: - that the blockchain has grown sufficiently that modifying the block of my hash has become infeasible; - and more importantly, that enough time had elapsed that there would be no doubt in the eyes of my public that the document was not publicly available at the time I inserted the hash. Thus, depending on the situation, waiting weeks or months after insertion of the hash may be necessary before publishing.
Technically, there are several ways of inserting a hash in the blockchain. One would be to send transactions of amounts which, once concatenated, would form the hash. This method is somewhat impractical. 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. Yet another would be to instead generate the bitcoin private key from the hash, by using it as seed for the pseudo-random number generator for instance, and later disclosing this private key to enable verification.
|
|
|
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. . 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.
|
|
|
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.
|
|
|
"La demande sera énorme pour un nombre constant de BTC." Les bitcoins ne sont pas des unités indivisibles. L'unité fondamentale est 10e-8 bitcoin parfois appelé un Satoshi en l'honneur du créateur de bitcoin. Si tu fait quelques multiplications en supposant que tout l'argent dans le monde soit uniquement des bitcoins, tu verras que tout va bien. "les 21M sont un nombre fixé arbitrairement par les dev qui ne correspond à rien du tout. Pourquoi pas 42 ?" Il faut bien choisir un nombre. Ca n'a pas grande importance tant qu'il est suffisamment grand. "il faudrait pouvoir augmenter la barre des 21M afin qu’elle soit tjrs ajusté de manière objective sur l’activité économique" Bitcoin est fait pour ne pas pouvoir être manipulé et pour cela utilise algorithme. Il faudrait entrer des données dans le système pour ta proposition, et il faudrait alors que quelqu'un soit en charge de le faire. Je ne suis pas un économiste mais je ne vois pas de raisons pour laquelle la masse monétaire devrait augmenter, et il ne m'en a jamais été donné. Je dirais même (comme tu le fais remarquer) que cela encourage la croissance économique exponentielle ce qui n'est pas acceptable dans un monde aux ressources limitées comme le notre. Cependant je reste ouvert d'esprit si tu as un lien vers un document expliquant la supposée nécessité ou utilité de l'inflation par exemple. L'augmentation de type exponentielle de la valeur du bitcoin semble refléter l'intérêt croissant qui lui est porté. Regardes toi-même sur Google Trends: http://www.google.com/trends?q=bitcoin&ctab=0&geo=all&date=ytd&sort=0Je précise aussi que les articles de presse de plus en plus nombreux se focalisent relativement peu sur la grande déflation que subit le bitcoin mais plutôt sur son côté révolutionnaire. Aussi, pour éviter un effet de bulle, le meilleur moyen serait certainement de rendre le bitcoin véritablement utile en ayant plus de possibilités pour acheter avec. Ils répondent a un véritable besoin de pouvoir faire des achats et ventes en ligne avec des frais de transactions faibles (peut-être même négligeables pour l'acheteur) et de façon moins pragmatique à un désir collectif d'avoir le contrôle de son argent et d'en finir avec le pouvoir qu'ont banques. Ainsi, comparer des bitcoins aux tulipes ne me paraît pas vraiment approprié d'autant plus que celles si n'étaient rares que durant une période limitée du fait de mauvaises récoltes. En ce qui concerne l'achat de matériel pour les mineurs, je ne vois pas en quoi cela affecte l'économie. Au pire, ils peuvent revendre leur matériel ou en faire un autre usage (en le louant a des chercheurs ou je ne sais quoi).
|
|
|
I don't understand what your saying, Walidzohair. What's the "sp"? EDIT: oh right, spesmilo. If you're having trouble, it may be because my script is fetching the very latest sources of wxwidgets. But I can't seem to find a complete archive of the daily snapshots. They only seem to keep them for 3 days so I can't link to one that is known to be functional.
Also, I edited my previous post so it would compile bitcoind too.
|
|
|
From what I understand, using another layer of encryption (ssh) over the tor network is redundant since it is already secure. You think tor is the same as I2P? Well, from my personal experience I2P is much better at transferring big files. 99% of the I2P traffic must be torrents using the i2psnark implementation of torrents on the I2P network. I don't know how strong tor's encryption is compared to what you get with ssh, but I'm quite sure that if you use I2P there is no need for extra encryption. You might as well use ftp instead of sftp. There is also no need for special authentication of the server. That is also guaranteed by the tor or i2p addresses which are cryptographic signatures. On tor, addresses look like kpvz7ki2v5agwt35.onion On i2p, addresses look like lnQ6yoBTxQuQU8EQ1FlF395ITIQF-HGJxUeFvzETLFnoczNjQvKDbtSB7aHhn853zjVXrJBgwlB9sO57KakBDaJ50lUZgVPhjlI19TgJ-CxyHhHSCeKx5JzURdEW-ucdONMynr-b2zwhsx8VQCJwCEkARvt21YkOyQDaB9IdV8aTAmP~PUJQxRwceaTMn96FcVenwdXqleE16fI8CVFOV18jbJKrhTOYpTtcZKV4l1wNYBDwKgwPx5c0kcrRzFyw5~bjuAKO~GJ5dR7BQsL7AwBoQUS4k1lwoYrG1kOIBeDD3XF8BWb6K3GOOoyjc1umYKpur3G~FxBuqtHAsDRICkEbKUqJ9mPYQlTSujhNxiRIW-oLwMtvayCFci99oX8MvazPS7~97x0Gsm-onEK1Td9nBdmq30OqDxpRtXBimbzkLbR1IKObbg9HvrKs3L-kSyGwTUmHG9rSQSoZEvFMA-S0EXO~o4g21q1oikmxPMhkeVwQ2VHB0-LZJfmLr4SAAAA I2P's encryption is probably much better.
|
|
|
Yes, please add SEPA wire transfer as a payment type.
|
|
|
I'm considering creating a "bitcoin" user on my machine, so that no troyan could read my wallet or send any bitcoins without knowing the bitcoin user's password.
Would that solve the troyan problem?
If you install programs as root, then they will be able to do anything. Even if you encrypt the home folder of your account, a program installed as root can do any keylogging it likes and will be able to see the decrypted files when you are using this user's account. The best solution would be to have an entirely separate computer dedicated to bitcoin on which you install only the basic software you need to run bitcoin, downloaded from trusted sources. To protect against trojans which are not too sophisticated, running a VM seems like a reasonable solution. If the VM storage file is encrypted, that's even better. See truecrypt for that.
|
|
|
Finding an open source alternative to Skype has been on my todo list for a while.
Any recommendations?
The open-source decentralized (like e-mail) protocol XMPP (Google Talk's protocol) has videoconferencing support. I think it has two extensions for that (the X stands for eXtendable, so the use of an extension to the protocol is perfectly normal and desirable): one is old pretty bad from what I understand, the newer one is developed by Google (open-source) and should work just as well as using Skype.
|
|
|
Finding an open source alternative to Skype has been on my todo list for a while.
Any recommendations?
The open-source protocol XMPP (Google Talk's protocol) has videoconferencing support. I think it has two extensions for that (the X stands for eXtendable, so the use of an extension to the protocol is perfectly normal and desirable): one is old pretty bad from what I understand, the newer one is developed by Google (open-source) and should work just as well as using Skype.
|
|
|
OP, I suggest you lookup toecoin on this forum. It's a really great system to insure nobody can cheat during the bootstrapping process.
|
|
|
I see no reason why the bitcoin GUI shouldn't allow to send low priority transanctions when sending small amounts. It could just add a warning: "if you do not pay a fee, your transaction may take a long time to be processed (a day?)". Also (but I think this has been suggested already), it should be possible to pay "milliBTC" fees. Paying a 0.01BTC fee when you are sending 0.05BTC is just not acceptable.
|
|
|
Here is a script that will do absolutely everything - including downloads - in order to get a compiled version of bitcoin working in Natty (with the GUI fixed of course): http://pastebin.com/JLxKKpuqActually, I'll even put it here directly: #!/bin/bash echo "DISCLAIMER: you are using this script at your own discretion! By typing 'c', you agree that you have read the script yourself and have understood it and that you will thus take full responsabilty in the eventuality that this script leads to any harm to you or your property. If you do not agree type 'n'" read -n 1 r [ "$r" = 'c' ] || exit 0
set -e
echo "You will be prompted to enter your password in order to install necessary dependencies."
sudo apt-get install build-essential libgtk2.0-dev libssl-dev libdb4.7-dev libdb4.7++-dev libboost-all-dev sudo apt-get build-dep libwxgtk2.8-dev
mkdir bitcoin || true cd bitcoin
[ -e wxWidgets.tar.gz ] || wget "http://biolpc22.york.ac.uk/pub/Daily_HEAD/wxWidgets.tar.gz" [ -e wxWidgets ] || tar -xvzf wxWidgets.tar.gz cd wxWidgets ./configure make -j3 sudo make install sudo ldconfig cd ..
[ -e miniupnpc*.tar.gz ] || wget "http://miniupnp.tuxfamily.org/files/download.php?file=miniupnpc-1.5.tar.gz" [ -e miniupnpc*/ ] || tar -xvzf *miniupnpc*.tar.gz cd *miniupnpc*/ make sudo make install cd ..
#for some reason, github's certificate doesn't work: [ -e bitcoin*.tar.gz ] || wget --no-check-certificate "https://www.github.com/bitcoin/bitcoin/tarball/v0.3.21" [ -e bitcoin*/ ] || tar -xvzf "v0.3.21" cd bitcoin*/ make -f makefile.unix make -f makefile.unix bitcoind #optional: strip bitcoin; strip bitcoind; echo "Bitcoin is now compiled : '$PWD/bitcoin'" echo "Launch bitcoin now? (y/n)" read -n1 r [[ "$r" = y ]] && ./bitcoin cd ..
To run it: save it in your home folder as bitcoinfornatty.bash, open a terminal (ctrl+alt+t), type "bash ./bitcoinfornatty.bash", press enter (yeah, some people don't even get that you have to press enter) and READ THE DISCLAIMER. Also, you agree that I will not be held responsible for any inconsistencies between my disclaimer and the amount of detail in my instructions. Don't hesitate to report any problems. EDIT: added lines: make -f makefile.unix bitcoind #optional: strip bitcoin; strip bitcoind; It will now build bitcoind also.
|
|
|
Voted! Less than 3000 votes between #1 and #2! However, if this is as bad as Fox News with Glenn Beck... I don't know. Anyhow, I suppose the important thing is that we popularise bitcoin.
|
|
|
Picture unrelated ^^
|
|
|
|