Aller au contenu

Shared Secrets

Writeup de Arnold-26, repris avec son autorisation. Source : cylab-academy-writeups — challenge #715, résolu le 2026-11-23. Flags tronqués.

Catégorie : Cryptography · Challenge : #715 · Résolu le : 2026-11-23

Énoncé

A message was encrypted using a shared secret... but it looks like one side of the exchange leaked something. Can you piece together the secret and get the flag? Download the message. And source code

Résolution

Méthode : diffie-hellman + XOR octet.

Le transcript donne g=2, p, A et b (le secret du client a fuite). shared = pow(A, b, p), puis le flag est chiffré par XOR avec shared % 256. Le enc est en hex : on déchiffre octet par octet.

Flag

academy{...}