+

KR20230170308A - Embedded Apparatus, Method for Booting therein and Method for Encrypted Firmware - Google Patents

Embedded Apparatus, Method for Booting therein and Method for Encrypted Firmware Download PDF

Info

Publication number
KR20230170308A
KR20230170308A KR1020220070660A KR20220070660A KR20230170308A KR 20230170308 A KR20230170308 A KR 20230170308A KR 1020220070660 A KR1020220070660 A KR 1020220070660A KR 20220070660 A KR20220070660 A KR 20220070660A KR 20230170308 A KR20230170308 A KR 20230170308A
Authority
KR
South Korea
Prior art keywords
firmware
key
verification code
binary
integrity verification
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
KR1020220070660A
Other languages
Korean (ko)
Other versions
KR102808180B1 (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 KR1020220070660A priority Critical patent/KR102808180B1/en
Publication of KR20230170308A publication Critical patent/KR20230170308A/en
Application granted granted Critical
Publication of KR102808180B1 publication Critical patent/KR102808180B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/572Secure firmware programming, e.g. of basic input output system [BIOS]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/575Secure boot
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Storage Device Security (AREA)

Abstract

Disclosed are an embedded apparatus, a booting method thereof, and a method for generating encrypted firmware. The embedded apparatus, according to an embodiment of the present invention, includes at least three memories of different types and a core processor. A first-type memory, a second-type memory, and a core processor comprise a falsification prevention micro-control unit. A third-type memory has firmware including an encrypted firmware integrity verification code, a boot loader, a kernel binary, and an application binary. The first-type memory can store route information for decoding a hardware integrity verification code and the firmware integrity verification code. The purpose of the present invention is to overcome the limit of a firmware security function in the embedded apparatus.

Description

임베디드 장치, 그 장치에서의 부팅 방법, 및 암호화 펌웨어 생성 방법{Embedded Apparatus, Method for Booting therein and Method for Encrypted Firmware} Embedded device, method for booting therein and method for creating encrypted firmware {Embedded Apparatus, Method for Booting therein and Method for Encrypted Firmware}

기재된 실시예는 하드웨어 보안 및 펌웨어 역공학 기술에 관한 것이다.The described embodiments relate to hardware security and firmware reverse engineering techniques.

임베디드 장치에 숨겨진 백도어 보안 문제가 점점 심각해지고 있다. 러시아에서 발견된 중국산 다리미 및 전기 주전자에서 무선 네트워크에 접속해 악성코드와 스팸을 퍼뜨리는 백도어가 발견된 것이 그 대표적인 사건이다. Backdoor security problems hidden in embedded devices are becoming increasingly serious. A representative example is the discovery of backdoors in Chinese irons and electric kettles found in Russia that connect to wireless networks and spread malware and spam.

백도어는 제품 생산 과정 중 혹은 완제품의 펌웨어를 수정하는 것으로 삽입이 가능하다. 따라서, 펌웨어가 불법 수정되었을 경우 임베디드 장치가 동작되지 않아야 한다. Backdoors can be inserted during the product production process or by modifying the firmware of the finished product. Therefore, if the firmware has been illegally modified, the embedded device should not operate.

기존 임베디드 장치들은 기기가 작을수록 펌웨어 보안 기능이 없는 경우가 대부분이거나, 일부 상용 제품에 적용된 펌웨어 보안 기능은 한계가 있다. Existing embedded devices often do not have firmware security functions the smaller they are, or the firmware security functions applied to some commercial products have limitations.

기재된 실시예는 임베디드 장치에서의 펌웨어 보안 기능의 한계를 극복하는데 그 목적이 있다. The described embodiments are aimed at overcoming the limitations of firmware security functions in embedded devices.

기재된 실시예는 임베디드 장치에서 펌웨어의 변조를 통한 백도어 삽입 공격을 방어하는데 그 목적이 있다. The purpose of the described embodiment is to prevent backdoor injection attacks through firmware modification in embedded devices.

실시예에 따른 임베디드 장치는, 적어도 세 개의 상이한 타입의 메모리들 및 코어 프로세서를 포함하되, 제1 타입 메모리, 제2 타입 메모리 및 코어 프로세서는 변조 방지 마이크로 제어 유닛으로 구성되고, 제3 타입 메모리는, 암호화된 펌웨어 무결성 검증 코드, 부트로더 및 커널 바이너리와, 앱 바이너리를 포함하는 펌웨어가 탑재되고, 제1 타입 메모리는, 하드웨어 무결성 검증 코드 및 펌웨어 무결성 검증 코드를 복호화하기 위한 루트 정보를 저장할 수 있다. An embedded device according to an embodiment includes at least three different types of memories and a core processor, wherein the first type memory, the second type memory, and the core processor are comprised of a tamper-resistant microcontrol unit, and the third type memory is comprised of a tamper-resistant microcontrol unit. , firmware including an encrypted firmware integrity verification code, a bootloader and kernel binary, and an app binary are mounted, and the first type memory may store root information for decrypting the hardware integrity verification code and the firmware integrity verification code. .

이때, 제1 타입 메모리는, 생산 장치와 소정 인증 방식에 의해 저장된 정보가 교체될 수 있다. At this time, the information stored in the first type memory can be replaced by the production device and a predetermined authentication method.

이때, 전원이 인가됨에 따라, 코어 프로세서에 의해 실행된 하드웨어 무결성 검증 코드는 루트 정보를 이용하여 펌웨어 무결성 검증 코드를 제2 타입 메모리에 복호화하고, 복호화된 펌웨어 무결성 검증 코드는 부트로더를 제3 타입 메모리 또는 제4 타입 메모리에 복호화하고, 복호화된 부트로더는 커널 바이너리를 제3 타입 메모리 또는 제4 타입 메모리에 복호화하고, 복호화된 커널 바이너리는 앱 바이너리의 무결성을 검증하여 제3 타입 메모리 또는 제4 타입 메모리에 로딩할 수 있다. At this time, as power is applied, the hardware integrity verification code executed by the core processor decrypts the firmware integrity verification code into the second type memory using the root information, and the decrypted firmware integrity verification code transfers the bootloader to the third type memory. Decrypts into memory or type 4 memory, the decrypted bootloader decrypts the kernel binary into type 3 memory or type 4 memory, and the decrypted kernel binary verifies the integrity of the app binary and stores it in type 3 memory or type 4 memory. Can be loaded into type memory.

이때, 제1 타입 메모리는, 루트 정보로 공장 암호화 키 및 펌웨어 무결성 검증 코드의 크기를 저장하고, 하드웨어 무결성 검증 코드는, 공장 암호화 키 및 펌웨어 무결성 검증 코드의 크기를 이용하여 펌웨어 무결성 검증 코드를 복호화할 수 있다. At this time, the first type memory stores the size of the factory encryption key and firmware integrity verification code as root information, and the hardware integrity verification code decrypts the firmware integrity verification code using the size of the factory encryption key and firmware integrity verification code. can do.

이때, 펌웨어에는, 제1 랜덤 키 및 부트 로더의 암호화 크기 정보가 펌웨어 무결성 검증 코드와 함께 암호화되어 저장되고, 복호화된 펌웨어 무결성 검증 코드는, 제1 랜덤 키 및 공장 암호화 키를 조합하여 공장 암호화 키로 암호화한 부트로더 키를 생성하고, 생성된 부트로더의 키와 부트 로더의 암호화 크기를 이용하여 암호화된 부트 로더의 영역을 복호화할 수 있다. At this time, the first random key and the encryption size information of the boot loader are encrypted and stored together with the firmware integrity verification code, and the decrypted firmware integrity verification code is converted into a factory encryption key by combining the first random key and the factory encryption key. An encrypted boot loader key can be generated, and the encrypted boot loader area can be decrypted using the generated boot loader key and the boot loader encryption size.

이때, 펌웨어에는, 제2 랜덤 키 및 커널 바이너리의 암호화 크기 정보가 부트로더와 함께 암호호되어 저장되고, 복호화된 부트로더는, 제2 랜덤 키 및 공장 암호화 키를 조합하여 부트로더 키로 암호화한 커널 바이너리 키를 생성하고, 생성된 커널 바이너리 키와 커널 바이너리의 암호화 크기를 이용하여 암호화된 커널 바이너리 영역을 복호화할 수 있다. At this time, in the firmware, the second random key and the encryption size information of the kernel binary are encrypted and stored together with the bootloader, and the decrypted bootloader is a kernel encrypted with the bootloader key by combining the second random key and the factory encryption key. You can generate a binary key and decrypt the encrypted kernel binary area using the generated kernel binary key and the encryption size of the kernel binary.

이때, 펌웨어에는, 앱 크기 정보 및 앱 해시 정보가 커널 바이너리와 함께 암호화되어 저장되고, 복호화된 커널 바이너리는, 앱 크기 정보를 이용하여 앱 바이너리를 해시하고, 해시된 앱 바이너리의 앱 해시 정보와의 일치 여부에 따라, 앱 바이너리의 무결성을 검증할 수 있다.At this time, in the firmware, app size information and app hash information are encrypted and stored together with the kernel binary, and the decrypted kernel binary hashes the app binary using the app size information and combines the app hash information of the hashed app binary with the app hash information. Depending on the match, the integrity of the app binary can be verified.

실시예에 따른 임베디드 장치에서의 펌웨어 부팅 방법에 있어서, 임베디드 장치는, 적어도 세 개의 상이한 타입의 메모리들 및 코어 프로세서를 포함하되, 제1 타입 메모리, 제2 타입 메모리 및 코어 프로세서는 변조 방지 마이크로 제어 유닛으로 구성되고, 제3 타입 메모리는, 암호화된 펌웨어 무결성 검증 코드, 부트로더 및 커널 바이너리와, 앱 바이너리를 포함하는 펌웨어가 탑재되고, 제1 타입 메모리는, 하드웨어 무결성 검증 코드 및 펌웨어 무결성 검증 코드를 복호화하기 위한 루트 정보를 저장하되, 전원이 인가됨에 따라, 코어 프로세서에 의해 실행된 하드웨어 무결성 검증 코드는 루트 정보를 이용하여 제2 타입 메모리에 펌웨어 무결성 검증 코드를 복호화하는 단계, 복호화된 펌웨어 무결성 검증 코드는 제3 타입 메모리 또는 제4 타입 메모리에 부트로더를 복호화하는 단계, 복호화된 부트로더는 제3 타입 메모리 또는 제4 타입 메모리에 커널 바이너리를 복호화하는 단계 및 복호화된 커널 바이너리는 앱 바이너리의 무결성을 검증하여 제3 타입 메모리 또는 제4 타입 메모리에 로딩하는 단계를 포함할 수 있다. In a firmware booting method in an embedded device according to an embodiment, the embedded device includes at least three different types of memories and a core processor, wherein the first type memory, the second type memory, and the core processor include a tamper-resistant microcontroller. It is composed of a unit, and the third type memory is equipped with firmware including an encrypted firmware integrity verification code, a bootloader and kernel binary, and an app binary, and the first type memory is equipped with a hardware integrity verification code and a firmware integrity verification code. Storing root information for decrypting, but as power is applied, the hardware integrity verification code executed by the core processor decrypts the firmware integrity verification code in the second type memory using the root information, the decrypted firmware integrity The verification code includes steps of decrypting the bootloader in the third type memory or fourth type memory, decrypting the kernel binary in the third type memory or fourth type memory in the decrypted bootloader, and decrypting the decrypted kernel binary in the app binary. It may include verifying integrity and loading it into a third type memory or a fourth type memory.

이때, 제1 타입 메모리는, 생산 장치와 소정 인증 방식에 의해 저장된 정보가 교체될 수 있다.At this time, the information stored in the first type memory can be replaced by the production device and a predetermined authentication method.

이때, 제1 타입 메모리는, 루트 정보로 공장 암호화 키 및 펌웨어 무결성 검증 코드의 크기를 저장하고, 하드웨어 무결성 검증 코드는, 공장 암호화 키 및 펌웨어 무결성 검증 코드의 크기를 이용하여 펌웨어 무결성 검증 코드를 복호화할 수 있다.At this time, the first type memory stores the size of the factory encryption key and firmware integrity verification code as root information, and the hardware integrity verification code decrypts the firmware integrity verification code using the size of the factory encryption key and firmware integrity verification code. can do.

이때, 펌웨어에는, 제1 랜덤 키 및 부트 로더의 암호화 크기 정보가 펌웨어 무결성 검증 코드와 함께 암호화되어 저장되고, 부트로더를 복호화하는 단계에서, 복호화된 펌웨어 무결성 검증 코드는, 제1 랜덤 키 및 공장 암호화 키를 조합하여 공장 암호화 키로 암호화한 부트로더 키를 생성하고, 생성된 부트로더의 키와 부트 로더의 암호화 크기를 이용하여 암호화된 부트 로더의 영역을 복호화할 수 있다. At this time, in the firmware, the first random key and the encryption size information of the boot loader are encrypted and stored together with the firmware integrity verification code, and in the step of decrypting the bootloader, the decrypted firmware integrity verification code is the first random key and the factory By combining the encryption keys, a bootloader key encrypted with the factory encryption key can be generated, and the encrypted bootloader area can be decrypted using the generated bootloader key and the bootloader encryption size.

이때, 펌웨어에는, 제2 랜덤 키 및 커널 바이너리의 암호화 크기 정보가 부트로더와 함께 암호호되어 저장되고, 커널 바이너리를 복호화하는 단계에서, 복호화된 부트로더는, 제2 랜덤 키 및 공장 암호화 키를 조합하여 부트로더 키로 암호화한 커널 바이너리 키를 생성하고, 생성된 커널 바이너리 키와 커널 바이너리의 암호화 크기를 이용하여 암호화된 커널 바이너리 영역을 복호화할 수 있다.At this time, in the firmware, the second random key and the encryption size information of the kernel binary are encrypted and stored together with the bootloader, and in the step of decrypting the kernel binary, the decrypted bootloader uses the second random key and the factory encryption key. By combining them, a kernel binary key encrypted with the bootloader key can be generated, and the encrypted kernel binary area can be decrypted using the generated kernel binary key and the encryption size of the kernel binary.

이때, 펌웨어에는, 앱 크기 정보 및 앱 해시 정보가 커널 바이너리와 함께 암호화되어 저장되고, 로딩하는 단계에서, 복호화된 커널 바이너리는, 앱 크기 정보를 이용하여 앱 바이너리를 해시하고, 해시된 앱 바이너리의 앱 해시 정보와의 일치 여부에 따라, 앱 바이너리의 무결성을 검증할 수 있다. At this time, in the firmware, app size information and app hash information are encrypted and stored together with the kernel binary, and at the loading stage, the decrypted kernel binary hashes the app binary using the app size information, and the hashed app binary is Depending on whether it matches the app hash information, the integrity of the app binary can be verified.

실시예에 따른 암호화 펌웨어 생성 방법은, 펌웨어 암호화에 사용될 키들을 생성하는 단계, 생성된 키들을 기반으로 펌웨어 무결성 검증 코드 영역, 부트로더 영역 및 커널 바이너리 영역을 암호화하는 단계 및 암호화 결과 및 앱 바이너리를 포함하는 펌웨어를 생성하는 단계를 포함할 수 있다. The method of generating encrypted firmware according to an embodiment includes the steps of generating keys to be used for firmware encryption, encrypting the firmware integrity verification code area, bootloader area, and kernel binary area based on the generated keys, and encrypting the encryption result and app binary. It may include the step of creating firmware that includes the firmware.

이때, 펌웨어는, 임베디드 장치에 탑재되되, 임베디드 장치는, 적어도 세 개의 상이한 타입의 메모리들 및 코어 프로세서를 포함하되, 제1 타입 메모리, 제2 타입 메모리 및 코어 프로세서는 변조 방지 마이크로 제어 유닛으로 구성되고, 제3 타입 메모리는, 펌웨어가 탑재되고, 제1 타입 메모리는, 하드웨어 무결성 검증 코드 및 펌웨어 무결성 검증 코드를 복호화하기 위한 루트 정보를 저장할 수 있다. At this time, the firmware is mounted on the embedded device, and the embedded device includes at least three different types of memories and a core processor, and the first type memory, the second type memory, and the core processor are composed of a tamper-resistant microcontrol unit. The third type memory is equipped with firmware, and the first type memory can store root information for decoding the hardware integrity verification code and the firmware integrity verification code.

이때, 키들을 생성하는 단계는, 임베디드 장치의 공장 출고 키 및 두 개의 랜덤 키들을 생성하는 단계, 제1 랜덤키 및 공장 출고키를 조합하여 공장 출고키로 암호화한 부트로더용 키를 생성하는 단계 및 제2 랜덤키 및 부트로더용 키를 조합하여 부트로드용 키로 암호화한 커널 바이너리용 키를 생성하는 단계를 포함할 수 있다. At this time, the step of generating keys includes generating a factory key of the embedded device and two random keys, combining the first random key and the factory key to generate a bootloader key encrypted with the factory key, and It may include generating a key for the kernel binary encrypted with the bootload key by combining the second random key and the bootloader key.

이때, 암호화하는 단계는, 앱 바이너리 영역의 무결성 기능이 포함된 커널 바이너리, 앱 바이너리 크기 및 앱 바이너리 해시를 커널 바이너리용 키로 암호화하는 단계, 커널 바이너리 영역 복호화 기능이 포함된 부트 로더, 제2 랜덤키 및 암호화된 커널 바이너리 영역 크기를 부트로드용 키로 암호화하는 단계 및 부트로더 영역 복호화 기능이 포함된 펌웨어 무결성 검증 코드, 제1 랜덤 키 및 암호화된 부트 로더 영역 크기를 공장 출고키로 암호화하는 단계를 포함할 수 있다. At this time, the encryption step includes a kernel binary including an integrity function of the app binary area, a step of encrypting the app binary size and the app binary hash with a key for the kernel binary, a boot loader including a kernel binary area decryption function, and a second random key. and encrypting the size of the encrypted kernel binary area with a bootload key, a firmware integrity verification code including a bootloader area decryption function, a first random key, and encrypting the encrypted bootloader area size with a factory key. You can.

기재된 실시예에 따라, 임베디드 장치에서의 펌웨어 보안 기능의 한계를 극복하는데 그 목적이 있다. According to the described embodiments, the goal is to overcome the limitations of firmware security functions in embedded devices.

기재된 실시예는 임베디드 장치에서 펌웨어의 변조를 통한 백도어 삽입 공격을 방어하는데 그 목적이 있다. The purpose of the described embodiment is to prevent backdoor injection attacks through firmware modification in embedded devices.

도 1은 일부 상용 제품에 적용된 펌웨어 보안 기능의 예시도이다.
도 2는 백도어 삽입에 의한 보안 실패 예시도이다.
도 3은 실시예에 따른 임베디드 장치의 개략적인 블록 구성도이다.
도 4는 실시예에 따른 펌웨어 생성 방법을 설명하기 위한 흐름도이다.
도 5는 실시예에 따라 생성된 암호화된 펌웨어가 탐재된 임베디드 장치의 예시도이다.
도 6은 실시예에 따른 임베디드 장치에서의 펌웨어 부팅 방법을 설명하기 위한 순서도이다.
도 7은 실시예에 따른 컴퓨터 시스템 구성을 나타낸 도면이다.
Figure 1 is an example diagram of firmware security functions applied to some commercial products.
Figure 2 is an example of a security failure due to backdoor insertion.
Figure 3 is a schematic block diagram of an embedded device according to an embodiment.
Figure 4 is a flowchart for explaining a firmware generation method according to an embodiment.
Figure 5 is an example diagram of an embedded device loaded with encrypted firmware created according to an embodiment.
Figure 6 is a flowchart for explaining a firmware booting method in an embedded device according to an embodiment.
Figure 7 is a diagram showing the configuration of a computer system according to an embodiment.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 것이며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다.The advantages and features of the present invention and methods for achieving them will become clear by referring to the embodiments described in detail below along with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below and will be implemented in various different forms. The present embodiments only serve to ensure that the disclosure of the present invention is complete and that common knowledge in the technical field to which the present invention pertains is not limited. It is provided to fully inform those who have the scope of the invention, and the present invention is only defined by the scope of the claims. Like reference numerals refer to like elements throughout the specification.

비록 "제1" 또는 "제2" 등이 다양한 구성요소를 서술하기 위해서 사용되나, 이러한 구성요소는 상기와 같은 용어에 의해 제한되지 않는다. 상기와 같은 용어는 단지 하나의 구성요소를 다른 구성요소와 구별하기 위하여 사용될 수 있다. 따라서, 이하에서 언급되는 제1 구성요소는 본 발명의 기술적 사상 내에서 제2 구성요소일 수도 있다.Although terms such as “first” or “second” are used to describe various components, these components are not limited by the above terms. The above terms may be used only to distinguish one component from another component. Accordingly, the first component mentioned below may also be the second component within the technical spirit of the present invention.

본 명세서에서 사용된 용어는 실시예를 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 또는 "포함하는(comprising)"은 언급된 구성요소 또는 단계가 하나 이상의 다른 구성요소 또는 단계의 존재 또는 추가를 배제하지 않는다는 의미를 내포한다.The terms used in this specification are for describing embodiments and are not intended to limit the invention. As used herein, singular forms also include plural forms, unless specifically stated otherwise in the context. As used in the specification, “comprises” or “comprising” implies that the mentioned component or step does not exclude the presence or addition of one or more other components or steps.

다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 해석될 수 있다. 또한, 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다.Unless otherwise defined, all terms used in this specification can be interpreted as meanings commonly understood by those skilled in the art to which the present invention pertains. Additionally, terms defined in commonly used dictionaries are not interpreted ideally or excessively unless clearly specifically defined.

이하에서는, 도 1 내지 도 7을 참조하여 실시예에 따른 임베디드 장치, 그 장치에서의 부팅 방법, 및 암호화 펌웨어 생성 방법이 상세히 설명된다.Below, an embedded device according to an embodiment, a booting method in the device, and an encryption firmware generation method are described in detail with reference to FIGS. 1 to 7.

도 1은 일부 상용 제품에 적용된 펌웨어 보안 기능의 예시도이고, 도 2는 백도어 삽입에 의한 보안 실패 예시도이다. Figure 1 is an example of a firmware security function applied to some commercial products, and Figure 2 is an example of a security failure due to backdoor insertion.

도 1을 참조하면, 펌웨어(Firmware)(1)에서 커널 바이너리(Kernel Binary)(20) 및 앱 바이너리(Application Binary)(30)는 패킹(packing)되어 있다. Referring to FIG. 1, the kernel binary (20) and the application binary (30) are packed in the firmware (1).

이때, 패킹은, 원본 데이터를 암호화(Encryption) 또는 압축(Compression) 등을 한 것을 의미한다. At this time, packing means encrypting or compressing the original data.

이러한 펌웨어(1)가 탑재된 임베디드 장치에 전원이 인가되면, 부트로더(Bootloader)(10)부터 실행된다. 부트로더(10)는 무결성 검증 코드(Integrity verification code)를 통해, 커널 바이너리(Kernel Binary)(20)의 무결성을 검증한다. When power is applied to an embedded device equipped with such firmware (1), it is executed starting from the bootloader (10). The bootloader 10 verifies the integrity of the kernel binary 20 through an integrity verification code.

이때, 검증이 성공(Verification success)할 경우, 패킹되어 있는 커널 바이너리(20)는 언패킹(unpacking)될 수 있다. 참고로, 구현 방식에 따라 언패킹이 먼저 수행된 후, 무결성 검증이 이루어질 수도 있다. At this time, if verification succeeds, the packed kernel binary 20 can be unpacked. For reference, depending on the implementation method, unpacking may be performed first and then integrity verification may be performed.

반면, 무결성 검증이 실패할 경우, 부트로더(10)는 펌웨어 조작으로 판단하여 부팅 과정을 중단한다. On the other hand, if the integrity verification fails, the bootloader 10 determines that the firmware has been manipulated and stops the booting process.

그런데, 전술한 바와 같은 펌웨어 보안 기능은 다음과 같은 문제점이 있다. However, the firmware security function described above has the following problems.

도 2에 도시된 바와 같이, 공격자가 장비에서 추출한 펌웨어 혹은 장비 제작사 제공 펌웨어를 언패킹하고, 언패킹된 펌웨어 커널 바이너리(20)나 앱 바이너리(30)에 백도어를 삽입할 수 있다. As shown in Figure 2, an attacker can unpack firmware extracted from the device or firmware provided by the device manufacturer and insert a backdoor into the unpacked firmware kernel binary 20 or app binary 30.

이때, 삽입된 백도어는, 부트로더(10)와 커널 바이너리(20)의 무결성 검증코드 부분을 우회할 수 있도록 조작되어 진다. 그리고, 백도어가 삽입된 펌웨어는 다시 패킹되어, 장비에 삽입된다. At this time, the inserted backdoor is manipulated to bypass the integrity verification code portion of the bootloader 10 and the kernel binary 20. Then, the firmware with the backdoor inserted is repackaged and inserted into the device.

이런 상태에서, 임베디드 장치가 가동될 경우, 무결성 검증 코드가 우회(jump)되어 정상적으로 부팅되며, 백도어가 실행될 수 있다. In this state, when the embedded device is started, the integrity verification code is bypassed (jumped) and boots normally, and the backdoor can be executed.

따라서, 실시예에서는 전술한 바와 같이 임베디드 장치에서 펌웨어의 변조를 통한 백도어 삽입 공격을 방어하기 위해, 변조 방지(tamper-proof) 마이크로 제어 유닛(Micro Controller Unit, MCU)을 활용한 펌웨어 구성을 제안한다.Therefore, in the embodiment, as described above, in order to prevent backdoor injection attacks through firmware modification in embedded devices, a firmware configuration using a tamper-proof micro control unit (MCU) is proposed. .

도 3은 실시예에 따른 임베디드 장치의 개략적인 블록 구성도이다. Figure 3 is a schematic block diagram of an embedded device according to an embodiment.

도 3을 참조하면, 실시예에 따른 임베디드 장치(100)는, 코어 프로세서(Core Processor)(111) 및 적어도 세 개의 상이한 타입의 메모리들(121, 122, 123, 124)을 포함할 수 있다. Referring to FIG. 3, the embedded device 100 according to an embodiment may include a core processor 111 and at least three different types of memories 121, 122, 123, and 124.

이때, 예컨대, 코어 프로세서(111)는, ARM 등일 수 있고, 제1 타입 메모리(T1_Memory)(121)의 예는 ROM(Read-Only Memory) 계열일 수 있고, 제2 타입 메모리(T2_Memory)(122)는 NOR 플래시 계열일 수 있고, 제3 타입 메모리(T3_Memory)(123)는 NAND 플래시 계열일 수 있고, 제4 타입 메모리(T4_Memory)(124)는 RAM(Random Access Memory) 계열이 될 수 있다. 그러나, 이는 일 예일 뿐, 본 발명은 이에 한정되지 않는다. At this time, for example, the core processor 111 may be ARM, etc., an example of the first type memory (T1_Memory) 121 may be a ROM (Read-Only Memory) series, and the second type memory (T2_Memory) 122 ) may be a NOR flash series, the third type memory (T3_Memory) 123 may be a NAND flash series, and the fourth type memory (T4_Memory) 124 may be a RAM (Random Access Memory) series. However, this is only an example, and the present invention is not limited thereto.

