KR102598510B1 - Method and apparatus for verify software integrity - Google Patents

Method and apparatus for verify software integrity Download PDF

Info

Publication number
KR102598510B1
KR102598510B1 KR1020210180988A KR20210180988A KR102598510B1 KR 102598510 B1 KR102598510 B1 KR 102598510B1 KR 1020210180988 A KR1020210180988 A KR 1020210180988A KR 20210180988 A KR20210180988 A KR 20210180988A KR 102598510 B1 KR102598510 B1 KR 102598510B1
Authority
KR
South Korea
Prior art keywords
hash
software
flash memory
hash table
serial flash
Prior art date
Application number
KR1020210180988A
Other languages
Korean (ko)
Other versions
KR20230091660A (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 KR1020210180988A priority Critical patent/KR102598510B1/en
Publication of KR20230091660A publication Critical patent/KR20230091660A/en
Application granted granted Critical
Publication of KR102598510B1 publication Critical patent/KR102598510B1/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/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/442Shutdown
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures

Landscapes

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

Abstract

하드웨어 보안 모듈이 소프트웨어의 무결성을 검증하는 방법으로서, 시리얼 플래시 메모리에 저장된 소프트웨어가 실행되면, 상기 시리얼 플래시 메모리로부터 상기 소프트웨어에 대한 해시값들을 저장한 해시 테이블을 획득하여 상기 하드웨어 보안 모듈의 내부 메모리에 로딩하는 단계, 상기 소프트웨어의 분할 블록 단위로 해시값들을 연산하는 단계, 분할 블록 순서대로, 상기 분할 블록에 대하여 연산한 해시값을 상기 해시 테이블에 저장된 상기 분할 블록의 해시값과 비교하여 일치 여부를 판단하는 단계, 그리고 일치하면, 무결성 검증을 종료하고, 불일치하면, 시스템을 재부팅시키는 단계를 포함한다.As a method for a hardware security module to verify the integrity of software, when software stored in a serial flash memory is executed, a hash table storing hash values for the software is obtained from the serial flash memory and stored in the internal memory of the hardware security module. Loading, calculating hash values for each split block of the software, comparing the hash value calculated for the split block with the hash value of the split block stored in the hash table in the split block order to determine whether they match. It includes a step of determining, and if there is a match, ending the integrity verification, and if there is a mismatch, rebooting the system.

Description

소프트웨어의 무결성 검증 방법 및 그 장치{METHOD AND APPARATUS FOR VERIFY SOFTWARE INTEGRITY} Software integrity verification method and device {METHOD AND APPARATUS FOR VERIFY SOFTWARE INTEGRITY}

본 발명은 시리얼 플래시 메모리에서 XIP(eXecute-In-Place)로 동작하는 소프트웨어의 무결성 검증 방법에 관한 것이다.The present invention relates to a method for verifying the integrity of software operating in XIP (eXecute-In-Place) in serial flash memory.

차량용 ECU(Electronic Control Unit)는 빠른 부팅과 CAN(Controller Area Network) 응답을 위해 XIP를 지원하는 시리얼 플래시 메모리를 저장 장치로 사용한다.The automotive ECU (Electronic Control Unit) uses serial flash memory that supports XIP as a storage device for fast booting and CAN (Controller Area Network) response.

그러나, 시리얼 플래시 메모리의 XIP는 읽기 성능이 낮기 때문에 시리얼 플래시 메모리에 저장된 소프트웨어의 무결성을 검증하는데 많은 시간이 소요된다. 따라서, 일반적으로 사용되는 "ROM → 부트 로더 → 소프트웨어 실행 코드" 로 연결되는 신뢰 체인을 사용할 경우, 부팅 시간이 길어진다.However, because the XIP of serial flash memory has low read performance, it takes a lot of time to verify the integrity of software stored in serial flash memory. Therefore, if you use the commonly used trust chain of "ROM → boot loader → software executable code", the boot time will be longer.

부팅 시간을 해결하기 위하여, 종래에 시리얼 플래시 메모리에 저장된 소프트웨어 실행 코드를 먼저 실행하고 HSM(Hardware Security Module)에서 소프트웨어 실행 코드의 무결성을 검증하는 방법이 있다.In order to solve the boot time, there is a conventional method of first executing the software executable code stored in the serial flash memory and verifying the integrity of the software executable code in the HSM (Hardware Security Module).

이때, 종래 방식은 소프트웨어 실행 코드에 대한 단일 해시를 사용한다. 그러나, 이 방식은 시리얼 플래시 메모리의 낮은 읽기 속도로 인해서 무결성 검증 시간이 길어지고, 그로 인해서 검증이 완료될 때까지 소프트웨어가 장시간 실행되어야 하는 문제점이 있다. 또한, 무결성 검증이 완료되고 오류를 발견하여 시스템을 재부팅할 때까지 장시간 소프트웨어가 검증되지 않은 상태로 동작하는 문제점이 있다.At this time, the conventional method uses a single hash for the software executable code. However, this method has the problem that the integrity verification time is long due to the low read speed of the serial flash memory, and as a result, the software must run for a long time until verification is completed. Additionally, there is a problem in that the software operates in an unverified state for a long time until integrity verification is completed, errors are discovered, and the system is rebooted.

해결하고자 하는 과제는 해시 테이블을 이용하여 시리얼 플래시 메모리에서 XIP(eXecute-In-Place)로 동작하는 소프트웨어의 무결성 검증 방법 및 그 장치를 제공하는 것이다.The problem to be solved is to provide a method and device for verifying the integrity of software that operates in XIP (eXecute-In-Place) in serial flash memory using a hash table.

한 특징에 따르면, 하드웨어 보안 모듈이 소프트웨어의 무결성을 검증하는 방법으로서, 시리얼 플래시 메모리에 저장된 소프트웨어가 실행되면, 상기 시리얼 플래시 메모리로부터 상기 소프트웨어에 대한 해시값들을 저장한 해시 테이블을 획득하여 상기 하드웨어 보안 모듈의 내부 메모리에 로딩하는 단계, 상기 소프트웨어의 분할 블록 단위로 해시값들을 연산하는 단계, 분할 블록 순서대로, 상기 분할 블록에 대하여 연산한 해시값을 상기 해시 테이블에 저장된 상기 분할 블록의 해시값과 비교하여 일치 여부를 판단하는 단계, 그리고 일치하면, 무결성 검증을 종료하고, 불일치하면, 시스템을 재부팅시키는 단계를 포함한다.According to one feature, as a method for the hardware security module to verify the integrity of software, when software stored in a serial flash memory is executed, a hash table storing hash values for the software is obtained from the serial flash memory to secure the hardware security. Loading into the internal memory of the module, calculating hash values in units of split blocks of the software, in the split block order, combining the hash value calculated for the split block with the hash value of the split block stored in the hash table. It includes a step of comparing and determining whether they match, and if they match, terminating the integrity verification, and if they do not match, rebooting the system.

상기 로딩하는 단계와 상기 해시값들을 연산하는 단계 사이에, 상기 해시 테이블에 대한 해시값을 연산하는 단계, 상기 시리얼 플래시 메모리로부터 상기 해시 테이블에 대해 연산된 해시값을 독출하는 단계, 상기 연산한 해시 테이블의 해시값과 상기 독출한 해시 테이블의 해시값을 비교하여 무결성 검증을 수행하고, 상기 무결성 검증에 실패하면 시스템을 재부팅시키는 단계를 더 포함할 수 있다.Between the loading step and the step of calculating the hash values, calculating a hash value for the hash table, reading the hash value calculated for the hash table from the serial flash memory, and calculating the hash value for the hash table. The method may further include performing integrity verification by comparing the hash value of the hash table with the hash value of the read hash table, and rebooting the system if the integrity verification fails.

상기 재부팅시키는 단계는, 상기 연산한 해시 테이블의 해시값을 토대로 전자 서명값을 계산하는 단계, 상기 시리얼 플래시 메모리로부터 상기 해시 테이블의 해시값을 토대로 생성된 전자 서명값을 독출하는 단계, 그리고 상기 계산한 전자 서명값을 상기 독출한 전자 서명값과 비교하여 불일치하면 무결성 검증 실패로 판단하고, 상기 시스템을 재부팅시키는 단계를 포함할 수 있다.The rebooting step includes calculating an electronic signature value based on the hash value of the hash table, reading an electronic signature value generated based on the hash value of the hash table from the serial flash memory, and The method may include comparing the calculated electronic signature value with the read electronic signature value, determining that integrity verification has failed if there is a discrepancy, and rebooting the system.

상기 소프트웨어는, 시리얼 플래시 메모리에서 XIP(eXecute-In-Place) 모드로 실행될 수 있다.The software may be executed in eXecute-In-Place (XIP) mode on serial flash memory.

다른 특징에 따르면, 무결성 검증 장치는 소프트웨어 실행 코드와, 상기 소프트웨어 실행 코드를 복수개로 분할한 복수의 분할 블록에 대한 해시값들을 포함하는 해시 테이블을 저장하는 시리얼 플래시 메모리, 그리고 상기 소프트웨어 실행 코드가 실행되면, 실행된 소프트웨어 실행 코드를 복수개로 분할하여 분할 블록의 순서대로 분할 블록의 해시값을 연산하고, 연산한 분할 블록의 해시값을 상기 해시 테이블에 저장된 대응하는 분할 블록의 해시값과 비교하여 일치 여부를 판단하는 하드웨어 보안 모듈을 포함하고, 상기 하드웨어 보안 모듈은, 상기 연산한 분할 블록의 해시값이 상기 해시 테이블에 저장된 분할 블록의 해시값과 일치하면, 무결성 검증을 완료하고, 불일치하면 시스템을 재부팅시킨다.According to another feature, the integrity verification device includes a serial flash memory that stores a software executable code, a hash table containing hash values for a plurality of partition blocks dividing the software executable code into a plurality of blocks, and the software executable code is executed. If so, the executed software execution code is divided into multiple pieces, the hash value of the split block is calculated in the order of the split blocks, and the hash value of the calculated split block is compared with the hash value of the corresponding split block stored in the hash table and matches. and a hardware security module that determines whether the hash value of the divided block is calculated and matches the hash value of the divided block stored in the hash table, and the hardware security module completes integrity verification. If there is a mismatch, the system is shut down. Reboot.

상기 하드웨어 보안 모듈은, 상기 해시 테이블에 대한 전자 서명값을 생성하고, 상기 시리얼 플래시 메모리에 저장된 전자 서명값을 독출하여, 생성한 전자 서명값과 상기 독축한 전자 서명값이 불일치하면, 시스템을 재부팅시키고, 일치하면 상기 분할 블록 단위로 해시값 검증을 수행할 수 있다.The hardware security module generates an electronic signature value for the hash table, reads the electronic signature value stored in the serial flash memory, and reboots the system if the generated electronic signature value and the read electronic signature value do not match. and, if they match, hash value verification can be performed in units of the divided blocks.

상기 하드웨어 보안 모듈은, 상기 시리얼 플래시 메모리에 직접 접근하여 상기 시리얼 플래시 메모리에 저장된 해시 테이블과 전자 서명값을 독출할 수 있다.The hardware security module can directly access the serial flash memory and read the hash table and electronic signature value stored in the serial flash memory.

상기 전자 서명값은, 상기 해시 테이블에 대한 해시값을 토대로 생성될 수 있다.The electronic signature value may be generated based on the hash value of the hash table.

상기 무결성 검증 장치는 미검증 상태에서 상기 소프트웨어 실행 코드를 실행하는 MCU(microcontroller unit)를 더 포함하고, 상기 하드웨어 보안 모듈은, 상기 MCU의 소프트웨어 실행 코드 실행과 동시에 상기 MCU와 독립적으로 실행된 소프트웨어 실행 코드에 대한 무결성 검증 동작을 수행할 수 있다.The integrity verification device further includes a microcontroller unit (MCU) that executes the software executable code in an unverified state, and the hardware security module executes software executed independently of the MCU simultaneously with executing the software executable code of the MCU. You can perform integrity verification operations on the code.

상기 무결성 검증 장치는 상기 소프트웨어 실행 코드를 상기 시리얼 플래시 메모리의 XIP(eXecute-In-Place) 모드에서 실행하는 MCU(microcontroller unit)를 더 포함 할 수 있다.The integrity verification device may further include a microcontroller unit (MCU) that executes the software execution code in an eXecute-In-Place (XIP) mode of the serial flash memory.

실시예에 따르면, 소프트웨어 실행 코드를 일정 크기로 분할하여 블록 단위로 해시를 검증하고, 하나의 블록에서 오류가 검출되면 즉시 시스템을 재부팅함으로써, 검증되지 않은 소프트웨어가 실행되는 시간을 최소화할 수 있다.According to an embodiment, the software execution code is divided into a certain size, the hash is verified in block units, and when an error is detected in one block, the system is immediately rebooted, thereby minimizing the time that unverified software runs.

도 1은 실시예에 따른 소프트웨어 무결성 검증 장치의 구성을 나타낸 블록도이다.
도 2는 실시예에 따른 소프트웨어의 무결성 검증을 위한 해시 테이블 생성 예시도이다.
도 3은 실시예에 따른 해시 테이블을 이용한 소프트웨어의 무결성 검증 동작을 설명한다.
도 4는 실시예에 따른 소프트웨어의 무결성 검증 동작을 나타낸 흐름도이다.
Figure 1 is a block diagram showing the configuration of a software integrity verification device according to an embodiment.
Figure 2 is an example of hash table creation for verifying the integrity of software according to an embodiment.
Figure 3 explains the integrity verification operation of software using a hash table according to an embodiment.
Figure 4 is a flowchart showing a software integrity verification operation according to an embodiment.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Below, with reference to the attached drawings, embodiments of the present invention will be described in detail so that those skilled in the art can easily implement the present invention. However, the present invention may be implemented in various different forms and is not limited to the embodiments described herein. In order to clearly explain the present invention in the drawings, parts that are not related to the description are omitted, and similar parts are given similar reference numerals throughout the specification.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part is said to “include” a certain element, this means that it may further include other elements rather than excluding other elements, unless specifically stated to the contrary.

또한, 명세서에 기재된 "…부", "…기", "…모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.In addition, terms such as “…unit”, “…unit”, and “…module” used in the specification refer to a unit that processes at least one function or operation, which may be implemented through hardware or software or a combination of hardware and software. You can.

본 발명에서 설명하는 장치들은 적어도 하나의 프로세서, 메모리 장치, 통신 장치 등을 포함하는 하드웨어로 구성되고, 지정된 장소에 하드웨어와 결합되어 실행되는 프로그램이 저장된다. 하드웨어는 본 발명의 방법을 실행할 수 있는 구성과 성능을 가진다. 프로그램은 도면들을 참고로 설명한 본 발명의 동작 방법을 구현한 명령어(instructions)를 포함하고, 프로세서와 메모리 장치 등의 하드웨어와 결합하여 본 발명을 실행한다.The devices described in the present invention are composed of hardware including at least one processor, a memory device, a communication device, etc., and a program that is executed in conjunction with the hardware is stored in a designated location. The hardware has a configuration and performance capable of executing the method of the present invention. The program includes instructions that implement the operating method of the present invention described with reference to the drawings, and executes the present invention by combining it with hardware such as a processor and memory device.

본 명세서에서 "전송 또는 제공"은 직접적인 전송 또는 제공하는 것 뿐만 아니라 다른 장치를 통해 또는 우회 경로를 이용하여 간접적으로 전송 또는 제공도 포함할 수 있다.In this specification, “transmission or provision” may include not only direct transmission or provision, but also indirect transmission or provision through another device or by using a circuitous route.

본 명세서에서 단수로 기재된 표현은 "하나" 또는 "단일" 등의 명시적인 표현을 사용하지 않은 이상, 단수 또는 복수로 해석될 수 있다.In this specification, expressions described as singular may be interpreted as singular or plural, unless explicit expressions such as “one” or “single” are used.

본 명세서에서 도면에 관계없이 동일한 도면번호는 동일한 구성요소를 지칭하며, "및/또는" 은 언급된 구성 요소들의 각각 및 하나 이상의 모든 조합을 포함한다.In this specification, the same reference numbers refer to the same elements regardless of the drawings, and “and/or” includes each and all combinations of one or more of the mentioned elements.

본 명세서에서, 제1, 제2 등과 같이 서수를 포함하는 용어들은 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되지는 않는다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를들어, 본 개시의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.In this specification, terms including ordinal numbers, such as first, second, etc., may be used to describe various components, but the components are not limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, a first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component without departing from the scope of the present disclosure.

본 명세서에서 도면을 참고하여 설명한 흐름도에서, 동작 순서는 변경될 수 있고, 여러 동작들이 병합되거나, 어느 동작이 분할될 수 있고, 특정 동작은 수행되지 않을 수 있다. In the flowcharts described herein with reference to the drawings, the order of operations may be changed, several operations may be merged, certain operations may be divided, and certain operations may not be performed.

도 1은 실시예에 따른 소프트웨어 무결성 검증 장치의 구성을 나타낸 블록도이고, 도 2는 실시예에 따른 소프트웨어의 무결성 검증을 위한 해시 테이블 생성 예시도이고, 도 3은 실시예에 따른 해시 테이블을 이용한 소프트웨어의 무결성 검증 동작을 설명한다.Figure 1 is a block diagram showing the configuration of a software integrity verification device according to an embodiment, Figure 2 is an example of generating a hash table for verifying the integrity of software according to an embodiment, and Figure 3 is a hash table using a hash table according to an embodiment. Describes the software integrity verification operation.

먼저, 도 1을 참조하면, 소프트웨어 무결성 검증 장치(100)는 칩(Chip) 내에 포함되며, 소프트웨어 무결성 검증에 관련있는 구성요소 위주로 도시하였다. 소프트웨어 무결성 검증 장치(100)는 MCU(microcontroller unit)(120) 및 하드웨어 보안 모듈(Hardware Security Module, 이하, 'HSM'으로 통칭함)(130)을 포함한다. First, referring to FIG. 1, the software integrity verification device 100 is included in a chip and is mainly illustrated with components related to software integrity verification. The software integrity verification device 100 includes a microcontroller unit (MCU) 120 and a hardware security module (hereinafter referred to as 'HSM') 130.

MCU(120)는 시리얼 플래시 메모리(111) 및 프로세서(120)를 포함한다. The MCU 120 includes a serial flash memory 111 and a processor 120.

시리얼 플래시 메모리(111)는 MCU(120)가 적용되는 장치에 필요한 소프트웨어를 저장한다. The serial flash memory 111 stores software required for a device to which the MCU 120 is applied.

프로세서(120)는 시리얼 플래시 메모리(111)로 부트로더를 로드하여 소프트웨어를 실행한다. The processor 120 loads a bootloader into the serial flash memory 111 and executes software.

이때, 무결성 검증 대상인 소프트웨어는 시리얼 플래시 메모리(111)에서 XIP(Execute In-Place)로 동작한다. XIP는 프로그램 코드를 메인 메모리에 적재하는 과정 없이 비휘발성 메모리에서 직접 실행하는 기술로서, 커널 부팅에서 커널 이미지를 비휘발성 메모리로부터 메인 메모리로 적재하는 과정과, 압축된 커널 이미지를 해제하는 과정과, 압축 해제하는 과정에서 압축 해제되는 커널을 메인 메모리에 쓰는 과정을 생락할 수 있다. At this time, the software subject to integrity verification operates in XIP (Execute In-Place) in the serial flash memory 111. XIP is a technology that directly executes program code from non-volatile memory without loading it into main memory. It includes the process of loading the kernel image from non-volatile memory to main memory during kernel booting, the process of decompressing the compressed kernel image, and During the decompression process, the process of writing the decompressed kernel to main memory can be omitted.

HSM(130)은 시리얼 플래시 메모리(111)에서 XIP로 동작하는 소프트웨어의 무결성을 검증한다.The HSM 130 verifies the integrity of software operating as XIP in the serial flash memory 111.

도 2를 참조하면, 시리얼 플래시 메모리(111)는 XIP 모드에서 실행되는 소프트웨어 실행 코드, 해시 테이블, 해시 테이블의 해시값에 기초하여 생성된 전자 서명값을 저장한다. 소프트웨어 실행 코드, 해시 테이블, 전자 서명값은 외부에서 시리얼 플래시 메모리(111)로 사전에 입력 및 저장될 수 있다.Referring to FIG. 2, the serial flash memory 111 stores software executable code running in XIP mode, a hash table, and an electronic signature value generated based on the hash value of the hash table. The software executable code, hash table, and electronic signature value can be input and stored in advance into the serial flash memory 111 from the outside.

시리얼 플래시 메모리(111)에 저장된 소프트웨어 실행 코드가 XIP 모드에서 실행되는 경우, 시리얼 플래시 메모리(111)의 낮은 읽기 성능으로 인해 소프트웨어 실행 코드에 대한 무결성 검증을 위해 많은 시간이 소요된다. 이러한 문제점을 방지하기 위해 본 발명의 실시예에서는 소프트웨어 실행 코드를 복수개 블록으로 분할하여 블록 단위로 무결성 검증이 수행되도록 한다. 따라서, 소프트웨어 실행 코드는 복수의 블록으로 분할되는데, 블록의 크기는 동일할 수도 있고, 다를 수도 있다. When the software executable code stored in the serial flash memory 111 is executed in XIP mode, it takes a lot of time to verify the integrity of the software executable code due to the low read performance of the serial flash memory 111. To prevent this problem, in an embodiment of the present invention, the software execution code is divided into a plurality of blocks and integrity verification is performed on a block-by-block basis. Accordingly, the software executable code is divided into a plurality of blocks, and the size of the blocks may be the same or different.

해시 테이블은 소프트웨어 실행 코드로부터 분할된 복수의 블록에 대하여 해시 연산을 통해 도출된 각각의 해시값들을 포함한다. 이때, 소프트웨어 실행 코드를 구성하는 복수의 분할 블록의 순서대로 대응하는 해시값들이 순차적으로 해시 테이블로 구성될 수 있다.The hash table includes hash values derived through a hash operation for a plurality of blocks divided from the software execution code. At this time, hash values corresponding to the order of the plurality of partition blocks constituting the software execution code may be sequentially configured into a hash table.

전자 서명값은 해시 테이블에 대하여 연산된 해시값을 이용하여 생성된다. The digital signature value is created using the hash value calculated on the hash table.

도 3을 참조하면, HSM(130)은 시리얼 플래시 메모리(111)로부터 해시 테이블및 전자 서명값을 로딩한다. Referring to FIG. 3, the HSM 130 loads the hash table and electronic signature value from the serial flash memory 111.

HSM(130)은 로딩한 해시 테이블에 대하여 해시값을 연산한다. HSM(130)은 연산한 해시값과 공개키를 토대로, 로딩한 전자 서명값을 검증한다. 이때, 공개키는 HSM(130)만 접근이 가능한 별도의 메모리에 저장되어 있다.The HSM 130 calculates a hash value for the loaded hash table. The HSM 130 verifies the loaded electronic signature value based on the calculated hash value and public key. At this time, the public key is stored in a separate memory that only the HSM 130 can access.

또한, HSM(130)은 시리얼 플래시 메모리(111)에 저장된 소프트웨어 실행 코드를 분할하고, 분할 블록들에 대한 해시값들을 연산한다. Additionally, the HSM 130 divides the software execution code stored in the serial flash memory 111 and calculates hash values for the divided blocks.

HSM(130)의 해시값 연산은 공지된 해시 알고리즘을 사용할 수 있는데, 예를들어, SHA(Secure Hash Algorithm) 알고리즘을 사용할 수 있다. 그러나, 이러한 해시 알고리즘에 국한되는 것은 아니다. HSM(130)의 해시값 연산 알고리즘은 시리얼 플래시 메모리(111)에 저장된 해시값들에 사용된 해시 알고리즘과 동일하다.The hash value operation of the HSM 130 can use a known hash algorithm, for example, the SHA (Secure Hash Algorithm) algorithm. However, it is not limited to this hash algorithm. The hash value calculation algorithm of the HSM 130 is the same as the hash algorithm used for hash values stored in the serial flash memory 111.

HSM(130)은 연산한 해시값들을 해시 테이블에 저장된 해시값들과 비교하여 일치 여부를 판단하는 무결성 검증을 수행한다. The HSM 130 performs integrity verification by comparing the calculated hash values with hash values stored in the hash table to determine whether they match.

이때, 분할 블록들은 일렬로 나열되므로, HSM(130)은 나열된 순서대로 해시값들을 비교한다.At this time, since the split blocks are arranged in a row, the HSM 130 compares the hash values in the listed order.

HSM(130)은 첫번째 블록의 해시값이 해시 테이블의 첫번째 블록의 해시값과 불일치하면, 무결성 검증 실패로 판단하고, MCU(110)를 재부팅한다.If the hash value of the first block does not match the hash value of the first block of the hash table, the HSM 130 determines that the integrity verification has failed and reboots the MCU 110.

HSM(130)은 첫번째 블록의 해시값이 해시 테이블의 첫번째 블록의 해시값과 일치하면, 다음 블록에 대해 무결성 검증을 수행한다. 이와 같이, 블록 단위로 무결성 검증을 수행하다가 해시값이 일치하지 않는 블록이 발생하면, 무결성 검증 실패로 판단하고, MCU(110)를 재부팅한다.If the hash value of the first block matches the hash value of the first block of the hash table, the HSM 130 performs integrity verification on the next block. In this way, if a block with an inconsistent hash value occurs while performing integrity verification on a block-by-block basis, it is determined that the integrity verification has failed, and the MCU 110 is rebooted.

도 4는 실시예에 따른 소프트웨어의 무결성 검증 동작을 나타낸 흐름도이다.Figure 4 is a flowchart showing a software integrity verification operation according to an embodiment.

도 4를 참조하면, 부팅이 되면, MCU(110)는 시리얼 플래시 메모리(111)로부터 소프트웨어 실행 코드를 로딩하여 실행한다(S101).Referring to FIG. 4, when booted, the MCU 110 loads and executes the software execution code from the serial flash memory 111 (S101).

MCU(110)는 HSM(130)에게 검증 요청을 전송한다(S102). 따라서, HSM(130)은 MCU(110)의 소프트웨어 실행 코드 실행과 동시에 소프트웨어 실행 코드에 대한 무결성 검증 동작을 수행한다. The MCU 110 transmits a verification request to the HSM 130 (S102). Accordingly, the HSM 130 performs an integrity verification operation on the software executable code simultaneously with the execution of the software executable code of the MCU 110.

HSM(130)은 시리얼 플래시 메모리(111)에 저장된 해시 테이블을 HSM(130)의 내부 메모리에 로딩(S103)하고, 해시 테이블에 대한 해시값을 계산한다(S104). 해시 연산 속도는 입력 데이터의 크기에 비례한다. 소프트웨어 실행 코드의 크기에 비해 해시 테이블의 크기는 매우 작기 때문에 해시 테이블의 해시를 계산함으로써, 무결성 검증 속도를 빠르게 진행할 수 있다. The HSM 130 loads the hash table stored in the serial flash memory 111 into the internal memory of the HSM 130 (S103) and calculates a hash value for the hash table (S104). Hash operation speed is proportional to the size of the input data. Since the size of the hash table is very small compared to the size of the software execution code, the integrity verification speed can be accelerated by calculating the hash of the hash table.

또한, MCU(110)와 HSM(130)을 포함하는 칩(Chip)이 부팅하자마다 MCU(110)는 OS와 같은 소프트웨어 실행 코드를 검증없이 실행한다. 따라서, OS에서 HSM(130)으로 어떤 값을 전달하는 것은 신뢰할 수 없다. 예를 들면, OS를 누군가가 조작하면 HSM(130)으로 아무런 값도 전달되지 않도록 할 수 있기 때문이다. 따라서, OS를 검증하는 과정은 MCU(110)와 무관하게 진행되어야 하므로, HSM(130)은 시리얼 플래시 메모리(111)로부터 직접 해시 테이블을 리드(Read)한다.Additionally, whenever the chip including the MCU 110 and the HSM 130 boots, the MCU 110 executes software execution code such as an OS without verification. Therefore, passing any value from the OS to the HSM 130 is unreliable. For example, if someone manipulates the OS, no value can be transmitted to the HSM 130. Therefore, since the process of verifying the OS must proceed independently of the MCU 110, the HSM 130 reads the hash table directly from the serial flash memory 111.

HSM(130)은 S104에서 계산한 해시 테이블의 해시값과 사전에 저장된 공개키를 이용하여, 시리얼 플래시 메모리(111)로부터 로딩한 전자 서명값을 검증하는 루트 해시 검증의 성공 여부를 판단한다(S105).The HSM 130 uses the hash value of the hash table calculated in S104 and the public key stored in advance to determine whether root hash verification, which verifies the electronic signature value loaded from the serial flash memory 111, is successful (S105) ).

