The CryptoNight algorithm is CryptoNote and Bytecoin’s (BCN) proof-of-work algorithm and it was designed to allow CPU miners to work on equal terms. It’s not about driving a wedge between PC and ASIC miners, rather it’s about allocating a sizeable data block (Notepad) that contains an un-predictable sequence to RAM. The block needs to be so big that it makes it more convenient to store data than to compute it every time it’s accessed. The algorithm also must resist internal parallelism, such as where a number of simultaneous threads need an equal number of times more memory at once.
The Scrypt algorithm is more at home with a lot of memory. Since it’s cheaper to buy more RAM than is to buy ultra-powerful processers, this brings mining more into the realm of the dedicated hobbyist rather than the millionaire investor. But with CryptoNote, and in contrast to Scrypt, all new new blocks of 64 bytes are dependent on the ones but come before them, so, a new algorithm needs around 2MB of RAM, which correlates with the smallest L3 cache found in processors these days. Such a trifling amount of RAM also impedes ASIC use.
Just a note about the differences between CryptoNote and the CryptoNight algorithm here: the CryptoNight algorithm is an implementation of the CryptoNote Protocol.
Mining CryptoNight algorithm coins
The CryptoNight algorithm doesn’t put much strain on typical desktop processers. For instance, a Xeon E3 returns about $0.25 a day (and about the same is true for the Intel Core I7).
By the end of 2017, the CryptoNight algorithm supported mining on AMD’s GPUs and it’s used with cryptocurrencies like:
AMD GPUs, and particularly the latest AMD Radeon RX Vega GPUs are better than Nvidia’s at getting the best out of the CryptoNight algorithm. The software that comes with them isn’t perfect and may result in technical difficulties for those setting up their mining system, but the GPUs perform well with the CryptoNight algorithm.
The CryptoNight algorithm likes a lot of RAM and depends greatly on latency. Every new block is dependent on previous blocks (unlike Scrypt, for example) and the algorithm needs around 2Mb for each instance. It can be accommodated by the L3 cache fridge core of a modern processors. A megabyte of internal memory is virtually unacceptable for current ASICs.
GPUs may be able to run hundreds of instances at the same time, but they do have limitations. GDDR5 memory is slower than CPU L3 cache and is notable more for its bandwidth, than its random-access speed.
To increase the size of the scratchpad would mean increasing the number of iterations, but this would increase the time needed. High number of calls in a trustless p2p network could make it a lot more vulnerable because notes check proof-of-work for every new block. If a node is tied up for ages with evaluating each hash, it would be easy to cripple it with a simple DDoS attack.
The CryptoNote protocol is the gold standard for anonymity, and that’s important because confidentiality is the most important component of digital currencies. They need to be able to send payments without data being exposed to third parties. This is how they differ from traditional banks.
Okamoto and Ohta set the criteria for anonymity with electronic cash. They stipulate that all information concerning monetary transactions between seller and buyer should be hidden from anyone else. They say that to guarantee the confidentiality of the user:
the transaction can’t be tracked
transactions can’t be linked
CryptoNote is a scheme that guarantees anonymity during payments. The Protocol uses a ring signature system that allows private messages to be signed with the group name.
The signature shows only that a transaction was made by a member of the group, but they can’t be distinguished from each other. This helps to prevent double spending. A cryptographic exchange protocol is used between the parties using an open communication channel.
The main advantages of CryptoNight algorithm mining:
Lower emissions, less waste heat
Less time between blocks
CPU+GPU use for better performance
much different from bitcoin, which pushes interest in new cryptocurrencies
distinguishes CryptoNight coin from altcoins that rely on the old algorithms
more profitable than a lot of other cryptocurrencies