IMS Security Framework - 3GPP2

43
3GPP2 S.S0086-B Version: 2.0 Date: February 2008 IMS Security Framework COPYRIGHT 3GPP2 and its Organizational Partners claim copyright in this document and individual Organizational Partners may copyright and issue documents or standards publications in individual Organizational Partner's name based on this document. Requests for reproduction of this document should be directed to the 3GPP2 Secretariat at [email protected]. Requests to reproduce individual Organizational Partner's documents should be directed to that Organizational Partner. See www.3gpp2.org for more information.

Transcript of IMS Security Framework - 3GPP2

Page 1: IMS Security Framework - 3GPP2

3GPP2 S.S0086-B

Version: 2.0

Date: February 2008

IMS Security Framework

COPYRIGHT

3GPP2 and its Organizational Partners claim copyright in this document and individual Organizational Partners may copyright and issue documents or standards publications in individual Organizational Partner's name based on this document. Requests for reproduction of this document should be directed to the 3GPP2 Secretariat at [email protected]. Requests to reproduce individual Organizational Partner's documents should be directed to that Organizational Partner. See www.3gpp2.org for more information.

Page 2: IMS Security Framework - 3GPP2

S.S0086-B v2.0

EDITOR

Zhibi Wang Alcatel-Lucent

(630)713-8381

[email protected]

REVISION HISTORY

1.0 Initial Publication December 2005

2.0 Addressed TIA legal comments February 2008

Page 3: IMS Security Framework - 3GPP2

(This page intentionally left blank)

Page 4: IMS Security Framework - 3GPP2
Page 5: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

i

CONTENTS

1 SCOPE ................................................................................................................................................... 1

2 REFERENCES...................................................................................................................................... 1 2.1 NORMATIVE REFERENCES ................................................................................................................ 1 2.2 INFORMATIVE REFERENCES.............................................................................................................. 2

3 DEFINITIONS, SYMBOLS AND ABBREVIATIONS..................................................................... 2 3.1 DEFINITIONS..................................................................................................................................... 2 3.2 ABBREVIATIONS............................................................................................................................... 3

4 OVERVIEW OF THE SECURITY ARCHITECTURE ................................................................... 3

5 SECURITY FEATURES...................................................................................................................... 6 5.1 SECURE ACCESS TO IMS................................................................................................................... 6

5.1.1 Authentication of the subscriber and the network ................................................................... 6 5.1.2 Re-Authentication of the subscriber ........................................................................................ 7 5.1.3 Confidentiality protection........................................................................................................ 7 5.1.4 Integrity protection.................................................................................................................. 7

5.2 NETWORK TOPOLOGY HIDING........................................................................................................... 8 5.3 SIP PRIVACY HANDLING IN IMS NETWORKS ................................................................................... 8 5.4 SIP PRIVACY HANDLING WHEN INTERWORKING WITH NON-IMS NETWORKS................................... 8

6 SECURITY MECHANISMS ............................................................................................................... 9 6.1 AUTHENTICATION AND KEY AGREEMENT ......................................................................................... 9

6.1.1 Authentication of an IM-subscriber......................................................................................... 9 6.1.2 Authentication failures .......................................................................................................... 12

6.1.2.1 User authentication failure ................................................................................................ 12 6.1.2.2 Network authentication failure .......................................................................................... 13 6.1.2.3 Incomplete authentication ................................................................................................. 14

6.1.3 Synchronization failure ......................................................................................................... 14 6.1.4 Network Initiated authentications ......................................................................................... 15 6.1.5 Integrity protection indicator ................................................................................................ 16

6.2 CONFIDENTIALITY MECHANISMS.................................................................................................... 16 6.3 INTEGRITY MECHANISMS................................................................................................................ 16 6.4 HIDING MECHANISMS ..................................................................................................................... 17 6.5 CSCF INTEROPERATING WITH PROXY LOCATED IN A NON-IMS NETWORK ..................................... 17

7 SECURITY ASSOCIATION SET-UP PROCEDURE.................................................................... 18 7.1 SECURITY ASSOCIATION PARAMETERS ........................................................................................... 18 7.2 SET-UP OF SECURITY ASSOCIATIONS (SUCCESSFUL CASE)............................................................... 22 7.3 ERROR CASES IN THE SET-UP OF SECURITY ASSOCIATIONS ............................................................. 24

7.3.1 Error cases related to IMS AKA............................................................................................ 24 7.3.1.1 User authentication failure ................................................................................................ 24 7.3.1.2 Network authentication failure .......................................................................................... 25 7.3.1.3 Synchronisation failure...................................................................................................... 25 7.3.1.4 Incomplete authentication ................................................................................................. 25

7.3.2 Error cases related to the Security-setup .............................................................................. 25 7.3.2.1 Proposal unacceptable to P-CSCF..................................................................................... 25 7.3.2.2 Proposal unacceptable to UE............................................................................................. 25 7.3.2.3 Failed consistency check of Security-setup lines at the P-CSCF ...................................... 25

Page 6: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

ii

7.4 AUTHENTICATED RE-REGISTRATION .............................................................................................. 26 7.4.1 Void ....................................................................................................................................... 26 7.4.1a Management of security associations in the UE ................................................................... 26 7.4.2 Void ....................................................................................................................................... 27 7.4.2a Management of security associations in the P-CSCF........................................................... 27

7.5 RULES FOR SECURITY ASSOCIATION HANDLING WHEN THE UE CHANGES IP ADDRESS................... 28 8 SECURE MEMORY WITHIN UE ................................................................................................... 29

8.1 REQUIREMENTS ON THE SECURE MEMORY OF AN IMS CAPABLE UE ............................................ 29 9 NETWORK DOMAIN SECURITY.................................................................................................. 30

9.1 INTER-DOMAIN SECURITY.............................................................................................................. 30 9.2 INTRA-DOMAIN SECURITY ............................................................................................................. 30 9.3 PROFILES OF NETWORK DOMAIN SECURITY METHODS.................................................................. 30

9.3.1 Support of IPSec ESP............................................................................................................ 30 9.3.1.1 Support of ESP authentication and encryption ................................................................. 31

9.3.2 Support of TLS ...................................................................................................................... 31 ANNEX A (NORMATIVE): THE USE OF SECURITY MECHANISM AGREEMENT FOR SIP SESSIONS (REF. [12]) FOR SECURITY MODE SET-UP.................................................................... 32

ANNEX B (NORMATIVE): KEY EXPANSION FUNCTIONS FOR IPSEC ESP ............................. 34

ANNEX C (INFORMATIVE): RECOMMENDATIONS TO PROTECT THE IMS FROM UES BYPASSING THE P-CSCF ....................................................................................................................... 35

Page 7: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

iii

FOREWORD This Technical Specification has been produced by the 3rd Generation Partnership Project 2 (3GPP2) based on “3rd Generation Partnership Project (3GPP); Technical Specification Group Services and System Aspects; 3G Security; Access security for IP-based services (Release 5)”, TS 33.203 v5.4.0.

This document contains portions of material copied from 3GPP document number(s) TS 33.203. The copyright on the 3GPP document is owned by the Organizational Partners of 3GPP (ARIB - Association of Radio Industries and Businesses, Japan; CCSA – China Communications Standards Association; ETSI – European Telecommunications Standards Institute; Committee T1, USA; TTA - Telecommunications Technology Association, Korea; and TTC – Telecommunication Technology Committee, Japan), which have granted license for reproduction and for use by 3GPP2 and its Organizational Partners.

Page 8: IMS Security Framework - 3GPP2
Page 9: IMS Security Framework - 3GPP2

S.S0086-B v2.0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

24

25

27

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

1

23

26

28

1 Scope This document addresses the access and network security for IP-based services.

The scope for this document is to specify the security features and mechanisms for secure access to the IM subsystem (IMS) for the 3G mobile telecommunication system.

The IMS supports IP Multimedia applications such as video, audio and multimedia conferences using SIP, Session Initiation Protocol, as the signaling protocol for creating and terminating Multimedia sessions, cf. [2]. This document only deals with how the SIP signaling is protected between the subscriber and the IMS, how the subscriber is authenticated and how the subscriber authenticates the IMS.

2 References The following documents contain provisions which, through reference in this text, constitute provisions of the present document.

• References are either specific (identified by date of publication, edition number, version number, etc.) or non-specific.

• For a specific reference, subsequent revisions do not apply.

• For a non-specific reference, the latest version applies.

2.1 Normative References [1] 3GPP TS 33.102, "3rd Generation Partnership Project; Technical Specification Group Services and

System Aspects; 3G Security; Security Architecture".

[2] IETF RFC 3261, "SIP: Session Initiation Protocol".

[3] 3GPP2 X.S0013-004, "All-IP Core Network Multimedia Domain: IP Multimedia Call Control Protocol Based on SIP and SDP Stage 3".

[4] IETF RFC 2406 (1998), "IP Encapsulating Security Payload (ESP)".

[5] IETF RFC 2401 (1998), "Security Architecture for the Internet Protocol".

[6] IETF RFC 2403 (1998), "The Use of HMAC-MD5-96 within ESP and AH".

[7] IETF RFC 2404 (1998), "The Use of HMAC-SHA-1-96 within ESP and AH".

[8] IETF RFC 3310 (2002), "HTTP Digest Authentication Using AKA".

[9] IETF RFC 2402 (1998), "IP Authentication Header".

[10] IETF RFC 2405 (1998), "The ESP DES-CBC Cipher Algorithm With Explicit IV".

[11] IETF RFC 2406 (1998), "IP Encapsulating Security Payload (ESP)".

[12] IETF RFC 3329 (2002), "Security Mechanism Agreement for the Session Initiation Protocol (SIP)".

[13] 3GPP2 X.S0011, " cdma2000 Wireless IP Network Standard".

[14] IETF RFC 2409 (1998), "Internet Key Exchange (IKE)".

Page 10: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

2

[15] IETF RFC 2451 (1998), "The ESP CBC-Mode Cipher Algorithms".

[16] IETF RFC 3602 (2003), "The AES-CBC Cipher Algorithm and Its Use with IPsec".

[17] IETF RFC 2407 (1998), "The Internet IP Security Domain of Interpretation for ISAKMP".

[18] IETF RFC 2408 (1998), "Internet Security Association and Key Management Protocol (ISAKMP)".

[19] IETF RFC 2246 (1999), "The TLS Protocol Version 1.0".

