Electronic apparatus verifying integrity of sip(session initiation protocol) message and operating method thereof

WO2026168739A1PCT designated stage Publication Date: 2026-08-13SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-08-13

Smart Images

  • Figure KR2025022323_13082026_PF_FP_ABST
    Figure KR2025022323_13082026_PF_FP_ABST
Patent Text Reader

Abstract

This electronic apparatus may transmit, to a server, a message for a registration request of the electronic apparatus, receive, from the server, a response message to the message, determine, through the received response message, whether the server supports an encryption protocol, share a security key with the server, receive an SIP message including a first message authentication code (MAC), extract the first MAC from the received SIP message, obtain a network address and a port number from which the SIP message has been transmitted, generate a second MAC by using the security key, the obtained network address, the obtained port number and the received SIP message, and verify the received SIP message by comparing the extracted first MAC with the generated second MAC.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic device for verifying the integrity of a SIP message and method of operation thereof

[0001] One embodiment relates to an electronic device for verifying the integrity of a SIP message and a method of operating the same.

[0002] In IMS (Internet Protocol Multimedia Subsystem) based mobile communication systems, various encryption protocols (e.g., IPsec (IP security), TLS (transport layer security), DTLS (datagram TLS)) can be used to encrypt signaling packets.

[0003] Among various encryption protocols, IPsec is a standard framework designed to protect IP packets at the network layer. IPsec can provide confidentiality through encryption, integrity through Message Authentication Codes (MACs), sender authentication, prevention of replay attacks, packet access control via security policies, and packet traffic encryption.

[0004] The electronic device can complete IPsec authentication through an IMS server that supports IPsec, and if IPsec authentication is completed, it can perform secure communication.

[0005] There may be cases where IPsec authentication of an electronic device fails. For example, IPsec authentication of an electronic device may fail if the device, while in a VoLTE (voice over LTE) roaming state, registers with an IMS server that does not support IPsec, if the device registers with a CSCF (call session control function) L4 server that does not support IPsec due to a failure of integration with a DM (device management) server, if the manufacturer of the electronic device and the network operator are different, or if the device communicates with a backup server that does not support IPsec among dualized servers in the event of an emergency (e.g., war or disaster).

[0006] Without IPsec authentication, electronic devices can be left vulnerable to hacker attacks. The communication capabilities of the electronic device may be degraded or rendered unusable. Hackers can confuse the user of the electronic device by manipulating the message sender or altering part or all of the message content through spoofing.

[0007] If the IMS server does not support encryption protocols (or lacks IPsec authentication), existing electronic devices can verify the validity of incoming packets by checking whether the request URI (uniform resource identifier) ​​of the incoming packet matches the IMPU (IP multimedia public user identity) registered with the IMS server. However, this verification may have limitations in guaranteeing integrity. For example, in a state where IPsec is not supported, a hacker could intercept an INVITE message sent from the server and transmit the intercepted message to the electronic device. In this case, the electronic device might mistake the message for a valid INVITE sent by a proxy CSCF instead of the hacker.

[0008] According to one embodiment, an electronic device capable of verifying the integrity of a received packet (or a received session initiation protocol (SIP) message) can be provided when the IMS server does not support an encryption protocol (or when IPsec authentication is not performed).

[0009] According to one embodiment, when the IMS server does not support an encryption protocol (or when IPsec authentication is not performed), an electronic device can be provided that can securely share a security key used to generate a MAC with the server.

[0010] According to one embodiment, the electronic device may include at least one processor comprising a memory for storing instructions and a processing circuit. When the instructions are executed by the at least one processor, the electronic device may perform the following operations: sending a message regarding a registration request of the electronic device to a server; receiving a response message regarding the message from the server; determining whether the server supports an encryption protocol through the received response message; sharing a security key with the server (the method of sharing the security key depends on whether the server supports the encryption protocol); receiving a SIP message including a first message authentication code (MAC); extracting the first MAC from the received SIP message; obtaining the network address and port number to which the SIP message was transmitted; generating a second MAC using the security key, the obtained network address, the obtained port number, and the received SIP message; and performing verification of the received SIP message by comparing the extracted first MAC with the generated second MAC.

[0011] According to one embodiment, the electronic device may include at least one processor comprising a memory for storing instructions and a processing circuit. When the above instructions are executed by the at least one processor, the electronic device may perform the following operations: transmitting a message regarding a registration request of the electronic device to a server; receiving a response message regarding the message from the server; determining whether the server supports an encryption protocol through the received response message; if it is determined that the server does not support the encryption protocol, generating a security key identical to the security key of the server based on a key received from the server, a first value randomly generated by the electronic device, and a first parameter value; receiving a SIP message including a first MAC; extracting the first MAC from the received SIP message; obtaining the network address and port number to which the SIP message was transmitted; generating a second MAC using the generated security key, the obtained network address, the obtained port number, and the received SIP message; and performing verification of the received SIP message by comparing the extracted first MAC with the generated second MAC.

[0012] According to one embodiment, a method of operation of an electronic device may include: transmitting a message regarding a registration request of the electronic device to a server; receiving a response message regarding the message from the server; determining whether the server supports an encryption protocol through the received response message; sharing a security key with the server (the method of sharing the security key depends on whether the server supports the encryption protocol); receiving a SIP message including a first MAC; extracting the first MAC from the received SIP message; obtaining a network address and port number to which the SIP message was transmitted; generating a second MAC using the security key, the obtained network address, the obtained port number, and the received SIP message; and performing verification of the received SIP message by comparing the extracted first MAC with the generated second MAC.

[0013] According to one embodiment, a computer-readable non-transient recording medium may store software for an electronic device to perform operations. The operations may include: transmitting a message regarding a registration request of the electronic device to a server; receiving a response message regarding the message from the server; determining whether the server supports an encryption protocol through the received response message; sharing a security key with the server (the method of sharing the security key varies depending on whether the server supports the encryption protocol); receiving a SIP message including a first MAC; extracting the first MAC from the received SIP message; obtaining the network address and port number to which the SIP message was transmitted; generating a second MAC using the security key, the obtained network address, the obtained port number, and the received SIP message; and performing verification of the received SIP message by comparing the extracted first MAC with the generated second MAC.

[0014] According to one embodiment, in a state where no encryption protocol is applied, the electronic device can verify the integrity of a received SIP message (or packet) in a simple manner and improve the security of the electronic device.

[0015] FIG. 1 illustrates a block diagram of an electronic device in a network environment according to one embodiment.

[0016] FIG. 2 is a block diagram of an electronic device in a network environment including a plurality of cellular networks according to one embodiment.

[0017] FIG. 3 is a diagram illustrating an example of a packet according to one embodiment.

[0018] FIG. 4 is a flowchart illustrating the operation of an electronic device according to one embodiment sharing a security key with a server according to a first sharing method.

[0019] FIG. 5 is a flowchart illustrating the operation of an electronic device according to one embodiment sharing a security key with a server according to a second sharing method.

[0020] FIG. 6 is a flowchart illustrating an example in which an electronic device according to one embodiment successfully verifies a received SIP message.

[0021] FIG. 7 is a flowchart illustrating an example in which an electronic device according to one embodiment fails to verify a received SIP message.

[0022] FIG. 8 is a flowchart illustrating an example in which an electronic device according to one embodiment fails to verify a received SIP message.

[0023] FIG. 9 is a flowchart illustrating an example in which an electronic device according to one embodiment fails to verify a received SIP message.

[0024] FIG. 10 is a block diagram illustrating an example of the configuration of an electronic device according to one embodiment.

[0025] FIG. 11 is a flowchart illustrating an example of an operation method of an electronic device according to one embodiment.

[0026] Hereinafter, embodiments will be described in detail with reference to the attached drawings. In the description with reference to the attached drawings, identical components are given the same reference numeral regardless of the drawing number, and redundant descriptions thereof will be omitted.

[0027] FIG. 1 is a block diagram of an electronic device (101) in a network environment (100) according to one embodiment. Referring to FIG. 1, in the network environment (100), the electronic device (101) may communicate with an electronic device (102) through a first network (198) (e.g., a short-range wireless communication network) or may communicate with at least one of an electronic device (104) or a server (108) through a second network (199) (e.g., a long-range wireless communication network). According to one embodiment, the electronic device (101) may communicate with the electronic device (104) through the server (108). According to one embodiment, the electronic device (101) may include a processor (120), memory (130), input module (150), sound output module (155), display module (160), audio module (170), sensor module (176), interface (177), connection terminal (178), haptic module (179), camera module (180), power management module (188), battery (189), communication module (190), subscriber identification module (196), or antenna module (197). In some embodiments, at least one of these components (e.g., connection terminal (178)) may be omitted from the electronic device (101), or one or more other components may be added. In some embodiments, some of these components (e.g., sensor module (176), camera module (180), or antenna module (197)) may be integrated into a single component (e.g., display module (160)).

[0028] The processor (120) can control at least one other component (e.g., a hardware or software component) of the electronic device (101) connected to the processor (120) by executing software (e.g., a program (140)), and can perform various data processing or operations. According to one embodiment, as at least part of the data processing or operations, the processor (120) can store commands or data received from other components (e.g., a sensor module (176) or a communication module (190)) in volatile memory (132), process the commands or data stored in volatile memory (132), and store the resulting data in non-volatile memory (134). According to one embodiment, the processor (120) may include a main processor (121) (e.g., a central processing unit or an application processor) or an auxiliary processor (123) that can operate independently or together with it (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor). For example, if the electronic device (101) includes a main processor (121) and an auxiliary processor (123), the auxiliary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a designated function. The auxiliary processor (123) may be implemented separately from the main processor (121) or as part thereof.

[0029] The auxiliary processor (123) may control at least some of the functions or states associated with at least one component of the electronic device (101) (e.g., display module (160), sensor module (176), or communication module (190)) on behalf of the main processor (121) while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state. According to one embodiment, the auxiliary processor (123) (e.g., image signal processor or communication processor) may be implemented as part of another functionally related component (e.g., camera module (180) or communication module (190)). According to one embodiment, the auxiliary processor (123) (e.g., neural network processing unit) may include a hardware structure specialized for processing an artificial intelligence model. The artificial intelligence model may be generated through machine learning. Such learning may be performed, for example, on the electronic device (101) itself where the artificial intelligence model is executed, or through a separate server (e.g., server (108)). The learning algorithm may include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model may include a plurality of artificial neural network layers.An artificial neural network may be a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to the hardware structure, the artificial intelligence model may include a software structure, either additionally or substantially.