HSM(130)은 S105에서 루트 해시 검증 성공으로 판단되면, 시리얼 플래시 메모리(111)의 소프트웨어 실행 코드를 복수개로 분할하고, 분할 블록 중 첫번째 블록을 선정한다(S106).If it is determined that the root hash verification is successful in S105, the HSM 130 divides the software execution code of the serial flash memory 111 into a plurality of blocks and selects the first block among the divided blocks (S106).

HSM(130)은 첫번째 블록에 대한 해시값을 계산한다(S107). 앞서 언급한 바와 같이, 해시 연산 속도는 입력 데이터의 크기에 비례하기 때문에 종래처럼 소프트웨어 실행 코드 전체의 해시를 계산하는 것 보다 하나의 블록에 대한 해시를 계산함으로써, 무결성 검증 속도를 빠르게 진행할 수 있다.HSM 130 calculates the hash value for the first block (S107). As mentioned earlier, the hash calculation speed is proportional to the size of the input data, so the integrity verification speed can be accelerated by calculating the hash for one block rather than calculating the hash of the entire software execution code as in the past.

HSM(130)은 S107에서 계산한 해시값을 해시 테이블의 첫번째 블록에 대한 해시값과 비교하여 일치 여부를 판단한다(S108).The HSM 130 compares the hash value calculated in S107 with the hash value of the first block of the hash table to determine whether they match (S108).