[20] IETF RFC 3268 (2002), "Advanced Encryption Standard (AES) Ciphersuites for Transport Layer Security (TLS)".

[21] 3GPP2 C.S0023, "Removable User Identity Module for Spread Spectrum Systems".

[22] 3GPP2 C.S0069, "ISIM Application on UICC for Spread Spectrum Systems".

[23] IETF RFC 2617 (1999), "HTTP Authentication: Basic and Digest Access Authentication".

2.2 Informative References [24] 3GPP2 X.S0013-002, "All-IP Core Network Multimedia Domain: IP Multimedia Subsystem – Stage

2".

[25] 3GPP2 S.R0037, "IP Network Architecture Model for cdma2000 Spread Spectrum Systems".

[26] IETF RFC 3041 (2001), "Privacy Extensions for Stateless Address Autoconfiguration in IPv6".

[27] IETF RFC 3263 (2002), "Session Initiation Protocol (SIP): Locating SIP Servers".

[28] IETF RFC 3323 (2002), "A Privacy Mechanism for the Session Initiation Protocol (SIP)".

[29] IETF RFC 3325 (2002), "Private Extensions to the Session Initiation Protocol (SIP) for Asserted Identity within Trusted Networks".

3 Definitions, symbols and abbreviations

3.1 Definitions For the purposes of the present document, the following terms and definitions apply.

Authenticated (re-) registration: A registration i.e. a SIP register is sent towards the Home Network which will trigger an authentication of the IMS subscriber i.e. a challenge is generated and sent to the UE.

Confidentiality: The property that information is not made available or disclosed to unauthorized individuals, entities or processes.

Data integrity: The property that data has not been altered in an unauthorized manner.

Page 11: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

3

Data origin authentication: The corroboration that the source of data received is as claimed.

Entity authentication: The provision of assurance of the claimed identity of an entity.

Key freshness: A key is fresh if it can be guaranteed to be new, as opposed to an old key being reused through actions of either an adversary or authorized party.

Security Domain: Networks that are managed by a single administrative authority. Within a security domain the same level of security and usage of security services will be typical.

3.2 Abbreviations For the purposes of the present document, the following abbreviations apply:

AAA Authentication Authorization Accounting AKA Authentication and key agreement CSCF Call Session Control Function HSS Collective Home Subscriber Server equivalent to AAA plus Databases IM IP Multimedia IMPI IM Private Identity IMPU IM Public Identity IMS IP Multimedia Core Network Subsystem LMSD Legacy MS Domain MAC Message Authentication Code MMD Multi-Media Domain MS Mobile Station PDS Packet Data Subsystem (cdma2000®1 PDSN-based) PDSN Packet Data Serving Node R-UIM Removable User Identity Module SA Security Association SEG Security Gateway SDP Session Description Protocol SIP Session Initiation Protocol SIP AS SIP Application Server UA User Agent UE User Equipment (equivalent to MS) .

4 Overview of the security architecture In the MMD, service is not provided until a security association is established between the mobile equipment and the network. IMS is essentially an overlay to the PDS and has a low dependency on the PDS. PDS can be deployed without the multimedia session capability. Consequently a separate security

1 cdma2000® is the trademark for the technical nomenclature for certain specifications and standards of the Organizational Partners (OPs) of 3GPP2. Geographically (and as of the date of publication), cdma2000® is a registered trademark of the Telecommunications Industry Association (TIA-USA) in the United States.

Page 12: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

4

association is required between the multimedia client and the IMS before access is granted to multimedia services. The IMS Security Framework is shown in Figure 1.

IMS authentication keys and functions at the user side may be stored in some secure memory location on an UE. It shall be possible for the IMS authentication keys and functions to be logically independent to the keys and functions used for PDS authentication. However, this does not preclude common authentication keys and functions from being used for IMS and PDS authentication according to the guidelines given in section 8.

The IMS Security Framework also addresses the security of interfaces between the IMS and external network domains, for example Multimedia IP-Networks as shown in Figure 1. This is important since the service capability subsystem of the MMD includes application servers that reside on untrusted third-party networks, and which can access network functionality.

UE

Secure Mem

UA

HSS

I - CSCF S- CSCF

P - CSCF

55

3 3 33

4/5 4/5 4/5

1 1

2 2

Transport

Home Network

Home/Serving N t k

IMS

MultimediaIP - Networks

Packet Data Subsystem cdma2000® Radio Access

AN

6

7

Figure 1: The IMS security architecture

There are seven different security associations and different needs for security protection for IMS (including SIP AS nodes) and they are numbered 1 through 7 in Figure 1.

1. Provides mutual authentication between the UE and the S-CSCF. The HSS collective (comprising of the AAA and the associated Databases, also referenced in this document as the “HSS”) delegates the performance of subscriber authentication to the S-CSCF. However the HSS is responsible for generating keys and challenges. The long-term key in the secure memory of the UE and the HSS is associated with the user private identity (IMPI). The UE will have one (network internal) user private identity (IMPI) and at least one external user public identity (IMPU).

Page 13: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

5

2. Provides a secure link and a security association between the UE and a P-CSCF for protection of the Gm reference point. Data origin authentication is provided i.e. the corroboration that the source of data received is as claimed. For the definition of the Gm reference point cf. [25].

3. Provides security within the network domain internally for the Cx-interface. This security association is covered in section 9. For the definition of the Cx-interface cf. [25].

4. Provides security between different networks for SIP capable nodes. This security association is covered in section 9. This security association is only applicable when the P-CSCF resides in the Visited Network (VN). If the P-CSCF resides in the Home Network (HN) then bullet point number five below applies.

5. Provides security within the network internally within the IMS subsystem between SIP capable nodes. This security association is covered in section 9. Note that this security association also applies when the P-CSCF resides in the HN.

6. Provides security between a SIP-capable node residing in an external IP network, and the HSS. This security association is covered in section 9. The SIP-capable node is a SIP Application Server and may also reside within the HN. However, SA6 is only applicable when the SIP AS resides in an external IP network. If the SIP AS resides in the Home Network, then bullet point three above applies.

7. Provides security between SIP-capable nodes located in different networks. It differs from security association 4 in that the SIP-capable node here is the SIP Application Server. Using SIP, this type of application server may communicate with network entities to offer service control and content, access functionality provided in the operator’s network, and manage bearers. This security association is covered in section 9. It is only applicable when the SIP AS resides in an external IP network. If the SIP AS resides in the Home Network, then bullet point five above applies.

There may exist other interfaces and reference points in IMS, which have not been addressed above. Those interfaces and reference points reside within the IMS, either within the same security domain or between different security domains. This document assumes that the IP MMD core network supports secure communications via standard IETF protocols [5]. Section 9 is intended to address security issues for all such interfaces.

Mutual authentication is required between the UE and the HN.

The mechanisms specified in this document are independent of the mechanisms defined for the Legacy MS Domain (LMSD) and Packet Data Subsystem (PDS).

An independent IMS security mechanism provides additional protection against security breaches. For example, if the PDS security is breached the IMS would continue to be protected by its own security mechanism. As indicated in Figure 1 the P-CSCF may be located either in the Visited or the Home Network.

The confidentiality and integrity protection for SIP-signaling is provided in a hop-by-hop fashion. The first hop i.e. between the UE and the P-CSCF is specified in the section 5 to 8 of this document. The other hops, inter-domain and intra-domain are specified in section 9.

Page 14: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

6

5 Security features

5.1 Secure access to IMS

5.1.1 Authentication of the subscriber and the network The user’s subscription is authenticated by the S-CSCF (home service provider). The security association between the UE and the first access point into the operator’s network (P-CSCF) is negotiated based on the protocol defined in RFC 3329 [12]. The options that may be negotiated using [12] are: tls, digest [23], ipsec-ike, ipsec-man, and ipsec-3gpp. When the negotiated protocol is not ipsec-3gpp, sections 5 through 8 do not apply. In this case a method other than AKA may be used to authenticate the UE, e.g. an appropriate method from the SIP RFC [2].

Authentication between the subscriber and the network shall be performed as specified in section 6.1.

An IM-subscriber will have its subscriber profile located in the HSS in the Home Network. The subscriber profile will contain information on the subscriber that may not be revealed to an external partner, cf. [24]. At registration an S-CSCF is assigned to the subscriber by the I-CSCF. The subscriber profile will be downloaded to the S-CSCF over the Cx-reference point from the HSS (Cx-Pull). When a subscriber requests access to the IP Multimedia Core Network Subsystem this S-CSCF will check, by matching the request with the subscriber profile, if the subscriber is allowed to continue with the request or not i.e. Home Control (Authorization of IM-services).

All SIP-signaling will take place over the MMD i.e. IP Multimedia Core Network Subsystem is essentially an overlay to the PDS. Hence the Visited Network will have control of all the subscribers in the PDS i.e. Visited Control (Authorization of bearer resources) since the Visited Network provides the subscriber with a transport service and its associated QoS.

For IM-services a new security association is required between the mobile and the IMS before access is granted to IM-services.

The mechanism for mutual authentication in cdma2000 is called AKA. It is a challenge response protocol and in cdma2000 the authentication center in the Home System derives the challenge. An Authentication Vector containing the challenge is sent from the Home Stratum to the Serving Network. The Authentication Vector contains the expected response XRES and also a message authentication code MAC. The Serving Network compares the response from the UE with the XRES and if they match the UE has been authenticated. The UE calculates an expected MAC, XMAC, and compares this with the received MAC and if they match the UE has authenticated the network.

The AKA-protocol is a secure protocol developed for UMTS and the same concept/principles may be reused for the IP Multimedia Core Network Subsystem, where it is called IMS AKA. One specific characteristic of the IMS AKA procedure is that the UE is authenticated for IMS services only by the Home Network, and not by the Serving Network.

NOTE 1: Although the method of calculating the parameters in cdma2000 AKA and IMS AKA are identical, the parameters are transported in slightly different ways. In cdma2000, the UE’s response RES is sent in the clear, while in IMS RES is not sent in the clear but combined with other parameters to form an authentication response and authentication response is sent to the network (as described in [8]).

The Home Network authenticates the subscriber at anytime via the registration or re-registration procedures.

Page 15: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

7

5.1.2 Re-Authentication of the subscriber Initial registration shall always be authenticated. It is the policy of the operator that decides when to trigger a re-authentication by the S-CSCF. Hence a re-registration might not need to be authenticated2.

