Cryptocurrency mining

A question came up recently:

“If mining for crypto currency is so profitable why would anyone sell the tech to do it?”

Mining is – at the basic mathematics level – searching for hash collisions. Hashing algorithms are an integral part of modern cryptography systems and allow you to create unique identifiers from data of any size. That’s important for lots of reasons:
1) speeding up searches of large data sets (see ‘hash table’)
2) identifying secret data
3) eliminating duplicate records
4) message fingerprinting
and no doubt dozens more.

Searching for hash collisions is analogous to searching for needles in haystacks, because a good hashing algorithm should attempt to eliminate the possibility of collisions as far as possible. That’s why we no longer use MD5 in any security implementations – it’s been shown to be remarkably easy to generate collisions. Likewise, with modern computing power being as it is, SHA1 is on the way out, and new SSL certificates are using SHA256 at a minimum.

So, if you want to compromise a hashing algorithm and find those ‘needles’, you need a way of calculating as many hashes as possible, in the shortest period of time. In the early days, that meant using a regular computer’s CPU, but those are very general processing units, designed for lots of different types of instructions, so the number of hashes per watt of power consumed is fairly low.

But graphics cards are designed to process thousands of very simple mathematical functions very quickly, because that’s what most polygon / physics calculations involve – and that’s what modern games require: accurate physics in a virtual world, with realistic graphics.

In the case of cryptocurrency mining, the calculations involved are very similar to those in gaming: processing lots of identical mathematical calculations very quickly. Which is why the majority of self-built mining platforms involve a stack of high-end graphics cards – usually whatever will process the greatest number of hashes per watt at a given price point.

There is one other type of device worth mentioning here: ASICs. These are very specialist chips that are designed to process one type of calculation *insanely* quickly – many times quicker than either graphics cards or CPUs. But they’re expensive to design, and can’t be adapted to different algorithms: you design them specifically for the calculation you need to process.

ASICs are used heavily in high-end networking gear – most high-end Cisco (and other manufacturers’) switches will use them for packet offloading and IP->MAC mapping in environments where PPS (packets per second) is critical. They’re a common occurrence in datacentres where networking equipment needs to be able to withstand denial of service attacks and so on.

ASICs have been developed to calculate SHA256 hashes, which is – in part – why Bitcoin mining is all but impossible these days to do profitably, without spending £many_thousands on high-end ASIC miners. But they are no doubt used heavily in certain ‘secret squirrel’ applications – compromising cryptography at the nation state level, for example.

In answer to the original question – ‘the tech’ is little more than some high end graphics cards, which are sold by the major manufacturers by the thousands every day for use in gaming machines. It’s commodity hardware. The software is (often) open-source and freely available.

Chris

IT Consultant, Network Engineer, Photographer, Audiophile.

You may also like...