S108에서 일치하면, HSM(130)은 S107에서 해시값이 계산된 블록이 마지막 블록인지 판단(S109)하고, 마지막 블록이 아니면 다음 블록을 선정한다(S110). 그리고 HSM(130)은 선정(S110)한 블록에 대하여 S107~S109를 수행하기를 반복한다.If there is a match in S108, the HSM 130 determines whether the block for which the hash value was calculated in S107 is the last block (S109), and if it is not the last block, selects the next block (S110). Then, the HSM 130 repeats steps S107 to S109 for the block selected (S110).

S109에서 마지막 블록으로 판단되면, HSM(130)은 모든 블록에 대하여 무결성 검증이 성공으로 처리된 것으로 판단하고, 검증을 완료한다(S111).If it is determined to be the last block in S109, the HSM 130 determines that the integrity verification for all blocks has been successfully processed and completes the verification (S111).

반면, S105에서 루트 해시 검증 실패로 판단되거나 또는 S108에서 해시값 검증에 실패하면, HSM(130)은 무결성 검증 실패로 판단하고 시스템을 재부팅한다(S112). 즉, HSM(130)은 MCU(110)에게 재부팅 명령어를 전송하여 MCU(110)를 재부팅시킬 수 있다.On the other hand, if it is determined that the root hash verification has failed in S105 or the hash value verification has failed in S108, the HSM 130 determines that the integrity verification has failed and reboots the system (S112). That is, the HSM 130 may reboot the MCU 110 by sending a reboot command to the MCU 110.