A SIP REGISTER message, which has not been integrity protected at the first hop, shall be considered as initial registration.

The S-CSCF shall also be able to initiate an authenticated re-registration of a user at any time, independent of previous registrations.

5.1.3 Confidentiality protection Possibility for IMS specific confidentiality protection shall be provided to SIP signaling messages between the UE and the P-CSCF. Mobile Operators shall take care that the deployed confidentiality protection solution and roaming agreements fulfils the confidentiality requirements presented in the local privacy legislation. The following mechanism is provided at SIP layer:

The UE shall always offer encryption algorithms for P-CSCF to be used for the session, as specified in section 7.

The P-CSCF shall decide whether the IMS specific encryption mechanism is used. If used, the UE and the P-CSCF shall agree on security associations, which include the encryption key that shall be used for the confidentiality protection. The mechanism is based on IMS AKA and specified in section 6.1.

Confidentiality between CSCFs, and between CSCFs and the HSS shall rely on mechanisms specified in section 9 and [13].

5.1.4 Integrity protection Integrity protection shall be applied between the UE and the P-CSCF for protecting the SIP signaling, as specified in section 6.3 whenever an SA exists. The following mechanisms are provided.

1. The UE and the P-CSCF shall negotiate the integrity algorithm/mechanism to be used for a particular session, as specified in section 7 (based on [12]).

2. The UE and the P-CSCF shall agree on security associations, which include the integrity keys that shall be used for the integrity protection. The integrity key shall be the IK, delivered by the S-CSCF to the P-CSCF during the user’s IMS authentication process (component of the AKA Authentication Vector), as specified in section 6.1.

3. The UE and the P-CSCF shall both verify that the data received originates from a node, which has the agreed integrity key. This verification is also used to detect if the data has been tampered with.

4. Replay attacks and reflection attacks should be mitigated.

Integrity protection between CSCFs, and between CSCFs and the HSS shall rely on mechanisms specified by Network Domain Security in section 9.

NOTE 1: TLS is mandatorily supported by SIP proxies according to RFC 3261 [2]. Operators may use it to provide confidentiality and integrity inside their networks instead of or on top of IPSec. TLS may also be used between IMS networks on top of IPSec. It should be pointed out that the cdma2000 documents do not provide support for TLS certificate

2 Here, “authentication” refers to the AKA procedure. Integrity protection is always used for Registration messages when a security association exists.

Page 16: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

8

management nor do they ensure backward compatibility with CSCFs from earlier revisions nor interoperability with other networks which do not use TLS, in case TLS is used by Rev-A CSCFs. These management and compatibility issues need then to be solved by manual configuration of the involved operators.

5.2 Network topology hiding The operational details of an operator's network are sensitive business information that operators are reluctant to share with their competitors. While there may be situations (partnerships or other business relations) where the sharing of such information is appropriate, the possibility should exist for an operator to determine whether or not the topology of its network needs to be hidden.

It shall be possible to hide the network topology from other operators, which includes the hiding of the number of S-CSCFs, the capabilities of the S-CSCFs and the capability of the network.

To achieve network hiding, the I-CSCF shall have the capability to encrypt the address of an S-CSCF in SIP Via, Record-Route, Route and Path headers and then decrypt the address when handling the response to a request. The P-CSCF may receive routing information that is encrypted but the P-CSCF will not have the key to decrypt this information.

The mechanism shall support the scenario that different I-CSCFs in the Home Network may encrypt and decrypt the address of the S-CSCFs.

5.3 SIP Privacy handling in IMS Networks Privacy may in many instances be equivalent with confidentiality i.e., to hide the information (using encryption and encryption keys) from all entities except those who are authorized to understand the information. The SIP Privacy Extensions for IMS Networks do not provide such confidentiality. The purpose of the mechanism is rather to give an IMS subscriber the possibility to withhold certain identity information of the subscriber as specified in RFC 3323 [28] and RFC 3325 [29].

NOTE 1: It is useful that the privacy mechanism for IMS networks does not create states in the CSCFs other than the normal SIP states.

5.4 SIP Privacy handling when interworking with non-IMS Networks

When a Rev-A IMS is interworking with a non-IMS network, the CSCF in the IMS network shall decide the trust relation with the other end. The other end is trusted when the security mechanism for the interworking (cf. section 6.5) is applied as well as the availability of an inter-working agreement. If the interworking non-IMS network is not trusted, the privacy information shall be removed from the traffic towards this non-IMS network (i.e. the P-Asserted-Identity). When receiving SIP signaling, the CSCF shall also verify if any privacy information is already contained. If the interworking non-IMS network is not trusted, the information shall be removed by the CSCF, and retained otherwise.

Because absence of the security mechanism for the interworking (cf. section 6.5) indicates an untrusted non-IMS network, separate CSCFs are usually needed to interface with IMS and non-IMS networks. The CSCF interfacing with IMS networks implicitly trusts all IMS networks reachable according to section 9.1. The S-CSCF trust setting shall be a configurable option that an operator can set according to his network and interface configuration.

Page 17: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

9

6 Security Mechanisms The security mechanism agreement is based on [12]. [12] defines a negotiation mechanism between the UE and its first-hop SIP entry, the P-CSCF. It also provides protection against Man-in-the-Middle attack by allowing the peers to detect if the initial, unprotected offer has been tampered with. cdma2000 IMS shall support ipsec-3gpp as described below (conforming to recommendation [12] appendix A).

6.1 Authentication and key agreement The scheme used for authentication and key agreement in the IMS is called IMS AKA. The IMS AKA achieves mutual authentication between the UE and the Home Network (HN), cf. Figure 1. The identity used for authenticating a subscriber is the private identity, IMPI, which has the form of a NAI, cf. [24]. The HSS and the UE share a long-term key associated only with the IMPI, not with an IM public identity (IMPU).

The HN shall use the IMS AKA scheme for authenticating an IM subscriber. The security parameters e.g. keys generated by the IMS AKA scheme are transported by SIP.

The generation of the authentication vector AV that includes RAND, XRES, CK, IK and AUTN shall be done in the same way as specified in [1]. The UE and the HSS keep track of their respective IMS specific SQN counters. The requirements on the handling of the counters and mechanisms for sequence number management are specified in [1]. The AMF field can be used in the same way as in [1].

Furthermore two pairs of (unilateral) security associations (SAs) are established between the UE and the P-CSCF. The subscriber may have several IMPUs associated with one IMPI. These may belong to the same or different service profiles. Only two pairs of SAs shall be active between the UE and the P-CSCF. These two pairs of SAs shall be updated when a new successful authentication of the subscriber has occurred, cf. section 7.4.

It is the policy of the HN that decides if an authentication shall take place for the registration of different IMPUs e.g. belonging to same or different service profiles. Regarding the definition of service profiles cf. [24]. The registration process may be done without key distribution and exchange process. However, for certain implementations, it may also be acceptable to combine the registration and key distribution such that keying material would be made available during the combined registration and authentication process.

6.1.1 Authentication of an IM-subscriber Before a user can get access to the IM services at least one IMPU needs to be registered and the IMPI authenticated in the IMS at application level. In order to get registered the UE sends a SIP REGISTER message towards the SIP registrar server i.e. the S-CSCF, cf. Figure 1, which will perform the authentication of the user. The message flows are the same regardless of whether the user has an IMPU already registered or not.

Page 18: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

10

Figure 2: The IMS Authentication and Key Agreement for an unregistered IM subscriber and successful mutual authentication with no synchronization error

The detailed requirements and complete registration flows are defined in [3].

SMn stands for SIP Message n and CMm stands for Cx message m which has a relation to the authentication process:

SM1: REGISTER(IMPI, IMPU)

In SM2 and SM3 the P-CSCF and the I-CSCF respectively forwards the SIP REGISTER towards the S-CSCF.

After receiving SM3, if the IMPU is not currently registered at the S-CSCF, the S-CSCF needs to set the registration flag at the HSS to initial registration pending. This is done in order to handle mobile terminated calls while the initial registration is in progress and not successfully completed. The registration flag is stored in the HSS together with the S-CSCF name and user identity, and is used to indicate whether a particular IMPU of the user is unregistered or registered at a particular S-CSCF or if the initial registration at a particular S-CSCF is pending. The registration flag is set by the S-CSCF sending a Cx-Put to the HSS. If the IMPU is currently registered, the S-CSCF shall leave the registration flag set to registered. At this stage the HSS has performed a check that the IMPI and the IMPU belong to the same user.

Upon receiving the SIP REGISTER the S-CSCF shall use an Authentication Vector (AV) for authenticating and agreeing on a key with the user. If the S-CSCF has no valid AV then the S-CSCF shall send a request for AV(s) to the HSS in CM1 together with the number m of AVs wanted where m is at least one.

Page 19: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

11

CM1: Cx-AV-Req(IMPI, m)

Upon receipt of a request from the S-CSCF, the HSS sends an ordered array of n authentication vectors to the S-CSCF using CM2. The authentication vectors are ordered based on sequence number. Each authentication vector consists of the following components: a random number RAND, an expected response XRES, a cipher key CK, an integrity key IK and an authentication token AUTN. Each authentication vector is good for one authentication and key agreement between the S-CSCF and the IMS user.

CM2: Cx-AV-Req-Resp(IMPI, RAND1||AUTN1||XRES1||CK1||IK1,….,RANDn||AUTNn||XRESn||CKn||IKn)

When the S-CSCF needs to send an authentication challenge to the same user, it selects the next authentication vector from the ordered array, i.e. authentication vectors in a particular S-CSCF are used on a first-in / first-out basis.

The S-CSCF sends a SIP 4xx Auth_Challenge i.e. an authentication challenge towards the UE including the challenge RAND and the authentication token AUTN in SM4. It also includes the integrity key IK and the cipher key CK for the P-CSCF. RFC 3310 [8] specifies how to populate the parameters of an authentication challenge. The S-CSCF also stores the RAND sent to the UE for use in case of a synchronization failure.

The verification of the SQN by the UE will cause the UE to reject an attempt by the S-CSCF to re-use an AV. Therefore no AV shall be sent more than once.

NOTE 1: This does not preclude the use of the normal SIP transaction layer re-transmission procedures.

SM4: 4xx Auth_Challenge(IMPI, RAND, AUTN, IK, CK)

When the P-CSCF receives SM5 it shall store the key(s) and remove that information and forward the rest of the message to the UE i.e.

SM6: 4xx Auth_Challenge(IMPI, RAND, AUTN)