실시예에 따라, 제1 타입 메모리(121), 제2 타입 메모리(122) 및 코어 프로세서(111)는 변조 방지 마이크로 제어 유닛(tamper-proof MCU)(110)으로 구성될 수 있다. 이로써, 변조 방지 마이크로 제어 유닛(110)은, 레이저 등의 물리적 해체 및 재조립을 통한 변조를 방지할 수 있다. Depending on the embodiment, the first type memory 121, the second type memory 122, and the core processor 111 may be configured as a tamper-proof microcontrol unit (tamper-proof MCU) 110. As a result, the tamper-resistant microcontrol unit 110 can prevent tampering through physical disassembly and reassembly of lasers, etc.

제3 타입 메모리(123)는, 실시예에 따라 생성된 암호화된 펌웨어(130)가 탑재된다. 이때, 펌웨어(130)에는, 암호화된 펌웨어 무결성 검증 코드(In-Firmware integrity verification Code, IFC) 영역(131), 암호화된 부트로더(Boot Loader, BL) 영역(132), 암호화된 커널 바이너리(Kernal Binary, KERN_BIN) 영역(133) 및 앱 바이너리(Application Binary, APP_BIN)(134)를 포함할 수 있다. The third type memory 123 is loaded with encrypted firmware 130 created according to the embodiment. At this time, the firmware 130 includes an encrypted firmware integrity verification code (IFC) area 131, an encrypted boot loader (BL) area 132, and an encrypted kernel binary (Kernal). It may include a Binary, KERN_BIN) area (133) and an Application Binary (APP_BIN) (134).

