# Key to Crypto: Memristor Made by Inkjet Printer Unlocks True Random Number Generators

A group of researchers with KAUST (King Abdullah University of Science and Technology) have announced a new, groundbreaking manufacturing technique for what is known as "memristors" - circuits that are one of the four fundamental electrical components, alongside resistors, capacitors, and inductors. The new technique has been shown to enable the creation of one of cryptography's essential components, a True Random Number Generator (TRNG).

True Random Number Generators are essential parts of cryptography, and perhaps unintuitively (after all, how hard is it to produce random numbers?), it's also one of the most prone to failure. That's because it's easy for a random distribution (that is, when all possible events have an equal chance of happening) to become a non-random distribution.

Usually, TRNGs are implemented at the silicon level, such as AMD's Ryzen and Epyc-bound Cryptographic Co-Processor (CCP) (now at iteration 5.0). One way to generate random numbers is to look at inherently random phenomena, such as the photoelectric effect that's the basis for our computers' operation. From these effects, random numbers are generated that then serve as the basis for an encryption operation - each random number translating to part of the encrypted message, in the process known as hashing. To better put the problem into perspective, consider that AMD's Xilinx division commercializes Field-Programmable Gate Arrays (FPGAs) whose aim is to serve as True Random Number Generators.

But electrical components have operational boundaries, and small voltage changes can introduce computational or photoelectric "errors" that form patterns. Of course, when patterns emerge in a pool of numbers that are supposed to be random, then it's not really random anymore. There's a pattern, a slightly different probability for one number to be chosen over the other. And if it isn't truly random, then the emerging patterns can be extracted, analyzed, and compared to the encrypted output... And the way is open toward the supposedly cryptographically-secure message.

Some patterns can emerge naturally, from certain imbalances in the system that push it away from its random "equilibrium" state (such as hardware degradation, which is partly responsible for CPUs and GPUs alike both seeing drops in the maximum sustained operational frequency as they age). We've seen those being exploited by researchers - exfiltrating data from patterns such as a system's fan speed, for instance. But others can be introduced by sophisticated-enough adversaries.

The work done by the KAUST researchers now unlocks memristor-based TRNG fabrication in a process not dissimilar to 3D printing. Except instead of the usual filament, atomically-thin layers of boron nitride and silver electrodes are deposited until the elements of a memristor all stack into place. Due to this specific fabrication process, the TRNG sips power compared to the usually CPU-integrated alternatives, built out of expensive circuits with millions of transistors (costly both in terms of power usage and the space they occupy on the accelerator's design).

“We fabricated a memristor using a novel two-dimensional layered material called hexagonal boron nitride, on which we printed silver electrodes using a scalable, low-cost inkjet printing technology,” said Pazos, a researcher within the KAUS team. “The unique properties of the 2D h-BN are maintained after the electrode has been printed, enabling superior power and random signal generation.”

The resulting TRNG generator was apparently in-line with the team's expectations: it showed the best performance of a TRNG in terms of stability of its random signal through time; it showed incredibly low energy consumption; and finally, easy and fast circuit readout, enabling the memristor-based TRNG to generate 7 million random bits per second.

“Furthermore, we demonstrated a built circuit that generates random numbers by interconnecting our memristor to a commercial microcontroller and making live experiments of random number generation on the fly,” Pazos added.

It also seems as if the technology is ready for prime time as is, as opposed to most other technological breakthroughs. The technology could be readily rolled-out to IoT (Internet of Things) applications and other edge devices, such as sensor node arrays.

“Our scalable low-cost fabrication method using inkjet printing not only enables excellent performance but is key to the successful integration of these devices into low-cost complex electronics,“ Pazos says. “This work demonstrates the potential of 2D materials like h-BN to underpin a revolution in solid-state micro- and nanoelectronic devices and circuits owing to their outstanding electronic, physical, chemical and thermal properties.”