As part of the challenge (SM6) the UE receives AUTN, which includes a MAC and the SQN. The UE calculates the XMAC and checks that XMAC=MAC, and then checks if the SQN is in the correct range as in [1]. If both these checks are successful the UE uses RES and some other parameters to calculate an authentication response. The response is put into the Authorization header and sent back to the registrar in SM7. RFC 3310 [8] specifies how to populate the parameters of the response. It should be noted that the UE at this stage also computes the session keys CK and IK.

SM7: REGISTER(IMPI, Authentication response)

Page 20: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

12

The P-CSCF forwards the authentication response in SM8 to the I-CSCF, which queries the HSS to find the address of the S-CSCF. In SM9 the I-CSCF forwards the authentication response to the S-CSCF.

Upon receiving SM9 containing the response, the S-CSCF retrieves the active XRES for that user and uses this to check the authentication response sent by the UE as described in RFC 3310 [8]. If the check is successful then the user has been authenticated and the IMPU is registered in the S-CSCF. If the IMPU was not currently registered, the S-CSCF shall send a Cx-Put to update the registration-flag to registered. If the IMPU was currently registered the registration-flag is not altered.

It shall be possible to implicitly register IMPU(s), cf. section 4.3.3.4 in [24]. All the IMPU(s) being implicitly registered shall be delivered by the HSS to the S-CSCF and subsequently to the P-CSCF. The S-CSCF shall regard all implicitly registered IMPU(s) as registered IMPU(s).

When an IMPU has been registered this registration will be valid for some period of time. Both the UE and the S-CSCF will keep track of a timer for this purpose but the expiration time in the UE is smaller than the one in the S-CSCF in order to make it possible for the UE to be registered and reachable without interruptions. A successful registration of a previously registered IMPU (including implicitly registered IMPUs) means the expiry time of the registration is refreshed.

If the user has been successfully authenticated, the S-CSCF sends a SM10 SIP 2xx Auth_OK message to the I-CSCF indicating that the registration was successful. In SM11 and SM12 the I-CSCF and the P-CSCF respectively forward the SIP 2xx Auth_OK towards the UE.

It should be noted that the UE initiated re-registration opens up a potential denial-of-service attack. That is, an attacker could try to register an already registered IMPU and respond with an incorrect authentication response in order to make the HN de-register the IMPU. For this reason a subscriber should not be de-registered if it fails an authentication. It shall be defined by the policy of the operator when successfully registered IMPU(s) are to be de-registered.

The lengths of the Authentication Vector parameters are specified in section 6.3.7 in [1].

6.1.2 Authentication failures

6.1.2.1 User authentication failure

In this case the authentication of the user should fail at the S-CSCF because of an incorrect response (received in SM9). However, if the response is incorrect, then the IK used to protect SM7 will normally be incorrect as well, which will normally cause the integrity check at the P-CSCF to fail. In this case SM7 is discarded by the IPsec layer at the P-CSCF, therefore SM9 does not reach the S-CSCF. If the integrity check passes but the response is incorrect, the message flows are identical up to and including SM9 as a successful authentication. Once the S-CSCF detects the user authentication failure it should proceed in the same way as having received SM9 in a network authentication failure (see section 6.1.2.2).

Page 21: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

13

6.1.2.2 Network authentication failure

In this section the case when the authentication of the network is not successful is specified. When the check of the MAC in the UE fails the network cannot be authenticated and hence registration fails. The flow is identical as for the successful registration in 6.1.1 up to SM6, as shown in Figure 3.

Figure 3: The IMS Authentication and Key Agreement with network authentication error.

The UE shall send a Register message towards the HN including an indication of the cause of failure in SM7. The P-CSCF and the I-CSCF forward this message to the S-CSCF.

SM7: REGISTER(Failure = AuthenticationFailure, IMPI)

Upon receiving SM9, which includes the cause of authentication failure, the S-CSCF shall set the registration-flag in the HSS to unregistered, if the IMPU is not currently registered. To set the flag the S-CSCF sends in CM3 a Cx-Put to the HSS. If the IMPU is currently registered, the S-CSCF does not update the registration flag.

CM3: Cx- Put(IMPI, Clear S-CSCF name)

The HSS responds to CM3 with a Cx-Put-Resp in CM4.

In SM10 the S-CSCF sends a 4xx Auth_Failure towards the UE indicating that authentication has failed, no security parameters shall be included in this message.

Page 22: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

14

SM10: SIP/2.0 4xx Auth_Failure

6.1.2.3 Incomplete authentication

When the S-CSCF receives a new REGISTER request and challenges this request, it considers any previous authentication to have failed. It shall delete any information relating to the previous authentication, although the S-CSCF may send a response if the previous challenge is answered. A challenge to the new request proceeds as described in section 6.1.1.

If the S-CSCF does not receive a response to an authentication challenge within an acceptable time, it considers the authentication to have failed. If the IMPU was not already registered, the S-CSCF shall send a Cx-Put to the HSS to set the registration-flag for that IMPU to unregistered (see message CM3 in section 6.1.2.2). If the IMPU was already registered, the S-CSCF does not change the registration-flag.

6.1.3 Synchronization failure In this section the case of an authenticated registration with synchronization failure is described. After re-synchronization, authentication may be successfully completed, but it may also happen that in subsequent attempts other failure conditions (i.e. user authentication failure, network authentication failure) occur. In the message flow in Figure 4, only the case of synchronization failure with subsequent successful authentication is shown. The other cases can be derived by combination with the flows for the other failure conditions.

Figure 4: The IMS Authentication and Key Agreement with synchronization failure.

The flow equals the flow in 6.1.1 up to SM6. When the UE receives SM6 it detects that the SQN is out of range and sends a synchronization failure back to the S-CSCF in SM7. RFC 3310 [8] describes the fields to populate corresponding parameters of synchronization failure.

Page 23: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

15

SM7: REGISTER(Failure = Synchronization Failure, AUTS, IMPI)

Upon receiving the Synchronization Failure and the AUTS the S-CSCF sends an AV-Req to the HSS in CM3 including the RAND stored by the S-CSCF and the required number of AVs, m.

CM3: AV-Req(IMPI, RAND,AUTS, m)

The HSS checks the AUTS as in section 6.3.5 in [1]. After potentially updating the SQN, the HSS sends new AVs to the S-CSCF in CM4.

CM4: AV-Req-Resp(IMPI, n,RAND1||AUTN1||XRES1||CK1||IK1,….,RANDn||AUTNn||XRESn||CKn||IKn)

When the S-CSCF receives the new batch of authentication vectors from the HSS it deletes the old ones for that user in the S-CSCF. The rest of the messages i.e. SM10-SM18 including the Cx messages are exactly the same as SM4-SM12 and the corresponding Cx messages in 6.1.1.

6.1.4 Network Initiated authentications In order to authenticate an already registered user, the S-CSCF shall send a request to the UE to initiate a re-registration procedure. When received at the S-CSCF, the re-registration shall trigger a new IMS AKA procedure that will allow the S-CSCF to re-authenticate the user, as shown in Figure 5.

Figure 5: The IMS Authentication and Key Agreement with network initiated authentications.

The UE shall initiate the re-registration on the reception of the Authentication Required indication. In the event that the UE does not initiate the re-registration procedure after the request from the S-CSCF, the S-CSCF may decide to de-register the subscriber or re-issue an Authentication-Required.

Page 24: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

16

6.1.5 Integrity protection indicator In order to decide whether a REGISTER request from the UE needs to be authenticated, the S-CSCF needs to know about the integrity protection applied to the message. The P-CSCF attaches an indication to the REGISTER request to inform the S-CSCF that the message was integrity protected if:

- the P-CSCF receives a REGISTER containing an authentication response and the message is protected with an SA created during this authentication procedure; or

- the P-CSCF receives a REGISTER not containing an authentication response and the message is protected with an SA created by latest successful authentication (from the P-CSCF perspective).

For all other REGISTER requests the P-CSCF attaches an indication that the REGISTER request was not integrity protected or ensures that there is no indication about integrity protection in the message.

6.2 Confidentiality mechanisms If the local policy in P-CSCF requires the use of IMS specific confidentiality protection mechanism between UE and P-CSCF, IPsec ESP as specified in [4] shall provide confidentiality protection of SIP signaling between the UE and the P-CSCF, protecting all SIP signaling messages at the IP level. IPSec ESP general concepts on Security Policy management, Security Associations and IP traffic processing as described in reference [5] shall also be considered. ESP confidentiality shall be applied in transport mode between UE and P-CSCF.

The method to set up ESP security associations (SAs) during the SIP registration procedure is specified in section 7. As a result of an authenticated registration procedure, two pairs of unidirectional SAs between the UE and the P-CSCF all shared by TCP and UDP, shall be established in the P-CSCF and later in the UE. One SA pair is for traffic between a client port at the UE and a server port at the P-CSCF and the other SA is for traffic between a client port at the P-CSCF and a server port at the UE. For a detailed description of the establishment of these security associations see section 7.

The encryption key CKESP is the same for the two pairs of simultaneously established SAs. The encryption key CKESP is obtained from the key CKIM established as a result of the AKA procedure, specified in section 6.1, using a suitable key expansion function.

The encryption key expansion on the user side is done in the UE. The encryption key expansion on the network side is done in the P-CSCF. The key expansion function is described in Annex B.

6.3 Integrity mechanisms IPsec ESP as specified in reference [4] shall provide integrity protection of SIP signaling between the UE and the P-CSCF, protecting all SIP signaling messages at the IP level. IPSec ESP general concepts on Security Policy management, Security Associations and IP traffic processing as described in reference [5] shall also be considered. ESP integrity shall be applied in transport mode between UE and P-CSCF.

The method to set up ESP security associations (SAs) during the SIP registration procedure is specified in section 7. As a result of an authenticated registration procedure, two pairs of unidirectional SAs between the UE and the P-CSCF, all shared by TCP and UDP, shall be simultaneously established in the P-CSCF and later on in the UE. One SA pair is for traffic between a client port at the UE and a server port at the P-CSCF and the other SA pair is for traffic between a client port at the P-CSCF and a server port at the UE. For a detailed description of the establishment of these security associations see section 7.

Page 25: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

17

The integrity key IKESP is the same for the two simultaneously established SAs. The integrity key IKESP is obtained from the key IKIM established as a result of the AKA procedure, specified in section 6.1, using a suitable key expansion function. This key expansion function depends on the ESP integrity algorithm and is specified in Annex B of this document.

