CoChat

Learning Perfectly Secure Cryptography to Protect Communications with Adversarial Neural Cryptography

Open access
Coutinho, Murilo, De Oliveira Albuquerque, Robson, Borges, Fábio, García Villalba, Luis, Kim, Tai-Hoon · 2018 · Sensors

The DOI matches its Crossref record; 20 of the 20 references it cites were found in a registry or an index; 3 of the 6 sources its claims cite were checked for support.

Abstract

Researches in Artificial Intelligence (AI) have achieved many important breakthroughs, especially in recent years. In some cases, AI learns alone from scratch and performs human tasks faster and better than humans. With the recent advances in AI, it is natural to wonder whether Artificial Neural Networks will be used to successfully create or break cryptographic algorithms. Bibliographic review shows the main approach to this problem have been addressed throughout complex Neural Networks, but without understanding or proving the security of the generated model. This paper presents an analysis of the security of cryptographic algorithms generated by a new technique called Adversarial Neural Cryptography (ANC). Using the proposed network, we show limitations and directions to improve the current approach of ANC. Training the proposed Artificial Neural Network with the improved model of ANC, we show that artificially intelligent agents can learn the unbreakable One-Time Pad (OTP) algorithm, without human knowledge, to communicate securely through an insecure communication channel. This paper shows in which conditions an AI agent can learn a secure encryption scheme. However, it also shows that, without a stronger adversary, it is more likely to obtain an insecure one.

Overview

CoChat Summary

TL;DR

The paper analyzes Adversarial Neural Cryptography (ANC) and shows that the original ANC setup usually learns insecure cryptosystems even with a simple network designed to allow the One-Time Pad (OTP). It proposes CPA-ANC, a chosen-plaintext variant with a stronger Eve, under which the same network learns the OTP with high probability.

Key findings

  • Without an adversary, all trials let Alice and Bob communicate without errors, but all learned algorithms were insecure; one example learned a permutation that did not use the key at all.
  • Under the original ANC methodology, Alice and Bob could communicate and resist Eve, but the learned cryptosystems were usually not truly secure; an example used repeated key bits, and the paper concludes “very few” learned models were truly secure.
  • Under the proposed CPA-ANC methodology, almost all successful models learned the OTP; only one model failed because Alice and Bob could not communicate. Examples show each plaintext bit XORed with a distinct key bit.
  • The main claim is that an AI agent can learn a perfectly secure OTP without human knowledge, but the conditions are difficult and a very strong adversary is key to forcing a secure solution.

Methods

  • Three neural-network agents (Alice, Bob, Eve) are used; Alice and Bob share a single simple CryptoNet that generalizes XOR via angle mappings \(f(b)=\arccos(1-2b)\) and \(f^{-1}(a)=(1-\cos(a))/2\). Eve is a ciphertext-only attacker in ANC and a classifier choosing between \(P_0\) and \(P_1\) in CPA-ANC.
  • Training used random plaintexts and keys with minibatches of \(M=128\), key/plaintext lengths of 4, 8, and 16 bits, TensorFlow, and Adam with learning rate 0.0002. ANC alternated 5 minibatches for Alice/Bob and 10 for Eve, with \(\gamma=5\) and L2 regularization \(\alpha=0.1, 0.05, 0.01\); CPA-ANC alternated 3 minibatches for Alice/Bob and 60 for Eve, with \(\gamma=7\), L2 \(\alpha=0.1\) for 4/8 bits and \(\alpha=0.015\) for 16 bits, and Eve rules \(R=4n\).
  • Stopping criteria were success if Bob’s decryption error was near zero and Eve’s attack was as bad as random guessing, or failure after 100,000 rounds. Learned models were tested with Algorithm 1 and judged secure if they learned the OTP.

Limitations

  • The paper states it does not recommend using neural networks in real systems, that weak encryption is likely, and that it remains an open problem whether a neural network can learn a secure cryptosystem where a small key encrypts a very long message like a block or stream cipher.
  • The paper states that CPA-ANC alone is not enough to guarantee security; designing a very strong adversary capable of breaking cryptosystems is key and remains a hard open problem.
  • Evident from the text: experiments are limited to small keys (4, 8, 16 bits) and simple neural networks, security is reasoned about rather than formally proven, and in the ANC tests Eve was not retrained after Alice and Bob finished because the CryptoNet was simple enough to analyze manually.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

Crossref · 10.3390/s18051306

Cites

20 of 20 references verified0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Figures