제1 타입 메모리(121)는, 하드웨어 무결성 검증 코드(In-Hardware integrity verification Code, IHC)과, 펌웨어 무결성 검증 코드(IFC) 영역(131)를 복호화하기 위한 루트 정보를 저장할 수 있다. The first type memory 121 may store an in-hardware integrity verification code (IHC) and root information for decoding the firmware integrity verification code (IFC) area 131.

즉, 루트 정보는, 펌웨어 무결성 검증 코드(IFC) 복호화에 필요한 공장 암호화 키(Factory Crypto Key, K_F) 및 펌웨어 무결성 검증 코드(IFC)의 암호화된 크기(E_IFC_Size)를 포함할 수 있다. That is, the root information may include the factory encryption key (K_F) required to decrypt the firmware integrity verification code (IFC) and the encrypted size (E_IFC_Size) of the firmware integrity verification code (IFC).

이때, 제1 타입 메모리(121)는, 생산 장치와 소정 인증 방식에 의해 저장된 정보가 교체될 수 있다. 따라서, 하드웨어 무결성 검증 코드(In-Hardware integrity verification Code, IHC)과, 펌웨어 무결성 검증 코드(IFC) 영역(131)를 복호화하기 위한 루트 정보는 외부로 유출되거나, 인증되지 않은 장치에 의해 교체될 수 없다. At this time, the information stored in the first type memory 121 can be replaced by the production device and a predetermined authentication method. Therefore, the root information for decrypting the hardware integrity verification code (IHC) and the firmware integrity verification code (IFC) area 131 can be leaked to the outside or replaced by an unauthorized device. does not exist.

실시예에 따라, 하드웨어 무결성 검증 코드(IHC), 펌웨어 무결성 검증 코드(IFC), 부트로더(BL), 커널 바이너리(KERN_BIN) 및 앱 바이너리(APP_BIN) 순으로 복호화 및 무결성 검증이 진행될 수 있다. Depending on the embodiment, decryption and integrity verification may be performed in the following order: hardware integrity verification code (IHC), firmware integrity verification code (IFC), bootloader (BL), kernel binary (KERN_BIN), and app binary (APP_BIN).

즉, 전원이 인가됨에 따라, 코어 프로세서(111)에 의해 실행된 하드웨어 무결성 검증 코드(IHC)는 루트 정보를 이용하여 펌웨어 무결성 검증 코드(IFC) 영역(131)를 제2 타입 메모리(122)에 복호한다. 그런 후, 복호화된 펌웨어 무결성 검증 코드(IFC)는 부트로더(BL) 영역(132)을 제3 타입 메모리(123) 또는 제4 타입 메모리(124)에 복호화한다. 다음으로, 복호화된 부트로더(BL)는 커널 바이너리(KERN_BIN) 영역(133)을 제3 타입 메모리(123) 또는 제4 타입 메모리(124)에 복호화하고, 복호화된 커널 바이너리(KERN_BIN)는 앱 바이너리(APP_BIN) 영역(134)의 무결성을 검증하여 제3 타입 메모리(123) 또는 제4 타입 메모리(124)에 로딩할 수 있다. That is, as power is applied, the hardware integrity verification code (IHC) executed by the core processor 111 uses the root information to inject the firmware integrity verification code (IFC) area 131 into the second type memory 122. Decrypt. Then, the decrypted firmware integrity verification code (IFC) decrypts the bootloader (BL) area 132 into the third type memory 123 or the fourth type memory 124. Next, the decrypted bootloader (BL) decrypts the kernel binary (KERN_BIN) area 133 into the third type memory 123 or the fourth type memory 124, and the decrypted kernel binary (KERN_BIN) is stored in the app binary. The integrity of the (APP_BIN) area 134 can be verified and loaded into the third type memory 123 or the fourth type memory 124.

이때, 제3 타입 메모리(123)가 가용 여유가 있고, 실행 가능 메모리일 경우, 부트로더(BL) 영역(132) 및 커널 바이너리(KERN_BIN) 영역(133)의 복호화, 앱 바이너리(APP_BIN) 영역(134)의 로딩은 제4 타입 메모리(124)를 사용하지 않고 제3 타입 메모리(123)의 앱 바이너리 (APP_BIN) 영역(134) 아래의 여유 공간에서 이루어질 수도 있다. At this time, if the third type memory 123 has available space and is an executable memory, decoding of the bootloader (BL) area 132 and the kernel binary (KERN_BIN) area 133, and the app binary (APP_BIN) area ( Loading 134) may be performed in free space under the app binary (APP_BIN) area 134 of the third type memory 123 without using the fourth type memory 124.

전술한 바와 같이, 실시예는 IHC-IFC 구조를 통해, 기존 펌웨어를 그대로 사용할 수 있고 펌웨어 부분만 교체하여 사용할 수 있는 장점을 가진다. As described above, the embodiment has the advantage that the existing firmware can be used as is and only the firmware part can be replaced through the IHC-IFC structure.

전술한 바와 같은 임베디드 장치에 탑재되는 펌웨어는 생산 장치(Manufacturer)에 의해 암호화되어 생성될 수 있다. Firmware mounted on the above-described embedded device may be encrypted and created by the manufacturer.

도 4는 실시예에 따른 펌웨어 생성 방법을 설명하기 위한 흐름도이다. Figure 4 is a flowchart for explaining a firmware generation method according to an embodiment.

도 4를 참조하면, 실시예에 따른 펌웨어 생성 방법은, 크게 펌웨어 암호화에 사용될 키들을 생성하는 단계(S210~S230), 생성된 키들을 기반으로 펌웨어 무결성 검증 코드 영역, 부트로더 영역 및 커널 바이너리 영역을 암호화하는 단계(S240~S250) 및 암호화 결과 및 앱 바이너리를 포함하는 펌웨어를 생성하는 단계(S270)를 포함할 수 있다. Referring to FIG. 4, the firmware generation method according to the embodiment largely includes generating keys to be used for firmware encryption (S210 to S230), and based on the generated keys, the firmware integrity verification code area, bootloader area, and kernel binary area. It may include a step of encrypting (S240 to S250) and a step of generating firmware including the encryption result and app binary (S270).

상세하게는, 키들을 생성하는 단계(S210~S230)에서, 생산 장치(Manufacturer)는 임베디드 장치의 시리얼 번호 별 공장 출고 키(Factory crypto Key, K_F)와 두 개의 랜덤 키들(K_R1, K_R2)을 생성한다(S210). Specifically, in the steps of generating keys (S210 to S230), the manufacturer generates a factory crypto key (K_F) and two random keys (K_R1, K_R2) for each serial number of the embedded device. Do it (S210).

그런 후, 생산 장치(Manufacturer)는 제1 랜덤 키(K_R1)과 공장 출고키(K_F)를 조합하여 공장 출고키(K_F)로 암호화한 부트로더용 키(Bootloader crypto Key, K_B)를 생성한다(S220). Then, the manufacturer combines the first random key (K_R1) and the factory key (K_F) to generate a bootloader crypto key (K_B) encrypted with the factory key (K_F) ( S220).

그런 후, 생산 장치(Manufacturer)는 제2 랜덤 키(K_R2)와 부트로더용 키(K_B)를 조합하여 부트로더용 키(K_B)로 암호화한 커널 바이너리용 키(Kernel binary crypto Key, K_K)를 생성한다(S230).Then, the manufacturer combines the second random key (K_R2) and the boot loader key (K_B) to create a kernel binary crypto key (K_K) encrypted with the boot loader key (K_B). Create (S230).

다음으로, 암호화하는 단계(S240~S250)에서, 생산 장치(Manufacturer)는 앱 바이너리(APP_BIN) 영역 무결성 검증 기능이 포함된 커널 바이너리(KERN_BIN), 앱 바이너리의 크기(APP_Size) 및 앱 바이너리 해시(APP_Hash)를 커널 바이너리용 키(K_K)로 암호화한다(S240). Next, in the encryption step (S240~S250), the production device (Manufacturer) generates the app binary (APP_BIN), the kernel binary (KERN_BIN) including the area integrity verification function, the size of the app binary (APP_Size), and the app binary hash (APP_Hash). ) is encrypted with the key (K_K) for the kernel binary (S240).

그런 후, 생산 장치(Manufacturer)는 커널 바이너리(KERN_BIN) 영역 복호화 기능이 포함된 부트로더(BL), 제2 랜덤 키(K_R2) 및 암호화된 커널 바이너리 크기(E_KERN_Size)를 부트로더용 키(K_B)로 암호화한다(S250)Then, the manufacturing device (Manufacturer) combines the bootloader (BL) with the kernel binary (KERN_BIN) area decryption function, the second random key (K_R2), and the encrypted kernel binary size (E_KERN_Size) into the key for the bootloader (K_B). Encrypt with (S250)

그런 후, 생산 장치(Manufacturer)는 부트로더(BL) 영역 복호화 기능이 포함된 펌웨어 무결성 검증 코드(IFC), 제1 랜덤 키(K_R1) 및 암호화된 부트로더 영역 크기(E_BL_Size)를 공장 출고키(K_F)로 암호화한다(260).Then, the manufacturer sends the firmware integrity verification code (IFC) containing the bootloader (BL) area decryption function, the first random key (K_R1), and the encrypted bootloader area size (E_BL_Size) to the factory key ( Encrypt with K_F) (260).

마지막으로, 생산 장치(Manufacturer)는 암호화된 결과 및 앱 바이너리를 조합하여 펌웨어를 생성한다(S270). Finally, the manufacturer creates firmware by combining the encrypted result and app binary (S270).

도 5는 실시예에 따라 생성된 암호화된 펌웨어가 탐재된 임베디드 장치의 예시도이다. Figure 5 is an example diagram of an embedded device loaded with encrypted firmware created according to an embodiment.

도 5를 참조하면, 생산 장치(Manufacturer)는 도 4를 참조하여 설명한 방법으로 생성한 펌웨어를 임베디드 장치의 제3 타입 메모리(123) 탑재하고, 하드웨어 무결성 검증 코드(IHC) 및 펌웨어 무결성 검증 코드(IFC)의 복호화에 필요한 정보(K_F, E_IFC_Size)는 제1 타입 메모리(121)에 저장한다. Referring to FIG. 5, the manufacturer mounts the firmware generated by the method described with reference to FIG. 4 into the third type memory 123 of the embedded device, and implements a hardware integrity verification code (IHC) and a firmware integrity verification code ( Information (K_F, E_IFC_Size) required for decoding IFC is stored in the first type memory 121.

전술한 바와 같이, 제1 타입 메모리(121)에 저장된 정보는 외부로 유출되지 않고, 생산 장치와 임베디드 장치 간의 특별한 인증방식으로 교체만 가능하다.As described above, the information stored in the first type memory 121 is not leaked to the outside and can only be replaced using a special authentication method between the production device and the embedded device.

도 6은 실시예에 따른 임베디드 장치에서의 펌웨어 부팅 방법을 설명하기 위한 순서도이다. Figure 6 is a flowchart for explaining a firmware booting method in an embedded device according to an embodiment.

도 5 및 도 6을 참조하면, 임베디드 장치에 전원이 인가됨에 따라, 코어 프로세서(111)는 제1 타입 메모리(121)에 저장된 하드웨어 무결성 검증 코드(IHC)를 실행한다(S310). Referring to FIGS. 5 and 6 , as power is applied to the embedded device, the core processor 111 executes the hardware integrity verification code (IHC) stored in the first type memory 121 (S310).

실행된 하드웨어 무결성 검증 코드(IHC)는 루트 정보를 이용하여 제2 타입 메모리(122)에 펌웨어 무결성 검증 코드 영역(131)을 복호화한다(S320). The executed hardware integrity verification code (IHC) decrypts the firmware integrity verification code area 131 in the second type memory 122 using the root information (S320).

이때, 도 5를 참조하면, 하드웨어 무결성 검증 코드(IHC)는, 공장 암호화 키(K_F) 및 펌웨어 무결성 검증 코드의 크기(E_IFC_Size)를 이용하여 펌웨어 무결성 검증 코드(IFC) 영역을 복호화할 수 있다.At this time, referring to FIG. 5, the hardware integrity verification code (IHC) can decrypt the firmware integrity verification code (IFC) area using the factory encryption key (K_F) and the size (E_IFC_Size) of the firmware integrity verification code.

복호화된 펌웨어 무결성 검증 코드는 제3 타입 메모리(123) 또는 제4 타입 메모리(124)에 부트로더 영역(132)을 복호화한다(S330). The decrypted firmware integrity verification code decrypts the bootloader area 132 in the third type memory 123 or the fourth type memory 124 (S330).

이때, 도 5를 참조하면, 펌웨어(130)에는, 제1 랜덤 키(K_R1) 및 부트 로더의 암호화 크기 정보(E_BL_Size)가 펌웨어 무결성 검증 코드(IFC)와 함께 암호화되어 저장될 수 있다. At this time, referring to FIG. 5, the first random key (K_R1) and the encryption size information (E_BL_Size) of the boot loader may be encrypted and stored together with the firmware integrity verification code (IFC) in the firmware 130.

따라서, 부트로더를 복호화하는 단계(S330)에서, 복호화된 펌웨어 무결성 검증 코드(IFC)는, 제1 랜덤 키(K_R1) 및 공장 암호화 키(K_F)를 조합하여 공장 암호화 키(K_F)로 암호화한 부트로더 키(K_B)를 생성하고, 생성된 부트로더의 키(K_B)와 부트 로더의 암호화 크기(E_BL_Size)를 이용하여 암호화된 부트 로더의 영역(132)을 복호화할 수 있다. Therefore, in the step of decrypting the bootloader (S330), the decrypted firmware integrity verification code (IFC) is encrypted with the factory encryption key (K_F) by combining the first random key (K_R1) and the factory encryption key (K_F). A boot loader key (K_B) can be generated, and the encrypted boot loader area 132 can be decrypted using the generated boot loader key (K_B) and the boot loader encryption size (E_BL_Size).

복호화된 부트로더는 제3 타입 메모리(123) 또는 제4 타입 메모리(124)에 커널 바이너리 영역(133)을 복호화한다(S340). The decrypted bootloader decrypts the kernel binary area 133 in the third type memory 123 or the fourth type memory 124 (S340).

이때, 도 5를 참조하면, 펌웨어(130)에는, 제2 랜덤 키(K_R2) 및 커널 바이너리의 암호화 크기 정보(E_KERN_Size)가 부트로더와 함께 암호화되어 저장될 수 있다. At this time, referring to FIG. 5, the second random key (K_R2) and the encryption size information (E_KERN_Size) of the kernel binary may be encrypted and stored together with the bootloader.

따라서, 커널 바이너리를 복호화하는 단계(S340)에서, 복호화된 부트로더는, 제2 랜덤 키(K_R2) 및 공장 암호화 키(K_F)를 조합하여 부트로더 키(K_B)로 암호화한 커널 바이너리 키(K_K)를 생성하고, 생성된 커널 바이너리 키(K_K)와 커널 바이너리의 암호화 크기(E_KERN_Size)를 이용하여 암호화된 커널 바이너리 영역(133)을 복호화할 수 있다.Therefore, in the step of decrypting the kernel binary (S340), the decrypted bootloader combines the second random key (K_R2) and the factory encryption key (K_F) and encrypts the kernel binary key (K_K) with the bootloader key (K_B). ) can be generated, and the encrypted kernel binary area 133 can be decrypted using the generated kernel binary key (K_K) and the encryption size (E_KERN_Size) of the kernel binary.

복호화된 커널 바이너리는 앱 바이너리(134)의 무결성을 검증하여 제3 타입 메모리(123) 또는 제4 타입 메모리(124)에 로딩한다(S350). The decrypted kernel binary verifies the integrity of the app binary 134 and is loaded into the third type memory 123 or fourth type memory 124 (S350).

이때, 도 5를 참조하면, 펌웨어(130)에는 앱 크기 정보(APP_Size) 및 앱 해시 정보(APP_Hash)가 커널 바이너리와 함께 암호화되어 저장될 수 있다. At this time, referring to FIG. 5, app size information (APP_Size) and app hash information (APP_Hash) may be encrypted and stored together with the kernel binary in the firmware 130.

따라서, 로딩하는 단계(S350)에서, 복호화된 커널 바이너리는, 앱 크기 정보(APP_Size)를 이용하여 앱 바이너리를 해시하고, 해시된 앱 바이너리의 앱 해시 정보와의 일치 여부에 따라, 앱 바이너리의 무결성을 검증할 수 있다. 검증된 앱 바이너리는 제3 타입 메모리(123) 또는 제4 타입 메모리(124)에 로딩될 수 있다. Therefore, in the loading step (S350), the decrypted kernel binary hashes the app binary using app size information (APP_Size), and determines the integrity of the app binary depending on whether the hashed app binary matches the app hash information. can be verified. The verified app binary may be loaded into the third type memory 123 or the fourth type memory 124.

도 7은 실시예에 따른 컴퓨터 시스템 구성을 나타낸 도면이다.Figure 7 is a diagram showing the configuration of a computer system according to an embodiment.

실시예에 따른 임베디드 장치 및 펌웨어 생성 장치는 컴퓨터로 읽을 수 있는 기록매체와 같은 컴퓨터 시스템(1000)에서 구현될 수 있다.Embedded devices and firmware generation devices according to embodiments may be implemented in a computer system 1000 such as a computer-readable recording medium.

컴퓨터 시스템(1000)은 버스(1020)를 통하여 서로 통신하는 하나 이상의 프로세서(1010), 메모리(1030), 사용자 인터페이스 입력 장치(1040), 사용자 인터페이스 출력 장치(1050) 및 스토리지(1060)를 포함할 수 있다. 또한, 컴퓨터 시스템(1000)은 네트워크(1080)에 연결되는 네트워크 인터페이스(1070)를 더 포함할 수 있다. 프로세서(1010)는 중앙 처리 장치 또는 메모리(1030)나 스토리지(1060)에 저장된 프로그램 또는 프로세싱 인스트럭션들을 실행하는 반도체 장치일 수 있다. 메모리(1030) 및 스토리지(1060)는 휘발성 매체, 비휘발성 매체, 분리형 매체, 비분리형 매체, 통신 매체, 또는 정보 전달 매체 중에서 적어도 하나 이상을 포함하는 저장 매체일 수 있다. 예를 들어, 메모리(1030)는 ROM(1031)이나 RAM(1032)을 포함할 수 있다.Computer system 1000 may include one or more processors 1010, memory 1030, user interface input device 1040, user interface output device 1050, and storage 1060 that communicate with each other via bus 1020. You can. Additionally, the computer system 1000 may further include a network interface 1070 connected to the network 1080. The processor 1010 may be a central processing unit or a semiconductor device that executes programs or processing instructions stored in the memory 1030 or storage 1060. The memory 1030 and storage 1060 may be storage media including at least one of volatile media, non-volatile media, removable media, non-removable media, communication media, and information transfer media. For example, memory 1030 may include ROM 1031 or RAM 1032.

이상에서 첨부된 도면을 참조하여 본 발명의 실시예들을 설명하였지만, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다.Although embodiments of the present invention have been described above with reference to the attached drawings, those skilled in the art will understand that the present invention can be implemented in other specific forms without changing the technical idea or essential features. You will understand that it exists. Therefore, the embodiments described above should be understood in all respects as illustrative and not restrictive.

100 : 임베디드 장치
110 : 변조 방지 마이크로 제어 유닛
121~124 : 제1 타입 메모리~제4 타입 메모리
130 : 펌웨어
131 : 펌웨어 무결성 검증 코드 영역 132 : 부트로더 영역
133 : 커널 바이너리 영역 134 : 앱 바이너리 영역
100: Embedded device
110: Tamper-resistant microcontrol unit
121~124: 1st type memory ~ 4th type memory
130: firmware
131: Firmware integrity verification code area 132: Bootloader area
133: Kernel binary area 134: App binary area

Claims (17)

적어도 세 개의 상이한 타입의 메모리들 및 코어 프로세서를 포함하되,
제1 타입 메모리, 제2 타입 메모리 및 코어 프로세서는 변조 방지 마이크로 제어 유닛으로 구성되고,
제3 타입 메모리는,
암호화된 펌웨어 무결성 검증 코드, 부트로더 및 커널 바이너리와, 앱 바이너리를 포함하는 펌웨어가 탑재되고,
제1 타입 메모리는,
하드웨어 무결성 검증 코드 및 펌웨어 무결성 검증 코드를 복호화하기 위한 루트 정보를 저장하는, 임베디드 장치.
Comprising at least three different types of memories and a core processor,
The first type memory, the second type memory and the core processor are composed of a tamper-resistant microcontrol unit,
The third type of memory is,
It is equipped with firmware that includes encrypted firmware integrity verification code, bootloader and kernel binaries, and app binaries.
The first type memory is,
An embedded device that stores root information for decrypting hardware integrity verification code and firmware integrity verification code.
제1 항에 있어서, 제1 타입 메모리는,
생산 장치와 소정 인증 방식에 의해 저장된 정보가 교체되는, 임베디드 장치.
The method of claim 1, wherein the first type memory is:
An embedded device in which stored information is replaced by a production device and a predetermined authentication method.
제1 항에 있어서,
전원이 인가됨에 따라, 코어 프로세서에 의해 실행된 하드웨어 무결성 검증 코드는 루트 정보를 이용하여 펌웨어 무결성 검증 코드를 제2 타입 메모리에 복호화하고,
복호화된 펌웨어 무결성 검증 코드는 부트로더를 제3 타입 메모리 또는 제4 타입 메모리에 복호화하고,
복호화된 부트로더는 커널 바이너리를 제3 타입 메모리 또는 제4 타입 메모리에 복호화하고,
복호화된 커널 바이너리는 앱 바이너리의 무결성을 검증하여 제3 타입 메모리 또는 제4 타입 메모리에 로딩하는, 임베디드 장치.
According to claim 1,
As power is applied, the hardware integrity verification code executed by the core processor decrypts the firmware integrity verification code into the second type memory using the root information,
The decrypted firmware integrity verification code decrypts the bootloader into third type memory or fourth type memory,
The decrypted bootloader decrypts the kernel binary into third type memory or fourth type memory,
An embedded device that verifies the integrity of the app binary and loads the decrypted kernel binary into type 3 memory or type 4 memory.
제3 항에 있어서, 제1 타입 메모리는,
루트 정보로 공장 암호화 키 및 펌웨어 무결성 검증 코드의 크기를 저장하고,
하드웨어 무결성 검증 코드는,
공장 암호화 키 및 펌웨어 무결성 검증 코드의 크기를 이용하여 펌웨어 무결성 검증 코드를 복호화하는, 임베디드 장치.
The method of claim 3, wherein the first type memory is:
Stores the size of the factory encryption key and firmware integrity verification code as root information,
The hardware integrity verification code is:
An embedded device that decrypts the firmware integrity verification code using the factory encryption key and the size of the firmware integrity verification code.
제3 항에 있어서, 펌웨어에는,
제1 랜덤 키 및 부트 로더의 암호화 크기 정보가 펌웨어 무결성 검증 코드와 함께 암호화되어 저장되고,
복호화된 펌웨어 무결성 검증 코드는,
제1 랜덤 키 및 공장 암호화 키를 조합하여 공장 암호화 키로 암호화한 부트로더 키를 생성하고, 생성된 부트로더의 키와 부트 로더의 암호화 크기를 이용하여 암호화된 부트 로더의 영역을 복호화하는, 임베디드 장치.
The method of claim 3, wherein the firmware includes:
The first random key and the encryption size information of the boot loader are encrypted and stored together with the firmware integrity verification code,
The decrypted firmware integrity verification code is,
An embedded device that combines the first random key and the factory encryption key to generate a bootloader key encrypted with the factory encryption key, and decrypts the encrypted bootloader area using the generated bootloader key and the bootloader encryption size. .
제3 항에 있어서, 펌웨어에는,
제2 랜덤 키 및 커널 바이너리의 암호화 크기 정보가 부트로더와 함께 암호호되어 저장되고,
복호화된 부트로더는,
제2 랜덤 키 및 공장 암호화 키를 조합하여 부트로더 키로 암호화한 커널 바이너리 키를 생성하고, 생성된 커널 바이너리 키와 커널 바이너리의 암호화 크기를 이용하여 암호화된 커널 바이너리 영역을 복호화하는, 임베디드 장치.
The method of claim 3, wherein the firmware includes:
The second random key and the encryption size information of the kernel binary are encrypted and stored together with the bootloader,
The decrypted bootloader is,
An embedded device that generates a kernel binary key encrypted with a bootloader key by combining a second random key and a factory encryption key, and decrypts the encrypted kernel binary area using the generated kernel binary key and the encryption size of the kernel binary.
제3 항에 있어서, 펌웨어에는,
앱 크기 정보 및 앱 해시 정보가 커널 바이너리와 함께 암호화되어 저장되고,
복호화된 커널 바이너리는,
앱 크기 정보를 이용하여 앱 바이너리를 해시하고, 해시된 앱 바이너리의 앱 해시 정보와의 일치 여부에 따라, 앱 바이너리의 무결성을 검증하는, 임베디드 장치.
The method of claim 3, wherein the firmware includes:
App size information and app hash information are encrypted and stored together with the kernel binary,
The decrypted kernel binary is:
An embedded device that hashes the app binary using app size information and verifies the integrity of the app binary based on whether the hashed app binary matches the app hash information.
임베디드 장치에서의 펌웨어 부팅 방법에 있어서,
임베디드 장치는,
적어도 세 개의 상이한 타입의 메모리들 및 코어 프로세서를 포함하되,
제1 타입 메모리, 제2 타입 메모리 및 코어 프로세서는 변조 방지 마이크로 제어 유닛으로 구성되고,
제3 타입 메모리는,
암호화된 펌웨어 무결성 검증 코드, 부트로더 및 커널 바이너리와, 앱 바이너리를 포함하는 펌웨어가 탑재되고,
제1 타입 메모리는,
하드웨어 무결성 검증 코드 및 펌웨어 무결성 검증 코드를 복호화하기 위한 루트 정보를 저장하되,
전원이 인가됨에 따라, 코어 프로세서에 의해 실행된 하드웨어 무결성 검증 코드는 루트 정보를 이용하여 제2 타입 메모리에 펌웨어 무결성 검증 코드를 복호화하는 단계;
복호화된 펌웨어 무결성 검증 코드는 제3 타입 메모리 또는 제4 타입 메모리에 부트로더를 복호화하는 단계;
복호화된 부트로더는 제3 타입 메모리 또는 제4 타입 메모리에 커널 바이너리를 복호화하는 단계; 및
복호화된 커널 바이너리는 앱 바이너리의 무결성을 검증하여 제3 타입 메모리 또는 제4 타입 메모리에 로딩하는 단계를 포함하는, 임베디드 장치에서의 펌웨어 부팅 방법.
In the firmware booting method in an embedded device,
Embedded devices,
Comprising at least three different types of memories and a core processor,
The first type memory, the second type memory and the core processor are composed of a tamper-resistant microcontrol unit,
The third type of memory is,
It is equipped with firmware that includes encrypted firmware integrity verification code, bootloader and kernel binaries, and app binaries.
The first type memory is,
Stores root information to decrypt the hardware integrity verification code and firmware integrity verification code,
As power is applied, the hardware integrity verification code executed by the core processor decrypts the firmware integrity verification code in the second type memory using the root information;
The decrypted firmware integrity verification code includes decoding a bootloader in a third type memory or a fourth type memory;
Decrypting the kernel binary in the decrypted bootloader into a third type memory or a fourth type memory; and
A method of booting firmware in an embedded device, comprising the step of verifying the integrity of the app binary and loading the decrypted kernel binary into a third type memory or a fourth type memory.
제8 항에 있어서, 제1 타입 메모리는,
생산 장치와 소정 인증 방식에 의해 저장된 정보가 교체되는, 임베디드 장치에서의 펌웨어 부팅 방법.
The method of claim 8, wherein the first type memory is:
A firmware booting method in an embedded device in which information stored by the production device and a predetermined authentication method is replaced.
제8 항에 있어서, 제1 타입 메모리는,
루트 정보로 공장 암호화 키 및 펌웨어 무결성 검증 코드의 크기를 저장하고,
하드웨어 무결성 검증 코드는, 공장 암호화 키 및 펌웨어 무결성 검증 코드의 크기를 이용하여 펌웨어 무결성 검증 코드를 복호화하는, 임베디드 장치에서의 펌웨어 부팅 방법.
The method of claim 8, wherein the first type memory is:
Stores the size of the factory encryption key and firmware integrity verification code as root information,
The hardware integrity verification code is a firmware boot method in an embedded device that decrypts the firmware integrity verification code using the factory encryption key and the size of the firmware integrity verification code.
제8 항에 있어서, 펌웨어에는,
제1 랜덤 키 및 부트 로더의 암호화 크기 정보가 펌웨어 무결성 검증 코드와 함께 암호화되어 저장되고,
부트로더를 복호화하는 단계에서,
복호화된 펌웨어 무결성 검증 코드는, 제1 랜덤 키 및 공장 암호화 키를 조합하여 공장 암호화 키로 암호화한 부트로더 키를 생성하고, 생성된 부트로더의 키와 부트 로더의 암호화 크기를 이용하여 암호화된 부트 로더의 영역을 복호화하는, 임베디드 장치에서의 펌웨어 부팅 방법.
The method of claim 8, wherein the firmware includes:
The first random key and the encryption size information of the boot loader are encrypted and stored together with the firmware integrity verification code,
In the step of decrypting the bootloader,
The decrypted firmware integrity verification code generates a bootloader key encrypted with the factory encryption key by combining the first random key and the factory encryption key, and encrypts the bootloader using the key of the generated bootloader and the encryption size of the bootloader. A firmware boot method in an embedded device that decrypts the area of .
제8 항에 있어서, 펌웨어에는,
제2 랜덤 키 및 커널 바이너리의 암호화 크기 정보가 부트로더와 함께 암호호되어 저장되고,
커널 바이너리를 복호화하는 단계에서,
복호화된 부트로더는, 제2 랜덤 키 및 공장 암호화 키를 조합하여 부트로더 키로 암호화한 커널 바이너리 키를 생성하고, 생성된 커널 바이너리 키와 커널 바이너리의 암호화 크기를 이용하여 암호화된 커널 바이너리 영역을 복호화하는, 임베디드 장치에서의 펌웨어 부팅 방법.
The method of claim 8, wherein the firmware includes:
The second random key and the encryption size information of the kernel binary are encrypted and stored together with the bootloader,
In the step of decrypting the kernel binary,
The decrypted bootloader generates a kernel binary key encrypted with the bootloader key by combining the second random key and the factory encryption key, and decrypts the encrypted kernel binary area using the generated kernel binary key and the encryption size of the kernel binary. How to boot firmware in embedded devices.
제8 항에 있어서, 펌웨어에는,
앱 크기 정보 및 앱 해시 정보가 커널 바이너리와 함께 암호화되어 저장되고,
로딩하는 단계에서,
복호화된 커널 바이너리는, 앱 크기 정보를 이용하여 앱 바이너리를 해시하고, 해시된 앱 바이너리의 앱 해시 정보와의 일치 여부에 따라, 앱 바이너리의 무결성을 검증하는, 임베디드 장치에서의 펌웨어 부팅 방법.
The method of claim 8, wherein the firmware includes:
App size information and app hash information are encrypted and stored together with the kernel binary,
At the loading stage,
A firmware booting method in an embedded device in which the decrypted kernel binary hashes the app binary using app size information, and verifies the integrity of the app binary based on whether the hashed app binary matches the app hash information.
펌웨어 암호화에 사용될 키들을 생성하는 단계;
생성된 키들을 기반으로 펌웨어 무결성 검증 코드 영역, 부트로더 영역 및 커널 바이너리 영역을 암호화하는 단계; 및
암호화 결과 및 앱 바이너리를 포함하는 펌웨어를 생성하는 단계를 포함하는, 암호화 펌웨어 생성 방법.
generating keys to be used for firmware encryption;
Encrypting the firmware integrity verification code area, bootloader area, and kernel binary area based on the generated keys; and
A method of generating cryptographic firmware, comprising generating firmware containing cryptographic results and app binaries.
제14 항에 있어서, 펌웨어는,
임베디드 장치에 탑재되되,
임베디드 장치는,
적어도 세 개의 상이한 타입의 메모리들 및 코어 프로세서를 포함하되,
제1 타입 메모리, 제2 타입 메모리 및 코어 프로세서는 변조 방지 마이크로 제어 유닛으로 구성되고,
제3 타입 메모리는,
펌웨어가 탑재되고,
제1 타입 메모리는,
하드웨어 무결성 검증 코드 및 펌웨어 무결성 검증 코드를 복호화하기 위한 루트 정보를 저장하는, 암호화 펌웨어 생성 방법.
The method of claim 14, wherein the firmware is:
It is mounted on an embedded device,
Embedded devices,
Comprising at least three different types of memories and a core processor,
The first type memory, the second type memory and the core processor are composed of a tamper-resistant microcontrol unit,
The third type of memory is,
Firmware is installed,
The first type memory is,
A method of creating encrypted firmware that stores root information for decrypting the hardware integrity verification code and firmware integrity verification code.
제14 항에 있어서, 키들을 생성하는 단계는,
임베디드 장치의 공장 출고 키 및 두 개의 랜덤 키들을 생성하는 단계;
제1 랜덤키 및 공장 출고키를 조합하여 공장 출고키로 암호화한 부트로더용 키를 생성하는 단계 및
제2 랜덤키 및 부트로더용 키를 조합하여 부트로드용 키로 암호화한 커널 바이너리용 키를 생성하는 단계를 포함하는, 암호화 펌웨어 생성 방법.
15. The method of claim 14, wherein generating keys comprises:
generating a factory key of the embedded device and two random keys;
Combining the first random key and the factory key to generate a key for the bootloader encrypted with the factory key;
A method of generating encrypted firmware, comprising generating a key for a kernel binary encrypted with a bootload key by combining a second random key and a bootloader key.
제14 항에 있어서, 암호화하는 단계는,
앱 바이너리 영역의 무결성 기능이 포함된 커널 바이너리, 앱 바이너리 크기 및 앱 바이너리 해시를 커널 바이너리용 키로 암호화하는 단계;
커널 바이너리 영역 복호화 기능이 포함된 부트 로더, 제2 랜덤키 및 암호화된 커널 바이너리 영역 크기를 부트로드용 키로 암호화하는 단계; 및
부트로더 영역 복호화 기능이 포함된 펌웨어 무결성 검증 코드, 제1 랜덤 키 및 암호화된 부트 로더 영역 크기를 공장 출고키로 암호화하는 단계를 포함하는, 암호화 펌웨어 생성 방법.
The method of claim 14, wherein the encrypting step includes:
Encrypting the kernel binary containing the integrity function of the app binary area, the app binary size, and the app binary hash with a key for the kernel binary;
Encrypting a boot loader including a kernel binary area decryption function, a second random key, and the size of the encrypted kernel binary area with a boot load key; and
A method of generating encrypted firmware, comprising encrypting a firmware integrity verification code with a bootloader area decryption function, a first random key, and an encrypted bootloader area size with a factory key.
KR1020220070660A 2022-06-10 2022-06-10 Embedded Apparatus, Method for Booting therein and Method for Encrypted Firmware Active KR102808180B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020220070660A KR102808180B1 (en) 2022-06-10 2022-06-10 Embedded Apparatus, Method for Booting therein and Method for Encrypted Firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020220070660A KR102808180B1 (en) 2022-06-10 2022-06-10 Embedded Apparatus, Method for Booting therein and Method for Encrypted Firmware

