{"data":{"kind":"file","path":"README.md","version_id":"iwygqq239k43vagm2p1zh4bb","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":2511,"modified_at":"2026-09-02T14:25:56.975000","content_hash":"f97fb125b6fe130caf4c37fe2335ef24d9dd2142a04ebbb5ab9318f9a789cb88"},"entries":[],"content":"# Cryptography Protocol Analyzer (Toy Cipher Systems)\n\nAn RL evaluation environment that tests a model's ability to analyze, attack, and reason about cryptographic protocols using toy cipher systems.\n\n## Overview\n\nThis environment presents diverse cryptographic challenges spanning classical ciphers, protocol analysis, and multi-layer encryption. Models must demonstrate understanding of cryptanalytic techniques including frequency analysis, known-plaintext attacks, and protocol vulnerability assessment.\n\n## Task Types\n\n| Task | Description | Difficulty |\n|------|-------------|------------|\n| Cipher Identification | Determine which cipher was used from ciphertext patterns | Medium |\n| Key Recovery | Recover encryption keys using known-plaintext or statistical attacks | Medium |\n| Protocol Analysis | Identify security flaws in toy cryptographic protocols | Hard |\n| Frequency Analysis | Break substitution ciphers via English letter frequency | Medium |\n| Multi-Step Decryption | Peel multiple encryption layers to recover plaintext | Hard |\n\n## Cipher Systems Covered\n\n- **Caesar Cipher**: Shift cipher with uniform letter substitution\n- **Vigenere Cipher**: Polyalphabetic cipher with repeating keyword\n- **XOR Stream Cipher**: Byte-level XOR with repeating key\n- **Monoalphabetic Substitution**: Random letter-to-letter mapping\n- **Rail Fence Transposition**: Zigzag pattern rearrangement\n\n## Protocol Vulnerabilities Tested\n\n- Weak key derivation (phone digits as key material)\n- ECB mode pattern leakage\n- Predictable password reset tokens\n- Nonce reuse in stream ciphers\n- MAC-then-Encrypt ordering flaws\n- Small-group Diffie-Hellman\n\n## Scoring Rubric\n\n| Metric | Weight | Description |\n|--------|--------|-------------|\n| Cipher Type Accuracy | 1.5 | Correct identification of cipher algorithm |\n| Key Recovery | 1.5 | Accurate key extraction |\n| Plaintext Recovery | 1.5 | Correct decryption to original text |\n| Vulnerability Detection | 1.5 | Identification of protocol flaws |\n| Severity Assessment | 0.8 | Correct risk severity rating |\n| Explanation Quality | 1.0 | Depth of cryptographic reasoning |\n| Format Compliance | 0.5 | JSON structure and organization |\n\n## Usage\n\n```python\nimport verifiers as vf\n\nenv = vf.load_environment(\"melis/crypto-protocol-analyzer\")\n```\n\n## Configuration\n\n```python\nenv = vf.load_environment(\n    \"melis/crypto-protocol-analyzer\",\n    num_samples=80,   # number of evaluation tasks\n    seed=42,          # reproducibility seed\n)\n```\n\n## Version\n\nv0.1.0\n","encoding":"utf-8","truncated":false,"total_bytes":2511},"status":null}