The integrity key expansion on the user side is done in the UE. The integrity key expansion on the network side is done in the P-CSCF.

The anti-replay service as described in [11] shall be enabled in the UE and the P-CSCF on all established SAs. Note that IPsec integrity protection is incompatible with use of Network Address Translation between IPv4 entities. No Network Address Translation is allowed between the UE and P-CSCF.

6.4 Hiding mechanisms The Hiding Mechanism is optional for implementation. All I-CSCFs in the HN shall share the same encryption and decryption key Kv. If the mechanism is used and the operator policy states that the topology shall be hidden the I-CSCF shall encrypt the hiding information elements when the I-CSCF forwards SIP Request or Response messages outside the hiding network’s domain. The hiding information elements are entries in SIP headers, such as Via, Record-Route, Route and Path, which contain addresses of SIP proxies in hiding network. When I-CSCF receives a SIP Request or Response message from outside the hiding network’s domain, the I-CSCF shall decrypt those information elements that were encrypted by I-CSCF in this hiding network domain.

The purpose of encryption in network hiding is to protect the identities of the SIP proxies and the topology of the hiding network. Therefore, an encryption algorithm in confidentiality mode shall be used. The network hiding mechanism will not address the issues of authentication and integrity protection of SIP headers. The AES in CBC mode with 128-bit block and 128-bit key shall be used as the encryption algorithm for network hiding. In the CBC mode under a given key, if a fixed IV is used to encrypt two same plaintexts, then the ciphertext blocks will also be equal. This is undesirable for network hiding. Therefore, random IV shall be used for each encryption. The same IV is required to decrypt the information. The IV shall be included in the same SIP header that includes the encrypted information.

6.5 CSCF interoperating with proxy located in a non-IMS network

SIP signaling protected by TLS specified in RFC 3261 [2] may be used for protecting the SIP interoperation between an IMS CSCF with a proxy/CSCF located in a foreign network. The CSCF may request the TLS connection with a foreign proxy by publishing sips: URI in DNS server, that can be resolved via NAPTR/SRV mechanism specified in RFC 3263 [27]. When sending/receiving the certificate during the TLS handshaking phase, the CSCF shall verify the name on the certificate against the list of the interworking partners.

The TLS session could be initiated from either network. A TLS connection is capable of carrying multiple SIP dialogs.

Applying this method is to prevent attacks on SIP level, but it does not prohibit other security methods to be applied so as to strengthen the security for IP based networks. This part is specified in section 9.1.

NOTE 1: The NOTE 1 in section 5.1.4 on the use of TLS also applies here.

Page 26: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

18

7 Security association set-up procedure The security association set-up procedure is necessary in order to decide what security services to apply and when the security services start. In the IMS authentication of users is performed during registration as specified in section 6.1. Subsequent signaling communications in this session will be integrity protected based on the keys derived during the authentication and key agreement process.

7.1 Security association parameters For protecting IMS signaling between the UE and the P-CSCF it is necessary to agree on shared keys that are provided by a set of parameters specific to a protection method. The security mode setup (cf. section 7.2) is used to negotiate the SA parameters required for IPsec ESP with authentication, and confidentiality, in accordance with the provisions in sections 5.1.3 and 6.2.

The SA parameters that shall be negotiated between UE and P-CSCF in the security mode set-up procedure are:

- Encryption algorithm

The encryption algorithm is either DES-EDE3-CBC as specified in RFC 2451 [15] or AES-CBC as specified in RFC 3602 [16] with 128 bit key.

Both encryption algorithms shall be supported by both the UE and the P-CSCF.

- Integrity algorithm

NOTE 1: What is called "authentication algorithm" in [4] is called "integrity algorithm" in this document to avoid confusion with the authentication algorithms used in the AKA protocol.

The integrity algorithm is either HMAC-MD5-96 [6] or HMAC-SHA-1-96 [7].

NOTE 2: This, in particular, excludes the use of the NULL integrity algorithm.

Both integrity algorithms shall be supported by both the UE and the P-CSCF as mandated by [4]. In the unlikely event that one of the integrity algorithms is compromised during the lifetime of this document, this algorithm shall no longer be supported.

NOTE 3: If only one of the two integrity algorithms is compromised then it suffices for the IMS to remain secure that the algorithm is no longer supported by any P-CSCF. The security mode set-up procedure (cf. section 7.2) will then ensure that the other integrity algorithm is selected.

- SPI (Security Parameter Index)

The SPI is allocated locally for inbound SAs. The triple (SPI, destination IP address, security protocol) uniquely identifies an SA at the IP layer. The UE shall select the SPIs uniquely, and different from any SPIs that might be used in any existing SAs (i.e. inbound and outbound SAs). The SPIs selected by the P-CSCF shall be different than the SPIs sent by the UE, cf. section 7.2. In an authenticated registration, the UE and the P-CSCF each select two SPIs, not yet associated with existing inbound SAs, for the new inbound security associations at the UE and the P-CSCF respectively.

Page 27: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

19

NOTE 4: This allocation of SPIs ensures that protected messages in the uplink always differ from protected messages in the downlink in, at least, the SPI field. This thwarts reflection attacks. When several applications use IPsec on the same physical interface the SIP application should be allocated a separate range of SPIs.

The following SA parameters are not negotiated:

- Life type: the life type is always seconds;

- SA duration: the SA duration has a fixed length of 232-1;

NOTE 5: The SA duration is a network layer concept. From a practical point of view, the value chosen for "SA duration" does not impose any limit on the lifetime of an SA at the network layer. The SA lifetime is controlled by the SIP application as specified in section 7.4.

- Mode: transport mode;

- Key length: the length of the integrity key IKESP depends on the integrity algorithm. It is 128 bits for HMAC-MD5-96 and 160 bits for HMAC-SHA-1-96.

- Key length: the length of the encryption key depends on the encryption algorithm. The entropy of the key shall at least be 128 bits.

Selectors:

The security associations (SA) have to be bound to specific parameters (selectors) of the SIP flows between UE and P-CSCF, i.e. source and destination IP addresses, transport protocol, and source and destination ports.

- IP addresses are bound to two pairs of SAs, as in section 6.3, as follows:

- inbound SA at the P-CSCF: The source and destination IP addresses associated with the SA are identical to those in the header of the IP packet in which the initial SIP REGISTER message was received by the P-CSCF.

- outbound SA at the P-CSCF: the source IP address bound to the outbound SA equals the destination IP address bound to the inbound SA; the destination IP address bound to the outbound SA equals the source IP address bound to the inbound SA.

NOTE 6: This implies that the source and destination IP addresses in the header of the IP packet in which the protected SIP REGISTER message was received by the P-CSCF need to be the same as those in the header of the IP packet in which the initial SIP REGISTER message was received by the P-CSCF.

- The transport protocol is either TCP or UDP.

- Ports:

1. The P-CSCF associates two ports, called port_ps and port_pc, with each pair of security associations established in an authenticated registration. The port port_ps and port_pc are different from the standard SIP ports 5060 and 5061. No unprotected messages shall be sent from or received on the ports port_ps and port_pc. From a security point of view, unprotected messages may be received on any port which is communicated to the UE during the security mode set-up procedure, cf. section 7.2. These ports are used with both UDP and TCP. The use of these ports may differ for TCP and UDP as follows:

Page 28: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

20

The following rules apply:

UDP case: the P-CSCF receives requests and responses protected with ESP from any UE on the port port_ps (the "protected server port"). The P-CSCF sends requests and responses protected with ESP to a UE on the port port_pc (the "protected client port").

TCP case: the P-CSCF, if it does not have a TCP connection towards the UE yet, shall set up a TCP connection from its port_pc to the port port_us of the UE before sending a request to it.

NOTE 7: Both the UE and the P-CSCF may set up a TCP connection from their client port to the other end’s server port on demand. An already existing TCP connection may be reused by both the P-CSCF or the UE; but it is not mandatory.

NOTE 8: The protected server port port_ps stays fixed for a UE until all IMPUs from this UE are de-registered. It may be fixed for a particular P-CSCF over all UEs, but there is no need to fix the same protected server port for different P-CSCFs.

NOTE 9: The distinction between the UDP and the TCP case reflects the different behavior of SIP over UDP and TCP, as specified in RFC 3261, section 18.

2. The UE associates two ports, called port_us and port_uc, with each pair of security associations established in an authenticated registration. The ports port_us and port_uc are different from the standard SIP ports 5060 and 5061. No unprotected messages shall be sent from or received on the ports port_us and port_uc. From a security point of view, unprotected messages may be received on any port which is different from the ports port_us and port_uc. The number of the ports port_us and port_uc are communicated to the P-CSCF during the security mode set-up procedure, cf. section 7.2. These ports are used with both UDP and TCP. The use of these ports may differ for TCP and UDP, as follows:

UDP case: the UE receives requests and responses protected with ESP on the port port_us (the "protected server port"). The UE sends requests and responses protected with ESP on the port port_uc (the "protected client port").

TCP case: the UE, if it does not have a TCP connection towards the P-CSCF yet, shall set up a TCP connection to the port port_ps of the P-CSCF before sending a request to it.

NOTE 10: Both the UE and the P-CSCF may set up a TCP connection from their client port to the other end’s server port on demand. An already existing TCP connection may be reused by both the P-CSCF or the UE; but it is not mandatory.

NOTE 11: The protected server port port_us stays fixed for a UE until all IMPUs from this UE are de-registered.

NOTE 12: The distinction between the UDP and the TCP case reflects the different behavior of SIP over UDP and TCP, as specified in RFC 3261, section 18.

3. The P-CSCF is allowed to receive only REGISTER messages and error messages on unprotected ports. All other messages not arriving on the protected port shall be either discarded or rejected by the P-CSCF.

4. The UE is allowed to receive only the following messages on an unprotected port:

- responses to unprotected REGISTER messages;

- error messages.

All other messages not arriving on a protected port shall be rejected or silently discarded by the UE.

Page 29: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

21

1. For each unidirectional SA which has been established and has not expired, the SIP application at the P-CSCF stores at least the following data: (UE_IP_address, UE_protected_port, P-CSCF_protected_port, SPI, IMPI, IMPU1, ... , IMPUn, lifetime) in an "SA_table". The pair (UE_protected port, P-CSCF_protected_port) equals either (port_uc, port_ps) or (port_us, port_pc).

