KR102657534B1 - Electronic device and method for veryfying integrity of application - Google Patents

Electronic device and method for veryfying integrity of application Download PDF

Info

Publication number
KR102657534B1
KR102657534B1 KR1020190014428A KR20190014428A KR102657534B1 KR 102657534 B1 KR102657534 B1 KR 102657534B1 KR 1020190014428 A KR1020190014428 A KR 1020190014428A KR 20190014428 A KR20190014428 A KR 20190014428A KR 102657534 B1 KR102657534 B1 KR 102657534B1
Authority
KR
South Korea
Prior art keywords
signature
application
file
electronic device
integrity
Prior art date
Application number
KR1020190014428A
Other languages
Korean (ko)
Other versions
KR20200097100A (en
Inventor
김동욱
홍석
김귀주
김수린
김형식
배준휘
최주섭
Original Assignee
삼성전자주식회사
성균관대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사, 성균관대학교산학협력단 filed Critical 삼성전자주식회사
Priority to KR1020190014428A priority Critical patent/KR102657534B1/en
Publication of KR20200097100A publication Critical patent/KR20200097100A/en
Application granted granted Critical
Publication of KR102657534B1 publication Critical patent/KR102657534B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/56Computer malware detection or handling, e.g. anti-virus arrangements
    • G06F21/562Static detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Virology (AREA)
  • Telephone Function (AREA)

Abstract

다양한 실시예에 따른 전자 장치는, 통신 모듈; 및 프로세서를 포함하고, 상기 프로세서는, 어플리케이션 패키지, 및 상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처를 포함하는 시그니처 데이터베이스를 포함하는 어플리케이션의 설치 파일을 상기 통신 모듈을 통하여 수신하고 - 상기 제1 시그니처는, 상기 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역에 기초하여 확인됨-, 상기 시그니처 데이터베이스로부터 상기 제1 시그니처를 확인하고, 상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역에 기초한 제2 시그니처를 확인하고, 상기 제2 시그니처가 상기 제1 시그니처와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하도록 설정될 수 있다. 그 밖의 다양한 실시예가 가능하다. An electronic device according to various embodiments includes a communication module; and a processor, wherein the processor receives, through the communication module, an installation file of an application including an application package and a signature database including a first signature corresponding to at least a portion of the application package - the first The signature is confirmed based on a first verification target code region confirmed based on the DEX file corresponding to the application package, confirming the first signature from the signature database, and responding to an execution command of the application, Configure to check the second signature based on the second verification target code area confirmed based on the ODEX file of the application, and check the integrity of the application based on whether the second signature is the same as the first signature. It can be. Various other embodiments are possible.

Description

어플리케이션의 무결성을 검증하는 전자 장치 및 어플리케이션의 무결성을 검증하기 위한 방법{ELECTRONIC DEVICE AND METHOD FOR VERYFYING INTEGRITY OF APPLICATION}Electronic device for verifying the integrity of an application and a method for verifying the integrity of the application {ELECTRONIC DEVICE AND METHOD FOR VERYFYING INTEGRITY OF APPLICATION}

다양한 실시예는 어플리케이션의 무결성을 검증하는 전자 장치 및 어플리케이션의 무결성을 검증하기 위한 방법에 관한 것으로, 더욱 상세하게는 최적화된 DEX에 대한 무결성을 검증하는 전자 장치 및 최적화된 DEX의 무결성을 검증하기 위한 방법에 관한 것이다.Various embodiments relate to an electronic device for verifying the integrity of an application and a method for verifying the integrity of an application. More specifically, an electronic device for verifying the integrity of an optimized DEX and a method for verifying the integrity of an optimized DEX. It's about method.

스마트폰의 보급과 함께 어플리케이션 시장이 지속적으로 성장하고 있다. 모바일 생태계 내에서 유통되는 어플리케이션의 수가 증가함에 따라, 어플리케이션의 개발 및 배포에 관한 다양한 논의가 이루어지고 있다. 특히, 개방형 모바일 플랫폼의 사용이 지배적인 상황에서 어플리케이션의 보안 및 안정성을 확보하기 위한 여러 가지 방법이 알려져 있다. 예를 들어, 어플리케이션 패키지 파일 내에 포함되는 DEX 파일의 무결성을 검증하기 위한 다양한 방법이 알려져 있다.With the spread of smartphones, the application market continues to grow. As the number of applications distributed within the mobile ecosystem increases, various discussions are taking place regarding the development and distribution of applications. In particular, in situations where the use of open mobile platforms is dominant, several methods are known to ensure the security and stability of applications. For example, various methods are known for verifying the integrity of a DEX file included in an application package file.

어플리케이션의 무결성을 검증하는 기존의 전자 장치 및 방법에서, 어플리케이션의 실행 명령이 확인되는 경우 전자 장치는 어플리케이션의 DEX 파일을 실시간으로 변환함으로써 ODEX 파일을 생성하고, 어플리케이션의 DEX 파일로부터 변환된 ODEX 파일을 캐시 ODEX 파일과 비교한다. 이 경우, 어플리케이션 실행 명령이 확인될 때마다 어플리케이션의 DEX 파일이 실시간으로 변환됨으로써 ODEX 파일이 생성되었기 때문에 오버헤드가 크다. 또한, 전자 장치에서 변환된 ODEX 파일에 의하여 저장 공간을 많이 차지한다. 또한, 어플리케이션의 무결성을 검증하는 기존의 전자 장치 및 방법에서는 ODEX 파일만을 대비하기 때문에 최적화된 DEX가 ODEX 파일이 아니라 VDEX 파일에 포함되는 경우, 무결성을 잘못 판단할 가능성이 있다.In existing electronic devices and methods for verifying the integrity of an application, when the execution command of the application is confirmed, the electronic device generates an ODEX file by converting the DEX file of the application in real time, and generates an ODEX file converted from the DEX file of the application. Compare with cache ODEX file. In this case, the overhead is large because the ODEX file is created by converting the DEX file of the application in real time every time the application execution command is confirmed. Additionally, ODEX files converted from electronic devices take up a lot of storage space. Additionally, since existing electronic devices and methods for verifying the integrity of an application only compare ODEX files, there is a possibility of incorrectly determining the integrity if the optimized DEX is included in the VDEX file rather than the ODEX file.

다양한 실시예에 따른 전자 장치 및 전자 장치에서 수행되는 방법에 따르면, 어플리케이션의 DEX 파일에 기초하여 확인되는 시그니처가 어플리케이션의 설치 파일에 포함될 수 있다. 다양한 실시예에 따라서, 시그니처는 캐시 파일의 적어도 일부에 기초하여 생성된 해시일 수 있다. 다양한 실시예에 따라서, ODEX 파일로부터 최적화된 DEX를 확인할 수 없는 경우, VDEX 파일에 기초하여 시그니처를 확인할 수 있다.According to an electronic device and a method performed on the electronic device according to various embodiments, a signature verified based on the DEX file of the application may be included in the installation file of the application. According to various embodiments, the signature may be a hash generated based on at least a portion of the cache file. According to various embodiments, if the optimized DEX cannot be confirmed from the ODEX file, the signature can be confirmed based on the VDEX file.

다양한 실시예에 따라서, 전자 장치는, 통신 모듈; 및 프로세서를 포함하고, 상기 프로세서는, 어플리케이션 패키지, 및 상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처를 포함하는 시그니처 데이터베이스를 포함하는 어플리케이션의 설치 파일을 상기 통신 모듈을 통하여 수신하고 - 상기 제1 시그니처는, 상기 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역에 기초하여 확인됨-, 상기 시그니처 데이터베이스로부터 상기 제1 시그니처를 확인하고, 상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역에 기초한 제2 시그니처를 확인하고, 상기 제2 시그니처가 상기 제1 시그니처와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하도록 설정될 수 있다.According to various embodiments, an electronic device includes a communication module; and a processor, wherein the processor receives, through the communication module, an installation file of an application including an application package and a signature database including a first signature corresponding to at least a portion of the application package - the first The signature is confirmed based on a first verification target code region confirmed based on the DEX file corresponding to the application package, confirming the first signature from the signature database, and responding to an execution command of the application, Configure to check the second signature based on the second verification target code area confirmed based on the ODEX file of the application, and check the integrity of the application based on whether the second signature is the same as the first signature. It can be.

다양한 실시예에 따라서, 전자 장치는, 통신 모듈; 및 프로세서를 포함하고, 상기 프로세서는: 어플리케이션 패키지를 포함하는 어플리케이션의 설치 파일을 상기 통신 모듈을 통하여 수신하고, 상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처를 포함하는 시그니처 데이터베이스로부터, 상기 통신 모듈을 통하여 상기 제1 시그니처를 수신하고 - 상기 제1 시그니처는, 상기 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역에 기초하여 확인됨-, 상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역에 기초한 제2 시그니처를 확인하고; 상기 제2 시그니처가 상기 제1 시그니처와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하도록 설정될 수 있다.According to various embodiments, an electronic device includes a communication module; and a processor, wherein the processor: receives, through the communication module, an installation file of an application including an application package, from a signature database including a first signature corresponding to at least a portion of the application package, the communication module. Receive the first signature through - the first signature is confirmed based on a first verification target code region confirmed based on the DEX file corresponding to the application package - in response to an execution command of the application , confirming a second signature based on a second verification target code region confirmed based on the ODEX file of the application; It can be set to check the integrity of the application based on whether the second signature is the same as the first signature.

다양한 실시예에 따라서, 어플리케이션의 무결성 검증 방법은: 어플리케이션 패키지, 및 상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처를 포함하는 시그니처 데이터베이스를 포함하는 상기 어플리케이션의 설치 파일을 수신하는 동작 - 상기 제1 시그니처는, 상기 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역에 기초하여 확인됨-; 상기 시그니처 데이터베이스로부터 상기 제1 시그니처를 확인하는 동작; 상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역에 기초한 제2 시그니처를 확인하는 동작; 상기 제2 시그니처가 상기 제1 시그니처와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하는 동작을 포함할 수 있다.According to various embodiments, a method for verifying the integrity of an application includes: receiving an installation file of the application including an application package and a signature database including a first signature corresponding to at least a portion of the application package - the first The signature is confirmed based on a first code region to be verified, which is confirmed based on the DEX file corresponding to the application package; Verifying the first signature from the signature database; In response to an execution command of the application, verifying a second signature based on a second code region to be verified that is verified based on an ODEX file of the application; It may include an operation of checking the integrity of the application based on whether the second signature is the same as the first signature.

다양한 실시예에 따라서, 어플리케이션의 무결성 검증 방법은: 어플리케이션 패키지를 포함하는 상기 어플리케이션의 설치 파일을 수신하는 동작; 상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처를 포함하는 시그니처 데이터베이스로부터 상기 제1 시그니처를 수신하는 동작 - 상기 제1 시그니처는, 상기 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역에 기초하여 확인됨-; 상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역에 기초한 제2 시그니처를 확인하는 동작; 상기 제2 시그니처가 상기 제1 시그니처와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하는 동작을 포함할 수 있다.According to various embodiments, a method for verifying the integrity of an application includes: receiving an installation file of the application including an application package; An operation of receiving the first signature from a signature database including a first signature corresponding to at least some of the application packages, wherein the first signature is a first verification target confirmed based on a DEX file corresponding to the application package. Identified based on code area -; In response to an execution command of the application, verifying a second signature based on a second code region to be verified that is verified based on an ODEX file of the application; It may include an operation of checking the integrity of the application based on whether the second signature is the same as the first signature.

다양한 실시예에 따라서, 다양한 실시예에 따른 전자 장치 및 어플리케이션의 무결성 검증 방법이 제공된다. 이에 따라, 어플리케이션의 DEX 파일에 기초하여 확인되는 시그니처가 어플리케이션의 설치 파일에 포함될 수 있다. 따라서, 어플리케이션 실행 명령이 확인될 때마다 검증을 위하여 어플리케이션의 DEX 파일에 기초하여 시그니처를 변환 또는 생성하지 않아도 되므로, 검증을 위한 오버헤드를 감소시킬 수 있다.According to various embodiments, a method for verifying the integrity of an electronic device and an application according to various embodiments is provided. Accordingly, the signature verified based on the DEX file of the application may be included in the installation file of the application. Therefore, since there is no need to convert or generate a signature based on the DEX file of the application for verification every time an application execution command is confirmed, the overhead for verification can be reduced.

또한, 다양한 실시예에 따라서, 시그니처는 최적화된 DEX 파일의 적어도 일부에 기초하여 생성된 해시일 수 있다. 따라서, 검증을 위하여 필요한 저장 공간을 감소시킬 수 있다.Additionally, according to various embodiments, the signature may be a hash generated based on at least a portion of the optimized DEX file. Therefore, the storage space required for verification can be reduced.

또한, 다양한 실시예에 따라서, 전자 장치는 ODEX 파일로부터 최적화된 DEX를 확인할 수 없는 경우, VDEX 파일에 기초하여 시그니처를 확인할 수 있다. 따라서, 최적화된 DEX가 ODEX 파일이 아니라 VDEX 파일에 포함되는 경우라고 하더라도 무결성을 올바르게 판단할 수 있으므로 변조 오탐율을 낮출 수 있다.Additionally, according to various embodiments, when the electronic device cannot confirm the optimized DEX from the ODEX file, it can confirm the signature based on the VDEX file. Therefore, even if the optimized DEX is included in a VDEX file rather than an ODEX file, the integrity can be correctly determined and the false positive rate of tampering can be reduced.

도 1은 다양한 실시예에 따른 네트워크 환경 내의 전자 장치의 블록도를 도시한다.
도 2는 다양한 실시예에 따른 프로그램을 예시하는 블록도를 도시한다.
도 3a는 다양한 실시예에 따른 SW 모듈을 도시한다.
도 3b는 다양한 실시예에 따른 SW 모듈을 도시한다.
도 4a는 다양한 실시예에 따른 제1 시그니처 생성 과정을 설명하기 위한 도면을 도시한다.
도 4b는 다양한 실시예에 따른 어플리케이션 무결성 확인 과정을 설명하기 위한 도면을 도시한다.
도 5는 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 도면을 도시한다.
도 6은 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 흐름도를 도시한다.
도 7은 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 흐름도를 도시한다.
도 8은 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 흐름도를 도시한다.
도 9a는 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 흐름도를 도시한다.
도 9b는 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 흐름도를 도시한다.
도 10은 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 흐름도를 도시한다.
1 shows a block diagram of an electronic device in a network environment according to various embodiments.
Figure 2 shows a block diagram illustrating a program according to various embodiments.
3A shows a SW module according to various embodiments.
3B shows a SW module according to various embodiments.
FIG. 4A illustrates a diagram for explaining a first signature generation process according to various embodiments.
FIG. 4B illustrates a diagram illustrating an application integrity verification process according to various embodiments.
FIG. 5 illustrates a diagram for explaining the operation of an electronic device according to various embodiments.
Figure 6 shows a flowchart for explaining the operation of an electronic device according to various embodiments.
Figure 7 shows a flowchart for explaining the operation of an electronic device according to various embodiments.
Figure 8 shows a flowchart for explaining the operation of an electronic device according to various embodiments.
FIG. 9A shows a flowchart for explaining the operation of an electronic device according to various embodiments.
FIG. 9B shows a flowchart for explaining the operation of an electronic device according to various embodiments.
Figure 10 shows a flowchart for explaining the operation of an electronic device according to various embodiments.

도 1은, 다양한 실시예들에 따른, 네트워크 환경(100) 내의 전자 장치(101)의 블럭도이다. 도 1을 참조하면, 네트워크 환경(100)에서 전자 장치(101)는 제 1 네트워크(198)(예: 근거리 무선 통신 네트워크)를 통하여 전자 장치(102)와 통신하거나, 또는 제 2 네트워크(199)(예: 원거리 무선 통신 네트워크)를 통하여 전자 장치(104) 또는 서버(108)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(101)는 서버(108)를 통하여 전자 장치(104)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(101)는 프로세서(120), 메모리(130), 입력 장치(150), 음향 출력 장치(155), 표시 장치(160), 오디오 모듈(170), 센서 모듈(176), 인터페이스(177), 햅틱 모듈(179), 카메라 모듈(180), 전력 관리 모듈(188), 배터리(189), 통신 모듈(190), 가입자 식별 모듈(196), 또는 안테나 모듈(197)을 포함할 수 있다. 어떤 실시예에서는, 전자 장치(101)에는, 이 구성요소들 중 적어도 하나(예: 표시 장치(160) 또는 카메라 모듈(180))가 생략되거나, 하나 이상의 다른 구성 요소가 추가될 수 있다. 어떤 실시예에서는, 이 구성요소들 중 일부들은 하나의 통합된 회로로 구현될 수 있다. 예를 들면, 센서 모듈(176)(예: 지문 센서, 홍채 센서, 또는 조도 센서)은 표시 장치(160)(예: 디스플레이)에 임베디드된 채 구현될 수 있다1 is a block diagram of an electronic device 101 in a network environment 100, according to various embodiments. Referring to FIG. 1, in the network environment 100, the electronic device 101 communicates with the electronic device 102 through a first network 198 (e.g., a short-range wireless communication network) or a second network 199. It is possible to communicate with the electronic device 104 or the server 108 through (e.g., a long-distance 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 includes a processor 120, a memory 130, an input device 150, an audio output device 155, a display device 160, an audio module 170, and a sensor module ( 176), interface 177, haptic module 179, camera module 180, power management module 188, battery 189, communication module 190, subscriber identification module 196, or antenna module 197 ) may include. In some embodiments, at least one of these components (eg, the display device 160 or the camera module 180) may be omitted, or one or more other components may be added to the electronic device 101. In some embodiments, some of these components may be implemented as a single integrated circuit. For example, the sensor module 176 (e.g., a fingerprint sensor, an iris sensor, or an illumination sensor) may be implemented while being embedded in the display device 160 (e.g., a display).

프로세서(120)는, 예를 들면, 소프트웨어(예: 프로그램(140))를 실행하여 프로세서(120)에 연결된 전자 장치(101)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)을 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일실시예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(120)는 다른 구성요소(예: 센서 모듈(176) 또는 통신 모듈(190))로부터 수신된 명령 또는 데이터를 휘발성 메모리(132)에 로드하고, 휘발성 메모리(132)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리(134)에 저장할 수 있다. 일실시예에 따르면, 프로세서(120)는 메인 프로세서(121)(예: 중앙 처리 장치 또는 어플리케이션 프로세서), 및 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(123)(예: 그래픽 처리 장치, 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 추가적으로 또는 대체적으로, 보조 프로세서(123)은 메인 프로세서(121)보다 저전력을 사용하거나, 또는 지정된 기능에 특화되도록 설정될 수 있다. 보조 프로세서(123)는 메인 프로세서(121)와 별개로, 또는 그 일부로서 구현될 수 있다.The processor 120, for example, executes software (e.g., program 140) to configure at least one other component (e.g., hardware or software component) of the electronic device 101 connected to the processor 120. It can be controlled and various data processing or calculations can be performed. According to one embodiment, as at least part of data processing or computation, the processor 120 stores commands or data received from another component (e.g., sensor module 176 or communication module 190) in volatile memory 132. The commands or data stored in the volatile memory 132 can be processed, and the resulting data can be stored in the non-volatile memory 134. According to one embodiment, the processor 120 includes a main processor 121 (e.g., a central processing unit or an application processor), and an auxiliary processor 123 that can operate independently or together (e.g., a graphics processing unit, an image signal processor). , sensor hub processor, or communication processor). Additionally or alternatively, the auxiliary processor 123 may be set to use less power than the main processor 121 or to specialize in a designated function. The auxiliary processor 123 may be implemented separately from the main processor 121 or as part of it.

