CoolFace
Datasetpublic

systemslibrarian/classical-cipher-corpus

Classical Cipher Corpus A labeled educational dataset of classical cipher examples for teaching cryptanalysis and training small cipher-family classifiers. Part of the Cipher Detective AI project: πŸ•΅οΈ Space: systemslibrarian/cipher-detective-ai πŸ“¦ Dataset: systemslibrarian/classical-cipher-corpus (this repo) πŸ€– Model: systemslibrarian/cipher-detective-classifier Intended use Teach classical cryptanalysis. Benchmark educational cipher-family detectors. Train… See the full description on the dataset page: https://huggingface.co/datasets/systemslibrarian/classical-cipher-corpus.

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes102downloads
Dataset Card

Classical Cipher Corpus

A labeled educational dataset of classical cipher examples for teaching cryptanalysis and training small cipher-family classifiers.

Part of the Cipher Detective AI project:

Intended use

  • β€”Teach classical cryptanalysis.
  • β€”Benchmark educational cipher-family detectors.
  • β€”Train small text classifiers for Hugging Face Spaces.
  • β€”Demonstrate why historical ciphers are not modern security.

Not intended for

  • β€”Unauthorized access.
  • β€”Surveillance.
  • β€”Breaking modern encryption.
  • β€”Password recovery.
  • β€”Bypassing security controls.
  • β€”Real-world cryptographic security claims.

Schema

Each line of cipher_examples.jsonl is one record:

json
{
  "id": "cda-0000042",
  "text": "WKLV LV D FODVVLFDO FDHVDU FLSKHU GHPR",
  "ciphertext": "WKLV LV D FODVVLFDO FDHVDU FLSKHU GHPR",
  "plaintext": "THIS IS A CLASSICAL CAESAR CIPHER DEMO",
  "label": "caesar_rot",
  "cipher": "caesar_rot",
  "key": {"shift": 3},
  "difficulty": "medium",
  "language": "en",
  "text_length": 38,
  "length": 38,
  "attack_methods": ["brute_force_26", "frequency_analysis", "chi_squared_english"],
  "educational_note": "Caesar / ROT-N is a single-shift monoalphabetic cipher with only 26 keys.",
  "source": "synthetic_educational"
}

text and ciphertext are kept as aliases for compatibility. text_length and length likewise.

Labels

  • β€”plaintext
  • β€”caesar_rot
  • β€”atbash
  • β€”vigenere
  • β€”rail_fence
  • β€”columnar
  • β€”affine
  • β€”substitution

Construction

The dataset is generated synthetically from educational English plaintext templates and classical cipher transforms. It is reproducible with:

bash
python scripts/generate_dataset.py --out data/cipher_examples.jsonl --n 50000 --seed 42

Biases and limitations

  • β€”Mostly English.
  • β€”Synthetic text.
  • β€”Limited cipher families.
  • β€”Not representative of modern encryption.
  • β€”Not a benchmark for real-world cryptanalytic capability.
  • β€”Model performance on this dataset should be framed only as educational classification performance.

Responsible framing

This dataset exists to teach pattern leakage in classical ciphers. It should be used to make learners more skeptical of weak encryption claims and more respectful of modern, well-reviewed cryptography.