[0030] The memory (130) can store various data used by at least one component of the electronic device (101) (e.g., processor (120) or sensor module (176)). The data may include, for example, input data or output data for software (e.g., program (140)) and related commands. The memory (130) may include volatile memory (132) or non-volatile memory (134).

[0031] The program (140) may be stored as software in memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).

[0032] The input module (150) can receive commands or data to be used for a component of the electronic device (101) (e.g., processor (120)) from outside the electronic device (101) (e.g., user). The input module (150) may include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).

[0033] The sound output module (155) can output a sound signal to the outside of the electronic device (101). The sound output module (155) may include, for example, a speaker or a receiver. The speaker may be used for general purposes, such as multimedia playback or recording playback. The receiver may be used to receive incoming calls. According to one embodiment, the receiver may be implemented separately from the speaker or as part thereof.

[0034] The display module (160) can visually provide information to the outside of the electronic device (101) (e.g., a user). The display module (160) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling said device. According to one embodiment, the display module (160) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of the force generated by said touch. The display module (160) may be implemented as an exemplary foldable structure and / or a rollable structure. For example, the size of the display screen of the display module (160) may be reduced when folded and expanded when unfolded.

[0035] The audio module (170) can convert sound into an electrical signal or, conversely, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150) or output sound through the sound output module (155) or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphones) connected directly or wirelessly to the electronic device (101).

[0036] The sensor module (176) can detect the operating state of the electronic device (101) (e.g., power or temperature) or the external environmental state (e.g., user state) and generate an electrical signal or data value corresponding to the detected state. According to one embodiment, the sensor module (176) may include, for example, a gesture sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an accelerometer sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biosensor, a temperature sensor, a humidity sensor, or an illuminance sensor.

[0037] The interface (177) may support one or more specified protocols that can be used for the electronic device (101) to be connected directly or wirelessly to an external electronic device (e.g., electronic device (102)). According to one embodiment, the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.

[0038] The connection terminal (178) may include a connector through which the electronic device (101) can be physically connected to an external electronic device (e.g., electronic device (102)). According to one embodiment, the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).

[0039] The haptic module (179) can convert an electrical signal into a mechanical stimulus (e.g., vibration or movement) or an electrical stimulus that the user can perceive through tactile or kinesthetic senses. According to one embodiment, the haptic module (179) may include, for example, a motor, a piezoelectric element, or an electric stimulation device.

[0040] The camera module (180) can capture still images and video. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.

[0041] The power management module (188) can manage power supplied to the electronic device (101). According to one embodiment, the power management module (188) can be implemented, for example, as at least part of a power management integrated circuit (PMIC).

[0042] The battery (189) can supply power to at least one component of the electronic device (101). According to one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.

[0043] The communication module (190) can support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between an electronic device (101) and an external electronic device (e.g., electronic device (102), electronic device (104), or server (108)), and the performance of communication through the established communication channel. The communication module (190) may include one or more communication processors that operate independently of the processor (120) (e.g., application processor) and support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (190) may include a wireless communication module (192) (e.g., cellular communication module, short-range wireless communication module, or GNSS (global navigation satellite system) communication module) or a wired communication module (194) (e.g., LAN (local area network) communication module, or power line communication module). The corresponding communication module among these communication modules can communicate with an external electronic device (104) through a first network (198) (e.g., a short-range communication network such as Bluetooth, WiFi (wireless fidelity) direct, or IrDA (infrared data association)) or a second network (199) (e.g., a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules may be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (192) can identify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) using subscriber information (e.g., International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module (196).

[0044] The wireless communication module (192) can support 5G networks and next-generation communication technologies following 4G networks, for example, new radio access technology. NR access technology can support high-speed transmission of high-capacity data (enhanced mobile broadband (eMBB)), minimization of terminal power and connection of multiple terminals (massive machine type communications (mMTC)), or high reliability and low latency (ultra-reliable and low-latency communications (URLLC)). The wireless communication module (192) can support a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate, for example. The wireless communication module (192) can support various technologies for securing performance in the high-frequency band, such as beamforming, massive MIMO (multiple-input and multiple-output), full-dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large-scale antenna. The wireless communication module (192) can support various requirements specified in the electronic device (101), external electronic device (e.g., electronic device (104)), or network system (e.g., second network (199)). According to one embodiment, the wireless communication module (192) can support a Peak data rate (e.g., 20 Gbps or more) for realizing eMBB, loss coverage (e.g., 164 dB or less) for realizing mMTC, or U-plane latency (e.g., downlink (DL) and uplink (UL) each 0.5 ms or less, or round trip 1 ms or less) for realizing URLLC.

[0045] An antenna module (197) can transmit a signal or power to or from an external source (e.g., an external electronic device). According to one embodiment, the antenna module (197) may include an antenna comprising a radiator made of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). According to one embodiment, the antenna module (197) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as a first network (198) or a second network (199), may be selected from the plurality of antennas, for example, by a communication module (190). A signal or power may be transmitted or received between the communication module (190) and an external electronic device through the selected at least one antenna. According to some embodiments, in addition to the radiator, other components (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as part of the antenna module (197).

[0046] According to various embodiments, the antenna module (197) may form a mmWave antenna module. According to one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent to a first surface (e.g., bottom surface) of the printed circuit board and capable of supporting a specified high frequency band (e.g., mmWave band), and a plurality of antennas (e.g., array antennas) disposed on or adjacent to a second surface (e.g., top surface or side surface) of the printed circuit board and capable of transmitting or receiving a signal of the specified high frequency band.

[0047] At least some of the above components can be connected to each other via a communication method between peripheral devices (e.g., bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)) and exchange signals (e.g., commands or data) with each other.

[0048] According to one embodiment, commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) through a server (108) connected to a second network (199). Each of the external electronic devices (102, or 104) may be the same or a different type of device as the electronic device (101). According to one embodiment, all or part of the operations performed on the electronic device (101) may be performed on one or more of the external electronic devices (102, 104, or 108). For example, if the electronic device (101) needs to perform a function or service automatically or in response to a request from a user or another device, the electronic device (101) may request one or more external electronic devices to perform at least part of the function or service instead of performing the function or service itself or additionally. One or more external electronic devices that receive the above request may execute at least part of the requested function or service, or additional function or service related to the request, and transmit the result of the execution to the electronic device (101). The electronic device (101) may provide the result as is or additionally processed as at least part of the response to the request. For this purpose, for example, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used. The electronic device (101) may provide ultra-low latency services using, for example, distributed computing or mobile edge computing. In another embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server using machine learning and / or neural networks. According to one embodiment, the external electronic device (104) or the server (108) may be included within a second network (199).The electronic device (101) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.

[0049] The electronic device according to the various embodiments disclosed in this document may be of various forms. The electronic device may include, for example, a portable communication device (e.g., a smartphone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a consumer electronics device. The electronic device according to the embodiments of this document is not limited to the devices described above.

[0050] The various embodiments of this document and the terms used therein are not intended to limit the technical features described in this document to specific embodiments, and should be understood to include various modifications, equivalents, or substitutions of said embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of said items unless the relevant context clearly indicates otherwise. In this document, phrases such as "A or B," "at least one of A and B," "at least one of A or B," "A, B or C," "at least one of A, B and C," and "at least one of A, B, or C" may each include any one of the items listed together in the corresponding phrase, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used simply to distinguish said components from other said components and do not limit said components in any other aspect (e.g., importance or order). Where any (e.g., 1st) component is referred to as "coupled" or "connected" to another (e.g., 2nd) component, with or without the terms "functionally" or "communicationly," it means that said any component may be connected to said other component directly (e.g., via a wire), wirelessly, or through a third component.

[0051] The term “module” as used in the various embodiments of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit, for example. A module may be a component formed integrally, or a minimum unit of said component or a part thereof that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).

[0052] Various embodiments of the present document may be implemented as software (e.g., program (140)) comprising one or more instructions stored in a storage medium (e.g., internal memory (136) or external memory (138)) readable by a machine (e.g., electronic device (101) of FIG. 1). For example, a processor (e.g., processor (120)) of the machine (e.g., electronic device (101)) may call at least one of the one or more instructions stored in the storage medium and execute it. This enables the machine to be operated to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code that can be executed by an interpreter. The storage medium readable by the machine may be provided in the form of a non-transitory storage medium. Here, 'non-temporary' simply means that the storage medium is a tangible device and does not contain a signal (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently and cases where it is stored temporarily.

[0053] According to one embodiment, the method according to the various embodiments disclosed herein may be provided as included in a computer program product. The computer program product may be traded between a seller and a buyer as a product. The computer program product may be distributed in the form of a device-readable storage medium (e.g., compact disc read-only memory (CD-ROM)), or distributed online (e.g., download or upload) through an application store (e.g., Play Store™) or directly between two user devices (e.g., smartphones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily created on a device-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or a relay server.

[0054] According to various embodiments, each component (e.g., module or program) of the components described above may include a singular or multiple entities, and some of the multiple entities may be separated and placed in other components. According to various embodiments, one or more of the components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Generally or additionally, multiple components (e.g., module or program) may be integrated into a single component. In this case, the integrated component may perform one or more functions of each of the multiple components in the same or similar manner as those performed by the corresponding component among the multiple components prior to integration. According to various embodiments, operations performed by the module, program, or other components may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added.

[0055] FIG. 2 is a block diagram of an electronic device (101) in a network environment (200) including a plurality of cellular networks according to one embodiment.

[0056] Referring to FIG. 2, the electronic device (101) may include a processor (210) (e.g., the processor (120) of FIG. 1 or a communication processor), a first-1 RFIC (radio frequency integrated circuit) (222-1), a first-2 RFIC (222-2), a second RFIC (224), a first RFFE (radio frequency front end) (232), a second RFFE (234), a first antenna module (242), a second antenna module (244), and a third antenna module (246). According to an embodiment, the first-1 RFIC (222-1) and the first-2 RFIC (222-2) may be implemented as a single RFIC (222). The second network (199) may include a first cellular network (292) (e.g., a legacy network) and a second cellular network (294) (e.g., a 5G network). The electronic device (101) may further include at least one of the components described in FIG. 1, and the second network (199) may further include at least one other network. According to one embodiment, the second RFIC (224) may be omitted or included as part of the third RFIC (226).

[0057] According to one embodiment, the first-1 RFIC (222-1), the first-2 RFIC (222-2), the second RFIC (224), the first RFFE (232), and the second RFFE (234) of FIG. 2 may be included in the communication module (190) of FIG. 1 (e.g., wireless communication module (192)), and the first antenna module (242), the second antenna module (244), and the third antenna module (246) of FIG. 2 may be included in the antenna module (197) of FIG. 1.

[0058] According to one embodiment, the processor (210) may establish a communication channel in a band to be used for wireless communication with the first cellular network (292), and support legacy network communication through the established communication channel. The first cellular network (292) may be a legacy network including, for example, a second generation (2G), 3G, 4G, or LTE (long term evolution) network. The processor (210) may establish a communication channel corresponding to a first band (e.g., about 6 GHz to about 60 GHz) among the bands to be used for wireless communication with the second cellular network (294) (or FR (frequency range) 2 of the 5G standard (e.g., 24.25 GHz to 52.6 GHz)), and support 5G network communication through the established communication channel. The second cellular network (294) may be a 5G network as defined by 3GPP. The processor (210) can support the establishment of a communication channel corresponding to a second band (e.g., about 6 GHz or lower) (or FR1 of the 5G standard (e.g., 410 MHz to 7.125 GHz)) among the bands to be used for wireless communication with the second cellular network (294), and 5G network communication through the established communication channel.

[0059] According to one embodiment, the first-1 RFIC (222-1) (or the first RFIC (222)) can convert a baseband signal generated by the processor (210) during transmission into a radio frequency (RF) signal of a frequency band (e.g., about 700 MHz to about 3 GHz) used in the first cellular network (292). During reception, the RF signal can be received or acquired from the first cellular network (292) through the first antenna module (242) and can be preprocessed through the first RFFE (232). The first-1 RFIC (222-1) (or the first RFIC (222)) can convert the preprocessed RF signal into a baseband signal so that it can be processed by the processor (210).

[0060] According to one embodiment, the first-2 RFIC (222-2) (or the first RFIC (222)) can convert a baseband signal generated by the processor (210) during transmission into an RF signal of the Sub6 band (e.g., about 6 GHz or lower) used in the second cellular network (294) (hereinafter, 5G Sub6 RF signal). During reception, the 5G Sub6 RF signal can be received or acquired from the second cellular network (294) through the second antenna module (244) and can be preprocessed through the second RFFE (234). The first-2 RFIC (222-2) (or the first RFIC (222)) can convert the preprocessed 5G Sub6 RF signal into a baseband signal so that it can be processed by the processor (210).

[0061] According to one embodiment, the third RFIC (226) can convert a baseband signal generated by the processor (210) into an RF signal of the 5G Above6 band (e.g., about 6 GHz to about 60 GHz) to be used in the second cellular network (294) (hereinafter, 5G Above6 RF signal). Upon reception, the 5G Above6 RF signal may be received or acquired from the second cellular network (294) through the third antenna module (246) (e.g., antenna (248)) and may be preprocessed through the third RFFE (236). The third RFIC (226) can convert the preprocessed 5G Above6 RF signal into a baseband signal so that it can be processed by the processor (210). According to one embodiment, the third RFFE (236) may be formed as part of the third RFIC (226).

[0062] According to one embodiment, the electronic device (101) may include a second RFIC (224) separately from or at least as part of the third RFIC (226). In this case, the second RFIC (224) may convert a baseband signal generated by the processor (210) into an RF signal (hereinafter referred to as an IF signal) in an intermediate frequency band (e.g., about 9 GHz to about 11 GHz) and transmit the IF signal to the third RFIC (226). The third RFIC (226) may convert the IF signal into a 5G Above6 RF signal. Upon reception, the 5G Above6 RF signal may be received or acquired from the second cellular network (294) through the third antenna module (246) (e.g., antenna (248)) and may be converted into an IF signal by the third RFIC (226). The second RFIC (224) can convert the IF signal into a baseband signal so that the processor (210) can process it.

[0063] According to one embodiment, at least one of the first antenna module (242) or the second antenna module (244) may be omitted or combined with another antenna module to process RF signals of a plurality of corresponding bands.

[0064] According to one embodiment, the third RFIC (226) and the antenna (248) may be placed on the same substrate to form a third antenna module (246). For example, the processor (120) may be placed on the first substrate (e.g., main PCB). In this case, the third RFIC (226) may be placed on a portion of a second substrate (e.g., sub PCB) separate from the first substrate (e.g., bottom surface), and the antenna (248) may be placed on another portion of the second substrate (e.g., sub PCB) (e.g., top surface), thereby forming the third antenna module (246). By placing the third RFIC (226) and the antenna (248) on the same substrate, it is possible to reduce the length of the transmission line between them. This can reduce the loss (e.g., attenuation) of signals in the high-frequency band (e.g., about 6 GHz to about 60 GHz) used for 5G network communication by the transmission line. As a result, the electronic device (101) can improve the quality or speed of communication with the second cellular network (294) (e.g., 5G network).

[0065] According to one embodiment, the antenna (248) may be formed as an antenna array comprising a plurality of antenna elements that can be used for beamforming. In this case, the third RFIC (226) may include a plurality of phase shifters (238) corresponding to the plurality of antenna elements, for example, as part of the third RFFE (236). During transmission, each of the plurality of phase shifters (238) can change the phase of a 5G Above6 RF signal to be transmitted to the outside of the electronic device (101) (e.g., a base station of a 5G network) through the corresponding antenna element. During reception, each of the plurality of phase shifters (238) can change the phase of a 5G Above6 RF signal received from the outside (e.g., a base station of a 5G network) through the corresponding antenna element to the same or substantially the same phase. This enables transmission or reception via beamforming between the electronic device (101) and the outside.

[0066] The second cellular network (294) may operate independently of the first cellular network (292) (e.g., Stand-Alone (SA)) or connected to it (e.g., Non-Stand Alone (NSA)). For example, the 5G network may only have an access network (e.g., 5G radio access network (RAN) or next generation RAN (NG RAN)) and no core network (e.g., next generation core (NGC)). In this case, after the electronic device (101) accesses the access network of the 5G network, it may access an external network (e.g., the Internet) under the control of the core network of the legacy network (e.g., evolved packed core (EPC)). Protocol information for communication with the legacy network (e.g., LTE protocol information) or protocol information for communication with the 5G network (e.g., New Radio (NR) protocol information) may be stored in memory (e.g., memory (130) of FIG. 1) and accessed by the processor (210).

[0067] FIG. 3 is a diagram illustrating an example of a packet according to one embodiment.

[0068] Referring to FIG. 3, a packet (300) according to one embodiment may include a first header (301), a second header (303), and a SIP (session initiation protocol) message (305).

[0069] The packet (300) may include a SIP message (305) and may be referred to as a SIP packet.

[0070] A first header (e.g., an IP (internet protocol) header) (301) may include a source IP address field (301-1) and a destination IP address field (301-3). The source IP address field (301-1) may include, for example, the IP address of a first device transmitting the packet (300), and the destination IP address field (301-3) may include, for example, the IP address of a second device receiving the packet (300).

[0071] A second header (303) (e.g., a TCP (transmission control protocol) header) may include a source port number field (303-1) and a destination port number field (303-3). The source port number field (303-1) may include, for example, the number of the port used by the first device to transmit the packet (300), and the destination port number field (303-3) may include, for example, the number of the port used by the second device to receive the packet (300).

[0072] For example, a second device (e.g., the electronic device (101) of FIG. 1 and FIG. 2) may receive a packet (300) from a first device (e.g., the server (108) of FIG. 1). The source IP address field (301-1) of the first header (301) may include the IP address of the server (108), and the destination IP address field (301-3) of the first header (301) may include the IP address of the electronic device (101). The source port number field (303-1) of the second header (303) may include the port number used by the server (108) to transmit the packet (300), and the destination port number field (303-3) of the second header (303) may include the port number used by the electronic device (101) to receive the packet (300).

[0073] SIP messages (305) may be defined in the RFC 3261 standard. SIP messages (305) may include request messages and response messages. For example, the request message may include a message for requesting the registration of the electronic device (101) to the IMS server (e.g., a register message) or a message for requesting a call connection (e.g., an invite message). The response message may include a message indicating that the processing of the request (e.g., a registration request, a call connection request) was successful (e.g., a 200 OK message), or a message indicating that the processing of the electronic device's request failed because the electronic device was not authenticated (e.g., a 401 unauthorized message). Various other SIP messages in addition to the aforementioned register message, invite message, 200 OK message, and 401 unauthorized message may be defined in the RFC 3261 standard.

[0074] The SIP message (305) may include a SIP header (307) and a message body (309).

[0075] The SIP header (307) may include a call-ID field (307-1) and a content-length field (307-3). The call-ID field (307-1) may include a global unified identifier for the session, and the content-length field (307-3) may include the length of the message body (309).

[0076] According to one embodiment, the SIP header (307) may include a field related to a security key (hereinafter referred to as the security key field) (307-5). As will be described later, the security key may represent a key used to generate a message authentication code (MAC). The security key field (307-5) may correspond to a user-defined field. In the example illustrated in FIG. 4 described later, the security key (K) of operation 415 may be added to the security key field of the SIP header of the registration message of operation 415, and the security key (K) of operation 417 may be added to the security key field of the SIP header of the message of operation 417 (e.g., 200 OK message). In the example illustrated in FIG. 5 to be described later, the first key (A) and parameter value of operation 517 may be added to the security key field of the SIP header of the registration message of operation 517, and the second key (B) of operation 523 may be added to the security key field of the SIP header of the message of operation 523 (e.g., 200 OK message).

[0077] The fields included in the SIP header (307) are not limited to the fields (307-1, 307-3, 307-5) shown in FIG. 3, and the SIP header (307) may include various additional fields.

[0078] The message body (309) may contain content. If there is no content in the message body (309), the content length field (307-3) of the SIP header (307) may indicate 0.

[0079] In the embodiments described below, the transmission of a message may represent the transmission of a packet having the format of a packet (300).

[0080] FIG. 4 is a flowchart illustrating the operation of an electronic device according to one embodiment sharing a security key with a server according to a first sharing method.

[0081] According to one embodiment, the first sharing method may represent a method in which the electronic device (401) and the server (491) share the same security key (K) by the electronic device (401) transmitting the security key (K) to the server (491) through an encrypted communication session between the electronic device (401) (e.g., the electronic device (101) of FIG. 1 and FIG. 2) and the server (491) that supports an encryption protocol (e.g., an IP multimedia subsystem (IMS) server that supports IPsec (IP security)). The server (491) may include, for example, a proxy call session control function (P-CSCF) server.

[0082] Referring to FIG. 4, in operation 411, the electronic device (401) may transmit a registration message to the server (491). The registration message of operation 411 (e.g., a registration message defined in SIP) may represent, for example, a message requesting the server (491) to register the electronic device (401) with the server (491). To distinguish the registration message of operation 411 from the registration message of operation 415, the registration message of operation 411 may be referred to as the first registration message (or initial registration message), and the registration message of operation 415 may be referred to as the second registration message.

[0083] The server (491) can receive a first registration message from the electronic device (401).

[0084] After receiving a first registration message from the electronic device (401), the server (491) may send a response message (e.g., a 401 unauthorized message) to the electronic device (401) in operation 413. The response message (e.g., a 401 unauthorized message) may indicate, for example, that the electronic device (401) is not authenticated and that authentication of the electronic device (401) is required. The server (491) may check whether the authentication information of the electronic device (401) is included in the SIP header of the received first registration message. If the authentication information of the electronic device (401) is not included in the SIP header of the received first registration message, the server (491) may generate a nonce and send a 401 unauthorized message containing the generated nonce to the electronic device (401). The server (491) of FIG. 4 may support an encryption protocol (e.g., IPsec), so the 401 unauthorized message may include information indicating that the server (491) supports an encryption protocol.

[0085] Information indicating that the generated nonce and the server (491) supports the encryption protocol may be included in the SIP header of the 401 unauthorized message.

[0086] After receiving a response message (e.g., 401 unauthorized message) from the server (491), the electronic device (401) may transmit a registration message (hereinafter, second registration message) containing the security key (K) of the electronic device (401) to the server (491) in operation 415.

[0087] For example, the electronic device (401) can generate an authentication value that can be used to authenticate the electronic device (401) based on a nonce within a received response message. Additionally, the electronic device (401) can determine whether the server (491) supports an encryption protocol through the received response message. The electronic device (401) can recognize (or determine) that the server (491) supports an encryption protocol because information indicating that the server (491) supports an encryption protocol is included in the received response message. If the server (491) supports an encryption protocol, the electronic device (401) can generate a second registration message containing the security key (K) of the electronic device (401). The electronic device (401) can add the security key (K) of the electronic device (401) to the second registration message (e.g., the SIP header of the second registration message). The electronic device (401) can encrypt a second registration message containing a security key (K) based on an encryption protocol and transmit the encrypted second registration message to a server (491). The SIP header of the second registration message may include a nonce and a generated authentication value within the received response message.

[0088] The server (491) can receive a second registration message from the electronic device (401) and can authenticate the electronic device (401) based on the authentication value within the second registration message. IPsec authentication can be completed by the server (491) authenticating the electronic device (401).

[0089] The server (491) can store the security key (K) in the second registration message. The server (491) can obtain the security key (K) from the second registration message and store the security key (K) when the authentication of the electronic device (401) is completed.

[0090] When the authentication of the electronic device (401) is complete, the server (491) may send a message (e.g., a 200 OK message) containing a security key (K) to the electronic device (401) in operation 417. The 200 OK message may correspond to a message indicating, for example, that the authentication of the electronic device (401) is complete. The security key (K) may be included in the SIP header of the 200 OK message.

[0091] According to one embodiment, the electronic device (401) may share a security key (K) with the server (491) based on a sharing method that varies depending on whether the server (491) supports an encryption protocol. If the server (491) supports an encryption protocol, the electronic device (401) may share a security key (K) with the server (491) based on the first sharing method described through FIG. 4. If the server (491) does not support an encryption protocol, the electronic device (401) may share a security key (K) with the server (491) based on the second sharing method described later through FIG. 5.

[0092] FIG. 5 is a flowchart illustrating the operation of an electronic device according to one embodiment sharing a security key with a server according to a second sharing method.

[0093] According to one embodiment, the second sharing method may represent a method in which an electronic device (501) (e.g., the electronic device (101) of FIG. 1 and FIG. 2 or the electronic device (401) of FIG. 4) and a server (591) that does not support an encryption protocol (e.g., an IMS server that does not support IPsec) each apply a predetermined algorithm (e.g., the Diffie-Hellman algorithm) to generate a security key (K), thereby allowing the electronic device (501) and the server (591) to share the same security key (K). The server (591) may include, for example, a P-CSCF server.

[0094] Referring to FIG. 5, in operation 511, the electronic device (501) may transmit a registration message (e.g., the registration message of operation 411) to the server (491). The description of operation 411 of FIG. 4 may be applied to operation 511. To distinguish the registration message of operation 511 from the registration message of operation 517, the registration message of operation 511 may be referred to as the first registration message (or initial registration message), and the registration message of operation 517 may be referred to as the second registration message.

[0095] The server (591) may receive a first registration message from the electronic device (501), and in operation 513, may send a response message to the electronic device (501) for the received first registration message. The response message of operation 513 may correspond to a SIP 401 unauthorized message. Since the server (591) may not support an encryption protocol, the response message of operation 513 may not include information indicating that the server (491) supports an encryption protocol.

[0096] The electronic device (501) can receive a response message for the first registration message from the server (591).

[0097] The electronic device (401) can determine whether the server (491) supports an encryption protocol through the received response message. The electronic device (501) may recognize (or determine) that the server (591) does not support an encryption protocol because the received response message does not contain information indicating that the server (591) supports an encryption protocol. IPsec authentication may not be possible because the server (591) does not support IPsec.

[0098] The electronic device (501) can generate a first key (A) in operation 515 when the server (591) does not support an encryption protocol. For example, the electronic device (501) can generate the first key (A) by applying a randomly generated first value (a), a first parameter value (p), and a second parameter value (g) to the mathematical expression g^a mod p. "A = g^a mod p". Each of the first parameter value (g) and the second parameter value (p) may be a prime number, and mod may represent a modular operator. A modular operator may represent an operator that derives the remainder of the result of a division (e.g., quotient and remainder). The first value (a) may be, for example, 6, the first parameter value (p) may be, for example, 23, and the second parameter value (g) may be, for example, 5. The electronic device (501) can generate a first key (A) (e.g., 8) according to the mathematical formula g^a mod p.

[0099] The first key (A) may correspond to, for example, the public key of the electronic device (501), and the first value (a) may correspond to, for example, the private key of the electronic device (501).

[0100] According to an embodiment, the electronic device (501) may randomly generate a first value (a) when it receives a response message from the server (591). It is not limited thereto, and the first value (a) may already be generated before the electronic device (501) receives the response message from the server (591).

[0101] In operation 517, the electronic device (501) may transmit a registration message (hereinafter referred to as the second registration message) to the server (591) including a first key (A) and parameter values ​​(e.g., a first parameter value (p) and / or a second parameter value (g)). The SIP header of the registration message (e.g., the second registration message) of operation 517 may include, for example, a first key (A), a first parameter value (p), and a second parameter value (g).

[0102] The server (591) can receive a second registration message containing a first key (A) and parameter values ​​from the electronic device (501).

[0103] The server (591) can generate a second key (B) in operation 519 after receiving a second registration message. For example, the server (591) can obtain a first parameter value (p) and a second parameter value (g) from the received second registration message. The server (591) can generate a second key (B) by applying the randomly generated second value (b), the first parameter value (p), and the second parameter value (g) to the mathematical formula g^b mod p. "B = g^b mod p". The second value (b) may be, for example, 15, the first parameter value (p) may be, for example, 23, and the second parameter value (g) may be, for example, 5. The server (591) can generate a second key (B) (e.g., 19) according to the mathematical formula g^b mod p.

[0104] The second key (B) may correspond to, for example, the public key of the server (591), and the second value (b) may correspond to, for example, the private key of the server (591).

[0105] In operation 521, the server (591) can generate a security key (K). For example, the server (591) can generate a security key (K) by applying the first key (A), the second value (b), and the first parameter value (p) in the received second registration message to the formula A^b mod p. If the first key (A) is, for example, 8, the second value (b) is, for example, 15, and the first parameter value (p) is, for example, 23, the server (591) can generate a security key (K) (e.g., 2).

[0106] The server (591) may not support an encryption protocol, so communication between the server (591) and the electronic device (501) may not be encrypted. As a result, if the server (591) transmits a message containing a security key (K) to the electronic device (501), the security key (K) may be leaked. The server (591) may not transmit a message containing a security key (K) to the electronic device (501).

[0107] If the server (591) has generated a security key (K), it can transmit a message containing a second key (B) in operation 523 to the electronic device (501). The message in operation 523 may represent a SIP 200 OK message. The server (591) may add the second key (B) to the SIP header of the 200 OK message and transmit a 200 OK message containing the second key (B) to the electronic device (501).

[0108] When the electronic device (501) receives a message containing a second key (B) from the server (591), it can generate a security key (K) in operation 525. For example, the electronic device (501) can obtain the second key (B) from a 200 OK message and generate a security key (K) by applying the second key (B), the first value (a), and the first parameter value (p) to the formula B^a mod p. If the second key (B) is, for example, 19, the first value (a) is, for example, 6, and the first parameter value (p) is, for example, 23, the electronic device (501) can generate a security key (K) (e.g., 2).

[0109] As previously explained, A can be g^a mod p, so the mathematical formula A^b mod p used by the server (591) can be expressed as (g^a mod p)^b mod p, and (g^a mod p)^b mod p can be g^ab mod p. As previously explained, B can be g^b mod p, so the mathematical formula B^a mod p used by the electronic device (501) can be expressed as (g^b mod p)^a mod p, and (g^b mod p)^a mod p can be g^ab mod p. Since the mathematical formula A^b mod p used by the server (591) and the mathematical formula B^a mod p used by the electronic device (501) can be expressed as g^ab mod p due to their mathematical characteristics, the security key (K) generated by the electronic device (501) and the security key (K) generated by the server (591) can be the same.

[0110] FIG. 6 is a flowchart illustrating an example in which an electronic device according to one embodiment successfully verifies a received SIP message.

[0111] Referring to FIG. 6, in operation 611, a server (691) (e.g., server (491) of FIG. 4 or server (591) of FIG. 5) may receive a SIP message (e.g., an invite message) from a server of an external electronic device (not shown). The server (691) may not support an encryption protocol, but is not limited thereto. The external electronic device may correspond to a MO (mobile origination) terminal and the electronic device (601) may correspond to a MT (mobile termination) terminal.

[0112] In operation 613, the server (691) can generate a first MAC based on a security key (K) (e.g., a security key (K) shared with the electronic device (601) based on a first sharing method or a second sharing method), a received SIP message, a network address (e.g., the IP address of the server (691)), and a port number (e.g., the number of the port used to transmit packets to the electronic device (601)).

[0113] For example, the security key (K) may be 12345678, the network address of the server (691) may be IP address #1, and the port number used by the server (691) to transmit packets to the electronic device (601) may be port #1. The server (691) may generate a first MAC by applying a hash-based message authentication code (HMAC) algorithm to the security key (K) (e.g., 12345678), the network address (e.g., IP address #1), the port number (e.g., port #1), and the received SIP message. The server (691) may perform hashing on the network address (e.g., IP address #1), the port number (e.g., port #1), and the received SIP message using the security key (K) (e.g., 12345678). The hashing result may correspond, for example, to the first MAC. The generated first MAC may be, for example, XYZABC.

[0114] The server (691) may add the generated first MAC to the SIP header of the received SIP message (e.g., the call-ID field of the SIP header). In operation 615, the server (691) may transmit a SIP message containing the first MAC (e.g., an invite message containing the first MAC) to the electronic device (601). The source IP address field of the IP header of the SIP message containing the first MAC may include IP address #1, and the source port number field of the TCP header of the SIP message containing the first MAC may include port #1.

[0115] The electronic device (601) can receive a SIP message containing a first MAC from the server (691).

[0116] In operation 617, the electronic device (601) can extract a first MAC from a received SIP message. For example, the electronic device (601) can extract a first MAC (e.g., XYZABC) from the call-ID field of the SIP header of the received SIP message.

[0117] In operation 619, the electronic device (601) can obtain the network address and port number to which the SIP message was transmitted. For example, the electronic device (601) can obtain IP address #1 from the source IP address field of the IP header of the received SIP message and obtain port #1 from the source port number field of the TCP header of the received SIP message.

[0118] FIG. 6 is illustrated as the electronic device (601) performing operation 619 after performing operation 617, but this is merely an example and the electronic device (601) may perform operation 617 after performing operation 619. Alternatively, the electronic device (601) may perform operation 617 and operation 619 in parallel.

[0119] In operation 621, the electronic device (601) can generate a second MAC based on the security key (K) shared with the server (691), the SIP message, the acquired network address, and the acquired port number.

[0120] For example, the electronic device (601) may share a security key (K) (e.g., 12345678) with the server (691). The acquired network address may be IP address #1, and the acquired port number may be port #1. The electronic device (601) may generate a second MAC by applying an HMAC algorithm to the security key (K) (e.g., 12345678), the acquired network address (e.g., IP address #1), the acquired port number (e.g., port #1), and a SIP message (e.g., a SIP message from which the first MAC was extracted). The electronic device (601) may perform hashing on the acquired network address (e.g., IP address #1), the acquired port number (e.g., port #1), and the SIP message (e.g., a SIP message from which the first MAC was extracted) using the security key (K) (e.g., 12345678). The hashing result may correspond, for example, to the second MAC. The generated second MAC can be, for example, XYZABC.

[0121] If the electronic device (601) generates a second MAC, in operation 623, it can perform verification of the received SIP message by comparing the extracted first MAC and the generated second MAC. The electronic device (601) can verify the integrity of the received SIP message by determining whether the extracted first MAC and the generated second MAC are identical. In the example illustrated in FIG. 6, the extracted first MAC (e.g., XYZABC) and the generated second MAC (e.g., XYZABC) may be identical, so the electronic device (601) can determine that the received SIP message is valid (or that the received SIP message is intact).

[0122] If the electronic device (601) succeeds in verifying the received SIP message (or determines that the received SIP message is valid or that the received SIP message is of integrity), it may send a response message (e.g., 200 OK message) or 180 ringing message to the server (691).

[0123] FIG. 7 is a flowchart illustrating an example in which an electronic device according to one embodiment fails to verify a received SIP message.

[0124] Referring to FIG. 7, in operation 711, the server (691) can receive a SIP message (e.g., invite message) from an external electronic device (e.g., MO terminal) from the server of an external electronic device (not shown).

[0125] In operation 713, the server (691) can generate a first MAC based on a security key (K), a received SIP message, a network address (e.g., the IP address of the server (691)), and a port number (e.g., the number of the port used to transmit packets to the electronic device (601)).

[0126] For example, the security key (K) may be 12345678, the network address of the server (691) may be IP address #1, and the port number used by the server (691) to transmit packets to the electronic device (601) may be port #1. The server (691) may generate a first MAC by applying the HMAC algorithm to the security key (K) (e.g., 12345678), the network address (e.g., IP address #1), the port number (e.g., port #1), and the received SIP message. The generated first MAC may be, for example, XYZABC.

[0127] The server (691) can add the generated first MAC to the SIP header of the received SIP message (e.g., the call-ID field of the SIP header).

[0128] In operation 715, the server (691) may transmit a SIP message containing a first MAC (e.g., an invite message containing a first MAC). The source IP address field of the IP header of the transmitted SIP message may contain IP address #1, and the source port number field of the TCP header of the transmitted SIP message may contain port #1.

[0129] In operation 717, a fake server (791) can hijack SIP messages transmitted by the server (691). The fake server (791) can represent a device capable of causing damage to the electronic device (601) and / or the server (691) by taking control of the session between the server (691) and the electronic device (601).

[0130] In operation 719, the fake server (791) can transmit a hijacked SIP message to the electronic device (601). The network address of the fake server (791) may be, for example, IP address #2, and the port number of the fake server (791) may be, for example, port #2. The source IP address field of the IP header and the source port number field of the TCP header of the SIP message transmitted by the fake server (791) to the electronic device (601) may each include IP address #2 and port #2, respectively.

[0131] The electronic device (601) can receive SIP messages transmitted by the fake server (791).

[0132] In operation 721, the electronic device (601) can extract a first MAC from a received SIP message. For example, the electronic device (601) can extract a first MAC (e.g., XYZABC) from the call-ID field of the SIP header of the received SIP message.

[0133] In operation 723, the electronic device (601) can obtain the network address and port number to which the SIP message was transmitted. For example, the electronic device (601) can obtain IP address #2 from the source IP address field of the IP header of the received SIP message and obtain port #2 from the source port number field of the TCP header of the received SIP message.

[0134] FIG. 7 is illustrated as the electronic device (601) performing operation 723 after performing operation 721, but this is merely an example and the electronic device (601) may perform operation 721 after performing operation 723. Alternatively, the electronic device (601) may perform operation 721 and operation 723 in parallel.

[0135] In operation 725, the electronic device (601) can generate a second MAC based on a security key (K), a SIP message (e.g., a SIP message received from a fake server (791)), a obtained network address, and a obtained port number.

[0136] For example, the electronic device (601) may share a security key (K) (e.g., 12345678) with the server (691). The acquired network address may be IP address #2, and the acquired port number may be port #2. The electronic device (601) may generate a second MAC by applying the HMAC algorithm to the security key (K) (e.g., 12345678), the acquired network address (e.g., IP address #2), the acquired port number (e.g., port #2), and a SIP message (e.g., a SIP message from which the first MAC was extracted). The generated second MAC may be, for example, ABC123.

[0137] If the electronic device (601) has generated a second MAC, in operation 727, it can perform verification of the received SIP message by comparing the extracted first MAC and the generated second MAC. The electronic device (601) can verify the integrity of the received SIP message by determining whether the extracted first MAC and the generated second MAC are identical. In the example illustrated in FIG. 7, the extracted first MAC (e.g., XYZABC) and the generated second MAC (e.g., ABC123) may be different from each other. Because the acquired network address and the acquired port number are each different from the network address and port number used to generate the first MAC, respectively, the generated second MAC may be different from the extracted first MAC. In this case, the electronic device (601) may determine that the received SIP message is invalid (or that the integrity of the received SIP message is compromised). The electronic device (601) may determine that the received SIP message was transmitted by an unauthorized device (or untrusted device) (e.g., a fake server (791)) if the extracted first MAC and the generated second MAC are different from each other. The electronic device (601) may fail to verify the received SIP message and may drop the received SIP message (or packet).

[0138] FIG. 8 is a flowchart illustrating an example in which an electronic device according to one embodiment fails to verify a received SIP message.

[0139] Referring to FIG. 8, in operation 811, the server (691) can receive a SIP message (e.g., invite message) from an external electronic device (e.g., MO terminal) from a server of an external electronic device (not shown).

[0140] In operation 813, the server (691) can generate a first MAC based on a security key (K), a received SIP message, a network address (e.g., the IP address of the server (691)), and a port number (e.g., the number of the port used to transmit packets to the electronic device (601)).

[0141] For example, the security key (K) may be 12345678, the network address of the server (691) may be IP address #1, and the port number used by the server (691) to transmit packets to the electronic device (601) may be port #1. The server (691) may generate a first MAC by applying the HMAC algorithm to the security key (K) (e.g., 12345678), the network address (e.g., IP address #1), the port number (e.g., port #1), and the received SIP message. The generated first MAC may be, for example, XYZABC, but is not limited thereto.

[0142] The server (691) can add the generated first MAC to the SIP header of the received SIP message (e.g., the call-ID field of the SIP header).

[0143] In operation 815, the server (691) may transmit a SIP message containing a first MAC (e.g., an invite message containing a first MAC). The source IP address field of the IP header of the SIP message transmitted by the server (691) may contain IP address #1, and the source port number field of the TCP header of the transmitted SIP message may contain port #1.

[0144] In operation 817, the fake server (791) can hijack the SIP message transmitted by the server (691).

[0145] In operation 819, the fake server (791) can change the hijacked SIP message and manipulate the network address and port number.

[0146] For example, the fake server (791) can change some information within the hijacked SIP message. Additionally, the fake server (791) can perform spoofing to manipulate network addresses and port numbers. The fake server (791) can manipulate the source IP address field of the IP header of the SIP message to be transmitted to the electronic device (601) from the IP address of the fake server (791) to the IP address of the server (691) (e.g., IP address #1), and can manipulate the source port number field of the TCP header of the SIP message to be transmitted to the electronic device (601) from the port number of the fake server (791) to the port number of the server (691) (e.g., port #1). The fake server (791) can manipulate network addresses and port numbers so that the electronic device (601) can recognize that the SIP message containing the first MAC was transmitted from the server (691).

[0147] In operation 821, the fake server (791) can transmit the modified SIP message to the electronic device (601).

[0148] The electronic device (601) can receive SIP messages transmitted by the fake server (791).

[0149] In operation 823, the electronic device (601) can extract a first MAC from a received SIP message. For example, the electronic device (601) can extract a first MAC (e.g., XYZABC) from the call-ID field of the SIP header of the received SIP message.

[0150] In operation 825, the electronic device (601) can obtain the network address and port number to which the SIP message was transmitted. For example, the electronic device (601) can obtain IP address #1 manipulated by the fake server (791) from the source IP address field of the IP header of the received SIP message, and can obtain port #1 manipulated by the fake server (791) from the source port number field of the TCP header of the received SIP message.

[0151] FIG. 7 is illustrated as the electronic device (601) performing operation 825 after performing operation 823, but this is merely an example and the electronic device (601) may perform operation 823 after performing operation 825. Alternatively, the electronic device (601) may perform operation 823 and operation 825 in parallel.

[0152] In operation 827, the electronic device (601) can generate a second MAC based on a security key (K), a SIP message (e.g., a SIP message received from a fake server (791)), a obtained network address, and a obtained port number.

[0153] For example, the electronic device (601) may share a security key (K) (e.g., 12345678) with the server (691). The acquired network address may be IP address #1, and the acquired port number may be port #1. The electronic device (601) may generate a second MAC by applying the HMAC algorithm to the security key (K) (e.g., 12345678), the acquired network address (e.g., IP address #1), the acquired port number (e.g., port #1), and a SIP message (e.g., a SIP message from which the first MAC was extracted). The generated second MAC may be, for example, 456CDF.

[0154] If the electronic device (601) has generated a second MAC, in operation 829, it may perform verification of the received SIP message by comparing the extracted first MAC and the generated second MAC. The electronic device (601) may verify the integrity of the received SIP message by determining whether the extracted first MAC and the generated second MAC are identical. In the example illustrated in FIG. 8, the extracted first MAC (e.g., XYZABC) and the generated second MAC (e.g., 456CDF) may be different from each other. Because the fake server (791) has altered some information of the SIP message, the SIP message used to generate the second MAC may be different from the SIP message used to generate the first MAC. As a result, the generated second MAC may be different from the extracted first MAC. In this case, the electronic device (601) may determine that the received SIP message is invalid (or that the integrity of the received SIP message is compromised). The electronic device (601) may determine that the received SIP message was transmitted by an unauthorized device (or untrusted device) (e.g., a fake server (791)) if the extracted first MAC and the generated second MAC are different from each other. The electronic device (601) may fail to verify the received SIP message and may drop the received SIP message (or packet).

[0155] FIG. 9 is a flowchart illustrating an example in which an electronic device according to one embodiment fails to verify a received SIP message.

[0156] Referring to FIG. 9, in operation 911, the fake server (791) can illegally obtain the MAC generation method of the server (691). The fake server (791) can illegally obtain the network address and port number of the server (691).

[0157] In operation 913, the fake server (791) can generate a first MAC based on a randomly generated security key, a randomly generated SIP message, a network address (e.g., the IP address of the server (691)), and a port number (e.g., the port number of the server (691)).

[0158] For example, the fake server (791) may have a randomly generated security key (e.g., 9876). The fake server (791) may randomly generate a SIP message (e.g., an invite message). The network address and port number of the server (691) obtained by the fake server (791) may be IP address #1 and port #1, respectively. The fake server (791) may generate a first MAC by applying the HMAC algorithm to the security key (e.g., 9876), network address (e.g., IP address #1), port number (e.g., port #1), and the randomly generated SIP message. In the example illustrated in FIG. 9, the generated first MAC may be, for example, ZYX456.

[0159] The fake server (791) can add the generated first MAC to the SIP header of the generated SIP message (e.g., the call-ID field of the SIP header). The fake server (791) can manipulate the IP address and port number, respectively, to the IP address and port number of the server (691) and the port number of the server (691) so that the electronic device (601) can recognize that the SIP message containing the first MAC was transmitted from the server (691).

[0160] In operation 915, the fake server (791) can transmit a SIP message containing a first MAC to the electronic device (601). The source IP address field of the IP header and the source port number field of the TCP header of the SIP message transmitted by the fake server (791) may each include IP address #1 and port #1, respectively.

[0161] The electronic device (601) can receive SIP messages transmitted by the fake server (791).

[0162] In operation 917, the electronic device (601) can extract a first MAC from a received SIP message. For example, the electronic device (601) can extract a first MAC (e.g., ZYX456) from the call-ID field of the SIP header of the received SIP message.

[0163] In operation 919, the electronic device (601) can obtain the network address and port number to which the SIP message was transmitted. For example, the electronic device (601) can obtain IP address #1 from the source IP address field of the IP header of the received SIP message and obtain port #1 from the source port number field of the TCP header of the received SIP message.

[0164] FIG. 9 is illustrated as the electronic device (601) performing operation 919 after performing operation 917, but this is merely an example and the electronic device (601) may perform operation 917 after performing operation 919. Alternatively, the electronic device (601) may perform operation 917 and operation 919 in parallel.

[0165] In operation 921, the electronic device (601) can generate a second MAC based on a security key (K), a SIP message (e.g., a SIP message received from a fake server (791)), a obtained network address, and a obtained port number.

[0166] For example, the electronic device (601) may share a security key (K) (e.g., 12345678) with the server (691). The acquired network address may be IP address #1, and the acquired port number may be port #1. The electronic device (601) may generate a second MAC by applying the HMAC algorithm to the security key (K) (e.g., 12345678), the acquired network address (e.g., IP address #1), the acquired port number (e.g., port #1), and a SIP message (e.g., a SIP message from which the first MAC was extracted). The generated second MAC may be, for example, NWM765.

[0167] If the electronic device (601) has generated a second MAC, in operation 923, it can perform verification of the received SIP message by comparing the extracted first MAC with the generated second MAC. The electronic device (601) can verify the integrity of the received SIP message by determining whether the extracted first MAC and the generated second MAC are identical. In the example illustrated in FIG. 9, the extracted first MAC (e.g., ZYX456) and the generated second MAC (e.g., NWM765) may be different from each other. The security key used by the fake server (791) to generate the first MAC may be different from the security key used by the electronic device (601) to generate the second MAC, so the generated second MAC may be different from the extracted first MAC. In this case, the electronic device (601) may determine that the received SIP message is invalid (or that the integrity of the received SIP message is compromised). The electronic device (601) may determine that the received SIP message was transmitted by an unauthorized device (or untrusted device) (e.g., a fake server (791)) if the extracted first MAC and the generated second MAC are different from each other. The electronic device (601) may fail to verify the received SIP message and may drop the received SIP message (or packet).

[0168] FIG. 10 is a block diagram illustrating an example of the configuration of an electronic device according to one embodiment.

[0169] Referring to FIG. 10, an electronic device (1001) according to one embodiment (e.g., electronic device (101) of FIG. 1 and 2, electronic device (401) of FIG. 4, electronic device (501) of FIG. 5, electronic device (601) of FIG. 6 to 9) may include a memory (1010) (e.g., memory (130) of FIG. 1) and at least one processor (1020) (e.g., processor (120) of FIG. 1, processor (210) of FIG. 2).

[0170] The memory (1010) can store instructions that can be executed by the processor (1020).

[0171] According to one embodiment, the processor (1020) may transmit a message regarding a registration request of the electronic device (1001) (e.g., the registration message of operation 411 of FIG. 4 or the registration message of operation 511 of FIG. 5) to a server (e.g., an IMS server) (e.g., the server (491) of FIG. 4, the server (591) of FIG. 5, or the server (691) of FIG. 6).

[0172] According to one embodiment, the processor (1020) may receive a response message to a message regarding a registration request of the electronic device (1001) from the server (e.g., the response message of operation 413 of FIG. 4 or the response message of operation 513 of FIG. 5).

[0173] According to one embodiment, the processor (1020) can determine whether the server supports an encryption protocol through a received response message. The encryption protocol may include, for example, IPsec, but is not limited thereto.

[0174] According to one embodiment, the processor (1020) can share a security key (K) with the server. The method of sharing the security key (K) (e.g., the first sharing method described through FIG. 4 or the second sharing method described through FIG. 5) may vary depending on whether the server supports an encryption protocol.

[0175] According to one embodiment, the processor (1020) can encrypt a message (e.g., the registration message of operation 415 of FIG. 4) containing the security key (K) of an electronic device based on the encryption protocol if the server supports the encryption protocol. The processor (1020) can transmit the encrypted message to the server. The processor (1020) can share the security key (K) with the server by transmitting the security key (K) to the server through an encrypted channel.

[0176] According to one embodiment, if the server does not support an encryption protocol, the processor (1020) can generate a security key (K) identical to the server's security key (or security key generated by the server) based on a key received from the server (e.g., a second key (B)), a first value (a) randomly generated by the electronic device (1001), and a first parameter value (p).

[0177] For example, if the server does not support an encryption protocol, the processor (1020) can generate a first key (A) based on a randomly generated first value (a) and set parameter values ​​(e.g., a first parameter value (p) and a second parameter value (g)). The processor (1020) can send a message (e.g., the registration message of operation 517 of FIG. 5) containing the generated first key (A) and the set parameter values ​​to the server. The server can generate a second key (B) based on a randomly generated second value (b) and set parameter values ​​(e.g., a first parameter value (p) and a second parameter value (g)). The server can generate a security key (K) based on one of the set parameter values ​​(e.g., a first parameter value (p)), the second value (b), and the first key (A). The processor (1020) can receive a message containing the second key (B) from the server. The processor (1020) can generate a security key (K) based on one of the set parameter values ​​(e.g., a first parameter value (p)), a first value (a), and a second key (B). According to the mathematical properties described in FIG. 5, the security key (K) generated by the electronic device (1001) and the security key (K) generated by the server may be the same.

[0178] According to one embodiment, the processor (1020) may receive a SIP message containing a first MAC (e.g., the SIP message of operation 615 of FIG. 6, the SIP message of operation 719 of FIG. 7, the SIP message of operation 821 of FIG. 8, or the SIP message of operation 915 of FIG. 9) from an external device. The external device may correspond, for example, to the server (691) of FIG. 6 or the fake server (791) of FIG. 7 through 9.

[0179] According to one embodiment, the processor (1020) can extract a first MAC from a received SIP message.

[0180] According to one embodiment, the processor (1020) can obtain the network address and port number to which the SIP message was transmitted.

[0181] According to one embodiment, the processor (1020) can generate a second MAC using a security key (K) (e.g., a security key shared with a server), an acquired network address, an acquired port number, and a received SIP message.

[0182] According to one embodiment, the processor (1020) can perform verification of a received SIP message by comparing an extracted first MAC and a generated second MAC. If the extracted first MAC and the generated second MAC are identical, the processor (1020) can determine that the integrity of the received SIP message is not compromised. If the extracted first MAC and the generated second MAC are different, the processor (1020) can determine that the integrity of the received SIP message is compromised.

[0183] According to one embodiment, the network address and port number to which the SIP message was transmitted (e.g., the acquired network address and acquired port number) may be different from the network address and port number used to generate the first MAC. For example, as described in the example illustrated in FIG. 7, a fake server (e.g., the fake server (791) of FIG. 7) may hijack a SIP message transmitted by a server (e.g., the server (691) of FIG. 7) and transmit the hijacked SIP message to an electronic device (1001). The acquired network address and the acquired port number may be the network address and port number of the fake server (791), and the network address and port number used to generate the first MAC may be the network address and port number of the server (691). The acquired network address and the acquired port number may be different from the network address and port number used to generate the first MAC. As a result, the extracted first MAC and the generated second MAC may be different from each other. The processor (1020) may determine that the integrity of the received SIP message is compromised because the extracted first MAC and the generated second MAC may be different from each other. The processor (1020) may determine that the received SIP message was transmitted by an untrusted device or is invalid.

[0184] According to one embodiment, the SIP message received by the processor (1020) may be different from the SIP message used to generate the first MAC. For example, as described in the example illustrated in FIG. 8, a fake server (e.g., the fake server (791) of FIG. 8) may hijack a SIP message transmitted by a server (e.g., the server (691) of FIG. 8). The fake server may modify the hijacked SIP message, manipulate the source IP address field of the IP header of the hijacked SIP message to the server's network address, and manipulate the source port number field of the TCP header of the hijacked SIP message to the server's port number. As a result, the acquired network address and the acquired port number, respectively, may be identical to the network address and port number used to generate the first MAC, respectively. Since the received SIP message may be different from the SIP message used to generate the first MAC, the extracted first MAC and the generated second MAC may be different from each other. The processor (1020) may determine that the integrity of the received SIP message is compromised because the extracted first MAC and the generated second MAC may be different from each other. The processor (1020) may determine that the received SIP message was transmitted by an untrusted device or is invalid.

[0185] According to one embodiment, the security key (K) of the electronic device (1001) may be different from the security key used to generate the first MAC. For example, as described in the example illustrated in FIG. 9, a fake server (e.g., the fake server (791) of FIG. 9) may generate the first MAC based on a randomly generated security key, the network address of the server (e.g., the server (691) of FIG. 9), the port number of the server, and a randomly generated SIP message, and may transmit the SIP message containing the first MAC to the electronic device (1001). The security key used to generate the first MAC is randomly generated by the fake server (791) and may be different from the security key (K) of the electronic device (1001). As a result, the extracted first MAC and the generated second MAC may be different from each other. The processor (1020) may determine that the integrity of the received SIP message is compromised because the extracted first MAC and the generated second MAC may be different from each other. The processor (1020) can determine that the received SIP message was transmitted by an untrusted device or is invalid.

[0186] According to one embodiment, the processor (1020) can determine whether a SIP message was transmitted from a trusted device (e.g., server (691)) or is valid based on the result of whether the extracted first MAC and the generated second MAC are identical to each other, in a situation where communication between the server and the electronic device (1001) is not encrypted by an encryption protocol.

[0187] According to one embodiment, if the processor (1020) determines that the received SIP message was transmitted from the server (or determines that the received SIP message is valid or that the integrity of the received SIP message is not compromised), it may transmit a response message for the received SIP message to the server. If the processor (1020) determines that the received SIP message was not transmitted from the server (or determines that the received SIP message is invalid or that the integrity of the received SIP message is compromised), it may drop the received SIP message.

[0188] Instructions stored in memory (1010) can cause the electronic device (1001) to perform multiple operations (e.g., operations of the processor (1020)) when executed by the processor (1020).

[0189] The embodiments described through FIGS. 1 to 9 can be applied to the electronic device (1001) of FIG. 10.

[0190] FIG. 11 is a flowchart illustrating an example of an operation method of an electronic device according to one embodiment.

[0191] The operation method of FIG. 11 can be performed by an electronic device (e.g., the electronic device (101) of FIG. 1 and 2, the electronic device (401) of FIG. 4, the electronic device (501) of FIG. 5, the electronic device (601) of FIG. 6 to 9, the electronic device (1001) of FIG. 10).

[0192] Referring to FIG. 11, in operation 1110, the electronic device may send a message regarding the electronic device's registration request to a server (e.g., an IMS server) (e.g., the server (491) of FIG. 4, the server (591) of FIG. 5, or the server (691) of FIG. 6).

[0193] In operation 1120, the electronic device can receive a response message (e.g., a response message to a message for a registration request) from the server.

[0194] In operation 1130, the electronic device can determine whether the server supports an encryption protocol through the received response message.

[0195] In operation 1140, the electronic device may share a security key with the server based on a sharing method (e.g., the first sharing method described through FIG. 4 or the second sharing method described through FIG. 5) which depends on whether the server supports an encryption protocol.

[0196] In operation 1150, the electronic device can receive a SIP message containing a first MAC.

[0197] In operation 1160, the electronic device can extract a first MAC from a received SIP message.

[0198] In operation 1170, the electronic device can obtain the network address and port number to which the SIP message was transmitted.

[0199] In operation 1180, the electronic device can generate a second MAC using a security key, an acquired network address, an acquired port number, and a received SIP message.

[0200] In operation 1190, the electronic device can perform verification of the received SIP message by comparing the extracted first MAC and the generated second MAC.

[0201] The embodiments described through FIGS. 1 to 10 can be applied to the method of operation of the electronic device of FIG. 11.

[0202] According to one embodiment, the electronic device (101; 401; 501; 601; 1001) may include a memory (130; 1010) for storing instructions and at least one processor (120; 210; 1020) including a processing circuit. When the above instructions are executed by the at least one processor, the electronic device may perform the following operations: sending a message regarding a registration request of the electronic device to a server; receiving a response message regarding the message from the server; determining whether the server supports an encryption protocol through the received response message; sharing a security key with the server (the method of sharing the security key (e.g., a first sharing method or a second sharing method) depends on whether the server supports the encryption protocol); receiving a SIP message including a first MAC; extracting the first MAC from the received SIP message; obtaining the network address and port number to which the SIP message was transmitted; generating a second MAC using the security key, the obtained network address, the obtained port number, and the received SIP message; and performing verification of the received SIP message by comparing the extracted first MAC with the generated second MAC.

[0203] The operation of performing the above verification may include an operation of determining that the integrity of the received SIP message is not compromised if the extracted first MAC and the generated second MAC are identical, or an operation of determining that the integrity of the received SIP message is compromised if the extracted first MAC and the generated second MAC are different.

[0204] The operation of performing the above verification may include determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different in the case where the network address and port number to which the SIP message was transmitted are different from the network address and port number used to generate the first MAC.

[0205] The operation of performing the above verification may include determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different in the case where the received SIP message is different from the SIP message used to generate the first MAC.

[0206] The operation of performing the above verification may include determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different in the case where the security key is different from the security key used to generate the first MAC.

[0207] The above-mentioned shared operation may include, when the server supports the encryption protocol, an operation of generating a message including the security key of the electronic device, an operation of encrypting the generated message based on the encryption protocol, and an operation of transmitting the encrypted message to the server.

[0208] The above-mentioned shared operation may include, when the server does not support the encryption protocol, an operation to generate a first key based on a randomly generated first value and set parameter values; an operation to transmit a message including the generated first key and the set parameter values ​​to the server; an operation to receive a message including a second key from the server (the second key is generated based on a randomly generated second value and the set parameter values); and an operation to generate a security key identical to the server's security key based on one of the set parameter values, the first value, and the second key. The server's security key may be generated based on one of the set parameter values, the second value, and the first key.

[0209] The operation of performing the above verification may include determining whether the SIP message was transmitted from the server or is valid based on the result of whether the extracted first MAC and the generated second MAC are identical in a situation where the communication between the server and the electronic device is not encrypted by the encryption protocol.

[0210] According to one embodiment, the electronic device (101; 401; 501; 601; 1001) may include a memory (130; 1010) for storing instructions and at least one processor (120; 210; 1020) including a processing circuit. When the above instructions are executed by the at least one processor, the electronic device may perform the following operations: transmitting a message regarding a registration request of the electronic device to a server; receiving a response message regarding the message from the server; determining whether the server supports an encryption protocol through the received response message; if it is determined that the server does not support the encryption protocol, generating a security key identical to the security key of the server based on a key received from the server, a first value randomly generated by the electronic device, and a first parameter value; receiving a SIP message including a first MAC; extracting the first MAC from the received SIP message; obtaining the network address and port number to which the SIP message was transmitted; generating a second MAC using the generated security key, the obtained network address, the obtained port number, and the received SIP message; and performing verification of the received SIP message by comparing the extracted first MAC with the generated second MAC.

[0211] The operation of performing the above verification may include an operation of determining that the integrity of the received SIP message is not compromised if the extracted first MAC and the generated second MAC are identical, or an operation of determining that the integrity of the received SIP message is compromised if the extracted first MAC and the generated second MAC are different.

[0212] The operation of performing the above verification may include determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different in the case where the network address and port number to which the SIP message was transmitted are different from the network address and port number used to generate the first MAC.

[0213] The operation of performing the above verification may include determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different in the case where the received SIP message is different from the SIP message used to generate the first MAC.

[0214] The operation of performing the above verification may include determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different in the case where the security key is different from the security key used to generate the first MAC.

[0215] When the above instructions are executed by the at least one processor, the electronic device may be made to: generate a first key of the electronic device based on the first value, the first parameter value, and the second parameter value when it is determined that the server does not support the encryption protocol; and transmit a message to the server including the generated first key, the first parameter value, and the second parameter value. The key received from the server may be generated based on a randomly generated second value, the first parameter value, and the second parameter value, and the security key of the server may be generated based on the first parameter value, the second value, and the first key.

[0216] According to one embodiment, the operation method of an electronic device (101; 401; 501; 601; 1001) may include the operation of transmitting a message regarding a registration request of the electronic device to a server, the operation of receiving a response message regarding the message from the server, the operation of determining whether the server supports an encryption protocol through the received response message, the operation of sharing a security key with the server (the method of sharing the security key depends on whether the server supports the encryption protocol), the operation of receiving a SIP message including a first MAC, the operation of extracting the first MAC from the received SIP message, the operation of obtaining a network address and port number to which the SIP message was transmitted, the operation of generating a second MAC using the security key, the obtained network address, the obtained port number, and the received SIP message, and the operation of performing verification of the received SIP message by comparing the extracted first MAC and the generated second MAC.

[0217] The operation of performing the above verification may include an operation of determining that the integrity of the received SIP message is not compromised if the extracted first MAC and the generated second MAC are identical, or an operation of determining that the integrity of the received SIP message is compromised if the extracted first MAC and the generated second MAC are different.

[0218] The operation of performing the above verification may include determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different in the case where the network address and port number to which the SIP message was transmitted are different from the network address and port number used to generate the first MAC.

[0219] The operation of performing the above verification may include determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different in the case where the received SIP message is different from the SIP message used to generate the first MAC.

[0220] The operation of performing the above verification may include determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different in the case where the security key is different from the security key used to generate the first MAC.

[0221] The above-mentioned shared operation may include, when the server does not support the encryption protocol, an operation to generate a first key based on a randomly generated first value and set parameter values; an operation to transmit a message including the generated first key and the set parameter values ​​to the server; an operation to receive a message including a second key from the server (the second key is generated based on a randomly generated second value and the set parameter values); and an operation to generate a security key identical to the security key held by the server based on one of the set parameter values, the first value, and the second key. The security key held by the server may be generated based on one of the set parameter values, the second value, and the first key.

Claims

1. In an electronic device (101; 401; 501; 601; 1001), Memory for storing instructions (130; 1010); and At least one processor (120; 210; 1020) including a processing circuit Includes, When the above instructions are executed by the above at least one processor, the electronic device: The operation of transmitting a message regarding a registration request for the above electronic device to a server, The operation of receiving a response message to the above message from the server, The operation of determining whether the server supports an encryption protocol through the received response message, The operation of sharing a security key with the above server - the method of sharing the security key depends on whether the above server supports the encryption protocol -, The operation of receiving a SIP (session initiation protocol) message containing a first message authentication code (MAC), The operation of extracting the first MAC from the received SIP message, The operation of obtaining the network address and port number to which the above SIP message was transmitted, The operation of generating a second MAC using the above security key, the above acquired network address, the above acquired port number, and the above received SIP message, and An operation to perform verification of the received SIP message by comparing the extracted first MAC and the generated second MAC. making, Electronic device.

2. In Paragraph 1, The operation of performing the above verification is, An operation to determine that the integrity of the received SIP message is not compromised when the extracted first MAC and the generated second MAC are identical to each other, or Operation of determining that the integrity of the received SIP message is compromised when the extracted first MAC and the generated second MAC are different from each other including, Electronic device.

3. In any one of paragraphs 1 to 2, The operation of performing the above verification is, In a case where the network address and port number to which the above SIP message was transmitted are different from the network address and port number used to generate the above first MAC, an operation of determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different from each other. including, Electronic device.

4. In any one of paragraphs 1 through 3, The operation of performing the above verification is, In the case where the received SIP message is different from the SIP message used to generate the first MAC, the operation of determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different from each other. including, Electronic device.

5. In any one of paragraphs 1 through 4, The operation of performing the above verification is, In the case where the above security key is different from the security key used to generate the above first MAC, the operation of determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different from each other. including, Electronic device.

6. In any one of paragraphs 1 through 5, The above-mentioned shared operation is, If the above server supports the above encryption protocol, the operation of generating a message including the security key of the above electronic device, An operation to encrypt the generated message based on the above encryption protocol, and The operation of transmitting the above encrypted message to the server including, Electronic device.

7. In any one of paragraphs 1 through 6, The above-mentioned shared operation is, If the above server does not support the above encryption protocol, the operation of generating a first key based on a randomly generated first value and set parameter values, The operation of transmitting a message to the server including the first key generated above and the parameter values ​​set above, The operation of receiving a message containing a second key from the above server - the second key is generated based on a randomly generated second value and the set parameter values ​​-, and An operation to generate the security key identical to the server's security key based on one of the above-set parameter values, the first value, and the second key. Includes, The security key of the above server is generated based on one of the set parameter values, the second value, and the first key, Electronic device.

8. In any one of paragraphs 1 through 7, The operation of performing the above verification is, An operation to determine whether the SIP message was transmitted from the server or is valid based on the result of whether the extracted first MAC and the generated second MAC are identical, in a situation where the communication between the server and the electronic device is not encrypted by the encryption protocol. including, Electronic device.

9. In an electronic device (101; 401; 501; 601; 1001), Memory for storing instructions (130; 1010); and At least one processor (120; 210; 1020) including a processing circuit Includes, When the above instructions are executed by the above at least one processor, the electronic device: The operation of transmitting a message regarding a registration request for the above electronic device to a server, The operation of receiving a response message to the above message from the server, The operation of determining whether the server supports an encryption protocol through the received response message, If it is determined that the server does not support the encryption protocol, the operation of generating a security key identical to the server's security key based on a key received from the server, a first value randomly generated by the electronic device, and a first parameter value. The operation of receiving a SIP message including a first MAC, The operation of extracting the first MAC from the received SIP message, The operation of obtaining the network address and port number to which the above SIP message was transmitted, The operation of generating a second MAC using the security key generated above, the acquired network address, the acquired port number, and the received SIP message, and An operation to perform verification of the received SIP message by comparing the extracted first MAC and the generated second MAC. making, Electronic device.

10. In Paragraph 9, The operation of performing the above verification is, An operation to determine that the integrity of the received SIP message is not compromised when the extracted first MAC and the generated second MAC are identical to each other, or Operation of determining that the integrity of the received SIP message is compromised when the extracted first MAC and the generated second MAC are different from each other including, Electronic device.

11. In any one of paragraphs 9 through 10, The operation of performing the above verification is, In a case where the network address and port number to which the above SIP message was transmitted are different from the network address and port number used to generate the above first MAC, an operation of determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different from each other. including, Electronic device.

12. In any one of paragraphs 9 through 11, The operation of performing the above verification is, In the case where the received SIP message is different from the SIP message used to generate the first MAC, the operation of determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different from each other. including, Electronic device.

13. In any one of paragraphs 9 through 12, The operation of performing the above verification is, In the case where the above security key is different from the security key used to generate the above first MAC, the operation of determining that the integrity of the received SIP message is compromised by determining that the extracted first MAC and the generated second MAC are different from each other. including, Electronic device.

14. In any one of paragraphs 9 through 13, When the above instructions are executed by the above at least one processor, the electronic device: If the above server determines that it does not support the encryption protocol, the operation of generating a first key of the electronic device based on the first value, the first parameter value, and the second parameter value, and The operation of transmitting a message to the server including the first key generated above, the first parameter value, and the second parameter value. Making it happen, The key received from the server is generated based on a randomly generated second value, the first parameter value, and the second parameter value, and the security key of the server is generated based on the first parameter value, the second value, and the first key. Electronic device.

15. A method of operating an electronic device (101; 401; 501; 601; 1001), The operation of transmitting a message regarding a registration request for the above electronic device to a server; The operation of receiving a response message to the above message from the server; An operation to determine whether the server supports an encryption protocol through the received response message; The operation of sharing a security key with the above server - the method of sharing the above security key depends on whether the above server supports the encryption protocol -; The operation of receiving a SIP message including a first MAC; The operation of extracting the first MAC from the received SIP message; The operation of obtaining the network address and port number to which the above SIP message was transmitted; The operation of generating a second MAC using the above security key, the above acquired network address, the above acquired port number, and the above received SIP message; and An operation to perform verification of the received SIP message by comparing the extracted first MAC and the generated second MAC. including, Method of operation of an electronic device.