Hey you!
Come over and help me, please. We discovered a strange key agreement protocol
used on this server: ctf.fluxfingers.net:1330. They send a curve which they
use later. But we think the robots are a bit UBERcautious and do not use the
curve’s P. So they first exchange their public point with a technique we could
not figure out. It looks like they do not need a public key for this step.
Afterwards they use another technique to agree on a key which they ultimately
use to send some encrypted password.
We need this last password to shut down the robofactory on our way to the Oktoberfest.
Oh btw, the robots use AESECB for symmetric encryption.
Hint: He, we have the latest news for you. The first part of their strange key agreement was designed by the famous SHARobot Мир!
First we started to find out what happens when you connect to the service. So we found out ECKA stands for Elliptic Curve Key Agreement and learned all translations for Мир.
After googeling “sha mir” (“mir” is the transcription for “Мир”) we obviously realized, that the first part of the key agreement could be Shamir’s threepassprotocol. For the second part we guessed a DiffieHellman key exchange.
Shamir’s threepassprotocol with elliptic curves
 Alice and Bob generate a secret and its inverse
 Alice selects a point
 Alice encrypts with her secret:
 Bob encrypts with his secret:
 Alice decrypts with the known inverse
 Bob decrypts with the known inverse
 knows now
DiffieHellmann with elliptic curves
 Alice and Bob generate both a secret
 Alice sends to Bob
 Bob sends to Alice
 Both know the secret
The easiest way to implement this key exchange is, by using as a secret
each round.
So the following script decrypts the flag b3nDer_<3_3PDHKE
with about a 50/50 chance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 