Publications (2)

Publication Number Publication Date
KR20230170308A true KR20230170308A (en) 2023-12-19
KR102808180B1 KR102808180B1 (en) 2025-05-19

Family

ID=89385635

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220070660A Active KR102808180B1 (en) 2022-06-10 2022-06-10 Embedded Apparatus, Method for Booting therein and Method for Encrypted Firmware

Country Status (1)

Country Link
KR (1) KR102808180B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130085536A (en) * 2011-12-16 2013-07-30 삼성전자주식회사 Secure data protecting memory device, data protecting method using the secure data
KR20200045931A (en) * 2018-10-23 2020-05-06 주식회사 시옷 Firmware packaging and unpackaging methods
KR20200052750A (en) * 2018-11-07 2020-05-15 시큐리티플랫폼 주식회사 Device and method for secure booting
KR20220069042A (en) * 2019-10-11 2022-05-26 아메리칸 익스프레스 트레블 릴레이티드 서비스즈 컴퍼니, 아이엔씨. Executing entity-specific cryptographic code in a cryptographic coprocessor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130085536A (en) * 2011-12-16 2013-07-30 삼성전자주식회사 Secure data protecting memory device, data protecting method using the secure data
KR20200045931A (en) * 2018-10-23 2020-05-06 주식회사 시옷 Firmware packaging and unpackaging methods
KR20200052750A (en) * 2018-11-07 2020-05-15 시큐리티플랫폼 주식회사 Device and method for secure booting
KR20220069042A (en) * 2019-10-11 2022-05-26 아메리칸 익스프레스 트레블 릴레이티드 서비스즈 컴퍼니, 아이엔씨. Executing entity-specific cryptographic code in a cryptographic coprocessor

Also Published As

Publication number Publication date
KR102808180B1 (en) 2025-05-19

Similar Documents

Publication Publication Date Title
KR101393307B1 (en) Secure boot method and semiconductor memory system for using the method
EP3458999B1 (en) Self-contained cryptographic boot policy validation
US11361087B2 (en) Security data processing device
KR101795457B1 (en) Method of initializing device and method of updating firmware of device having enhanced security function
US8281115B2 (en) Security method using self-generated encryption key, and security apparatus using the same
US9602282B2 (en) Secure software and hardware association technique
CN105683990B (en) Method and apparatus for protecting dynamic base
EP3197089B1 (en) Secure information configuration method, secure authentication method and related chip
US20150095652A1 (en) Encryption and decryption processing method, apparatus, and device
US20060288232A1 (en) Method and apparatus for using an external security device to secure data in a database
US20200372183A1 (en) Digitally Signing Software Packages With Hash Values
CN109445705B (en) Firmware authentication method and solid state disk
EP2294529A1 (en) Electronic device and method of software or firmware updating of an electronic device
CN109814934B (en) Data processing method, device, readable medium and system
CN103617401A (en) Method and device for protecting data files
US10880082B2 (en) Rekeying keys for encrypted data in nonvolatile memories
CN108134673A (en) A kind of method and device for generating whitepack library file
US10387653B2 (en) Secure provisioning of semiconductor chips in untrusted manufacturing factories
CN109784072B (en) Security file management method and system
US8499357B1 (en) Signing a library file to verify a callback function
CN112241523B (en) Method for authenticating startup identity of embedded computer
US12197563B2 (en) Apparatus and method for protecting shared objects
CN115361132B (en) Key generation method, device, system on chip, equipment and storage medium
KR102808180B1 (en) Embedded Apparatus, Method for Booting therein and Method for Encrypted Firmware
CN115292727A (en) TrustZone-based root file system encryption method, device, equipment and storage medium

Legal Events

Date Code Title Description
PA0109 Patent application

Patent event code: PA01091R01D

Comment text: Patent Application

Patent event date: 20220610

PA0201 Request for examination

Patent event code: PA02012R01D

Patent event date: 20220929

Comment text: Request for Examination of Application

Patent event code: PA02011R01I

Patent event date: 20220610

Comment text: Patent Application

PG1501 Laying open of application
E902 Notification of reason for refusal
PE0902 Notice of grounds for rejection

Comment text: Notification of reason for refusal

Patent event date: 20240723

Patent event code: PE09021S01D

E701 Decision to grant or registration of patent right
PE0701 Decision of registration

Patent event code: PE07011S01D

Comment text: Decision to Grant Registration

Patent event date: 20250312

GRNT Written decision to grant
PR0701 Registration of establishment

Comment text: Registration of Establishment

Patent event date: 20250512

Patent event code: PR07011E01D

PR1002 Payment of registration fee

Payment date: 20250513

End annual number: 3

Start annual number: 1

PG1601 Publication of registration
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载