Figure 1 Alice, Bob, and Eve, with a symmetric cryptosystem.
Figure 1 Alice, Bob, and Eve, with a symmetric cryptosystem.CC BY · PubMed Central
Figure 2 Alice, Bob, and Eve, and the CPA-ANC setup. Alice and Bob share a secret key K. Eve chooses two messages P0 and P1. Alice randomly chooses one message to encrypt producing the ciphertext C. Bob uses the key K to decrypt C producing PBob. Eve receives the ciphertext C and tries to guess which message was encrypted outputting 0 if believes P0 was encrypted and 1 if believes P1 was encrypted.
Figure 2 Alice, Bob, and Eve, and the CPA-ANC setup. Alice and Bob share a secret key K. Eve chooses two messages P0 and P1. Alice randomly chooses one message to encrypt producing the ciphertext C. Bob uses the key K to decrypt C producing PBob. Eve receives the ciphertext C and tries to guess which message was encrypted outputting 0 if believes P0 was encrypted and 1 if believes P1 was encrypted.CC BY · PubMed Central
Figure 3 The proposed neural network (CryptoNet). The bits of the plaintext are represented by [p0, p1, …, pn−1]. The bits of the key are represented by [k0, k1, …, kn−1]. The function f (see Equation (9)) transforms the bits into angles [a0, a1, … a2n−1]. A fully connected layer combines the angles forming the variables [h0, h1, …, hn−1]. The function f⁻¹ (see Equation (10)) transforms the combined angles into continuous bits (real numbers in the interval [0,1]) [c0, c1, …, cn−1] representing the ciphertext.
Figure 3 The proposed neural network (CryptoNet). The bits of the plaintext are represented by [p0, p1, …, pn−1]. The bits of the key are represented by [k0, k1, …, kn−1]. The function f (see Equation (9)) transforms the bits into angles [a0, a1, … a2n−1]. A fully connected layer combines the angles forming the variables [h0, h1, …, hn−1]. The function f⁻¹ (see Equation (10)) transforms the combined angles into continuous bits (real numbers in the interval [0,1]) [c0, c1, …, cn−1] representing the ciphertext.CC BY · PubMed Central
Figure 4 The learning curves forThe challenge between Alice and Bob against Eve who tries to minimize its decryption error. Alice and Bob try to minimize Bob’s decryption error while maximizing Eve’s decryption error. Eve is represented in green and Alice and Bob are represented in blue. The number of steps denote the number of “minibatches” on training phase.
Figure 4 The learning curves forThe challenge between Alice and Bob against Eve who tries to minimize its decryption error. Alice and Bob try to minimize Bob’s decryption error while maximizing Eve’s decryption error. Eve is represented in green and Alice and Bob are represented in blue. The number of steps denote the number of “minibatches” on training phase.CC BY · PubMed Central
Figure 5 Eve’s neural network (CPA-CryptoNet). Eve receives as input two plaintexts P0 and P1. The bits of each plaintext are represented by [p0,0, …, p0,n−1] for P0 and [p1,0, …, p1,n−1] for P1. Eve also receives the ciphertext C represented by [c0, …, cn−1]. The function f (see Equation (9)) transforms the bits into angles [a0, a1, … a3n−1]. A fully connected layer combines the angles generating the hidden variables [h0⁰, h1⁰, …, hR−1⁰], where R is the number of rules. The function f⁻¹ (see Equation (10)) transforms the combined angles into continuous bits (real numbers in the interval [0,1]) [h0¹, h1¹, …, hR−1¹]. Another fully connected layer brings the hidden variables to logits through a softmax layer resulting in a probability π0 of C being a ciphertext of P0 and a probability π1 of C being a ciphertext of P1.
Figure 5 Eve’s neural network (CPA-CryptoNet). Eve receives as input two plaintexts P0 and P1. The bits of each plaintext are represented by [p0,0, …, p0,n−1] for P0 and [p1,0, …, p1,n−1] for P1. Eve also receives the ciphertext C represented by [c0, …, cn−1]. The function f (see Equation (9)) transforms the bits into angles [a0, a1, … a3n−1]. A fully connected layer combines the angles generating the hidden variables [h0⁰, h1⁰, …, hR−1⁰], where R is the number of rules. The function f⁻¹ (see Equation (10)) transforms the combined angles into continuous bits (real numbers in the interval [0,1]) [h0¹, h1¹, …, hR−1¹]. Another fully connected layer brings the hidden variables to logits through a softmax layer resulting in a probability π0 of C being a ciphertext of P0 and a probability π1 of C being a ciphertext of P1.CC BY · PubMed Central
Figure 6 The challenge of Alice and Bob against Eve. Eve tries to maximize its classification rate while Alice and Bob try to minimize Eve’s classification rate and minimize Bob’s decryption error. In the figure on the left, Bob’s decryption error decreases over time in blue color. Also, on the right, one can see that Eve increases its classification rate in red color, however, when Alice and Bob learn a secure cryptosystem, in this case the OTP, Eve’s classification rate becomes no better than random. The number of steps denote the number of “minibatches” on training phase. In black, we have a smooth version of the red curve.
Figure 6 The challenge of Alice and Bob against Eve. Eve tries to maximize its classification rate while Alice and Bob try to minimize Eve’s classification rate and minimize Bob’s decryption error. In the figure on the left, Bob’s decryption error decreases over time in blue color. Also, on the right, one can see that Eve increases its classification rate in red color, however, when Alice and Bob learn a secure cryptosystem, in this case the OTP, Eve’s classification rate becomes no better than random. The number of steps denote the number of “minibatches” on training phase. In black, we have a smooth version of the red curve.CC BY · PubMed Central