보조 프로세서(123)는, 예를 들면, 메인 프로세서(121)가 인액티브(예: 슬립) 상태에 있는 동안 메인 프로세서(121)를 대신하여, 또는 메인 프로세서(121)가 액티브(예: 어플리케이션 실행) 상태에 있는 동안 메인 프로세서(121)와 함께, 전자 장치(101)의 구성요소들 중 적어도 하나의 구성요소(예: 표시 장치(160), 센서 모듈(176), 또는 통신 모듈(190))와 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일실시예에 따르면, 보조 프로세서(123)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성 요소(예: 카메라 모듈(180) 또는 통신 모듈(190))의 일부로서 구현될 수 있다. The auxiliary processor 123 may, for example, act on behalf of the main processor 121 while the main processor 121 is in an inactive (e.g., sleep) state, or while the main processor 121 is in an active (e.g., application execution) state. ), along with the main processor 121, at least one of the components of the electronic device 101 (e.g., the display device 160, the sensor module 176, or the communication module 190) At least some of the functions or states related to can be controlled. According to one embodiment, coprocessor 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). there is.

메모리(130)는, 전자 장치(101)의 적어도 하나의 구성요소(예: 프로세서(120) 또는 센서모듈(176))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는, 예를 들어, 소프트웨어(예: 프로그램(140)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 메모리(130)는, 휘발성 메모리(132) 또는 비휘발성 메모리(134)를 포함할 수 있다. The memory 130 may store various data used by at least one component (eg, the processor 120 or the sensor module 176) of the electronic device 101. Data may include, for example, input data or output data for software (e.g., program 140) and instructions related thereto. Memory 130 may include volatile memory 132 or non-volatile memory 134.

프로그램(140)은 메모리(130)에 소프트웨어로서 저장될 수 있으며, 예를 들면, 운영 체제(142), 미들 웨어(144) 또는 어플리케이션(146)을 포함할 수 있다. The program 140 may be stored as software in the memory 130 and may include, for example, an operating system 142, middleware 144, or application 146.

입력 장치(150)는, 전자 장치(101)의 구성요소(예: 프로세서(120))에 사용될 명령 또는 데이터를 전자 장치(101)의 외부(예: 사용자)로부터 수신할 수 있다. 입력 장치(150)은, 예를 들면, 마이크, 마우스, 키보드, 또는 디지털 펜(예:스타일러스 펜)을 포함할 수 있다. The input device 150 may receive commands or data to be used in a component of the electronic device 101 (e.g., the processor 120) from outside the electronic device 101 (e.g., a user). The input device 150 may include, for example, a microphone, mouse, keyboard, or digital pen (eg, stylus pen).

음향 출력 장치(155)는 음향 신호를 전자 장치(101)의 외부로 출력할 수 있다. 음향 출력 장치(155)는, 예를 들면, 스피커 또는 리시버를 포함할 수 있다. 스피커는 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용될 수 있고, 리시버는 착신 전화를 수신하기 위해 사용될 수 있다. 일실시예에 따르면, 리시버는 스피커와 별개로, 또는 그 일부로서 구현될 수 있다.The sound output device 155 may output sound signals to the outside of the electronic device 101. The sound output device 155 may include, for example, a speaker or a receiver. The speaker can be used for general purposes such as multimedia playback or recording playback, and the receiver can be used to receive incoming calls. According to one embodiment, the receiver may be implemented separately from the speaker or as part of it.

표시 장치(160)는 전자 장치(101)의 외부(예: 사용자)로 정보를 시각적으로 제공할 수 있다. 표시 장치(160)은, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일실시예에 따르면, 표시 장치(160)는 터치를 감지하도록 설정된 터치 회로(touch circuitry), 또는 상기 터치에 의해 발생되는 힘의 세기를 측정하도록 설정된 센서 회로(예: 압력 센서)를 포함할 수 있다. The display device 160 can visually provide information to the outside of the electronic device 101 (eg, a user). The display device 160 may include, for example, a display, a hologram device, or a projector, and a control circuit for controlling the device. According to one embodiment, the display device 160 may include touch circuitry configured to detect a touch, or a sensor circuit configured to measure the intensity of force generated by the touch (e.g., a pressure sensor). there is.

오디오 모듈(170)은 소리를 전기 신호로 변환시키거나, 반대로 전기 신호를 소리로 변환시킬 수 있다. 일실시예에 따르면, 오디오 모듈(170)은, 입력 장치(150) 를 통해 소리를 획득하거나, 음향 출력 장치(155), 또는 전자 장치(101)와 직접 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(102)) (예: 스피커 또는 헤드폰))를 통해 소리를 출력할 수 있다.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 acquires sound through the input device 150, the sound output device 155, or an external electronic device (e.g., directly or wirelessly connected to the electronic device 101). Sound may be output through an electronic device 102 (e.g., speaker or headphone).

센서 모듈(176)은 전자 장치(101)의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태(예: 사용자 상태)를 감지하고, 감지된 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 일실시예에 따르면, 센서 모듈(176)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다. The sensor module 176 detects the operating state (e.g., power or temperature) of the electronic device 101 or the external environmental state (e.g., user state) and generates an electrical signal or data value corresponding to the detected state. can do. According to one embodiment, the sensor module 176 includes, for example, a gesture sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, It may include a temperature sensor, humidity sensor, or light sensor.

인터페이스(177)는 전자 장치(101)이 외부 전자 장치(예: 전자 장치(102))와 직접 또는 무선으로 연결되기 위해 사용될 수 있는 하나 이상의 지정된 프로토콜들을 지원할 수 있다. 일실시예에 따르면, 인터페이스(177)는, 예를 들면, HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.The interface 177 may support one or more designated protocols that can be used to connect the electronic device 101 directly or wirelessly with an external electronic device (eg, the 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.

연결 단자(178)는, 그를 통해서 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 물리적으로 연결될 수 있는 커넥터를 포함할 수 있다. 일실시예에 따르면, 연결 단자(178)은, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.The connection terminal 178 may include a connector through which the electronic device 101 can be physically connected to an external electronic device (eg, the 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 (eg, a headphone connector).

햅틱 모듈(179)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 일실시예에 따르면, 햅틱 모듈(179)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.The haptic module 179 can convert electrical signals into mechanical stimulation (e.g., vibration or movement) or electrical stimulation 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 electrical stimulation device.

카메라 모듈(180)은 정지 영상 및 동영상을 촬영할 수 있다. 일실시예에 따르면, 카메라 모듈(180)은 하나 이상의 렌즈들, 이미지 센서들, 이미지 시그널 프로세서들, 또는 플래시들을 포함할 수 있다.The camera module 180 can capture still images and moving images. According to one embodiment, the camera module 180 may include one or more lenses, image sensors, image signal processors, or flashes.

전력 관리 모듈(188)은 전자 장치(101)에 공급되는 전력을 관리할 수 있다. 일실시예에 따르면, 전력 관리 모듈(388)은, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구현될 수 있다.The power management module 188 can manage power supplied to the electronic device 101. According to one embodiment, the power management module 388 may be implemented as at least a part of, for example, a power management integrated circuit (PMIC).

배터리(189)는 전자 장치(101)의 적어도 하나의 구성 요소에 전력을 공급할 수 있다. 일실시예에 따르면, 배터리(189)는, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.The battery 189 may 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.

통신 모듈(190)은 전자 장치(101)와 외부 전자 장치(예: 전자 장치(102), 전자 장치(104), 또는 서버(108))간의 직접(예: 유선) 통신 채널 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(190)은 프로세서(120)(예: 어플리케이션 프로세서)와 독립적으로 운영되고, 직접(예: 유선) 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일실시예에 따르면, 통신 모듈(190)은 무선 통신 모듈(192)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(194)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함할 수 있다. 이들 통신 모듈 중 해당하는 통신 모듈은 제 1 네트워크(198)(예: 블루투스, WiFi direct 또는 IrDA(infrared data association) 같은 근거리 통신 네트워크) 또는 제 2 네트워크(199)(예: 셀룰러 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN)와 같은 원거리 통신 네트워크)를 통하여 외부 전자 장치와 통신할 수 있다. 이런 여러 종류의 통신 모듈들은 하나의 구성 요소(예: 단일 칩)으로 통합되거나, 또는 서로 별도의 복수의 구성 요소들(예: 복수 칩들)로 구현될 수 있다. 무선 통신 모듈(192)은 가입자 식별 모듈(196)에 저장된 가입자 정보(예: 국제 모바일 가입자 식별자(IMSI))를 이용하여 제 1 네트워크(198) 또는 제 2 네트워크(199)와 같은 통신 네트워크 내에서 전자 장치(101)를 확인 및 인증할 수 있다. The communication module 190 provides a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device 101 and an external electronic device (e.g., the electronic device 102, the electronic device 104, or the server 108). It can support establishment and communication through established communication channels. Communication module 190 operates independently of processor 120 (e.g., an application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module 190 is a wireless communication module 192 (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module 194 (e.g., : LAN (local area network) communication module, or power line communication module) may be included. Among these communication modules, the corresponding communication module is a first network 198 (e.g., a short-range communication network such as Bluetooth, WiFi direct, or IrDA (infrared data association)) or a second network 199 (e.g., a cellular network, the Internet, or It can communicate with external electronic devices through a computer network (e.g., a telecommunication network such as a LAN or WAN). These various types of communication modules may be integrated into one component (e.g., a single chip) or may be implemented as a plurality of separate components (e.g., multiple chips). The wireless communication module 192 uses subscriber information (e.g., International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module 196 within a communication network such as the first network 198 or the second network 199. The electronic device 101 can be confirmed and authenticated.

안테나 모듈(197)은 신호 또는 전력을 외부(예: 외부 전자 장치)로 송신하거나 외부로부터 수신할 수 있다. 일실시예에 따르면, 안테나 모듈은 서브스트레이트(예: PCB) 위에 형성된 도전체 또는 도전성 패턴으로 이루어진 방사체를 포함하는 하나의 안테나를 포함할 수 있다. 일실시예에 따르면, 안테나 모듈(197)은 복수의 안테나들을 포함할 수 있다. 이런 경우, 제 1 네트워크(198) 또는 제 2 네트워크(199)와 같은 통신 네트워크에서 사용되는 통신 방식에 적합한 적어도 하나의 안테나가, 예를 들면, 통신 모듈(190)에 의하여 상기 복수의 안테나들로부터 선택될 수 있다. 신호 또는 전력은 상기 선택된 적어도 하나의 안테나를 통하여 통신 모듈(190)과 외부 전자 장치 간에 송신되거나 수신될 수 있다. 어떤 실시예에 따르면, 방사체 이외에 다른 부품(예: RFIC)이 추가로 안테나 모듈(197)의 일부로 형성될 수 있다.The antenna module 197 may transmit or receive signals or power to or from the outside (e.g., an external electronic device). According to one embodiment, the antenna module may include one antenna including a radiator made of a conductor or a conductive pattern formed on a substrate (eg, PCB). According to one embodiment, the antenna module 197 may include a plurality of antennas. In this case, at least one antenna suitable for a communication method used in a communication network such as the first network 198 or the second network 199 is connected to the plurality of antennas by, for example, the communication module 190. can be selected Signals 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, other components (eg, RFIC) in addition to the radiator may be additionally formed as part of the antenna module 197.

상기 구성요소들 중 적어도 일부는 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input and output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))를 통해 서로 연결되고 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.At least some of the components are connected to each other through a communication method between peripheral devices (e.g., bus, general purpose input and output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI)) and signal ( (e.g. commands or data) can be exchanged with each other.

일실시예에 따르면, 명령 또는 데이터는 제 2 네트워크(199)에 연결된 서버(108)를 통해서 전자 장치(101)와 외부의 전자 장치(104)간에 송신 또는 수신될 수 있다. 전자 장치(102, 104) 각각은 전자 장치(101)와 동일한 또는 다른 종류의 장치일 수 있다. 일실시예에 따르면, 전자 장치(101)에서 실행되는 동작들의 전부 또는 일부는 외부 전자 장치들(102, 104, or 108) 중 하나 이상의 외부 장치들에서 실행될 수 있다. 예를 들면, 전자 장치(101)가 어떤 기능이나 서비스를 자동으로, 또는 사용자 또는 다른 장치로부터의 요청에 반응하여 수행해야 할 경우에, 전자 장치(101)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 하나 이상의 외부 전자 장치들에게 그 기능 또는 그 서비스의 적어도 일부를 수행하라고 요청할 수 있다. 상기 요청을 수신한 하나 이상의 외부 전자 장치들은 요청된 기능 또는 서비스의 적어도 일부, 또는 상기 요청과 관련된 추가 기능 또는 서비스를 실행하고, 그 실행의 결과를 전자 장치(101)로 전달할 수 있다. 전자 장치(101)는 상기 결과를, 그대로 또는 추가적으로 처리하여, 상기 요청에 대한 응답의 적어도 일부로서 제공할 수 있다.. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다. According to one embodiment, commands or data may be transmitted or received between the electronic device 101 and the external electronic device 104 through the server 108 connected to the second network 199. Each of the electronic devices 102 and 104 may be the same or different type of device from the electronic device 101. According to one embodiment, all or part of the operations performed in the electronic device 101 may be executed in one or more of the external electronic devices 102, 104, or 108. For example, when the electronic device 101 must perform a certain function or service automatically or in response to a request from a user or another device, the electronic device 101 may perform the function or service instead of executing the function or service on its own. Alternatively, or additionally, one or more external electronic devices may be requested to perform at least part of the function or service. One or more external electronic devices that have received the request may execute at least a portion of the requested function or service, or an 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 process the result as is or additionally and provide it as at least part of a response to the request. For this purpose, for example, cloud computing, distributed computing, or client-server computing technology. This can be used.

도 2는 다양한 실시예에 따른 프로그램(240)을 예시하는 블록도(200)이다. 일실시예에 따르면, 프로그램(240)은 전자 장치(101)의 하나 이상의 리소스들을 제어하기 위한 운영 체제(242), 미들웨어(244), 또는 상기 운영 체제(242)에서 실행 가능한 어플리케이션(246)을 포함할 수 있다. 운영 체제(242)는, 예를 들면, AndroidTM, iOSTM, WindowsTM, SymbianTM, TizenTM, 또는 BadaTM를 포함할 수 있다. 프로그램(240) 중 적어도 일부 프로그램은, 예를 들면, 제조 시에 전자 장치(101)에 프리로드되거나, 또는 사용자에 의해 사용 시 외부 전자 장치(예: 전자 장치(102 또는 104), 또는 서버(108))로부터 다운로드되거나 갱신 될 수 있다.Figure 2 is a block diagram 200 illustrating a program 240 according to various embodiments. According to one embodiment, the program 240 includes an operating system 242, middleware 244, or an application 246 executable on the operating system 242 for controlling one or more resources of the electronic device 101. It can be included. Operating system 242 may include, for example, Android TM , iOS TM , Windows TM , Symbian TM , Tizen TM , or Bada TM . At least some of the programs 240 are preloaded into the electronic device 101, for example, during manufacturing, or are stored in an external electronic device (e.g., the electronic device 102 or 104, or a server) when used by a user. It can be downloaded or updated from 108)).

운영 체제(242)는 전자 장치(101)의 하나 이상의 시스템 리소스들(예: 프로세스, 메모리, 또는 전원)의 관리(예: 할당 또는 회수)를 제어할 수 있다. 운영 체제(242)는, 추가적으로 또는 대체적으로, 전자 장치(101)의 다른 하드웨어 디바이스, 예를 들면, 입력 장치(150), 음향 출력 장치(155), 표시 장치(160), 오디오 모듈(170), 센서 모듈(176), 인터페이스(177), 햅틱 모듈(179), 카메라 모듈(180), 전력 관리 모듈(188), 배터리(189), 통신 모듈(190), 가입자 식별 모듈(196), 또는 안테나 모듈(197)을 구동하기 위한 하나 이상의 드라이버 프로그램들을 포함할 수 있다.The operating system 242 may control management (eg, allocation or retrieval) of one or more system resources (eg, process, memory, or power) of the electronic device 101 . Operating system 242 may additionally or alternatively operate on other hardware devices of electronic device 101, such as input device 150, audio output device 155, display device 160, audio module 170. , sensor module 176, interface 177, haptic module 179, camera module 180, power management module 188, battery 189, communication module 190, subscriber identification module 196, or It may include one or more driver programs for driving the antenna module 197.

미들웨어(244)는 전자 장치(101)의 하나 이상의 리소스들로부터 제공되는 기능 또는 정보가 어플리케이션(246)에 의해 사용될 수 있도록 다양한 기능들을 어플리케이션(246)으로 제공할 수 있다. 미들웨어(244)는, 예를 들면, 어플리케이션 매니저(201), 윈도우 매니저(203), 멀티미디어 매니저(205), 리소스 매니저(207), 파워 매니저(209), 데이터베이스 매니저(211), 패키지 매니저(213), 커넥티비티 매니저(215), 노티피케이션 매니저(217), 로케이션 매니저(219), 그래픽 매니저(221), 시큐리티 매니저(223), 통화 매니저(225), 또는 음성 인식 매니저(227)를 포함할 수 있다. The middleware 244 may provide various functions to the application 246 so that functions or information provided from one or more resources of the electronic device 101 can be used by the application 246. The middleware 244 includes, for example, an application manager 201, a window manager 203, a multimedia manager 205, a resource manager 207, a power manager 209, a database manager 211, and a package manager 213. ), connectivity manager (215), notification manager (217), location manager (219), graphics manager (221), security manager (223), call manager (225), or voice recognition manager (227). You can.

