In a Server Key Exchange message, isn't it supposed to send both the public key's parameters which are for DH: the g(generator) and p(modulus), but the message only contains one public key called Pubkey: so is that the g, p or both, or is there a fixed variable like there is for the RSA public exponent which is 2^16+1? And where is g^e mod p?

  • $\begingroup$ Note: using 2^16+1 for RSA public exponent is fairly common but by no means required. SSL/TLS used ephemeral RSA keys only for some of the deliberately-weak and long-obsolete 'export' ciphersuites, and in that case it explicitly sent m and e, see rfc2246 7.4.3. Mostly it uses static RSA keys in an X.509 certificate which are encoded as standardized for X.509/PKIX by rfc3279. $\endgroup$ – dave_thompson_085 Dec 18 '16 at 4:20

From the screenshot:

EC Diffie-Hellman Server Params
Curve Type: named_curve
Named Curve: secp256r1
Pubkey: ...
Signature: ...

This tells us the following: You used a key exchange with ECDHE. They key exchange used P-256 (the elliptic curve, aka secp256r1) and the given value describes the public ECDH key and the signature on this value.

The paramters you are looking for are hard-coded for P-256 and documented in several places (for example in this PDF). The $g^e\bmod p$ you're looking for is the Pubkey which is mentioned in the screenshot.

| improve this answer | |
  • $\begingroup$ do you mean that this if it is a DH only key exchange, it will send the p, and g alone, but this is a ECDHE nstead? $\endgroup$ – user3407319 Dec 17 '16 at 14:21
  • 1
    $\begingroup$ @user3407319 Yes (?), if it were proper (plain) DH it would send $p$ and $g$ but as this is ECDHE it only sends "use this standard curve" $\endgroup$ – SEJPM Dec 17 '16 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.