← Back to Writeups
CUSTOMEasyCrypto

Послание от Француза (A Message from the Frenchman)

XESXOR9/10/20263 min read
#crypto#custom#easy#known_key_from_clue#known_plaintext_key_recovery#vigenere_decryption

Послание от Француза (A Message from the Frenchman)

Platform: bug-makers | Category: Crypto | Type: Challenge | Difficulty: Easy | OS: NA | Author: XESXOR | Date: 2026-05-29 | Status: Solved Techniques: known_key_from_clue, known_plaintext_key_recovery, vigenere_decryption

Summary

Task: a 143-byte ciphertext letter from a Frenchman plus a photo of 'Pixie' with a note that her name is the key but not in Russian. Solution: recognized a Vigenere cipher (preserved formatting, flag-shaped suffix), derived the key 'pixie' (English spelling per the hint) and decrypted to recover the flag.

Послание от Француза (A Message from the Frenchman) — bug-makers

Description

Вы получили загадочное зашифрованное письмо от француза. К посланию была прикреплена фотография Пикси. Сзади фотографии чётко было написано на русском: «Её имя — ключ. Только не вздумай писать его на русском.»

English translation: You received a mysterious encrypted letter from a Frenchman. Attached to the message was a photograph of Pixie. On the back of the photograph it was clearly written in Russian: "Her name is the key. Just don't even think about writing it in Russian." ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

Provided artifact — french-message.txt (143 bytes):

Wmits, izxdiamo! Gsj tbnx ipfa ftpfvh xv Pimcb-Mwygkxqr-hco-Amdcim. Mi abmqtl futdzqiri, al Q htkflis bl ziicov mi. JroGIN{A0VX_U0ZD3B_XW3_S3V}

Goal: decrypt the letter and recover the flag.

Analysis

The ciphertext has the tell-tale signature of a Vigenère cipher:

  • Spaces, punctuation (,, !, -), letter case, and digits all pass through unchanged.
  • Only alphabetic characters are transformed.
  • It ends with a flag-shaped token JroGIN{A0VX_U0ZD3B_XW3_S3V} — the {...} braces, digits, and underscores are untouched, and the letters are shifted, exactly what a polyalphabetic substitution that skips non-letters produces. ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

This rules out single-byte XOR, base-N encodings, and simple Caesar (a single shift would not produce such varied letter mappings).

The real challenge is finding the key, which is a semantic/OSINT puzzle baked into the description:

  1. The attached photo is of "Pixie" → "Her name is the key."
  2. "Don't write it in Russian" → use the English spelling pixie, not the Russian transliteration пикси. This matters because a Vigenère key must be in the Latin alphabet here, and the hint explicitly steers away from a Cyrillic key. ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

Solution

Apply standard Vigenère decryption with key pixie, skipping non-alphabetic characters in the key stream:

python
#!/usr/bin/env python3
ct = 'Wmits, izxdiamo! Gsj tbnx ipfa ftpfvh xv Pimcb-Mwygkxqr-hco-Amdcim. Mi abmqtl futdzqiri, al Q htkflis bl ziicov mi. JroGIN{A0VX_U0ZD3B_XW3_S3V}'

def dec(ct, key):
    out = ''
    ki = 0
    for c in ct:
        if c.isalpha():
            k = ord(key[ki % len(key)].lower()) - ord('a')
            base = ord('A') if c.isupper() else ord('a')
            out += chr((ord(c) - base - k) % 26 + base)
            ki += 1
        else:
            out += c
    return out
‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

print(dec(ct, 'pixie'))
# Hello, traveler! You left this behind in Saint-Pourcain-sur-Sioule.
# It seemed important, so I decided to return it. BugCTF{REDACTED}

The decrypted message reads:

Hello, traveler! You left this behind in Saint-Pourçain-sur-Sioule. It seemed important, so I decided to return it.

"Saint-Pourçain-sur-Sioule" is a real French commune, confirming the French theme and the correct key. The flag literally rewards the insight: don't forget the key.

Alternative: known-plaintext key recovery

‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍

If the key word were not guessable, the flag prefix is a known plaintext. The ciphertext flag token is JroGIN{...} and the expected prefix is BugCTF{. Subtracting (mod 26) the plaintext letters from the ciphertext letters recovers the repeating key:

  • J - B = pi, r - u = x, o - g = i, G - C = e, I - T = pi, N - F = i → key cycles back to pixie.

This independently confirms the key without the semantic clue. ‍​‌‌​​‌​​​‌‌​​‌​​​​‌‌​‌​​​​‌‌‌​​‌​​‌‌​​​‌​​‌‌‌​​​​​‌‌​‌‌​​​‌‌​​​​‍