이와 같이, 본 발명의 실시예에 따르면, MCU(110)는 OS(Operating System)와 같은 소프트웨어 실행 코드를 검증없이 일단 실행하고, HSM(130) → 해시 테이블 →소프트웨어 실행 코드로 신뢰 체인을 형성한다. HSM(130)에서 소프트웨어 실행 코드를 바로 검증하지 않고, 해시 테이블을 이용하여 블록 단위로 검증함으로써, 오류를 최대한 빠르게 발견할 수 있다. 종래에는 소프트웨어 실행 코드 전체에 대해 검증 절차를 수행하므로, 첫번째 블록에 오류가 있더라도, 소프트웨어 전체 검증으로 인한 시간이 오래 걸리는 문제점이 있으나, 본 발명의 실시예에서는 이러한 문제점을 해결할 수 있다.As such, according to an embodiment of the present invention, the MCU 110 executes software execution code such as an OS (Operating System) without verification, and forms a trust chain from HSM 130 → hash table → software execution code. . Errors can be discovered as quickly as possible by verifying them in block units using a hash table rather than directly verifying the software execution code in the HSM 130. Conventionally, since the verification procedure is performed on the entire software execution code, there is a problem that verification of the entire software takes a long time even if there is an error in the first block. However, this problem can be solved in the embodiment of the present invention.

