<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Talkera</title>
	<atom:link href="/crypto/feed/" rel="self" type="application/rss+xml" />
	<link>https://talkera.org/crypto</link>
	<description>Cryptocurrency blog</description>
	<lastBuildDate>Wed, 07 Jan 2015 01:32:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1</generator>
	<item>
		<title>Threshold signatures:  the potential to dramatically improve Bitcoin security</title>
		<link>https://talkera.org/crypto/threshold-signatures-the-potential-to-dramatically-improve-bitcoin-security/</link>
		<comments>https://talkera.org/crypto/threshold-signatures-the-potential-to-dramatically-improve-bitcoin-security/#comments</comments>
		<pubDate>Wed, 07 Jan 2015 01:32:59 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[princeton]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">https://talkera.org/crypto/?p=1403</guid>
		<description><![CDATA[Private keys are used to spend transactions on the bitcoin blockchain. If they are not kept secure, an attacker can spend your bitcoins. It is nearly impossible to guess a private key or to bruteforce a private key (due to lack of computation power).   Theft of bitcoin private keys have occured in the past usually [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Private keys are used to spend transactions on the bitcoin blockchain. If they are not kept secure, an attacker can spend your bitcoins. It is nearly impossible to guess a private key or to bruteforce a private key (due to lack of computation power).   Theft of bitcoin private keys have occured in the past usually by malware.  What can be done against this? <em>(scroll to bottom for a scientific paper)</em></p>
<p>Bitcoin uses a system called the <a href="https://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm" target="_blank">Elliptic Curve Digital Signature Algorithm</a>, also known as ECDSA, to sign a transactions.    A bitcoin address is in fact the hash of a ECDSA public key. A public key is generated from a bitcoin private key, a private key usually being a 256-bit random number.  Transactions can be signed with a bitcoin private key.</p>
<p><a href="/crypto/multisig-secure-bitcoin-transactions/" target="_blank">Multisig</a> was proposed as one of the solutions to make the bitcoin system more secure. If you are unfamiliar with Multisig, read about it <a href="/crypto/multisig-secure-bitcoin-transactions/" target="_blank">here</a>. There is another proposal by a group from Princeton: they propose a threshold signature-based system which they argue could dramatically improve bitcoin security.  The scheme is said to be compatible with Bitcoin&#8217;s ECDSA signatures and can be used for:</p>
<ul>
<li data-canvas-width="398.50268159999985">shared control of a wallet</li>
<li data-canvas-width="398.5131423999999">secure bookkeeping, a Bitcoin-specic form of accountability</li>
<li data-canvas-width="398.51015359999985">secure delegation of authority</li>
<li data-canvas-width="134.4930112">two-factor security for personal wallets</li>
</ul>
<p>Essentially it is a modified ECDSA signature generation scheme.  The start and end of the algorithm remains the same, making usage of the scheme &#8220;invisible&#8221; from traditional bitcoin transactions.  There is no source code released yet.</p>
<p>Paper link: <a href="http://www.cs.princeton.edu/~stevenag/bitcoin_threshold_signatures.pdf" target="_blank">http://www.cs.princeton.edu/~stevenag/bitcoin_threshold_signatures.pdf</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fthreshold-signatures-the-potential-to-dramatically-improve-bitcoin-security%2F&amp;title=Threshold%20signatures%3A%20%20the%20potential%20to%20dramatically%20improve%20Bitcoin%20security" id="wpa2a_2"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/threshold-signatures-the-potential-to-dramatically-improve-bitcoin-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitcoin wallet password recovery tool</title>
		<link>https://talkera.org/crypto/a-bitcoin-wallet-password-recovery-tool/</link>
		<comments>https://talkera.org/crypto/a-bitcoin-wallet-password-recovery-tool/#comments</comments>
		<pubDate>Tue, 06 Jan 2015 00:06:13 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>

		<guid isPermaLink="false">https://talkera.org/crypto/?p=1399</guid>
		<description><![CDATA[If you forgot your bitcoin wallet password you may just be able to recover it. We have discussed some other tools before such as Pywallet. Another password recovery tool, called btcrecover,  is designed for the case where you already know most of your password, but need assistance in trying different possible combinations. The reactions seem [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you forgot your bitcoin wallet password you may just be able to recover it. We have discussed some other tools before such as <a href="/crypto/pywallet-a-wallet-recovery-tool/" target="_blank">Pywallet</a>. Another password recovery tool, called btcrecover,  is designed for the case where you already know most of your password, but need assistance in trying different possible combinations. The reactions seem positive, but we have not inspected the source code.  Use at your own risk (disconnected computer?). It supports a large majority of the Bitcoin wallets:</p>
<ul class="task-list">
<li>Armory</li>
<li>Bitcoin Core (Bitcoin-Qt)</li>
<li>MultiBit Classic</li>
<li>Electrum</li>
<li>Most wallets based on bitcoinj, including Hive for OS X</li>
<li>mSIGNA (CoinVault)</li>
<li>Blockchain</li>
<li>pywallet &#8211;dumpwallet of Bitcoin Core wallets</li>
<li>Bitcoin Wallet for Android encrypted backups</li>
<li>KnC Wallet for Android encrypted backup</li>
</ul>
<p><del></del>Download link:  <a href="https://github.com/gurnec/btcrecover" target="_blank">https://github.com/gurnec/btcrecover</a><br />
Tutorial: <a href="https://github.com/gurnec/btcrecover/blob/master/TUTORIAL.md" target="_blank">https://github.com/gurnec/btcrecover/blob/master/TUTORIAL.md</a></p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fa-bitcoin-wallet-password-recovery-tool%2F&amp;title=Bitcoin%20wallet%20password%20recovery%20tool" id="wpa2a_4"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/a-bitcoin-wallet-password-recovery-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Case: Multi-sig hardware bitcoin wallet</title>
		<link>https://talkera.org/crypto/case-multi-sig-hardware-bitcoin-wallet/</link>
		<comments>https://talkera.org/crypto/case-multi-sig-hardware-bitcoin-wallet/#comments</comments>
		<pubDate>Mon, 05 Jan 2015 13:02:10 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">https://talkera.org/crypto/?p=1395</guid>
		<description><![CDATA[Case is a multi-sig hardware bitcoin wallet made in the US. Their official website is http://choosecase.com/   beware there are some impostor sites out there trying to steal your bitcoins. The wallet aims to improve usability compared to the mobile bitcoin wallets, particularly the number of steps.  The Case wallet has only three steps: detects and [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Case is a multi-sig hardware bitcoin wallet made in the US. Their official website is <a href="http://choosecase.com/ " target="_blank">http://choosecase.com/   </a>beware there are some impostor sites out there trying to steal your bitcoins. The wallet aims to improve usability compared to the mobile bitcoin wallets, particularly the number of steps.  The Case wallet has only three steps:</p>
<ul>
<li>detects and reads the QR code</li>
<li>the screen shows you the amount and address</li>
<li>asking you to swipe your finger to confirm the transaction.</li>
</ul>
<p>It  take less time than swiping a credit card in the real world but for some online payments you would need to generate the QR code in case only the bitcoin address is shown.</p>
<p>The wallet is a  2-of-3 multi-sig wallet meaning you need 2 keys of 3 to initate a transaction. A good article on multisig is <a href="/crypto/multisig-secure-bitcoin-transactions/" target="_blank">here</a>.  Multisig improves the security of the bitcoin system overall. A bitcoin private key is a very large number, which is impossible to guess because computers are <em>very slow </em>to try all of them. A private key is usually a 256-bit number, that&#8217;s 2^256 (~ 10^77).  Some newer wallets may have numbers as large as 2*2<sup>256</sup>.  One of the keys is embedded in the device. The second key is stored server-side, and is used if the fingerprint scan that was send with the swipe is a match. Fingerprints or biometrics are by no means an ideal security measure, as a<a href="https://www.schneier.com/blog/archives/2013/09/iphone_fingerpr.html" target="_blank"> security expert</a> put it &#8220;Your fingerprint isn&#8217;t a secret; you leave it everywhere you touch&#8221;.  Probably the device would have your fingerprints on them, but we think server-side there are some additional security measures. There&#8217;s always a trade-off between convenience and security, this seems reasonable. In case you lose the wallet, there is a third key (2-of-3 Multisig).</p>
<p>The device doesn’t piggy back off your phone for Internet access. It has a dedicated GSM chip and a multi-IMSI embedded SIM card that allows us to hop from carrier to carrier without roaming fees. That means you can carry the device around and make transactions anywhere near a telephone network.</p>
<p>A screenshot of the device internals was posted by the authors of the device:</p>
<div style="width: 1642px" class="wp-caption alignnone"><img class="" src="http://choosecase.com/images/case_breadboard.jpg" alt="" width="1632" height="1224" /><p class="wp-caption-text">case_breadboard</p></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fcase-multi-sig-hardware-bitcoin-wallet%2F&amp;title=Case%3A%20Multi-sig%20hardware%20bitcoin%20wallet" id="wpa2a_6"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/case-multi-sig-hardware-bitcoin-wallet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transaction signing via audio modem tones</title>
		<link>https://talkera.org/crypto/transaction-signing-via-audio-modem-tones/</link>
		<comments>https://talkera.org/crypto/transaction-signing-via-audio-modem-tones/#comments</comments>
		<pubDate>Sat, 03 Jan 2015 19:45:39 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>
		<category><![CDATA[airgap]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[modem]]></category>

		<guid isPermaLink="false">https://talkera.org/crypto/?p=1384</guid>
		<description><![CDATA[You may be familiar with a network security measure called air gap. The idea is that your offline bitcoin wallet is running on a machine that is physically isolated from unsecured networks such as the internet.  One user has started to use an air gap principle to do transactions between a hot wallet and cold [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>You may be familiar with a network security measure called <a href="https://en.wikipedia.org/wiki/Air_gap_%28networking%29" target="_blank">air gap</a>. The idea is that your offline bitcoin wallet is running on a machine that is physically isolated from unsecured networks such as the internet.  One <a href="https://bitcointalk.org/index.php?topic=735111.0" target="_blank">user </a>has started to use an air gap principle to do transactions between a hot wallet and cold wallet.  You may imagine having an air gap security bitcoin wallet or sending bitcoin transactions over the telephone line. How can you do that?</p>
<p>First you need to install <a href="http://www.whence.com/minimodem/" target="_blank">minimodem</a> which can encode and decode data using audio modem tones at a specific baud rate.  Once you have that installed you can do transactions between two machines using our script. An example output:</p>
<p><strong>Cold wallet machine:</strong></p><pre class="crayon-plain-tag">Your brain wallet password: *************************
Address : 1HoSFymoqteYrmmr7s3jDDqmggoxacbk37
Where to send (bitcoin address): 1NWVtaN29usUQ8xSuWqeLR3Un9jkzcyr1f
Amount (satoshi): 10000
** modem tones **</pre><p><strong>Hot wallet machine:</strong></p><pre class="crayon-plain-tag">$ minimodem --rx 100
$ 0100000002dd684b97715af043465aa7aee9f86d5cce74e0172f9f751bb15b08c4a0c70fda000000008c493046022100cb8c82b718ba9afb45414cd67c174fe8161c4c758e0d2185ed1dbe8605fff9560221009dc9b5..</pre><p>The host wallet machine can then import this transaction into the blockchain using any wallet.</p>
<p><strong>The script:</strong></p><pre class="crayon-plain-tag">from pybitcointools import *
 
 
class Wallet:
 
	priv = ""
	pub = ""
	address = ""
 
	def createWallet(self,brainwalletpassword):
		self.priv = sha256(brainwalletpassword)
		self.pub = privtopub(self.priv)
		self.address = pubtoaddr(self.pub)
 
		print "Address : " + self.address
 
	def balance(self):
		print unspent(self.address)
 
	def sendBTC(self,dst, amount):
		h = history(self.address)
		outs = [{'value': amount, 'address': dst}] 
		tx = mksend(h,outs, self.address, 10000)
		tx2 = sign(tx,0,self.priv)
 		os.system("echo " + tx2 + " | minimodem --tx 100")

x = Wallet()
password = raw_input("Your brain wallet password: ")
x.createWallet(password)

destination = raw_input("Where to send (bitcoin address): ")
amount = int(raw_input("Amount (satoshi): "))
x.sendBTC(destination, amount)</pre><p></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Ftransaction-signing-via-audio-modem-tones%2F&amp;title=Transaction%20signing%20via%20audio%20modem%20tones" id="wpa2a_8"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/transaction-signing-via-audio-modem-tones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mmgen, a Bitcoin cold storage solution for the command line</title>
		<link>https://talkera.org/crypto/mmgen-a-bitcoin-cold-storage-solution-for-the-command-line/</link>
		<comments>https://talkera.org/crypto/mmgen-a-bitcoin-cold-storage-solution-for-the-command-line/#comments</comments>
		<pubDate>Sat, 03 Jan 2015 16:47:28 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[cold storage]]></category>

		<guid isPermaLink="false">https://talkera.org/crypto/?p=1379</guid>
		<description><![CDATA[MMGen is a Bitcoin cold-storage system implemented as a suite of Python command-line scripts that require only a bare minimum of system resources. MMGen plus Bitcoin Core is a completely self-contained system requiring no external Internet resources except for the Bitcoin network itself to do its work: no third parties are involved, and thus no [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>MMGen is a Bitcoin cold-storage system implemented as a suite of Python command-line scripts that require only a bare minimum of system resources. MMGen plus Bitcoin Core is a <strong>completely self-contained system</strong> requiring no external Internet resources except for the Bitcoin network itself to do its work: no third parties are involved, and thus no information regarding which addresses you&#8217;re tracking is leaked to the outside world.</p>
<p>The program works in tandem with the reference Bitcoin Core daemon (bitcoind) running on both an online and an offline computer to provide a robust solution for securely storing, tracking, sending and receiving Bitcoins. The system uses other implementations from pybitcointools, pywallet and electrum. We have not studied the source code into great detail but everything is in Python so it&#8217;s not to hard to read all of it. Use at your own risk. The features are:</p>
<ul class="task-list">
<li>Generate a wallet</li>
<li>Generate addresses</li>
<li>Import addresses</li>
<li>Create a transaction</li>
<li>Sign a transaction</li>
<li>Send a transaction</li>
<li>Using the mnemonic and seed features</li>
<li>Mnemonics and seeds — additional information</li>
<li>Incognito wallets</li>
</ul>
<p>Official site: <a href="https://github.com/mmgen/mmgen " target="_blank">https://github.com/mmgen/mmgen </a></p>
<p>Thread: <a href="https://bitcointalk.org/index.php?topic=567069.0" target="_blank">https://bitcointalk.org/index.php?topic=567069.0</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fmmgen-a-bitcoin-cold-storage-solution-for-the-command-line%2F&amp;title=mmgen%2C%20a%20Bitcoin%20cold%20storage%20solution%20for%20the%20command%20line" id="wpa2a_10"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/mmgen-a-bitcoin-cold-storage-solution-for-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Armory Secure Wallet With Python</title>
		<link>https://talkera.org/crypto/using-armory-secure-wallet-with-python/</link>
		<comments>https://talkera.org/crypto/using-armory-secure-wallet-with-python/#comments</comments>
		<pubDate>Fri, 02 Jan 2015 16:24:19 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[armory]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">https://talkera.org/crypto/?p=1361</guid>
		<description><![CDATA[Armory is an Open-Source wallet with cold storage and multi-signature support Armory was build in Python and parts of the wallet are in C++.  The example code that Armory provides is  outdated, limited needs to be updated to be useful; In this tutorial we show you some examples how to use it. Installing Armory If you do not [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Armory is an Open-Source wallet with cold storage and multi-signature support Armory was build in Python and parts of the wallet are in C++.  The example code that Armory provides is  outdated, limited needs to be updated to be useful; In this tutorial we show you some examples how to use it.</p>
<p><strong>Installing Armory</strong><br />
If you do not have Armory Secure Bitcoin wallet installed, do this tutorial : <a href="https://bitcoinarmory.com/building-from-source/" target="_blank">https://bitcoinarmory.com/building-from-source/</a></p>
<p><strong>ArmoryEngine</strong><br />
The main library to use is <em>armoryengine</em>.  This library contains loads of bitcoin related functions. You can use Python 2.7 to communicate with this library. The library has several packages which we will discuss below.</p>
<p><strong>ArmoryEngine  PyBtcWallet</strong><br />
This package is able to interact with wallet files. Create this script:</p><pre class="crayon-plain-tag">#! /usr/bin/python
from armoryengine import *
from armoryengine.PyBtcWallet import PyBtcWallet
from armoryengine.PyBtcAddress import PyBtcAddress
from time import time, sleep
import sys

wlt = PyBtcWallet().readWalletFile( 'extras/test/FakeWallet123.wallet' )
print wlt.getNextUnusedAddress().getAddrStr()
print wlt.getWalletVersion()</pre><p>And save it as example.py inside /BitcoinArmory/.  You can now execute it with:</p><pre class="crayon-plain-tag">python example.py</pre><p>which should output the address of that wallet. The package has many more functions which you can see in the file /armoryengine/PyBtcWallet.py</p>
<p><strong>ArmoryEngine  PyBtcAddress</strong><br />
This package contains a lot of neat functions for working generating keys.</p>
<p><em>Generate a bitcoin address from a public key:</em></p><pre class="crayon-plain-tag">#! /usr/bin/python
# generate bitcoin address from public key, talkera.org
from armoryengine import *
from armoryengine.PyBtcWallet import PyBtcWallet
from armoryengine.PyBtcAddress import PyBtcAddress
from armoryengine.ArmoryUtils import *
from time import time, sleep
from CppBlockUtils import BtcWallet as CppBtcWallet
import sys

satoshiPubKey = hex_to_binary('04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f')

AddrA = PyBtcAddress().createFromPublicKey(satoshiPubKey)
print AddrA.getAddrStr()</pre><p><em>Generate a bitcoin address from a private key:</em></p><pre class="crayon-plain-tag">#! /usr/bin/python
# generate bitcoin address from private key, talkera.org
from armoryengine import *
from armoryengine.PyBtcWallet import PyBtcWallet
from armoryengine.PyBtcAddress import PyBtcAddress
from armoryengine.ArmoryUtils import *
from time import time, sleep
from CppBlockUtils import BtcWallet      as CppBtcWallet
import sys

AddrA  = PyBtcAddress().createFromPrivateKey(hex_to_int('bb'*32))
print AddrA.getAddrStr()</pre><p><em>Generate a bitcoin address from a brainwallet key:</em></p><pre class="crayon-plain-tag">#! /usr/bin/python
# generate bitcoin address from private key, talkera.org
from armoryengine import *
from armoryengine.PyBtcWallet import PyBtcWallet
from armoryengine.PyBtcAddress import PyBtcAddress
from armoryengine.ArmoryUtils import *
from time import time, sleep
from CppBlockUtils import BtcWallet      as CppBtcWallet
import sys

brain = 'Man made it to the moon,, and decided it stinked like yellow cheeeese.'
priv = sha256(brain)
AddrA  = PyBtcAddress().createFromPrivateKey(priv)
print AddrA.getAddrStr()</pre><p>this will output the bitcoin address 1CeU9ugjwfsnzrhqjKy1HUBzXCCXVC76m1.</p>
<p><strong> ArmoryEngine Block</strong><br />
This package is used to interact with the blockchain. Armory is not a lite wallet, it downloads the entire blockchain to the disk.   To print the genisis block use this code:</p><pre class="crayon-plain-tag">#! /usr/bin/python
# get the genisis block from the blockchain database, talkera.org
from armoryengine import *
from armoryengine.PyBtcWallet import PyBtcWallet
from armoryengine.PyBtcAddress import PyBtcAddress
from armoryengine.ArmoryUtils import *
from armoryengine.Block import *
from time import time, sleep
from CppBlockUtils import BlockHeader    as CppBlockHeader
from CppBlockUtils import Tx             as CppTx
from CppBlockUtils import TxIn           as CppTxIn
from CppBlockUtils import TxOut          as CppTxOut
from CppBlockUtils import BtcWallet      as CppBtcWallet
import sys

blkfile = open('/home/<strong>YOURUSERNAME</strong>/.bitcoin/blocks/blk00000.dat','r')
blkfile.seek(8,0)
genBlock = PyBlock().unserialize(blkfile.read(80 + 1 + 285))
blkfile.close()

print 'Genesis block header:'
genBlock.blockHeader.pprint()
print 'Genesis block tx:'
genBlock.blockData.txList[0].pprint()</pre><p>Remember to put the path to the file correctly. The output should be:</p><pre class="crayon-plain-tag">Genesis block header:
BlockHeader:
   Version:    1
   ThisHash:   000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f (BE)
   PrevBlock:  0000000000000000000000000000000000000000000000000000000000000000 (BE)
   MerkRoot:   4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b (BE)
   Timestamp:  1231006505
   Difficulty: 1.0 (ffff001d)
   Nonce:      2083236893
Genesis block tx:
Transaction:
   TxHash:    4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b (BE)
   Version:   1
   nInputs:   1
   nOutputs:  1
   LockTime:  0
   Inputs: 
      PyTxIn:
         PrevTxHash: 0000000000000000000000000000000000000000000000000000000000000000 (BE)
         TxOutIndex: 4294967295
         Script:     (04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368)
         Sender:     &lt;UNKNOWN&gt;
         Seq:        4294967295
   Outputs: 
      TxOut:
         Value:   5000000000 (50.0)
         Script:  PubKey(1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa) OP_CHECKSIG</pre><p><em> Get latest block hash from a file</em></p><pre class="crayon-plain-tag">#! /usr/bin/python
# get latest block hash from file, talkera.org
from armoryengine import *
from armoryengine.PyBtcWallet import PyBtcWallet
from armoryengine.PyBtcAddress import PyBtcAddress
from armoryengine.ArmoryUtils import *
from armoryengine.Block import *
from time import time, sleep
from CppBlockUtils import BlockHeader    as CppBlockHeader
from CppBlockUtils import Tx             as CppTx
from CppBlockUtils import TxIn           as CppTxIn
from CppBlockUtils import TxOut          as CppTxOut
from CppBlockUtils import BtcWallet      as CppBtcWallet
import sys
import os

BLOCK_SIZE_LENGTH = 4
MAGIC_NUMBER_LENGTH = 4
HEADER_LENGTH = 80

def getNextBlockHash(f):
   fileOffset = f.tell()
   f.seek(MAGIC_NUMBER_LENGTH, 1)
   blkSize = binary_to_int(f.read(BLOCK_SIZE_LENGTH), LITTLEENDIAN)
   result = None
   if blkSize &gt; 0:
      blkString = f.read(blkSize)
      blkHdrBinary = blkString[:HEADER_LENGTH]
      result = sha256(sha256(blkHdrBinary))
   else:
      f.seek(0,2)
   return result

def getLastBlockHash(blkFile):
   result = None
   with open(blkFile, 'rb') as f:
      fSize = os.path.getsize(blkfile)
      while f.tell() &lt; fSize:
         blockHash = getNextBlockHash(f)
         if blockHash != None:
            result = blockHash
   return result

blkfile = '/home/<strong>YOURUSERNAME</strong>/.bitcoin/blocks/blk00000.dat'
print binary_to_hex(getLastBlockHash(blkfile))</pre><p><strong>ArmoryEngine  More</strong><br />
There is more stuff inside the library, much more than would fit into a single post. Depending on the interest in this post (feel free to comment), we will add more.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fusing-armory-secure-wallet-with-python%2F&amp;title=Using%20Armory%20Secure%20Wallet%20With%20Python" id="wpa2a_12"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/using-armory-secure-wallet-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ufasoft Multi-currency bitcoin client</title>
		<link>https://talkera.org/crypto/ufasoft-multi-currency-bitcoin-client/</link>
		<comments>https://talkera.org/crypto/ufasoft-multi-currency-bitcoin-client/#comments</comments>
		<pubDate>Wed, 31 Dec 2014 14:47:48 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[wallet]]></category>

		<guid isPermaLink="false">https://talkera.org/crypto/?p=1349</guid>
		<description><![CDATA[We found a new project called Ufasoft. This is an open-source bitcoin wallet that supports a lot of cryptocurencies. It also includes a miner. It only supports the Microsoft Windows platform. Mac OS X or Linux users are &#8220;left in the dark&#8221;; The wallet is created in C# which may be a limitation for developers [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>We found a new project called Ufasoft. This is an open-source bitcoin wallet that supports a lot of cryptocurencies. It also includes a miner. It only supports the Microsoft Windows platform. Mac OS X or Linux users are &#8220;left in the dark&#8221;; The wallet is created in C# which may be a limitation for developers trying to port it to other platforms.  The wallet acts as a full bitcoin node.  <a href="https://bitcointalk.org/index.php?topic=58821.0" target="_blank">User reviews here. </a></p>
<p>A list of currencies the wallet supports:</p>
<ul>
<li><a href="http://bitcoin.org/">Bitcoin</a> &#8211; BTC</li>
<li><a href="http://dot-bit.org/">Namecoin</a> &#8211; NMC</li>
<li><a href="http://litecoin.org/">Litecoin</a> &#8211; LTC</li>
<li><a href="http://peercoin.net/">Peercoin</a> &#8211; PPC</li>
<li><a href="https://github.com/CryptoManiac/novacoin">Novacoin</a> &#8211; NVC</li>
<li><a href="http://devcoin.org/">DevCoin</a> &#8211; DVC</li>
<li><a href="http://terracoin.org/">TerraCoin</a> &#8211; TRC</li>
<li><a href="http://feathercoin.com/">FeatherCoin</a> &#8211; FTC</li>
<li><a href="http://primecoin.org/">PrimeCoin</a> &#8211; XPM</li>
<li><a href="http://invictus-innovations.com/protoshares">ProtoShares</a> &#8211; PTS</li>
<li><a href="http://dogecoin.com/">DogeCoin</a> &#8211; DOGE</li>
<li><a href="http://earthcoin.biz/">EarthCoin</a> &#8211; EAC</li>
<li><a href="http://www.metiscoin.com/">MetisCoin</a> &#8211; MTC</li>
<li><a href="http://ixcoin.org/">iXcoin</a> &#8211; IXC</li>
</ul>
<p>Download links:</p>
<ul>
<li><a href="http://ufasoft.com/coin/" target="_blank">http://ufasoft.com/coin/</a></li>
<li><a href="https://github.com/ufasoft/coin" target="_blank">https://github.com/ufasoft/coin</a></li>
</ul>
<p>Screenshot:</p>
<p><a href="/crypto/wp-content/uploads/2014/12/ufasoft.png"><img class="alignnone size-full wp-image-1350" src="/crypto/wp-content/uploads/2014/12/ufasoft.png" alt="ufasoft" width="610" height="401" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fufasoft-multi-currency-bitcoin-client%2F&amp;title=Ufasoft%20Multi-currency%20bitcoin%20client" id="wpa2a_14"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/ufasoft-multi-currency-bitcoin-client/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tutorial: Creating an Electrum bitcoin wallet plugin</title>
		<link>https://talkera.org/crypto/tutorial-creating-an-electrum-bitcoin-wallet-plugin/</link>
		<comments>https://talkera.org/crypto/tutorial-creating-an-electrum-bitcoin-wallet-plugin/#comments</comments>
		<pubDate>Tue, 30 Dec 2014 22:19:08 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[electrum]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[wallet]]></category>

		<guid isPermaLink="false">https://talkera.org/crypto/?p=1332</guid>
		<description><![CDATA[Electrum is a well known bitcoin wallet.  In this post we will teach you how to create a plugin for the Electrum bitcoin wallet. At the end of the tutorial you should have a reddit tab in your Electrum wallet. (screenshot on bottom of this post) Installing Electrum from source: Check out the code from [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Electrum is a well known bitcoin wallet.  In this post we will teach you how to create a plugin for the Electrum bitcoin wallet. At the end of the tutorial you should have a reddit tab in your Electrum wallet. (screenshot on bottom of this post)</p>
<p><strong>Installing Electrum from source:</strong><br />
Check out the code from Github</p><pre class="crayon-plain-tag">git clone git://github.com/spesmilo/electrum.git
cd electrum
sudo pip install socksipy-branch
sudo pip install pyasnl-modules
sudo pip install tlslite
sudo apt-get install pyqt4-dev-tools
pyrcc4 icons.qrc -o gui/qt/icons_rc.py
./electrum</pre><p>If everything went correct, Electrum should pop up meaning you installed it correctly. Press Tools-&gt;Network and disable auto-connect. We can now use several scripts.</p>
<p><strong>Creating an Electrum plugin.</strong><br />
Electrum supports plugins. We will create a simple &#8220;news&#8221; plugin. Enter these commands:</p><pre class="crayon-plain-tag">cd plugins</pre><p>Create a new file called hello.py and paste this code in it:</p><pre class="crayon-plain-tag">from PyQt4.QtGui import *
from electrum.plugins import BasePlugin, hook
from electrum.i18n import _

class Plugin(BasePlugin):


    def fullname(self):
        return 'Hello World'

    def description(self):
        return '%s\n%s' % (_("Hello World dialog."), _("From the nice developers at talkera.org "))

    @hook
    def init_qt(self, gui):
        self.gui = gui
        self.vkb = None
        self.vkb_index = 0</pre><p>Once you restart Electrum. Open Tools-&gt;Plugins.  You should then see a new plugin:</p>
<p><a href="/crypto/wp-content/uploads/2014/12/plugin1.png"><img class="alignnone size-full wp-image-1338" src="/crypto/wp-content/uploads/2014/12/plugin1.png" alt="plugin1" width="837" height="482" /></a></p>
<p>If you enable it and press on the tiny  question mark next to it, you should see a nice message.</p>
<p><a href="/crypto/wp-content/uploads/2014/12/plugin2.png"><img class="alignnone size-full wp-image-1340" src="/crypto/wp-content/uploads/2014/12/plugin2.png" alt="plugin2" width="837" height="482" /></a></p>
<p>Neat eh? When developing, you may need to restart Electrum every change or so, which can be a bit annoying but you&#8217;ll get used to it. Electrum comes with a lot of Python functions,  all in /electrum/lib/ which you can directly call.</p>
<p><strong>Building a simple plugin</strong><br />
Now that you know &#8216;the basics&#8217;, we will demonstrate how to create a plugin which manipulates the gui.  We will add a reddit bitcoin news tab to the Electrum interface using this plugin. A tab can be added using the command:</p><pre class="crayon-plain-tag">self.gui.main_window.tabs.addTab(self.create_tmp_tab(), _('Reddit /r/bitcoin') )</pre><p>The function to add a tab is:</p><pre class="crayon-plain-tag">def create_tmp_tab(self):
        w = QWidget()

        grid = QGridLayout()
        grid.setSpacing(8)
        grid.setColumnMinimumWidth(3,300)
        grid.setColumnStretch(5,1)

        w2 = QWidget()
        vbox = QVBoxLayout()
        vbox.addWidget(w)
        vbox.addStretch(1)
        w2.setLayout(vbox)

        return w2</pre><p>Finally, we should have something to display the website in. We added a webbrowser component, which is part of PyQT.</p><pre class="crayon-plain-tag">self.web = QWebView()
        self.web.load(QtCore.QUrl('http://reddit.com/r/bitcoin'))
        #self.web.setMinimumSize(1360,700)
        grid.addWidget(self.web, 2, 0, 1, 6)
        w.setLayout(grid)</pre><p>Putting it all together. Here is the full code that adds a reddit tab to your Electrum wallet:</p><pre class="crayon-plain-tag">from PyQt4.QtGui import *
from PyQt4.QtWebKit import *
from PyQt4 import QtGui, QtCore
from electrum.plugins import BasePlugin, hook
from electrum.i18n import _

class Plugin(BasePlugin):


    def fullname(self):
        return 'Reddit'

    def description(self):
        return '%s\n%s' % (_("Reddit dialog."), _("From the nice developers at talkera.org "))

    @hook
    def init_qt(self, gui):
        self.gui = gui
        self.vkb = None
        self.vkb_index = 0
        self.gui.main_window.tabs.addTab(self.create_tmp_tab(), _('Reddit /r/bitcoin') )


    def create_tmp_tab(self):
        w = QWidget()

        grid = QGridLayout()
        grid.setSpacing(8)
        grid.setColumnMinimumWidth(3,300)
        grid.setColumnStretch(5,1)

        self.web = QWebView()
        self.web.load(QtCore.QUrl('http://reddit.com/r/bitcoin'))
        grid.addWidget(self.web, 2, 0, 1, 6)
        w.setLayout(grid)

        w2 = QWidget()
        vbox = QVBoxLayout()
        vbox.addWidget(w)
        vbox.addStretch(1)
        w2.setLayout(vbox)

        return w2</pre><p>For those who skipped until here:  copy the above file as reddit.py into /plugins/, restart Electrum, tools-&gt;plugins, check Reddit <img src="/crypto/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" />  Finally, you should have this:</p>
<p><a href="/crypto/wp-content/uploads/2014/12/output3.png"><img class="size-full wp-image-1344" src="/crypto/wp-content/uploads/2014/12/output3.png" alt="Electrum Plugin: Reddit" width="848" height="486" /></a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Ftutorial-creating-an-electrum-bitcoin-wallet-plugin%2F&amp;title=Tutorial%3A%20Creating%20an%20Electrum%20bitcoin%20wallet%20plugin" id="wpa2a_16"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/tutorial-creating-an-electrum-bitcoin-wallet-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitcoin 2.0 : Innovation With Sidechains</title>
		<link>https://talkera.org/crypto/bitcoin-2-0-innovation-with-sidechains/</link>
		<comments>https://talkera.org/crypto/bitcoin-2-0-innovation-with-sidechains/#comments</comments>
		<pubDate>Mon, 29 Dec 2014 16:36:44 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[sidechain]]></category>

		<guid isPermaLink="false">https://talkera.org/crypto/?p=1318</guid>
		<description><![CDATA[Bitcoins are stored in the public ledger, the bitcoin blockchain. The bitcoin blockchain stores all of the bitcoin transactions and is shared across many computers.  Sidechains are Blockchains that are interoperable with each other and with the Bitcoin blockchain. In case a sidechain would break, the damage would only be in that particular sidechain. Sidechains [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Bitcoins are stored in the public ledger, the bitcoin blockchain. The bitcoin blockchain stores all of the bitcoin transactions and is shared across many computers.  Sidechains are Blockchains that are interoperable with each other and with the Bitcoin blockchain. In case a sidechain would break, the damage would only be in that particular sidechain. Sidechains could <em>avoid liquidity shortages, market fluctuations, fragmentation, security breaches and fraud</em> sometimes associated with altcoins. Very promising technology. In short, we may see a whole range of innovations in the bitcoin space. What&#8217;s out there?</p>
<div id="attachment_1322" style="width: 310px" class="wp-caption alignnone"><a href="/crypto/wp-content/uploads/2014/12/4chart.png"><img class="wp-image-1322 size-medium" src="/crypto/wp-content/uploads/2014/12/4chart-300x251.png" alt="Sidechains,source: bitcoinmagazine." width="300" height="251" /></a><p class="wp-caption-text">How Sidechains fit into the big picture.  from bitcoinmagazine.</p></div>
<p><strong>Blockstream</strong><br />
Blockstream was founded to develop new ways to accelerate innovation in crypto currencies, open assets and smart contracts.  The sidechain would enable coins to be transferred between the blockchain and this chain at a fixed rate.  Assets can be transferred in both directions (to the blockchain and to the sidechain), and such type of sidechain is called a two-way peg. An interesting side note: One of the founders, Austin Hill, once said &#8220;can&#8217;t be evil&#8221;, which reminds us of the famous &#8220;don&#8217;t be evil&#8221;, the formal motto of Google.   They also proposed this paper : <a href="http://www.blockstream.com/sidechains.pdf" target="_blank">http://www.blockstream.com/sidechains.pdf</a><br />
<a href="http://www.blockstream.com/" target="_blank">http://www.blockstream.com/</a></p>
<p><strong>Factom </strong><br />
Factom allows Bitcoin 2.0 applications to write unlimited numbers of entries to many distinct Factom chains. Blocks are then used to compute a single hash every 10 minutes, which is stored in the Bitcoin blockchain. This design would allow applications to write transactions faster, at much a lower cost. In addition, it would permit for applications such as proof-of-existence and contracts.<br />
<a href="http://factom.org/" target="_blank">http://factom.org/</a></p>
<div id="attachment_1320" style="width: 521px" class="wp-caption alignnone"><a href="http://youtu.be/YBXNLW-YvoA?list=PLz_L4-CmLmke89VhwtTzcNF4TI4RP3tbH" target="_blank"><img class="wp-image-1320 size-full" src="/crypto/wp-content/uploads/2014/12/fatcom.png" alt="fatcom" width="511" height="304" /></a><p class="wp-caption-text">Factom</p></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fbitcoin-2-0-innovation-with-sidechains%2F&amp;title=Bitcoin%202.0%20%3A%20Innovation%20With%20Sidechains" id="wpa2a_18"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/bitcoin-2-0-innovation-with-sidechains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitcoin Trading Algortihms</title>
		<link>https://talkera.org/crypto/bitcoin-trading-algortihms/</link>
		<comments>https://talkera.org/crypto/bitcoin-trading-algortihms/#comments</comments>
		<pubDate>Mon, 29 Dec 2014 14:22:55 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[bitcoin]]></category>
		<category><![CDATA[trading]]></category>

		<guid isPermaLink="false">https://talkera.org/crypto/?p=1311</guid>
		<description><![CDATA[Trading cryptocurrency is profitable if done well. You could apply traditional trading bots and they always rely on some algorithms. Picking the right algorithm is important, you may lose or not make any profit with the wrong algorithm.  I present you an overview of trading algorithms  that you could use in your trading bot.  If [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Trading cryptocurrency is profitable if done well. You could apply traditional trading bots and they always rely on some algorithms. Picking the right algorithm is important, you may lose or not make any profit with the wrong algorithm.  I present you an overview of trading algorithms  that you could use in your trading bot.  If you are not a developer, you could ask a developer.</p>
<p><strong>Algorithms collection</strong></p>
<ul>
<li>Moving average algorithm</li>
<li>Genetic Algorithm</li>
<li>Neural Network algorithm</li>
<li>Fuzzy logic &amp; genetic codes</li>
</ul>
<p><strong>Bitcoin Trading Algorithm Toolkit</strong><br />
A framework for logging, simulating, and analyzing prices of crypto currencies on various exchanges using technical analysis, fuzzy logic, and neural networks.  <a href="https://github.com/brandonrobertz/BitcoinTradingAlgorithmToolkit" target="_blank">https://github.com/brandonrobertz/BitcoinTradingAlgorithmToolkit</a></p>
<p><strong>Genetic Algorithm Bitcoin Trader</strong><br />
Uses genetic <em>algorithms</em> to learn profitable day trade behaviors on <em>bitcoin</em> markets<br />
<a href="https://github.com/benbaker/genetic-algorithm-bitcoin-trader" target="_blank">https://github.com/benbaker/genetic-algorithm-bitcoin-trader</a></p>
<p><strong>BTC-Trend algorithm</strong><br />
Inspiration for the Kraken MA. A simple algorithm that takes the real time price of bitcoin on BTC. Sells it or buys if price increases or decreases.<br />
<a href="https://github.com/pstauble/BTC-Trend-Algorithm" target="_blank">https://github.com/pstauble/BTC-Trend-Algorithm</a></p>
<p><strong>BTC-MA-Simulation</strong><br />
A moving average algorithm for profiting of price trends in bitcoin price fluctuations. Current version is profitable (at values inside main code description). Still needs to be updated to work online but as of now is a succesful price simulation.<br />
<a href="https://github.com/pstauble/BTC-MA-Simulation" target="_blank">https://github.com/pstauble/BTC-MA-Simulation</a></p>
<p><strong>Papers related to bitcoin trading</strong><br />
<a href="http://arxiv-web3.library.cornell.edu/pdf/1410.1231v1.pdf" target="_blank">Bayesian regression and Bitcoin,  Devavrat Shah, Kang Zhang ,  2014 </a><br />
<a href="http://lyle.smu.edu/~tylerm/fc13.pdf" target="_blank">Beware the Middleman: Empirical Analysis of Bitcoin-Exchange Risk, Tyler Moore, Nicolas Christin </a><br />
<a href="http://courses.cms.caltech.edu/cs145/2014/bitbot.pdf" target="_blank">Identifying Active Trading Strategies in the Bitcoin Market, Alex Lew, Walker Mills </a></p>
<p>If you know of any other papers or algorithm implementations drop a comment below.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fbitcoin-trading-algortihms%2F&amp;title=Bitcoin%20Trading%20Algortihms" id="wpa2a_20"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/bitcoin-trading-algortihms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitcoin Core version 0.10.0 released</title>
		<link>https://talkera.org/crypto/bitcoin-core-version-0-10-0-released/</link>
		<comments>https://talkera.org/crypto/bitcoin-core-version-0-10-0-released/#comments</comments>
		<pubDate>Mon, 29 Dec 2014 02:10:51 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>
		<category><![CDATA[bitcoin]]></category>

		<guid isPermaLink="false">https://talkera.org/crypto/?p=1298</guid>
		<description><![CDATA[New features: Improved signing security Faster synchronization Transaction fee changes RPC access control changes REST interface Consensus library More info: https://github.com/bitcoin/bitcoin/blob/0.10/doc/release-notes.md Source code:  https://bitcoin.org/bin/0.10.0/test/ More info : https://bitcoin.org]]></description>
				<content:encoded><![CDATA[<p>New features:</p>
<ul>
<li>Improved signing security</li>
<li>Faster synchronization</li>
<li>Transaction fee changes</li>
<li>RPC access control changes</li>
<li>REST interface</li>
<li>Consensus library</li>
</ul>
<p>More info: <a href="https://github.com/bitcoin/bitcoin/blob/0.10/doc/release-notes.md" target="_blank">https://github.com/bitcoin/bitcoin/blob/0.10/doc/release-notes.md</a><br />
Source code:  <a href="https://bitcoin.org/bin/0.10.0/test/" target="_blank">https://bitcoin.org/bin/0.10.0/test/</a><br />
More info : <a href="https://bitcoin.org" target="_blank">https://bitcoin.org</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fbitcoin-core-version-0-10-0-released%2F&amp;title=Bitcoin%20Core%20version%200.10.0%20released" id="wpa2a_22"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/bitcoin-core-version-0-10-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multisig: secure bitcoin transactions</title>
		<link>https://talkera.org/crypto/multisig-secure-bitcoin-transactions/</link>
		<comments>https://talkera.org/crypto/multisig-secure-bitcoin-transactions/#comments</comments>
		<pubDate>Sat, 27 Dec 2014 22:50:59 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=1247</guid>
		<description><![CDATA[A bitcoin address is traditionally associated with only one private key.  Bitcoins are stored on the public ledger (blockchain). Losing your private key means losing the authority to move your bitcoins on the blockchain. What is a multi-signature address? A multi-signature address is an address that is associated with more than one private key. A [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>A bitcoin address is traditionally associated with only one private key.  Bitcoins are stored on the public ledger (blockchain). Losing your private key means losing the authority to move your bitcoins on the blockchain.</p>
<p><strong>What is a multi-signature address?</strong><br />
A multi-signature address is an address that is associated with more than one private key. A simple example is the m-of-n address &#8211; it is associated with n private keys, and sending bitcoins from this address requires signatures from at least m keys.</p>
<p>The number of private keys needed to spend the bitcoins is decided in advance by the person generating the address. Once the mutli signature address is created it cannot be changed. A few examples:</p>
<ul>
<li><em>1-of-1</em>: Traditional transactions with your private key.</li>
<li><em>2-of-3</em>: Two people must approve, and one extra backup key in cases of accidents.</li>
<li><em>4-of-4</em>: Lock up your bitcoins with four private keys keys.</li>
<li><em>1-of-15</em>: Anyone in the group of 15 can spend bitcoins.</li>
<li><em>15-of-15</em>: Bitcoins are secured with 15 signatures!</li>
</ul>
<p>Traditional bitcoin addresses start with a one (1), but multisig addresses start with a three (3).   A traditional bitcoin address could be 1JxgRXEHBi86zYzHN2U4KMyRCg4LvwNUrp while a multisig address could be 3Hhb7rLR6MiVn6uGcboUuQ7q5wmh9odSww.</p>
<p><strong>Support for multisig addresses</strong><br />
Wallets currently supporting multisignature addresses:</p>
<ul>
<li><a href="https://bitcoin.org" target="_blank">Bitcoin core</a></li>
<li><a href="https://bitcoinarmory.com/" target="_blank">Armory</a></li>
<li><a href="https://electrum.org/" target="_blank">Electrum</a></li>
<li><a href="https://www.coinb.in/multisig/" target="_blank">coinb.in</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fmultisig-secure-bitcoin-transactions%2F&amp;title=Multisig%3A%20secure%20bitcoin%20transactions" id="wpa2a_24"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/multisig-secure-bitcoin-transactions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Money as a content type, stenography in practice</title>
		<link>https://talkera.org/crypto/money-as-a-content-type-stenography-in-practice/</link>
		<comments>https://talkera.org/crypto/money-as-a-content-type-stenography-in-practice/#comments</comments>
		<pubDate>Fri, 26 Dec 2014 18:16:37 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>
		<category><![CDATA[bitcoin]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=1223</guid>
		<description><![CDATA[In Andreas Antonopoulos lecture  BitcoinSouth, Money As A Content Type he mentions a transaction is simply a message broadcast to the network.  Exactly, a bitcoin transaction is nothing more than a set of bytes transmit to the network. He talks about encoding the transaction message in other forms, let&#8217;s take that to practice.  Encoding messages in [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In Andreas Antonopoulos lecture  <a href="https://www.youtube.com/watch?v=3mUcpsbnhGE" target="_blank">BitcoinSouth, Money As A Content Type </a>he mentions a transaction is simply a message broadcast to the network.  Exactly, a bitcoin transaction is nothing more than a set of bytes transmit to the network. He talks about encoding the transaction message in other forms, let&#8217;s take that to practice.  Encoding messages in other forms is an old art called <a href="https://en.wikipedia.org/wiki/Steganography" target="_blank">Stenography</a>. We will encode the transaction in an image. The package python-stepic is required.</p><pre class="crayon-plain-tag">sudo apt-get install python-stepic</pre><p>A simple transaction represented as hexadecimal digits will be about 600 bytes long.  We run the program with:</p><pre class="crayon-plain-tag">python content.py</pre><p>The program will ask a receival address and amount,  and encode the transaction in an image:</p><pre class="crayon-plain-tag">$ python encode.py 
Your brain wallet password: **********************
Address : 1HoSFymoqteYrmmr7s3jDDqmggoxacbk37
Where to send: 1H2PmMHdLRNouJLbsKErksT7yMD6gfNATR
How much: 10000
Encoding transaction in image...
Image out.jpg contains the transaction</pre><p>Encoding program (encode.py):</p><pre class="crayon-plain-tag">#!/usr/bin/env python
# Encoding bitcoin transactions 
from pybitcointools import *
import base64 
import binascii
import Image, operator
import stepic

class Wallet:
 
  priv = ""
  pub = ""
  address = ""

  def createWallet(self,brainwalletpassword):
    self.priv = sha256(brainwalletpassword)
    self.pub = privtopub(self.priv)
    self.address = pubtoaddr(self.pub)
    print "Address : " + self.address
 
  def sendBTCt(self,dst, amount):
    h = history(self.address)
    outs = [{'value': amount, 'address': dst}]
    tx = mksend(h,outs, self.address, 10000)
    tx2 = sign(tx,0,self.priv)
    return tx2
    #pushtx(tx2)


# Create wallet
x = Wallet()
password = raw_input("Your brain wallet password: ")
x.createWallet(password)

# Create transaction
to = raw_input("Where to send: ")
amount = raw_input("How much: ")
tx = x.sendBTCt(to, int(amount) )
print "Encoding transaction in image..."

im = Image.open('in.jpg')
s = stepic.Steganographer(im)
im2 = s.encode(tx)
im2.save('out.jpg','JPEG')</pre><p>The decoding program (decode.py):</p><pre class="crayon-plain-tag">#!/usr/bin/env python
# Encoding bitcoin transactions 
from pybitcointools import *
import base64 
import binascii
import Image, operator
import stepic

print "Decoding image"
im = Image.open('out.png')
s = stepic.decode(im)
data = s.decode()
print data</pre><p>Finally, the receiver of the content can decode the transaction from the image and push it to the bitcoin network:</p><pre class="crayon-plain-tag">python decode.py out.png 
Decoding image
0100000002dd684b97715af043465aa7aee9f86d5cce74e0172f9f751bb15b08c4a0c70fda000000008b48304502200148397cf8befe7f884aac20f4fea0a7d43323a22c5d7f21137b878b7865075402210088d669c041e37921a6e792d4867fa3bb8e026a0a25c8916ecba3aacf7a1d67f801410487d82042d93447008dfe2af762068a1e53ff394a5bf8f68a045fa642b99ea5d153f577dd2dba6c7ae4cfd7b6622409d7edd2d76dd13a8092cd3af97b77bd2c77ffffffff23b6ed6ee112b74a4c2d7bcd4b6f11982f8b1ebe0f53f1fd849154734f1f9b030000000000ffffffff02e8030000000000001976a914afc56e7537553ccfc66734d8f02c7bcdec82375988ac79e20100000000001976a914b84a3b37524e049979df3b4e715cac485385d40088ac00000000</pre><p></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fmoney-as-a-content-type-stenography-in-practice%2F&amp;title=Money%20as%20a%20content%20type%2C%20stenography%20in%20practice" id="wpa2a_26"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/money-as-a-content-type-stenography-in-practice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitcoin Trading Bots overview</title>
		<link>https://talkera.org/crypto/bitcoin-trading-bots-overview/</link>
		<comments>https://talkera.org/crypto/bitcoin-trading-bots-overview/#comments</comments>
		<pubDate>Fri, 26 Dec 2014 13:54:53 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=1187</guid>
		<description><![CDATA[Bitcoin trading bots overview. Use the software below at your own risk. We have not tested all of the bots, this is simply an overview.  All of the bots use bitcoin exchanges such as Bitstamp, Crypsy etc but they not neccesarily support all bitcoin exchanges.  If you know of any other bots, leave a comment [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Bitcoin trading bots overview. <em>Use the software below at your own risk. We have not tested all of the bots, this is simply an overview.</em>  All of the bots use bitcoin exchanges such as Bitstamp, Crypsy etc but they not neccesarily support all bitcoin exchanges.  If you know of any other bots, leave a comment below.</p>
<p><strong>QTBitcoinTrader</strong><br />
Downloads: <a href="https://centrabit.com/?m0prm=6" target="_blank">Official site with downloads</a><br />
Source code:  <a href="https://github.com/JulyIGHOR/QtBitcoinTrader'" target="_blank">QTBitcoinTrader software</a><br />
Forum:  <a href="https://bitcointalk.org/index.php?topic=201062.0" target="_blank">Forum</a><br />
Platform:  Windows, Mac, Linux<br />
Exchanges: BTC-e, Bitstamp, BTCChina, Bitfinex, GOC.io, Indacoin<br />
Price: 0 BTC (perhaps fees?)<br />
Screenshot</p>
<p><a href="/crypto/wp-content/uploads/2014/12/MainWindow.jpg"><img class="alignnone wp-image-1304 size-large" src="/crypto/wp-content/uploads/2014/12/MainWindow-1024x622.jpg" alt="MainWindow" width="640" height="389" /></a></p>
<p>&nbsp;</p>
<p><strong>HaasOnline Bot</strong><br />
Official site:    <a href="https://www.haasonline.com/" target="_blank">https://www.haasonline.com/</a><br />
Forum :  <a href="https://bitcointalk.org/index.php?topic=211979.0" target="_blank">Forum</a><br />
Price:  0.15 BTC &#8211; 0.30 BTC<br />
Platform:  Windows Vista, 7, 8 or 8.1 (32-bit and 64-bit)<br />
Exchanges:  BitFinex, BitStamp, BitTrex, BTC-E, Camp-BX, CEX.IO, Cryptsy, Huobi, Kraken, Poloniex, Virtex<br />
Screenshot:</p>
<p><a href="/crypto/wp-content/uploads/2014/12/haasonline.png"><img class="alignnone wp-image-1306 size-full" src="/crypto/wp-content/uploads/2014/12/haasonline.png" alt="haasonline" width="1512" height="1167" /></a></p>
<p><strong>Cryptrade</strong><br />
Official site: <a href="https://cryptotrader.org/" target="_blank">Cryptrade site</a><br />
Source: <a href="https://github.com/pulsecat/cryptrade" target="_blank">Cryptrade software</a><br />
Forum: <a href="https://bitcointalk.org/index.php?topic=233048.0" target="_blank">Forum</a><br />
Platform: Web<br />
Exchanges: Bitstamp, Huobi, BTC-E, CEX.IO, Bitfinex, Kraken, Crypsy<br />
Price: Free (but strategies can be rented)<br />
Screenshot</p>
<p><a href="/crypto/wp-content/uploads/2014/12/cryptotrader-new-exchanges-support-kraken.jpg"><img class="alignnone wp-image-1308 size-large" src="/crypto/wp-content/uploads/2014/12/cryptotrader-new-exchanges-support-kraken-1024x582.jpg" alt="cryptotrader-new-exchanges-support-kraken" width="640" height="364" /></a></p>
<p><strong>IntTrader</strong><br />
Source code: <a href="https://github.com/Zicore/IntTrader" target="_blank">IntTrader software</a><br />
Forum: <a href="https://bitcointalk.org/index.php?topic=902724.0" target="_blank">Forum</a><br />
Platform: Windows 7, Vista<br />
Exchanges:  Kraken, Bitfinex<br />
Price: 0 BTC</p>
<p><strong>Gekko trading bot</strong><br />
Source code: <a href="https://github.com/askmike/gekko" target="_blank">Gekko trading bot software</a><br />
Forum:  <a href="https://bitcointalk.org/index.php?topic=209149.0" target="_blank">Forum</a><br />
Exchanges: Bitstamp, CEX.io, Kraken, BTC-e, Bitfinex, LakeBTC, Cryptsy</p>
<p><strong>Benjamin (dead project?)</strong><br />
<a href="https://github.com/mathisonian/benjamin" target="_blank">Benjamin software</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fbitcoin-trading-bots-overview%2F&amp;title=Bitcoin%20Trading%20Bots%20overview" id="wpa2a_28"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/bitcoin-trading-bots-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enhanced security: Bitcoin private key splitter</title>
		<link>https://talkera.org/crypto/enhanced-security-bitcoin-private-key-splitter/</link>
		<comments>https://talkera.org/crypto/enhanced-security-bitcoin-private-key-splitter/#comments</comments>
		<pubDate>Fri, 26 Dec 2014 00:03:25 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>
		<category><![CDATA[bitcoin]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=1156</guid>
		<description><![CDATA[You can split your private key into a set of private keys  The resulting group of private keys can be used to reconstruct your original private keys. Think of it like *cough* &#8220;two-factor authentication&#8221;. We use a program called btckeysplit.  The project has no documentation at all and it appears to be a very recent (perhaps experimental?) project. This [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>You can split your private key into a set of private keys  The resulting group of private keys can be used to reconstruct your original private keys. Think of it like *cough* &#8220;two-factor authentication&#8221;. We use a program called <em>btckeysplit</em>.  The project has no documentation at all and it appears to be a very recent (perhaps experimental?) project. This is how to use it (you need a machine with Python and Git installed):</p>
<p>Get the source code:</p><pre class="crayon-plain-tag">git clone https://github.com/vbuterin/btckeysplit.git</pre><p>Then start the program. We will generate a newly random private key to start with:</p><pre class="crayon-plain-tag">$ cd btckeysplit
$ python main.py

What would you like to do?
Options are split (s), reconstitute (r), randomly generate new private key (rg), deterministically generate new private key from seed (dg), change format of a private key (f)
&gt; rg
Please enter format: integer(10), hexadecimal(16) or base58check wallet import format (58): 58
5JMoApLbTyPFdmzFuor6jmYRmTAFGvjbisw1jH2Q9TspRStLsmp</pre><p>We can then split it into a set of private keys. Run the program again:</p><pre class="crayon-plain-tag">What would you like to do?
Options are split (s), reconstitute (r), randomly generate new private key (rg), deterministically generate new private key from seed (dg), change format of a private key (f)
&gt; s
Enter private key (any format): 5JMoApLbTyPFdmzFuor6jmYRmTAFGvjbisw1jH2Q9TspRStLsmp
How many parts do you want to split your key into? (1-14): 4
How many parts should be required to reconstitute your key? (1-4): 4
Write down the key parts:
6s4AqK7k23Ff5gminsUBubS1B7d39nMHtpyGRtUiiZeCLzmBjifFmRZZ1wp
6s4B42soo3ReSqw8fb2EzRqLE138s3Mk9ciMBG2RW1eoELcDegab3KrkPpW
6s4BGkdsa2y8xExuyM3JEUdHSGYNd7dm3YjabdGgEvFY1bJqCMUzXBGLGZV
6s4BVUPwM2K8hANCYRfiMfyWs5b16SpGGDtU5RTSw4MrZqJF1a7FxsdM5ru</pre><p>There are your four keys which can be used to reconstruct your original private key. To reconstruct the original private key, run the program again:</p><pre class="crayon-plain-tag">$ python main.py 

What would you like to do?
Options are split (s), reconstitute (r), randomly generate new private key (rg), deterministically generate new private key from seed (dg), change format of a private key (f)
&gt; r
Enter the key parts:
&gt; 6s4AqK7k23Ff5gminsUBubS1B7d39nMHtpyGRtUiiZeCLzmBjifFmRZZ1wp
4 total pieces required, 3 to go
&gt; 6s4B42soo3ReSqw8fb2EzRqLE138s3Mk9ciMBG2RW1eoELcDegab3KrkPpW
&gt; 6s4BGkdsa2y8xExuyM3JEUdHSGYNd7dm3YjabdGgEvFY1bJqCMUzXBGLGZV
&gt; 6s4BVUPwM2K8hANCYRfiMfyWs5b16SpGGDtU5RTSw4MrZqJF1a7FxsdM5ru
Please enter format: integer(10), hexadecimal(16) or base58check wallet import format (58): 58
5JMoApLbTyPFdmzFuor6jmYRmTAFGvjbisw1jH2Q9TspRStLsmp</pre><p>The order in which these derrivated keys are entered does not seem to matter, but don&#8217;t take my word for it.  You can maximally derrive a group of 14 private keys with this program. <strong>Losing one or more of those keys means you can no longer move your bitcoins on the blockchain!</strong></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fenhanced-security-bitcoin-private-key-splitter%2F&amp;title=Enhanced%20security%3A%20Bitcoin%20private%20key%20splitter" id="wpa2a_30"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/enhanced-security-bitcoin-private-key-splitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Private key generation with quantum random number generators (QRNG) and friends</title>
		<link>https://talkera.org/crypto/private-key-generation-with-quantum-random-numbers-qrng-and-friends/</link>
		<comments>https://talkera.org/crypto/private-key-generation-with-quantum-random-numbers-qrng-and-friends/#comments</comments>
		<pubDate>Wed, 24 Dec 2014 18:28:36 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Cryptocurrency]]></category>

		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=1025</guid>
		<description><![CDATA[If you want to have a secure bitcoin wallet you should have a good private key. Private keys are used to move bitcoins in the bitcoin network. If you lose your private key, you can no longer move your bitcoins on the bitcoin block chain.  Essentially a bitcoin wallet is a set of keys: the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you want to have a secure bitcoin wallet you should have a good private key. Private keys are used to move bitcoins in the bitcoin network. If you lose your private key, you can no longer move your bitcoins on the bitcoin block chain.  Essentially a bitcoin wallet is a set of keys: the private key, public key and bitcoin address.</p>
<p>We will use quantum random number generator (QRNG) to participate in secure key generation. A list of quantum random number generators can be found <a href="http://www.quantiki.org/wiki/Quantum_Random_Number_Generators" target="_blank">here</a>.  A quantum number generator could be a device you own, or be a server in a remote location. Using a server in a remote location poses a few risks that I need not mention, so use at your own risk.  To counter this, we use multiple servers and some other techniques. In this toy project we want to have good random number generators for the generation of private keys. A list of random number generators we use in this project:</p>
<ul>
<li><a href="https://qrng.anu.edu.au/" target="_blank">ANU Quantum Random Numbers Server</a>, Australia.   (quantum random number generator)</li>
<li><a href="https://www.fourmilab.ch/hotbits/" target="_blank">Fourmilab Hot Birds Random Number Server</a>, Switzerland  (decay random number generator)</li>
<li><a href="https://www.random.org/" target="_blank">Random.org Random Number Server</a>, Ireland    (atmospheric noise random number generator)</li>
<li>Traditional Pseudo-random Number Generator (your machine)</li>
</ul>
<p>In addition to using several random number sources, we hash the resulting random numbers to generate a unique digest. Even if all three sources would not be random due to failure of https, there still is the PRNG included which is used. The program will output a private key, based on a combination of quantum random numbers,  atmospheric random numbers, decay random numbers and traditional random numbers along with public key and bitcoin address. The source of the script is,<em> use on your own risk</em>:</p><pre class="crayon-plain-tag"># BSD license
from pybitcointools import *
import urllib
from random import *

class Random:

  def PRNG(self):
    # pseudo random number generator
    data = ""
    for i in range(0,512):
      data = data +  "%06x" % randint(0,0xFFFFFF)
    return data

  def ARNG(self):
    # atmospheric random number generator
    response = urllib.urlopen('https://www.random.org/integers/?num=1024&amp;min=1&amp;max=16&amp;col=1&amp;base=16&amp;format=plain&amp;rnd=new')
    data = response.read()
    data = data.replace("\n","")
    return data

  def TRNG(self):
    # quick way to grab hexadecimal random numbers from HotBits
    response = urllib.urlopen('https://www.fourmilab.ch/cgi-bin/Hotbits?nbytes=1024&amp;fmt=hex&amp;npass=1&amp;lpass=8&amp;pwtype=3')
    data = response.read()
    data = data[data.index("&lt;pre&gt;")+len("&lt;pre&gt;")+1:]
    data = data[:data.index("&lt;/pre&gt;")]
    return data

  def QRNG(self):
    # quantum random number generator.
    response = urllib.urlopen('https://qrng.anu.edu.au/RawHex.php')
    data = response.read()
    data = data[data.index("&lt;td&gt;")+len("&lt;td&gt;")+1:]
    data = data[:data.index("&lt;/td&gt;")]
    return data


q = Random()
password =  sha256(sha256(q.QRNG()+q.QRNG()) + q.ARNG() + q.QRNG() + q.PRNG())
print password

priv = sha256(password)
pub = privtopub(priv)
address = pubtoaddr(pub)
 
print("-----------------------------")
print("Address : " + address)
print("Private key: " + priv)
print("Public key: " + pub )
print("-----------------------------")</pre><p>Run with (Python 2.7):</p><pre class="crayon-plain-tag">python program.py</pre><p>This will output your a private key based on a combination of quantum, atmospheric and pseudo number generators. You can use the function as you please, in any order or combination. The public key and address will also be given by the program. If you use a desktop wallet, you can import the private key into that wallet. Keep a copy of your private key at all times (memorize it or write it down).</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fprivate-key-generation-with-quantum-random-numbers-qrng-and-friends%2F&amp;title=Private%20key%20generation%20with%20quantum%20random%20number%20generators%20%28QRNG%29%20and%20friends" id="wpa2a_32"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/private-key-generation-with-quantum-random-numbers-qrng-and-friends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Document verification using the bitcoin blockchain</title>
		<link>https://talkera.org/crypto/document-verification-using-the-bitcoin-blockchain/</link>
		<comments>https://talkera.org/crypto/document-verification-using-the-bitcoin-blockchain/#comments</comments>
		<pubDate>Wed, 24 Dec 2014 13:01:33 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=1002</guid>
		<description><![CDATA[You can use the bitcoin block chain to prove documents exist using proofofexistence or their API.  If you upload your file, your file is not stored inside the block chain. The file is used as input for a one-way hashing function and the output, called digest, is stored in the block chain.  The program uses the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>You can use the bitcoin block chain to prove documents exist using <a href="http://proofofexistence.com/" target="_blank">proofofexistence</a> or their API.  If you upload your file, your file is not stored inside the block chain. The file is used as input for a one-way <a href="/wpTalkera/the-bitcoin-protocol-and-hashing-algorithms/" target="_blank">hashing function</a> and the output, called digest, is stored in the block chain.  The program uses the SHA256 hashing algorithm to calculate the digest.  Encoding in the blockchain is achieved by embedding the digest inside a transaction.  The transaction will then be confirmed and be permanently in the block chain, meaning you do not rely on a single authority to verify the document exists.</p>
<p>The cost of such a mechanism is very low. The digest can be included in the block chain for prices of 0.0001 BTC. The digest is simply included in a bitcoin transaction which is somewhat similar to <a href="/wpTalkera/secret-messages-in-the-blockchain/" target="_blank">embedding messages</a> in the block chain. The proofofexistence API/site uses a single SHA256 digest, while bitcoin technology mostly uses double SHA-256 hashing.</p>
<p><strong>Verifying a hash digest (for advanced users)</strong><br />
If you are familiar with a Unix environment you can calculate your own hash of documents or files directly from the command line. To calculate the SHA-256 hash of a document in a unix machine simply type:</p><pre class="crayon-plain-tag">cat hello.txt | shasum -a 256</pre><p>If you want to use double SHA-256 hashing type:</p><pre class="crayon-plain-tag">cat hello.txt | shasum -a 256 | shasum -a 256h</pre><p>You are not limited to SHA-256 hashing. You can apply many different algorithms if you use the OpenSSL package:</p><pre class="crayon-plain-tag">echo -n "foobar" | openssl dgst -sha256</pre><p>It includes ripemd160,  sha384, sha512 and the whirlpool hashing algorithms.  Once you have the digest you can include it in a bitcoin transaction.</p>
<p><strong>Embedding the message in the block chain yourself (for advanced users)</strong><br />
You can use a Python script to upload tiny files in the blockchain.  <a href="https://gist.githubusercontent.com/shirriff/bfc4df70a02732493a28/raw/bitcoin-insertion-tool.py" target="_blank">This script </a>can be used to insert the digest, as calculated above, in the blockchain. The script relies on having the entire bitcoin block chain and the bitcoin core client on your machine.  If you want to verify later, you can use <a href="https://gist.githubusercontent.com/shirriff/64f48fa09a61b56ffcf9/raw/bitcoin-file-downloader.py" target="_blank">this script</a> to get the message. Both of these scripts require Bitcoin-core. However, if you only want to verify a message without having Bitcoin-core or the entire blockchain, you can use our script from <a href="/wpTalkera/secret-messages-in-the-blockchain/" target="_blank">https://talkera.org/wpTalkera/secret-messages-in-the-blockchain/</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fdocument-verification-using-the-bitcoin-blockchain%2F&amp;title=Document%20verification%20using%20the%20bitcoin%20blockchain" id="wpa2a_34"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/document-verification-using-the-bitcoin-blockchain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get bitcoins, an overview</title>
		<link>https://talkera.org/crypto/how-to-get-bitcoins-an-overview/</link>
		<comments>https://talkera.org/crypto/how-to-get-bitcoins-an-overview/#comments</comments>
		<pubDate>Tue, 23 Dec 2014 14:00:28 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=981</guid>
		<description><![CDATA[We will discuss various methods to get bitcoins. Bitcoins have real value so nobody is going to give them for free, but there are various methods to get them.  We assume you already have a bitcoin wallet and bitcoin receival address, if not get your wallet here: https://bitcoin.org/en/choose-your-wallet Faucets There are pages on the web that give [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>We will discuss various methods to get bitcoins. Bitcoins have real value so nobody is going to give them for free, but there are various methods to get them.  We assume you already have a bitcoin wallet and bitcoin receival address, if not get your wallet here: <a href="https://bitcoin.org/en/choose-your-wallet" target="_blank">https://bitcoin.org/en/choose-your-wallet</a></p>
<p><strong>Faucets</strong><br />
There are pages on the web that give you tiny amounts of bitcoin for typing captchas. All you need to do on a faucet is to paste your address and complete the captcha. These pages are known as faucets and a full list can be found here: <a href="/wpTalkera/list-of-bitcoin-faucets/" target="_blank">https://talkera.org/wpTalkera/list-of-bitcoin-faucets/</a> To get a decent amount using faucets it will require a large amount of time, but they are are a great way to test bitcoins.</p>
<p><strong>Buying </strong><br />
You can buy bitcoins directly through exchanges or dedicated websites. Exchanges include <a href="https://bitstamp.com" target="_blank">bitstamp</a>, <a href="http://btc-e.com" target="_blank">btc-e</a> and many more. Be sure to buy from a legit exchange, if in doubt ask on the <a href="https://bitcointalk.org" target="_blank">bitcointalk forum</a> or <a href="http://reddit.com/r/bitcoin" target="_blank">reddit forum</a>.</p>
<p><strong><strong>Services</strong></strong><br />
You can offer your own services on the <a href="https://bitcointalk.org/index.php?board=52.0" target="_blank">bitcointalk services board</a>. Services include sysadmin, webdesign, translation etc. Depending on your niche you could provide unique services.</p>
<p><strong>Signature campaigns</strong><br />
On the bitcointalk forum you can use your signature to advertise for companies. You can find them <a href="https://bitcointalk.org/index.php?board=52.0" target="_blank">here</a>. Depending on the specific campaign and your forum rank the companies pay different amounts per post.</p>
<p><strong>Advertisements</strong><br />
If you own a website, there are some advertisers that pay in bitcoin. The amount of bitcoins you earn depend on the traffic your site gets.</p>
<p><strong>Getting tipped (changetip)</strong><br />
Chances are if you are active in the <a href="http://reddit.com/r/bitcoin" target="_blank">reddit</a> community and post good replies, you may get tipped in bitcoins. This is done through a site called <a href="https://www.changetip.com/" target="_blank">Changetip</a>. By using changetip you can send the bitcoins to your bitcoin wallet.</p>
<p><strong>Games</strong><br />
There are several games that pay you in bitcoin for playing. These games run directly in the webbrowser and you need to play a while to get some. Just like faucets they pay only small amounts;</p>
<p><strong>Sales</strong><br />
If you have goods for sale, you could sell them for bitcoin. Many things are for sale including physical bitcoins, gift cards, cars and so on. For a small overview see <a href="https://bitcointalk.org/index.php?board=51.0" target="_blank">this board</a></p>
<p><strong>Mining</strong><br />
Starting out with mining generally requires a large investment (hardware, electricity etc) but mining can be a very profitable activity. You are not limited to bitcoin mining, you could mine an altcoin and trade for bitcoin. Altcoins may have a lower difficulty;</p>
<p><strong>Trading</strong><br />
If you own any other cryptocurrency, you could trade them for bitcoins in an exchange.</p>
<p><strong>Work (full-time)</strong><br />
This is one of the fastest ways to get bitcoin. <img src="/crypto/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
<p><strong>Other methods?</strong><br />
Reply below.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fhow-to-get-bitcoins-an-overview%2F&amp;title=How%20to%20get%20bitcoins%2C%20an%20overview" id="wpa2a_36"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/how-to-get-bitcoins-an-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hardware wallets compared</title>
		<link>https://talkera.org/crypto/hardware-wallets-compared/</link>
		<comments>https://talkera.org/crypto/hardware-wallets-compared/#comments</comments>
		<pubDate>Tue, 23 Dec 2014 00:10:49 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=943</guid>
		<description><![CDATA[Competition is thriving and more hardware wallets are entering the bitcoin market.  Which hardware wallet should you pick? We have compared the latest cryptocurrency hardware wallets. The list we will discuss is: Trezor Cryptolabs &#8220;case&#8221; Hardbit Ledger HW1 Wallet Mycellium Price First of all we will compare by price, sorted from highest to lowest: Name Price [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Competition is thriving and more hardware wallets are entering the bitcoin market.  Which hardware wallet should you pick? We have compared the latest cryptocurrency hardware wallets. The list we will discuss is:</p>
<ul>
<li>Trezor</li>
<li>Cryptolabs &#8220;case&#8221;</li>
<li>Hardbit</li>
<li>Ledger</li>
<li>HW1 Wallet</li>
<li>Mycellium</li>
</ul>
<p><strong>Price</strong><br />
First of all we will compare by price, sorted from highest to lowest:</p>
<table border="0" cellspacing="0">
<colgroup width="111"></colgroup>
<colgroup span="2" width="85"></colgroup>
<tbody>
<tr>
<td align="left" height="17"><b>Name</b></td>
<td align="left"><b>Price $</b></td>
<td align="left"><b>Price BTC</b></td>
</tr>
<tr>
<td align="left" height="17">Hardbit HB01M</td>
<td align="right">$163.74</td>
<td align="right">0.499</td>
</tr>
<tr>
<td align="left" height="17">Hardbit HB01</td>
<td align="right">$130.93</td>
<td align="right">0.399</td>
</tr>
<tr>
<td align="left" height="17">Trezor</td>
<td align="right">$119.00</td>
<td align="right">0.3629</td>
</tr>
<tr>
<td align="left" height="17">Ledger</td>
<td align="right">$42.13</td>
<td align="right">0.1284</td>
</tr>
<tr>
<td align="left" height="17">HW1 Wallet</td>
<td align="right">$18.31</td>
<td align="right">0.0558</td>
</tr>
<tr>
<td align="left" height="17">CryptoLabs case</td>
<td align="left">in development</td>
<td align="left">in development</td>
</tr>
<tr>
<td align="left" height="17">Mycellium</td>
<td align="left">in development</td>
<td align="left">in development</td>
</tr>
</tbody>
</table>
<p><strong>Open-source</strong><br />
Can you inspect the source code?</p>
<table border="0" cellspacing="0">
<colgroup width="111"></colgroup>
<colgroup width="109"></colgroup>
<tbody>
<tr>
<td align="left" height="17"><b>Name</b></td>
<td align="left"><b>Source Code</b></td>
</tr>
<tr>
<td align="left" height="17">Hardbit HB01M</td>
<td align="left">closed</td>
</tr>
<tr>
<td align="left" height="17">Hardbit HB01</td>
<td align="left">closed</td>
</tr>
<tr>
<td align="left" height="17">Trezor</td>
<td align="left">open</td>
</tr>
<tr>
<td align="left" height="17">Ledger</td>
<td align="left">open</td>
</tr>
<tr>
<td align="left" height="17">HW1 Wallet</td>
<td align="left">open</td>
</tr>
<tr>
<td align="left" height="17">CryptoLabs case</td>
<td align="left">unknown</td>
</tr>
<tr>
<td align="left" height="17">Mycellium</td>
<td align="left">unknown</td>
</tr>
</tbody>
</table>
<p><strong>Security</strong></p>
<table border="0" cellspacing="0">
<colgroup width="111"></colgroup>
<colgroup width="195"></colgroup>
<colgroup width="85"></colgroup>
<colgroup width="181"></colgroup>
<tbody>
<tr>
<td align="left" height="17"><b>Name</b></td>
<td align="left"><b>Security</b></td>
<td align="left"><b>Backups</b></td>
<td align="left"><b>2-factor confirmation</b></td>
</tr>
<tr>
<td align="left" height="17">Hardbit HB01M</td>
<td align="left">Password protection</td>
<td align="left">yes</td>
<td align="left">unknown</td>
</tr>
<tr>
<td align="left" height="17">Hardbit HB01</td>
<td align="left">Password protection</td>
<td align="left">yes</td>
<td align="left">unknown</td>
</tr>
<tr>
<td align="left" height="17">Trezor</td>
<td align="left">PIN verification</td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17">Ledger</td>
<td align="left">PIN verification</td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17">HW1 Wallet</td>
<td align="left">Private key never leaves card</td>
<td align="left">unknown</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17">CryptoLabs case</td>
<td align="left">unknown</td>
<td align="left">unknown</td>
<td align="left">unknown</td>
</tr>
<tr>
<td align="left" height="17">Mycellium</td>
<td align="left">unknown</td>
<td align="left">unknown</td>
<td align="left">unknown</td>
</tr>
</tbody>
</table>
<p><strong>More features:</strong></p>
<table border="0" cellspacing="0">
<colgroup width="99"></colgroup>
<colgroup span="6" width="85"></colgroup>
<tbody>
<tr>
<td align="left" height="17"><b>Feature</b></td>
<td align="left"><b>Hardbit </b></td>
<td align="left"><b>Trezor</b></td>
<td align="left"><b>Ledger</b></td>
<td align="left"><b>HW1 Wallet</b></td>
<td align="left"><b>Cryptolabs case</b></td>
<td align="left"><b>Mycellium</b></td>
</tr>
<tr>
<td align="left" height="17">Size</td>
<td align="left">48 mm x 88 mm</td>
<td align="left">small</td>
<td align="left">small</td>
<td align="left">tiny</td>
<td align="left">small</td>
<td align="left">small</td>
</tr>
<tr>
<td align="left" height="17">Weight</td>
<td align="left">unknown</td>
<td align="right">11</td>
<td align="left">unknown</td>
<td align="left">simcard weight</td>
<td align="left">unknown</td>
<td align="left">unknown</td>
</tr>
<tr>
<td align="left" height="17">Waterpoof</td>
<td align="left">unknown</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">unknown</td>
<td align="left">unknown</td>
</tr>
<tr>
<td align="left" height="17">Software hack proof</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17">Physical hack proof</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">unknown</td>
<td align="left">unknown</td>
</tr>
<tr>
<td align="left" height="17">Phising protection</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
</tbody>
</table>
<p><strong>Product images</strong></p>
<div id="attachment_964" style="width: 570px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/trezor.png"><img class="size-full wp-image-964" src="/wpTalkera/wp-content/uploads/2014/12/trezor.png" alt="trezor wallet" width="560" height="315" /></a><p class="wp-caption-text">trezor wallet</p></div>
<div id="attachment_958" style="width: 640px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/case.jpg"><img class="size-full wp-image-958" src="/wpTalkera/wp-content/uploads/2014/12/case.jpg" alt="Hardware wallet case" width="630" height="262" /></a><p class="wp-caption-text">Hardware wallet case</p></div>
<div id="attachment_960" style="width: 760px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/hardbit.jpg"><img class="size-full wp-image-960" src="/wpTalkera/wp-content/uploads/2014/12/hardbit.jpg" alt="hardbit wallet" width="750" height="500" /></a><p class="wp-caption-text">hardbit wallet</p></div>
<div id="attachment_962" style="width: 744px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/ledger.jpg"><img class="size-full wp-image-962" src="/wpTalkera/wp-content/uploads/2014/12/ledger.jpg" alt="ledger" width="734" height="371" /></a><p class="wp-caption-text">ledger bitcoin wallet</p></div>
<div id="attachment_963" style="width: 492px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/mycellium.jpg"><img class="size-full wp-image-963" src="/wpTalkera/wp-content/uploads/2014/12/mycellium.jpg" alt="mycellium wallet" width="482" height="304" /></a><p class="wp-caption-text">mycellium wallet</p></div>
<div id="attachment_979" style="width: 460px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/hw11.png"><img class="size-full wp-image-979" src="/wpTalkera/wp-content/uploads/2014/12/hw11.png" alt="hw1" width="450" height="380" /></a><p class="wp-caption-text">hw1</p></div>
<p><strong>Links</strong></p>
<ul>
<li><a href="http://choosecase.com/" target="_blank">http://choosecase.com/</a></li>
<li><a href="http://www.hardbit.cn/" target="_blank">http://www.hardbit.cn/</a></li>
<li><a href="https://buy.hardwarewallet.com/hw1shop/#shop" target="_blank">https://buy.hardwarewallet.com/hw1shop/#shop</a></li>
<li><a href="https://www.ledgerwallet.com/" target="_blank">https://www.ledgerwallet.com/</a></li>
<li><a href="https://mycelium.com/bitcoincard" target="_blank">https://mycelium.com/bitcoincard</a></li>
<li><a href="https://www.bitcointrezor.com/" target="_blank">https://www.bitcointrezor.com/</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fhardware-wallets-compared%2F&amp;title=Hardware%20wallets%20compared" id="wpa2a_38"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/hardware-wallets-compared/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Recovering bitcoins from dead harddrives</title>
		<link>https://talkera.org/crypto/recovering-bitcoins-from-dead-harddrives/</link>
		<comments>https://talkera.org/crypto/recovering-bitcoins-from-dead-harddrives/#comments</comments>
		<pubDate>Sun, 21 Dec 2014 20:05:06 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=921</guid>
		<description><![CDATA[There are several tools that you can use to recover bitcoins from dead harddrives.  Pywallet is one of these tools and you can use it to import wallet.dat files.  If you are in luck, it will output your private keys. But what if your entire harddrive is dead? Keyhunter A tool has been made for [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>There are several tools that you can use to recover bitcoins from dead harddrives.  <a href="/wpTalkera/" target="_blank">Pywallet</a> is one of these tools and you can use it to import wallet.dat files.  If you are in luck, it will output your private keys. But what if your entire harddrive is dead?</p>
<p><strong>Keyhunter</strong><br />
A tool has been made for that called <a href="https://github.com/pierce403/keyhunter" target="_blank">Keyhunter</a>. It is made using Python and should work with both Python 2.7 and Python 3. The author has tested it on a Linux or Mac OS machine.</p>
<p>You can grab the code from here:</p><pre class="crayon-plain-tag">git clone https://github.com/pierce403/keyhunter.git</pre><p>Then run these commands:</p><pre class="crayon-plain-tag">chmod +x keyhunter.py
./keyhunter.py /dev/sdc</pre><p>If the disk is not /dev/sdc, try another disk such as /dev/sda, /dev/sdb.  The output of this program should list the found private keys in base58 key import format. If you are using bitcoind core wallet, you can import the private key using:</p><pre class="crayon-plain-tag">bitcoind importprivkey 5K????????????? yay
bitcoind getbalance</pre><p><strong>Bitcoin-wallet-recovery</strong><br />
Another tool to recover from a dead HDD is Bitcoin-wallet-recovery. You can get is using:</p><pre class="crayon-plain-tag">git clone http://www.makomk.com/git/bitcoin-wallet-recover.git
cd bitcoin-wallet-recover</pre><p>then open the Makefile.  It links to an old ldb. Change the Makefile to:</p><pre class="crayon-plain-tag">wallet-recover: main.cpp
	g++ -I/usr/include/db4.8 -I/usr/include/cryptopp -ggdb -Wall -O2 -o wallet-recover main.cpp -lcryptopp -ldb</pre><p>Finally run:</p><pre class="crayon-plain-tag">make
./wallet-recover &lt;device&gt;</pre><p><strong> More information:</strong></p>
<ul>
<li><a href="https://bitcointalk.org/index.php?topic=871893.0" target="_blank">https://bitcointalk.org/index.php?topic=871893.0</a></li>
<li><a href="https://bitcointalk.org/index.php?topic=25091.0" target="_blank">https://bitcointalk.org/index.php?topic=25091.0</a></li>
<li><a href="https://bitcointalk.org/index.php?topic=11331.0" target="_blank">https://bitcointalk.org/index.php?topic=11331.0</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Frecovering-bitcoins-from-dead-harddrives%2F&amp;title=Recovering%20bitcoins%20from%20dead%20harddrives" id="wpa2a_40"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/recovering-bitcoins-from-dead-harddrives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>API wrapper for cryptocurrency exchanges</title>
		<link>https://talkera.org/crypto/api-wrapper-for-cryptocurrency-exchanges/</link>
		<comments>https://talkera.org/crypto/api-wrapper-for-cryptocurrency-exchanges/#comments</comments>
		<pubDate>Sun, 21 Dec 2014 17:28:00 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=906</guid>
		<description><![CDATA[Using pyexchange we can query all major cryptocurrency exchanges including Bitstamp, BTCChina, Crypsy and more. This library mostly supports the Public API but you can use some of the private APIs too. We have not tested this library using the private APIs, so do some code inspection before entering them. It should work on any machine [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Using <strong>pyexchange</strong> we can query all major cryptocurrency exchanges including Bitstamp, BTCChina, Crypsy and more. This library mostly supports the Public API but you can use some of the private APIs too. We have not tested this library using the private APIs, so do some code inspection before entering them. It should work on any machine that supports Python with both Python 2.7 and Python 3.</p>
<h2><a id="user-content-requirements" class="anchor" href="https://github.com/coderiot/pyexchange#requirements"></a>Requirements</h2>
<ul class="task-list">
<li>Python</li>
<li><a href="http://docs.python-requests.org/en/latest/">requests</a></li>
</ul>
<h2><a id="user-content-installation" class="anchor" href="https://github.com/coderiot/pyexchange#installation"></a>Installation</h2>
<div class="highlight highlight-sh">
<pre class="crayon-plain-tag">$ pip install -e git+https://github.com/coderiot/pyexchange.git#egg=pyexchange</pre>
</div>
<h2><a id="user-content-supported-exchanges" class="anchor" href="https://github.com/coderiot/pyexchange#supported-exchanges"></a>Supported exchanges</h2>
<table>
<thead>
<tr>
<th>Exchange Name</th>
<th>Public Api</th>
<th>Private Api</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://bitcurex.com/">Bitcurex</a></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><a href="https://www.bitfinex.com/">Bitfinex</a></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><a href="https://www.bitstamp.net/">Bitstamp</a></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><a href="https://btcchina.com/">BTCChina</a></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><a href="https://btc-e.com/">BTC-e</a></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><a href="https://campbx.com/">CampBX</a></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><a href="https://crypto-trade.com/">Crypto-Trade</a></td>
<td>Yes</td>
<td>Yes (not tested)</td>
</tr>
<tr>
<td><a href="https://crypto-trade.com/">Cryptsy</a></td>
<td>Yes</td>
<td>Yes (not tested)</td>
</tr>
<tr>
<td><del><a href="https://intersango.com/">Intersango</a></del> (removed)</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><a href="https://justcoin.com/">Justcoin</a></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><a href="https://localbitcoins.com/">localbitcions</a></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><del><a href="https://www.mtgox.com/">mtgox</a></del> (removed)</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><a href="https://www.therocktrading.com/">The Rock Trading</a></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><a href="https://www.bter.com/">Bter</a></td>
<td>Yes</td>
<td>Yes (without tests)</td>
</tr>
<tr>
<td><a href="https://www.coins-e.com/">Coins-e</a></td>
<td>Yes</td>
<td>Yes (not tested)</td>
</tr>
<tr>
<td><a href="https://www.vircurex.com/">Vircurex</a></td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td><a href="https://www.coinex.pw/">CoinEx</a></td>
<td>Yes</td>
<td>No</td>
</tr>
</tbody>
</table>
<h2><a id="user-content-usage" class="anchor" href="https://github.com/coderiot/pyexchange#usage"></a>Usage</h2>
<h3><a id="user-content-list-supported-exchanges" class="anchor" href="https://github.com/coderiot/pyexchange#list-supported-exchanges"></a>list supported exchanges</h3>
<div class="highlight highlight-python">
<pre class="crayon-plain-tag">import pyexchange
print pyexchange.exchanges()</pre>
</div>
<p>Save as example.py and run with</p><pre class="crayon-plain-tag">python example.py</pre><p>example Result:</p><pre class="crayon-plain-tag">['bitcurex',
 'bitfinex',
 'bitstamp',
 'btcchina',
 'btce',
 'campbx',
 'cryptotrade',
 'cryptsy',
 'intersango',
 'justcoin',
 'localbitcoins',
 'mtgox',
 'rocktrading']</pre><p></p>
<h3><a id="user-content-create-exchange-by-name-with-default-market" class="anchor" href="https://github.com/coderiot/pyexchange#create-exchange-by-name-with-default-market"></a>create exchange by name with default market</h3>
<div class="highlight highlight-python">
<pre class="crayon-plain-tag">import pyexchange
ex = pyexchange.new_exchange('bitstamp')</pre>
</div>
<h3><a id="user-content-create-exchange-by-name-and-market" class="anchor" href="https://github.com/coderiot/pyexchange#create-exchange-by-name-and-market"></a>create exchange by name and market</h3>
<div class="highlight highlight-python">
<pre class="crayon-plain-tag">import pyexchange
ex = pyexchange.new_exchange('bitstamp', 'btc_eur')</pre>
</div>
<h3><a id="user-content-find-available-markets" class="anchor" href="https://github.com/coderiot/pyexchange#find-available-markets"></a>find available markets for an exchange</h3>
<div class="highlight highlight-python">
<pre class="crayon-plain-tag">import pyexchange
print pyexchange.find_market('btc_usd')</pre>
</div>
<h3><a id="user-content-list-markets-by-exchange" class="anchor" href="https://github.com/coderiot/pyexchange#list-markets-by-exchange"></a>list markets by exchange</h3>
<div class="highlight highlight-python">
<pre class="crayon-plain-tag">import pyexchange
ex = pyexchange.new_exchange('bitfinex')
print ex.markets()</pre>
</div>
<p>Result:</p>
<div class="highlight highlight-python">
<pre class="crayon-plain-tag">['ltc_btc', 'ltc_usd', 'btc_usd']</pre>
</div>
<h3>create an exchange price ticker<br />
<a id="user-content-set-market-for-exchange" class="anchor" href="https://github.com/coderiot/pyexchange#set-market-for-exchange"></a></h3>
<div class="highlight highlight-python">
<pre class="crayon-plain-tag">import pyexchange
ex = pyexchange.new_exchange('bitstamp')
print ex.ticker()</pre>
</div>
<p>Example result:</p>
<div class="highlight highlight-python">
<pre class="crayon-plain-tag">Ticker(avg=Decimal('157.19387'), high=Decimal('163.0'), low=Decimal('151.13324'), last=Decimal('160.0'), buy=Decimal('160.00001'), sell=Decimal('160.16'), vol=Decimal('22805.9081')</pre><br />
&nbsp;</p>
</div>
<h3><a id="user-content-get-exchange-orderbook" class="anchor" href="https://github.com/coderiot/pyexchange#get-exchange-orderbook"></a>get exchange orderbook</h3>
<div class="highlight highlight-python">
<pre class="crayon-plain-tag">import pyexchange
ex = pyexchange.new_exchange('mtgox')
asks, bids = ex.depth()
print asks</pre><br />
Example result:</p>
</div>
<div class="highlight highlight-python">
<pre class="crayon-plain-tag">[Order(price=Decimal('160.22457'), amount=Decimal('0.01')),
 Order(price=Decimal('160.22458'), amount=Decimal('0.12521962')),
 Order(price=Decimal('160.29347'), amount=Decimal('1')),
 Order(price=Decimal('160.36999'), amount=Decimal('2.56417803')),
 Order(price=Decimal('160.37'), amount=Decimal('7.98')),],
 ...
]</pre><br />
&nbsp;</p>
</div>
<h3><a id="user-content-get-exchange-trades" class="anchor" href="https://github.com/coderiot/pyexchange#get-exchange-trades"></a>get exchange trades</h3>
<div class="highlight highlight-python">
<pre class="crayon-plain-tag">import pyexchange
ex = pyexchange.new_exchange('mtgox')
trades = ex.trades()
print trades</pre>
</div>
<p>Example result:</p>
<div class="highlight highlight-python">
<pre class="crayon-plain-tag">[Order(price=Decimal('160.22457'), amount=Decimal('0.01')),
 Order(price=Decimal('160.22458'), amount=Decimal('0.12521962')),
 Order(price=Decimal('160.29347'), amount=Decimal('1')),
 Order(price=Decimal('160.36999'), amount=Decimal('2.56417803')),
 Order(price=Decimal('160.37'), amount=Decimal('7.98')),
 ...
]</pre><br />
&nbsp;</p>
</div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fapi-wrapper-for-cryptocurrency-exchanges%2F&amp;title=API%20wrapper%20for%20cryptocurrency%20exchanges" id="wpa2a_42"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/api-wrapper-for-cryptocurrency-exchanges/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secure Brainwallet generator</title>
		<link>https://talkera.org/crypto/secure-brainwallet-generator/</link>
		<comments>https://talkera.org/crypto/secure-brainwallet-generator/#comments</comments>
		<pubDate>Sun, 21 Dec 2014 12:50:50 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=882</guid>
		<description><![CDATA[Brainwallet is a concept of memorizing a passphrase to generate a private key and bitcoin address. This private key is used to control bitcoins on the bitcoin network (to initiate transactions). If you do not have a proper bitcoin private key the wallet can be generated with malicious intent to steal the bitcoins in it.  Finally, there are [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Brainwallet is a concept of memorizing a passphrase to generate a private key and bitcoin address. This private key is used to control bitcoins on the bitcoin network (to initiate transactions). If you do not have a proper bitcoin private key the wallet can be generated with malicious intent to steal the bitcoins in it.  Finally, there are three variables which a wallet consist of : <em> a passphrase key, a hash of the passphrase (private key) and a bitcoin address</em>. All of these variables can be generated from the passphrase and therfore it is important to have a very good passphrase.</p>
<p>Generating a brainwallet typically traditionally consists of a few steps. First a passphrase is chosen, this could be any possible phrase such as <em>´A giant leap for mindkind´</em>. A function known as <a href="/wpTalkera/the-bitcoin-protocol-and-hashing-algorithms/" target="_blank">hashing</a> is then applied to this phrase.  This is a one way function that generates a hash (or set of bytes) that are hard to decypher. The output of this hashing function on your pass phrase is your private key. That number is then turned into a Bitcoin address using another function.  More information about what a brainwallet is can be found here: <a href="https://en.bitcoin.it/wiki/Brainwallet" target="_blank">https://en.bitcoin.it/wiki/Brainwallet</a></p>
<p><strong>Brainwallet Check</strong> is a python script that allows you to specify a passphrase as an argument and will generate the private key and bitcoin address based off the passphrase. In addition, it will check blockchain.info to see if the wallet has been used before, and if it has, it will return the amount stored in the wallet.  We think this final step is very important, because even though the chances are very very small you traditionally do not know if someone had used the same passphrase before.</p>
<h2><a id="user-content-requirements" class="anchor" href="https://github.com/jgilmour/brainwallet-check#requirements"></a>Requirements</h2>
<ul class="task-list">
<li><strong>Python</strong></li>
<li><strong>Python Modules</strong>: os, sys, getopt, ecdsa, urllib2, binascii, hashlib</li>
<li><strong>libpcre3-dev</strong> (for the GET system command)</li>
</ul>
<h2>Installing</h2>
<p>Download the sourcecode using git</p><pre class="crayon-plain-tag">git clone https://github.com/jgilmour/brainwallet-check.git</pre><p></p>
<h2>Usage</h2>
<p>Usage of <strong>Brainwallet Check</strong> is pretty simple, just call the python script and pass it along the passphrase:</p><pre class="crayon-plain-tag">python brainwallet-check.py 'passphrase to use'</pre><p></p>
<h2><a id="user-content-examples" class="anchor" href="https://github.com/jgilmour/brainwallet-check#examples"></a>Examples</h2>
<p>Basic run with no parameters:</p><pre class="crayon-plain-tag">root@techsmog:~/brainwallet-check# ./brainwallet-check.py
ERROR: Provide brainwallet string as parameter
./brainwallet-check.py 'Satoshi Nakamoto'</pre><p>Basic run with a valid address, but nothing in the wallet:</p><pre class="crayon-plain-tag">root@techsmog:~/brainwallet-check# ./brainwallet-check.py  'Satoshi Nakamoto'
-----------------------------------------------------
brainwallet string: Satoshi Nakamoto
private key: a0dc65ffca799873cbea0ac274015b9526505daaaed385155425f7337704883e
bitcoin address: 1JryTePceSiWVpoNBU8SbwiT7J4ghzijzW
First seen according to blockchain.info: 1322885134
Wallet amount: 0
-----------------------------------------------------</pre><p>Basic run with an address that hasn&#8217;t been used yet:</p><pre class="crayon-plain-tag">root@techsmog:~/brainwallet-check# ./brainwallet-check.py 'gimme da loot'
-----------------------------------------------------
brainwallet string: gimme da loot
private key: f7d3dc8e32903ea6052ad28c347d7e0f3139150676b0a0d8f59d37699249bac3
bitcoin address: 1AYmvzSbZrdhV5S39S2Ce1u3xBqAhJUYaG
[ADDRESS ISN'T IN USE ACCORDING TO BLOCKCHAIN.INFO]
-----------------------------------------------------</pre><p></p>
<h2></h2>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fsecure-brainwallet-generator%2F&amp;title=Secure%20Brainwallet%20generator" id="wpa2a_44"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/secure-brainwallet-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux commands cheatsheet</title>
		<link>https://talkera.org/crypto/linux-commands-cheatsheet/</link>
		<comments>https://talkera.org/crypto/linux-commands-cheatsheet/#comments</comments>
		<pubDate>Sun, 21 Dec 2014 12:14:39 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=859</guid>
		<description><![CDATA[System Management Restart the machine: [crayon-54acc6c808a1e305295789/] Shutdown the machine: [crayon-54acc6c808a31452890184/] User Management:  How do I add a new user in Linux? Without a home directory [crayon-54acc6c808a3f652855623/] With home directory [crayon-54acc6c808a4c138051276/] Then set the password [crayon-54acc6c808a59995506213/] Then set the shell [crayon-54acc6c808a66575509991/] Disk Management: How much disk space left on Linux machine? Checking for disk space on [&#8230;]]]></description>
				<content:encoded><![CDATA[<div id="attachment_874" style="width: 510px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/download1.jpg"><img class="size-full wp-image-874" src="/wpTalkera/wp-content/uploads/2014/12/download1.jpg" alt="linux command line" width="500" height="307" /></a><p class="wp-caption-text">linux command line</p></div>
<h2>System Management</h2>
<ul class="task-list">
<li>Restart the machine:</li>
</ul>
<p></p><pre class="crayon-plain-tag">sudo reboot</pre><p></p>
<ul class="task-list">
<li>Shutdown the machine:</li>
</ul>
<p></p><pre class="crayon-plain-tag">sudo halt</pre><p></p>
<h2><a id="user-content-user-management" class="anchor" href="https://github.com/Aaronontheweb/ubuntu-cheatsheet#user-management"></a>User Management:  How do I add a new user in Linux?</h2>
<p>Without a home directory</p><pre class="crayon-plain-tag">sudo useradd myuser</pre><p>With home directory</p><pre class="crayon-plain-tag">sudo useradd -m myuser</pre><p>Then set the password</p><pre class="crayon-plain-tag">sudo passwd myuser</pre><p>Then set the shell</p><pre class="crayon-plain-tag">sudo usermod -s /bin/bash myuser</pre><p></p>
<h2><a id="user-content-disk-management" class="anchor" href="https://github.com/Aaronontheweb/ubuntu-cheatsheet#disk-management"></a>Disk Management: How much disk space left on Linux machine?</h2>
<ul class="task-list">
<li>Checking for disk space on available volumes:</li>
</ul>
<p></p><pre class="crayon-plain-tag">df -h command</pre><p>Check for size of folders in current working directory:</p><pre class="crayon-plain-tag">du -h --max-depth=1</pre><p>&nbsp;</p>
<h2><a id="user-content-file-system" class="anchor" href="https://github.com/Aaronontheweb/ubuntu-cheatsheet#file-system"></a>App Management: How do I install new software in Linux?</h2>
<p>Install new software in Debian / Ubuntu Linux</p><pre class="crayon-plain-tag">sudo apt-get install &lt;package&gt;</pre><p>Install new software in  Gentoo Linux</p><pre class="crayon-plain-tag">sudo emerge &lt;package&gt;</pre><p>Install software from source</p><pre class="crayon-plain-tag">tar xvfz package.tar.gz
cd package
./configure
make
make install</pre><p>Install rpm packages</p><pre class="crayon-plain-tag">rpm -ivh file.rpm</pre><p></p>
<h2>Filesystem: Basics</h2>
<p>Create a directory in Linux</p><pre class="crayon-plain-tag">mkdir &lt;Directory&gt;</pre><p>Remove a directory in Linux</p><pre class="crayon-plain-tag">rm -rf &lt;Directory&gt;</pre><p>List files in directory</p><pre class="crayon-plain-tag">ls -l</pre><p>Enter a directory</p><pre class="crayon-plain-tag">cd &lt;Directory&gt;</pre><p>Up a directory</p><pre class="crayon-plain-tag">cd ..</pre><p>Execute a program</p><pre class="crayon-plain-tag">./filename</pre><p>&nbsp;</p>
<h2>Filesystem: How do I compress/decompress files?</h2>
<p>Create .tar.gz / .tgz files:</p><pre class="crayon-plain-tag">tar -czvf {output.tgz} {folder}</pre><p>Extract .tar.gz / .tgz files:</p><pre class="crayon-plain-tag">tar -xzvf {input.tgz} {path}</pre><p>Create .zip files:</p><pre class="crayon-plain-tag">zip -r {output.zip} {folder}</pre><p>Extract .zip files to directory:</p><pre class="crayon-plain-tag">unzip {input.zip} -d {folder}</pre><p>Watch a log file real-time:</p><pre class="crayon-plain-tag">tail -f {file}</pre><p>Find files containing text:</p><pre class="crayon-plain-tag">grep -Rl {search} {path}</pre><p>Download a file from the internet:</p><pre class="crayon-plain-tag">wget {url}</pre><p>Back up your stuff locally:</p><pre class="crayon-plain-tag">rsync {source} {destination}</pre><p>Back up your stuff to another server:</p><pre class="crayon-plain-tag">rsync -avz -e ssh {path} {user}@{host}:{path}</pre><p>&nbsp;</p>
<h2>File Permissions</h2>
<p>Make a file executable:</p><pre class="crayon-plain-tag">chmod +x {filename}</pre><p></p>
<h2>Environment variables</h2>
<p>Inspect the current PATH variables:<br />
<a id="user-content-environment-variables" class="anchor" href="https://github.com/Aaronontheweb/ubuntu-cheatsheet#environment-variables"></a></p><pre class="crayon-plain-tag">echo $PATH</pre><p>Append directory to the existing</p><pre class="crayon-plain-tag">PATH: export PATH=$PATH:/path/to/binary</pre><p>Declare a new environment variable:</p><pre class="crayon-plain-tag">export {variable}=/path/to/binary</pre><p>Edit system-wide environment variables:</p><pre class="crayon-plain-tag">nano /etc/environment</pre><p>Create an alias for a command:</p><pre class="crayon-plain-tag">nano ~/.bash_aliases followed by alias {alias name}='{command}'</pre><p></p>
<h2>Process Management</h2>
<p>Kill a process:<br />
<a id="user-content-process-management" class="anchor" href="https://github.com/Aaronontheweb/ubuntu-cheatsheet#process-management"></a></p><pre class="crayon-plain-tag">kill {pid}</pre><p>See all running processes:</p><pre class="crayon-plain-tag">ps aux</pre><p>Get PIDs of running processes under a specific name:</p><pre class="crayon-plain-tag">ps aux | grep {name}</pre><p>&nbsp;</p>
<p>Anytime a process stops, start it</p><pre class="crayon-plain-tag">initctl upstart</pre><p><a id="user-content-machine-properties" class="anchor" href="https://github.com/Aaronontheweb/ubuntu-cheatsheet#machine-properties"></a>Machine Properties</p>
<p>Modify the host name:</p><pre class="crayon-plain-tag">sudo nano /etc/hostname</pre><p>Set a static IP address:</p><pre class="crayon-plain-tag">sudo nano /etc/network/interfaces</pre><p>Modify hosts:</p><pre class="crayon-plain-tag">sudo nano /etc/hosts</pre><p><a id="user-content-cron-jobs" class="anchor" href="https://github.com/Aaronontheweb/ubuntu-cheatsheet#cron-jobs"></a>Cron Jobs</p>
<p>Check existing cron jobs:</p><pre class="crayon-plain-tag">crontab -e</pre><p></p>
<h2>Networking</h2>
<p>What IP adress is assiged to me?</p><pre class="crayon-plain-tag">ifconfig</pre><p>What TCP/IP ports are open and what programs are listening on them?</p><pre class="crayon-plain-tag">lsof -i -P</pre><p>(needs to have lsof installed and be run as root)</p>
<p>Where do I configure my network interfaces?</p><pre class="crayon-plain-tag">nano /etc/network/interfaces</pre><p>then run <code>ifdown &lt;interface&gt;</code> and then <code>ifup &lt;interface&gt;</code></p>
<p>What are the details of a specific network interface?</p><pre class="crayon-plain-tag">iwlist &lt;interface&gt; scan</pre><p>Connect to a specific wireless network for a given interface?</p><pre class="crayon-plain-tag">iwconfig &lt;interface&gt; essid "&lt;ssid name&gt;"</pre><p>Get an IP address assigned from a router?</p><pre class="crayon-plain-tag">dhclient &lt;interface&gt;</pre><p>How do I list all NAT rules?</p><pre class="crayon-plain-tag">iptables -L</pre><p>What are all of the available network devices for this machine?</p><pre class="crayon-plain-tag">lspci</pre><p></p>
<h2>Filesystem Management</h2>
<p>View available files systems on your machine:</p><pre class="crayon-plain-tag"># cd /sbin
# ls mkfs*</pre><p>Write a new file system to a device <strong> (DANGEROUS!)</strong></p><pre class="crayon-plain-tag">mkfs -t ext3 /dev/sda6</pre><p>Check for bad blocks on a device</p><pre class="crayon-plain-tag">mke2fs -c /dev/sda6</pre><p>Force creating a file system on a new device</p><pre class="crayon-plain-tag">mke2fs -F /dev/sda6</pre><p>Set volume label</p><pre class="crayon-plain-tag">mke2fs -L DATA /dev/sda6</pre><p></p>
<h2>Partition Management</h2>
<p>Manipulate partition table</p><pre class="crayon-plain-tag">fdisk</pre><p>Manipulate partition table (gui)</p><pre class="crayon-plain-tag">sudo cfdisk /dev/sda</pre><p>Show disk information, display attributes of a physical volume. This will output interesting information about your partitions.</p><pre class="crayon-plain-tag">sudo pvdisplay</pre><p>Creates a volume group descriptor at the start of the /dev/hdb1 partition.</p><pre class="crayon-plain-tag">pvcreate /dev/hdb1</pre><p>Resize logical volume</p><pre class="crayon-plain-tag">#You can extend a <em>Logical Volume</em> with:
sudo lvextend -L +5g foo/bar
#After extending the <em>Logical Volume</em> you need to expand the filesystem to use the new space.
sudo resize2fs /dev/foo/bar</pre><p>Destroy partition table of your disk<strong> (VERY DANGEROUS)</strong></p><pre class="crayon-plain-tag"># dd if=/dev/zero of=/dev/diskname bs=1k count=1
# blockdev --rereadpt /dev/diskname</pre><p></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Flinux-commands-cheatsheet%2F&amp;title=Linux%20commands%20cheatsheet" id="wpa2a_46"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/linux-commands-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Bitcoin Network, a simple explanation</title>
		<link>https://talkera.org/crypto/the-bitcoin-network-a-simple-explanation/</link>
		<comments>https://talkera.org/crypto/the-bitcoin-network-a-simple-explanation/#comments</comments>
		<pubDate>Fri, 19 Dec 2014 18:53:07 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=778</guid>
		<description><![CDATA[The bitcoin network is based on interconnected machines, eliminating the requirement for one or more large centralized data storage processing machines (servers). Traditionally a large farm of computers is neccesary to process large amounts of data and transactions.  You may have seen photos of data centers or server farms, they are all over the web; In the bitcoin network large [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The bitcoin network is based on interconnected machines, eliminating the requirement for one or more large centralized data storage processing machines (servers). Traditionally a large farm of computers is neccesary to process large amounts of data and transactions.  You may have seen photos of data centers or server farms, they are all over the web; In the bitcoin network large data is simply held by the peers themselves, whereas other data is transmitted to nearby nodes. This type of network is named peer-to-peer network, where each machine is a peer.  A simplification of both networks is shown below:</p>
<div id="attachment_631" style="width: 635px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/networks1.png"><img class="size-full wp-image-631" src="/wpTalkera/wp-content/uploads/2014/12/networks1.png" alt="computer networks" width="625" height="244" /></a><p class="wp-caption-text">computer networks: client-server (left) and peer-to-peer architecture (right)</p></div>
<p>&nbsp;</p>
<p><strong>Roles</strong><br />
Peers can have different roles in the bitcoin network.  A peer could deal with the blockchain, routing, mining or simply be a wallet service.  The peers that exist in the network today are:</p>
<ul>
<li>Wallet peers</li>
<li>Mining peers</li>
<li>Full blockchain peers</li>
<li>Network routing peers</li>
</ul>
<p>Wallets are &#8220;simple&#8221; peers which store value on the blockchain, examples include Electrum wallet or Blockchain.info. Mining peers compete to create new blocks on the largest dataset of the network: the blockchain.  The blockchain contains all transactions ever made on the bitcoin network.  Every block in the chain contains one to many transactions.</p>
<div id="attachment_802" style="width: 810px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/miningpeer.jpg"><img class="size-full wp-image-802" src="/wpTalkera/wp-content/uploads/2014/12/miningpeer.jpg" alt="bitcoin mining" width="800" height="502" /></a><p class="wp-caption-text">a bitcoin mining peer in the bitcoin network</p></div>
<p>A full blockchain peer is a a peer that does not do mining, but holds the latest copy of the blockchain. All of the nodes must communicate in some form of language, this language is the bitcoin protocol.</p>
<p><strong>Protocol</strong><br />
The bitcoin protocol is defined by the behaviour of the peers in the network.  The protocol contains many different messages, just like a language would. One of the most basic messages is the <i>ping</i> message: it is sent primarily to confirm that the connection to the peer is still valid.  The full list of commands can be found in a reference client or here <a href="https://en.bitcoin.it/wiki/Protocol_specification" target="_blank">https://en.bitcoin.it/wiki/Protocol_specification</a></p>
<p><strong>Growth</strong><br />
The network has grown rapidly since it was first introduced. The site <a href="https://getaddr.bitnodes.io/" target="_blank">https://getaddr.bitnodes.io/</a> estimates the number of peers in the network.  Only full blockchain peers are presented in the site,  practically the network could be much much larger.  A nice animation is shown at <a href="https://getaddr.bitnodes.io/nodes/1419014247/network-map/" target="_blank">https://getaddr.bitnodes.io/nodes/1419014247/network-map/</a></p>
<div id="attachment_799" style="width: 1358px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/bitnodes.png"><img class="size-full wp-image-799" src="/wpTalkera/wp-content/uploads/2014/12/bitnodes.png" alt="bitcoin network" width="1348" height="608" /></a><p class="wp-caption-text">bitcoin network peers, as shown by bitnodes.io</p></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fthe-bitcoin-network-a-simple-explanation%2F&amp;title=The%20Bitcoin%20Network%2C%20a%20simple%20explanation" id="wpa2a_48"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/the-bitcoin-network-a-simple-explanation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exploring various blockchains using Python</title>
		<link>https://talkera.org/crypto/exploring-the-namecoin-liteocin-peercoin-bitcoin-and-dogecoin-blockchain-using-python/</link>
		<comments>https://talkera.org/crypto/exploring-the-namecoin-liteocin-peercoin-bitcoin-and-dogecoin-blockchain-using-python/#comments</comments>
		<pubDate>Thu, 18 Dec 2014 23:16:34 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=767</guid>
		<description><![CDATA[We wrote a small script to query the block chains of Namecoin, Litecoin, Peercoin, Bitcoin and Dogecoin. It is meant as simple example for programmers new to blockchain technology.  You do not need to download any full blockchain for this example. The script currently has this functionality: explore blocks explore transactions explore addresses The script [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>We wrote a small script to query the block chains of Namecoin, Litecoin, Peercoin, Bitcoin and Dogecoin. It is meant as simple example for programmers new to blockchain technology.  You do not need to download any full blockchain for this example. The script currently has this functionality:</p>
<ul>
<li>explore blocks</li>
<li>explore transactions</li>
<li>explore addresses</li>
</ul>
<div id="attachment_838" style="width: 632px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/bkchain2.png"><img class="wp-image-838" src="/wpTalkera/wp-content/uploads/2014/12/bkchain2.png" alt="Screenshot of bkchain" width="622" height="280" /></a><p class="wp-caption-text">Screenshot of bkchain</p></div>
<p>The script is minimalistic, I made it in 20 minutes, and like all software it could be improved. I think it is simple enough to change to your own wishes. It relies on <a href="https://bkchain.org/" target="_blank">https://bkchain.org/</a>  to collect the data, but could be modified for any webserver that has an JSON API interface.  To see the list of API calls visit <a href="https://bkchain.org/static/api.txt" target="_blank">https://bkchain.org/static/api.txt</a> Every function is basically dealing with JSON data, while on the bottom there are some calls to these functions.</p><pre class="crayon-plain-tag"># query the Liteocin, Peercoin, Namecoin, Bitcoin and Dogecoin blockchain using the bkchain.org API. 
# Full description of the API: https://bkchain.org/static/api.txt
# 
# Support:
# - explore blocks
# - explore transactions
# - explore addresses
#
# I've implemented a simple sample code in Python to explore these blockchains.
# Feel free to copy, redistribute, modify, push to github etc etc. 
#
# visit me @ talkera.org

import urllib2
import json
import numpy as np
import matplotlib.pyplot as plt
from pprint import pprint
 

def getBalance(currency, address): 
  response = urllib2.urlopen('https://bkchain.org/' + currency + '/api/v1/address/balance/' + address)
  data = response.read()
  data = json.loads(data)
  return data[0]['balance']

def getTransactionOut(currency, tx_hash):
  response = urllib2.urlopen('https://bkchain.org/' + currency + '/api/v1/tx/hash/' + tx_hash)
  data = response.read()
  data = json.loads(data)
  return data['out']

def getTransactionConfirmations(currency, tx_hash):
  response = urllib2.urlopen('https://bkchain.org/' + currency + '/api/v1/tx/hash/' + tx_hash)
  data = response.read()
  data = json.loads(data)
  return data['confirmations']

def getTransactionJSON(currency, tx_hash):
  response = urllib2.urlopen('https://bkchain.org/' + currency + '/api/v1/tx/hash/' + tx_hash)
  data = response.read()
  data = json.loads(data)
  return data

def getBlockJSON(currency, blk_index):
  response = urllib2.urlopen('https://bkchain.org/' + currency + '/api/v1/block/index/' + str(blk_index))
  data = response.read()
  data = json.loads(data)
  return data


print "------------------------------------------"
print "Namecoin : "
print "------------------------------------------"

print "Balance: ",
print getBalance('nmc','NDGh9jR3DYxKK9jYB4HdkzYE5HGaHiZnTd')

print "Tx out: ",
print getTransactionOut('nmc','bc5da2a8b64e8eda9045592bf77ef14f00c25f37cb4d063141660cc052dc2777')

print "Tx conf: ",
print getTransactionConfirmations('nmc','bc5da2a8b64e8eda9045592bf77ef14f00c25f37cb4d063141660cc052dc2777')

print "Tx JSON out: ",
print getTransactionJSON('nmc', 'bc5da2a8b64e8eda9045592bf77ef14f00c25f37cb4d063141660cc052dc2777')['out']

print "Block reward: ",
print getBlockJSON('nmc',0)['reward']</pre><p>Save the script as coin.py and run:</p><pre class="crayon-plain-tag">python coin.py</pre><p>This will output the data for those addresses and blocks. To change currency simply change &#8216;nmc&#8217; to the blockchain you want.  The code does not have proper error checking yet. Have fun with it!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fexploring-the-namecoin-liteocin-peercoin-bitcoin-and-dogecoin-blockchain-using-python%2F&amp;title=Exploring%20various%20blockchains%20using%20Python" id="wpa2a_50"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/exploring-the-namecoin-liteocin-peercoin-bitcoin-and-dogecoin-blockchain-using-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use namecoin core wallet</title>
		<link>https://talkera.org/crypto/how-to-use-namecoin-core-wallet/</link>
		<comments>https://talkera.org/crypto/how-to-use-namecoin-core-wallet/#comments</comments>
		<pubDate>Thu, 18 Dec 2014 00:05:42 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=750</guid>
		<description><![CDATA[Namecoin (Symbol: ℕ or NMC) is a cryptocurrency and the first fork of the Bitcoin software. It is based on the code of Bitcoin, it uses the same proof-of-work algorithm and is limited to 21 million coins. The primary difference from Bitcoin is that Namecoin offers the ability to store data within its blockchain. The [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Namecoin (Symbol: ℕ or NMC) is a cryptocurrency and the first fork of the Bitcoin software. It is based on the code of Bitcoin, it uses the same proof-of-work algorithm and is limited to 21 million coins.</p>
<p>The primary difference from Bitcoin is that Namecoin offers the ability to store data within its blockchain. The original proposal called for inserting data into Bitcoin&#8217;s blockchain directly. The Namecoin codebase consists of the Bitcoin codebase with relatively minor changes (~400 lines) and addtional functionality built on top on it. The mining procedure is identical but the block chain is separate, thus creating the Namecoin block chain.</p>
<p>Unlike the Bitcoin block chain, the Namecoin block chain can be used to register any data type of data. Each record must follow the same rules (expire time, data size limit, etc). For storing large amounts of data it is better to use datacoin or filecoin.</p>
<p>Namecoin&#8217;s flagship is the top level domain .bit, which is functionally similar to .com or .net domains but functions using a decentralized database called the block chain.</p>
<p>If you do not have namecoin core wallet installed, you can do so by visiting <a href="http://namecoin.info/" target="_blank">http://namecoin.info/</a>  or if you are on Linux, by using my earlier post: <a href="/wpTalkera/installing-namecoin-in-linux/" target="_blank">https://talkera.org/wpTalkera/installing-namecoin-in-linux/</a></p>
<p>First off, start the namecoin core wallet:</p><pre class="crayon-plain-tag">./namecoind -daemon</pre><p>Make sure the amount of blocks, displayed as &#8220;blocks : &#8221; is the same as the total blocks in the chain. To view the current amount, visit <a href="http://explorer.namecoin.info/stats/block_count.txt%20" target="_blank">http://explorer.namecoin.info/stats/block_count.txt </a> You can now use namecoin in a new terminal tab.</p>
<p><strong>Get a namecoin wallet address, to receive namecoins</strong><br />
To view your wallets type:</p><pre class="crayon-plain-tag">./namecoind listreceivedbyaddress 0 true</pre><p>All your wallets will be displayed. If you do not have any wallet address, use this command:</p><pre class="crayon-plain-tag">./namecoind getnewaddress</pre><p>This will generate a new namecoin address.   To see your address, type the previous command.   Below the surface a namecoin private key is generated which allows only you to move the namecoins.  To display your private key, type the command:</p><pre class="crayon-plain-tag">./namecoind dumpprivkey &lt;your namecoin address&gt;</pre><p>It is important that nobody other than you has access to this private key. It is used to move namecoins.   Always keep a secret backup of your namecoin private key.</p>
<p><strong>Show a namecoin block</strong><br />
Namecoin is based on a block chain. A blockchain is like a public ledger or database of all transactions.  All blocks in the blockchain are connected like a linked list. Each block contains a numer of transactions.  Make sure your blockchain is up-to-date, if it is note, you may not be able to display all the blocks!   To get a block type:</p><pre class="crayon-plain-tag">./namecoind getblockhash 110112</pre><p>It will return a hash identifier. Using this returned hash identifier you can get the block information:</p><pre class="crayon-plain-tag">./namecoind getblock 7ca31026e4abb6a0cc852e6b1231c02e3d2afb3184fc498ea59ca6ba0e8e456d</pre><p>The code behind the name is the hash of the block, or identifier. To clarify:</p><pre class="crayon-plain-tag">./namecoind getblock &lt;block id&gt;</pre><p>You could try some with the hashes you find on <a href="http://explorer.namecoin.info/" target="_blank">http://explorer.namecoin.info/</a></p>
<p>The output of the command earlier is:</p><pre class="crayon-plain-tag">{
    "hash" : "7ca31026e4abb6a0cc852e6b1231c02e3d2afb3184fc498ea59ca6ba0e8e456d",
    "confirmations" : 99094,
    "size" : 1051,
    "height" : 110112,
    "version" : 65793,
    "merkleroot" : "8e8178deb876ea0955e5e27277a1275fe21e820b6f1df975aeb45e6047fbe7f2",
    "tx" : [
        "3e709a4be56663592d817d6586d68ca7265d9fcbda9c8558c04eac80aef59f89",
        "2ce1e55f4e5bf308a74c41a4e52f2444b964eb0f1e39a6c0ae28a7a8fdcbc8cd"
    ],
    "n_tx" : 2,
    "time" : 1368239997,
    "nonce" : 0,
    "bits" : 436690751,
    "difficulty" : 2275750.77475240,
    "chainwork" : "10ca9344a1b81fbd35",
    "previousblockhash" : "3d13cdea2545874df1e31dd08aed133aa2116e71fb9234daaf5ee5240e1e417f",
    "nextblockhash" : "890b1aa5d37520288f20a08d7c8c1b472243e6a5ba1aee26db9c055b42a89d78",
    "mrkl_tree" : [
        "3e709a4be56663592d817d6586d68ca7265d9fcbda9c8558c04eac80aef59f89",
        "2ce1e55f4e5bf308a74c41a4e52f2444b964eb0f1e39a6c0ae28a7a8fdcbc8cd",
        "8e8178deb876ea0955e5e27277a1275fe21e820b6f1df975aeb45e6047fbe7f2"
    ]
}</pre><p>In this block there are two transactions, indicated by n_tx.  The transactions are:</p>
<ul>
<li>3e709a4be56663592d817d6586d68ca7265d9fcbda9c8558c04eac80aef59f89</li>
<li>2ce1e55f4e5bf308a74c41a4e52f2444b964eb0f1e39a6c0ae28a7a8fdcbc8cd</li>
</ul>
<p>It was created at 1368239997, this is the time encoded as unix timestamp format.   To convert Unix Timestamp to Date time on a Linux machine or Mac OS X type:</p><pre class="crayon-plain-tag">date -d @1368239997</pre><p>Previoushash and nexthash should be obvious, they are the identifiers of the two directly connected blocks.</p>
<p><strong>Show a transaction</strong><br />
To show a transaction, you need the transaction hash.  Let us take the transaction we found above: 3e709a4be56663592d817d6586d68ca7265d9fcbda9c8558c04eac80aef59f89</p><pre class="crayon-plain-tag">./namecoind getrawtransaction 3e709a4be56663592d817d6586d68ca7265d9fcbda9c8558c04eac80aef59f89 1</pre><p>Notice the one (1) on the end of the line. Without that, the output is not in JSON. Thus the format is:</p><pre class="crayon-plain-tag">./namecoind getrawtransaction &lt;txid&gt; 1</pre><p>Output is in this format:</p><pre class="crayon-plain-tag">{
    "hex" : "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0e0320ae01094269744d696e746572ffffffff0120930d2a010000001976a9140ed30c10e724e2447b63cfdc122e5ac86f4cda4988ac00000000",
    "txid" : "3e709a4be56663592d817d6586d68ca7265d9fcbda9c8558c04eac80aef59f89",
    "version" : 1,
    "locktime" : 0,
    "blockhash" : "7ca31026e4abb6a0cc852e6b1231c02e3d2afb3184fc498ea59ca6ba0e8e456d",
    "confirmations" : 100005,
    "time" : 1368239997,
    "blocktime" : 1368239997,
    "vin" : [
        {
            "coinbase" : "0320ae01094269744d696e746572",
            "value" : 50.00000000,
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 50.00500000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 0ed30c10e724e2447b63cfdc122e5ac86f4cda49 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a9140ed30c10e724e2447b63cfdc122e5ac86f4cda4988ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "MwvkV9MZ9RxHYV2sBKA9fAHZByDwYYGph8"
                ]
            }
        }
    ],
    "fees" : -0.00500000
}</pre><p>&nbsp;</p>
<p><strong>Sending namecoins NMC:</strong><br />
Type the command:</p><pre class="crayon-plain-tag">./namecoind sendtoaddress N9J2kUWET27WDLMYn3VsYY15FBHiiob6FG 1</pre><p>This will send one (1) namecoin to my address.  Thus, the principle command is:</p><pre class="crayon-plain-tag">./namecoind sendtoaddress &lt;wallet address&gt;</pre><p></p>
<p><strong>Wallet balance:</strong><br />
There is no wallet balance in the namecoin protocol, just like there is no wallet balance in the original bitcoin protocol. There is are only unspent transaction outputs. This is how the protocol is designed. Wallets make this more user friendly by collecting all the unspent transaction ouptuts. This does not mean you cannot get the terminal to display your wallet balance.  Simply type:</p><pre class="crayon-plain-tag">links https://explorer.namecoin.info/a/N3VQL7mZvSNL1WWoiJUnNp9TkpREnY9YhJ</pre><p>or:</p><pre class="crayon-plain-tag">links https://explorer.namecoin.info/a/WALLET ADDRESS</pre><p>This will start a terminal webbrowser <img src="/crypto/wp-includes/images/smilies/icon_razz.gif" alt=":P" class="wp-smiley" /></p>
<p>Feel free to comment.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fhow-to-use-namecoin-core-wallet%2F&amp;title=How%20to%20use%20namecoin%20core%20wallet" id="wpa2a_52"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/how-to-use-namecoin-core-wallet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Blockchain early days visualised</title>
		<link>https://talkera.org/crypto/blockchain-early-days-visualised/</link>
		<comments>https://talkera.org/crypto/blockchain-early-days-visualised/#comments</comments>
		<pubDate>Wed, 17 Dec 2014 13:39:33 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=690</guid>
		<description><![CDATA[We did some analysis on the Bitcoin blockchain. Bitcoin is a software-based online payment system. The Bitcoin blockchain can be viewed as a public ledger or a large database of all transactions that ever occured.  Every single block contains a set of transactions and evey block is linked to the previous block.  We parsed the data data using the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>We did some analysis on the Bitcoin blockchain.<b> </b>Bitcoin is a software-based online payment system. The Bitcoin blockchain can be viewed as a public ledger or a large database of all transactions that ever occured.  Every single block contains a set of transactions and evey block is linked to the previous block.  We parsed the data data using the parser we found earlier:  <a href="/wpTalkera/parsing-the-bitcoin-blockchain/">https://talkera.org/wpTalkera/parsing-the-bitcoin-blockchain/</a>   We modified this source code a little for this post.</p>
<p>We took a small dataset of the early days. The blocks in our dataset were created in 2011.  Initially blocks would contain only one or two transactions per block. You may be wondering, why only one transaction per block?  These bitcoins (BTC) were all mined, creating the bitcoins that exist in the current bitcoin network today. Example of such block : <a href="https://blockchain.info/block-index/18997/0000000018685c7be119b5f0cc0ba0c0501883280eff81e5e6b1c479f0bca5db" target="_blank">https://blockchain.info/block-index/18997/0000000018685c7be119b5f0cc0ba0c0501883280eff81e5e6b1c479f0bca5db</a></p>
<p>From the block  <a href="https://blockchain.info/block-height/119896" target="_blank">119896</a> to <a href="https://blockchain.info/block-height/131011" target="_blank">131011</a>  we got these values:</p>
<ul>
<li>smallest block output:  50 BTC</li>
<li>largest block output:  601449 BTC</li>
<li>average block output: 2993</li>
</ul>
<p>If BTC is a foreign concept to you, the largest block had a total output of $ 189.456.435   (at the current bitcoin price). While the smallest block contained 15.750 $. I myself did not believe there would be a block output of 601.449 BTC somewhere in those blocks so I looked it up.  This is the block that I found:  <a href="https://blockchain.info/block-index/140660/00000000000009755b65f42534a48d45bc2f43c7f98357d27aac1be9f7527c36" target="_blank">https://blockchain.info/block-index/140660/00000000000009755b65f42534a48d45bc2f43c7f98357d27aac1be9f7527c36</a></p>
<p>We have sorted them from the smallest total block output to the largest total block output and found this graph:</p>
<div id="attachment_733" style="width: 810px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/figure_1_output.png"><img class="size-full wp-image-733" src="/wpTalkera/wp-content/uploads/2014/12/figure_1_output.png" alt="figure_1_output" width="800" height="600" /></a><p class="wp-caption-text">Total block output in BTC sorted from smallest to largest block output.</p></div>
<p>Most of the blocks contained less than 200 transactions in the early days, but you could see the growth in the number of transactions:</p>
<div id="attachment_740" style="width: 810px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/figure_1_transactions.png"><img class="size-full wp-image-740" src="/wpTalkera/wp-content/uploads/2014/12/figure_1_transactions.png" alt="figure_1_transactions" width="800" height="600" /></a><p class="wp-caption-text">Total transactions per block, ordered from smallest to largest</p></div>
<p>Transactions and total output are not correlated per se; the largest block we found earlier  <a href="https://blockchain.info/block-index/140660/00000000000009755b65f42534a48d45bc2f43c7f98357d27aac1be9f7527c36" target="_blank">https://blockchain.info/block-index/140660/00000000000009755b65f42534a48d45bc2f43c7f98357d27aac1be9f7527c36</a>  contained only 29transactions.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fblockchain-early-days-visualised%2F&amp;title=Blockchain%20early%20days%20visualised" id="wpa2a_54"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/blockchain-early-days-visualised/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lightweight Bitcoin Wallets &amp; Stratized Nodes</title>
		<link>https://talkera.org/crypto/stratized-nodes/</link>
		<comments>https://talkera.org/crypto/stratized-nodes/#comments</comments>
		<pubDate>Wed, 17 Dec 2014 12:01:34 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=695</guid>
		<description><![CDATA[Introduction In the early days of the bitcoin network each node would be the miner, the merchant and the end-user.  This makes sense as the mining difficulty was low and the user would not need expensive mining rigs to create bitcoins. A user would easily create 50 BTC. As the bitcoin network grows this is [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Introduction</strong><br />
In the early days of the bitcoin network each node would be the miner, the merchant and the end-user.  This makes sense as the mining difficulty was low and the user would not need expensive mining rigs to create bitcoins. A user would easily create 50 BTC. As the bitcoin network grows this is no longer the case.  While there is no issue with normal computational machines, to have the entire bitcoin blockchain on low end machines has become impractical.</p>
<p>An example case: The Electrum wallet had relied on the Electrum server.  This server was not capable of large growth and they later changed to another centralized server called Stratum. Stratum is unmaintained and suffers from denial of service attaks. Some related threads:  <a href="https://bitcointalk.org/index.php?topic=271761.0" target="_blank">https://bitcointalk.org/index.php?topic=271761.0</a>  and  <a href="https://bitcointalk.org/index.php?topic=112413.0" target="_blank">https://bitcointalk.org/index.php?topic=112413.0</a>  Currently you can choose from a pool of servers. To visualise what we are talking about, upon installing Electrum wallet you get these messages:</p>
<div id="attachment_702" style="width: 652px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/electrum.png"><img class="wp-image-702" src="/wpTalkera/wp-content/uploads/2014/12/electrum.png" alt="electrum" width="642" height="373" /></a><p class="wp-caption-text">electrum</p></div>
<p>If you press select server manually you get this cool list:</p>
<div id="attachment_704" style="width: 529px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/electrum2.png"><img class="size-full wp-image-704" src="/wpTalkera/wp-content/uploads/2014/12/electrum2.png" alt="electrum2" width="519" height="438" /></a><p class="wp-caption-text">electrum2</p></div>
<p>While such a solution is semi-dedcentralized it <em>is</em> a workaround. One could argue it is a centralized solution because all Electrum wallet nodes use the Electrum server network.  The list of electrum server nodes contain only around 20-30 items.  All lightweight bitcoin clients currently use such a workaround, except Multibit.  Your bitcoins cannot be taken even if  the servers are down nor do you lose your ability to use bitcoins if they are down (you can import private keys in other wallets). Electrum is a great bitcoin wallet but  it would be better for the bitcoin community to have another solution for this problem.</p>
<p><strong>How can this be resolved?</strong><br />
The current proposal is to resolve this within the bitcoin network itself. The bitcoin network is a peer-to-peer network and bitcoin nodes have an initial handhake. During this handshake a version packet is sent which contain a bitfield called services. This is how a node explains the network how they behave.  The proposal is to add two more services to the network :</p>
<ul>
<li>NODE_SERVICE (2)</li>
<li>NODE_STRATIZED (4).</li>
</ul>
<p>A node with the bitfield NODE_SERVICE  is a blockchain service node which supports the additional protocol messages &#8220;getoutputs&#8221; and &#8220;getspends&#8221;.  A stratized bitcoin node would not contain the entire blockchain and use the blockchain service node.  A stratized node would use four messages to discover the history of a Bitcoin address without needing direct access to the blockchain:</p>
<ul>
<li>getoutputs</li>
<li>outputs</li>
<li>getspend</li>
<li>spend</li>
</ul>
<p>A use case may be:</p>
<div id="attachment_712" style="width: 666px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/example.png"><img class="wp-image-712" src="/wpTalkera/wp-content/uploads/2014/12/example.png" alt="example" width="656" height="327" /></a><p class="wp-caption-text">example</p></div>
<p>&nbsp;</p>
<p><strong>Conclusion:</strong><br />
Lightweight bitcoin wallets rely on a number of centralized bitcoin servers. To resolve this problem, the current proposal is to use the peer-to-peer bitcoin network itself by  adding new roles to nodes in the network.  A node may become a full blockchain service node or a stratized node.</p>
<p>Sources:</p>
<ol>
<li><a href="https://electrum.org" target="_blank">https://electrum.org</a></li>
<li><a href="https://bitcointalk.org/index.php?topic=271761.0" target="_blank">https://bitcointalk.org/index.php?topic=271761.0</a></li>
<li><a href="https://bitcointalk.org/index.php?topic=112413.0" target="_blank">https://bitcointalk.org/index.php?topic=112413.0</a></li>
<li><a href="https://en.bitcoin.it/wiki/BIP_0033" target="_blank">https://en.bitcoin.it/wiki/BIP_0033</a></li>
</ol>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fstratized-nodes%2F&amp;title=Lightweight%20Bitcoin%20Wallets%20%26%20Stratized%20Nodes" id="wpa2a_56"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/stratized-nodes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parsing the Bitcoin Blockchain</title>
		<link>https://talkera.org/crypto/parsing-the-bitcoin-blockchain/</link>
		<comments>https://talkera.org/crypto/parsing-the-bitcoin-blockchain/#comments</comments>
		<pubDate>Mon, 15 Dec 2014 15:33:16 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=677</guid>
		<description><![CDATA[Today we will have a look at a Blockchain parser written in Python. First download bitcoin-core from https://bitcoin.org [crayon-54acc6c80ece5528932130/] By default is should include a bunch of blocks which will be written in $HOME/.bitcoin/  This is not the full blockchain, but enough to get started. [crayon-54acc6c80ecfd546544679/] This will output all transactions stored in this file. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Today we will have a look at a Blockchain parser written in Python. First download bitcoin-core from <a href="https://bitcoin.org" target="_blank">https://bitcoin.org</a></p><pre class="crayon-plain-tag">tar xvfz bitcoin-0.9.3-linux.tar.gz 
cd bitcoin-0.9.3-linux/
cd bin
cd 32
./bitcoin-qt</pre><p>By default is should include a bunch of blocks which will be written in $HOME/.bitcoin/  This is not the full blockchain, but enough to get started.</p><pre class="crayon-plain-tag">git clone https://github.com/jtauber/blockchain.git
cd blockchain
./blockchain.py /home/YOURUSERNAME/.bitcoin/blocks/blk00001.dat</pre><p>This will output all transactions stored in this file. It will keep outputing until stopped, if you want you can interrupt it. Some output we got:</p><pre class="crayon-plain-tag">BLOCK 412 b'0000000000004d869a3f699f198aaff6e36f2bb605f7843aab8a6971873b9474'
  Transaction 0 b'4bad270fd17c858a04e8b05a6fdc2aafe6d7113f0b7a87d836bedeb49e8271d9'
    GENERATED -&gt;
    0 50.0 -&gt; public-key 14XhRXKxcuVL1ttcdHCYaA4h4Qpeio9ivE
  Transaction 1 b'92242e148975d18b0d2dbe65de9d880f9c0aca47365ec7a6e2a41564945f56b0'
    b'7df239133ec70547bf2207d8b250e9a115cbddcd6214dbcb173a79ce23eefe3d' 1 -&gt;
    b'd6baddf7bfe8caa9ebbd3d0ec5fdd8dfcb276deb6addd4f9f3d40630867b117b' 1 -&gt;
    0 1.32 -&gt; address-type 1Kak3eYBiMqx7nuStdfXcoymw3VgQjgUAs</pre><p>We look up the same transaction 4bad270fd17c858a04e8b05a6fdc2aafe6d7113f0b7a87d836bedeb49e8271d9  on blockchain.info (just for fun)  and see the address  14XhRXKxcuVL1ttcdHCYaA4h4Qpeio9ivE received 50 BTC.</p>
<div id="attachment_687" style="width: 1212px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/transact.png"><img class="size-full wp-image-687" src="/wpTalkera/wp-content/uploads/2014/12/transact.png" alt="transaction" width="1202" height="184" /></a><p class="wp-caption-text">transaction</p></div>
<p>The script (blockchain.py) is a straight forward and easy to understand python script. Notice that the .dat files contain multiple blocks from the blockchain. You can download the entire bitcoin blockchain (Currently around 22 GB) from the web by letting your client run or you can get it from <a href="http://gtf.org/garzik/bitcoin/bootstrap.dat.torrent" target="_blank">http://gtf.org/garzik/bitcoin/bootstrap.dat.torrent</a>  see also: <a href="https://bitcointalk.org/index.php?topic=145386.0" target="_blank">https://bitcointalk.org/index.php?topic=145386.0</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fparsing-the-bitcoin-blockchain%2F&amp;title=Parsing%20the%20Bitcoin%20Blockchain" id="wpa2a_58"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/parsing-the-bitcoin-blockchain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing namecoin in Linux</title>
		<link>https://talkera.org/crypto/installing-namecoin-in-linux/</link>
		<comments>https://talkera.org/crypto/installing-namecoin-in-linux/#comments</comments>
		<pubDate>Mon, 15 Dec 2014 14:16:20 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=593</guid>
		<description><![CDATA[This article will teach you how to install the namecoin core client in Linux. If you just want the binary or another wallet, visit the official namecoin site. At the time of writing, an Armory wallet port is in development, but no official version has been released yet. Namecoin (Symbol: ℕ or NMC) is a [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This article will teach you how to install the namecoin core client in Linux. If you just want the binary or another wallet, visit the official namecoin site. At the time of writing, an Armory wallet port is in development, but no official version has been released yet.</p>
<p>Namecoin (Symbol: ℕ or NMC) is a cryptocurrency and the first fork of the Bitcoin software. It is based on the code of Bitcoin, it uses the same proof-of-work algorithm and is limited to 21 million coins.</p>
<p>The primary difference from Bitcoin is that Namecoin offers the ability to store data within its blockchain. The original proposal called for inserting data into Bitcoin’s blockchain directly. The Namecoin codebase consists of the Bitcoin codebase with relatively minor changes (~400 lines) and addtional functionality built on top on it. The mining procedure is identical but the block chain is separate, thus creating the Namecoin block chain.</p>
<p>Unlike the Bitcoin block chain, the Namecoin block chain can be used to register any data type of data. Each record must follow the same rules (expire time, data size limit, etc). For storing large amounts of data it is better to use datacoin or filecoin.</p>
<p>Namecoin’s flagship is the top level domain .bit, which is functionally similar to .com or .net domains but functions using a decentralized database called the block chain.</p>
<p>Get the namecoin source code:</p><pre class="crayon-plain-tag">git clone https://github.com/namecoin/namecoin.git
cd namecoin
cd src
make
vim $HOME/.namecoin/namecoin.conf</pre><p>Add these files to the config file</p><pre class="crayon-plain-tag">rpcuser=your_user
rpcpassword=your_pass
rpcport=8336</pre><p>Execute the namecoin daemon using:</p><pre class="crayon-plain-tag">./namecoind -daemon</pre><p>Namecoin is downloading the entire namecoin blockchain (which can take several hours), <b>do not attempt any transactions until the blockchain has completed downloading</b>. You can check progress by comparing the blockcount returned by getinfo against the <a class="external text" href="http://explorer.dot-bit.org/stats/block_count.txt" rel="nofollow">explorer.namecoin.info blockcount</a>. This will tell you the number of blocks currently in the namecoin blockchain.   Simply type:</p><pre class="crayon-plain-tag">./namecoind getinfo</pre><p>If you want to sit back and relax type (wait until all blocks have completed downloading, may take a while):</p><pre class="crayon-plain-tag">watch ./namecoind getinfo</pre><p>Some useful commands:</p>
<p><strong>Create a new Namecoin address</strong><br />
namecoind getnewaddress</p>
<p><strong>Start Namecoin daemon</strong><br />
namecoind</p>
<p><strong>Show all available commands   </strong><br />
namecoind help</p>
<p><strong>Show various information. The &#8220;blocks&#8221; value should match the current block count</strong><br />
namecoind getinfo</p>
<p><strong>List your Namecoin address on which you can receive Namecoins  </strong><br />
namecoind listreceivedbyaddress 0 true</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Finstalling-namecoin-in-linux%2F&amp;title=Installing%20namecoin%20in%20Linux" id="wpa2a_60"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/installing-namecoin-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transactions in the Bitcoin Network</title>
		<link>https://talkera.org/crypto/transactions-in-the-bitcoin-network/</link>
		<comments>https://talkera.org/crypto/transactions-in-the-bitcoin-network/#comments</comments>
		<pubDate>Mon, 15 Dec 2014 13:23:51 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=613</guid>
		<description><![CDATA[Introduction In this blog post we will attempt to explain bitcoin transactions, the fundamental part of the bitcoin protocol. We will explain the entire transaction lifecycle. Transaction Lifecycle The process starts with the creation of a transaction itself.  Secondly, the created transaction will be signed with one or more signatures. Think of signing as writing your [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Introduction</strong><br />
In this blog post we will attempt to explain bitcoin transactions, the fundamental part of the bitcoin protocol. We will explain the entire transaction lifecycle.</p>
<p><strong>Transaction Lifecycle</strong><br />
The process starts with the creation of a transaction itself.  Secondly, the created transaction will be signed with one or more signatures. Think of signing as writing your unique autograph on the transaction. The transaction is broadcast into the bitcoin network.  Each node will validate this transaction and broadcast it to other nodes.   Finally, mining nodes will verify the transaction and embody it in a blockchain block. Let us illustrate this:</p>
<div id="attachment_652" style="width: 572px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/transaction1.png"><img class="size-full wp-image-652" src="/wpTalkera/wp-content/uploads/2014/12/transaction1.png" alt="bitcoin transaction" width="562" height="814" /></a><p class="wp-caption-text">bitcoin transaction</p></div>
<p>&nbsp;</p>
<p><strong>What is a transaction?</strong><br />
You can think of a transaction like a cheque that is signed with a unique autograph. It will define from where to where the bitcoins should be moved.  They can only be moved if it has a valid signature. An example of such transaction can be seen here:  <a href="https://blockchain.info/rawtx/f291a31d8387cf3ac4db4d7330b090881c5d744a20825792d9940b595003c3ab" target="_blank">https://blockchain.info/rawtx/f291a31d8387cf3ac4db4d7330b090881c5d744a20825792d9940b595003c3ab</a></p>
<p>A transaction has one or more inputs and one or more outputs. For example, a company may want to have one input and several outputs to pay all the wages. This can be achieved in one bitcoin transaction.  A version number and unix timestamp are of course included.</p>
<p>For the programmers or mathematicians out there, you may remember the small python code to create a bitcoin transaction from <a href="/wpTalkera/programming-a-simple-bitcoin-wallet/" target="_blank">this post</a>:</p><pre class="crayon-plain-tag">def sendBTC(self,dst, amount):
	h = history(self.address)
	outs = [{'value': amount, 'address': dst}] 
	tx = mksend(h,outs, self.address, 10000)
	tx2 = sign(tx,0,self.priv)
	pushtx(tx2)</pre><p>This code clearly demonstrates that the creation of a transaction and the signing of a transaction is executed on your machine.  The rest of the transaction lifecycle occurs in the bitcoin network.  If you cannot read code, don&#8217;t worry.</p>
<p><strong>Bitcoin network and broadcasting</strong><br />
Traditionally a customer would ask the service for data. Imagine you (the client) visit a grocery store and ask the seller (the server) for a product. This network model is very old and the entire world wide web is based on it. This model is the client-server model and relies on a centralized authority (the webserver).</p>
<p>Now imagine a free market. You can ask any person around you for a product. In such a model, there is no centralized authority, except the authority that is written in the rules of the market.  Such a computer network is called a peer-to-peer network. The bitcoin network itself is a peer-to-peer network. Data in the bitcoin network is shared among peers.</p>
<div id="attachment_631" style="width: 635px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/networks1.png"><img class="size-full wp-image-631" src="/wpTalkera/wp-content/uploads/2014/12/networks1.png" alt="computer networks" width="625" height="244" /></a><p class="wp-caption-text">computer networks</p></div>
<p>Transactions are broadcast to peers (or nodes) in the bitcoin network.   If it is valid, it is broadcast to other nodes.</p>
<p><strong>Miner verification and inclusion in block</strong><br />
Some peers in the bitcoin network are known as miners. Transactions are verified by these miners.  Mining can be a profitable business:  Nearly all transactions in the bitcoin network include fees, which are given to miners. In addition, miners create new bitcoins in the bitcoin network.  Transactions are included into a bitcoin block.  A block is another piece of bytes and looks like this:  <a href="https://blockchain.info/rawblock/511748" target="_blank">https://blockchain.info/rawblock/511748</a>   (if you prefer the non-technical view see:  <a href="https://blockchain.info/block-index/511748" target="_blank">https://blockchain.info/block-index/511748</a> ).</p>
<p><strong>Blockchain</strong><br />
Every block has a unique identifier (created by hashing algorithm called double SHA-256). Each block is linked to a previous block.  Every block has a previous block indicated with the variable prev_block.</p>
<div id="attachment_641" style="width: 962px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/blockchain1.png"><img class="size-full wp-image-641" src="/wpTalkera/wp-content/uploads/2014/12/blockchain1.png" alt="blockchain" width="952" height="117" /></a><p class="wp-caption-text">blockchain</p></div>
<p>The total set of all connected blocks is called the block chain.  A block contains a set of transactions. The block chain contains all transactions ever done on the bitcoin block chain.</p>
<p>Interactive example: visit <a href="https://blockchain.info/block-index/511748" target="_blank">https://blockchain.info/block-index/511748</a>  and keep pressing on Previous Block. You will notice you are visiting different blocks. Notice that all of the blocks are linked together, and each block (or in this case webpage) displays a set of transactions.</p>
<p><strong>In-depth: Unspent transaction output</strong><br />
Unspent transaction output or UTXO is an essential component of a bitcoin transaction. If you receive bitcoins, this is recorded as UTXO on the bitcoin blockchain or bitcoin public ledger. This is a database shared by all peers on the network.  UTXO are indivisible chunks of bitcoin currency locked to a specific owner, these are expressed as Satoshi. Your total amount of bitcoins (UTXO) may be scattered  amongst many blocks on the blockchain.  Wallets create the illusions of an account by scanning the entire blockchain for your UTXOs, otherwise there is no account or balance in the bitcoin network itself.  Because only you have the private key, you are the only person who can move the UTXO to other bitcoin addresses.</p>
<p>Let us take a<em><strong> random bitcoin address</strong></em> and view their unspent transactions: <a href="https://blockchain.info/unspent?active=13R2zxMCqDSaCk85UxnLpe5ktzUGAEWJW9 " target="_blank">https://blockchain.info/unspent?active=13R2zxMCqDSaCk85UxnLpe5ktzUGAEWJW9 </a><br />
Observe this address (at the time of writing) has many unspent transactions outputs. We can now find out which blocks his BTC are in using this little python script I wrote:</p><pre class="crayon-plain-tag"># find unspent transaction outputs for bitcoin blockchain address
# talkera.org
import httplib2, re
import json

def txToBlock(hash):
  http = httplib2.Http()
  headers, body = http.request("https://blockchain.info/rawtx/" + hash)
  data = json.loads(body)
  return data['block_height']

# grab data
http = httplib2.Http()
headers, body = http.request("https://blockchain.info/unspent?active=13R2zxMCqDSaCk85UxnLpe5ktzUGAEWJW9")
data = json.loads(body)

# fetch transaction ids and use them to find block ids.
for d in data['unspent_outputs']:
#  print d['tx_hash_big_endian'] + " ",
  print str(txToBlock(d['tx_hash_big_endian'])) + " ",

#print txToBlock('93cfe9153474ccc9349f9effde55ebb6f7dfafcc4b2992b725d8c926732b168e')</pre><p>Execute with:</p><pre class="crayon-plain-tag">python utxo.py</pre><p>The program will output all blocks in the bitcoin blockchain that contain his satoshis (every number is a block height identifier). The program my take a while to finish, so be patient (or interrrupt it).</p><pre class="crayon-plain-tag">322263  322278  322278  322352  322373  322375  322379  322384  322444  322494  
322552  322566  322575  322582  322592  322604  322628  322668  322739  322779  
322796  322858  322930  322997  323034  323045  323085  323099  323116  323172  
323284  323333  323370  323377  323456  323516  323538  323543  323576  323648  
323657  323689  323717  323791  323793  323802  323807  323810  323906  323922  
323929  323996  324009  324010  324064  324088  324134  324135  324189  324205  
324232  324248  324289  324294  324302  324310  324316  324318  324360  324407  
324420  324421  324426  324433  324445  324448  324476  324479  324490  324540  
324545  324583  324587  324589  324600  324629  324632  324653  324659  324734
...</pre><p>Yes, the bitcoins really are scattered all across the blockchain. Feel free to comment.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Ftransactions-in-the-bitcoin-network%2F&amp;title=Transactions%20in%20the%20Bitcoin%20Network" id="wpa2a_62"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/transactions-in-the-bitcoin-network/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Bitcoin Alias System</title>
		<link>https://talkera.org/crypto/a-bitcoin-alias-system/</link>
		<comments>https://talkera.org/crypto/a-bitcoin-alias-system/#comments</comments>
		<pubDate>Sun, 14 Dec 2014 21:00:11 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=572</guid>
		<description><![CDATA[In the current Bitcoin protocol transactions are made using addresses in the form of 1BCXxkTqRxVYnwa5oh1rwLkmj448qfmPM3.  While they are relatively short and can be encoded into an QR code, they are cumbersome to remember. Wouldn&#8217;t it be easier to simply say &#8220;Send to Sam&#8221; ?  For this to exist, there has to exist a one-directional or bi-directional mapping [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In the current Bitcoin protocol transactions are made using addresses in the form of 1BCXxkTqRxVYnwa5oh1rwLkmj448qfmPM3.  While they are relatively short and can be encoded into an QR code, they are cumbersome to remember. Wouldn&#8217;t it be easier to simply say &#8220;Send to Sam&#8221; ?  For this to exist, there has to exist a one-directional or bi-directional mapping between the bitcoin address and the identifier somewhere. The mapping can be described as simple pair p (bitcoin address, name).</p>
<p>This mapping could be client-side, in the same way you create mapping between phone numbers and names in your phone, you could create a mapping between bitcoin addresses and name in a bitcoin wallet.</p>
<p>The Bitcoin developers want to solve the problem differently.  They have evaluated several options to create this mapping somewhere in different systems:</p>
<p><strong>Encoding in the bitcoin address</strong><br />
One solution is to use the bitcoin blockchain as addressbook.  The idea is to use the first part of the bitcoin address as alias. Such type of addresses can be created with vanitygen, a tool that we discussed earlier in this blog.  The address 1Coffee7nryYgFGrT1x3SYaokb8r2ZwAsX could then be remembered as 1Coffee.   This solution, called first bits, has some problems.  The address you want to create is limited by computational power.  Another problem is scalability.</p>
<p><strong>DNS TXT Records</strong><br />
A centralized system could be created which holds such mapping.  a Domain Name Server (DNS server) is such a system.  Traditionally they map domain name to ip address.   DNS systems are insecure and unsafe by design.  If such a system is used, one could take over someones bitcoin address by changing the mapping record.</p>
<p><strong>Server Service</strong><br />
One could create a service which maps identity to a bitcoin addresses:</p>
<ul>
<li>User wishes to send to foo@bar.net</li>
<li>Client uses DNS to find the IP address of bar.net: 123.123.123.123</li>
<li>Client connects to port 123.123.123.123:4567 and requests the bitcoin address for the user foo</li>
<li>Server responds with the address or error code and terminates the connection.</li>
<li>Client sends the funds to the address</li>
</ul>
<p>This system suffers from the same problems that the DNS TXT records have.</p>
<p><strong>HTTPS Webservice</strong><br />
We could secure the connection between the user and the mapping server. Let us take for example, a person trying to send bitcoins to malvin@email.com<br />
The identifier malvin could then be taken and used to query the server.</p><pre class="crayon-plain-tag">https://foo.org/bitcoin-alias/?handle=malvin</pre><p>The server will then return the bitcoin address:</p><pre class="crayon-plain-tag">1BCXxkTqRxVYnwa5oh1rwLkmj448qfmPM3</pre><p>Such kind of system could be created using a simple PHP script. This system is however, not secure, because the administrator of the system could modify one or more records and receive all the bitcoins.</p>
<div id="attachment_583" style="width: 1272px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/btcserver.png"><img class="size-full wp-image-583" src="/wpTalkera/wp-content/uploads/2014/12/btcserver.png" alt="btcserver" width="1262" height="300" /></a><p class="wp-caption-text">btcserver</p></div>
<p>&nbsp;</p>
<p><strong>Namecoin blockchain</strong><br />
The current proposal is to use the Namecoin blockchain to create the mapping. Using a decentralised system, it becomes hard for an attacker to take the bitcoins. Namecoin offers the ability to store data within its blockchain.</p>
<p>Related: bips0015</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fa-bitcoin-alias-system%2F&amp;title=A%20Bitcoin%20Alias%20System" id="wpa2a_64"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/a-bitcoin-alias-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Bitcoin protocol and hashing algorithms</title>
		<link>https://talkera.org/crypto/the-bitcoin-protocol-and-hashing-algorithms/</link>
		<comments>https://talkera.org/crypto/the-bitcoin-protocol-and-hashing-algorithms/#comments</comments>
		<pubDate>Sat, 13 Dec 2014 18:17:53 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=501</guid>
		<description><![CDATA[Introduction to hashing A hash function is any function that can be used to map digital data of arbitrary size to digital data of fixed size, with slight differences in input data producing very big differences in output data. A hash function should be practically impossible to invert. That is, to recreate the input data from [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Introduction to hashing</strong><br />
A hash function is any function that can be used to map digital data of arbitrary size to digital data of fixed size, with slight differences in input data producing very big differences in output data. A hash function should be practically impossible to invert. That is, to recreate the input data from its hash value alone. The input data is called the <i>message</i>, and the hash value is called the <i>digest</i>.</p>
<div id="attachment_508" style="width: 650px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/Cryptographic_Hash_Function2.png"><img class="wp-image-508" src="/wpTalkera/wp-content/uploads/2014/12/Cryptographic_Hash_Function2.png" alt="Cryptographic_Hash_Function" width="640" height="448" /></a><p class="wp-caption-text">Cryptographic_Hash_Function</p></div>
<p>The authors and implementation documentation for these hashing functions you can find here:  <a href="https://en.wikipedia.org/wiki/Comparison_of_cryptographic_hash_functions" target="_blank">https://en.wikipedia.org/wiki/Comparison_of_cryptographic_hash_functions</a></p>
<p><strong>Which Hash functions are inside the Bitcoin Protocol?</strong><br />
The Bitcoin protocol relies on SHA256 and RIPEMD-160 hashing functions.  You can find all their implementations in<em> /bitcoin/src/crypto</em><br />
A single SHA256 hash can be created using this small python script:</p><pre class="crayon-plain-tag">import hashlib
hash_object = hashlib.sha256(b'hello')
hex_dig = hash_object.hexdigest()
print(hex_dig)</pre><p>Save is as hash.py and execute with:</p><pre class="crayon-plain-tag">&gt; python hash.py
&gt; 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824</pre><p>Bitcoin uses a system of double hashing.  Let us take an double-SHA-256 encoding of string &#8220;hello&#8221;.</p><pre class="crayon-plain-tag">import hashlib

print hashlib.sha256(b'hello').digest().encode('hex_codec')
print hashlib.sha256(hashlib.sha256(b'hello').digest()).digest().encode('hex_codec')</pre><p>This will output:</p><pre class="crayon-plain-tag">2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 (first round of sha-256)
9595c9df90075148eb06860365df33584b75bff782a510c6cd4883a419833d50 (second round of sha-256)</pre><p>Sometimes SHA256 is combined with RIPEMD160 hashing.  Take the following code and save it as hash2.py</p><pre class="crayon-plain-tag">import hashlib

print hashlib.sha256(b'hello').digest().encode('hex_codec')
print hashlib.new('ripemd160',hashlib.sha256(b'hello').digest()).digest().encode('hex_codec')</pre><p>Then:</p><pre class="crayon-plain-tag">$ python hash2.py
$ 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 (first round is sha-256)
$ b6a9c8c230722b7c748331a8b450f05566dc7d0f (with ripemd-160)</pre><p>That looks a bit like a bitcoin address right?</p>
<p><strong>Where is it used?</strong></p>
<ul>
<li>Brainwallets</li>
<li>Bitcoin addresses</li>
<li>Block hashes</li>
<li>Transactions</li>
<li>Merkle trees</li>
<li>Many other places</li>
</ul>
<p><strong>In depth:</strong></p>
<p><i>Brainwallets</i><br />
If you recall our <a href="/wpTalkera/programming-a-simple-bitcoin-wallet/" target="_blank">previous post</a> about building your own bitcoin wallet, we used an SHA-256 hashing function to hash the brainwallet password. This is quite common. You could double SHA-256 the brainwallet password or use another hashing function if you want.</p>
<p><em>Bitcoin addresses</em><br />
A bitcoin address is in fact the hash of a ECDSA public key, computed this way:</p><pre class="crayon-plain-tag">Version = 1 byte of 0 (zero); on the test network, this is 1 byte of 111
Key hash = Version concatenated with RIPEMD-160(SHA-256(public key))
Checksum = 1st 4 bytes of SHA-256(SHA-256(Key hash))
Bitcoin Address = Base58Encode(Key hash concatenated with Checksum)</pre><p>The Base58 encoding used is home made, and has some differences. Especially, leading zeroes are kept as single zeroes when conversion happens.</p>
<p><em>Block hashes</em><br />
The SHA256 hash that identifies each block (and which must have a run of 0 bits) is calculated from the first 6 fields of this structure (version, prev_block, merkle_root, timestamp, bits, nonce, and standard SHA256 padding, making two 64-byte chunks in all) and <i>not</i> from the complete block. To calculate the hash, only two chunks need to be processed by the SHA256 algorithm. We implemented a python code that will calculate the hash of the block with the smallest hash as of June 2011, Block 125552.</p>
<p>The variables we will need are :</p>
<ul>
<li>version</li>
<li>prev_block</li>
<li>merkle_root</li>
<li>timestamp</li>
<li>bits</li>
<li>nonce</li>
</ul>
<p>If you open this address in <a href="http://blockexplorer.com/block/00000000000000001e8d6829a8a21adc5d38d0a473b144b6765798e61f98bd1d" target="_blank">blockexplorer</a>  or <a href="https://blockchain.info/block-index/140402/00000000000000001e8d6829a8a21adc5d38d0a473b144b6765798e61f98bd1d" target="_blank">blockchain.info</a>  you find exactly this block.   Take these variables from the blockchain explorer. Then copy this code we wrote (be careful with the little endian function, it&#8217;s quick&amp;dirty) and save it as block.py.  Execute with python block.py</p><pre class="crayon-plain-tag"># blockchain hash reconstructor
# talkera.org
import hashlib
import time
import datetime
from struct import *

def reverse(value):
 n = ""
 i = len(value)-1
 while i &gt; 2:
 n = n + value[i-1]
 n = n + value[i]
 i = i - 2
 n = n + value[0]
 n = n + value[1]
 return n

def little_endian(value): 
 s = hex(value)[2:]
 s = s.replace("L","")
 return reverse(str(s))

prev_block = reverse("00000000000008a3a41b85b8b29ad444def299fee21793cd8b9e567eab02cd81")
mrkl_root = reverse("2b12fcf1b09288fcaff797d71e950e71ae42b91e8bdb2304758dfcffc2b620e3")
timestamp = little_endian(1305998791)
bits = little_endian(440711666)
nonce = little_endian(2504433986)

header_hex = ("01000000" +
 prev_block +
 mrkl_root +
 timestamp +
 bits +
 nonce )

header_bin = header_hex.decode('hex')
hash = hashlib.sha256(hashlib.sha256(header_bin).digest()).digest()
print hash[::-1].encode('hex_codec')</pre><p>This program will output:</p><pre class="crayon-plain-tag">00000000000000001e8d6829a8a21adc5d38d0a473b144b6765798e61f98bd1d</pre><p>We can do this with any block of the blockchain. For example, let&#8217;s take block 511748.  This block was created on 13 december 2014. We put these variables into the program (variables from <a href="https://blockchain.info/rawblock/511748" target="_blank">https://blockchain.info/rawblock/511748</a> ). <em><strong> Notice the version has changed to 2 ! </strong> </em></p>
<p>Put it in the code as such:</p><pre class="crayon-plain-tag"># blockchain hash reconstructor
# talkera.org
import hashlib
import time
import datetime
from struct import *

def reverse(value):
  n = ""
  i = len(value)-1
  while i &gt; 2:
    n = n + value[i-1]
    n = n + value[i]
    i = i - 2
  n = n + value[0]
  n = n + value[1]
  return n

def little_endian(value): 
  s = hex(value)[2:]
  s = s.replace("L","")
  return reverse(str(s))

prev_block = reverse("0000000000000000099a267bcff49a8be5ba6bff37b522420fda397c6db7b065")
mrkl_root = reverse("268d07f96fae264af0ec65d8e02580ad8ef0e4a0fe705633b3ea84ec47fdd06e")
timestamp = little_endian(1418484820)
bits = little_endian(404454260)
nonce = little_endian(3677959803)

header_hex = ("02000000" +
    prev_block +
    mrkl_root +
    timestamp +
    bits +
    nonce )

header_bin = header_hex.decode('hex')
hash = hashlib.sha256(hashlib.sha256(header_bin).digest()).digest()
print hash[::-1].encode('hex_codec')</pre><p>And execute to find the hash 000000000000000000f1fe83cdc4e356e7fe05318d9a806977cf1fa84112750d.  Exactly the same hash as on <a href="https://blockchain.info/block-index/511748" target="_blank">https://blockchain.info/block-index/511748</a>   Observe how intertwined the blockchain hash is with the previous block variable, thus a new block cannot simply be inserted somewhere into the blockchain. And you just learned the block hashing algorithm <img src="/crypto/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
<p><em>Transactions</em><br />
A transaction is a section of data confirmed by a signature. It is sent to the Bitcoin network and blocks are formed based on them. Every transaction has one or more inputs.  Inputs encode a double SHA256 hash of the preceding transaction.</p>
<p><em>Merke trees</em><br />
Merkle trees are binary trees of hashes. Merkle trees in bitcoin use a <b>double</b> SHA-256, the SHA-256 hash of the SHA-256 hash of something.</p>
<p><strong>Concluding</strong><br />
The Bitcoin protocol heavily relies on double SHA-256 hashing and RIPEMD-160 hashing algorithms.  Hashes are used to encode previous transactions or blocks. We had an indepth look into the Block Hash Algorithm and implemented this algorithm in Python.  They are also used in every bitcoin address.  We hope you enjoyed our article <img src="/crypto/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fthe-bitcoin-protocol-and-hashing-algorithms%2F&amp;title=The%20Bitcoin%20protocol%20and%20hashing%20algorithms" id="wpa2a_66"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/the-bitcoin-protocol-and-hashing-algorithms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HDWallet: Secure, hierarchical Bitcoin wallet generation</title>
		<link>https://talkera.org/crypto/hdwallet-secure-hierarchical-bitcoin-wallet-generation/</link>
		<comments>https://talkera.org/crypto/hdwallet-secure-hierarchical-bitcoin-wallet-generation/#comments</comments>
		<pubDate>Fri, 12 Dec 2014 16:29:51 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=418</guid>
		<description><![CDATA[Today we will have a look at Antonopoulos project HDWallet.  The project is still in an experimental phase and starts with a warning: Please do not use in production yet. Testing welcome. Andreas starts of with explaining us the traditional method for generating a bitcoin address: The classic generation of a new bitcoin address requires basically [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Today we will have a look at Antonopoulos project HDWallet.  The project is still in an experimental phase and starts with a warning:</p>
<p><strong>Please do not use in production yet. Testing welcome.</strong></p>
<p>Andreas starts of with explaining us the traditional method for generating a bitcoin address:</p>
<blockquote><p>The classic generation of a new bitcoin address requires basically 3 steps:</p>
<ol class="task-list">
<li>Generate a large 256-bit number from a (P)RNG (= private key)</li>
<li>Calculate the ECC public key for that number (= public key)</li>
<li>Do some hashing and encoding on the pubkey (= bitcoin address)</li>
</ol>
<p>If the webserver gets hacked and the private keys are stored on it an attacker can steal all user funds.</p></blockquote>
<p>Private keys had been stolen of webservers before. A large database of private keys on a single webserver is of course of major interest for attackers. Antonopoulos tells us:</p>
<p><em>&#8220;Based on the mathematical properties of ECC we can apply equivalent operations on a private key and its public key. The resulting keys will be a new corresponding keypair.  </em><em>In pseudocode this is what happens:&#8221;</em></p><pre class="crayon-plain-tag">N = 42
privkey1, pubkey1 = generate_keypair()

privkey2 = privkey1 × N
pubkey2  = pubkey1 × N

assert(is_keypair(privkey2, pubkey2) == True)</pre><p><em>&#8221; We apply the operation on the public key on the webserver to generate new bitcoin addresses no private key is needed. To spend the funds later, we derive the private for the address in a secure, offline environment.&#8221;</em></p>
<p>We grab the source code:</p><pre class="crayon-plain-tag">git clone https://github.com/aantonop/python-hdwallet.git
cd python-hdwallet
sudo python setup.py install</pre><p>Now that we have the package installed, we can use it.  Antonopolous shared an example code:</p><pre class="crayon-plain-tag">from hdwallet import HDWallet

# 1. generate a master wallet with a (random) seed 
master = HDWallet.from_master_seed('HDWallet seed')
# 2. store the Private Extended Key somewhere very (!) safe
prv_master_key = master.to_extended_key(include_prv=True)
# 3. store the Public Extended Key on the webserver
pub_master_key = master.to_extended_key()


# 4. On the webserver we can generate child wallets
webserver_wallet = HDWallet.from_extended_key(pub_master_key)
child2342 = webserver_wallet.child(23).child(42)
print '- Public Extended Key (M):', pub_master_key
print 'Child: M/23/42'
print 'Address:', child2342.address()
print 'Privkey:', child2342.prvkey() # ... but the private keys remain *unknown*
print ''


# 5. In case we need the private key for a child wallet, start with the private master key
cold_wallet = HDWallet.from_extended_key(prv_master_key)
child2342 = cold_wallet.child(23).child(42)
print '- Private Extended Key (m):', prv_master_key
print 'Child: m/23/42'
print 'Address:', child2342.address()
print 'Privkey:', child2342.prvkey().encode('hex')</pre><p>Execute with:</p><pre class="crayon-plain-tag">python andreas.py</pre><p>Which outputs:</p><pre class="crayon-plain-tag">- Public Extended Key (M): xpub661MyMwAqRbcG7J3wr5XW6FEvDHbqUJrKGEXVUJMTuJWJqwV1rJWZPENd1jDkEdaGVs1RGMp5oWpJ89xTu2bkRSRSoxVpMzLG1ZXiYbBBgZ
Child: M/23/42
Address: 1PT7U5s9PTuXs1RK3ygoxFuAL59UjJZALV
Privkey: None

- Private Extended Key (m): xprv9s21ZrQH143K3dDaqpYX8xJWNBT7S1azx3Jvh5tjuZmXS3cLUJzG1autmmmeSFzRZF2GQm7Dr8f36saxwZGoHjhHb4u33FgkTi3cvjgFeFK
Child: m/23/42
Address: 1PT7U5s9PTuXs1RK3ygoxFuAL59UjJZALV
Privkey: 04c0ff8c288ce5f21f7f3e5e50db24e13c75d72e6815a448deb35568c6c8ed1f</pre><p><em>(you do not need to verify those addresses, they do not contain any money <img src="/crypto/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> ) </em></p>
<p>Given the master wallets public key, the webserver can create child wallets. Each of those child wallets has a unique public key and private key.  Notice that the private key is never send to the webserver. To illustrate this, we will create a tiny example.  Save it as server.py :</p><pre class="crayon-plain-tag">from hdwallet import HDWallet

# 3. store the Public Extended Key on the webserver
pub_master_key = "xpub661MyMwAqRbcG7J3wr5XW6FEvDHbqUJrKGEXVUJMTuJWJqwV1rJWZPENd1jDkEdaGVs1RGMp5oWpJ89xTu2bkRSR$
webserver_wallet = HDWallet.from_extended_key(pub_master_key)
child2342 = webserver_wallet.child(23).child(42)
print '- Public Extended Key (M):', pub_master_key
print 'Child: M/23/42'
print 'Address:', child2342.address()
print 'Privkey:', child2342.prvkey() # ... but the private keys remain *unknown*
print ''</pre><p>We did not implement the acutal HTTP server code because this is only an example. Notice that the output will be identical:</p><pre class="crayon-plain-tag">- Public Extended Key (M): xpub661MyMwAqRbcG7J3wr5XW6FEvDHbqUJrKGEXVUJMTuJWJqwV1rJWZPENd1jDkEdaGVs1RGMp5oWpJ89xTu2bkRSRSoxVpMzLG1ZXiYbBBgZ
Child: M/23/42
Address: 1PT7U5s9PTuXs1RK3ygoxFuAL59UjJZALV
Privkey: None</pre><p>Schematically this is what happens:</p>
<div id="attachment_451" style="width: 1024px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/hdwallet0.png"><img class="size-full wp-image-451" src="/wpTalkera/wp-content/uploads/2014/12/hdwallet0.png" alt="hdwallet0" width="1014" height="114" /></a><p class="wp-caption-text">hdwallet0</p></div>
<p>The client generates a master wallet consisting of a private masterkey and a public masterkey.</p>
<div id="attachment_446" style="width: 773px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/hdwallet11.png"><img class="size-full wp-image-446" src="/wpTalkera/wp-content/uploads/2014/12/hdwallet11.png" alt="hdwallet1" width="763" height="126" /></a><p class="wp-caption-text">hdwallet1</p></div>
<p>The client tranmits its public masterkey to the server. The private key (used to control the bitcoins the master wallet holds) is never transmitted to the server. One can receive hundreds of bitcoins using this public masterkey, but to send it normally a private masterkey would have to be transmitted. This is a major security risk, and is not what will happen. Instead, the  public masterkey will be used to generate child wallets:</p>
<div id="attachment_448" style="width: 1024px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/hdwallet21.png"><img class="size-full wp-image-448" src="/wpTalkera/wp-content/uploads/2014/12/hdwallet21.png" alt="hdwallet2" width="1014" height="114" /></a><p class="wp-caption-text">hdwallet2</p></div>
<p>Every child wallet has a unique keypair (public key, private key), just like a traditional bitcoin wallet. The webserver does not know this private key. A private key can be generated on client side for one or more child wallets. These child private keys never have to be transmitted to the webserver, the client controls the bitcoin master wallet and child wallets at all times.</p>
<p><strong>Concluding:</strong><br />
Even though it is still experiment, HDWallet could increase the security of bitcoin webserver services by giving back control over the private keys to the customers. This could have a major impact on all bitcoin services such as exchanges, online wallets and shops because private keys do not have to be on a webserver at any point in time.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fhdwallet-secure-hierarchical-bitcoin-wallet-generation%2F&amp;title=HDWallet%3A%20Secure%2C%20hierarchical%20Bitcoin%20wallet%20generation" id="wpa2a_68"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/hdwallet-secure-hierarchical-bitcoin-wallet-generation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Pywallet, a wallet recovery tool</title>
		<link>https://talkera.org/crypto/pywallet-a-wallet-recovery-tool/</link>
		<comments>https://talkera.org/crypto/pywallet-a-wallet-recovery-tool/#comments</comments>
		<pubDate>Fri, 12 Dec 2014 00:29:20 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=406</guid>
		<description><![CDATA[If you are using a desktop wallet or your wallet seems broken or is not opening for some reasons then you can try to recover wallets using pywallet, a wallet recovery tool. [crayon-54acc6c81353b994450791/] Now disconnect all your internet connections and run the command [crayon-54acc6c81354d138331543/] This will start a simple web interface that you can use [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you are using a desktop wallet or your wallet seems broken or is not opening for some reasons then you can try to recover wallets using pywallet, a wallet recovery tool.</p>
<p><div id="attachment_407" style="width: 650px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/pywallet.png"><img class="wp-image-407" src="/wpTalkera/wp-content/uploads/2014/12/pywallet.png" alt="pywallet" width="640" height="353" /></a><p class="wp-caption-text">Pywallet Web Interface</p></div><br />
<pre class="crayon-plain-tag">git clone https://github.com/jackjack-jj/pywallet.git
cd pywallet</pre><br />
Now disconnect all your internet connections and run the command<br />
<pre class="crayon-plain-tag">python pywallet.py --web</pre><br />
This will start a simple web interface that you can use to recover your private key and other information.  You can open the url in your webbrowser. Simply set the wallet directory, wallet file and press dump wallet.</p>
<p>If you are a more advanced user, you can do the same thing fully in commandline:</p><pre class="crayon-plain-tag">python pywallet.py --dumpwallet /home/code/.bitcoin/wallet.dat &gt; delete.txt</pre><p>Open delete.txt with your favourite editor.  If you wallet is encrypted (to prevent theft), use:</p><pre class="crayon-plain-tag">python pywallet.py --passphrase=PASSPHRASE --dumpwallet /home/code/.bitcoin/wallet.dat &gt; delete.txt</pre><p>Remember, your private keys will be in delete.txt.  These keys control your bitcoins, so be sure to delete the file <em>delete.txt</em> from your disk once you are finished <img src="/crypto/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
<p><strong>Success cases:</strong><br />
<a href="https://bitcointalk.org/index.php?topic=34028.msg9281055#msg9281055" target="_blank">https://bitcointalk.org/index.php?topic=34028.msg9281055#msg9281055</a></p>
<div id="attachment_408" style="width: 960px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/bitcointalk.png"><img class="size-full wp-image-408" src="/wpTalkera/wp-content/uploads/2014/12/bitcointalk.png" alt="bitcointalk" width="950" height="372" /></a><p class="wp-caption-text">bitcointalk</p></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fpywallet-a-wallet-recovery-tool%2F&amp;title=Pywallet%2C%20a%20wallet%20recovery%20tool" id="wpa2a_70"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/pywallet-a-wallet-recovery-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secret messages in the blockchain</title>
		<link>https://talkera.org/crypto/secret-messages-in-the-blockchain/</link>
		<comments>https://talkera.org/crypto/secret-messages-in-the-blockchain/#comments</comments>
		<pubDate>Thu, 11 Dec 2014 16:27:09 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=376</guid>
		<description><![CDATA[Many messages are encoded into the bitcoin blockchain, usually they are encoded as hexadecimal. We have created a script to read messages on the bitcoin blockchain, inspired by another program (possibly written by Satoshi Nakamoto) which relies on having the entire blockchain on your machine.   You do not need to download the entire blockchain for [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Many messages are encoded into the bitcoin blockchain, usually they are encoded as hexadecimal. We have created a script to read messages on the bitcoin blockchain, inspired by <a href="https://gist.githubusercontent.com/shirriff/64f48fa09a61b56ffcf9/raw/bitcoin-file-downloader.py" target="_blank">another program</a> (possibly written by Satoshi Nakamoto) which relies on having the entire blockchain on your machine.   You do not need to download the entire blockchain for our version, it relies on blockexplorer.com</p>
<p><div id="attachment_674" style="width: 650px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/blockchain.jpg"><img class="wp-image-674" src="/wpTalkera/wp-content/uploads/2014/12/blockchain.jpg" alt="Secret messages are stored inside the blockchain" width="640" height="384" /></a><p class="wp-caption-text">Secret messages are stored inside the blockchain</p></div><br />
<pre class="crayon-plain-tag"># inspired by https://gist.githubusercontent.com/shirriff/64f48fa09a61b56ffcf9/raw/bitcoin-file-downloader.py

import sys
import os
import jsonrpc
import json
import struct
from binascii import crc32,hexlify,unhexlify
import urllib2
 
if len(sys.argv) != 2:
    print("Usage: %s &lt;txhash&gt;")
    sys.exit()
 
txid = sys.argv[1]
 
url = "https://blockexplorer.com/rawtx/" + txid
response = urllib2.urlopen(url)
data = response.read()
data = json.loads(data)

for d in data['out']:
  values = d['scriptPubKey'].split(' ')
  print unhexlify(values[2])</pre><br />
Copy this code into grab.py and make sure you have all modules. It requires the dependency jsonrpc and some others:<br />
<pre class="crayon-plain-tag">sudo pip install jsonrpc</pre><br />
Execute with:<br />
<pre class="crayon-plain-tag">python grab.py &lt;transactionid&gt;</pre><br />
Example messages (no spoilers, run the  code yourself <img src="/crypto/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> ):<br />
<pre class="crayon-plain-tag">python grab.py 8881a937a437ff6ce83be3a89d77ea88ee12315f37f7ef0dd3742c30eef92dba
python grab.py 59956e142df4113b44c80b029298fbe89a1f6d445019c449a9125eded1f6a84c
python grab.py da10564f43e2fc5697d5fd88ee76181749e43e6e11d89175d14dd12c9e596496
python grab.py 61df9fdb7ec4157c6e19a35dde07525cc4f725e07ef0411124ec1ce0b8e8355c
python grab.py ce5e6aabe78927febcc8b7a8662f48b03e2bcde239a8f537f29e2cd152940bcf</pre><br />
Feel free to comment.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fsecret-messages-in-the-blockchain%2F&amp;title=Secret%20messages%20in%20the%20blockchain" id="wpa2a_72"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/secret-messages-in-the-blockchain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bitcointalk thread notifier</title>
		<link>https://talkera.org/crypto/bitcointalk-thread-notifier/</link>
		<comments>https://talkera.org/crypto/bitcointalk-thread-notifier/#comments</comments>
		<pubDate>Thu, 11 Dec 2014 13:33:07 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=363</guid>
		<description><![CDATA[We found a small tool that can be used to monitor the bitcointalk forum (and any SMF forum) for keywords. This could be very useful if you want to monitor the threads related to your company,  price speculation or simply for fun. [crayon-54acc6c8149dd947416626/] We open crawler.py using vim, to do source code inspection and it seems [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>We found a small tool that can be used to monitor the bitcointalk forum (and any SMF forum) for keywords. This could be very useful if you want to monitor the threads related to your company,  price speculation or simply for fun.</p>
<p><div id="attachment_847" style="width: 650px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/bitcointalk1.png"><img class="wp-image-847" src="/wpTalkera/wp-content/uploads/2014/12/bitcointalk1.png" alt="The Bitcointalk Simple Machines Forum (SMF) " width="640" height="360" /></a><p class="wp-caption-text">The Bitcointalk Simple Machines Forum (SMF)</p></div><br />
<pre class="crayon-plain-tag">git clone https://github.com/Storj/bitcointalkbot.git
cd bitcointalkbot
sudo pip3 install -r requirements.txt</pre><br />
We open crawler.py using vim, to do source code inspection and it seems o.k. but you should inspect too <img src="/crypto/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" />   It contains a set of keywords defined as:<br />
<pre class="crayon-plain-tag">KEYWORDS = ['Storj', 'Storj Labs', 'SJCX', 'Storjcoin X', 'Storjcoin']</pre><br />
Change these keywords to:<br />
<pre class="crayon-plain-tag">KEYWORDS = ['Money']</pre><br />
Now run the script with:<br />
<pre class="crayon-plain-tag">python3 crawler.py</pre><br />
Each time the keyword &#8216;Money&#8217; is mentioned in the latest Bitcointalk forum posts you get the url of that topic.</p>
<p><strong>How it works?</strong><br />
The script downloads the RSS feed of the forum and parses it.  The rss feed url is <a href="https://bitcointalk.org/index.php?type=rss;action=.xml&amp;limit=100" target="_blank">https://bitcointalk.org/index.php?type=rss;action=.xml&amp;limit=100</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fbitcointalk-thread-notifier%2F&amp;title=Bitcointalk%20thread%20notifier" id="wpa2a_74"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/bitcointalk-thread-notifier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inside Bitcoin with Coinkite</title>
		<link>https://talkera.org/crypto/inside-bitcoin-with-coinkite/</link>
		<comments>https://talkera.org/crypto/inside-bitcoin-with-coinkite/#comments</comments>
		<pubDate>Wed, 10 Dec 2014 14:10:24 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=325</guid>
		<description><![CDATA[Coinkite is a bitcoin wallet focused on hardcore privacy, bank-grade security, developer&#8217;s API, speed and advanced features. Their official github page is https://github.com/coinkite  and contains the source code of many programs. Coinkite Bitcoin API The Coinkite Bitcoin API supports: View balances, transactions and search by transaction hash. Send funds, create vouchers, create new receive pubkeys. Drive your [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Coinkite is a bitcoin wallet focused on hardcore privacy, bank-grade security, developer&#8217;s API, speed and advanced features. Their official github page is <a href="https://github.com/coinkite" target="_blank">https://github.com/coinkite</a>  and contains the source code of many programs.</p>
<p><strong>Coinkite Bitcoin API</strong><br />
The Coinkite Bitcoin API supports:</p>
<ul class="simple">
<li>View balances, transactions and search by transaction hash.</li>
<li>Send funds, create vouchers, create new receive pubkeys.</li>
<li>Drive your Coinkite terminal remotely.</li>
</ul>
<p>A number of endpoints of the Coinkite API provide simple data sources for the public. They do not require authorization and may provide cached responses as appropriate.  For a lists of all endpoints that the API server supports visit: <a href="https://api.coinkite.com/public/endpoints" target="_blank">https://api.coinkite.com/public/endpoints</a></p><pre class="crayon-plain-tag">git clone https://github.com/coinkite/coinkite-python.git
cd coinkite-python/
cd ckapi
cd standalone
./ck-helper.py /v1/spot_quote/BTC/USD</pre><p>The program will tell us</p><pre class="crayon-plain-tag">Please define CK_API_KEY and CK_API_SECRET in the environment</pre><p>We visit <a href="https://coinkite.com/welcome" target="_blank">https://coinkite.com/welcome</a>  and register.  Finally we visit <a href="https://coinkite.com/merchant/api" target="_blank">https://coinkite.com/merchant/api</a>  and create an API key.  Upon generating we can set some permissions:</p>
<ul>
<li>Read any and all data</li>
<li>Setup new receive funds</li>
<li>Send funds out</li>
<li>Transfer between accounts</li>
<li>Control terminals</li>
<li>Watches for events</li>
<li>Manage subaccounts</li>
</ul>
<p>We open a terminal and enter the commands:</p><pre class="crayon-plain-tag">export CK_API_KEY=**********************
export CK_API_SECRET=************************</pre><p>Now we can fully control of the Coinkite API. We can enter the command</p><pre class="crayon-plain-tag">./ck-helper.py /v1/spot_quote/BTC/USD</pre><p>and get valid output.   We can use this command with help of curl:</p><pre class="crayon-plain-tag">curl `./ck-helper.py /v1/spot_quote/BTC/EUR`</pre><p>Output is JSON formatted data. In this particular case it returns the exchange range between BTC and EUR.</p><pre class="crayon-plain-tag">{
  "args": {
    "amount": 1,
    "from_cct": "EUR",
    "to_cct": "BTC"
  },
  "result": {
    "currency": "BTC",
    "decimal": 0.00350435,
    "integer": 350435,
    "integer_scale": 8,
    "pretty": "\u0e3f 0.00350435 BTC",
    "string": "0.00350435"
  }
}</pre><p>Coinkite provides an interface to their API with Python, PHP, Javascript and Ruby.  They also have a number of sample programs including Paper OTP, Bitcoin ATM, Real Time Invoices, Offline Multisig Python Tool, Mobile Invoices and so on. A full list can be found here<a href="https://coinkite.com/apps" target="_blank"> https://coinkite.com/apps</a>.</p>
<p><strong>Paper OTP</strong><br />
Manage a single-page PDF containing single-use numeric tokens. The tokens are generated using the RFC6238 algorithm with the X/Y coordinate as the interval number. The &#8220;secret&#8221; seed values used here are base32-encoded strings of length 16.<strong> </strong></p><pre class="crayon-plain-tag">git clone https://github.com/coinkite/paper_otp.git
cd paper_otp/
sudo pip install onetimepass
python paper_otp.py</pre><p>This will output a matrix of 10&#215;10 containing random numbers:</p><pre class="crayon-plain-tag">A      B      C      D      E      F      G      H      J      K   
  1  328482 812658 073348 887919 320986 435986 964213 267638 985814 003773 
  2  341298 818485 657398 091297 820368 525990 304831 129574 832989 409881 
  3  798492 850655 105215 146671 114047 066140 589368 295982 146532 971666 
  4  471360 691505 859474 350337 253438 330145 615787 717447 725274 976597 
  5  042840 650232 642231 831028 029268 908291 310196 270512 912692 418215 
  6  843686 446905 933720 022089 638885 094539 969405 444032 215562 879223 
  7  511481 356162 556820 882471 610006 959921 295130 053730 089011 347629 
  8  522689 856423 336498 070421 870043 720282 334467 729304 404019 369036 
  9  033452 014403 577183 454218 040169 589520 664233 442376 068681 280110 
  0  073717 856698 041115 201281 931625 914139 274147 682697 065067 383489</pre><p>A file called test.pdf is generated in the background containing your OTP page.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Finside-bitcoin-with-coinkite%2F&amp;title=Inside%20Bitcoin%20with%20Coinkite" id="wpa2a_76"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/inside-bitcoin-with-coinkite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blockchain as Random number generator</title>
		<link>https://talkera.org/crypto/blockchain-as-random-number-generator/</link>
		<comments>https://talkera.org/crypto/blockchain-as-random-number-generator/#comments</comments>
		<pubDate>Tue, 09 Dec 2014 23:44:03 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=299</guid>
		<description><![CDATA[Lack of pattern or predictability in events, randomness, has many applications in computing as well as other fields.  How do you generate good Random numbers?   You might be relying on the Operating System implementation of a pseudo random generator. For example, if you are a user of a Unix system, /dev/random is a file that [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Lack of pattern or predictability in events, randomness, has many applications in computing as well as other fields.  How do you generate good Random numbers?   You might be relying on the Operating System implementation of a pseudo random generator. For example, if you are a user of a Unix system, <b>/dev/random</b> is a file that serves as a pseudo random generator.</p>
<p><div id="attachment_850" style="width: 650px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/random.jpg"><img class="wp-image-850" src="/wpTalkera/wp-content/uploads/2014/12/random.jpg" alt="Traditional random number generator. Is it worse or better number generator than the block chain? You decide." width="640" height="427" /></a><p class="wp-caption-text">traditional random number generator, worse or better number generator than the block chain? You decide.</p></div><br />
<pre class="crayon-plain-tag">od -An -N2 -i /dev/random</pre><br />
You could also rely on a centralized server to serve you random numbers such as  <a href="http://random.org" target="_blank">random.org</a>   One can wonder if these are really unpredictable. Either way, these are very mainstream solutions and maybe you are looking for something exciting. Did you know you can use the bitcoin blockchain as a random number generator?<br />
<pre class="crayon-plain-tag">git clone https://github.com/kyonetca/blockchain-random
cd blockchain-random
sudo python setup.py install</pre><br />
You do not need to download the entire bitcoin blockchain to use this library, it relies on <a href="https://blockchain.info" target="_blank">blockchain.info</a> to get the blockchain. After you&#8217;ve run the install script, you can use <code>blockrandom</code> just like Python&#8217;s standard library<code>random</code> module. Example script:<br />
<pre class="crayon-plain-tag">import blockrandom

blockrandom.randbytes(5)
bytearray(b'\xff\xdcb\x9c\xee')

print blockrandom.randbool()

print blockrandom.randint(0, 100)</pre><br />
If you run the script you should get a random number. To print ten random integers run:<br />
<pre class="crayon-plain-tag">import blockrandom

blockrandom.randbytes(50)
bytearray(b'\xff\xdcb\x9c\xee')

#print ten random integers  
for i in range(0,10):
  print blockrandom.randint(0, 100)</pre><br />
&nbsp;</p>
<p><strong>How does it work? </strong><br />
<strong> </strong>Unconfirmed transaction hashes are queried from <a href="https://blockchain.info/">blockchain.info</a>.  How well does this work? Well, here&#8217;s 1MB of truly random bytes from unconfirmed transactions:</p>
<div id="attachment_316" style="width: 1562px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/transaction_bytes.png"><img class="size-full wp-image-316" src="/wpTalkera/wp-content/uploads/2014/12/transaction_bytes.png" alt="transaction_bytes" width="1552" height="928" /></a><p class="wp-caption-text">transaction_bytes</p></div>
<p>If you would quiry the same data twice in a very very short timeframe, you could end up with the same numbers.</p>
<p><strong>How secure is it?</strong><br />
Unconfirmed transaction hashes are queried from <a href="https://blockchain.info/">blockchain.info</a>.  We can simply get a list of uncomfirmed-transactions from <a href="http://blockchain.info/unconfirmed-transactions?format=json" target="_blank">http://blockchain.info/unconfirmed-transactions?format=json</a>  which is the data it uses. Even though blockchain.info supports Hypertext Transfer Protocol Secure (HTTPS), the software uses the common Hypertext Transfer Protocol (HTTP).  You can find the url inside blockrandom.py.  This makes it possible for a criminal to get your random numbers, not what you would use inside your banking software. <img src="/crypto/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> Luckily that can be easily modified.  Simply change the top lines of blockrandom.py to:</p><pre class="crayon-plain-tag">import multiprocessing, Queue
from math_utils import murmur3_bytes, iterative_murmur3, murmur3_32, _rshift
from random import SystemRandom
from struct import unpack
from sys import stderr
from entropy_collector import HashCollectorDaemon

_queue = multiprocessing.Queue(5000)
_spare_queue = multiprocessing.Queue(5000)
_url = "https://blockchain.info/unconfirmed-transactions?format=json"
_sysrandom = SystemRandom() # only use in the most dire circumstances</pre><p>We check all files using:</p><pre class="crayon-plain-tag">grep http *.py</pre><p>Another thing to consider is that the software uses blockchain.info to get the data. This requires that your application is connected to the internet at all times. It also makes your application depend on the uptime of the blockchain.info webserver.  That said,  it could be modified to support a variety of blockchain explorer sites. I didn&#8217;t commit the changes to git repository of the developer, so you may want to do that <img src="/crypto/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
<p>More information:  <a href="https://github.com/kyonetca/blockchain-random" target="_blank">https://github.com/kyonetca/blockchain-random</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fblockchain-as-random-number-generator%2F&amp;title=Blockchain%20as%20Random%20number%20generator" id="wpa2a_78"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/blockchain-as-random-number-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Bitcoin Works</title>
		<link>https://talkera.org/crypto/how-bitcoin-works/</link>
		<comments>https://talkera.org/crypto/how-bitcoin-works/#comments</comments>
		<pubDate>Tue, 09 Dec 2014 13:37:27 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=292</guid>
		<description><![CDATA[An early draft of Andreas M. Antonopoulos new book &#8220;Mastering Bitcoin&#8221; is online in his repository of github.  The book will contain many topics including &#8220;What is Bitcoin&#8221;,  &#8220;History of Bitcoin&#8221;, &#8220;How Bitcoin Works&#8221; and many more great topics!  The book is intended for developers, but the first two chapters cover bitcoin at a level that is approachable [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>An early draft of Andreas M. Antonopoulos new book &#8220;Mastering Bitcoin&#8221; is online in his repository of github.  The book will contain many topics including &#8220;What is Bitcoin&#8221;,  &#8220;History of Bitcoin&#8221;, &#8220;How Bitcoin Works&#8221; and many more great topics!  The book is intended for developers, but the first two chapters cover bitcoin at a level that is approachable to non-programmers. You can pre-read the draft here:  <a href="https://github.com/aantonop/bitcoinbook/blob/develop/ch02.asciidoc" target="_blank">https://github.com/aantonop/bitcoinbook/blob/develop/ch02.asciidoc</a></p>
<p>More information:  <a href="https://www.bitcoinbook.info/" target="_blank">https://www.bitcoinbook.info/</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fhow-bitcoin-works%2F&amp;title=How%20Bitcoin%20Works" id="wpa2a_80"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/how-bitcoin-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List of Bitcoin Faucets</title>
		<link>https://talkera.org/crypto/list-of-bitcoin-faucets/</link>
		<comments>https://talkera.org/crypto/list-of-bitcoin-faucets/#comments</comments>
		<pubDate>Tue, 09 Dec 2014 11:28:27 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=283</guid>
		<description><![CDATA[Faucets are gone due to lack of profit. Complete list of bitcoin faucets. Bookmark this site! Website Info Reward Rabbitcoin.biz Microwallet 45 satoshi Bitcoinker.com Microwallet 266 satoshi DanceFaucet.com Microwallet 350 satoshi Businessideas.nl Microwallet 254 satoshi Scratch4Satoshis.com Microwallet 225 satoshi BitcoinGenie.info Microwallet 200 satoshi QoinFaucet.com Microwallet 200 satoshi FairyFaucet.com Microwallet 200 satoshi PinkTussy.com Microwallet 184 satoshi [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Faucets are gone due to lack of profit. Complete list of bitcoin faucets. Bookmark this site! <img src="/crypto/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
<table border="0" cellspacing="0">
<colgroup width="142"></colgroup>
<colgroup span="2" width="85"></colgroup>
<tbody>
<tr>
<td align="center" height="17"><b><span style="font-family: 'Liberation Serif';">Website</span></b></td>
<td align="center"><b><span style="font-family: 'Liberation Serif';">Info</span></b></td>
<td align="center"><b><span style="font-family: 'Liberation Serif';">Reward</span></b></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://Rabbitcoin.biz" target="_blank"><span style="font-family: 'Liberation Serif';">Rabbitcoin.biz</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">45 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://Bitcoinker.com" target="_blank"><span style="font-family: 'Liberation Serif';">Bitcoinker.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">266 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://DanceFaucet.com" target="_blank"><span style="font-family: 'Liberation Serif';">DanceFaucet.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">350 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://Businessideas.nl" target="_blank"><span style="font-family: 'Liberation Serif';">Businessideas.nl</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">254 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://Scratch4Satoshis.com" target="_blank"><span style="font-family: 'Liberation Serif';">Scratch4Satoshis.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">225 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://BitcoinGenie.info" target="_blank"><span style="font-family: 'Liberation Serif';">BitcoinGenie.info</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">200 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://QoinFaucet.com" target="_blank"><span style="font-family: 'Liberation Serif';">QoinFaucet.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">200 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://FairyFaucet.com" target="_blank"><span style="font-family: 'Liberation Serif';">FairyFaucet.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">200 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://PinkTussy.com" target="_blank"><span style="font-family: 'Liberation Serif';">PinkTussy.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">184 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://100Satoshi.net" target="_blank"><span style="font-family: 'Liberation Serif';">100Satoshi.net</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">158 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://Coin-giveaway.info" target="_blank"><span style="font-family: 'Liberation Serif';">Coin-giveaway.info</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">153 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://Getbicoins.dixo.net" target="_blank"><span style="font-family: 'Liberation Serif';">Getbicoins.dixo.net</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">140 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://FreeBitcoins.nx.tc" target="_blank"><span style="font-family: 'Liberation Serif';">FreeBitcoins.nx.tc</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">130 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://FlyingFaucet.com" target="_blank"><span style="font-family: 'Liberation Serif';">FlyingFaucet.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">120 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://BitcoinGator.com" target="_blank"><span style="font-family: 'Liberation Serif';">BitcoinGator.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">111 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://MyFreeBitcoins.org" target="_blank"><span style="font-family: 'Liberation Serif';">MyFreeBitcoins.org</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">110 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://Free-Bitcoin-Faucet.tk" target="_blank"><span style="font-family: 'Liberation Serif';">Free-Bitcoin-Faucet.tk</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">102 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://MoneyInPJs.com" target="_blank"><span style="font-family: 'Liberation Serif';">MoneyInPJs.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">102 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://PizzaFaucet.com" target="_blank"><span style="font-family: 'Liberation Serif';">PizzaFaucet.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">100 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://TheRunningFaucet.com" target="_blank"><span style="font-family: 'Liberation Serif';">TheRunningFaucet.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Microwallet</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">100 satoshi</span></td>
</tr>
<tr>
<td align="left" height="17"><a href="http://FreeBitco.in" target="_blank"><span style="font-family: 'Liberation Serif';">FreeBitco.in</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Custom</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">550 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://BitcoinZebra.com" target="_blank"><span style="font-family: 'Liberation Serif';">BitcoinZebra.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Cusutom</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">330 satoshi</span></td>
</tr>
<tr>
<td align="left" height="17"><a href="http://Moonbit.co.in" target="_blank"><span style="font-family: 'Liberation Serif';">Moonbit.co.in</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Custom</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">225 satoshi</span></td>
</tr>
<tr>
<td align="left" height="32"><a href="http://BitOnPlay.com" target="_blank"><span style="font-family: 'Liberation Serif';">BitOnPlay.com</span></a></td>
<td align="left"><span style="font-family: 'Liberation Serif';">Custom</span></td>
<td align="left"><span style="font-family: 'Liberation Serif';">600 satoshi</span></td>
</tr>
</tbody>
</table>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Flist-of-bitcoin-faucets%2F&amp;title=List%20of%20Bitcoin%20Faucets" id="wpa2a_82"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/list-of-bitcoin-faucets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Blockchain.info API and Python</title>
		<link>https://talkera.org/crypto/the-blockchain-info-api-and-python/</link>
		<comments>https://talkera.org/crypto/the-blockchain-info-api-and-python/#comments</comments>
		<pubDate>Sun, 07 Dec 2014 15:23:42 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=272</guid>
		<description><![CDATA[We decided to play around with the Blockchain.info API.  We wrote a small Python program that gets a random bitcoin address and prints the sent and received bitcoins, and can explore the blockchain. [crayon-54acc6c816d0f369338358/] Save the file as example.py and run [crayon-54acc6c816d23182548640/] The total_received and total_sent are shown in Satoshi (the smallest unit).  Thus the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>We decided to play around with the Blockchain.info API.  We wrote a small Python program that gets a random bitcoin address and prints the sent and received bitcoins, and can explore the blockchain.</p>
<p><div id="attachment_853" style="width: 588px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/9.jpg"><img class="size-full wp-image-853" src="/wpTalkera/wp-content/uploads/2014/12/9.jpg" alt="blockchain.info website" width="578" height="338" /></a><p class="wp-caption-text">blockchain.info website</p></div><br />
<pre class="crayon-plain-tag">import urllib2
import json
import numpy as np
import matplotlib.pyplot as plt
from pprint import pprint


def showInfo(address):
  response = urllib2.urlopen('https://blockchain.info/address/' + address + '?format=json')
  data = response.read()

  val = []
  data = json.loads(data)

  print data['address']
  print data['total_received']
  print data['total_sent']

showInfo("1E6dum2sxdctc9hMV1Dk1xd8Vang3u9EA2")</pre><br />
Save the file as example.py and run<br />
<pre class="crayon-plain-tag">python example.py</pre><br />
The total_received and total_sent are shown in Satoshi (the smallest unit).  Thus the output 2456674  means 0.02456674 BTC</p>
<p>We then extend it to display information of a block:</p><pre class="crayon-plain-tag">import urllib2
import json
import numpy as np
import matplotlib.pyplot as plt
from pprint import pprint
 

def showInfo(address): 
  response = urllib2.urlopen('https://blockchain.info/address/' + address + '?format=json')
  data = response.read()

  val = []
  data = json.loads(data)

  print data['address']
  print data['total_received']
  print data['total_sent'] 

def showBlock(block):

  response = urllib2.urlopen('https://blockchain.info/rawblock/' + block + '?format=json')
  data = response.read()

  val = []
  data = json.loads(data)

  print '-----------------------------'
  print 'Block index: \t\t',
  print data['block_index']

  print 'Previous block:\t\t',
  print data['prev_block']

  print 'Time:\t\t\t',
  print data['time']
 
  print 'Nr. Transactions:\t',
  print data['n_tx']


  print '------------------------------'
showBlock('00000000000009fdb874661ff1c08f0a2d082aa788a5b90fbd428ce3622e121c')
#showInfo("1E6dum2sxdctc9hMV1Dk1xd8Vang3u9EA2")</pre><p>This will output:</p><pre class="crayon-plain-tag">-----------------------------
Block index: 		169563
Previous block:		0000000000000753b0a49656f0105c317851f7c2b3945eea0c272499547af433
Time:			1322128192
Nr. Transactions:	27
------------------------------</pre><p>If you want to see the Genisis block, the id is 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f</p>
<p>Further reading: <a href="https://blockchain.info/api/blockchain_api" target="_blank">https://blockchain.info/api/blockchain_api</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fthe-blockchain-info-api-and-python%2F&amp;title=The%20Blockchain.info%20API%20and%20Python" id="wpa2a_84"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/the-blockchain-info-api-and-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cryptocurrency &amp; Big Data</title>
		<link>https://talkera.org/crypto/cryptocurrency-big-data/</link>
		<comments>https://talkera.org/crypto/cryptocurrency-big-data/#comments</comments>
		<pubDate>Sun, 07 Dec 2014 12:19:23 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=256</guid>
		<description><![CDATA[Coin Market Capitalization can be seen on coinmarketcap.com for all cryptocurrencies.  All kinds of data can be observed : market price, capitalization, available supply and so on. It&#8217;s a great site, but you may want to do some more with the data.  This little script draws the entire history of a market price for a distinct [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Coin Market Capitalization can be seen on <a title="https://coinmarketcap.com" href="https://coinmarketcap.com" target="_blank">coinmarketcap.com</a> for all cryptocurrencies.  All kinds of data can be observed : market price, capitalization, available supply and so on. It&#8217;s a great site, but you may want to do some more with the data.  This little script draws the entire history of a market price for a distinct coin:</p><pre class="crayon-plain-tag">import json
import numpy as np
import matplotlib.pyplot as plt
from pprint import pprint


def getPrices(filename):
  val = []

  with open(filename) as data_file:
    data = json.load(data_file)

  for v in data["price_usd_data"]:
    print v[1]
    val.append(v[1])

  return val

btc = getPrices("bitcoin.json")
plt.plot(btc)
plt.show()</pre><p>Simply get the JSON data <a href="http://coinmarketcap.com/static/generated_pages/currencies/datapoints/bitcoin-365d.json" target="_blank">http://coinmarketcap.com/static/generated_pages/currencies/datapoints/bitcoin-365d.json</a></p>
<p>You can plot multiple charts in one using this little trick:</p><pre class="crayon-plain-tag">btc = getPrices("bitcoin-365.json")
btc = getPrices("litecoin-365.json")
plt.plot(btc)
plt.plot(ltc)
plt.show()</pre><p>The program outputs graphs like this:</p>
<div id="attachment_262" style="width: 822px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/figure_2.png"><img class="size-full wp-image-262" src="/wpTalkera/wp-content/uploads/2014/12/figure_2.png" alt="litecoin vs darkcoin" width="812" height="612" /></a><p class="wp-caption-text">litecoin vs darkcoin</p></div>
<p>If the market price data is too far apart, you will get strange plots.  Furthermore, you are not limited to this kind of plots <img src="/crypto/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fcryptocurrency-big-data%2F&amp;title=Cryptocurrency%20%26%20Big%20Data" id="wpa2a_86"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/cryptocurrency-big-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arbitrage opportunity detector</title>
		<link>https://talkera.org/crypto/arbitrage-opportunity-detector/</link>
		<comments>https://talkera.org/crypto/arbitrage-opportunity-detector/#comments</comments>
		<pubDate>Sat, 06 Dec 2014 17:05:02 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=247</guid>
		<description><![CDATA[I found a neat little tool called bitcoin-arbitage thats downloads data from bitcoin exchanges and tries to find arbitage opportunities. The tool has a warning:  &#8220;Real trading bots are included. Don&#8217;t put your API keys in config.py if you don&#8217;t know what you are doing&#8221;.  It supports only two exchanges for automatic trading.  For this [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I found a neat little tool called bitcoin-arbitage thats downloads data from bitcoin exchanges and tries to find arbitage opportunities. The tool has a warning:  &#8220;Real trading bots are included. Don&#8217;t put your API keys in config.py if you don&#8217;t know what you are doing&#8221;.  It supports only two exchanges for automatic trading.  For this reason, the best use is as a notification tool for your trading opportunities. The user interface is still very tech like but it could be a good tool for traders.</p>
<p>Currently supported exchanges are:</p>
<ul class="task-list">
<li>Bitstamp (USD)</li>
<li>Bitcoin24 (EUR)</li>
<li>Paymium (USD, EUR)</li>
<li>BTC-e (USD, EUR)</li>
<li>Bitfinex (USD)</li>
<li>Kraken (USD, EUR)</li>
<li>OkCoin (CNY)</li>
<li>CampBX (USD)</li>
</ul>
<p>To install and run:</p><pre class="crayon-plain-tag">git clone https://github.com/maxme/bitcoin-arbitrage.git
cd bitcoin-arbitrage/
cp arbitrage/config.py-example arbitrage/config.py
python3 arbitrage.py </pre><p>It could give some errors, but nothing important.  The program will automatically output opportunities; At the time of running, we got these:</p><pre class="crayon-plain-tag">2014-12-06 17:52:39,729 [INFO] profit: 17.555133 USD with volume: 10.000000 BTC - buy from KrakenEUR sell to PaymiumEUR ~0.46%
2014-12-06 17:52:39,731 [INFO] profit: 0.511115 USD with volume: 4.195000 BTC - buy from KrakenEUR sell to BitfinexUSD ~0.03%
2014-12-06 17:52:49,831 [INFO] profit: 30.132266 USD with volume: 10.000000 BTC - buy from BtceUSD sell to KrakenEUR ~0.81%
2014-12-06 17:52:49,854 [INFO] profit: 70.126539 USD with volume: 10.000000 BTC - buy from BtceUSD sell to PaymiumEUR ~1.88%
2014-12-06 17:52:49,878 [INFO] profit: 6.898993 USD with volume: 10.000000 BTC - buy from BtceUSD sell to KrakenUSD ~0.19%
2014-12-06 17:52:50,245 [INFO] profit: 34.493657 USD with volume: 10.000000 BTC - buy from BtceUSD sell to BitstampUSD ~0.92%
2014-12-06 17:52:51,636 [INFO] profit: 53.063079 USD with volume: 10.000000 BTC - buy from BtceUSD sell to BitfinexUSD ~1.42%
2014-12-06 17:52:51,638 [INFO] profit: 26.339595 USD with volume: 10.000000 BTC - buy from BitstampUSD sell to PaymiumEUR ~0.70%
2014-12-06 17:52:51,643 [INFO] profit: 9.276136 USD with volume: 10.000000 BTC - buy from BitstampUSD sell to BitfinexUSD ~0.25%
2014-12-06 17:52:51,643 [INFO] profit: 9.831532 USD with volume: 10.000000 BTC - buy from BitfinexUSD sell to PaymiumEUR ~0.26%</pre><p>Profits are anywhere between 0.50 $ and 70.00 $ with a trade volume of 10 BTC ( 3699.64 $ currently )</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Farbitrage-opportunity-detector%2F&amp;title=Arbitrage%20opportunity%20detector" id="wpa2a_88"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/arbitrage-opportunity-detector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generating an all in one wallet</title>
		<link>https://talkera.org/crypto/all-in-one-wallet/</link>
		<comments>https://talkera.org/crypto/all-in-one-wallet/#comments</comments>
		<pubDate>Sat, 06 Dec 2014 01:02:04 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=234</guid>
		<description><![CDATA[In this experimental tutorial we will investigate methods to create a set of wallets for cryptocoins. Each wallet is a receival address (you can receive coins on this address) and a private key.  To send coins, you have to import the private key to a desktop wallet. We will explore coinkit, a python library to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In this experimental tutorial we will investigate methods to create a set of wallets for cryptocoins. Each wallet is a receival address (you can receive coins on this address) and a private key.  To send coins, you have to import the private key to a desktop wallet. We will explore coinkit, a python library to generate addresses.  The other method is using vanitygen.  <em>Use at your own risk. Please comment about any mistakes or recommendations.</em></p>
<p>&nbsp;<br />
<strong>Coinkit script</strong><br />
Coinkit is a Python library with tools for Bitcoin and other cryptocurrencies. It is currently in Beta but it aims to support Bitcoin, Litecoin, Namecoin, Peercoin, Primecoin, Testnet, Worldcoin, Megacoin, Feathercoin, Terracoin, Novacoin, Dogecoin, Anoncoin, Protoshares, Ixcoin, Memorycoin, Infinitecoin, Cryptogenic Bullion, Quarkcoin, Netcoin, Earthcoin, Reddcoin,</p><pre class="crayon-plain-tag">sudo pip install coinkit</pre><p>Open up your favourite text editor and paste this code:</p><pre class="crayon-plain-tag">from coinkit import *

priv = BitcoinPrivateKey()
bitcoin_pub = priv.public_key()
bitcoin_address = bitcoin_pub.address()

litecoin_priv = LitecoinPrivateKey(priv.to_hex())
litecoin_pub = litecoin_priv.public_key()
litecoin_address = litecoin_pub.address()

namecoin_priv = NamecoinPrivateKey(priv.to_hex())
namecoin_pub = namecoin_priv.public_key()
namecoin_address = namecoin_pub.address()

print ""
print "Receiving address"
print "bitcoin  : " + bitcoin_address
print "litecoin : " + litecoin_address
print "namecoin : " + namecoin_address

print ""
print "Private keys "
print "bitcoin  : " + priv.to_wif()
print "litecoin : " + litecoin_priv.to_wif()
print "namecoin : " + namecoin_priv.to_wif()
print ""</pre><p>Save it as create.py and run</p><pre class="crayon-plain-tag">python create.py</pre><p>The output should be something like this:</p><pre class="crayon-plain-tag">Receiving address
bitcoin  : 1AyPpKpsraPA2DVbne6atxB5ExC1k435ea
litecoin : LVCM5Y8hwEdDH2Bkxn5tAyEqTAZHp7FPzX
namecoin : N6Ym1yKrmxUiYkk74TRA7UKyyBb4djTozU

Private keys 
bitcoin  : ************************************
litecoin : ************************************
namecoin : ************************************</pre><p>You can create a QR code for an address using this command:</p><pre class="crayon-plain-tag">qrencode YOUR_RECEIVAL_ADDRESS -o image.png</pre><p>&nbsp;</p>
<p><strong>Vanitygen</strong><br />
Vanitygen can generate regular bitcoin addresses, namecoin addresses, and testnet addresses. Using some tricks we can generate other addresses too. Install vanitygen using:</p><pre class="crayon-plain-tag"># git clone https://github.com/samr7/vanitygen
# cd vanitygen
# make</pre><p>Once compilation has finished, copy this script:</p><pre class="crayon-plain-tag">#!/bin/bash

echo "-----------------------------------"
echo "Bitcoin"
echo "-----------------------------------"
./vanitygen 1

echo "-----------------------------------"
echo "Namecoin"
echo "-----------------------------------"
./vanitygen -N NAME

echo "-----------------------------------"
echo "Litecoin"
echo "-----------------------------------"
./vanitygen -X 48 L

echo "-----------------------------------"
echo "Peercoin"
echo "-----------------------------------"
./vanitygen -X 55 PWn3d

echo "-----------------------------------"
echo "Dogecoin"
echo "-----------------------------------"
./vanitygen -X 30 DBone</pre><p>Save it as create.sh, then:</p><pre class="crayon-plain-tag">chmod 755 create.sh
./create.sh</pre><p>It will create a bitcoin, litecoin, peercoin, dogecoin and namecoin address with private key.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fall-in-one-wallet%2F&amp;title=Generating%20an%20all%20in%20one%20wallet" id="wpa2a_90"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/all-in-one-wallet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting a custom bitcoin address with vanitygen</title>
		<link>https://talkera.org/crypto/getting-a-custom-bitcoin-address-with-vanitygen/</link>
		<comments>https://talkera.org/crypto/getting-a-custom-bitcoin-address-with-vanitygen/#comments</comments>
		<pubDate>Thu, 04 Dec 2014 00:40:36 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=226</guid>
		<description><![CDATA[Vanitygen is a command-line vanity bitcoin address generator. As a user you enter the word you want to see in your bitcoin address, and the private key is generated from that.  Depending on the length of the address, this process can be either fast or extremely computationally expensive. First grab the source code of Vanitygen [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Vanitygen is a command-line vanity bitcoin address generator. As a user you enter the word you want to see in your bitcoin address, and the private key is generated from that.  Depending on the length of the address, this process can be either fast or extremely computationally expensive.</p>
<div id="attachment_856" style="width: 651px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/vanitygen.png"><img class="wp-image-856" src="/wpTalkera/wp-content/uploads/2014/12/vanitygen.png" alt="vanitygen" width="641" height="326" /></a><p class="wp-caption-text">vanitygen</p></div>
<p>First grab the source code of Vanitygen from <a href="https://github.com/samr7/vanitygen" target="_blank">https://github.com/samr7/vanitygen</a> either download the zip or use git. Then enter these commands:</p><pre class="crayon-plain-tag">unzip vanitygen-master.zip 
cd vanitygen-master/
make</pre><p>This will compile the Vanitygen source code.  Once installed we can create a custom bitcoin address. All bitcoin addresses start with the number one. We enter this command:</p><pre class="crayon-plain-tag">./vanitygen 1Tux</pre><p>After a second or so we get our bitcoin address:</p><pre class="crayon-plain-tag">Difficulty: 4553521
Pattern: 1Tux                                                                  
Address: 1TuxhRxTzHUfoHrZiUjUBLX4XUf8ANovn
Privkey: ------------------------------------</pre><p>Another example:</p><pre class="crayon-plain-tag">$ ./vanitygen 1Love
Difficulty: 4476342
[48165 K/s][total 2080000][Prob 37.2%][50% in 21.2s]                           
Pattern: 1Love
Address: 1LoveRg5t2NCDLUZh6Q8ixv74M5YGVxXaN
Privkey: 5JLUmjZiirgziDmWmNprPsNx8DYwfecUNk1FQXmDPaoKB36fX1o</pre><p>Now you have your custom bitcoin wallet.  You can import it to your desktop wallet or simply use it like this.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fgetting-a-custom-bitcoin-address-with-vanitygen%2F&amp;title=Getting%20a%20custom%20bitcoin%20address%20with%20vanitygen" id="wpa2a_92"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/getting-a-custom-bitcoin-address-with-vanitygen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming a simple bitcoin wallet</title>
		<link>https://talkera.org/crypto/programming-a-simple-bitcoin-wallet/</link>
		<comments>https://talkera.org/crypto/programming-a-simple-bitcoin-wallet/#comments</comments>
		<pubDate>Wed, 03 Dec 2014 14:45:07 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=193</guid>
		<description><![CDATA[Ever wanted to program your own bitcoin wallet?  This tutorial may help you.  We will use Python and Pybitcointools, Python library for Bitcoin signatures and transactions. We assume that you have some Python or programming experience.  If you do not have pybitcointools installed get the library from here:  https://github.com/vbuterin/pybitcointools The wallet will have this functionality: create wallet [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Ever wanted to program your own bitcoin wallet?  This tutorial may help you.  We will use Python and Pybitcointools, Python library for Bitcoin signatures and transactions. We assume that you have some Python or programming experience.  If you do not have pybitcointools installed get the library from here:  <a href="https://github.com/vbuterin/pybitcointools" target="_blank">https://github.com/vbuterin/pybitcointools</a><br />
The wallet will have this functionality:</p>
<ul>
<li>create wallet</li>
<li>check balance</li>
<li>send transactions</li>
</ul>
<p>The program will start by asking the user for a brainwallet password. From this password the public key, private key and address are generated.</p><pre class="crayon-plain-tag">from pybitcointools import *


class Wallet:

        priv = ""
        pub = ""
        address = ""

        def createWallet(self,brainwalletpassword):
                priv = sha256(brainwalletpassword)
                pub = privtopub(priv)
                address = pubtoaddr(pub)

                print "Address : " + address


x = Wallet()

password = raw_input("Your brain wallet password: ")
x.createWallet(password)</pre><p>Now we will add the functionality to view the current balance. This is a simple function:</p><pre class="crayon-plain-tag">def balance(self):
                print unspent(self.address)</pre><p>Simply call x.balance() to use it.  We did not send any btc to this wallet, which is what you need to do now to test the functionality of sending BTC. We make a small transaction to this bitcoin wallet and send a tiny amount to our brainwallet. We view <a href="https://blockchain.info" target="_blank">blockchain.info</a> to see we have received the transaction (type your address), and we wait until it is fully confirmed. Let us implement the code to send the BTC:</p><pre class="crayon-plain-tag">from pybitcointools import *


class Wallet:

	priv = ""
	pub = ""
	address = ""

	def createWallet(self,brainwalletpassword):
		self.priv = sha256(brainwalletpassword)
		self.pub = privtopub(self.priv)
		self.address = pubtoaddr(self.pub)

		print "Address : " + self.address

	def balance(self):
		print unspent(self.address)

	def sendBTC(self,dst, amount):
		h = history(self.address)
		#print h
		outs = [{'value': amount, 'address': dst}] 
		tx = mksend(h,outs, self.address, 10000)
		tx2 = sign(tx,0,self.priv)
		pushtx(tx2)

x = Wallet()

password = raw_input("Your brain wallet password: ")
x.createWallet(password)

x.balance()

x.sendBTC('1A1bBJwQMsbEbdyAnfe1ESvVAM3hmB6fSC', 20000)</pre><p>(yes, we can send bitcoin in pure python). We added the function sendBTC which has the parameters destination address and amount (We hard-coded the fee).  Note that the bitcoin network only knows about the smallest unit (satoshi), and not about mBTC, kBTC, bits or BTC.    We hard-coded the fee to 10000.   We hardcoded 20000 as the amount of satoshi we sent.  In order to make a transaction, you must sign it with your private key. Finally we call pushtx which broadcasts the transaction to the bitcoin network.  Upon viewing your wallet again on any blockchain explorer  <a href="https://blockchain.info" target="_blank">blockchain.info</a>  you should see your (unconfirmed) transaction appearing.</p>
<div id="attachment_209" style="width: 1034px" class="wp-caption alignnone"><a href="/wpTalkera/wp-content/uploads/2014/12/blockchain.png"><img class="wp-image-209 size-large" src="/wpTalkera/wp-content/uploads/2014/12/blockchain-1024x285.png" alt="blockchain.info transaction" width="1024" height="285" /></a><p class="wp-caption-text">Finding the transaction on blockchain.info</p></div>
<p>&nbsp;</p>
<p>What&#8217;s next? You should do proper error handling, secure the wallet, create the ability for backups, create some form of a user interface, and the list goes on :). Pybitcointools relies on blockchain.info for sending bitcoins;</p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fprogramming-a-simple-bitcoin-wallet%2F&amp;title=Programming%20a%20simple%20bitcoin%20wallet" id="wpa2a_94"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/programming-a-simple-bitcoin-wallet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux shell commands for Bitcoin part II</title>
		<link>https://talkera.org/crypto/linux-shell-commands-for-bitcoin-part-ii/</link>
		<comments>https://talkera.org/crypto/linux-shell-commands-for-bitcoin-part-ii/#comments</comments>
		<pubDate>Tue, 02 Dec 2014 13:15:39 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=154</guid>
		<description><![CDATA[If you have not read part 1 of this tutorial, see https://talkera.org/wpTalkera/linux-shell-commands-for-bitcoin/  I had a lot of replies and decided to write a follow up; Are you a sysadmin, software developer, linux guru? Have you ever dreamt to build the worlds biggest bitcoin exchange? Do you want to create an online marketplace? This article will help you to get [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you have not read part 1 of this tutorial, see <a href="/wpTalkera/linux-shell-commands-for-bitcoin/" target="_blank">https://talkera.org/wpTalkera/linux-shell-commands-for-bitcoin/</a>  I had a lot of replies and decided to write a follow up;</p>
<p>Are you a sysadmin, software developer, linux guru? Have you ever dreamt to build the worlds biggest bitcoin exchange? Do you want to create an online marketplace? This article will help you to get started with your exciting new bitcoin project!</p>
<p>Let us take some of the latest bitcoin software tools:</p>
<ul>
<li>zbar-tools</li>
<li>pybitcointools</li>
<li>python-trezor</li>
<li>python-mnemonic</li>
<li>bitcoin-bash tools</li>
</ul>
<p>&nbsp;</p>
<p><strong>zbar-tools</strong><br />
ZBar is an open source software suite for reading bar codes from various sources.  QR codes are very popular amongst the bitcoin community. You can either compile zbar from source  (bzip2 -d zbar.tar.bz2; tar xvf zbar.tar; ./configure; make)  or right from the repository:</p>
<blockquote><p>$ sudo apt-get install zbar-tools</p></blockquote>
<p>Once installed we can get the text from a QR code using the command:</p>
<blockquote><p>$ zbarimg qrcode.png</p></blockquote>
<p><em>tip : try it with the image you created with qrencode in the previous tutorial</em></p>
<p>You can get the output in the XML format using:</p>
<blockquote><p>$ zbarimg qrcode.png &#8211;xml</p></blockquote>
<p>&nbsp;</p>
<p><strong>pybitcointools</strong><br />
An API that combines the power of Python and Bitcoin?  This sounds very promising.  We install using:</p>
<blockquote><p>sudo pip install pybitcointools</p></blockquote>
<p>Pybitcointools is not a full node, it has no idea what blocks are. It relies on centralized service (blockchain.info) for blockchain operations. This should not be a problem, but keep this in mind;</p>
<p>We write the first program, which simply fetches the account transaction history from the blockchain (through blockchain.info). Openup your favourite editor and paste:</p>
<blockquote><p>from pybitcointools import *</p>
<p>addr = &#8220;1A1bBJwQMsbEbdyAnfe1ESvVAM3hmB6fSC&#8221;<br />
h = history(addr)<br />
print h</p></blockquote>
<p>Save the file as example.py and execute it with</p>
<blockquote><p>python example.py</p></blockquote>
<p>The program will output the list of transactions for the bitcoin address 1A1bBJwQMsbEbdyAnfe1ESvVAM3hmB6fSC. Pretty neat, eh?</p>
<p>Now we will do some cool stuff with a brain wallet.  Open <a href="https://brainwallet.github.io/">https://brainwallet.github.io/</a>  and type a passphrase to generate an address. In my case I took a very weak password &#8220;hello world&#8221;. You will see the private key and public key being generated on the fly. Use this as a reference later on; We will create a program now which can generate the public and private key directly from this password. In addition, we will create the bitcoin address from the public key.</p>
<blockquote><p>from pybitcointools import *</p>
<p>priv = sha256(&#8216;hello world&#8217;)<br />
pub = privtopub(priv)<br />
address = pubtoaddr(pub)</p>
<p>print &#8220;Private key: &#8221; + priv<br />
print &#8220;Public key : &#8221; + pub<br />
print &#8220;Address : &#8221; + address</p></blockquote>
<p>This bitcoin address will obviously not have any transaction history. The complete list of commands can be found at: <a href="https://github.com/vbuterin/pybitcointools" target="_blank">https://github.com/vbuterin/pybitcointools</a></p>
<p>&nbsp;</p>
<p><strong>python-trezor</strong><br />
Remember the hardware wallet Trezor we discussed? You can interact with it using python. Install using:</p>
<blockquote><p>sudo apt-get install python-dev python-setuptools cython<br />
git clone <a href="https://github.com/trezor/python-trezor.git">https://github.com/trezor/python-trezor.git</a><br />
cd python-trezor<br />
python setup.py install (or develop)</p></blockquote>
<p>Then follow the instructions on <a href="https://github.com/trezor/python-trezor" target="_blank">https://github.com/trezor/python-trezor</a>  and <a href="http://www.bitcointrezor.com/" target="_blank">http://www.bitcointrezor.com/</a></p>
<p>&nbsp;</p>
<p><strong>python-mnemonic</strong></p>
<p>This library  can be used for generating the mnenomic, and converting it into a binary seed. This seed can be later used to generate deterministic wallets using BIP-0032 or similar methods.<br />
First install the python package pbkdf2, it is a dependency.</p>
<blockquote><p>sudo pip install pbkdf2</p></blockquote>
<p>Clone the python-mnemonic package using:</p>
<blockquote><p>git clone https://github.com/trezor/python-mnemonic</p></blockquote>
<p>You should have git installed. If not, install git. Next, enter these commands:</p>
<blockquote><p>cd python-mnemonic/</p>
<p>python test_mnemonic.py</p></blockquote>
<p>This will execute some tests, should work fine.  Remove vectors.json using</p>
<blockquote><p>rm -r vectors.json</p></blockquote>
<p>Run the example using</p>
<blockquote><p>generate_vectors.py</p></blockquote>
<p>The passphrase &#8220;TREZOR&#8221; is used for all vectors.  Read more on <a href="https://github.com/trezor/python-mnemonic" target="_blank">https://github.com/trezor/python-mnemonic</a></p>
<p>&nbsp;</p>
<p><strong>bitcoin-bash tools</strong><br />
First clone the package using the command</p>
<blockquote><p>git clone https://github.com/grondilu/bitcoin-bash-tools</p></blockquote>
<p>Let us do the next steps:</p>
<blockquote><p>cd bitcoin-bash-tools/</p>
<p>vim test.sh</p></blockquote>
<p>Paste this code</p>
<blockquote><p>#!/bin/bash<br />
source bitcoin.sh</p>
<p>newBitcoinKey</p></blockquote>
<p>Then save it.  Run</p>
<blockquote><p>chmod 755 test.sh</p>
<p>./test.sh</p></blockquote>
<p>It will generate a secret key, public exponent and a bitcoin address. To see the complete list of commands open <a href="https://github.com/grondilu/bitcoin-bash-tools" target="_blank">https://github.com/grondilu/bitcoin-bash-tools</a></p>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Flinux-shell-commands-for-bitcoin-part-ii%2F&amp;title=Linux%20shell%20commands%20for%20Bitcoin%20part%20II" id="wpa2a_96"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/linux-shell-commands-for-bitcoin-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux shell commands for Bitcoin</title>
		<link>https://talkera.org/crypto/linux-shell-commands-for-bitcoin/</link>
		<comments>https://talkera.org/crypto/linux-shell-commands-for-bitcoin/#comments</comments>
		<pubDate>Sun, 30 Nov 2014 16:04:39 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=114</guid>
		<description><![CDATA[This article is intended for sysadmins interested in bitcoin  and advanced linux users. By chaining all these commands together in different ways, you can do maintain a wallet, work with deterministic keys, generate QR codes and so on. This tutorial was created for Debian Linux and Ubuntu Linux, but other platforms should work too. A [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This article is intended for sysadmins interested in bitcoin  and advanced linux users. By chaining all these commands together in different ways, you can do maintain a wallet, work with deterministic keys, generate QR codes and so on. This tutorial was created for Debian Linux and Ubuntu Linux, but other platforms should work too. A list of bitcoin command line utillities:</p>
<ul>
<li>bitcoin native (very good, but wont be discussed here)</li>
<li>qrencode</li>
<li>sx</li>
</ul>
<p><strong>qrencode</strong><br />
The qrencode application is a tool to quickly produce qrcodes. Generating a QR code, a type of matrix barcode, for a bitcoin address from the command line :</p>
<blockquote><p>$ sudo apt-get install qrencode<br />
$ qrencode 125tQCeg89h8d3ccgBsipbjGUJpqx4c3H1 -o qrcode.png<br />
$ display qrcode.png   (optional, display it)</p></blockquote>
<p>This will output a QR code image of 111&#215;111 pixels.  You can change the size of the dots, thus making the image larger using the -s command.</p>
<blockquote><p>$ qrencode 125tQCeg89h8d3ccgBsipbjGUJpqx4c3H1 -s 6 -o qrcode.png<br />
$ display qrencode.png</p></blockquote>
<p><strong>sx tools</strong><br />
sx is a set of modular Bitcoin commandline utilities. First clone libbitcoin from <a href="https://github.com/libbitcoin/libbitcoin#debianubuntu" target="_blank">https://github.com/libbitcoin/libbitcoin#debianubuntu</a>  and run</p>
<blockquote><p><em>cd libbitcoin-version2</em><br />
<em>sudo install.sh</em></p></blockquote>
<p>Installing command line tool sx :</p>
<blockquote><p>wget https://github.com/spesmilo/sx/raw/master/install-sx.sh<br />
sudo apt-get install bignum<br />
sudo apt-get install sudo apt-get install libgmp-dev<br />
chmod 755 install-sx.sh<br />
sudo bash ./install-sx.sh</p></blockquote>
<p>Installation will take a while, expect around 30 minutes installation time. It will download a lot of packages and compile them from source. This should work on latest versions of Debian Linux or Ubuntu Linux.</p>
<p>If that did not work try to download the packages into your /Downloads/ directory.</p>
<ul>
<li><a href="https://libbitcoin.org/download/libbitcoin-2.0.tar.bz2" target="_blank">libbitcoin 2.0</a></li>
<li><a href="https://libbitcoin.org/download/libwallet-0.4.tar.bz2" target="_blank">libwallet 0.4</a></li>
<li><a href="https://libbitcoin.org/download/obelisk-1.0.tar.bz2" target="_blank">Obelisk 1.0</a></li>
</ul>
<p>Open a console and for each of the packages type</p>
<blockquote><p>$ bzip2 -d filename.tar.bz2<br />
$ tar xvf filename.tar<br />
$ cd filename<br />
$ autoreconf -i<br />
$ ./configure<br />
$ make<br />
$ sudo make install<br />
$ sudo ldconfig</p></blockquote>
<p>( You might need <em>sudo apt-get -f install libzmq-dev</em>  and <em>sudo apt-get install libcrypto*</em> )</p>
<p>Finally download sx from  here:</p>
<ul>
<li><a href="https://libbitcoin.org/download/sx-1.0.tar.bz2" target="_blank">sx 1.0</a></li>
</ul>
<p>Run the commands:</p>
<blockquote><p>sh ./install-sx.sh</p></blockquote>
<p>If you get an error about leveldb_blockchain, this error to be exact:</p>
<blockquote><p>initchain.cpp:19:5: error: ‘leveldb_blockchain’ was not declared in this scope<br />
leveldb_blockchain chain(pool);</p></blockquote>
<p>Then add the line</p>
<blockquote><p>#include &lt;bitcoin/blockchain/leveldb_blockchain.hpp&gt;</p></blockquote>
<p>to the file src/initchain.cpp using your favourite editor such as <em>vim. </em> <img src="/crypto/wp-includes/images/smilies/icon_wink.gif" alt=";-)" class="wp-smiley" /> . Then run <em>make, sudo make install.</em></p>
<p>Now that you have sx tools installed you can use it to run all kind of bitcoin related commands.<br />
<em>Converting BTC to satoshi, and satoshi to BTC</em></p>
<blockquote><p>$ sx btc 90000<br />
0.00090000<br />
$ sx satoshi 0.00090000<br />
90000</p></blockquote>
<p><em>Create an experimental wallet</em></p>
<blockquote><p>sx newseed &gt; wallet.seed<br />
cat wallet.seed<br />
sx wallet wallet.seed</p></blockquote>
<p><em> Convert from hexadecimal to base58</em></p>
<blockquote><p>sx base58-encode CAFEBABE</p></blockquote>
<p>See <a href="http://sx.dyne.org/" target="_blank">http://sx.dyne.org/</a>  for a full list.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Flinux-shell-commands-for-bitcoin%2F&amp;title=Linux%20shell%20commands%20for%20Bitcoin" id="wpa2a_98"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/linux-shell-commands-for-bitcoin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hardware Wallets: Trezor vs Ledger</title>
		<link>https://talkera.org/crypto/hardware-wallets-trezor-vs-ledger/</link>
		<comments>https://talkera.org/crypto/hardware-wallets-trezor-vs-ledger/#comments</comments>
		<pubDate>Wed, 26 Nov 2014 15:15:24 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://talkera.org/wpTalkera/?p=99</guid>
		<description><![CDATA[The ultimate goal of hardware wallet is to have a high level of security and to add convenience.  Currently we have found two hardware wallets: Trezor and Ledger. To be able to access a Ledger Wallet you will need: your Ledger Wallet, your PIN code and your second factor card. If one of these things is missing you [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The ultimate goal of hardware wallet is to have a high level of security and to add convenience.  Currently we have found two hardware wallets: Trezor and Ledger.</p>
<p>To be able to access a Ledger Wallet you will need: your Ledger Wallet, your PIN code and your second factor card. If one of these things is missing you won&#8217;t be able to spend bitcoin. Similar to the Ledger Wallet, Trezor has a PIN code. If the Trezor wallets gets stolen, thieves cannot misuse it.  In case of loss or theft of your Ledger Wallet, or at any time, you can restore your entire balance either on a new Ledger Wallet or on any BIP39 compatible software wallet such as Electrum. Without the PIN code and the second factor card, a thief cannot access your bitcoins.</p>
<p>Trezor uses a screen instead of a security card, which is of course easy for the end user. Trezor is a single-purpose computer, which stores your private keys and actively signs transactions without sending your private keys to the computer;  To run the Ledger Wallet you need a computer with an USB port, and a recent version of Google Chrome. The wallet interfaces with the computer through a Chrome application which you will need to install on your computer.  It currently does not have a screen but the Ledger Wallet will have a screen in the next version.  Both wallets are Windows, OS X and Linux friendly.  The Ledger Wallet development team is currently building support for Android;</p>
<table border="0" cellspacing="0">
<colgroup width="201"></colgroup>
<colgroup width="122"></colgroup>
<colgroup width="115"></colgroup>
<tbody>
<tr>
<td align="left" height="17"></td>
<td align="left"><b>Trezor Wallet</b></td>
<td align="left"><b>Ledger Wallet</b></td>
</tr>
<tr>
<td align="left" height="17"><b>Origin</b></td>
<td align="left">Czech</td>
<td align="left">France</td>
</tr>
<tr>
<td align="left" height="17"><b>Size</b></td>
<td align="left">small</td>
<td align="left">small</td>
</tr>
<tr>
<td align="left" height="17"><b>PIN Protection</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>PIN Length </b></td>
<td align="left">10 digits max.</td>
<td align="left">unknown</td>
</tr>
<tr>
<td align="left" height="17"><b>Theft prevention</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>Phising protection</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>private key leakage protection</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>Firmware upgrade</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>NFC support</b></td>
<td align="left">no</td>
<td align="left">no (in future)</td>
</tr>
<tr>
<td align="left" height="17"><b>Malware protection</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>Windows support</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>Mac OS X support</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>Linux support</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>Open-source</b></td>
<td align="left">yes</td>
<td align="left">no</td>
</tr>
<tr>
<td align="left" height="17"><b>Alt coin support</b></td>
<td align="left">yes, if Electrum supports them;</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>French language support</b></td>
<td align="left">no</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>English language support</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"><b>API support</b></td>
<td align="left">yes</td>
<td align="left">no (in future)</td>
</tr>
<tr>
<td align="left" height="17"><b>Multiple accounts</b></td>
<td align="left">yes</td>
<td align="left">yes</td>
</tr>
<tr>
<td align="left" height="17"></td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td align="left" height="17"><b> </b></td>
<td align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td align="left" height="17"><b>Price (BTC)</b></td>
<td align="right">0.3174</td>
<td align="right">0.1165</td>
</tr>
</tbody>
</table>
<p><strong> Read more:</strong></p>
<ul>
<li>Trezor wallet:   <a href="http://www.bitcointrezor.com/" target="_blank">http://www.bitcointrezor.com/</a></li>
<li>Ledger wallet : <a href="https://www.ledgerwallet.com/" target="_blank">https://www.ledgerwallet.com/</a></li>
</ul>
<p>&nbsp;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="https://www.addtoany.com/share_save#url=http%3A%2F%2Ftalkera.org%2Fcrypto%2Fhardware-wallets-trezor-vs-ledger%2F&amp;title=Hardware%20Wallets%3A%20Trezor%20vs%20Ledger" id="wpa2a_100"></a></p>]]></content:encoded>
			<wfw:commentRss>https://talkera.org/crypto/hardware-wallets-trezor-vs-ledger/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
