Photo by Angela M. on Unsplash

The (Near) Perfect Encryption Method and The Best Programming Language: Meet AES-GCM and Rust

--

There’s a bit of a barrier to Rust, but I can assure you that once you are over the barrier your days of slow and sloppy code are behind you. For someone used to C, it gives you all the power that you had before, but fit for a modern world of software. To me, Rust is the perfect programming language for cybersecurity. I think that it teaches me as I go along, and scolds me for bad practice, and tells me to go to the back of the class, and improve.

And what about the perfect encryption method? Well, for symmetric key encryption there is few better than AES. But, it’s a block cipher, and needs paper, and also the chaining of blocks. The encryption thus has to be done sequentially — a block at a time. With the stream ciphers — such as RC4 and ChaCha20 — we can whizz along with parallel processing of the cipher streams, and without the need for that horrible padding of the blocks. But, wait! AES can be covered into a stream cipher with the addition of a counter mode.

For this, we can use the wonderful AES GCM (Galois Counter Mode). And, another great advantage is that it has the option of adding additional data that is not encrypted but can be used to authenticate the cipher. For this, we might allow the additional data to be bound to a specific session ID or with a…

--

--

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.