또한, 종래에는 ROM → OS(Operating System) 로더(Loader) → OS의 신뢰 체인을 형성한다. 이러한 신뢰 체인은 ROM에서 OS Loader를 검증하고, OS Loader에서 OS를 검증하는 체인을 의미한다. 그러나 시리얼 플래시 메모리를 사용하는 경우, 시리얼 플래시의 읽기 성능이 낮아 부팅 시간이 길어진다. 이와 달리, 본 발명의 실시예에서는 HSM -> 해시 테이블 -> OS의 신뢰 체인을 통해서 해시 테이블을 검증한다. 그리고 단일 해시를 이용하여 OS를 검증하면 플래시 메모리의 성능으로 인해 검증 시간이 길어지므로, 블록 단위로 검증을 진행한다. 따라서, MCU(110)는 신뢰 체인 없이 소프트웨어 실행 코드(예, OS)를 실행하지만, HSM(130)이 대신 신뢰 체인을 형성하여 소프트웨어 실행 코드를 검증할 수 있다. Additionally, conventionally, a trust chain is formed from ROM → OS (Operating System) Loader → OS. This trust chain refers to a chain that verifies the OS Loader in the ROM and verifies the OS in the OS Loader. However, when serial flash memory is used, the read performance of the serial flash is low, resulting in longer booting times. In contrast, in the embodiment of the present invention, the hash table is verified through the trust chain of HSM -> hash table -> OS. Also, if the OS is verified using a single hash, the verification time is long due to the performance of flash memory, so verification is performed in block units. Accordingly, the MCU 110 executes software executable code (e.g., OS) without a trust chain, but the HSM 130 may instead form a trust chain to verify the software executable code.

