0
$\begingroup$

I want to know that, is shared secret and SKEYID are same in the IPSec? I knew that from SKEYID, three further keys are generated (derivative, authentication and encryption). But from where this SKEYID is generated? Is this resultant of DH public key and nonce values shared in message 3 and 4? Also, kindly mention what is generated from DH public key and nonce values shared in message 3 and 4? Also, if the keys have multiple names (like shared secret also known as SKEYID for example, I don't know whether they are same, that is my initial question), kindly mention their multiple names as well to avoid confusion. Thanks in advance.

$\endgroup$

1 Answer 1

1
$\begingroup$

First off, you are asking about IKEv1, which is an obsolete protocol - everything should be using IKEv2 instead (which does things quite differently).

However, as to how IKEv1 generates SKEYID (which is not the same as the DH shared secret, which is referred to as g^xy below), it is explained in RFC 2409, section 5.

To summarize, the recipe for creating the shared secret depends on the authentication method; it is one of (to quote RFC 2409 with some explanatory comments):

 If you're authenticating via signatures (certificates):
    SKEYID = prf(Ni_b | Nr_b, g^xy)
 If you're authenticating via preshared RSA keys (almost no one does this):
    SKEYID = prf(hash(Ni_b | Nr_b), CKY-I | CKY-R)
 If you're authenticating via pre-shared keys (strings):
    SKEYID = prf(pre-shared-key, Ni_b | Nr_b)

SKEYID is then used to create the three separate secrets SKEYID_a, SKEYID_d, SKEYID_e, as explained in the RFC.


And, BTW, since you asked about IPsec, well IPsec proper is only the data encryption protocol; it relies on something else to generate keys (and do authentication, etc) - one common option is IKE (Internet Key exchange). In this, IPsec differs from TLS (which bundles everything together) - IPsec has a conscious split of responsibilities. On the other hand, it is not that uncommon to refer to the combination of IPsec and IKE as IPsec, so this is just an informative comment, not a rebuke.

$\endgroup$
5
  • $\begingroup$ a. Now I understand how SKEYID is created (value SKEYID is computed separately for each authentication method). b. Now I understand how SKEYID_d, SKEYID_a and SKEYID_e are created (result of either Main Mode or Aggressive Mode is three groups of authenticated keying material). c. SKEYID used in computation of SKEYID_d, SKEYID_a and SKEYID_e). d. g^xy is the Diffie-Hellman shared secret. e. g^xy is also used in calculation of SKEYID (for signatures as mentioned in RFC 2409). f. g^xy is also used in calculation of SKEYID_d, SKEYID_a and SKEYID_e (as mentioned in RFC 2409). Kindly confirm it $\endgroup$ May 14 at 14:50
  • $\begingroup$ @TechLearner: that sounds about right. Now, I would advise you to look into IKEv2 - that's what we use nowadays... $\endgroup$
    – poncho
    May 14 at 15:13
  • $\begingroup$ Thank you. I think my last two questions from IKEv1 are: a. For g^xy (the Diffie-Hellman shared secret), the only use is to create multiple SKEYID's as mentioned above in my last post. Is it correct or do we have any other use of g^xy? Kindly mention if any other use. b. The main mode messages 5 and 6 are encrypted using SKEYID_e (the key used for encryption is derived from SKEYID_e {as mentioned in the section 5 of RFC 2409}). Did I understand correct? If no, with whom main mode message 5 and 6 are encrypted? Kindly put some light on these two points. This will help a lot. $\endgroup$ May 14 at 15:54
  • $\begingroup$ @TechLearner: As for g^xy \those are the only places where the it is used. As for main mode message 5,6, the key derived from SKEYID_e is used to encrypt. $\endgroup$
    – poncho
    May 14 at 16:10
  • $\begingroup$ Thank you very much for your help. That helped me a lot. Now I am good to proceed with the IKEv2. Have a nice day ahead. $\endgroup$ May 14 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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