Photo by @vinomamba24

Aspects of Neural Cryptography

Artificial Intelligence for Encryption and Cryptanalysis

A friend asked me about artificial intelligence in cryptography so I thought I would look into it. This is not a comprehensive overview, rather you are reading an article that is on the surface as an introduction to the topic based on curiosity.

“Neural cryptography is a branch of cryptography dedicated to analyzing the application of stochastic algorithms, especially artificial neural network algorithms, for use in encryption and cryptanalysis.”

Thus breaking this up into sizeable chunks let us attempt to unravel a few of these words one after the other.

  1. Cryptanalysis
  2. Stochastic
  3. Artificial neural network (ANN)
  4. Encryption


Cryptanalysis (from the Greek kryptós, “hidden”, and analýein, “to loosen” or “to untie”) is the study of analyzing information systems in order to study the hidden aspects of the systems. Cryptanalysis is used to breach cryptographic security systems and gain access to the contents of encrypted messages, even if the cryptographic key is unknown.

Interestingly enough this is part of the beginning of computing with the first program run on a computer to find encryption. Colossus was a set of computers developed by British codebreakers in the years 1943–1945 to help in the cryptanalysis of the Lorenz cipher. Colossus used thermionic valves to perform Boolean and counting operations. Colossus is thus regarded as the world’s first programmable, electronic, digital computer, although it was programmed by switches and plugs and not by a stored program.

Given some encrypted data (“ciphertext”), the goal of the cryptanalyst is to gain as much information as possible about the original, unencrypted data (“plaintext”).

It is useful to consider two aspects of achieving this.

  1. The first is breaking the system — that is discovering how the encipherment process works.
  2. The second is solving the key that is unique for a particular encrypted message or group of messages.

There are things that could/should be assumed about the attacker’s knowledge. There are two things that can be somewhat assumed.

Shannon’s Maxim “the enemy knows the system”

Kerckhoffs’s principle: A cryptosystem should be secure even if everything about the system, except the key, is public knowledge.

“Cryptanalysis has coevolved together with cryptography, and the contest can be traced through the history of cryptography — new ciphers being designed to replace old broken designs, and new cryptanalytic techniques invented to crack the improved schemes. In practice, they are viewed as two sides of the same coin: secure cryptography requires design against possible cryptanalysis”


This is simply a fancy way to say random. The word meant random. Stochastic refers to a randomly determined process. The word first appeared in English to describe a mathematical object called a stochastic process, but now in mathematics the terms stochastic process and random process are considered interchangeable.

Artificial neural network (ANN)

Artificial neural networks or connectionist systems are computing systems vaguely inspired by the biological neural networks that constitute animal brains. Such systems “learn” to perform tasks by considering examples, generally without being programmed with task-specific rules.


In cryptography, encryption is the process of encoding a message or information in such a way that only authorized parties can access it and those who are not authorized cannot. Encryption does not itself prevent interference, but denies the intelligible content to a would-be interceptor.

These are some basic aspects of Neural Cryptography.

This is #500daysofAI and you are reading article 193. I write one new article about or related to artificial intelligence every day for 500 days.



AI Policy and Ethics at Student at University of Copenhagen MSc in Social Data Science. All views are my own.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store