cyberchef_crib_drag
Drag a guessed plaintext crib across XOR ciphertext to find matching offsets. Use two ciphertexts to reveal plaintext spans, or a known key length to recover key bytes.
Instructions
Drag a guessed plaintext fragment along a XOR ciphertext and report every offset where it fits, ranked. With TWO ciphertexts under one key their XOR cancels the key, so a crib guessed in one message yields the matching span of the OTHER. With ONE ciphertext and a known fragment it yields key bytes instead; supply key_length and periodicity becomes a far stronger filter than printability, recovering the whole key when the crib is at least as long as it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | How many offsets to report, best first. | |
| crib | Yes | The guessed plaintext fragment, e.g. " the ". | |
| ciphertext | Yes | The ciphertext to drag along. | |
| key_length | No | Single-ciphertext mode only: the repeating key's length, if known. Derived bytes must then agree mod this length, which rejects far more offsets than printability. | |
| ciphertext_b | No | A second ciphertext under the SAME key. Every hit is then a span of the other plaintext. Omit it to recover key bytes instead. | |
| input_format | No | How the ciphertexts are encoded. The crib is always literal text. | Hex |
| printable_only | No | Report only fully printable results. False when the plaintext is not text. |