Both parties uses Curve 25519 key pairs for ECDH key exchange. What is the key length of shared secret after ECDH?
1 Answer
In this paper you can find nearly everything about Curve25519. In the section "Specification" you find the answer:
{Curve25519 secret keys} × {Curve25519 public keys} → {Curve25519 public keys}
this is the function, which is calculated for a key exchange. So the shared secret key has the same properties as the public keys:
{ $q: q \in ${ $0,1,...,2^{256 - 1}$}}
This matches, what Bernstein says in the introduction: The key length (for both public and private) are 32 byte long. And in that format they are stored. In other words every key is 256 bits long.
In this post you see an example for these keys.