어플리케이션 매니저(201)는, 예를 들면, 어플리케이션(246)의 생명 주기를 관리할 수 있다. 윈도우 매니저(203)는, 예를 들면, 화면에서 사용되는 하나 이상의 GUI 자원들을 관리할 수 있다. 멀티미디어 매니저(205)는, 예를 들면, 미디어 파일들의 재생에 필요한 하나 이상의 포맷들을 파악하고, 그 중 선택된 해당하는 포맷에 맞는 코덱을 이용하여 상기 미디어 파일들 중 해당하는 미디어 파일의 인코딩 또는 디코딩을 수행할 수 있다. 리소스 매니저(207)는, 예를 들면, 어플리케이션(246)의 소스 코드 또는 메모리(130)의 메모리의 공간을 관리할 수 있다. 파워 매니저(209)는, 예를 들면, 배터리(189)의 용량, 온도 또는 전원을 관리하고, 이 중 해당 정보를 이용하여 전자 장치(101)의 동작에 필요한 관련 정보를 결정 또는 제공할 수 있다. 일실시예에 따르면, 파워 매니저(209)는 전자 장치(101)의 바이오스(BIOS: basic input/output system)(미도시)와 연동할 수 있다.The application manager 201 may, for example, manage the life cycle of the application 246. The window manager 203 may, for example, manage one or more GUI resources used on the screen. For example, the multimedia manager 205 identifies one or more formats required for playing media files, and encodes or decodes the corresponding media file using a codec suitable for the selected format. It can be done. The resource manager 207 may manage, for example, the source code of the application 246 or the memory space of the memory 130 . The power manager 209 manages, for example, the capacity, temperature, or power of the battery 189, and may use this information to determine or provide related information necessary for the operation of the electronic device 101. . According to one embodiment, the power manager 209 may interface with a basic input/output system (BIOS) (not shown) of the electronic device 101.

데이터베이스 매니저(211)는, 예를 들면, 어플리케이션(246)에 의해 사용될 데이터베이스를 생성, 검색, 또는 변경할 수 있다. 패키지 매니저(213)는, 예를 들면, 패키지 파일의 형태로 배포되는 어플리케이션의 설치 또는 갱신을 관리할 수 있다. 커넥티비티 매니저(215)는, 예를 들면, 전자 장치(101)와 외부 전자 장치 간의 무선 연결 또는 직접 연결을 관리할 수 있다. 노티피케이션 매니저(217)는, 예를 들면, 지정된 이벤트(예: 착신 통화, 메시지, 또는 알람)의 발생을 사용자에게 알리기 위한 기능을 제공할 수 있다. 로케이션 매니저(219)는, 예를 들면, 전자 장치(101)의 위치 정보를 관리할 수 있다. 그래픽 매니저(221)는, 예를 들면, 사용자에게 제공될 하나 이상의 그래픽 효과들 또는 이와 관련된 사용자 인터페이스를 관리할 수 있다. Database manager 211 may create, search, or change a database to be used by application 246, for example. The package manager 213 may, for example, manage the installation or update of applications distributed in the form of package files. The connectivity manager 215 may manage, for example, a wireless connection or direct connection between the electronic device 101 and an external electronic device. For example, the notification manager 217 may provide a function for notifying the user of the occurrence of a designated event (eg, an incoming call, message, or alarm). The location manager 219 may, for example, manage location information of the electronic device 101. The graphics manager 221 may, for example, manage one or more graphic effects to be provided to the user or a user interface related thereto.

시큐리티 매니저(223)는, 예를 들면, 시스템 보안 또는 사용자 인증을 제공할 수 있다. 통화(telephony) 매니저(225)는, 예를 들면, 전자 장치(101)에 의해 제공되는 음성 통화 기능 또는 영상 통화 기능을 관리할 수 있다. 음성 인식 매니저(227)는, 예를 들면, 사용자의 음성 데이터를 서버(108)로 전송하고, 그 음성 데이터에 적어도 일부 기반하여 전자 장치(101)에서 수행될 기능에 대응하는 명령어(command), 또는 그 음성 데이터에 적어도 일부 기반하여 변환된 문자 데이터를 서버(108)로부터 수신할 수 있다. 일 실시예에 따르면, 미들웨어(244)는 동적으로 기존의 구성요소를 일부 삭제하거나 새로운 구성요소들을 추가할 수 있다. 일 실시예에 따르면, 미들웨어(244)의 적어도 일부는 운영 체제(242)의 일부로 포함되거나, 또는 운영 체제(242)와는 다른 별도의 소프트웨어로 구현될 수 있다.Security manager 223 may provide, for example, system security or user authentication. The telephony manager 225 may manage, for example, a voice call function or a video call function provided by the electronic device 101. For example, the voice recognition manager 227 transmits the user's voice data to the server 108 and provides a command corresponding to a function to be performed in the electronic device 101 based at least in part on the voice data, Alternatively, text data converted based at least in part on the voice data may be received from the server 108. According to one embodiment, the middleware 244 may dynamically delete some existing components or add new components. According to one embodiment, at least a portion of the middleware 244 may be included as part of the operating system 242 or may be implemented as separate software different from the operating system 242.

어플리케이션(246)은, 예를 들면, 홈(251), 다이얼러(253), SMS/MMS(255), IM(instant message)(257), 브라우저(259), 카메라(261), 알람(263), 컨택트(265), 음성 인식(267), 이메일(269), 달력(271), 미디어 플레이어(273), 앨범(275), 와치(277), 헬스(279)(예: 운동량 또는 혈당과 같은 생체 정보를 측정), 또는 환경 정보(281)(예: 기압, 습도, 또는 온도 정보 측정) 어플리케이션을 포함할 수 있다. 일실시예에 따르면, 어플리케이션(246)은 전자 장치(101)와 외부 전자 장치 사이의 정보 교환을 지원할 수 있는 정보 교환 어플리케이션(미도시)을 더 포함할 수 있다. 정보 교환 어플리케이션은, 예를 들면, 외부 전자 장치로 지정된 정보 (예: 통화, 메시지, 또는 알람)를 전달하도록 설정된 노티피케이션 릴레이 어플리케이션, 또는 외부 전자 장치를 관리하도록 설정된 장치 관리 어플리케이션을 포함할 수 있다. 노티피케이션 릴레이 어플리케이션은, 예를 들면, 전자 장치(101)의 다른 어플리케이션(예: 이메일 어플리케이션(269))에서 발생된 지정된 이벤트(예: 메일 수신)에 대응하는 알림 정보를 외부 전자 장치로 전달할 수 있다. 추가적으로 또는 대체적으로, 노티피케이션 릴레이 어플리케이션은 외부 전자 장치로부터 알림 정보를 수신하여 전자 장치(101)의 사용자에게 제공할 수 있다. The application 246 includes, for example, home 251, dialer 253, SMS/MMS (255), instant message (IM) 257, browser 259, camera 261, and alarm 263. , Contacts (265), Voice Recognition (267), Email (269), Calendar (271), Media Player (273), Album (275), Watch (277), Health (279) (such as exercise amount or blood sugar) It may include applications that measure biometric information) or environmental information 281 (e.g., measure atmospheric pressure, humidity, or temperature information). According to one embodiment, the application 246 may further include an information exchange application (not shown) that can support information exchange between the electronic device 101 and an external electronic device. The information exchange application may include, for example, a notification relay application configured to deliver designated information (e.g., calls, messages, or alarms) to an external electronic device, or a device management application configured to manage the external electronic device. there is. The notification relay application, for example, transmits notification information corresponding to a specified event (e.g., mail reception) generated in another application (e.g., email application 269) of the electronic device 101 to an external electronic device. You can. Additionally or alternatively, the notification relay application may receive notification information from an external electronic device and provide it to the user of the electronic device 101.

장치 관리 어플리케이션은, 예를 들면, 전자 장치(101)와 통신하는 외부 전자 장치 또는 그 일부 구성 요소(예: 표시 장치(160) 또는 카메라 모듈(180))의 전원(예: 턴-온 또는 턴-오프) 또는 기능(예: 표시 장치(160) 또는 카메라 모듈(180)의 밝기, 해상도, 또는 포커스)을 제어할 수 있다. 장치 관리 어플리케이션은, 추가적으로 또는 대체적으로, 외부 전자 장치에서 동작하는 어플리케이션의 설치, 삭제, 또는 갱신을 지원할 수 있다.The device management application may, for example, control the power (e.g., turn-on or turn-on) of an external electronic device or some component thereof (e.g., display device 160 or camera module 180) that communicates with the electronic device 101. -off) or functions (e.g., brightness, resolution, or focus of the display device 160 or the camera module 180) can be controlled. A device management application may additionally or alternatively support installation, deletion, or update of applications running on external electronic devices.

도 3a는 다양한 실시예에 따른 SW 모듈(300a)을 도시한다. SW 모듈(300a)은 어플리케이션 패키지(330a), 시그니처 데이터베이스(310a), 및 개발자 전자 장치(320a)에 포함되는 DEX 시그니처 생성부(322a), DEX 검증 대상 코드 영역 추출부(326a), 및 시그니처 저장부(324a)를 포함할 수 있다. 어플리케이션 패키지(330a)는 어플리케이션의 이미지로서, 예를 들어, apk 형식의 파일일 수 있다. 어플리케이션 패키지(330a)는 대응되는 어플리케이션의 실행 이미지인 DEX(332a)를 포함할 수 있다. Figure 3A shows a SW module 300a according to various embodiments. The SW module 300a includes an application package 330a, a signature database 310a, and a DEX signature generation unit 322a, a DEX verification target code area extractor 326a, and a signature storage unit included in the developer electronic device 320a. It may include part 324a. The application package 330a is an image of an application and may be, for example, an APK format file. The application package 330a may include a DEX 332a, which is an executable image of the corresponding application.

DEX 검증 대상 코드 영역 추출부(326a)는 보호 대상인 어플리케이션의 어플리케이션 패키지(330a)로부터 DEX(332a)를 추출하고, 보호 대상인 어플리케이션에 대응하는 제1 시그니처를 생성할 수 있다. DEX 검증 대상 코드 영역 추출부(326a)는 어플리케이션 패키지(330a)에 대응되는 DEX(332a)에 기초하여 제1 검증 대상 코드 영역을 확인할 수 있다. 다양한 실시예에 따라서, DEX 검증 대상 코드 영역 추출부(326a)는 어플리케이션 패키지(330a)에 대응되는 DEX(332a)를 파싱한 후 매핑 규칙을 적용하여 제1 최적화된 DEX 파일을 생성하고, 제1 최적화된 DEX 파일로부터 오퍼레이션 코드 및 레지스터를 추출하고, 추출된 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 복수의 제1 부분으로 나누고, 복수의 제1 부분 중 적어도 하나를 제1 검증 대상 코드 영역으로서 확인할 수 있다. DEX 시그니처 생성부(322a)는 DEX 검증 대상 코드 영역 추출부(326a)에 의하여 확인된 제1 검증 대상 코드 영역에 기초하여 제1 시그니처를 생성할 수 있다. 다양한 실시예에 따라서, DEX 시그니처 생성부(322a)는 DEX 검증 대상 코드 영역 추출부(326a)에 의하여 확인된 제1 검증 대상 코드 영역에 해시 함수를 적용함으로써 제1 시그니처를 생성할 수 있다. 다양한 실시예에 따라서, 해시 함수의 구체적인 종류에는 제한이 없다. 시그니처 저장부(324a)는 DEX 시그니처 생성부(322a)에 의하여 생성된 제1 시그니처를 시그니처 데이터베이스(310a)에 저장할 수 있다. 다양한 실시예에 따라서, 시그니처 데이터베이스(310a)는 제1 시그니처 및 제1 시그니처에 대응되는 코드들의 정보, 예를 들어, 함수명 또는 위치를 저장할 수 있다.The DEX verification target code area extractor 326a may extract the DEX 332a from the application package 330a of the application subject to protection and generate a first signature corresponding to the application subject to protection. The DEX verification target code area extractor 326a may identify the first verification target code area based on the DEX 332a corresponding to the application package 330a. According to various embodiments, the DEX verification target code area extractor 326a parses the DEX 332a corresponding to the application package 330a and then applies a mapping rule to generate a first optimized DEX file, and generates a first optimized DEX file. Operation codes and registers are extracted from the optimized DEX file, the extracted operation codes and registers are parsed in function units or code area units and divided into a plurality of first parts, and at least one of the plurality of first parts is selected as the first verification target. You can check it as a code area. The DEX signature generator 322a may generate a first signature based on the first code region to be verified by the DEX code region to be verified extractor 326a. According to various embodiments, the DEX signature generation unit 322a may generate the first signature by applying a hash function to the first verification target code region identified by the DEX verification target code region extractor 326a. According to various embodiments, there is no limitation on the specific type of hash function. The signature storage unit 324a may store the first signature generated by the DEX signature generation unit 322a in the signature database 310a. According to various embodiments, the signature database 310a may store the first signature and information on codes corresponding to the first signature, for example, function name or location.

도 3b는 다양한 실시예에 따른 SW 모듈(300b)을 도시한다. SW 모듈(300b)은 시그니처 데이터베이스(310b), 가상 머신(330b), 및 사용자 전자 장치(320b)에 포함되는 비교부(321b), 시그니처 추출부(323b), 캐시 시그니처 생성부(325b), 및 캐시 검증 대상 코드 영역 추출부(327b)를 포함할 수 있다. 가상 머신(330b)은 어플리케이션의 실행 환경일 수 있다. 다양한 실시예에 따라서, 가상 머신(330b)은 Dalvik 가상 머신 또는 안드로이드 런타임일 수 있다. 다양한 실시예에 따라서, 가상 머신(330b)은 어플리케이션의 실행 명령에 응답하여 어플리케이션 캐시(334b)를 메모리에 로딩할 수 있다. 다양한 실시예에 따라서, 어플리케이션 캐시(334b)는 가상 머신(330b)에서 사용하는 어플리케이션의 실행 이미지일 수 있다. 다양한 실시예에 따라서, 어플리케이션 캐시(334b)는 ODEX 파일 또는 VDEX 파일일 수 있다.FIG. 3B shows a SW module 300b according to various embodiments. The SW module 300b includes a comparison unit 321b, a signature extraction unit 323b, a cache signature generation unit 325b, and a signature database 310b included in the virtual machine 330b and the user electronic device 320b. It may include a cache verification target code area extraction unit 327b. The virtual machine 330b may be an execution environment for an application. According to various embodiments, virtual machine 330b may be a Dalvik virtual machine or an Android runtime. According to various embodiments, the virtual machine 330b may load the application cache 334b into memory in response to an application execution command. According to various embodiments, the application cache 334b may be an executable image of an application used in the virtual machine 330b. Depending on various embodiments, application cache 334b may be an ODEX file or a VDEX file.

