ice/session continuity; lawful interception functionality; subscription management; and SMS management. To provide these functions, the UDM uses subscription data (including authentication data) that may be stored in the UDR, in that case the UDM implements the application logic and does not require an internal user data storage, thus Authentication and key agreement is a mechanism which performs authentication and session key distribution in UMTS networks. Authentication and key agreement is a challenge-response-based mechanism that uses symmetric cryptography. Authentication and key agreement is typically run on a UMTS IP multimedia ser- vices identity module, which resides on a smart card device that also provides tamper-resistant storage of shared secrets. Authentication and key agreement is defined in IETF RFC 3310. 5G Network Architecture 145 different UDMs may serve the same user in different transactions. The UDM is located in the home PLMN of the subscribers which it serves and accesses the information of the UDR located in the same PLMN. UDR supports storage and retrieval of subscription data by the UDM; storage and retrieval of policy data by the PCF; storage and retrieval of structured data for exposure; and application data by the NEF, including packet flow descriptions for application detection, and application request information for multiple UEs. During the deploy- ments, the operators can opt to co-locate UDR with UDSF. Non-3GPP interworking function (N3IWF) supports untrusted non-3GPP access to 5GC. It further supports IPsec tunnel establishment with the UE; terminates the IKEv260 or IPsec 67 protocols with the UE over NWu and relays over N2 the informa- tion needed to authenticate the UE and authorize its access to the 5G core network as well as termination of N2 and N3 interfaces to 5G core network for control plane and user plane, respectively; relaying uplink and downlink control-plane NAS (N1) signal- ing between the UE and AMF; handling of N2 signaling from SMF related to PDU ses- sions an