또한, 해시 연산 속도는 해시 연산 속도는 입력 데이터의 크기에 비례한다.Additionally, the hash operation speed is proportional to the size of the input data.

소프트웨어 실행 코드 전체에 대해서 해시를 계산하고 검증하는 것은 많은 시간이 소요된다. 해시 테이블의 크기는 소프트웨어 실행 코드에 비해 매우 작다. 따라서 해시를 계산하는 시간이 짧다. 예를 들면, 소프트웨어 크기가 10240 킬로바이트(Kbyte)이고, 해시 알고리즘으로 SHA256을 사용하고 블록 사이즈를 8 Kbyte로 하는 경우, 해시 테이블의 크기는 40KByte = (10240 KByte / 8 KByte) × 32Byte 이다. 이때, SHA256의 해시 크기는 32Byte이다. 따라서, 첫번째 블록에서 오류가 발견하기 위해, 종래 기술은 10240 KByte에 대한 해시를 계산해야 하지만, 본 발명의 실시예에 따르면, 첫번째 블록의 무결성 검증하는데 48KB(=40KB+8KB)의 해시를 계산하면 되므로, 소프트웨어 실행 코드의 오류를 빠르게 발견하고 대응할 수 있다.Computing and verifying hashes for the entire software executable code takes a lot of time. The size of the hash table is very small compared to the software executable code. Therefore, the time to calculate the hash is short. For example, if the software size is 10240 kilobytes (Kbyte), SHA256 is used as the hash algorithm, and the block size is 8 Kbyte, the size of the hash table is 40KByte = (10240 KByte / 8 KByte) × 32Byte. At this time, the hash size of SHA256 is 32 Bytes. Therefore, in order to detect an error in the first block, the prior art needs to calculate a hash for 10240 KBytes, but according to the embodiment of the present invention, to verify the integrity of the first block, calculating a hash of 48KB (=40KB+8KB) Therefore, errors in software execution code can be quickly discovered and responded to.

이상에서 설명한 본 발명의 실시예는 장치 및 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시예의 구성에 대응하는 기능을 실현하는 프로그램 또는 그 프로그램이 기록된 기록 매체를 통해 구현될 수도 있다.The embodiments of the present invention described above are not only implemented through devices and methods, but can also be implemented through programs that implement functions corresponding to the configurations of the embodiments of the present invention or recording media on which the programs are recorded.

이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.Although the embodiments of the present invention have been described in detail above, the scope of the present invention is not limited thereto, and various modifications and improvements made by those skilled in the art using the basic concept of the present invention defined in the following claims are also possible. It falls within the scope of rights.

Claims (10)

하드웨어 보안 모듈이 소프트웨어의 무결성을 검증하는 방법으로서,
상기 소프트웨어는,
MCU(microcontroller unit)에 의해 미검증 상태에서 시리얼 플래시 메모리에서 XIP(eXecute-In-Place) 모드로 실행됨과 동시에 상기 하드웨어 보안 모듈에 의해 무결성 검증 동작이 수행되고,
상기 무결성 검증 동작은,
상기 시리얼 플래시 메모리에 저장된 소프트웨어가 XIP 모드로 실행되면, 상기 시리얼 플래시 메모리로부터 상기 소프트웨어에 대한 해시값들을 저장한 해시 테이블을 직접 리드(read)하여 상기 하드웨어 보안 모듈의 내부 메모리에 로딩 하는 단계,
상기 해시 테이블에 대해 연산한 해시값과 상기 시리얼 플래시 메모리에 저장된 상기 해시 테이블에 대한 해시값을 비교하여 불일치하면, 시스템을 재부팅 시키는 단계,
상기 소프트웨어를 복수개의 블록으로 분할하고, 각 분할 블록 단위로 해시값들을 연산하는 단계,
분할 블록 순서대로, 각각의 분할 블록에 대하여 연산한 해시값을 상기 해시 테이블에 저장된 대응하는 분할 블록의 해시값과 비교하여 일치 여부를 판단하는 단계,
분할 블록의 해시값들이 일치하면, 무결성 검증을 종료하는 단계,그리고
상기 분할 블록의 해시값들이 불일치하면, 시스템을 재부팅시키는 단계를 포함하고,
상기 분할 블록의 해시값들이 불일치하면, 시스템을 재부팅 시키는 단계는,
상기 분할 블록 순서대로 해시값 일치 여부를 판단하는 중에, 해시값 불일치로 판단된 하나의 분할 블록이 발생하면, 다음 순서의 해시값을 비교하지 않고 시스템 재부팅을 바로 진행하는, 무결성 검증 방법.
A method for a hardware security module to verify the integrity of software, comprising:
The software is,
It is executed in XIP (eXecute-In-Place) mode on serial flash memory in an unverified state by an MCU (microcontroller unit), and at the same time, an integrity verification operation is performed by the hardware security module,
The integrity verification operation is,
When the software stored in the serial flash memory is executed in XIP mode, directly reading a hash table storing hash values for the software from the serial flash memory and loading it into the internal memory of the hardware security module,
Comparing the hash value calculated for the hash table and the hash value for the hash table stored in the serial flash memory, and if there is a discrepancy, rebooting the system;
Dividing the software into a plurality of blocks and calculating hash values for each divided block,
In order of split blocks, comparing the hash value calculated for each split block with the hash value of the corresponding split block stored in the hash table to determine whether there is a match;
If the hash values of the split blocks match, terminating the integrity verification, and
If the hash values of the split blocks do not match, rebooting the system,
If the hash values of the split blocks do not match, the step of rebooting the system is,
While determining whether the hash values match in the order of the split blocks, if one split block determined to have a hash value mismatch occurs, an integrity verification method that immediately reboots the system without comparing the hash values in the next order.
삭제delete 제1항에서,
상기 해시 테이블에 대해 연산된 해시값을 비교하여 불일치하면, 시스템을 재부팅시키는 단계는,
상기 해시 테이블에 대해 연산된 해시값을 토대로 전자 서명값을 계산하는 단계,
상기 시리얼 플래시 메모리로부터 해시 테이블의 해시값을 토대로 생성된 전자 서명값을 독출하는 단계, 그리고
상기 계산한 전자 서명값을 상기 독출한 전자 서명값과 비교하여 불일치하면 무결성 검증 실패로 판단하고, 상기 시스템을 재부팅시키는 단계
를 포함하는, 무결성 검증 방법.
In paragraph 1:
The step of comparing the hash values calculated for the hash table and if there is a mismatch, rebooting the system,
Calculating an electronic signature value based on the hash value calculated for the hash table,
Reading an electronic signature value generated based on a hash value of a hash table from the serial flash memory, and
Comparing the calculated electronic signature value with the read electronic signature value, determining that integrity verification has failed if there is a discrepancy, and rebooting the system.
Integrity verification method including.
삭제delete 소프트웨어 실행 코드와, 상기 소프트웨어 실행 코드를 복수개로 분할한 복수의 분할 블록에 대한 해시값들을 포함하는 해시 테이블과 상기 해시 테이블에 대한 해시값을 저장하는 시리얼 플래시 메모리,
상기 소프트웨어 실행 코드를 미검증 상태에서 상기 시리얼 플래시 메모리의 XIP(eXecute-In-Place) 모드에서 실행하는 MCU(microcontroller unit), 그리고
상기 MCU의 소프트웨어 실행 코드 실행과 동시에 상기 MCU와 독립적으로, 상기 소프트웨어 실행 코드에 대한 무결성 검증 동작을 수행하는 하드웨어 보안 모듈을 포함하고,
상기 하드웨어 보안 모듈은,
상기 소프트웨어 실행 코드가 XIP 모드로 실행되면, 상기 시리얼 플래시 메모리로부터 상기 해시 테이블을 직접 리드(read)하여 상기 하드웨어 보안 모듈의 내부 메모리에 로딩 하고,
상기 해시 테이블에 대해 연산한 해시값과 상기 시리얼 플래시 메모리에 저장된 상기 해시 테이블에 대한 해시값을 비교하여 불일치하면, 시스템을 재부팅시키고,
상기 소프트웨어 실행 코드를 복수개로 분할하여 분할 블록의 순서대로 분할 블록의 해시값에 대해 연산한 해시값을 상기 해시 테이블에 저장된 대응하는 분할 블록의 해시값과 비교하여 불일치하면, 시스템을 재부팅 시키고,
상기 분할 블록 순서대로 해시값 일치 여부를 판단하는 중에, 해시값 불일치로 판단된 하나의 분할 블록이 발생하면, 다음 순서의 해시값을 비교하지 않고 시스템 재부팅을 바로 진행하며,
모든 분할 블록에 대하여 연산한 해시값들을 상기 해시 테이블에 저장된 대응하는 해시값들과 비교한 결과 일치하면 무결성 검증을 종료하는, 무결성 검증 장치.
A serial flash memory that stores a hash table containing a software executable code and hash values for a plurality of partition blocks in which the software executable code is divided into a plurality of blocks, and a hash value for the hash table,
An MCU (microcontroller unit) that executes the software execution code in an eXecute-In-Place (XIP) mode of the serial flash memory in an unverified state, and
A hardware security module that performs an integrity verification operation for the software executable code independently of the MCU while simultaneously executing the software executable code of the MCU,
The hardware security module is,
When the software executable code is executed in XIP mode, the hash table is directly read from the serial flash memory and loaded into the internal memory of the hardware security module,
Compare the hash value calculated for the hash table with the hash value for the hash table stored in the serial flash memory, and if there is a discrepancy, reboot the system,
The software execution code is divided into a plurality of pieces, and the hash value calculated for the hash value of the split block in the order of the split blocks is compared with the hash value of the corresponding split block stored in the hash table. If there is a mismatch, the system is rebooted,
While determining whether the hash values match in the order of the split blocks, if one split block that is determined to have a hash value mismatch occurs, the system is immediately rebooted without comparing the hash values in the next order.
An integrity verification device that compares hash values calculated for all split blocks with corresponding hash values stored in the hash table and terminates integrity verification if they match.
제5항에서,
상기 하드웨어 보안 모듈은,
상기 해시 테이블에 대한 전자 서명값을 생성하고, 상기 시리얼 플래시 메모리에 저장된 전자 서명값을 독출하여,
생성한 전자 서명값과 상기 독출한 전자 서명값이 불일치하면, 시스템을 재부팅시키고, 일치하면 상기 분할 블록 단위로 해시값 검증을 수행하는, 무결성 검증 장치.
In paragraph 5,
The hardware security module is,
Generating an electronic signature value for the hash table and reading the electronic signature value stored in the serial flash memory,
An integrity verification device that reboots the system if the generated electronic signature value and the read electronic signature value do not match, and performs hash value verification in units of the divided blocks if they match.
제6항에서,
상기 하드웨어 보안 모듈은,
상기 시리얼 플래시 메모리에 직접 접근하여 상기 시리얼 플래시 메모리에 저장된 해시 테이블과 전자 서명값을 독출하는, 무결성 검증 장치.
In paragraph 6:
The hardware security module is,
An integrity verification device that directly accesses the serial flash memory and reads the hash table and electronic signature value stored in the serial flash memory.
제6항에서,
상기 전자 서명값은,
상기 해시 테이블에 대한 해시값을 토대로 생성되는, 무결성 검증 장치.
In paragraph 6:
The electronic signature value is,
An integrity verification device generated based on a hash value for the hash table.
삭제delete 삭제delete
KR1020210180988A 2021-12-16 2021-12-16 Method and apparatus for verify software integrity KR102598510B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210180988A KR102598510B1 (en) 2021-12-16 2021-12-16 Method and apparatus for verify software integrity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210180988A KR102598510B1 (en) 2021-12-16 2021-12-16 Method and apparatus for verify software integrity