다양한 실시예에 따라서, 캐시 검증 대상 코드 영역 추출부(327b)는 어플리케이션 캐시(334b)에 기초하여 제2 검증 대상 코드 영역을 확인할 수 있다. 다양한 실시예에 따라서, 캐시 검증 대상 코드 영역 추출부(327b)는 어플리케이션 캐시(334b)로부터 제2 최적화된 DEX 파일을 추출하고, 제2 최적화된 DEX 파일로부터 오퍼레이션 코드 및 레지스터를 추출하고, 추출된 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 복수의 제2 부분으로 나누고, 복수의 제2 부분 중 적어도 하나를 제2 검증 대상 코드 영역으로서 확인할 수 있다. 캐시 시그니처 생성부(325b)는 캐시 검증 대상 코드 영역 추출부(327b)에 의하여 확인된 제2 검증 대상 코드 영역에 기초하여 제2 시그니처를 생성할 수 있다. 다양한 실시예에 따라서, 캐시 시그니처 생성부(325b)는 캐시 검증 대상 코드 영역 추출부(327b)에 의하여 확인된 제2 검증 대상 코드 영역에 해시 함수를 적용함으로써 제2 시그니처를 생성할 수 있다. 다양한 실시예에 따라서, 해시 함수의 구체적인 종류에는 제한이 없다. 다양한 실시예에 따라서, 해시 함수는 도 3a를 참조하여 설명된 DEX 시그니처 생성부(322a)에 의하여 적용되는 해시 함수와 동일할 수 있다. 시그니처 추출부(323b)는 시그니처 데이터베이스(310b)로부터 제2 시그니처와 비교를 수행할 시그니처를 추출할 수 있다. 다양한 실시예에 따라서, 제2 시그니처와 비교를 수행할 시그니처는 도 3a를 참조하여 설명된 제1 시그니처일 수 있다. 비교부(321b)는 어플리케이션의 실행 명령에 응답하여 생성된 제2 시그니처를 시그니처 데이터베이스(310b)에 저장된 시그니처와 비교할 수 있다. 다양한 실시예에 따라서, 비교부(321b)는 제2 시그니처가 도 3a를 참조하여 설명된 제1 시그니처와 동일한지 여부를 확인할 수 있다.According to various embodiments, the cache verification target code area extractor 327b may identify the second verification target code area based on the application cache 334b. According to various embodiments, the cache verification target code area extractor 327b extracts the second optimized DEX file from the application cache 334b, extracts the operation code and register from the second optimized DEX file, and extracts the extracted The operation code and register may be parsed in function units or code area units and divided into a plurality of second parts, and at least one of the plurality of second parts may be confirmed as the second verification target code area. The cache signature generator 325b may generate a second signature based on the second code region to be verified that is confirmed by the cache code region extractor 327b. According to various embodiments, the cache signature generation unit 325b may generate a second signature by applying a hash function to the second verification target code area identified by the cache verification target code area extractor 327b. According to various embodiments, there is no limitation on the specific type of hash function. According to various embodiments, the hash function may be the same as the hash function applied by the DEX signature generator 322a described with reference to FIG. 3A. The signature extraction unit 323b may extract a signature to be compared with the second signature from the signature database 310b. According to various embodiments, the signature to be compared with the second signature may be the first signature described with reference to FIG. 3A. The comparison unit 321b may compare the second signature generated in response to the execution command of the application with the signature stored in the signature database 310b. According to various embodiments, the comparison unit 321b may check whether the second signature is the same as the first signature described with reference to FIG. 3A.

도 4a는 다양한 실시예에 따른 제1 시그니처 생성 과정(400a)을 설명하기 위한 도면을 도시한다. 구체적으로, 제1 시그니처 생성 과정(400a)은 어플리케이션이 사용자의 전자 장치(예를 들어, 전자 장치(101))에 설치되기 전에 수행될 수 있다. 다양한 실시예에 따라서, 제1 시그니처 생성 과정(400a)은 어플리케이션 개발에 이용되는 전자 장치(이하, "개발자 전자 장치")에 의하여 어플리케이션의 개발 과정에서 수행될 수 있다. FIG. 4A illustrates a diagram illustrating a first signature generation process 400a according to various embodiments. Specifically, the first signature creation process 400a may be performed before the application is installed on the user's electronic device (eg, electronic device 101). According to various embodiments, the first signature generation process 400a may be performed during the application development process by an electronic device used for application development (hereinafter, “developer electronic device”).

개발자 전자 장치는 어플리케이션 패키지(410a)로부터, 어플리케이션 패키지(410a)에 대응되는 DEX 파일(420a)을 확인할 수 있다. 다양한 실시예에 따라서, 어플리케이션 패키지(410a)로부터, 어플리케이션 패키지(410a)에 대응되는 DEX 파일(420a)을 확인하는 과정은 개발자 전자 장치에 포함된 DEX 검증 대상 코드 영역 추출부(326a)에 의하여 수행될 수 있다. 다양한 실시예에 따라서, 어플리케이션 패키지(410a)는 apk 확장자를 가질 수 있다. 개발자 전자 장치는 확인된 DEX 파일(420a)을 파싱하고 매핑 규칙을 적용하여 제1 최적화된 DEX 파일(430a)을 생성할 수 있다. 다양한 실시예에 따라서, 제1 최적화된 DEX 파일(430a)을 생성하는 과정은 개발자 전자 장치에 포함된 DEX 검증 대상 코드 영역 추출부(326a)에 의하여 수행될 수 있다. 다양한 실시예에 따라서, 매핑 규칙의 적어도 일부는 예를 들어 아래 표 1과 같을 수 있다.The developer electronic device can check the DEX file 420a corresponding to the application package 410a from the application package 410a. According to various embodiments, the process of checking the DEX file 420a corresponding to the application package 410a from the application package 410a is performed by the DEX verification target code area extractor 326a included in the developer electronic device. It can be. According to various embodiments, the application package 410a may have an apk extension. The developer electronic device may parse the confirmed DEX file 420a and apply mapping rules to generate the first optimized DEX file 430a. According to various embodiments, the process of generating the first optimized DEX file 430a may be performed by the DEX verification target code area extractor 326a included in the developer electronic device. According to various embodiments, at least some of the mapping rules may be as shown in Table 1 below, for example.

오퍼레이션 코드(hex)Operation code (hex) 오퍼레이션 코드명Operation code name Android 5Android 5 Android 6, 7, 8Android 6, 7, 8 최적화된 오퍼레이션 코드Optimized operation code 최적화된 오퍼레이션 코드명Optimized operation code name 최적화된 오퍼레이션 코드Optimized operation code 최적화된 오퍼레이션 코드명Optimized operation code name 0E0E return-voidreturn-void 7373 return-void-no-barrierreturn-void-no-barrier 7373 return-void-no-barrierreturn-void-no-barrier 1F1F check-castcheck-cast 0000 nopnop 0000 nopnop 5252 igetiget E3E3 iget-quickiget-quick E3E3 iget-quickiget-quick 5353 iget-wideiget-wide E4E4 iget-wide-quickiget-wide-quick E4E4 iget-wide-quickiget-wide-quick 5454 iget-objectiget-object E5E5 iget-object-quickiget-object-quick E5E5 iget-object-quickiget-object-quick 5959 iputiput E6E6 iput-quickiput-quick E6E6 iput-quickiput-quick 5C5C iput-booleaniput-boolean EBE.B. iput-boolean-quickiput-boolean-quick 5D5D iput-byteiput-byte ECEC iput-byte-quickiput-byte-quick 5E5E iput-chariput-char EDED iput-char-quickiput-char-quick 5F5F iput-shortiput-short EEEE iput-short-quickiput-short-quick 5A5A iput-wideiput-wide E7E7 iput-wide-quickiput-wide-quick E7E7 iput-wide-quickiput-wide-quick 5B5B iput-objectiput-object E8E8 iput-object-quickiput-object-quick E8E8 iput-object-quickiput-object-quick 6E6E invoke-virtualinvoke-virtual E9E9 iput-virtual-quickiput-virtual-quick E9E9 invoke-virtual-quickinvoke-virtual-quick 7474 invoke-virtual/rangeinvoke-virtual/range EAEA invoke-virtual-quick/rangeinvoke-virtual-quick/range EAEA invoke-virtual-quick/rangeinvoke-virtual-quick/range 5555 iget-booleaniget-boolean -- -- EFEF iget-boolean-quickiget-boolean-quick 5656 iget-byteiget-byte -- -- F0F0 iget-byte-quickiget-byte-quick 5757 iget-chariget-char -- -- F1F1 iget-char-quickiget-char-quick 5858 iget-shortiget-short -- -- F2F2 iget-short-quickiget-short-quick

표 1에 나타난 매핑 규칙에 의하여, 16진법의 오퍼레이션 코드는 최적화된 오퍼레이션 코드로 변환된다. 표 1에 나타난 바와 같이, 다양한 실시예에서 16진법의 오퍼레이션 코드에서 최적화된 오퍼레이션 코드로 변환하는 매핑 규칙은 어플리케이션 사용자의 전자 장치의 안드로이드 버전에 따라서 상이할 수 있다. 다양한 실시예에 따라서, 안드로이드 버전 5를 사용하는 전자 장치를 위한 어플리케이션에 대응하는 제1 최적화된 DEX 파일(430a)과 안드로이드 버전 6, 7, 또는 8을 사용하는 전자 장치를 위한 어플리케이션에 대응하는 제1 최적화된 DEX 파일(430a)이 상이할 수 있다.According to the mapping rules shown in Table 1, the hexadecimal operation code is converted to an optimized operation code. As shown in Table 1, in various embodiments, the mapping rule for converting a hexadecimal operation code to an optimized operation code may differ depending on the Android version of the application user's electronic device. According to various embodiments, a first optimized DEX file 430a corresponding to an application for an electronic device using Android version 5 and a first optimized DEX file 430a corresponding to an application for an electronic device using Android version 6, 7, or 8. 1 The optimized DEX file 430a may be different.

개발자 전자 장치는 제1 최적화된 DEX 파일(430a)로부터 제1 검증 대상 코드 영역(440a)을 확인할 수 있다. 다양한 실시예에 따라서, 제1 최적화된 DEX 파일(430a)로부터 제1 검증 대상 코드 영역(440a)을 확인하는 과정은 DEX 검증 대상 코드 영역 추출부(326a)에 의하여 수행될 수 있다. 다양한 실시예에 따라서, 개발자 전자 장치는 제1 최적화된 DEX 파일(430a) 중 오퍼레이션 코드 및 레지스터를 추출하고, 추출된 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 복수의 제1 부분으로 나누고, 복수의 제1 부분 중 적어도 하나를 제1 검증 대상 코드 영역으로서 확인할 수 있다.The developer electronic device may check the first verification target code area 440a from the first optimized DEX file 430a. According to various embodiments, the process of confirming the first code area to be verified (440a) from the first optimized DEX file (430a) may be performed by the DEX subject to verification code area extractor (326a). According to various embodiments, the developer electronic device extracts operation codes and registers from the first optimized DEX file 430a, parses the extracted operation codes and registers in function units or code area units, and divides them into a plurality of first parts. After dividing, at least one of the plurality of first parts can be confirmed as the first code area to be verified.

개발자 전자 장치는 제1 검증 대상 코드 영역(440a)에 기초하여 제1 시그니처(450a)를 생성할 수 있다. 다양한 실시예에 따라서, 제1 검증 대상 코드 영역(440a)에 기초하여 제1 시그니처(450a)를 생성하는 과정은 DEX 시그니처 생성부(322a)에 의하여 수행될 수 있다. 다양한 실시예에 따라서, 개발자 전자 장치는 제1 검증 대상 코드 영역(440a)에 해시 함수를 적용함으로써 제1 시그니처를 생성할 수 있다. 다양한 실시예에 따라서, 해시 함수의 구체적인 종류에는 제한이 없다.The developer electronic device may generate the first signature 450a based on the first verification target code area 440a. According to various embodiments, the process of generating the first signature 450a based on the first verification target code region 440a may be performed by the DEX signature generator 322a. According to various embodiments, a developer electronic device may generate a first signature by applying a hash function to the first verification target code area 440a. According to various embodiments, there is no limitation on the specific type of hash function.

개발자 전자 장치는 생성된 제1 시그니처(450a)를 시그니처 데이터베이스(460a)에 저장할 수 있다. 다양한 실시예에 따라서, 제1 시그니처(450a)를 시그니처 데이터베이스(460a)에 저장하는 과정은 시그니처 저장부(324a)에 의하여 수행될 수 있다.The developer electronic device may store the generated first signature 450a in the signature database 460a. According to various embodiments, the process of storing the first signature 450a in the signature database 460a may be performed by the signature storage unit 324a.

다양한 실시예에 따라서, 시그니처 데이터베이스(460a)는 어플리케이션 패키지(410a)와 함께 어플리케이션의 설치 파일 내에 포함될 수 있다. 이 경우, 시그니처 데이터베이스(460a)는 어플리케이션의 설치 파일 내에 포함되어 사용자의 전자 장치에 의하여(예를 들어, 프로세서(120)에 의하여 통신 모듈(190)을 통하여) 수신된다. 또는, 다양한 실시예에 따라서, 시그니처 데이터베이스(460a)는 개발자 전자 장치 및 사용자의 전자 장치와 각각 통신하는 외부 서버에 포함될 수 있다. 다양한 실시예에 따라서, 시그니처 데이터베이스(460a)는 사용자의 전자 장치에 어플리케이션을 제공하는 어플리케이션 서버에 포함될 수 있다. 다양한 실시예에 따라서, 개발자 전자 장치 및 사용자의 전자 장치는 클라우드 서비스 또는 네트워크 서비스를 통하여 시그니처 데이터베이스(460a)에 액세스할 수 있다.According to various embodiments, the signature database 460a may be included in the installation file of the application along with the application package 410a. In this case, the signature database 460a is included in the installation file of the application and is received by the user's electronic device (eg, by the processor 120 through the communication module 190). Alternatively, according to various embodiments, the signature database 460a may be included in an external server that communicates with the developer's electronic device and the user's electronic device, respectively. According to various embodiments, the signature database 460a may be included in an application server that provides applications to the user's electronic device. According to various embodiments, the developer's electronic device and the user's electronic device may access the signature database 460a through a cloud service or network service.

표 1과 관련하여 상술한 바와 같이, 다양한 실시예에 따라서, 안드로이드 버전 5를 사용하는 전자 장치를 위한 어플리케이션에 대응하는 제1 최적화된 DEX 파일(430a)과 안드로이드 버전 6, 7, 또는 8을 사용하는 전자 장치를 위한 어플리케이션에 대응하는 제1 최적화된 DEX 파일(430a)이 상이할 수 있다. 따라서, 안드로이드 버전 5를 사용하는 전자 장치에 대응하는 제1 시그니처(450a)와 어플리케이션 및 안드로이드 버전 6, 7, 또는 8을 사용하는 전자 장치에 대응하는 제1 시그니처(450a)가 상이할 수 있다. 다양한 실시예에 따라서, 시그니처 데이터베이스(460a)가 개발자 전자 장치 및 사용자의 전자 장치와 각각 통신하는 외부 서버에 포함되는 경우, 시그니처 저장부(324a)는 안드로이드 버전 5를 사용하는 전자 장치에 대응하는 제1 시그니처(450a) 및 안드로이드 버전 6, 7, 또는 8을 사용하는 전자 장치에 대응하는 제1 시그니처(450a)를 별도로 시그니처 데이터베이스(460a)에 저장할 수 있다. 다양한 실시예에 따라서, 시그니처 데이터베이스(460a)가 어플리케이션 패키지(410a)와 함께 어플리케이션의 설치 파일 내에 포함되는 경우, 제1 시그니처(450a)는 대응하는 안드로이드 버전을 사용하는 전자 장치를 위한 어플리케이션 설치 파일 내에 포함될 수 있다.As described above with respect to Table 1, according to various embodiments, a first optimized DEX file 430a corresponding to an application for an electronic device using Android version 5 and Android version 6, 7, or 8 is used. The first optimized DEX file 430a corresponding to the application for the electronic device may be different. Accordingly, the first signature 450a corresponding to an electronic device using Android version 5 and the application and the first signature 450a corresponding to an electronic device using Android version 6, 7, or 8 may be different. According to various embodiments, when the signature database 460a is included in an external server that communicates with the developer's electronic device and the user's electronic device, respectively, the signature storage unit 324a is a device corresponding to an electronic device using Android version 5. 1 signature 450a and the first signature 450a corresponding to an electronic device using Android version 6, 7, or 8 may be separately stored in the signature database 460a. According to various embodiments, when the signature database 460a is included in the installation file of the application together with the application package 410a, the first signature 450a is included in the application installation file for the electronic device using the corresponding Android version. May be included.

도 4b는 다양한 실시예에 따른 어플리케이션 무결성 확인 과정(400b)을 설명하기 위한 도면을 도시한다. 다양한 실시예에 따라서, 어플리케이션 무결성 확인 과정(400b)은 어플리케이션이 설치된 전자 장치(101)(예를 들어, 프로세서(120))에서 어플리케이션 실행 명령이 확인되는 것에 응답하여 수행될 수 있다. 다양한 실시예에 따라서, 어플리케이션 무결성 확인 과정(400b)은 어플리케이션이 설치된 전자 장치(101)(이하, "사용자 전자 장치")에 의하여 수행될 수 있다.FIG. 4B illustrates a diagram illustrating an application integrity verification process 400b according to various embodiments. According to various embodiments, the application integrity verification process 400b may be performed in response to an application execution command being confirmed in the electronic device 101 (eg, processor 120) on which the application is installed. According to various embodiments, the application integrity verification process 400b may be performed by the electronic device 101 (hereinafter, “user electronic device”) on which the application is installed.

사용자 전자 장치(101)는 어플리케이션 캐시 파일(470b)로부터 제2 최적화된 DEX 파일(430b)을 추출할 수 있다. 다양한 실시예에 따라서, 어플리케이션 캐시 파일(470b)로부터 제2 최적화된 DEX 파일(430b)을 추출하는 과정은 캐시 검증 대상 코드 영역 추출부(327b)에 의하여 수행될 수 있다. 다양한 실시예에 따라서, 어플리케이션 캐시 파일(470b)은 ODEX 파일 또는 VDEX 파일일 수 있다. The user electronic device 101 may extract the second optimized DEX file 430b from the application cache file 470b. According to various embodiments, the process of extracting the second optimized DEX file 430b from the application cache file 470b may be performed by the cache verification target code area extractor 327b. According to various embodiments, the application cache file 470b may be an ODEX file or a VDEX file.

