After I've read a lot about key exchange many sources state that the Station-to-Station is secure, since it also verifies the entity on the other side.

Well how is that true, if an active Man in the Middle can just send it's own public key and sign the concatenated shared x and y with it's own private key?

Wouldn't it be as secure as classic Diffie-Hellman?

1 Answer 1


The important premise of STS is that Alice and Bob already know each other's public keys. Possibly, this "knowledge" is acquired through certificates, as part of a PKI. See the relevant quote from the Wikipedia page on STS:

Public key certificates may be sent in steps 2 and 3 if the keys are not known in advance.

The SSL/TLS protocol, when used with the "DHE" cipher suites and with certificate-based client authentication, is actually an incarnation of STS.

  • Well then how exactly is it a key exchange protocol if both parties already have a secure means of communication - they know each other's public keys. They already have shared information which is secret because it is associated with the corresponding private keys. Commented Apr 4, 2014 at 19:35
  • 1
    They know each other signature public keys. A public key is not necessarily fit for asymmetric encryption. Moreover, using a new DH key pair on-the-fly grants forward secrecy.
    – Tom Leek
    Commented Apr 4, 2014 at 19:41
  • What exactly should signature public key mean? How is it different? Commented Apr 4, 2014 at 19:44
  • 1
    "Signature public key" = "public key fit for use in a signature algorithm". E.g. DSA, ECDSA... such public keys do not necessarily support asymmetric encryption or key exchange. It so happens that the most used asymmetric encryption algorithm (RSA) and the most used signature algorithm (RSA) share the same kind of key, allowing a "RSA key" to be used for both usages (although you do not necessarily want to), but that's not the general case for all algorithms cryptographers have come up with.
    – Tom Leek
    Commented Apr 4, 2014 at 19:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .