Skip to main content

Cryptography and Artificial Intelligence

Nowadays, both Cryptography and Artificial Intelligence (AI) have become integral parts of our daily life. The first one makes human communication safe from unwanted attackers and the second one makes our life easier by helping to make decisions.
In this article, we give a short overview of how these subjects are related and depended on each other.

Cryptography

Cryptography is an indispensable tool used to protect information in computing systems. It is used to protect data at rest and data in motion. It is the study of mathematical techniques related to aspects of information security such as confidentiality, data integrity, entity authentication, data origin authentication, etc.

Modern cryptography is heavily based on mathematical theory and computer science practice; cryptographic algorithms are designed around computational hardness assumptions, making such algorithms hard to break in actual practice by any adversary. While it is theoretically possible to break into a well-designed system, it is infeasible in actual practice to do so.

Artificial Intelligence

Artificial intelligence is a technology that enables a machine to simulate human behavior. Machine learning (ML) is a subset of AI which allows a machine to automatically learn from past data without programming explicitly. The goal of AI is to make a smart computer system like humans to solve complex problems.

AI applications include advanced web search engines (e.g., Google), recommendation systems (used by YouTube, Amazon and Netflix), understanding human speech (such as Siri and Alexa), self-driving cars (e.g., Tesla), automated decision-making and competing at the highest level in strategic game systems (such as chess and Go), etc.

Relation between artificial intelligence and cryptography

Mathematical cryptanalysis deals with the problem of breaking cryptographic mechanisms solely by exploiting their mathematical properties. There is a variety of cryptographic mechanisms that are considered secure against this type of attack. However, this security cannot usually be strictly proven mathematically at present.

Artificial intelligence and cryptography have many things in common. The most apparent is the processing of a large amount of data and large search spaces. In a typical cryptanalytic situation, the cryptanalyst wishes to break” some cryptosystem. This means he wishes to find the secret key used by the users of the cryptosystem, where the general system is already known. The decryption function thus comes from a known family of such functions (indexed by the key), and the goal of the cryptanalyst is to exactly identify which such function is being used. He may typically have available a large quantity of matching ciphertext and plaintext to use in his analysis. This problem can also be described as the problem of learning an unknown function” (that is, the decryption function) from examples of its input/output behavior and prior knowledge about the class of possible functions.

Artificial intelligence in Cryptography

Artificial intelligence has been an interesting field of study with massive potential for application. In the past three decades, machine learning techniques, whether supervised or unsupervised, have been applied in cryptographic algorithms, cryptanalysis, steganography, among other data-security-related applications.

AI techniques can be applied to cryptographic problems in various ways. The goal is to understand potential attacks and security guarantees of cryptographic methods and implementations in more detail. AI can be used to improve or automate attack techniques, but also to create security proofs or to uncover errors in security proofs.

AI is applied in both cryptography and cryptanalysis. Based on machine learning, many cryptosystems ([1]) have already been proposed. For example, a phenomenon, like mutual learning [2] can help the two sides of communication to create a common secret key over a public channel. Classifying encrypted traffic [3], based on machine learning, is also a good example of AI being used in cryptography. Machine learning techniques were also applied to perform side-channel attacks [4]. known-plaintext attack over DES [5]. The proposed attack trains a neural network to decrypt ciphertext without knowing the encryption key, in a greatly reduced time, compared to other known-plaintext attacks.

Cryptography in artificial intelligence

As we use AI-enabled devices in day-to-day life, they are prone to attack by unwanted people. At present most of the AI devices do not use cryptography secure AI protocols as they require a very high amount of computational resources and so are inefficient to use in practice.

For example, an automated car can be hacked and misdirected. Chaos on the roads of a city can be created by hacking an AI-based automated traffic lights system.
Moreover, AI is being applied to a growing number of systems, particularly those problems where the intention is to detect anomalous system behavior. Such things are achieved by training on good and bad data. Since AI uses past data to learn and predict the future, AI algorithms can be forced to output bad results by injecting manipulated data during training.

Shamir et al. [7], recently studied a broader issue in machine learning such as what happens to deep neural networks during regular and during adversarial training. They introduced a new theory of adversarial examples called the Dimpled Manifold Model where they showed how adversarial training can affect deep neural networks. Such training turns a cat into a car that does not look like a car at all. He discussed in Indocrypt, Dec 25, 2021, that Tesla used a similar deep learning algorithm to read street signs and he changed a few chosen pixels of the ‘STOP’ sign, during training, where new images are usually the same. However, such adversarial training turns the STOP’ sign into the `SPEED LIMIT 45 KMPH’ sign. What a disaster it may cause!

Cryptographic techniques can be used to reduce problems in the application of AI methods such as privacy-preserving machine learning. In such scenarios, data may be encrypted before training, as well as prediction algorithms may be cryptographically secure. Then it will become difficult to attack. However, such existing protection mechanisms require a significantly large amount of computational power. Due to the recent increase of attacks on AI protocols, a detailed study is necessary to make them secure by adopting cryptographic techniques.

Future direction

Thus we can see, that Cryptography and Artificial Intelligence are becoming greatly dependent on each other. On one hand, the study of new methods of attack is therefore important in order to detect possible weaknesses of cryptographic mechanisms at an early stage. Then we can design new robust schemes.
On the other hand, finding new cryptographically secure AI protocols is of great necessity in the upcoming days. All these can be achieved only from the collaborative effort of people from both of those directions of research.

References

[1] Alani, Mohammed M. “Applications of machine learning in cryptography: a survey.” Proceedings of the 3rd International Conference on cryptography, security and privacy. 2019.

[2] Rosen-Zvi, Michal, et al. “Mutual learning in a tree parity machine and its application to cryptography.” Physical Review E 66.6 (2002): 066135.

[3] Alshammari, Riyad, and A. Nur Zincir-Heywood. “Machine learning based encrypted traffic classification: Identifying ssh and skype.” 2009 IEEE symposium on computational intelligence for security and defense applications. IEEE, 2009.

[4] Hospodar, Gabriel, et al. “Machine learning in side-channel analysis: a first study.” Journal of Cryptographic Engineering 1.4 (2011): 293.

[5] Alani, Mohammed M. “Neuro-cryptanalysis of DES and triple-DES.” International Conference on Neural Information Processing. Springer, Berlin, Heidelberg, 2012.

[6] Rivest, Ronald L. “Cryptography and machine learning.” International Conference on the Theory and Application of Cryptology. Springer, Berlin, Heidelberg, 1991.

[7] Shamir, Adi, Odelia Melamed, and Oriel BenShmuel. “The dimpled manifold model of adversarial examples in machine learning.” arXiv preprint arXiv:2106.10151 (2021).

No Comments yet!

Your Email address will not be published.