사용자 전자 장치(101)는 제2 최적화된 DEX 파일(430b)로부터 제2 검증 대상 코드 영역(440b)을 확인할 수 있다. 다양한 실시예에 따라서, 제2 최적화된 DEX 파일(430b)로부터 제2 검증 대상 코드 영역(440b)을 확인하는 과정은 캐시 검증 대상 코드 영역 추출부(327b)에 의하여 수행될 수 있다. 다양한 실시예에 따라서, 사용자 전자 장치(101)는 제2 최적화된 DEX 파일로부터 오퍼레이션 코드 및 레지스터를 추출하고, 추출된 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 복수의 제2 부분으로 나누고, 복수의 제2 부분 중 적어도 하나를 제2 검증 대상 코드 영역(440b)으로서 확인할 수 있다.The user electronic device 101 may check the second verification target code area 440b from the second optimized DEX file 430b. According to various embodiments, the process of confirming the second code area to be verified (440b) from the second optimized DEX file (430b) may be performed by the cache subject code area to be verified (327b). According to various embodiments, the user electronic device 101 extracts operation codes and registers from the second optimized DEX file, parses the extracted operation codes and registers in function units or code area units, and divides them into a plurality of second parts. After dividing, at least one of the plurality of second parts can be confirmed as the second verification target code area 440b.

사용자 전자 장치(101)는 제2 검증 대상 코드 영역(440b)에 기초하여 제2 시그니처(455b)를 생성할 수 있다. 다양한 실시예에 따라서, 제2 검증 대상 코드 영역(440b)에 기초하여 제2 시그니처(455b)를 생성하는 과정은 캐시 시그니처 생성부(325b)에 의하여 수행될 수 있다. 다양한 실시예에 따라서, 사용자 전자 장치(101)는 제2 검증 대상 코드 영역(440b) 에 해시 함수를 적용함으로써 제2 시그니처를 생성할 수 있다. 다양한 실시예에 따라서, 해시 함수는 제1 시그니처(450a)를 생성하기 위하여 제1 검증 대상 코드 영역(440a)에 적용되는 해시 함수와 동일할 수 있으며, 해시 함수의 구체적인 종류에는 제한이 없다.The user electronic device 101 may generate the second signature 455b based on the second verification target code area 440b. According to various embodiments, the process of generating the second signature 455b based on the second code region to be verified 440b may be performed by the cache signature generator 325b. According to various embodiments, the user electronic device 101 may generate a second signature by applying a hash function to the second verification target code area 440b. According to various embodiments, the hash function may be the same as the hash function applied to the first verification target code region 440a to generate the first signature 450a, and there is no limitation on the specific type of the hash function.

사용자 전자 장치(101)는 시그니처 데이터베이스(460b)에 저장된 제1 시그니처(450b)를 확인할 수 있다. 다양한 실시예에 따라서, 시그니처 데이터베이스(460b)에 저장된 제1 시그니처(450b)를 확인하는 과정은 시그니처 추출부(323b)에 의하여 수행될 수 있다. 다양한 실시예에 따라서, 시그니처 데이터베이스(460b)에 저장된 제1 시그니처(450b)는 도 4a를 참조하여 설명한, 제1 시그니처(450a)를 생성하기 위한 과정(400a)을 통하여 생성된 것일 수 있다.The user electronic device 101 may check the first signature 450b stored in the signature database 460b. According to various embodiments, the process of checking the first signature 450b stored in the signature database 460b may be performed by the signature extractor 323b. According to various embodiments, the first signature 450b stored in the signature database 460b may be generated through the process 400a for generating the first signature 450a, which is described with reference to FIG. 4A.

사용자 전자 장치(101)는 시그니처 데이터베이스(460b)에 저장된 제1 시그니처(450b)와 어플리케이션 캐시 파일(470b)에 의하여 생성된 제2 시그니처(455b)를 비교할 수 있다. 다양한 실시예에 따라서, 제1 시그니처(450b)와 제2 시그니처(455b)를 비교하는 과정은 비교부(321b)에 의하여 수행될 수 있다. 다양한 실시예에 따라서, 사용자 전자 장치(101)는 제1 시그니처(450b)와 제2 시그니처(455b)가 동일한지 여부에 기초하여 어플리케이션의 무결성을 확인할 수 있다. 제1 시그니처(450b)와 제2 시그니처(455b)가 동일한지 여부에 기초하여 어플리케이션의 무결성을 확인하는 구체적인 동작에 대해서는 도 8, 도 9a 및 도 9b를 참조하여 후술한다.The user electronic device 101 may compare the first signature 450b stored in the signature database 460b with the second signature 455b generated by the application cache file 470b. According to various embodiments, a process of comparing the first signature 450b and the second signature 455b may be performed by the comparison unit 321b. According to various embodiments, the user electronic device 101 may check the integrity of the application based on whether the first signature 450b and the second signature 455b are the same. A specific operation to check the integrity of the application based on whether the first signature 450b and the second signature 455b are the same will be described later with reference to FIGS. 8, 9a, and 9b.

도 5는 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 도면을 도시한다. 전자 장치(502)(예를 들어, 프로세서(120))는 어플리케이션 서버(501)로부터 어플리케이션의 설치 파일을 수신(510)할 수 있다. 다양한 실시예에 따라서, 어플리케이션의 설치 파일은 어플리케이션 패키지를 포함할 수 있다.FIG. 5 illustrates a diagram for explaining the operation of an electronic device according to various embodiments. The electronic device 502 (eg, processor 120) may receive (510) the installation file of the application from the application server 501. According to various embodiments, the installation file of an application may include an application package.

전자 장치(502)는 시그니처 데이터베이스(503)를 참조하여 제1 시그니처를 확인(520)할 수 있다. 다양한 실시예에 따라서, 시그니처 데이터베이스(503)는 어플리케이션 서버(501)로부터 수신된 어플리케이션의 설치 파일 내에 포함될 수 있다. 시그니처 데이터베이스(503)가 어플리케이션 서버(501)로부터 수신된 어플리케이션의 설치 파일 내에 포함되는 경우, 전자 장치(502)(예를 들어, 프로세서(120))는 어플리케이션의 설치 파일에 기초하여 제1 시그니처를 확인(520)할 수 있다. 다양한 실시예에 따라서, 시그니처 데이터베이스(503)는 전자 장치(502) 또는 어플리케이션 서버(501)와 별개인 외부 서버에 포함될 수 있다. 다양한 실시예에 따라서, 시그니처 데이터베이스(503)는 어플리케이션 서버(501)에 포함될 수 있다. 시그니처 데이터베이스(503)가 전자 장치(502) 또는 어플리케이션 서버(501)와 별개인 외부 서버에 포함되는 경우 또는 시그니처 데이터베이스(503)가 어플리케이션 서버(501)에 포함되는 경우, 전자 장치(502)는 통신 모듈(예를 들어, 통신 모듈(190))을 통하여 시그니처 데이터베이스(503)로부터 제1 시그니처를 수신함으로써 제1 시그니처를 확인(520)할 수 있다.The electronic device 502 may check the first signature (520) by referring to the signature database 503. According to various embodiments, the signature database 503 may be included in an installation file of an application received from the application server 501. When the signature database 503 is included in the installation file of the application received from the application server 501, the electronic device 502 (e.g., processor 120) generates the first signature based on the installation file of the application. You can check (520). According to various embodiments, the signature database 503 may be included in an external server separate from the electronic device 502 or the application server 501. According to various embodiments, the signature database 503 may be included in the application server 501. When the signature database 503 is included in an external server separate from the electronic device 502 or the application server 501, or when the signature database 503 is included in the application server 501, the electronic device 502 communicates The first signature may be confirmed (520) by receiving the first signature from the signature database 503 through a module (eg, communication module 190).

전자 장치(502)는 어플리케이션 실행 명령을 확인(530)할 수 있다. 다양한 실시예에 따라서, 전자 장치(502)(예를 들어, 프로세서(120))는 입력 장치(150), 표시 장치(160) 내의 터치 회로, 또는 인터페이스(177) 중 적어도 하나를 통하여 어플리케이션 실행 명령이 입력되었다는 것을 확인할 수 있다.The electronic device 502 may check the application execution command (530). According to various embodiments, the electronic device 502 (e.g., the processor 120) executes an application execution command through at least one of the input device 150, the touch circuit within the display device 160, or the interface 177. You can confirm that this has been entered.

전자 장치(502)는 어플리케이션 실행 명령이 확인(530)되는 것에 응답하여, 제2 시그니처를 확인(540)할 수 있다. 제2 시그니처를 확인(540)하는 과정의 상세 사항에 대해서는 도 4b를 참조하여 상술하였으므로, 여기에서 중복하여 설명하지 않는다.The electronic device 502 may confirm the second signature (540) in response to the application execution command being confirmed (530). Details of the process of verifying the second signature (540) have been described in detail with reference to FIG. 4B, and will not be repeated here.

전자 장치(502)는 제2 시그니처가 제1 시그니처와 동일한지 여부에 기초하여 어플리케이션의 무결성 유무를 확인(550)할 수 있다. 제2 시그니처가 제1 시그니처와 동일한지 여부에 기초하여 어플리케이션의 무결성 유무를 확인(550)하는 동작의 상세 사항에 대해서는 도 8, 도 9a 및 도 9b를 참조하여 후술한다.The electronic device 502 may check (550) whether the application has integrity based on whether the second signature is the same as the first signature. Details of the operation of checking (550) whether the application has integrity based on whether the second signature is the same as the first signature will be described later with reference to FIGS. 8, 9A, and 9B.

비록 도 5에는 제1 시그니처를 확인(520)하는 과정이 어플리케이션 실행 명령 확인(530) 이전에 이루어지는 것으로 도시되었으나, 다양한 실시예에 따라서, 제1 시그니처를 확인(520)하는 과정이 일어나는 시점은 제2 시그니처가 제1 시그니처와 동일한지 여부를 확인하기 이전이라면 제한이 없다. 예를 들어, 전자 장치(502)는 어플리케이션 실행 명령 확인(530)에 응답하여 제2 시그니처를 확인(540)한 후 제1 시그니처를 확인(520)할 수 있다. Although the process of confirming the first signature (520) is shown in FIG. 5 as being performed before the application execution command confirmation (530), according to various embodiments, the point in time when the process of confirming the first signature (520) occurs is There is no limit as long as it is before checking whether the 2 signature is the same as the first signature. For example, the electronic device 502 may check the second signature (540) and then check the first signature (520) in response to the application execution command confirmation (530).

도 6은 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 흐름도를 도시한다. 다양한 실시예에 따라서, 도 6에 도시된 동작(600)은 전자 장치(예를 들어, 전자 장치(101))에 포함된 프로세서(예를 들어, 프로세서(120))에 의하여 수행될 수 있다.Figure 6 shows a flowchart for explaining the operation of an electronic device according to various embodiments. According to various embodiments, operation 600 shown in FIG. 6 may be performed by a processor (eg, processor 120) included in an electronic device (eg, electronic device 101).

610 동작에서, 전자 장치(예를 들어, 전자 장치(101))에 포함된 프로세서(예를 들어, 프로세서(120))는 어플리케이션 패키지 및 시그니처 데이터베이스를 포함하는 어플리케이션의 설치 파일을 수신할 수 있다. 다양한 실시예에 따라서, 시그니처 데이터베이스는 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처를 포함할 수 있다. 다양한 실시예에 따라서, 제1 시그니처는 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역에 기초하여 확인될 수 있다. 다양한 실시예에 따라서, 제1 검증 대상 코드 영역은 어플리케이션 패키지에 대응하는 DEX 파일을 파싱한 후 매핑 규칙을 적용하여 생성된 제1 최적화된 DEX 파일로부터 오퍼레이션 코드 및 레지스터를 추출하고, 추출된 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제1 부분 중 적어도 일부일 수 있다. 다양한 실시예에 따라서, 제1 시그니처는 제1 검증 대상 코드 영역에 해시 함수를 적용하여 생성될 수 있다.In operation 610, a processor (eg, processor 120) included in an electronic device (eg, electronic device 101) may receive an installation file for an application including an application package and a signature database. According to various embodiments, the signature database may include a first signature corresponding to at least some of the application packages. According to various embodiments, the first signature may be confirmed based on the first verification target code region confirmed based on the DEX file corresponding to the application package. According to various embodiments, the first verification target code region extracts operation codes and registers from the first optimized DEX file generated by parsing the DEX file corresponding to the application package and applying mapping rules, and extracts the extracted operation code. And it may be at least a part of a plurality of first parts that are confirmed by parsing the register in function units or code area units. According to various embodiments, the first signature may be generated by applying a hash function to the first verification target code region.

620 동작에서, 프로세서(120)는 어플리케이션의 실행 명령에 응답하여, 제2 시그니처를 확인할 수 있다. 다양한 실시예에 따라서, 프로세서(120)는 어플리케이션의 실행 명령에 응답하여, 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역에 기초하여 제2 시그니처를 확인할 수 있다. 다양한 실시예에 따라서, 프로세서(120)는 어플리케이션의 ODEX 파일로부터 제2 최적화된 DEX 파일을 추출하고, 제2 최적화된 DEX 파일로부터 오퍼레이션 코드 및 레지스터를 추출하고, 추출된 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제2 부분 중 적어도 일부를 제2 검증 대상 코드 영역으로서 확인할 수 있다. 다양한 실시예에 따라서, 제2 최적화된 DEX 파일은 어플리케이션의 ODEX 파일로부터 추출될 수 있다. 다양한 실시예에 따라서, 프로세서(120)는 제2 검증 대상 코드 영역에 해시 함수를 적용하여 제2 시그니처를 생성함으로써 제2 시그니처를 확인할 수 있다.In operation 620, the processor 120 may check the second signature in response to an execution command of the application. According to various embodiments, the processor 120 may confirm the second signature based on the second verification target code region confirmed based on the ODEX file of the application in response to the execution command of the application. According to various embodiments, the processor 120 extracts a second optimized DEX file from the ODEX file of the application, extracts operation codes and registers from the second optimized DEX file, and converts the extracted operation codes and registers into function units. Alternatively, at least some of the plurality of second parts confirmed by parsing in units of code areas can be confirmed as the second code area to be verified. According to various embodiments, the second optimized DEX file may be extracted from the application's ODEX file. According to various embodiments, the processor 120 may verify the second signature by applying a hash function to the second verification target code region to generate the second signature.

630 동작에서, 프로세서(120)는 시그니처 데이터베이스로부터 제1 시그니처를 확인할 수 있다. 비록, 도 6에는 630 동작이 620 동작 다음에 수행되는 것으로 도시되었으나, 다양한 실시예에 따라서, 630 동작은 제2 시그니처가 제1 시그니처와 동일한지 여부를 확인하는 동작이 수행되기 전이라면 임의의 다른 시점에 수행되어도 무방하다. 예를 들어, 630 동작은, 어플리케이션의 실행 명령이 확인된 후 제2 시그니처를 확인하기 전에 수행될 수 있다.In operation 630, the processor 120 may check the first signature from the signature database. Although operation 630 is shown in FIG. 6 as being performed after operation 620, according to various embodiments, operation 630 is any other operation before the operation of checking whether the second signature is the same as the first signature is performed. It may be performed at any time. For example, operation 630 may be performed after the execution command of the application is confirmed but before checking the second signature.

640 동작에서, 프로세서(120)는 제2 시그니처가 제1 시그니처와 동일한지 여부에 기초하여 어플리케이션의 무결성 유무를 확인할 수 있다. 어플리케이션의 무결성 유무를 확인하는 과정에 대한 세부 사항은 도 7 및 도 8을 참조하여 후술한다.In operation 640, the processor 120 may check whether the application has integrity based on whether the second signature is the same as the first signature. Details of the process of checking the integrity of the application will be described later with reference to FIGS. 7 and 8.

도 7은 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 흐름도를 도시한다. 구체적으로, 도 7에 도시된 동작(700)은 제2 시그니처를 확인하기 위한 전자 장치의 동작들을 도시한다. 다양한 실시예에 따라서, 도 7에 도시된 동작(700)은 전자 장치(예를 들어, 전자 장치(101))에 포함된 프로세서(예를 들어, 프로세서(120))에 의하여 수행될 수 있다.Figure 7 shows a flowchart for explaining the operation of an electronic device according to various embodiments. Specifically, operation 700 shown in FIG. 7 illustrates operations of an electronic device for verifying a second signature. According to various embodiments, operation 700 shown in FIG. 7 may be performed by a processor (eg, processor 120) included in an electronic device (eg, electronic device 101).

710 동작에서, 전자 장치(예를 들어, 전자 장치(101))에 포함된 프로세서(예를 들어, 프로세서(120))는 어플리케이션의 ODEX 파일로부터 제2 최적화된 DEX 파일을 추출할 수 있다. 다양한 실시예에 따라서, 어플리케이션 캐시 파일(470b)은 ODEX 파일 또는 VDEX 파일일 수 있다.In operation 710, a processor (eg, processor 120) included in the electronic device (eg, electronic device 101) may extract the second optimized DEX file from the ODEX file of the application. According to various embodiments, the application cache file 470b may be an ODEX file or a VDEX file.

720 동작에서, 프로세서(120)는 제2 최적화된 DEX 파일로부터 오퍼레이션 코드 및 레지스터를 추출할 수 있다.In operation 720, processor 120 may extract operation codes and registers from the second optimized DEX file.

730 동작에서, 프로세서(120)는 오퍼레이션 코드 및 레지스터를 복수의 제2 부분으로 파싱할 수 있다. 예를 들어, 프로세서(120)는 오퍼레이션 코드 및 레지스터를 함수 단위로 파싱할 수 있다. 다양한 실시예에 따라서, 프로세서(120)는 오퍼레이션 코드 및 레지스터를 코드 영역 단위로 파싱할 수 있다.At operation 730, processor 120 may parse the operation code and registers into a plurality of second parts. For example, the processor 120 may parse operation codes and registers in function units. According to various embodiments, the processor 120 may parse operation codes and registers on a code region basis.

740 동작에서, 프로세서(120)는 복수의 제2 부분 중 적어도 일부를 제2 검증 대상 코드 영역으로서 확인할 수 있다.In operation 740, the processor 120 may identify at least some of the plurality of second parts as the second verification target code region.

750 동작에서, 프로세서(120)는 제2 검증 대상 코드 영역에 해시 함수를 적용하여 제2 시그니처로서 확인할 수 있다.In operation 750, the processor 120 may verify the second signature by applying a hash function to the second verification target code region.

도 8은 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 흐름도를 도시한다. 구체적으로, 도 8에 도시된 동작(800)은 제1 시그니처와 제2 시그니처가 동일한지 여부에 기초하여 어플리케이션의 무결성을 확인하기 위한 동작을 도시한다. 다양한 실시예에 따라서, 도 8에 도시된 동작(800)은 어플리케이션이 설치된 전자 장치(예를 들어, 전자 장치(101))에 포함된 프로세서(예를 들어, 프로세서(120))에 의하여 수행될 수 있다.Figure 8 shows a flowchart for explaining the operation of an electronic device according to various embodiments. Specifically, operation 800 shown in FIG. 8 illustrates an operation for verifying the integrity of an application based on whether the first signature and the second signature are the same. According to various embodiments, operation 800 shown in FIG. 8 may be performed by a processor (e.g., processor 120) included in an electronic device (e.g., electronic device 101) on which the application is installed. You can.

810 동작에서, 프로세서(120)는 제2 시그니처가 제1 시그니처와 동일한지 여부를 확인할 수 있다. 다양한 실시예에 따라서, 제2 시그니처는 어플리케이션의 ODEX 파일에 기초하여 생성된 것일 수 있다. 다양한 실시예에 따라서, 제2 시그니처는 어플리케이션의 VDEX 파일에 기초하여 생성된 것일 수 있다. 그 외 제2 시그니처 및 제1 시그니처의 생성 과정의 세부 사항에 대해서는 도 4a 및 도 4b를 참조하여 상술하였으므로 여기에서 중복하여 설명하지 않는다.In operation 810, the processor 120 may check whether the second signature is the same as the first signature. According to various embodiments, the second signature may be generated based on the ODEX file of the application. According to various embodiments, the second signature may be generated based on the VDEX file of the application. Other details of the process of generating the second signature and the first signature have been described in detail with reference to FIGS. 4A and 4B and will not be repeated here.

제2 시그니처가 제1 시그니처와 동일하다고 확인되는 경우, 820 동작에서, 프로세서(120)는 어플리케이션의 무결성이 있다고 확인할 수 있다. 제2 시그니처가 제1 시그니처와 동일하지 않다고 확인되는 경우, 830 동작에서, 프로세서(120)는 어플리케이션의 무결성이 없다고 확인할 수 있다.If the second signature is confirmed to be the same as the first signature, in operation 820, the processor 120 may confirm that the application has integrity. If it is determined that the second signature is not the same as the first signature, in operation 830, the processor 120 may confirm that there is no integrity of the application.

도 9a 및 도 9b는 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 흐름도를 도시한다. 구체적으로, 도 9a 및 도 9b에 도시된 동작(900)은 제1 시그니처와 제2 시그니처가 동일한지 여부에 기초하여 어플리케이션의 무결성을 확인하기 위한 동작을 도시한다. 다양한 실시예에 따라서, 도 9a 및 도 9b에 도시된 동작(900)은 어플리케이션이 설치된 전자 장치(예를 들어, 전자 장치(101))에 포함된 프로세서(예를 들어, 프로세서(120))에 의하여 수행될 수 있다.FIGS. 9A and 9B show flowcharts for explaining the operation of an electronic device according to various embodiments. Specifically, operation 900 shown in FIGS. 9A and 9B illustrates an operation for verifying the integrity of an application based on whether the first signature and the second signature are the same. According to various embodiments, the operation 900 shown in FIGS. 9A and 9B is performed on a processor (e.g., processor 120) included in an electronic device (e.g., electronic device 101) on which an application is installed. It can be performed by:

910 동작에서, 프로세서(120)는 어플리케이션의 실행 명령을 확인할 수 있다. 920 동작에서, 프로세서(120)는 어플리케이션의 ODEX 파일로부터 제2 최적화된 DEX 파일을 추출하려고 시도할 수 있다. 다양한 실시예에 따라서, 전자 장치(101)의 운영 체제가 안드로이드 버전 8 미만인 경우, 어플리케이션의 ODEX 파일 내에 최적화된 DEX가 포함되므로, 프로세서(120)는 어플리케이션의 ODEX 파일에 기초하여 제2 최적화된 DEX 파일을 추출할 수 있다. 또는, 다양한 실시예에 따라서, 전자 장치(101)의 운영 체제가 안드로이드 버전 8 이상인 경우, 최적화된 DEX는 어플리케이션의 ODEX 파일이 아니라 어플리케이션의 VDEX 파일 내에 포함되므로, 프로세서(120)는 어플리케이션의 ODEX 파일에 기초하여 제2 최적화된 DEX 파일을 추출하는 데 실패할 수 있다. In operation 910, the processor 120 may check the execution command of the application. At operation 920, processor 120 may attempt to extract a second optimized DEX file from the application's ODEX file. According to various embodiments, when the operating system of the electronic device 101 is Android version 8 or lower, the optimized DEX is included in the ODEX file of the application, so the processor 120 generates the second optimized DEX based on the ODEX file of the application. You can extract files. Alternatively, according to various embodiments, when the operating system of the electronic device 101 is Android version 8 or higher, the optimized DEX is included in the VDEX file of the application rather than the ODEX file of the application, so the processor 120 stores the ODEX file of the application. Based on this, extracting the second optimized DEX file may fail.

930 동작에서, 프로세서(120)는 어플리케이션의 ODEX 파일로부터 제2 최적화된 DEX 파일이 추출되는지 여부를 확인할 수 있다. 920 동작을 참조하여 상술한 바와 같이, 다양한 실시예에 따라서, 최적화된 DEX가 어플리케이션의 ODEX 파일에 포함되는지 아니면 어플리케이션의 VDEX 파일 내에 포함되는지 여부, 또는, 전자 장치(101)의 운영 체제의 버전에 따라서 어플리케이션의 ODEX 파일로부터 제2 최적화된 DEX 파일이 추출되는지 여부가 상이할 수 있다.In operation 930, the processor 120 may check whether the second optimized DEX file is extracted from the ODEX file of the application. As described above with reference to operation 920, depending on various embodiments, whether the optimized DEX is included in the application's ODEX file or the application's VDEX file, or depending on the version of the operating system of the electronic device 101. Therefore, whether the second optimized DEX file is extracted from the ODEX file of the application may differ.

어플리케이션의 ODEX 파일로부터 제2 최적화된 DEX 파일이 추출되는 것으로 확인되는 경우, 931 동작에서, 프로세서(120)는 어플리케이션의 ODEX 파일로부터 추출된 제2 최적화된 DEX 파일에 기초하여 제2 시그니처를 확인할 수 있다. 제2 최적화된 DEX 파일에 기초하여 제2 시그니처를 확인하는 과정의 세부 사항에 대해서는 도 4b를 참조하여 상술한 바와 동일하므로, 여기에서 중복하여 설명하지 않는다.If it is determined that the second optimized DEX file is extracted from the application's ODEX file, in operation 931, processor 120 may verify the second signature based on the second optimized DEX file extracted from the application's ODEX file. there is. The details of the process of confirming the second signature based on the second optimized DEX file are the same as described above with reference to FIG. 4B, and will not be described herein.

940 동작에서, 프로세서(120)는 어플리케이션의 ODEX 파일로부터 추출된 제2 최적화된 DEX 파일에 기초하여 생성된 제2 시그니처가 시그니처 데이터베이스를 참조하여 확인되는 제1 시그니처와 동일한지 여부를 확인할 수 있다. 제1 시그니처에 관한 세부 사항은 도 4a를 참조하여 상술하였으므로 여기에서 중복하여 설명하지 않는다.In operation 940, the processor 120 may check whether the second signature generated based on the second optimized DEX file extracted from the ODEX file of the application is the same as the first signature confirmed by referring to the signature database. Details regarding the first signature have been described above with reference to FIG. 4A and will not be repeated here.

어플리케이션의 ODEX 파일에 기초하여 생성된 제2 시그니처가 제1 시그니처와 동일하다고 확인되는 경우, 941 동작에서, 프로세서(120)는 어플리케이션의 무결성이 있다고 확인할 수 있다. 어플리케이션의 ODEX 파일에 기초하여 생성된 제2 시그니처가 제1 시그니처와 동일하지 않다고 확인되는 경우, 942 동작에서, 프로세서(120)는 어플리케이션의 무결성이 없다고 확인할 수 있다.If the second signature generated based on the ODEX file of the application is confirmed to be identical to the first signature, in operation 941, the processor 120 may confirm that the application has integrity. If it is determined that the second signature generated based on the ODEX file of the application is not the same as the first signature, in operation 942, the processor 120 may confirm that the application does not have integrity.

어플리케이션의 ODEX 파일로부터 제2 최적화된 DEX 파일이 추출되지 않는다고 확인되는 경우, 932 동작에서, 프로세서(120)는 어플리케이션의 VDEX 파일로부터 제3 최적화된 DEX 파일을 추출할 수 있다. 950 동작에서, 프로세서(120)는 제3 최적화된 DEX 파일에 기초하여 제3 시그니처를 확인할 수 있다. 도 4b를 참조하여 설명한, 어플리케이션 캐시 파일로부터 제2 시그니처를 확인하는 과정에 대한 세부 사항이 932 동작 및 950 동작에 동일하게 적용될 수 있으므로, 여기에서 중복하여 설명하지 않는다.If it is determined that the second optimized DEX file is not extracted from the application's ODEX file, at operation 932, processor 120 may extract the third optimized DEX file from the application's VDEX file. At operation 950, processor 120 may verify the third signature based on the third optimized DEX file. Since the details of the process of checking the second signature from the application cache file, described with reference to FIG. 4B, can be equally applied to operations 932 and 950, they will not be repeatedly described here.

960 동작에서, 프로세서(120)는 제3 시그니처가 제1 시그니처와 동일한지 여부를 확인할 수 있다. 제3 시그니처가 제1 시그니처와 동일하다고 확인되는 경우, 961 동작에서, 프로세서(120)는 어플리케이션의 무결성이 있다고 확인할 수 있다. 제3 시그니처가 제1 시그니처와 동일하지 않다고 확인되는 경우, 962 동작에서, 프로세서(120)는 어플리케이션의 무결성이 없다고 확인할 수 있다. In operation 960, the processor 120 may check whether the third signature is the same as the first signature. If the third signature is confirmed to be the same as the first signature, in operation 961, the processor 120 may confirm that the application has integrity. If it is determined that the third signature is not the same as the first signature, in operation 962, the processor 120 may confirm that there is no integrity of the application.

도 10은 다양한 실시예에 따른 전자 장치의 동작을 설명하기 위한 흐름도를 도시한다. 다양한 실시예에 따라서, 도 10에 도시된 동작(1000)은 전자 장치(예를 들어, 전자 장치(101))에 포함된 프로세서(예를 들어, 프로세서(120))에 의하여 수행될 수 있다.Figure 10 shows a flowchart for explaining the operation of an electronic device according to various embodiments. According to various embodiments, operation 1000 shown in FIG. 10 may be performed by a processor (eg, processor 120) included in an electronic device (eg, electronic device 101).

1010 동작에서, 전자 장치(예를 들어, 전자 장치(101))에 포함된 프로세서(예를 들어, 프로세서(120))는 어플리케이션 패키지를 포함하는 어플리케이션의 설치 파일을 수신할 수 있다.In operation 1010, a processor (eg, processor 120) included in an electronic device (eg, electronic device 101) may receive an installation file of an application including an application package.

1020 동작에서, 프로세서(120)는 시그니처 데이터베이스로부터 제1 시그니처를 수신할 수 있다. 다양한 실시예에 따라서, 1020 동작은 1010 동작에서 수신된 어플리케이션 설치 파일에 대응되는 어플리케이션의 실행 명령에 응답하여 수행될 수 있다. 다양한 실시예에 따라서, 프로세서(120)는 통신 모듈(190)을 통하여 시그니처 데이터베이스로부터 제1 시그니처를 수신할 수 있다. 다양한 실시예에 따라서, 시그니처 데이터베이스는 전자 장치(101) 외부의 서버에 포함될 수 있다. 다양한 실시예에 따라서, 시그니처 데이터베이스는 1010 동작에서 어플리케이션의 설치 파일을 프로세서(120)에 제공하는 어플리케이션 서버에 포함될 수 있다.In operation 1020, processor 120 may receive a first signature from a signature database. According to various embodiments, operation 1020 may be performed in response to an execution command of the application corresponding to the application installation file received in operation 1010. According to various embodiments, the processor 120 may receive the first signature from the signature database through the communication module 190. According to various embodiments, the signature database may be included in a server external to the electronic device 101. According to various embodiments, the signature database may be included in the application server that provides the installation file of the application to the processor 120 in operation 1010.

1030 동작에서, 프로세서(120)는 어플리케이션의 실행 명령에 응답하여 제2 시그니처를 확인할 수 있다. 제2 시그니처의 확인 과정에 대해서는 도 4b를 참조하여 상술하였으므로 여기에서 중복하여 설명하지 않는다.In operation 1030, the processor 120 may check the second signature in response to an execution command of the application. The verification process of the second signature has been described in detail with reference to FIG. 4B and will not be repeated here.

1040 동작에서, 프로세서(120)는 제2 시그니처가 제1 시그니처와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인할 수 있다. 어플리케이션의 무결성 유무를 확인하는 과정에 대한 세부 사항은 도 7 및 도 8을 참조하여 상술하였으므로 여기에서 중복하여 설명하지 않는다.In operation 1040, the processor 120 may check whether the application has integrity based on whether the second signature is the same as the first signature. Details of the process of checking the integrity of the application have been described in detail with reference to FIGS. 7 and 8 and will not be repeated here.

다양한 실시예에 따라서, 전자 장치(101)는, 통신 모듈(190); 및 프로세서(120)를 포함하고, 상기 프로세서(120)는, 어플리케이션 패키지, 및 상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처(450a, 450b)를 포함하는 시그니처 데이터베이스(460a, 460b)를 포함하는 어플리케이션의 설치 파일을 상기 통신 모듈(190)을 통하여 수신하고 - 상기 제1 시그니처(450a, 450b)는, 상기 어플리케이션 패키지에 대응하는 DEX 파일(420a)에 기초하여 확인되는 제1 검증 대상 코드 영역(450a)에 기초하여 확인됨-, 상기 시그니처 데이터베이스(460a, 460b)로부터 상기 제1 시그니처(450a, 450b)를 확인하고, 상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일(470b)에 기초하여 확인되는 제2 검증 대상 코드 영역(440b)에 기초한 제2 시그니처(455b)를 확인하고, 상기 제2 시그니처(455b)가 상기 제1 시그니처(450a, 450b)와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하도록 설정될 수 있다.According to various embodiments, the electronic device 101 includes a communication module 190; and a processor 120, wherein the processor 120 includes an application package and a signature database 460a, 460b including first signatures 450a, 450b corresponding to at least some of the application packages. The installation file of the application is received through the communication module 190, and the first signatures 450a and 450b are a first verification target code region confirmed based on the DEX file 420a corresponding to the application package ( Verified based on 450a) - Verifies the first signature (450a, 450b) from the signature database (460a, 460b), and in response to an execution command of the application, based on the ODEX file (470b) of the application Check the second signature (455b) based on the second verification target code region (440b), and the application based on whether the second signature (455b) is the same as the first signature (450a, 450b) It can be set to check the presence or absence of integrity.

다양한 실시예에 따라서, 상기 제1 검증 대상 코드 영역(450a)은 상기 DEX 파일(420a)에 매핑 규칙을 적용하여 생성된 제1 최적화된 DEX 파일(430a)로부터 추출되는 오퍼레이션 코드 및 레지스터의 적어도 일부일 수 있다.According to various embodiments, the first verification target code region 450a is at least a portion of the operation code and register extracted from the first optimized DEX file 430a generated by applying a mapping rule to the DEX file 420a. You can.

다양한 실시예에 따라서, 상기 제1 검증 대상 코드 영역(450a)은 상기 제1 최적화된 DEX 파일(430a)로부터 추출되는 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제1 부분 중 적어도 일부일 수 있다.According to various embodiments, the first verification target code area 450a is a plurality of first verification target code areas 450a that are confirmed by parsing the operation code and register extracted from the first optimized DEX file 430a on a function basis or a code area basis. It may be at least some of the parts.

다양한 실시예에 따라서, 상기 제2 검증 대상 코드 영역(440b)은 상기 어플리케이션의 ODEX 파일(470b)로부터 추출된 제2 최적화된 DEX 파일(430b)로부터 추출되는 오퍼레이션 코드 및 레지스터의 적어도 일부일 수 있다.According to various embodiments, the second code area to be verified (440b) may be at least a portion of the operation code and registers extracted from the second optimized DEX file (430b) extracted from the ODEX file (470b) of the application.

다양한 실시예에 따라서, 상기 제2 검증 대상 코드 영역(440b)은 상기 제2 최적화된 DEX 파일(430b)로부터 추출되는 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제2 부분 중 적어도 일부일 수 있다.According to various embodiments, the second code area to be verified (440b) is a plurality of second code areas that are confirmed by parsing the operation code and register extracted from the second optimized DEX file (430b) on a function basis or a code area basis. It may be at least some of the parts.

다양한 실시예에 따라서, 상기 제1 시그니처(450a, 450b)는 상기 제1 검증 대상 코드 영역(450a)에 해시 함수를 적용하여 생성되고, 상기 제2 시그니처(455b)는 상기 제2 검증 대상 코드 영역(440b)에 해시 함수를 적용하여 생성될 수 있다.According to various embodiments, the first signatures 450a and 450b are generated by applying a hash function to the first code region to be verified (450a), and the second signature (455b) is generated by applying a hash function to the code region to be verified (450a). It can be generated by applying a hash function to (440b).

다양한 실시예에 따라서, 상기 프로세서(120)는, 상기 제2 시그니처(455b)가 상기 제1 시그니처(450a, 450b)와 동일하다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 있다고 확인하고, 상기 제2 시그니처(455b)가 상기 제1 시그니처(450a, 450b)와 동일하지 않다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 없다고 확인하도록 설정될 수 있다.According to various embodiments, the processor 120 determines that the application has integrity based on confirmation that the second signature 455b is the same as the first signatures 450a and 450b, and Based on confirmation that the second signature 455b is not the same as the first signatures 450a and 450b, it can be set to confirm that there is no integrity of the application.

다양한 실시예에 따라서, 상기 프로세서(120)는, 상기 어플리케이션의 ODEX 파일로부터 상기 제2 최적화된 DEX 파일(430b)을 추출할 수 없다고 확인되는 것에 기초하여: 상기 어플리케이션의 VDEX 파일로부터 제3 최적화된 DEX 파일을 추출하고; 상기 제3 최적화된 DEX 파일로부터 제3 검증 대상 코드 영역을 추출하고; 상기 제3 검증 대상 코드 영역에 기초한 제3 시그니처를 확인하고; 상기 제3 시그니처가 상기 제1 시그니처(450a, 450b)와 동일한지 여부를 확인하고; 상기 제3 시그니처가 상기 제1 시그니처(450a, 450b)와 동일하다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 있다고 확인하고; 상기 제3 시그니처가 상기 제1 시그니처(450a, 450b)와 동일하지 않다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 없다고 확인하도록 설정될 수 있다.According to various embodiments, the processor 120, based on determining that the second optimized DEX file 430b cannot be extracted from the application's ODEX file: extracts the third optimized DEX file 430b from the application's VDEX file. Extract the DEX file; extracting a third verification target code region from the third optimized DEX file; verifying a third signature based on the third code region to be verified; Check whether the third signature is the same as the first signature (450a, 450b); Confirm that there is integrity of the application based on the third signature being confirmed to be the same as the first signature (450a, 450b); Based on confirmation that the third signature is not the same as the first signatures 450a and 450b, it can be configured to confirm that there is no integrity of the application.

다양한 실시예에 따라서, 전자 장치(101)는, 통신 모듈(190); 및 프로세서(120)를 포함하고, 상기 프로세서(120)는: 어플리케이션 패키지를 포함하는 어플리케이션의 설치 파일을 상기 통신 모듈(190)을 통하여 수신하고, 상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처(450a, 450b)를 포함하는 시그니처 데이터베이스(460a, 460b)로부터, 상기 통신 모듈(190)을 통하여 상기 제1 시그니처(450a, 450b)를 수신하고 - 상기 제1 시그니처(450a, 450b)는, 상기 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역(450a)에 기초하여 확인됨-, 상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역(440b)에 기초한 제2 시그니처(455b)를 확인하고; 상기 제2 시그니처(455b)가 상기 제1 시그니처(450a, 450b)와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하도록 설정될 수 있다.According to various embodiments, the electronic device 101 includes a communication module 190; and a processor 120, wherein the processor 120: receives an installation file of an application including an application package through the communication module 190, and creates a first signature corresponding to at least a portion of the application package ( Receive the first signatures 450a, 450b from the signature databases 460a, 460b including 450a, 450b through the communication module 190 - the first signatures 450a, 450b are stored in the application Verified based on the first verification target code region 450a, verified based on the DEX file corresponding to the package -, In response to an execution command of the application, a second verification target verified based on the ODEX file of the application verify the second signature 455b based on the code region 440b; The second signature 455b may be set to check the integrity of the application based on whether it is the same as the first signatures 450a and 450b.

다양한 실시예에 따라서, 상기 어플리케이션의 설치 파일은 어플리케이션 서버로부터 상기 전자 장치(101)에 수신되고, 상기 시그니처 데이터베이스(460a, 460b)는 상기 어플리케이션 서버와 연관될 수 있다.According to various embodiments, the installation file of the application may be received from the application server to the electronic device 101, and the signature databases 460a and 460b may be associated with the application server.

다양한 실시예에 따라서, 어플리케이션의 무결성 검증 방법은: 어플리케이션 패키지, 및 상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처(450a, 450b)를 포함하는 시그니처 데이터베이스(460a, 460b)를 포함하는 상기 어플리케이션의 설치 파일을 수신하는 동작 - 상기 제1 시그니처(450a, 450b)는, 상기 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역(450a)에 기초하여 확인됨-; 상기 시그니처 데이터베이스(460a, 460b)로부터 상기 제1 시그니처(450a, 450b)를 확인하는 동작; 상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역(440b)에 기초한 제2 시그니처(455b)를 확인하는 동작; 상기 제2 시그니처(455b)가 상기 제1 시그니처(450a, 450b)와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하는 동작을 포함할 수 있다.According to various embodiments, a method for verifying the integrity of an application includes: an application package, and a signature database 460a, 460b including first signatures 450a, 450b corresponding to at least some of the application packages. An operation of receiving an installation file - the first signatures 450a and 450b are confirmed based on a first verification target code region 450a, which is confirmed based on a DEX file corresponding to the application package; Verifying the first signature (450a, 450b) from the signature database (460a, 460b); In response to an execution command of the application, verifying a second signature (455b) based on a second code region to be verified (440b) confirmed based on the ODEX file of the application; It may include an operation of checking the integrity of the application based on whether the second signature (455b) is the same as the first signature (450a, 450b).

다양한 실시예에 따라서, 상기 제1 검증 대상 코드 영역(450a)은 상기 DEX 파일에 매핑 규칙을 적용하여 생성된 제1 최적화된 DEX 파일(430a)로부터 추출되는 오퍼레이션 코드 및 레지스터의 적어도 일부일 수 있다.According to various embodiments, the first verification target code area 450a may be at least a portion of the operation code and register extracted from the first optimized DEX file 430a generated by applying a mapping rule to the DEX file.

다양한 실시예에 따라서, 상기 제1 검증 대상 코드 영역(450a)은 상기 제1 최적화된 DEX 파일(430a)로부터 추출되는 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제1 부분 중 적어도 일부일 수 있다.According to various embodiments, the first verification target code area 450a is a plurality of first verification target code areas 450a that are confirmed by parsing the operation code and register extracted from the first optimized DEX file 430a on a function basis or a code area basis. It may be at least some of the parts.

다양한 실시예에 따라서, 상기 제2 시그니처(455b)를 확인하는 동작은, 상기 어플리케이션의 상기 ODEX 파일로부터 추출된 제2 최적화된 DEX 파일(430b)로부터 추출되는 오퍼레이션 코드 및 레지스터의 적어도 일부를 상기 제2 검증 대상 코드 영역(440b)으로서 확인하는 동작을 포함할 수 있다.According to various embodiments, the operation of checking the second signature 455b includes at least a portion of the operation code and registers extracted from the second optimized DEX file 430b extracted from the ODEX file of the application. 2 It may include a verification operation as the verification target code area 440b.

다양한 실시예에 따라서, 상기 제2 검증 대상 코드 영역(440b)은 상기 제2 최적화된 DEX 파일(430b)로부터 추출되는 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제2 부분 중 적어도 일부일 수 있다.According to various embodiments, the second code area to be verified (440b) is a plurality of second code areas that are confirmed by parsing the operation code and register extracted from the second optimized DEX file (430b) on a function basis or a code area basis. It may be at least some of the parts.

다양한 실시예에 따라서, 상기 제1 시그니처(450a, 450b)는 상기 제1 검증 대상 코드 영역(450a)에 해시 함수를 적용하여 생성되고, 상기 제2 시그니처(455b)를 확인하는 동작은, 상기 제2 검증 대상 코드 영역(440b)에 해시 함수를 적용하는 동작을 포함할 수 있다.According to various embodiments, the first signatures 450a and 450b are generated by applying a hash function to the first verification target code region 450a, and the operation of verifying the second signature 455b includes the first verification target code region 450a. 2 An operation of applying a hash function to the verification target code area 440b may be included.

다양한 실시예에 따라서, 제1항에 있어서, 상기 어플리케이션의 무결성 유무를 확인하는 동작은, 상기 제2 시그니처(455b)가 상기 제1 시그니처(450a, 450b)와 동일하다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 있다고 확인하는 동작, 및 상기 제2 시그니처(455b)가 상기 제1 시그니처(450a, 450b)와 동일하지 않다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 없다고 확인하는 동작을 포함할 수 있다.According to various embodiments, according to claim 1, the operation of checking the integrity of the application is based on confirming that the second signature (455b) is the same as the first signature (450a, 450b), Confirming that there is integrity of the application, and based on confirming that the second signature (455b) is not the same as the first signatures (450a, 450b), confirming that there is no integrity of the application. there is.

다양한 실시예에 따라서, 상기 방법은, 상기 어플리케이션의 ODEX 파일로부터 상기 제2 최적화된 DEX 파일(430b)을 추출할 수 없다고 확인되는 것에 기초하여: 상기 어플리케이션의 VDEX 파일로부터 제3 최적화된 DEX 파일을 추출하는 동작; 상기 제3 최적화된 DEX 파일로부터 제3 검증 대상 코드 영역을 추출하는 동작; 상기 제3 검증 대상 코드 영역에 기초한 제3 시그니처를 확인하는 동작; 상기 제3 시그니처가 상기 제1 시그니처(450a, 450b)와 동일한지 여부를 확인하는 동작; 상기 제3 시그니처가 상기 제1 시그니처(450a, 450b)와 동일하다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성 검증이 성공하였다고 확인하는 동작; 상기 제3 시그니처가 상기 제1 시그니처(450a, 450b)와 동일하지 않다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성 검증이 실패하였다고 확인하는 동작을 더 포함할 수 있다.According to various embodiments, the method may include, based on determining that the second optimized DEX file 430b cannot be extracted from the application's ODEX file: extracting a third optimized DEX file from the application's VDEX file; The action of extracting; Extracting a third verification target code region from the third optimized DEX file; Verifying a third signature based on the third code region to be verified; Checking whether the third signature is the same as the first signature (450a, 450b); Confirming that integrity verification of the application is successful based on confirmation that the third signature is identical to the first signature (450a, 450b); Based on confirmation that the third signature is not the same as the first signatures 450a and 450b, the method may further include confirming that integrity verification of the application has failed.

다양한 실시예에 따라서, 어플리케이션의 무결성 검증 방법은: 어플리케이션 패키지를 포함하는 상기 어플리케이션의 설치 파일을 수신하는 동작; 상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처(450a, 450b)를 포함하는 시그니처 데이터베이스(460a, 460b)로부터 상기 제1 시그니처(450a, 450b)를 수신하는 동작 - 상기 제1 시그니처(450a, 450b)는, 상기 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역(450a)에 기초하여 확인됨-; 상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역(440b)에 기초한 제2 시그니처(455b)를 확인하는 동작; 상기 제2 시그니처(455b)가 상기 제1 시그니처(450a, 450b)와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하는 동작을 포함할 수 있다.According to various embodiments, a method for verifying the integrity of an application includes: receiving an installation file of the application including an application package; An operation of receiving the first signatures (450a, 450b) from a signature database (460a, 460b) containing the first signatures (450a, 450b) corresponding to at least some of the application packages - the first signatures (450a, 450b) ) is confirmed based on the first verification target code region 450a, which is confirmed based on the DEX file corresponding to the application package -; In response to an execution command of the application, verifying a second signature (455b) based on a second code region to be verified (440b) confirmed based on the ODEX file of the application; It may include an operation of checking the integrity of the application based on whether the second signature (455b) is the same as the first signature (450a, 450b).

다양한 실시예에 따라서, 상기 어플리케이션의 설치 파일은 어플리케이션 서버로부터 상기 전자 장치(101)에 수신되고, 상기 시그니처 데이터베이스(460a, 460b)는 상기 어플리케이션 서버와 연관될 수 있다.According to various embodiments, the installation file of the application may be received from the application server to the electronic device 101, and the signature databases 460a and 460b may be associated with the application server.

본 문서에 개시된 다양한 실시예들에 따른 전자 장치는 다양한 형태의 장치가 될 수 있다. 전자 장치는, 예를 들면, 휴대용 통신 장치 (예: 스마트폰), 컴퓨터 장치, 휴대용 멀티미디어 장치, 휴대용 의료 기기, 카메라, 웨어러블 장치, 또는 가전 장치를 포함할 수 있다. 본 문서의 실시예에 따른 전자 장치는 전술한 기기들에 한정되지 않는다.Electronic devices according to various embodiments disclosed in this document may be of various types. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to embodiments of this document are not limited to the above-described devices.

본 문서의 다양한 실시예들 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시예들로 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나","A 또는 B 중 적어도 하나,""A, B 또는 C," "A, B 및 C 중 적어도 하나,"및 "A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제 1", "제 2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제 1) 구성요소가 다른(예: 제 2) 구성요소에, "기능적으로" 또는 "통신적으로"라는 용어와 함께 또는 이런 용어 없이, "커플드" 또는 "커넥티드"라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제 3 구성요소를 통하여 연결될 수 있다는 것을 의미한다.The various embodiments of this document and the terms used herein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various changes, equivalents, or replacements of the embodiments. In connection with the description of the drawings, similar reference numbers may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of the above items, unless the relevant context clearly indicates otherwise. In this document, “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 “A. Each of phrases such as “at least one of , B, or C” may include any one of the items listed together in the corresponding phrase, or any possible combination thereof. Terms such as "first", "second", or "first" or "second" may be used simply to distinguish one component from another, and to refer to those components in other respects (e.g., importance or order) is not limited. One (e.g., first) component is said to be “coupled” or “connected” to another (e.g., second) component, with or without the terms “functionally” or “communicatively.” Where mentioned, it means that any of the components can be connected to the other components directly (e.g. wired), wirelessly, or through a third component.

본 문서에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로 등의 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일실시예에 따르면, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다. The term “module” used in 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 an integrated part or a minimum unit of the parts or a part thereof that performs one or more functions. For example, according to one embodiment, the module may be implemented in the form of an application-specific integrated circuit (ASIC).

본 문서의 다양한 실시예들은 기기(machine)(예: 전자 장치(101)) 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리(136) 또는 외장 메모리(138))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램(140))로서 구현될 수 있다. 예를 들면, 기기(예: 전자 장치(101))의 프로세서(예: 프로세서(120))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장매체 는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, ‘비일시적’은 저장매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.Various embodiments of the present document are one or more instructions stored in a storage medium (e.g., built-in memory 136 or external memory 138) that can be read by a machine (e.g., electronic device 101). It may be implemented as software (e.g., program 140) including these. For example, a processor (e.g., processor 120) of a device (e.g., electronic device 101) may call at least one command among one or more commands stored from a storage medium and execute it. This allows the device to be operated to perform at least one function according to the at least one instruction called. The one or more instructions may include code generated by a compiler or code that can be executed by an interpreter. Device-readable storage media may be provided in the form of non-transitory storage media. Here, 'non-transitory' only means that the storage medium is a tangible device and does not contain signals (e.g. electromagnetic waves). This term refers to cases where data is stored semi-permanently in the storage medium. There is no distinction between temporary storage cases.

일실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두개의 사용자 장치들(예: 스마트폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.According to one embodiment, methods according to various embodiments disclosed in this document may be included and provided in a computer program product. Computer program products are commodities and can be traded between sellers and buyers. The computer program product may be distributed in the form of a machine-readable storage medium (e.g. compact disc read only memory (CD-ROM)) or via an application store (e.g. Play Store TM ) or on two user devices (e.g. It can be distributed (e.g. downloaded or uploaded) directly between smartphones) or online. In the case of online distribution, at least a portion of the computer program product may be at least temporarily stored or temporarily created in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or a relay server.

다양한 실시예들에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있다. 다양한 실시예들에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 대체적으로 또는 추가적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 다양한 실시예들에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다.According to various embodiments, each component (eg, module or program) of the above-described components may include a single entity or a plurality of entities. According to various embodiments, one or more of the components or operations described above may be omitted, or one or more other components or operations may be added. Alternatively or additionally, multiple components (eg, modules or programs) may be integrated into a single component. In this case, the integrated component may perform one or more functions of each component of the plurality of components identically or similarly to those performed by the corresponding component of the plurality of components prior to the integration. . According to various embodiments, operations performed by a module, program, or other component may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, or omitted. Alternatively, one or more other operations may be added.

Claims (20)

전자 장치에 있어서,
통신 모듈; 및
프로세서를 포함하고,
상기 프로세서는,
어플리케이션 패키지, 및 상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처를 포함하는 시그니처 데이터베이스를 포함하는 어플리케이션의 설치 파일을 상기 통신 모듈을 통하여 수신하고 - 상기 제1 시그니처는, 상기 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역에 기초하여 확인됨-,
상기 시그니처 데이터베이스로부터 상기 제1 시그니처를 확인하고,
상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역에 기초한 제2 시그니처를 확인하고,
상기 제2 시그니처가 상기 제1 시그니처와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하도록 설정되며,
상기 제1 검증 대상 코드 영역은 상기 DEX 파일에 매핑 규칙을 적용하여 생성된 제1 최적화된 DEX 파일로부터 추출되는 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제1 부분 중 적어도 일부이고,
상기 제2 검증 대상 코드 영역은 상기 어플리케이션의 ODEX 파일로부터 추출된 제2 최적화된 DEX 파일로부터 추출되는 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제2 부분 중 적어도 일부이고,
상기 프로세서는,
상기 어플리케이션의 ODEX 파일로부터 상기 제2 최적화된 DEX 파일을 추출할 수 없다고 확인되는 것에 기초하여:
상기 어플리케이션의 VDEX 파일로부터 제3 최적화된 DEX 파일을 추출하고;
상기 제3 최적화된 DEX 파일로부터 제3 검증 대상 코드 영역을 추출하고;
상기 제3 검증 대상 코드 영역에 기초한 제3 시그니처를 확인하고;
상기 제3 시그니처가 상기 제1 시그니처와 동일한지 여부를 확인하고;
상기 제3 시그니처가 상기 제1 시그니처와 동일하다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 있다고 확인하고;
상기 제3 시그니처가 상기 제1 시그니처와 동일하지 않다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 없다고 확인하도록 설정되는, 전자 장치.
In electronic devices,
communication module; and
Includes a processor,
The processor,
Receive, through the communication module, an installation file of an application including an application package and a signature database including a first signature corresponding to at least a portion of the application package, wherein the first signature is a DEX corresponding to the application package. Verified based on the first verification target code region verified based on the file -,
Confirming the first signature from the signature database,
In response to an execution command of the application, confirming a second signature based on a second verification target code region confirmed based on the ODEX file of the application,
is set to check the integrity of the application based on whether the second signature is the same as the first signature,
The first verification target code area is one of a plurality of first parts confirmed by parsing the operation code and register extracted from the first optimized DEX file generated by applying the mapping rule to the DEX file on a function basis or a code area basis. At least some,
The second verification target code area is at least a part of a plurality of second parts confirmed by parsing the operation code and registers extracted from the second optimized DEX file extracted from the ODEX file of the application on a function basis or a code area basis. ,
The processor,
Based on determining that the second optimized DEX file cannot be extracted from the application's ODEX file:
extract a third optimized DEX file from the VDEX file of the application;
extracting a third verification target code region from the third optimized DEX file;
verifying a third signature based on the third code region to be verified;
check whether the third signature is the same as the first signature;
based on confirming that the third signature is identical to the first signature, confirming that there is integrity of the application;
The electronic device is configured to confirm that there is no integrity of the application based on confirming that the third signature is not the same as the first signature.
삭제delete 삭제delete 삭제delete 삭제delete 제1항에 있어서,
상기 제1 시그니처는 상기 제1 검증 대상 코드 영역에 해시 함수를 적용하여 생성되고,
상기 제2 시그니처는 상기 제2 검증 대상 코드 영역에 해시 함수를 적용하여 생성되는, 전자 장치.
According to paragraph 1,
The first signature is generated by applying a hash function to the first verification target code region,
The second signature is generated by applying a hash function to the second verification target code region.
제1항에 있어서, 상기 프로세서는,
상기 제2 시그니처가 상기 제1 시그니처와 동일하다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 있다고 확인하고,
상기 제2 시그니처가 상기 제1 시그니처와 동일하지 않다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 없다고 확인하도록 설정되는, 전자 장치.
The method of claim 1, wherein the processor:
Based on confirmation that the second signature is identical to the first signature, confirm that the application has integrity,
The electronic device is configured to confirm that there is no integrity of the application based on confirming that the second signature is not the same as the first signature.
삭제delete 전자 장치에 있어서,
통신 모듈; 및
프로세서를 포함하고,
상기 프로세서는:
어플리케이션 패키지를 포함하는 어플리케이션의 설치 파일을 어플리케이션 서버로부터 상기 통신 모듈을 통하여 수신하고,
상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처를 포함하는 시그니처 데이터베이스로부터, 상기 통신 모듈을 통하여 상기 제1 시그니처를 수신하고 - 상기 제1 시그니처는, 상기 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역에 기초하여 확인되고, 상기 시그니처 데이터베이스는 상기 어플리케이션 서버와 별개인 외부 서버임-,
상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역에 기초한 제2 시그니처를 확인하고;
상기 제2 시그니처가 상기 제1 시그니처와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하도록 설정되고,
상기 제1 검증 대상 코드 영역은 상기 DEX 파일에 매핑 규칙을 적용하여 생성된 제1 최적화된 DEX 파일로부터 추출되는 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제1 부분 중 적어도 일부이고,
상기 제2 검증 대상 코드 영역은 상기 어플리케이션의 ODEX 파일로부터 추출된 제2 최적화된 DEX 파일로부터 추출되는 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제2 부분 중 적어도 일부이고,
상기 프로세서는,
상기 어플리케이션의 ODEX 파일로부터 상기 제2 최적화된 DEX 파일을 추출할 수 없다고 확인되는 것에 기초하여:
상기 어플리케이션의 VDEX 파일로부터 제3 최적화된 DEX 파일을 추출하고;
상기 제3 최적화된 DEX 파일로부터 제3 검증 대상 코드 영역을 추출하고;
상기 제3 검증 대상 코드 영역에 기초한 제3 시그니처를 확인하고;
상기 제3 시그니처가 상기 제1 시그니처와 동일한지 여부를 확인하고;
상기 제3 시그니처가 상기 제1 시그니처와 동일하다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 있다고 확인하고;
상기 제3 시그니처가 상기 제1 시그니처와 동일하지 않다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 없다고 확인하도록 설정되는, 전자 장치.
In electronic devices,
communication module; and
Includes a processor,
The processor:
Receiving the installation file of the application including the application package from the application server through the communication module,
Receive the first signature through the communication module from a signature database including a first signature corresponding to at least some of the application packages, and confirm the first signature based on a DEX file corresponding to the application package. is confirmed based on the first verification target code area, and the signature database is an external server separate from the application server.
In response to an execution command of the application, confirming a second signature based on a second verification target code region confirmed based on the ODEX file of the application;
is set to check the integrity of the application based on whether the second signature is the same as the first signature,
The first verification target code area is one of a plurality of first parts confirmed by parsing the operation code and register extracted from the first optimized DEX file generated by applying the mapping rule to the DEX file on a function basis or a code area basis. At least some,
The second verification target code area is at least a part of a plurality of second parts confirmed by parsing the operation code and registers extracted from the second optimized DEX file extracted from the ODEX file of the application on a function basis or a code area basis. ,
The processor,
Based on determining that the second optimized DEX file cannot be extracted from the application's ODEX file:
extract a third optimized DEX file from the VDEX file of the application;
extracting a third verification target code region from the third optimized DEX file;
verifying a third signature based on the third code region to be verified;
check whether the third signature is the same as the first signature;
based on confirming that the third signature is identical to the first signature, confirming that there is integrity of the application;
The electronic device is configured to confirm that there is no integrity of the application based on confirming that the third signature is not the same as the first signature.
삭제delete 전자 장치에서 수행되는, 어플리케이션의 무결성 검증 방법에 있어서:
어플리케이션 패키지, 및 상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처를 포함하는 시그니처 데이터베이스를 포함하는 상기 어플리케이션의 설치 파일을 수신하는 동작 - 상기 제1 시그니처는, 상기 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역에 기초하여 확인됨-;
상기 시그니처 데이터베이스로부터 상기 제1 시그니처를 확인하는 동작;
상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역에 기초한 제2 시그니처를 확인하는 동작; 및
상기 제2 시그니처가 상기 제1 시그니처와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하는 동작을 포함하되,
상기 제1 검증 대상 코드 영역은 상기 DEX 파일에 매핑 규칙을 적용하여 생성된 제1 최적화된 DEX 파일로부터 추출되는 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제1 부분 중 적어도 일부이고,
상기 제2 검증 대상 코드 영역은 상기 어플리케이션의 ODEX 파일로부터 추출된 제2 최적화된 DEX 파일로부터 추출되는 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제2 부분 중 적어도 일부이고,
상기 어플리케이션의 ODEX 파일로부터 상기 제2 최적화된 DEX 파일을 추출할 수 없다고 확인되는 것에 기초하여:
상기 어플리케이션의 VDEX 파일로부터 제3 최적화된 DEX 파일을 추출하는 동작;
상기 제3 최적화된 DEX 파일로부터 제3 검증 대상 코드 영역을 추출하는 동작;
상기 제3 검증 대상 코드 영역에 기초한 제3 시그니처를 확인하는 동작;
상기 제3 시그니처가 상기 제1 시그니처와 동일한지 여부를 확인하는 동작;
상기 제3 시그니처가 상기 제1 시그니처와 동일하다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 있다고 확인하는 동작; 및
상기 제3 시그니처가 상기 제1 시그니처와 동일하지 않다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 없다고 확인하는 동작을 더 포함하는, 방법.
In a method of verifying the integrity of an application performed on an electronic device:
Receiving an installation file of the application including an application package and a signature database including a first signature corresponding to at least a portion of the application package, wherein the first signature is based on a DEX file corresponding to the application package. Confirmed based on the first verification target code area confirmed by -;
Verifying the first signature from the signature database;
In response to an execution command of the application, verifying a second signature based on a second code region to be verified that is verified based on an ODEX file of the application; and
Including the operation of confirming the integrity of the application based on whether the second signature is the same as the first signature,
The first verification target code area is one of a plurality of first parts confirmed by parsing the operation code and registers extracted from the first optimized DEX file generated by applying the mapping rule to the DEX file on a function basis or a code area basis. At least some,
The second verification target code area is at least a part of a plurality of second parts confirmed by parsing the operation code and registers extracted from the second optimized DEX file extracted from the ODEX file of the application on a function basis or a code area basis. ,
Based on determining that the second optimized DEX file cannot be extracted from the application's ODEX file:
Extracting a third optimized DEX file from the VDEX file of the application;
Extracting a third verification target code region from the third optimized DEX file;
Verifying a third signature based on the third code region to be verified;
Checking whether the third signature is the same as the first signature;
Confirming that the application has integrity based on confirmation that the third signature is identical to the first signature; and
The method further includes confirming that there is no integrity of the application based on confirming that the third signature is not the same as the first signature.
삭제delete 삭제delete 삭제delete 삭제delete 제11항에 있어서,
상기 제1 시그니처는 상기 제1 검증 대상 코드 영역에 해시 함수를 적용하여 생성되고,
상기 제2 시그니처를 확인하는 동작은, 상기 제2 검증 대상 코드 영역에 해시 함수를 적용하는 동작을 포함하는, 방법.
According to clause 11,
The first signature is generated by applying a hash function to the first verification target code region,
The operation of verifying the second signature includes applying a hash function to the second verification target code region.
제11항에 있어서, 상기 어플리케이션의 무결성 유무를 확인하는 동작은,
상기 제2 시그니처가 상기 제1 시그니처와 동일하다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 있다고 확인하는 동작, 및
상기 제2 시그니처가 상기 제1 시그니처와 동일하지 않다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 없다고 확인하는 동작을 포함하는 방법.
The method of claim 11, wherein the operation of checking the integrity of the application includes:
An operation to confirm that there is integrity of the application based on confirmation that the second signature is the same as the first signature, and
and confirming that there is no integrity of the application based on confirming that the second signature is not the same as the first signature.
삭제delete 전자 장치에서 수행되는, 어플리케이션의 무결성 검증 방법에 있어서:
어플리케이션 패키지를 포함하는 상기 어플리케이션의 설치 파일을 어플리케이션 서버로부터 수신하는 동작;
상기 어플리케이션 패키지 중 적어도 일부에 대응하는 제1 시그니처를 포함하는 시그니처 데이터베이스로부터 상기 제1 시그니처를 수신하는 동작 - 상기 제1 시그니처는, 상기 어플리케이션 패키지에 대응하는 DEX 파일에 기초하여 확인되는 제1 검증 대상 코드 영역에 기초하여 확인되고, 상기 시그니처 데이터베이스는 상기 어플리케이션 서버와 별개인 외부 서버임-;
상기 어플리케이션의 실행 명령에 응답하여, 상기 어플리케이션의 ODEX 파일에 기초하여 확인되는 제2 검증 대상 코드 영역에 기초한 제2 시그니처를 확인하는 동작; 및
상기 제2 시그니처가 상기 제1 시그니처와 동일한지 여부에 기초하여 상기 어플리케이션의 무결성 유무를 확인하는 동작을 포함하되,
상기 제1 검증 대상 코드 영역은 상기 DEX 파일에 매핑 규칙을 적용하여 생성된 제1 최적화된 DEX 파일로부터 추출되는 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제1 부분 중 적어도 일부이고,
상기 제2 검증 대상 코드 영역은 상기 어플리케이션의 ODEX 파일로부터 추출된 제2 최적화된 DEX 파일로부터 추출되는 오퍼레이션 코드 및 레지스터를 함수 단위 또는 코드 영역 단위로 파싱하여 확인되는 복수의 제2 부분 중 적어도 일부이고,
상기 어플리케이션의 ODEX 파일로부터 상기 제2 최적화된 DEX 파일을 추출할 수 없다고 확인되는 것에 기초하여:
상기 어플리케이션의 VDEX 파일로부터 제3 최적화된 DEX 파일을 추출하는 동작;
상기 제3 최적화된 DEX 파일로부터 제3 검증 대상 코드 영역을 추출하는 동작;
상기 제3 검증 대상 코드 영역에 기초한 제3 시그니처를 확인하는 동작;
상기 제3 시그니처가 상기 제1 시그니처와 동일한지 여부를 확인하는 동작;
상기 제3 시그니처가 상기 제1 시그니처와 동일하다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 있다고 확인하는 동작; 및
상기 제3 시그니처가 상기 제1 시그니처와 동일하지 않다고 확인되는 것에 기초하여, 상기 어플리케이션의 무결성이 없다고 확인하는 동작을 더 포함하는, 방법.



In a method of verifying the integrity of an application performed on an electronic device:
Receiving an installation file of the application including an application package from an application server;
An operation of receiving the first signature from a signature database including a first signature corresponding to at least some of the application packages, wherein the first signature is a first verification target confirmed based on a DEX file corresponding to the application package. verified based on code region, and the signature database is an external server separate from the application server;
In response to an execution command of the application, verifying a second signature based on a second code region to be verified that is verified based on an ODEX file of the application; and
Including the operation of confirming the integrity of the application based on whether the second signature is the same as the first signature,
The first verification target code area is one of a plurality of first parts confirmed by parsing the operation code and registers extracted from the first optimized DEX file generated by applying the mapping rule to the DEX file on a function basis or a code area basis. At least some,
The second verification target code area is at least a part of a plurality of second parts confirmed by parsing the operation code and registers extracted from the second optimized DEX file extracted from the ODEX file of the application on a function basis or a code area basis. ,
Based on determining that the second optimized DEX file cannot be extracted from the application's ODEX file:
Extracting a third optimized DEX file from the VDEX file of the application;
Extracting a third verification target code region from the third optimized DEX file;
Verifying a third signature based on the third code region to be verified;
Checking whether the third signature is the same as the first signature;
Confirming that the application has integrity based on confirmation that the third signature is identical to the first signature; and
The method further includes confirming that there is no integrity of the application based on confirming that the third signature is not the same as the first signature.



삭제delete
KR1020190014428A 2019-02-07 2019-02-07 Electronic device and method for veryfying integrity of application KR102657534B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190014428A KR102657534B1 (en) 2019-02-07 2019-02-07 Electronic device and method for veryfying integrity of application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190014428A KR102657534B1 (en) 2019-02-07 2019-02-07 Electronic device and method for veryfying integrity of application

Publications (2)

Publication Number Publication Date
KR20200097100A KR20200097100A (en) 2020-08-18
KR102657534B1 true KR102657534B1 (en) 2024-04-16

Family

ID=72265657

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190014428A KR102657534B1 (en) 2019-02-07 2019-02-07 Electronic device and method for veryfying integrity of application

Country Status (1)

Country Link
KR (1) KR102657534B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220356343A1 (en) 2020-08-04 2022-11-10 Lg Chem, Ltd. Conductive resin composition, method of preparing the same, and molded article including the same
CN114301655B (en) * 2021-12-20 2023-03-24 天翼爱音乐文化科技有限公司 Android-based data secure transmission method, system, device and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3026559A1 (en) * 2014-11-28 2016-06-01 Thomson Licensing Method and device for providing verifying application integrity

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Jia Wan et al., "Defending Application Cache Integrity of Android Runtime"(2017.12.)*

Also Published As

Publication number Publication date
KR20200097100A (en) 2020-08-18

Similar Documents

Publication Publication Date Title
US20210397748A1 (en) Method and apparatus for processing biometric information in electronic device
KR102599383B1 (en) Electronic device for displaying an executable application on a split screen and method for the same
KR20190019470A (en) Electronic device for including autograph in e-paper and control method thereof
KR102657534B1 (en) Electronic device and method for veryfying integrity of application
KR20190101643A (en) Apparatus and method for providing functions regarding keyboard layout
KR102405593B1 (en) Electronic device and method for operating data of the same
CN116679967B (en) Firmware upgrading method and device for basic input/output system
KR102657388B1 (en) Electronic device for selecting key used for encryption based on an information quantity of data to be encrypted and method for the same
US20230305919A1 (en) Electronic apparatus and operating method thereof
KR20190094746A (en) Electronic devices that are inserted into a tray for loading a sim card and control method thereof
CN114096946A (en) Method and apparatus for managing applications
KR102524517B1 (en) Electronic apparatus and operating method thereof
US20210065210A1 (en) Method for receiving merchant information and electronic device using same
KR20190099852A (en) Electronic device and method for recognizing character
KR102648539B1 (en) Electronic device and operating method thereof
US11947709B2 (en) Electronic device for controlling access to device resource and operation method thereof
KR102662050B1 (en) Electronic device and method for providing image acquired through camera to a plurality of applications
US20210174075A1 (en) Electronic device and method for processing writing input
US20210042293A1 (en) Electronic device for prohibiting loss of data in database and method for operating the same
KR102666045B1 (en) Electronic device for providing cloud service and method for operating thefeof
US20220417016A1 (en) Method for signing key management by electronic device, and electronic device therefor
US11188227B2 (en) Electronic device and key input method therefor
US20240015156A1 (en) Electronic device for controlling access to device resource and operation method thereof
US20230065478A1 (en) Electronic device comprising biometric authentication device, and method for operating same
US20220100556A1 (en) Electronic device, and method for managing life cycle of plurality of applications executed in electronic device

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant