Saved in:
Bibliographic Details
Main Authors: Korrapati, Jathin, Mendoza, Patrick, Tomar, Aditya, Abraham, Abein
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2508.10235
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913990915915776
author Korrapati, Jathin
Mendoza, Patrick
Tomar, Aditya
Abraham, Abein
author_facet Korrapati, Jathin
Mendoza, Patrick
Tomar, Aditya
Abraham, Abein
contents In-context learning (ICL) has emerged as a powerful capability of transformer-based language models, enabling them to perform tasks by conditioning on a small number of examples presented at inference time, without any parameter updates. Prior work has shown that transformers can generalize over simple function classes like linear functions, decision trees, even neural networks, purely from context, focusing on numerical or symbolic reasoning over underlying well-structured functions. Instead, we propose a novel application of ICL into the domain of cryptographic function learning, specifically focusing on ciphers such as mono-alphabetic substitution and Vigenère ciphers, two classes of private-key encryption schemes. These ciphers involve a fixed but hidden bijective mapping between plain text and cipher text characters. Given a small set of (cipher text, plain text) pairs, the goal is for the model to infer the underlying substitution and decode a new cipher text word. This setting poses a structured inference challenge, which is well-suited for evaluating the inductive biases and generalization capabilities of transformers under the ICL paradigm. Code is available at https://github.com/adistomar/CS182-project.
format Preprint
id arxiv_https___arxiv_org_abs_2508_10235
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Can Transformers Break Encryption Schemes via In-Context Learning?
Korrapati, Jathin
Mendoza, Patrick
Tomar, Aditya
Abraham, Abein
Machine Learning
In-context learning (ICL) has emerged as a powerful capability of transformer-based language models, enabling them to perform tasks by conditioning on a small number of examples presented at inference time, without any parameter updates. Prior work has shown that transformers can generalize over simple function classes like linear functions, decision trees, even neural networks, purely from context, focusing on numerical or symbolic reasoning over underlying well-structured functions. Instead, we propose a novel application of ICL into the domain of cryptographic function learning, specifically focusing on ciphers such as mono-alphabetic substitution and Vigenère ciphers, two classes of private-key encryption schemes. These ciphers involve a fixed but hidden bijective mapping between plain text and cipher text characters. Given a small set of (cipher text, plain text) pairs, the goal is for the model to infer the underlying substitution and decode a new cipher text word. This setting poses a structured inference challenge, which is well-suited for evaluating the inductive biases and generalization capabilities of transformers under the ICL paradigm. Code is available at https://github.com/adistomar/CS182-project.
title Can Transformers Break Encryption Schemes via In-Context Learning?
topic Machine Learning
url https://arxiv.org/abs/2508.10235