Publications (2)

Publication Number Publication Date
KR20230091660A KR20230091660A (en) 2023-06-23
KR102598510B1 true KR102598510B1 (en) 2023-11-06

Family

ID=86993745

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210180988A KR102598510B1 (en) 2021-12-16 2021-12-16 Method and apparatus for verify software integrity

Country Status (1)

Country Link
KR (1) KR102598510B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117193863B (en) * 2023-09-08 2024-05-24 上海合芯数字科技有限公司 Method, device, system and processor for starting host bootstrap program
CN117478175B (en) * 2023-10-25 2024-04-30 中通服网盈科技有限公司 Power communication transmission optimization system and operation method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101434860B1 (en) * 2013-08-16 2014-09-02 (주)잉카엔트웍스 Method for Verifying Integrity of Dynamic Code Using Hash
KR101699955B1 (en) * 2015-09-21 2017-01-26 주식회사 텔레칩스 System and method for automatic detection of DRAM data forgery

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160096391A (en) * 2015-02-05 2016-08-16 한국전자통신연구원 Apparatus and Method for Security of Portable Terminal Based on Platform Integrity Verification
KR101887974B1 (en) * 2016-12-01 2018-08-13 현대오트론 주식회사 System and method for secure boot of engine management system
KR102415005B1 (en) * 2019-08-21 2022-07-01 한국전자통신연구원 Hardware security module for verifying execution code, device having the same, and operating method thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101434860B1 (en) * 2013-08-16 2014-09-02 (주)잉카엔트웍스 Method for Verifying Integrity of Dynamic Code Using Hash
KR101699955B1 (en) * 2015-09-21 2017-01-26 주식회사 텔레칩스 System and method for automatic detection of DRAM data forgery

Also Published As

Publication number Publication date
KR20230091660A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
US7921286B2 (en) Computer initialization for secure kernel
CN107545184B (en) Credibility measuring system and method for cloud host
KR102598510B1 (en) Method and apparatus for verify software integrity
US8281229B2 (en) Firmware verification using system memory error check logic
US11163886B2 (en) Information handling system firmware bit error detection and correction
US9703635B2 (en) Method, computer program, and computer for restoring set of variables
JP5307196B2 (en) Providing a system integrated with silicon code
US20100058314A1 (en) Computer System and Related Method of Logging BIOS Update Operation
US20040255106A1 (en) Recovery of operating system configuration data by firmware of computer system
US20050177709A1 (en) Apparatus and method for updating firmware
US11042644B2 (en) Method and system for security verification in a booting process with a multi-core processor
GB2466685A (en) Fault tolerant updating of firmware
US20100125731A1 (en) Method for securely merging multiple nodes having trusted platform modules
US10776493B2 (en) Secure management and execution of computing code including firmware
US7418589B2 (en) System and method for updating a basic input/output system
CN101807152A (en) Basic output and input system for self verification of selection read only memory and verification method thereof
US11068599B2 (en) Secure initialization using embedded controller (EC) root of trust
WO2022058459A1 (en) Bootloaders
TWI743480B (en) Computer system and a booting method for the same
US11169828B2 (en) Electronic control unit and method for verifying control program
WO2021012170A1 (en) Firmware booting method and device, and computer-readable storage medium
CN113238790B (en) Firmware program updating method and system based on SD card and EEPROM
US7490232B2 (en) Disk device using disk to rewrite firmware and firmware determination method
US20230129942A1 (en) Method for locking a rewritable non-volatile memory and electronic device implementing said method
US20230418590A1 (en) Instruction updates

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