NOTE 13: The SPI is only required when initiating and deleting SAs in the P-CSCF. The SPI is not exchanged between IPsec and the SIP layer for incoming or outgoing SIP messages.

2. The SIP application at the P-CSCF shall check upon receipt of a protected REGISTER message that the source IP address in the packet header coincides with the UE’s IP address given inserted in the contact Via header of the protected REGISTER message. If the contact Via header does not explicitly contain the UE’s IP address, but rather a symbolic name then the P-CSCF shall first resolve the symbolic name by suitable means to obtain an IP address.

3. The SIP application at the P-CSCF shall check upon receipt of an initial REGISTER message that the pair (UE_IP_address, UE_protected_client_port), where the UE_IP_address is the source IP address in the packet header and the protected client port is sent as part of the security mode set-up procedure (cf. section 7.2), has not yet been associated with entries in the "SA_table". Furthermore, the P-CSCF shall check that, for any one IMPI, no more than six SAs per direction are stored at any one time. If these checks are unsuccessful the registration is aborted and a suitable error message is sent to the UE.

NOTE 14: According to section 7.4 on SA handling, at most six SAs per direction may exist at a P-CSCF for one user at any one time.

4. For each incoming protected message the SIP application at the P-CSCF shall verify that the correct inbound SA according to section 7.4 on SA handling has been used. The SA is identified by the triple (UE_IP_address, UE_protected_port, P-CSCF_protected_port) in the "SA_table". The SIP application at the P-CSCF shall further check that the IMPU associated with the SA in the "SA_table" and the IMPU in the received SIP message coincide. If this is not the case the message shall be discarded.

5. For each unidirectional SA which has been established and has not expired, the SIP application at the UE stores at least the following data: (UE_protected_port, P-CSCF_protected_port, SPI, lifetime) in an "SA_table". The pair (UE_protected_port, P-CSCF_protected_port) equals either (port_uc, port_ps) or (port_us, port_pc).

NOTE 15: The SPI is only required to initiate and delete SAs in the UE. The SPI is not exchanged between IPsec and the SIP layer for incoming or outgoing SIP messages.

6. When establishing a new pair of SAs (cf. section 6.3) the SIP application at the UE shall ensure that the selected number for the protected ports do not correspond to an entry in the "SA_table".

NOTE 16: Regarding the selection of the number of the protected port at the UE it is generally recommended that the UE randomly selects the number of the protected port from a sufficiently large set of numbers not yet allocated at the UE. This is to thwart a limited form of a Denial of Service attack.

7. For each incoming protected message the SIP application at the UE shall verify that the correct inbound SA according to section 7.4 on SA handling has been used. The SA is identified by the pair (UE_protected_port, P-CSCF_protected_port) in the "SA table".

NOTE 17: If the integrity check of a received packet fails then IPsec will automatically discard the packet.

Page 30: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

22

7.2 Set-up of security associations (successful case) Authentication and key agreement procedures are described in section 6.1.

The set-up of security associations is based on [12]. Annex A of this document shows how to use [12] for the set-up of security associations.

In this section the normal case is specified i.e. when no failures occurs. Note that for simplicity some of the nodes and messages have been omitted. Hence there are gaps in the numbering of messages, as the I-CSCF is omitted.

Figure 6: Successful set-up of security associations.

The UE sends a Register message towards the S-CSCF to register the location of the UE and to set-up the security mode, cf. section 6.1. In order to start the security mode set-up procedure, the UE shall include a Security-setup line in this message.

The Security-setup line in SM1 contains the Security Parameter Index value and the protected ports selected by the UE. It also contains a list of identifiers for the integrity and encryption algorithms, which the UE supports.

SM1: REGISTER(Security-setup = SPI_U, Port_U, UE integrity and encryption algorithms list)

SPI_U is the symbolic name of a pair of SPI values (cf. section 7.1) (spi_uc, spi_us) that the UE selects. spi_uc is the SPI of the inbound SA at the UE’s protected client port, and spi_us is the SPI of the inbound SA at the UE’s protected server port. The syntax of the spi_uc and spi_us is defined in Annex A.

Port_U is the symbolic name of a pair of port numbers (port_uc, port_us) as defined in section 7.1. The syntax of port_uc and port_us is defined in Annex A.

Page 31: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

23

Upon receipt of SM1, the P-CSCF temporarily stores the parameters received in the Security-setup line together with the UE’s IP address from the source IP address of the IP packet header, the IMPI and IMPU. Upon receipt of SM4, the P-CSCF adds the keys IKIM and CKIM received from the S-CSCF to the temporarily stored parameters.

A P-CSCF which supports confidentiality protection shall propose SA alternatives for previous revision UE’s since the UE may or may not support confidentiality protection. The P-CSCF then selects the SPIs for the inbound SAs. The same SPI number shall be used for all revisions. The P-CSCF shall define the SPIs such that they are unique and different from any SPIs as received in the Security-setup line from the UE.

NOTE 1: This rule (unique SPIs) is needed since the UE and the P-CSCF use the same key for inbound and outbound traffic.

In order to determine the integrity and encryption algorithm the P-CSCF proceeds as follows: the P-CSCF has a list of integrity and encryption algorithms it supports, ordered by priority. Later revision algorithms must have higher priority than earlier revision algorithms. The P-CSCF selects the first integrity algorithm on its own list which is also supported by the UE.

The P-CSCF then establishes two new pairs of SAs in the local security association database.

The Security-setup line in SM6 contains the SPIs and the ports assigned by the P-CSCF. It also contains a list of identifiers for the integrity and encryption algorithms, which the P-CSCF supports.

NOTE 2: P-CSCF may be configured to trust on the encryption provided by the underlying access network. In this case, the P-CSCF acts according to earlier revision documents, and does not include encryption algorithms to the Security-setup line in SM6.

SM6: 4xx Auth_Challenge(Security-setup = SPI_P, Port_P, P-CSCF integrity and encryption algorithms list)

SPI_P is the symbolic name of the pair of SPI values (cf. section 7.1) (spi_pc, spi_ps) that the P-CSCF selects. spi_pc is the SPI of the inbound SA at the P-CSCF’s protected client port, and spi_ps is the SPI of the inbound SA at the P-CSCF’s protected server port. The syntax of the spi_pc and spi_ps is defined in Annex A.

Port_P is the symbolic name of the port numbers (port_pc, port_ps) as defined in section 7.1 The syntax of Port_P is defined in Annex A.

Upon receipt of SM6, the UE determines the integrity and encryption algorithm as follows: the UE selects the first integrity and encryption algorithm combination on the list received from the P-CSCF in SM 6 which is also supported by the UE.

NOTE 3: UE from earlier revisions will not support any encryption algorithms, and will choose the first earlier revision integrity algorithm on the list received from the P-CSCF in SM6.

The UE then proceeds to establish two new pairs of SAs in the local SAD.

The UE shall integrity and confidentiality protect SM7 and all following SIP messages. Furthermore the integrity and encryption algorithms list, SPI_P, and Port_P received in SM6, and SPI_U, Port_U sent in SM1 shall be included:

SM7: REGISTER(Security-setup = SPI_U, Port_U, SPI_P, Port_P, P-CSCF integrity and encryption algorithms list)

Page 32: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

24

After receiving SM7 from the UE, the P-CSCF shall check whether the integrity algorithms list, SPI_P, and Port_P received in SM7 is identical with the corresponding parameters sent in SM6. It further checks whether SPI_U and Port_U received in SM7 are identical with those received in SM1. If these checks are not successful the registration procedure is aborted. The P-CSCF shall include in SM8 information to the S-CSCF that the received message from the UE was integrity protected as indicated in section 6.1.5. The P-CSCF shall add this information to all subsequent REGISTER messages received from the UE that have successfully passed the integrity and confidentiality check in the P-CSCF.

SM8: REGISTER(Integrity-Protection = Successful, Confidentiality-Protection = Successful, IMPI) The P-CSCF finally sends SM12 to the UE. SM12 does not contain information specific to security mode setup (i.e. a Security-setup line), but with sending SM12 not indicating an error the P-CSCF confirms that security mode setup has been successful. After receiving SM12 not indicating an error, the UE can assume the successful completion of the security-mode setup.

An example of how to make use of the two pairs of unidirectional SAs is illustrated in the figure below with a set of example message exchanges protected by the respective IPsec SAs where the INVITE and following messages are assumed to be carried over TCP.

Register (SM1)

P-CSCFUE

401 Unauthorised (SM6)RAND||AUTN

Register (SM7)RES

OK (SM12)port_uc

port_us

port_ps

port_pc

Invite

UnprotectedProtected by SA pair 1Protected by SA pair 2

180 Ringing 200 OK

Figure 7

7.3 Error cases in the set-up of security associations

7.3.1 Error cases related to IMS AKA Errors related to IMS AKA failures are specified in section 6.1. However, this section additionally describes how these shall be treated, related to security setup.

7.3.1.1 User authentication failure

In this case, SM7 fails integrity check by IPsec at the P-CSCF if the IKIM derived from RAND at UE is wrong. The SIP application at the P-CSCF never receives SM7. It shall delete the temporarily stored SA parameters associated with this registration after a time-out.

Page 33: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

25

In case IKIM was derived correctly, but the response was wrong the authentication of the user fails at the S-CSCF due to an incorrect response. The S-CSCF shall send a 4xx Auth_Failure message to the UE, via the P-CSCF, which may pass through an already established SA. Afterwards, both, the UE and the P-CSCF shall delete the new SAs.

7.3.1.2 Network authentication failure

If the UE is not able to successfully authenticate the network, the UE shall send a REGISTER message which may pass through an already established SA, indicating a network authentication failure, to the P-CSCF. The P-CSCF deletes the new SAs after receiving this message.

7.3.1.3 Synchronisation failure

In this situation, the UE observes that the AUTN sent by the network in SM6 contains an out-of-range sequence number. The UE shall send a REGISTER message to the P-CSCF, which may pass through an already established SA, indicating the synchronization failure. The P-CSCF deletes the new SAs after receiving this message.

7.3.1.4 Incomplete authentication

If the UE responds to an authentication challenge from a S-CSCF, but does not receive a reply before the request times out, the UE shall start a registration procedure if it still requires any IM services. The first message in this registration should be protected with an SA created by a previous successful authentication if one exists.

