Skip to content
bluemurder edited this page Jan 5, 2013 · 5 revisions

Welcome to the bminer wiki!

Bitcoin

Bitcoin is the name of a digital currency invented in 2009. See Wikipedia page

Bitcoin mining

A fast way to collect bitcoins is to provide solutions to a time consuming cryptographic algorithm. These results will be used as building blocks to avoid the double spending of bitcoins over the Internet. A valid result sent to the Bitcoin network entitles to a small amount of bitcoins. This procedure is called bitcoin mining.

How it works a pooled bitcoin mining algorithm

With pooled mining is intended a procedure where cryptographic problems and possible solutions are managed by a pool of users. This is a winning method since the single solution would take too long for a single user. The mining algorithm is as follows:

  • Get 1024-bit data and 256-bit target from pool server (e.g. data="00000001b0177d9afce82f60614c6423740558742f3de9a876f8d7a60000057d00000000e94d08a92cb44c918d1e8b9c86a52ac40d3715ba9faa433fca7296531a175b4450ddf6d61a05a16b00000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000", target="ffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000")
  • Select first 608 bits (152 characters) from data, and call it block header (obtaining 00000001b0177d9afce82f60614c6423740558742f3de9a876f8d7a60000057d00000000e94d08a92cb44c918d1e8b9c86a52ac40d3715ba9faa433fca7296531a175b4450ddf6d61a05a16b)
  • Change endianness for every 32-bit word of block header (obtaining 010000009a7d17b0602fe8fc23644c6174580574a8e93d2fa6d7f8767d05000000000000a9084de9914cb42c9c8b1e8dc42aa586ba15370d3f43aa9f539672ca445b171ad6f6dd506ba1051a)
  • Swap every byte of target (obtaining 00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
  • Cycle through all possible values of a 32-bit number called nonce (from 0 to ffffffff), building a 640 bit number appending block header and nonce values, and evaluate hash = SHA256(SHA256( block header | nonce ))
  • If hash is less than target, a possible solution is found. So it's time to send to the pool server a 1024-bit datum, consisting of first 608 bits of original data, the winning nonce changed in endianness, and last 384 bits of the original data.