Неразгаданный шифр (notsolvedcipher)
Неразгаданный шифр (notsolvedcipher)
Platform: CUSTOM | Category: Crypto | Type: Challenge | Difficulty: Easy | OS: N/A | **Author: XESXOR Techniques: known_key_attack, vigenere_decryption
Summary
Walkthrough of the CUSTOM Crypto Неразгаданный шифр (notsolvedcipher). Task: Decrypt ciphertext with provided key. Solution: Apply Vigenère cipher decryption using the given key to transform KRRRPR{...} to CODEBY{...}.
Description
В файле содержиться ключ и шифр, должно быть легко его разгадать?
Analysis
The file notsolvedcipher.txt contains:
- Ciphertext:
KRRRPR{memlbrjvuxxrfa} - Key:
idonotknow
Signs of Vigenère cipher:
- Format
KRRRPR{...}should decrypt toCODEBY{...} - Key is provided — classic sign of a polyalphabetic cipher
- Task name "Неразгаданный шифр" (Unsolved cipher) — ironic reference to the history of the Vigenère cipher
Historical Note
The Vigenère cipher was considered "unbreakable" for about 300 years (le chiffre indéchiffrable), until Charles Babbage and Friedrich Kasiski developed methods to crack it in the 19th century.
Solution
python read-only • copy allowed#!/usr/bin/env python3 """ Vigenère cipher decryption with known key """ def vigenere_decrypt(ciphertext: str, key: str) -> str: """ Decrypt Vigenère cipher with known key. Args: ciphertext: Encrypted text key: Decryption key Returns: Decrypted plaintext """ result = [] key = key.lower() key_index = 0 for char in ciphertext: if char.isalpha(): # Determine base (uppercase or lowercase) base = ord('A') if char.isupper() else ord('a') # Calculate shift from key character shift = ord(key[key_index % len(key)]) - ord('a') # Decrypt: subtract shift (reverse of encryption) decrypted = chr((ord(char) - base - shift) % 26 + base) result.append(decrypted) # Move to next key character key_index += 1 else: # Non-alphabetic characters pass through unchanged result.append(char) return ''.join(result) # Challenge data ciphertext = "KRRRPR{memlbrjvuxxrfa}" key = "idonotknow" # Decrypt plaintext = vigenere_decrypt(ciphertext, key) print(f"Ciphertext: {ciphertext}") print(f"Key: {key}") print(f"Plaintext: {plaintext}")
Decryption Verification
| Position | Cipher | Key | Shift | Result |
|---|---|---|---|---|
| 0 | K | i | 8 | C |
| 1 | R | d | 3 | O |
| 2 | R | o | 14 | D |
| 3 | R | n | 13 | E |
| 4 | P | o | 14 | B |
| 5 | R | t | 19 | Y |
| ... | ... | ... | ... | ... |
| |
Alternative Tools
- CyberChef: Recipe "Vigenère Decode" with key
- dcode.fr: Online Vigenère decoder
- Rumkin.com: Cipher tools
Related Techniques
- Without key: Kasiski attack to determine key length
- Partial key: Frequency analysis for recovery
- Known plaintext: Calculate key from plaintext/ciphertext pair
Key Takeaways / Lessons
- Mastering known_key_attack, vigenere_decryption was key to this challenge.
- Always check for common misconfigurations and verify assumptions.
Crafted by XESXOR Research • 2025-12-25 • CUSTOM • Неразгаданный шифр (notsolvedcipher) • Difficulty: Easy