When the P-CSCF receives a challenge from the S-CSCF and creates the corresponding SAs during a registration procedure, it shall delete any information relating to any previous registration procedure (including the SAs created during the previous registration procedure).

If the P-CSCF deletes a registration SA due to its lifetime being exceeded, the P-CSCF should delete any information relating to the registration procedure that created the SA.

7.3.2 Error cases related to the Security-setup

7.3.2.1 Proposal unacceptable to P-CSCF

In this case the P-CSCF cannot accept the proposal set sent by the UE in the Security-setup command of SM1. The P-CSCF shall respond to SM1 indicating a failure, by sending an error response to the UE.

7.3.2.2 Proposal unacceptable to UE

If the P-CSCF sends in the Security-setup line of SM6 a proposal that is not acceptable for the UE, the UE shall abandon the registration procedure.

7.3.2.3 Failed consistency check of Security-setup lines at the P-CSCF

The P-CSCF shall check whether authentication and encryption algorithms list received in SM7 is identical with the authentication and encryption algorithms list sent in SM6. If this is not the case the registration procedure is aborted. (Cf. section 7.2).

Page 34: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

26

7.4 Authenticated re-registration Every registration that includes a user authentication attempt produces new security associations. If the authentication is successful, then these new security associations shall replace the previous ones. This section describes how the UE and P-CSCF handle this replacement and which SAs to apply to which message.

When security associations are changed in an authenticated re-registration then the protected server ports at the UE (port_us) and the P-CSCF (port_ps) shall remain unchanged, while the protected client ports at the UE (port_uc) and the P-CSCF (port_pc) shall change. For the definition of these ports see section 7.1.

If the UE has an already active security association, then it shall use this to protect the REGISTER message. If the S-CSCF is notified by the P-CSCF that the REGISTER message from the UE was integrity-protected it may decide not to authenticate the user by means of the AKA protocol. However, the UE may send unprotected REGISTER messages at any time. In this case, the S-CSCF shall authenticate the user by means of the AKA protocol. In particular, if the UE considers the SAs no longer active at the P-CSCF, e.g., after receiving no response to several protected messages, then the UE shall send an unprotected REGISTER message.

Security associations may be unidirectional or bi-directional. This section assumes that security associations are unidirectional, as this is the general case. For IP layer SAs, the lifetime mentioned in the following sections is the lifetime held at the application layer. Furthermore deleting an SA means deleting the SA from both the application and IPsec layer. The message numbers, e.g. SM1, used in the following sections relate to the message flow given in section 6.1.1.

7.4.1 Void

7.4.1a Management of security associations in the UE The UE shall be involved in only one registration procedure at a time, i.e. the UE shall remove any data relating to any previous incomplete registrations or authentications, including any SAs created by an incomplete authentication.

The UE may start a registration procedure with two existing pairs of SAs. These will be referred to as the old SAs. The authentication produces two pairs of new SAs. These new SAs shall not be used to protect non-authentication traffic until noted during the authentication flow. In the same way, certain messages in the authentication shall be protected with a particular SA. If the UE receives a message protected with the incorrect SA, it shall discard the message.

A successful authentication proceeds in the following steps:

- The UE sends the SM1 message to register with the IMS. If SM1 was protected, it shall be protected with the old outbound SA.

- The UE receives an authentication challenge in a message (SM6) from the P-CSCF. This message shall be protected with the old inbound SA if SM1 was protected and unprotected otherwise.

- If this message SM6 can be successfully processed by the UE, the UE creates the new SAs, which are derived according to section 7.1. The lifetime of the new SAs shall be set to allow enough time to complete the registration procedure. The UE then sends its response (SM7) to the P-CSCF, which shall be protected with the new outbound SA. Meanwhile, if SM1 was protected, the UE shall use the old SAs for messages other than those in the authentication, until a successful message of new authentication is received (SM12).

Page 35: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

27

- The UE receives an authentication successful message (SM12) from the P-CSCF. It shall be protected with the new inbound SA.

- After the successful processing of this message by the UE, the registration is complete. The UE sets the lifetime of the new SAs such that it either equals the latest lifetime of the old SAs or it will expire shortly after the registration timer in the message, depending which gives the SAs the longer life. For further SIP messages sent from UE, the new outbound SAs are used, with the following exception: when a SIP message is part of a pending SIP transaction it may still be sent over the old SA. A SIP transaction is called pending if it was started using an old SA. When a further SIP message protected with a new inbound SA is successfully received from the P-CSCF, then the old SAs shall be deleted as soon as either all pending SIP transactions have been completed, or have timed out. The old SAs shall be always deleted when the lifetime is expired. This completes the SA handling procedure for the UE.

A failure in the authentication can occur for several reasons. If the SM1 was not protected, then no protection shall be applied to the failure messages, except the user authentication failure message which shall be protected with the new SA. If SM1 was protected, the old SAs shall be used to protect the failure message, the UE shall delete the new SAs.

The UE shall monitor the expiry time of registration without an authentication and if necessary increase the lifetime of the SAs created by the last successful authentication such that it will expire shortly after the registration timer in the message.

NOTE 1: In particular this means that the lifetime of a SA is never decreased.

The UE shall delete any SA whose lifetime is exceeded. The UE shall delete all SAs it holds once all the IMPUs are deregistered.

7.4.2 Void

7.4.2a Management of security associations in the P-CSCF When the S-CSCF initiates an authentication by sending a challenge to the UE, the P-CSCF may already contain existing SAs from previously completed authentications. It may also contain two existing pairs of SAs from an incomplete authentication. These will be referred to as the old and registration SAs respectively. The authentication produces two pairs of new SAs. These new SAs shall not be used to protect non-authentication traffic until noted during the authentication flow. Similarly certain messages in the authentication shall be protected with a particular SA. If the P-CSCF receives a message protected with the incorrect SA, it shall discard the message.

The P-CSCF associates the IMPI given in the registration procedure and all the successfully registered IMPUs related to that IMPI to an SA.

A successful authentication proceeds in the following steps:

- The P-CSCF receives the SM1 message. If SM1 is protected, it shall be protected with the old inbound SA.

- The P-CSCF forwards the message containing the challenge (SM6) to the UE. This shall be protected with the old outbound SA, if SM1 was protected and unprotected otherwise.

- The P-CSCF then creates the new SAs, which are derived according to section 7.1. The expiry time of the new SAs shall be set to allow enough time to complete the registration procedure. The registration SAs shall be deleted if they exist.

Page 36: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

28

- The P-CSCF receives the message carrying the response (SM7) from the UE. It shall be protected using the new inbound SA. If SM1 was protected, the old SAs can now be used to protect messages other than those in the authentication.

- The P-CSCF forwards the successful registration message (SM12) to the UE. It shall be protected using the new outbound SA. This completes the registration procedure for the P-CSCF. The P-CSCF sets the expiry time of the new SAs such that they either equals the latest lifetime of the old SAs or it will expire shortly after the registration timer in the message, depending which gives the SAs the longer life.

- After SM12 is sent, the P-CSCF handles the UE related SAs according to the following rules:

- If there are old SAs, but SM1 belonging to the same registration procedure was received unprotected, the P-CSCF considers error cases happened, and assumes UE does not have those old SAs for use. In this case, the P-CSCF shall remove the old SAs.

- If SM1 belonging to the same registration procedure was protected with an old valid SA, the P-CSCF keeps this inbound SA and the corresponding three SAs created during the same registration with the UE active, and continues to use them. Any other old SAs are deleted. When the old SAs have only a short time left before expiring or a further SIP message protected with a new inbound SA is successfully received from the UE, the P-CSCF starts to use the new SAs for outbound messages with the following exception: when a SIP message is part of a pending SIP transaction it may still be sent over the old SA. A SIP transaction is called pending if it was started using an old SA. The old SAs are then deleted as soon as all pending SIP transactions have been completed, or have timed out. The old SAs are always deleted when the old SAs lifetime are expired. When the old SAs expire without a further SIP message protected by the new SAs, the new SAs are taken into use for outbound messages. This completes the SA handling procedure for the P-CSCF.

A failure in the authentication can occur for several reasons. If the SM1 was not protected, then no protection shall be applied to the failure messages, except the user authentication failure message which shall be protected with the new SAs. If SM1 was protected, the old SAs shall be used to protect the failure messages. In both cases, after processing the failure message, the P-CSCF shall delete the new SAs.

The P-CSCF shall monitor the expiry time of registration without an authentication and if necessary increase the lifetime of SAs created by the last successful authentication such that it will expire shortly after the registration timer in the message.

NOTE 1: In particular this means that the lifetime of a SA is never decreased.

The P-CSCF shall delete any SA whose lifetime is exceeded. The P-CSCF shall delete all SAs it holds that are associated with a particular IMPI once all the associated IMPUs are de-registered.

7.5 Rules for security association handling when the UE changes IP address

When a UE changes its IP address, e.g. by using the method described in RFC 3041 [26], then the UE shall delete the existing SA's and initiate an unprotected registration procedure using the new IP address as the source IP address in the packets carrying the REGISTER messages.

Page 37: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

29

8 Secure Memory within UE For the purposes of this document the secure memory include the collection of IMS security data and functions on a UE.

8.1 Requirements on the Secure Memory of an IMS Capable UE

This section identifies requirements on the secure memory to support IMS access security. It does not identify any data or functions that may be required on the secure memory for non-security purposes.

The secure memory shall include:

- The IMPI;

- At least one IMPU;

- Home Network Domain Name;

- Support for sequence number checking in the context of the IMS Domain;

- The same enhanced AKA algorithms as specified in cdma2000 apply for the secure memory;

- An authentication Key.

The secure memory shall deliver the CK to the UE although it is not required that SIP signaling is confidentiality protected.

At UE power off the existing SAs (session keys and related information) shall be deleted.

The IMS security data and functions described in the present section may be provided by an UIM, R-UIM [21] or an ISIM [22].

Page 38: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

30

9 Network Domain Security This section describes security mechanisms for all communication except interfaces 1 and 2 of Figure 1, including the Home Network, Serving Network, and any 3rd party network nodes (such as SIP Application Servers). This section is applicable independent of negotiation of the SIP security mechanism.

