Photo by Markus Winkler on Unsplash

A Rusty Key: At The Core of Cybersecurity is Random Numbers

--

One of the most fundamental aspects of our online security is the generation of random numbers. These typically generate encryption keys, which are so fundamental to our security that any flaws in them can compromise our whole environment. So examples are:

  • Generating wallets. When a new Bitcoin wallet is created, for example, the private key is a random 32 byte (256 bit) value. If this value is not random in any way, it can severely affect the strength of the wallet against attack.
  • Generating session keys. Every time, too, we connect to a Web server, it is the magic of random numbers that allows us to create a new encryption key for the session. And, so, if Eve, manages to crack one of these, the next one will be completely different.
  • Generating encryption keys. If we need to encrypt files, we often need to generate an AES key to encrypt its data. This key should be random, as we do not want Eve using brute force to crack the key.

And, so, the safe generation of random numbers is fundamental to the core of cybersecurity. Also, if we want to use encryption, we possibly want to run it in a safe environment, and Rust is one of the best for this. So, let’s develop a random key generator using Rust. First, we will create a function that generates a 128-bit (16 byte) random…

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.