Verification

Claims the paper makes

3 Valid · 0 Not valid · 3 Not checked · 33 Own results and interpretations

19 more claims

Create a free account to see all 39 claims and every source verdict.

See all claims — free account
  • Probably not a substantial claim. 7
  • It may state two separate claims as one. 10
  • The quote only partly states this claim. 1

Create a free account to see these claims.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

Each contradiction between two passages listed here was confirmed by an independent check.

2 of 2

Citations

Cites

Research works printed but not linked: 5

  1. Simonyan, K., and Zisserman, A. (arXiv, 2014). Very deep convolutional networks for large-scale image recognition, arXiv.
  2. Li, C. (2005). Cryptanalyses of Some Multimedia Encryption Schemes. [Master’s Thesis, Zhejiang University].
  3. Desai, 2012, Using layer recurrent neural network to generate pseudo random number sequences, Int. J. Comput. Sci. Issues, 9, 324
  4. Goodfellow, I., Bengio, Y., and Courville, A. (2016). Deep Learning, MIT Press. Available online: http://www.deeplearningbook.org.
  5. Oliveira, L.B., Pereira, F.M.Q., Misoczki, R., Aranha, D.F., Borges, F., and Liu, J. (August, January 31). The computer for the 21st century: Security privacy challenges after 25 years. Proceedings of the 26th International Conference on Computer Communication and Networks (ICCCN), Vancouver, BC, Canada.

Cited by

See all 75

Metadata

Authors
Coutinho, M., De Oliveira Albuquerque, R., Borges, F., García Villalba, L., & Kim, T.-H.
Affiliations
  • Universidade de Brasília (BR)
  • Cybersecurity INCT Unit 6, Decision Technologies Laboratory—LATITUDE, Electrical Engineering Department (ENE), Technology College, University of Brasília (UnB), 70.910-900 Brasília-DF, Brazil
  • Laboratório Nacional de Computação Científica (BR)
  • Group of Analysis, Security and Systems (GASS), Department of Software Engineering and Artificial Intelligence (DISIA), Faculty of Computer Science and Engineering, Office 431, Universidad Complutense de Madrid (UCM), Calle Profesor José García Santesmases, 9, Ciudad Universitaria, 28040 Madrid, Spain
  • Sungshin Women's University (KR)
Venue
Sensors
Publisher
MDPI AG
Published
2018-04-24
Volume
18
Issue
5
Pages
1306
ISSN
1424-8220 (ISSN-L)
OpenAlex
W2800109595
Cited by
75
References
17
Citations by year
2026: 4 · 2025: 10 · 2024: 11 · 2023: 15 · 2022: 8 · 2021: 11 · 2020: 14 · 2019: 1 · 2018: 1
FWCI
3.80
Type
journal article
Language
en
Open access
Locations
  • Sensors (publishedVersion, cc-by)
  • Europe PMC (PubMed Central) (publishedVersion, cc-by)
  • PubMed Central (publishedVersion, cc-by)
  • PubMed (publishedVersion)
  • Library Open Repository (Universidad Complutense Madrid) (submittedVersion, cc-by)
  • DOAJ (DOAJ: Directory of Open Access Journals) (submittedVersion, cc-by-sa)
Funders
  • European Commission (671672, H2020-ICT, H2020-ICT-2014, HORIZON2020, H2020, H2020-ICT-2014-2)
  • Coordenação de Aperfeiçoamento de Pessoal de Nível Superior (23038, 23038.007604/2014-69)
  • Conselho Nacional de Desenvolvimento Científico e Tecnológico (2014‐2, 465741/2014-2)
  • Fundação de Apoio à Pesquisa do Distrito Federal (0193.001366/2016, 0193.001365/2016)
  • Forskningsrådet om Hälsa, Arbetsliv och Välfärd
  • Horizon 2020 Framework Programme
Topics
  • Physical Sciences › Computer Science › Computer Networks and Communications › Cryptography and Data Security
  • Physical Sciences › Computer Science › Artificial Intelligence › Cryptographic Implementations and Security
  • Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
Keywords
one-time pad, adversarial learning
MeSH terms
Algorithms, Artificial Intelligence, Communication

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

The claim verdicts this report counts are experimental: their accuracy is not yet measured.

A language model drew the claims from the paper on 2026-10-21, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).

A second model labelled each claim on 2026-10-21 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).

Cited sources are checked with a language model’s help (gpt-6-sol).

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.