9.1 Inter-domain Security Referring to Figure 1, interfaces 4 and 7 provides transport security between different networks for SIP capable nodes. Interface 6 in Figure 1 provides security for communications between a SIP Application Server, residing in an external network, and the HSS. There may be other interfaces to nodes outside the Home Network, which are also intended to be covered by this section. The involved nodes shall be capable of IPsec [5]. Privacy protection shall be applied with cryptographic strength greater than DES. Integrity protection shall be applied. IPsec may be used in either transport mode or tunnel mode; when used in tunnel mode, one or both of the network security domains may use Security Gateways. Security associations between nodes in different networks shall be negotiated using IPsec/IKE [14].

It is necessary that nodes outside the home network should be secure and trustworthy, perhaps using mechanisms such as firewalls, packet filters, and so on. However such details are outside the scope of this document.

9.2 Intra-domain Security The interface labeled 5 in Figure 1 is between SIP-capable nodes in the same network security domain. The interface labeled 3 in Figure 1 is between the I-CSCF/S-CSCF and the HSS. There may be other interfaces to nodes inside the Home Network, which are also intended to be covered by this section. As these interfaces exist entirely within one network security domain, the administrative authority may choose any mechanism to secure this interface, including physical security where appropriate. Cryptographic methods of security, if applied, shall include both privacy and integrity protection, and be at least as strong as IPsec [5] using triple-DES and HMAC-MD5.

9.3 Profiles of Network Domain Security Methods The profiles specified in this section apply to both sections 9.1 and 9.2.

9.3.1 Support of IPSec ESP For the interfaces security protection between IMS network elements, this section specifies the protection using IPsec as specified in RFC 2401 [5] with 3DES and AES (key length shall be 128 bits) for encryption and HMAC-SHA-1 for integrity protection. The key management and distribution architecture is based on the IPsec IKE (RFC 2401 [5], RFC 2407 [17], RFC 2408 [18] and RFC 2409 [14]) protocols.

The security services provided by network domain security:

- data integrity;

- data origin authentication;

- anti-replay protection;

Page 39: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

31

- confidentiality (optional);

- limited protection against traffic flow analysis when confidentiality is applied.

The IPsec security protocol shall always be ESP. Integrity protection/message authentication together with anti-replay protection shall always be used. IPSec ESP should be used with both encryption and integrity protection for all SIP signaling traversing inter-security domain boundaries.

IPsec offers a set of security services, which is determined by the negotiated IPsec security associations. That is, the IPsec SA defines which security protocol to be used, the mode, and the endpoints of the SA.

9.3.1.1 Support of ESP authentication and encryption

For IMS signaling traffic, ESP shall always be used to provide data integrity, data origin authentication, and anti-replay protection services, thus the ESP_NULL authentication algorithm shall not be allowed for use. It shall support ESP_HMAC_SHA-1 algorithm.

The ESP_DES algorithm shall not be used due to its weakness and instead it shall be mandatory to support the ESP_3DES algorithm as default. Support for the AES-CBC cipher algorithm (RFC 3602 [16]) is mandatory. The AES-CBC key length shall be 128 bits.

9.3.2 Support of TLS This section specifies the use of TLS, for transport protection between IMS network elements. Where TLS is used for transport protection, implementations shall support TLS 1.0, as specified in RFC 2246 [19]. Implementations may support (and attempt to negotiate the use of) succeeding versions of TLS. Implementations shall support mutual, certificate-based authentication, and may support (and attempt to negotiate the use of) other authentication methods such as pre-shared secret keys (PSK). The security services provided by network domain security:

- data integrity;

- data origin authentication;

- anti-replay protection;

TLS provides transport-layer security over connection-oriented protocols (for the purposes of this document, TCP); "tls" (signifying TLS over TCP) can be specified as the desired transport protocol within a “Via” header field value or a SIP-URI. TLS is most suited to architectures in which hop-by-hop security is required between hosts with no pre-existing trust association.

Implementations should support the AES cipher suites as specified in RFC 3268 [20], and shall at minimum support TLS_RSA_WITH_AES_128_CBC_SHA. Implementations shall firstly prefer AES cipher suites, and secondly prefer ephemeral Diffie-Hellman cipher suites during TLS negotiation. Mutual authentication shall be required for all TLS connections; in other words anonymous cipher suites shall not be accepted during negotiation.

Page 40: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

32

Annex A (Normative): The use of Security Mechanism Agreement for SIP Sessions (ref. [12]) for security mode set-up The BNF syntax of [12] is defined for negotiating security associations for manually keyed IPsec in the following way:

security-client = "Security-Client" HCOLON sec-mechanism *(COMMA sec-mechanism)

security-server = "Security-Server" HCOLON sec-mechanism *(COMMA sec-mechanism)

security-verify = "Security-Verify" HCOLON sec-mechanism *(COMMA sec-mechanism)

sec-mechanism = mechanism-name *(SEMI mech-parameters)

mechanism-name = "ipsec-3gpp"

mech-parameters = ( preference / algorithm / protocol / mode / encrypt-algorithm / spi-c / spi-s / port-c / port-s / transport )

preference = "q" EQUAL qvalue

qvalue = ( "0" [ "." 0*3DIGIT ] ) / ( "1" [ "." 0*3("0") ] )

algorithm = "alg" EQUAL ( "hmac-md5-96" / "hmac-sha-1-96 " )

protocol = "prot" EQUAL ( "ah" / "esp" )

mode = "mod" EQUAL ( "trans" / "tun" )

encrypt-algorithm = "ealg" EQUAL ("aes-cbc" / "des-ede3-cbc" / "null" )

spi-c = "spi" EQUAL spivalue

spi-s = "spi" EQUAL spivalue

spivalue = 10DIGIT; 0 to 4294967295

port-c = "port-c" EQUAL port

port-s = "port-s" EQUAL port

port = 1*DIGIT

The parameters described by the BNF above have the following semantics:

Mechanism-name: For manually keyed IPsec, this field includes the value "ipsec-3gpp". "ipsec-3gpp" mechanism extends the general negotiation procedure of [12] in the following way:

Page 41: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

33

1. The server shall store the Security-Client header received in the request before sending the response with the Security-Server header.

2. The client shall include the Security-Client header in the first protected request. In other words, the first protected request shall include both Security-Verify and Security-Client header fields.

3. The server shall check that the content of Security-Client headers received in previous steps (1 and 2) are the same.

Preference: As defined in [12].

Algorithm: Defines the authentication algorithm. May have a value "hmac-md5-96" for algorithm defined in [6], "hmac-sha-1-96" for algorithm defined in [7]. The algorithm parameter is mandatory.

Protocol: Defines the IPsec protocol. May have a value "ah" for [9] and "esp" for [4]. If no Protocol parameter is present, the value will be "esp".

NOTE 1: According to section 6 only "esp" is allowed for use in IMS.

Mode: Defines the mode in which the IPsec protocol is used. May have a value "trans" for transport mode, and value "tun" for tunneling mode. If no Mode parameter is present, the value will be "trans".

NOTE 2: According to section 6.3 ESP integrity shall be applied in transport mode i.e. only "trans" is allowed for use in IMS.

Encrypt-algorithm: If present, defines the encryption algorithm. May have a value "des-ede3-cbc" for algorithm defined in [10] or "aes-cbc" for the algorithm defined in IETF RFC 3602 [16] or "null" if encryption is not used. If no Encrypt-algorithm parameter is present, the algorithm will be "null".

Spi-c: Defines the SPI number of the inbound SA at the protected client port.

Spi-s: Defines the SPI number of the inbound SA at the protected server port.

Port-c: Defines the protected client port.

Port-s: Defines the protected server port.

It is assumed that the underlying IPsec implementation supports selectors that allow all transport protocols supported by SIP to be protected with a single SA.

Page 42: IMS Security Framework - 3GPP2

S.S0086-B v2.0

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

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

34

Annex B (Normative): Key expansion functions for IPsec ESP Integrity Keys:

If the selected authentication algorithm is HMAC-MD5-96 then IKESP = IKIM.

If the selected authentication algorithm is HMAC-SHA-1-96 then IKESP is obtained from IKIM by appending 32 zero bits to the end of IKIM to create a 160-bit string.

Encryption Keys:

Divide CKIM into two blocks of 64 bits each :

CKIM = CKIM1 || CKIM2

Where CKIM1 are the 64 most significant bits and CKIM2 are the 64 least significant bits.

The key for DES-EDE3-CBC is then defined to be

CKESP = CKIM1 || CKIM2 || CKIM1,

after adjusting parity bits to comply with [10].

If selected encryption algorithm is AES-CBC as specified in RFC 3602 [16] with 128 bit key then CKESP = CKIM.

Page 43: IMS Security Framework - 3GPP2

S.S0086-B v2.0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

35

22

23

24

25

26

Annex C (Informative): Recommendations to protect the IMS from UEs bypassing the P-CSCF After the UE does a successful SIP REGISTER with the P-CSCF, malicious UE could try to send SIP messages directly to the S-CSCF. This could imply that the UE would be able to bypass the integrity protection provided by IPSec ESP between the UE and the P-CSCF.

NOTE 1: [3] defines a trust domain that consists of the P-CSCF, the I-CSCF, the S-CSCF, the BGCF, the MGCF, the MRFC and all the AS’s that are not provided by 3rd party service providers. There are nodes in the edge of the trust domain that are allowed to provide with an asserted identity header. The nodes in the trust domain will trust SIP messages with asserted identity header. The asserted identity information is useful as long as the interfaces in an operator’s network can be trusted.

If a UE manages to bypass the P-CSCF it presents at least the following problems:

1) The P-CSCF is not able to generate any charging information.

2) Malicious UE could masquerade as some other user (e.g. it could potentially send INVITE or BYE messages).

The following recommendations for preventing attacks based on such misbehavior are given:

• Access to S-CSCF entities should be restricted to the core network entities that are required for IMS operation only. It shall be ensured that no UE is able to directly send IP packets to IMS-entities other than the required ones, i.e. Assigned P-CSCF, or HTTP servers.

• Impersonation of IMS core network entities at IP level (IP spoofing), especially impersonation of P-CSCFs by UEs should be prevented.

• It is desirable to have a general protection mechanism against UEs spoofing (source) IP addresses in any access network providing access to IMS services.

If the traffic is between two non-IMS CSCFs, it is recommended to use TLS mechanisms as specified in RFC 3261 [2]. This will mitigate the problems caused by mis-behave of the UE. If neither intra-CSCF traffic nor CSCF-SEG traffic can be trusted and if this traffic is not protected by mechanisms specified in section 9 and [13], then physical protection measures or IP traffic filtering should be applied. This is anyhow not in the scope of cdma2000 documents.