KR20230092747A - Electronic apparatus and method for encryption thereof - Google Patents

Electronic apparatus and method for encryption thereof Download PDF

Info

Publication number
KR20230092747A
KR20230092747A KR1020220165867A KR20220165867A KR20230092747A KR 20230092747 A KR20230092747 A KR 20230092747A KR 1020220165867 A KR1020220165867 A KR 1020220165867A KR 20220165867 A KR20220165867 A KR 20220165867A KR 20230092747 A KR20230092747 A KR 20230092747A
Authority
KR
South Korea
Prior art keywords
open software
software
secret key
processor
key
Prior art date
Application number
KR1020220165867A
Other languages
Korean (ko)
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 PCT/KR2022/020685 priority Critical patent/WO2023113573A1/en
Publication of KR20230092747A publication Critical patent/KR20230092747A/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/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine
    • 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/602Providing cryptographic facilities or services
    • 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
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0822Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using key encryption key
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords

Abstract

전자 장치가 개시된다. 본 전자 장치는 외부 장치와 통신을 수행하는 통신 장치, 데이터를 저장하는 메모리, 및 TEE(Trusted Execution Environment) 기능을 지원하는 프로세서를 포함하고, 프로세서는 외부 장치로부터 공개 소프트웨어, 공개 소프트웨어에 대응되는 서명 정보 및 공개 소프트웨어에 대응되는 해시 정보를 수신하면, 수신한 공개 소프트웨어를 SGX 기능에 대응되는 보호 영역에 저장하고, 공개 소프트웨어에 대응되는 비밀 키를 생성하고, 보호 영역에 저장된 공개 소프트웨어 및 데이터를 이용하여 공개 소프트웨어에 대응되는 연산을 수행한다. An electronic device is disclosed. The electronic device includes a communication device that communicates with an external device, a memory that stores data, and a processor that supports a TEE (Trusted Execution Environment) function. The processor includes open software from an external device and a signature corresponding to the open software. Upon receiving hash information corresponding to information and open software, the received open software is stored in a protection area corresponding to the SGX function, a secret key corresponding to the open software is generated, and the open software and data stored in the protection area are used. to perform calculations corresponding to open software.

Description

전자 장치 및 암호화 방법{ELECTRONIC APPARATUS AND METHOD FOR ENCRYPTION THEREOF}ELECTRONIC APPARATUS AND METHOD FOR ENCRYPTION THEREOF}

본 개시는 전자 장치 및 암호화 방법에 관한 것으로, 구체적으로 TEE(Trusted Execution Environment) 기능을 지원하는 CPU에서 내부 데이터 유출을 방지할 수 있는 전자 장치 및 암호화 방법에 관한 것이다. The present disclosure relates to an electronic device and an encryption method, and more specifically, to an electronic device and an encryption method capable of preventing leakage of internal data in a CPU supporting a Trusted Execution Environment (TEE) function.

TEE(Trusted Execution Environment) 기능은 소프트웨어가 아닌 하드웨어 기반으로 동작을 제어하는 기술로, 소프트웨어의 보안성을 높이도록 디자인된 아키텍처 익스텐션이다. The Trusted Execution Environment (TEE) function is a technology that controls operations based on hardware rather than software, and is an architectural extension designed to increase software security.

구체적으로, 사용자가 보호 영역을 설정하여 CPU가 메모리 일부를 암호화하고, 보호 영역에 있는 데이터는 보호 영역 내에서 실행되는 프로그램 이외에는 접근할 수 없도록 하는 기술이다. Specifically, this is a technology in which a user sets a protection area, the CPU encrypts a part of memory, and data in the protection area is not accessible to anyone other than a program running within the protection area.

이에 따라 OS가 외부 공격에 의하여 해킹 된다고 하더라도, TEE가 적용된 플랫폼에서 애플리케이션과 데이터의 보호 영역 내의 정보는 안전한 장점이 있다. Accordingly, even if the OS is hacked by an external attack, the information within the protection area of applications and data in the TEE-applied platform has the advantage of being safe.

이와 같이 TEE 기능 보호에 안전한 장점이 있으나, 해당 플랫폼에 저장된 애플리케이션에 악의적인 기능을 포함한 경우 상술한 기능은 무용지물 되는 문제가 있다.As such, although there is a safe advantage in protecting the TEE function, there is a problem in that the above-described function becomes useless when a malicious function is included in an application stored in the corresponding platform.

따라서, 본 개시는 상술한 바와 같은 문제점을 해결하기 위한 고안된 것으로, TEE(Trusted Execution Environment) 기능을 지원하는 CPU에서 내부 데이터 유출을 방지할 수 있는 전자 장치 및 암호화 방법을 제공하는데 있다. Accordingly, the present disclosure has been devised to solve the above-described problems, and an object of the present disclosure is to provide an electronic device and an encryption method capable of preventing leakage of internal data in a CPU supporting a TEE (Trusted Execution Environment) function.

본 개시는 이상과 같은 목적을 달성하기 위한 것으로, 본 개시의 일 실시 예에 따른 전자 장치는 외부 장치와 통신을 수행하는 통신 장치, 데이터를 저장하는 메모리, 및 TEE(Trusted Execution Environment) 기능을 지원하는 프로세서를 포함하고, 상기 프로세서는, 상기 외부 장치로부터 공개 소프트웨어, 상기 공개 소프트웨어에 대응되는 서명 정보 및 상기 공개 소프트웨어에 대응되는 해시 정보를 수신하면, 상기 수신한 공개 소프트웨어를 상기 TEE 기능에 대응되는 보호 영역에 저장하고, 상기 공개 소프트웨어에 대응되는 비밀 키를 생성하고, 상기 보호 영역에 저장된 공개 소프트웨어 및 상기 데이터를 이용하여 상기 공개 소프트웨어에 대응되는 연산을 수행한다. The present disclosure is to achieve the above object, and an electronic device according to an embodiment of the present disclosure supports a communication device for communicating with an external device, a memory for storing data, and a Trusted Execution Environment (TEE) function. and a processor that, when receiving open software, signature information corresponding to the open software, and hash information corresponding to the open software from the external device, converts the received open software to the TEE function. It is stored in a protection area, a private key corresponding to the open software is generated, and an operation corresponding to the open software is performed using the open software and the data stored in the protection area.

이 경우, 상기 프로세서는, 상기 비밀 키를 제1 비밀 키 및 제2 비밀 키로 나누고, 상기 제1 비밀 키를 상기 개인키로 암호화하여 저장하고, 상기 제2 비밀 키를 상기 서명 정보를 이용하여 암호화하여 저장할 수 있다. In this case, the processor divides the private key into a first private key and a second private key, encrypts and stores the first private key with the private key, encrypts the second private key using the signature information, can be saved

이 경우, 상기 비밀 키는 상기 제1 비밀 키 및 상기 제2 비밀 키를 XOR 연산하여 산출될 수 있다. In this case, the secret key may be calculated by performing an XOR operation on the first secret key and the second secret key.

한편, 상기 프로세서는, 상기 수신한 개인 키를 상기 TEE 기능을 이용하여 암호화하고, 암호화된 개인 키를 상기 보호 영역에 저장할 수 있다. Meanwhile, the processor may encrypt the received private key using the TEE function and store the encrypted private key in the protection area.

한편, 상기 프로세서는, 상기 공개 소프트웨어에 대응되는 연산 결과를 상기 비밀 키를 이용하여 암호화할 수 있다. Meanwhile, the processor may encrypt an operation result corresponding to the open software using the secret key.

이 경우, 상기 프로세서는, 상기 암호화된 연산 결과 및 상기 비밀 키에 대응되는 암호화 키 정보를 전송하도록 상기 통신 장치를 제어할 수 있다. In this case, the processor may control the communication device to transmit encryption key information corresponding to the encrypted operation result and the secret key.

이 경우, 상기 암호화 키 정보는, 상기 비밀 키를 구성하는 제1 비밀 키를 상기 개인 키로 암호화한 제1 데이터와 상기 비밀 키를 구성하는 제2 비밀 키를 상기 서명 정보를 이용하여 암호화한 제2 데이터를 포함할 수 있다. In this case, the encryption key information includes first data obtained by encrypting the first private key constituting the private key with the private key, and second data obtained by encrypting the second private key constituting the private key using the signature information. may contain data.

한편, 상기 프로세서는, 상기 암호화된 연산 결과와 상기 공개 소프트웨어에 대한 정보를 상기 메모리에 저장할 수 있다. Meanwhile, the processor may store the encrypted operation result and information on the open software in the memory.

이 경우, 상기 프로세서는, 상기 공개 소프트웨어가 이용하는 데이터가 상기 메모리에 암호문 형태로 저장되어 있으면, 상기 암호문에 대응되는 공개 소프트웨어 정보와 연산을 수행할 소프트웨어를 비교하여 동일 소프트웨어이면 상기 암호문을 상기 비밀 키를 이용하여 복호화할 수 있다. In this case, if the data used by the open software is stored in the form of cipher text in the memory, the processor compares the open software information corresponding to the cipher text with the software to perform the operation, and if it is the same software, the cipher text is converted into the secret key. can be decrypted using

한편, 상기 프로세서는, 상기 공개 소프트웨어를 수신하면 상기 공개 소프트웨어에 대한 무결성을 검사하고, 무결성이 확인되면 상기 비밀 키를 생성할 수 있다. Meanwhile, when receiving the open software, the processor may check integrity of the open software, and generate the secret key when the integrity is confirmed.

한편, 상기 프로세서는, 비공개 소프트웨어를 이용하여 연산 명령이 입력되면, 상기 연산 명령을 동형 암호문에 대응되는 동형 연산을 이용하여 상기 연산 명령을 수행할 수 있다. Meanwhile, when an operation command is input using non-public software, the processor may perform the operation command by using an isomorphic operation corresponding to an isomorphic ciphertext.

한편, 본 개시의 일 실시 예에 따른 TEE(Trusted Execution Environment) 기능을 지원하는 프로세서를 포함하는 전자 장치의 암호화 방법은 상기 외부 장치로부터 공개 소프트웨어, 상기 공개 소프트웨어에 대응되는 서명 정보 및 상기 공개 소프트웨어에 대응되는 해시 정보를 수신하는 단계, 상기 수신한 공개 소프트웨어를 상기 TEE 기능에 대응되는 보호 영역에 저장하는 단계, 상기 공개 소프트웨어에 대응되는 비밀 키를 생성하는 단계, 및 상기 보호 영역에 저장된 공개 소프트웨어 및 상기 데이터를 이용하여 상기 공개 소프트웨어에 대응되는 연산을 수행하는 단계를 포함한다. Meanwhile, in an encryption method of an electronic device including a processor supporting a TEE (Trusted Execution Environment) function according to an embodiment of the present disclosure, open software, signature information corresponding to the open software, and the open software are stored from the external device. Receiving corresponding hash information, storing the received public software in a protection area corresponding to the TEE function, generating a secret key corresponding to the public software, and storing the public software stored in the protection area. and performing an operation corresponding to the open software using the data.

이 경우, 본 암호화 방법은 상기 공개 소프트웨어에 대응되는 연산 결과를 상기 비밀 키를 이용하여 암호화하는 단계를 더 포함할 수 있다. In this case, the encryption method may further include encrypting an operation result corresponding to the open software using the secret key.

이 경우, 본 암호화 방법은 상기 암호화된 연산 결과 및 상기 비밀 키에 대응되는 암호화 키 정보를 전송하는 단계를 더 포함할 수 있다. In this case, the encryption method may further include transmitting encryption key information corresponding to the encrypted operation result and the secret key.

이 경우, 상기 암호화 키 정보는, 상기 비밀 키를 구성하는 제1 비밀 키를 상기 개인 키로 암호화한 제1 데이터와 상기 비밀 키를 구성하는 제2 비밀 키를 상기 서명 정보를 이용하여 암호화한 제2 데이터를 포함할 수 있다. In this case, the encryption key information includes first data obtained by encrypting the first private key constituting the private key with the private key, and second data obtained by encrypting the second private key constituting the private key using the signature information. may contain data.

한편, 본 암호화 방법은 상기 암호화된 연산 결과와 상기 공개 소프트웨어에 대한 정보를 메모리에 저장하는 단계를 더 포함할 수 있다. Meanwhile, the encryption method may further include storing the encrypted operation result and information on the open software in a memory.

이 경우, 본 암호화 방법은 상기 공개 소프트웨어가 이용하는 데이터가 상기 메모리에 암호문 형태로 저장되어 있으면, 상기 암호문에 대응되는 공개 소프트웨어 정보와 연산을 수행할 소프트웨어를 비교하여 동일 소프트웨어이면 상기 암호문을 상기 비밀 키를 이용하여 복호화하는 단계를 더 포함할 수 있다. In this case, if the data used by the open software is stored in the form of ciphertext in the memory, the open software information corresponding to the ciphertext is compared with the software to perform the operation, and if the software is the same, the ciphertext is converted into the secret key. A step of decoding using ? may be further included.

한편, 본 암호화 방법은 상기 공개 소프트웨어를 수신하면 상기 공개 소프트웨어에 대한 무결성을 검사하는 단계를 더 포함할 수 있다. Meanwhile, the encryption method may further include checking integrity of the open software upon receiving the open software.

이상과 같은 본 개시의 다양한 실시 예에 따르면, 해킹뿐만 아니라 악의적인 소프트웨어가 사용자 데이터를 광고 또는 데이터 판매 목적과 같은 악의적인 누출이 발생하지 않도록 안전하게 보호하는 것이 가능하다. According to various embodiments of the present disclosure as described above, it is possible to safely protect user data not only from hacking but also from malicious software leakage, such as for the purpose of advertisement or data sale.

본 개시의 실시 예들의 상술하거나 다른 측면, 특징, 이익들은 첨부도면을 참조한 아래의 설명으로부터 더욱 명백해질 것이다. 첨부도면에서:
도 1은 본 개시의 TEE 기능을 설명하기 위한 도면,
도 2는 본 개시의 일 실시 예에 따른 전자 장치의 구성을 설명하기 위한 도면,
도 3은 본 개시의 프로세서의 구체적인 구성을 설명하기 위한 도면,
도 4는 본 개시의 공개 코드를 이용한 실시 예를 설명하기 위한 시퀀스도,
도 5는 본 개시의 일 실시 예에 따른 암호화 방법을 설명하기 위한 흐름도, 그리고,
도 6은 본 개시의 일 실시 예에 따른 암호화 방법을 설명하기 위한 흐름도이다.
The above and other aspects, features, and advantages of the embodiments of the present disclosure will become more apparent from the following description with reference to the accompanying drawings. In the attached drawing:
1 is a diagram for explaining the TEE function of the present disclosure;
2 is a diagram for explaining a configuration of an electronic device according to an embodiment of the present disclosure;
3 is a diagram for explaining a specific configuration of a processor of the present disclosure;
4 is a sequence diagram for explaining an embodiment using an open code of the present disclosure;
5 is a flowchart for explaining an encryption method according to an embodiment of the present disclosure, and
6 is a flowchart for explaining an encryption method according to an embodiment of the present disclosure.

본 실시 예들은 다양한 변환을 가할 수 있고 여러 가지 실시 예를 가질 수 있는바, 특정 실시 예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나 이는 특정한 실시 형태에 대해 범위를 한정하려는 것이 아니며, 본 개시의 실시 예의 다양한 변경(modifications), 균등물(equivalents), 및/또는 대체물(alternatives)을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다.Since the present embodiments can apply various transformations and have various embodiments, specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the scope to the specific embodiments, and should be understood to include various modifications, equivalents, and/or alternatives of the embodiments of the present disclosure. In connection with the description of the drawings, like reference numerals may be used for like elements.

본 개시를 설명함에 있어서, 관련된 공지 기능 혹은 구성에 대한 구체적인 설명이 본 개시의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그에 대한 상세한 설명은 생략한다. In describing the present disclosure, if it is determined that a detailed description of a related known function or configuration may unnecessarily obscure the gist of the present disclosure, a detailed description thereof will be omitted.

덧붙여, 하기 실시 예는 여러 가지 다른 형태로 변형될 수 있으며, 본 개시의 기술적 사상의 범위가 하기 실시 예에 한정되는 것은 아니다. 오히려, 이들 실시 예는 본 개시를 더욱 충실하고 완전하게 하고, 당업자에게 본 개시의 기술적 사상을 완전하게 전달하기 위하여 제공되는 것이다.In addition, the following embodiments may be modified in many different forms, and the scope of the technical idea of the present disclosure is not limited to the following embodiments. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the spirit of the disclosure to those skilled in the art.

본 개시에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 권리범위를 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다.Terms used in this disclosure are only used to describe specific embodiments, and are not intended to limit the scope of rights. Singular expressions include plural expressions unless the context clearly dictates otherwise.

본 개시에서, "가진다," "가질 수 있다," "포함한다," 또는 "포함할 수 있다." 등의 표현은 해당 특징(예: 수치, 기능, 동작, 또는 부품 등의 구성요소)의 존재를 가리키며, 추가적인 특징의 존재를 배제하지 않는다. In this disclosure, “has,” “may have,” “comprises,” or “may include.” Expressions such as, etc. indicate the presence of a corresponding feature (eg, a component such as a number, function, operation, or part) and do not exclude the presence of additional features.

본 개시에서, "A 또는 B," "A 또는/및 B 중 적어도 하나," 또는 "A 또는/및 B 중 하나 또는 그 이상 "등의 표현은 함께 나열된 항목들의 모든 가능한 조합을 포함할 수 있다. 예를 들면, "A 또는 B," "A 및 B 중 적어도 하나," 또는 "A 또는 B 중 적어도 하나"는, (1) 적어도 하나의 A를 포함, (2) 적어도 하나의 B를 포함, 또는 (3) 적어도 하나의 A 및 적어도 하나의 B 모두를 포함하는 경우를 모두 지칭할 수 있다.In this disclosure, expressions such as “A or B,” “at least one of A and/and B,” or “one or more of A or/and B” may include all possible combinations of the items listed together. . For example, “A or B,” “at least one of A and B,” or “at least one of A or B” (1) includes at least one A, (2) includes at least one B, Or (3) may refer to all cases including at least one A and at least one B.

본 개시에서 사용된 "제1," "제2," "첫째," 또는 "둘째, "등의 표현들은 다양한 구성요소들을, 순서 및/또는 중요도에 상관없이 수식할 수 있고, 한 구성요소를 다른 구성요소와 구분하기 위해 사용될 뿐 해당 구성요소들을 한정하지 않는다. Expressions such as "first," "second," "first," or "second," used in the present disclosure may modify various elements regardless of order and/or importance, and may refer to one element as It is used only to distinguish it from other components and does not limit the corresponding components.

어떤 구성요소(예: 제1 구성요소)가 다른 구성요소(예: 제2 구성요소)에 "(기능적으로 또는 통신적으로) 연결되어((operatively or communicatively) coupled with/to)" 있다거나 "접속되어(connected to)" 있다고 언급된 때에는, 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로 연결되거나, 다른 구성요소(예: 제3 구성요소)를 통하여 연결될 수 있다고 이해되어야 할 것이다. A component (e.g., a first component) is "(operatively or communicatively) coupled with/to" another component (e.g., a second component); When referred to as "connected to", it should be understood that the certain component may be directly connected to the other component or connected through another component (eg, a third component).

반면에, 어떤 구성요소(예: 제1 구성요소)가 다른 구성요소(예: 제2 구성요소)에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 상기 어떤 구성요소와 상기 다른 구성요소 사이에 다른 구성요소(예: 제3 구성요소)가 존재하지 않은 것으로 이해될 수 있다.On the other hand, when an element (eg, a first element) is referred to as being “directly connected” or “directly connected” to another element (eg, a second element), the element and the above It may be understood that other components (eg, a third component) do not exist between the other components.

본 개시에서 사용된 표현 "~하도록 구성된(또는 설정된)(configured to)"은 상황에 따라, 예를 들면, "~에 적합한(suitable for)," "~하는 능력을 가지는(having the capacity to)," "~하도록 설계된(designed to)," "~하도록 변경된(adapted to)," "~하도록 만들어진(made to)," 또는 "~를 할 수 있는(capable of)"과 바꾸어 사용될 수 있다. 용어 "~하도록 구성된(또는 설정된)"은 하드웨어적으로 "특별히 설계된(specifically designed to)" 것만을 반드시 의미하지 않을 수 있다. The expression “configured to (or configured to)” as used in this disclosure means, depending on the situation, for example, “suitable for,” “having the capacity to.” ," "designed to," "adapted to," "made to," or "capable of." The term "configured (or set) to" may not necessarily mean only "specifically designed to" hardware.

대신, 어떤 상황에서는, "~하도록 구성된 장치"라는 표현은, 그 장치가 다른 장치 또는 부품들과 함께 "~할 수 있는" 것을 의미할 수 있다. 예를 들면, 문구 "A, B, 및 C를 수행하도록 구성된(또는 설정된) 프로세서"는 해당 동작을 수행하기 위한 전용 프로세서(예: 임베디드 프로세서), 또는 메모리 장치에 저장된 하나 이상의 소프트웨어 프로그램들을 실행함으로써, 해당 동작들을 수행할 수 있는 범용 프로세서(generic-purpose processor)(예: CPU 또는 application processor)를 의미할 수 있다.Instead, in some contexts, the phrase "device configured to" may mean that the device is "capable of" in conjunction with other devices or components. For example, the phrase "a processor configured (or configured) to perform A, B, and C" may include a dedicated processor (eg, embedded processor) to perform the operation, or by executing one or more software programs stored in a memory device. , may mean a general-purpose processor (eg, CPU or application processor) capable of performing corresponding operations.

실시 예에 있어서 '모듈' 혹은 '부'는 적어도 하나의 기능이나 동작을 수행하며, 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다. 또한, 복수의 '모듈' 혹은 복수의 '부'는 특정한 하드웨어로 구현될 필요가 있는 '모듈' 혹은 '부'를 제외하고는 적어도 하나의 모듈로 일체화되어 적어도 하나의 프로세서로 구현될 수 있다.In an embodiment, a 'module' or 'unit' performs at least one function or operation, and may be implemented with hardware or software, or a combination of hardware and software. In addition, a plurality of 'modules' or a plurality of 'units' may be integrated into at least one module and implemented by at least one processor, except for 'modules' or 'units' that need to be implemented with specific hardware.

다양한 실시 예들에 따른, 모듈, 프로그램 또는 다른 구성 요소에 의해 수행되는 동작들은 순차적, 병렬적, 반복적 또는 휴리스틱하게 실행되거나, 적어도 일부 동작이 다른 순서로 실행되거나, 생략되거나, 또는 다른 동작이 추가될 수 있다.According to various embodiments, operations performed by modules, programs, or other components may be executed sequentially, in parallel, repetitively, or heuristically, or at least some operations may be executed in a different order, may be omitted, or other operations may be added. can

한편, 도면에서의 다양한 요소와 영역은 개략적으로 그려진 것이다. 따라서, 본 발명의 기술적 사상은 첨부한 도면에 그려진 상대적인 크기나 간격에 의해 제한되지 않는다. Meanwhile, various elements and regions in the drawings are schematically drawn. Therefore, the technical spirit of the present invention is not limited by the relative size or spacing drawn in the accompanying drawings.

한편, 본 개시의 다양한 실시 예에 따른 전자 장치는 예를 들면, TV, 모니터, 프로젝터, 셋톱 박스, 스마트폰, 태블릿 PC, 데스크탑 PC, 랩탑 PC 또는 웨어러블 장치 중 적어도 하나를 포함할 수 있다. 웨어러블 장치는 액세서리형(예: 시계, 반지, 팔찌, 발찌, 목걸이, 안경, 콘택트렌즈, 또는 머리 착용형 장치(head-mounted-device(HMD)), 직물 또는 의류 일체형(예: 전자 의복), 신체 부착형(예: 스킨 패드 또는 문신), 또는 생체 이식형 회로 중 적어도 하나를 포함할 수 있다. Meanwhile, an electronic device according to various embodiments of the present disclosure may include, for example, at least one of a TV, a monitor, a projector, a set-top box, a smart phone, a tablet PC, a desktop PC, a laptop PC, or a wearable device. Wearable devices can be accessories (e.g. watches, rings, bracelets, anklets, necklaces, glasses, contact lenses, or head-mounted-devices (HMDs)), textiles or clothing integrals (e.g. electronic garments); It may include at least one of a body-attached circuit (eg, a skin pad or tattoo) or a body-implanted circuit.

그리고 본 개시에서 "값"이라 함은 스칼라값뿐만 아니라 벡터도 포함하는 개념으로 정의된다. 그리고 본 개시에서 '산출한다', '계산한다.' 등의 표현은 해당 산출 또는 계산의 결과물을 생성한다는 표현으로 대체될 수 있다. 또한, 별도의 언급이 없다면, 후술하는 암호문에 대한 연산은 동형 연산을 의미한다. 예를 들어, 동형 암호문에 대한 덧셈은 두 동형 암호문에 대한 동형 덧셈을 의미한다. And, in the present disclosure, “value” is defined as a concept including a vector as well as a scalar value. And in the present disclosure, 'calculate', 'calculate.' Expressions such as, etc. may be replaced by an expression that produces a result of the corresponding calculation or calculation. In addition, unless otherwise stated, an operation for ciphertext to be described later means an isomorphic operation. For example, addition of homomorphic ciphertexts means homomorphic addition of two homomorphic ciphertexts.

후술하는 본 개시의 각 단계의 수학적 연산 및 산출은 해당 연산 또는 산출을 하기 위해 공지되어 있는 코딩 방법 및/또는 본 개시에 적합하게 고안된 코딩에 의해서 컴퓨터 연산으로 구현될 수 있다.Mathematical operations and calculations of each step of the present disclosure described below may be implemented as computer operations by a known coding method and/or coding designed appropriately for the present disclosure to perform the calculations or calculations.

이하에서 설명하는 구체적인 수학식은 가능한 여러 대안 중에서 예시적으로 설명되는 것이며, 본 개시의 권리 범위가 본 개시에 언급된 수학식에 제한되는 것으로 해석되어서는 아니된다.The specific equations described below are illustratively described among possible alternatives, and the scope of the present disclosure should not be construed as being limited to the equations mentioned in the present disclosure.

이하에서는 첨부한 도면을 참고하여 본 개시에 따른 실시 예에 대하여 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다.Hereinafter, with reference to the accompanying drawings, an embodiment according to the present disclosure will be described in detail so that those skilled in the art can easily implement it.

도 1은 본 개시의 TEE 기능을 설명하기 위한 도면이다. 1 is a diagram for explaining the TEE function of the present disclosure.

도 1을 참조하면, 전자 장치(100)는 TEE 기능을 지원한다. 여기서 TEE 기능은 CPU에 적용된 기술로 보완과 관련된 기술로, SGX(Software Guard eXtension) 등으로 지칭될 수도 있다. 구체적으로, 사용자가 보호 영역을 설정하면, CPU가 메모리 일부를 암호화하고 보호 영역에 있는 데이터는 보호 영역 내에서 실행되는 프로그램 이외에는 접근할 수 없도록 하는 기술이다. Referring to FIG. 1 , the electronic device 100 supports a TEE function. Here, the TEE function is a technology applied to the CPU and related to supplementation, and may be referred to as SGX (Software Guard eXtension) or the like. Specifically, when a user sets a protection area, the CPU encrypts a part of the memory, and data in the protection area is not accessible to anyone other than programs running within the protection area.

이와 같은 보호 구역을 지정하여 하드웨어 암호화 비밀 번호, 비밀 번호 관리 프로그램 내 기밀, 암호화 키 등의 주요한 정보를 보호할 수 있다. By designating such a protection area, important information such as hardware encryption passwords, secrets in password management programs, and encryption keys can be protected.

이와 같이 TEE 기능을 이용함으로써, 해킹 등이 발생하여도 보호 구역 내의 주요 정보는 암호화되어 저장되는바 안전성이 높은 장점이 있다. 또한, 상술한 동작은 하드웨어 방식으로 수행되는바, 빠른 연산 능력을 갖는다는 장점도 있다. In this way, by using the TEE function, even if hacking occurs, the main information in the protection area is encrypted and stored, so there is an advantage of high safety. In addition, since the above-described operation is performed in a hardware manner, there is also an advantage in that it has a fast calculation capability.

그러나 이러한 TEE 기능은 내부의 CPU 제조사가 제공하는 소프트웨어(30)를 이용하여 동작하는데, 만약, 이와 같은 소프트웨어가 데이터를 광고 또는 데이터 판매 목적을 갖는다면, TEE 기능을 이용하여서도 내부 보안 데이터(20) 및 그에 따른 연산 결과(40)에 의해서도 데이터 유출이 발생할 수 밖에 없는 문제가 있다. However, this TEE function operates using the software 30 provided by the internal CPU manufacturer. If such software has the purpose of advertising or selling data, the internal security data 20 ) and the resulting calculation result 40, there is a problem that data leakage cannot but occur.

한편, 최근에는 암호문 상태에서 연산 가능한 동형 암호가 상용화되고 있다는 점에서, 상술한 유출을 방지하기 위하여, 모든 데이터를 동형 암호문으로 저장하고, 소프트웨어 동작도 동형 연산으로 구성하는 경우 상술한 문제점을 해결할 수 있다. On the other hand, since homomorphic encryption that can be operated in the state of ciphertext has recently been commercialized, in order to prevent the above-mentioned leakage, if all data is stored as homomorphic ciphertext and the software operation is also configured with isomorphic operation, the above-mentioned problem can be solved. there is.

그러나 동형 암호문의 처리는 보안성에 있어서 높은 장점이 있지만 연산 속도가 느린 문제가 있다. However, processing of homomorphic ciphertext has a high advantage in security, but has a problem of slow operation speed.

본 개시는 이러한 기존 기술의 문제점을 해결하기 위하여, 동형 연합 학습 방법을 이용한다. The present disclosure uses a homomorphic federation learning method to solve the problems of the existing technology.

구체적으로, 본 개시의 동형 연합 학습은 하드웨어적으로 도 1과 같은 구성, 즉, TEE 기능을 이용하되 TEE 기능을 제공하는 제조사(또는 해당 시스템의 소프트웨어)의 악의적인 동작을 방지하기 위하여, 동작 코드를 공개하거나 동형 암호 처리로 데이터를 처리하는 방식을 이용한다. Specifically, the homomorphic federation learning of the present disclosure uses the configuration shown in FIG. 1 in terms of hardware, that is, the TEE function, but in order to prevent the malicious operation of the manufacturer (or the software of the corresponding system) that provides the TEE function, the operation code or use a method of processing data by homomorphic encryption processing.

구체적으로, 공개할 수 있는 소프트웨어(예를 들어, 암호화 방식, 복호화 방식 등)는 공개된 알고리즘(즉, 공개된 소프트웨어)을 이용하여 TEE를 이용하여 동작한다. 이와 같은 공개된 소프트웨어를 이용하기 때문에, 악의적인 코드가 포함되었는지를 검증할 수 있다. 또는 해당 공개된 소프트웨어는 검증된 회사 또는 기관을 통하여 업로드 또는 관리함으로써 해당 소프트웨어에 대한 안전성을 확보하는 것도 가능하다. Specifically, openable software (eg, encryption scheme, decryption scheme, etc.) operates using TEE using open algorithms (ie, open software). Since such open software is used, it is possible to verify whether malicious code is included. Alternatively, it is also possible to secure the safety of the software by uploading or managing the open software through a verified company or organization.

그리고 공개하지 못한 소프트웨어는 동형 암호화해서 처리를 수행한다. 상술한 바와 같이 동형 암호화 방식을 이용하는 경우 보완성이 높다는 점에서, 해당 암호문을 처리하는 소프트웨어가 악의적인 내용으로 동작하더라도 비밀 키 없이는 해당 데이터의 원문(또는 평문)의 접근이 불가능한바 안전성을 확복할 수 있다. In addition, software that has not been disclosed performs processing by homomorphic encryption. As described above, in that the homomorphic encryption method has high complementarity, even if the software processing the ciphertext operates with malicious content, it is impossible to access the original text (or plaintext) of the data without the secret key, so it is impossible to ensure safety. can

이와 같이 본 개시는 공개 코드와 동형 연산 방식을 함께 사용함으로써 내부 소프트웨어의 악의적인 데이터 접근을 방지하는 것이 가능하다. As such, the present disclosure can prevent malicious data access of internal software by using the public code and the isomorphic operation method together.

이하에서는 상술한 동형 연합 학습이 적용된 전자 장치의 구체적인 구성 및 동작을 도 2를 참조하여 후술한다. Hereinafter, a specific configuration and operation of an electronic device to which the above-described homomorphic association learning is applied will be described with reference to FIG. 2 .

도 2는 본 개시의 일 실시 예에 따른 전자 장치의 구성을 설명하기 위한 도면이다. 2 is a diagram for explaining a configuration of an electronic device according to an embodiment of the present disclosure.

도 2를 참조하면, 전자 장치(100)는 통신 장치(110), 메모리(120) 및 프로세서(130)를 포함할 수 있다. Referring to FIG. 2 , the electronic device 100 may include a communication device 110 , a memory 120 and a processor 130 .

통신 장치(110)는 전자 장치(100)를 외부 장치(미도시)와 연결하기 위해 형성되고, 근거리 통신망(LAN: Local Area Network) 및 인터넷망을 통해 외부 장치에 접속되는 형태뿐만 아니라, USB(Universal Serial Bus) 포트 또는 무선 통신(예를 들어, WiFi 802.11a/b/g/n, NFC, Bluetooth) 포트를 통하여 접속되는 형태도 가능하다. 이러한 통신 장치(110)는 송수신부(transceiver)로 지칭될 수도 있다. The communication device 110 is formed to connect the electronic device 100 with an external device (not shown), and is connected to the external device through a local area network (LAN) and an Internet network, as well as a USB ( A form connected through a Universal Serial Bus) port or a wireless communication (eg, WiFi 802.11a/b/g/n, NFC, Bluetooth) port is also possible. Such a communication device 110 may also be referred to as a transceiver.

통신 장치(110)는 외부 장치로부터 공개 소프트웨어를 수신할 수 있다. 이때 통신 장치(110)는 해당 공개 소프트웨어에 대응되는 서명 정보, 해시 정보를 함께 수행할 수 있다. 여기서 공개 소프트웨어는 데이터에 대한 다양한 연산을 수행할 수 있는 인스트럭션이 저장된 프로그램으로, 암호화 알고리즘, 복호화 알고리즘, 통계 알고리즘 등 데이터에 대한 다양한 연산 명령을 포함할 수 있다. The communication device 110 may receive open software from an external device. At this time, the communication device 110 may perform signature information and hash information corresponding to the open software together. Here, the open software is a program in which instructions for performing various calculations on data are stored, and may include various calculation commands for data such as encryption algorithms, decryption algorithms, and statistical algorithms.

그리고 서명 정보 및 해시 정보는 공개된 소프트웨어의 검증에 사용되는 정보이다. 구체적으로, 해시 정보는 공개된 소프트웨어의 소스 코드를 기반할 수 있으며, 누구나 공개된 소프트웨어를 이용하여 동일한 해시 정보를 얻을 수 있도록 공개될 수 있다. 그리고 서명 정보는 소프트웨어의 정보 검증을 위한 것으로, 후술하는 암호화 키 정보 또는 소프트웨어 식별 등에 이용될 수 있다. And the signature information and hash information are information used to verify open software. Specifically, the hash information may be based on the source code of open software, and may be disclosed so that anyone can obtain the same hash information using the open software. In addition, the signature information is for software information verification, and may be used for encryption key information or software identification, which will be described later.

통신 장치(110)는 다른 장치에서 생성된 ID 기반 비밀 키를 수신 또는 송신할 수 있다. 구체적으로, 통신 장치(110)는 키 생성 장치와 통신을 수행할 수 있으며, 통신 장치(110)는 키 생성 장치에 소프트웨어의 소스 키 기반 해시 정보를 전송하고, 전송된 해시 정보에 기초하여 ID 기반 비밀 키를 수신할 수 있다. The communication device 110 may receive or transmit an ID-based secret key generated by another device. Specifically, the communication device 110 may communicate with the key generating device, and the communication device 110 transmits hash information based on the source key of the software to the key generating device, and based on the transmitted hash information, the communication device 110 is ID-based. You can receive a secret key.

그리고 통신 장치(110)는 외부 장치로부터 메시지를 수신할 수 있으며, 생성한 암호문을 외부 장치로 송신할 수 있다. 이때, 통신 장치(110)는 생성한 암호문과 함께 해당 암호문의 복호화에 필요한 암호화 키 정보를 전송할 수 있다. Also, the communication device 110 may receive a message from an external device and transmit the generated encrypted text to the external device. At this time, the communication device 110 may transmit encryption key information necessary for decryption of the cipher text together with the generated cipher text.

메모리(120)는 전자 장치(100)를 구동하기 위한 O/S나 각종 소프트웨어, 데이터 등을 저장하기 위한 구성요소이다. 메모리(120)는 RAM이나 ROM, 플래시 메모리, HDD, 외장 메모리, 메모리 카드 등과 같은 다양한 형태로 구현될 수 있으며, 어느 하나로 한정되는 것은 아니다. The memory 120 is a component for storing O/S for driving the electronic device 100, various software, data, and the like. The memory 120 may be implemented in various forms such as RAM, ROM, flash memory, HDD, external memory, memory card, etc., but is not limited to any one.

메모리(120)는 암호화할 메시지(또는 평문)를 저장한다. 여기서 메시지는 사용자가 각종 인용한 각종 신용 정보, 개인 정보 등일 수 있으며, 전자 장치(100)에서 사용되는 위치 정보, 인터넷 사용 시간 정보 등 사용 이력 등과 관련된 정보일 수도 있다. The memory 120 stores the message to be encrypted (or plain text). Here, the message may be various types of credit information and personal information cited by the user, and may also be information related to use history, such as location information used in the electronic device 100 and Internet usage time information.

그리고 메모리(120)는 수신한 소프트웨어 등 각종 정보를 저장할 수 있으며, 전자 장치(100)가 후술하는 과정에서 필요한 중간 연산 결과(예를 들어, 양자 내성 비밀 키, ID 기반 비밀 키 등)을 저장할 수 있다. In addition, the memory 120 may store various types of information such as received software, and may store intermediate operation results (eg, a quantum resistant secret key, an ID-based secret key, etc.) necessary for the process of the electronic device 100 to be described later. there is.

그리고 메모리(120)는 후술한 과정에서 생성된 암호문을 저장할 수 있다. 그리고 메모리(120)는 외부 장치에서 전송한 암호문을 저장할 수도 있다. And the memory 120 may store the cipher text generated in the process described below. Also, the memory 120 may store encrypted text transmitted from an external device.

메모리(120)는 보호 영역을 포함할 수 있다. 구체적으로, TEE 기능에 대응되는 보호 영역을 포함할 수 있으며, 해당 보호 영역에 보완이 필요한 데이터를 저장할 수 있다. 보호 영역에 데이터가 저장되는 경우에는 별도의 사용자 명령이 없는 경우에도 TEE 기능에 따라 데이터가 암호화하여 저장될 수 있다. The memory 120 may include a protection area. Specifically, a protection area corresponding to the TEE function may be included, and data requiring supplementation may be stored in the corresponding protection area. When data is stored in the protection area, the data may be encrypted and stored according to the TEE function even without a separate user command.

프로세서(130)는 전자 장치(100) 내의 각 구성을 제어한다. 이러한 프로세서(130)는 CPU(central processing unit), ASIC(application-specific integrated circuit)과 같은 단일 장치로 구성될 수 있으며, CPU, GPU(Graphics Processing Unit), Trusted Execution Environment (TEE) 등의 복수의 장치로 구성될 수도 있다. The processor 130 controls each component within the electronic device 100 . The processor 130 may be configured as a single device such as a central processing unit (CPU) or an application-specific integrated circuit (ASIC), or a plurality of devices such as a CPU, a graphics processing unit (GPU), or a Trusted Execution Environment (TEE). It may also consist of a device.

프로세서(130)는 구동 방식을 결정한다. 구체적으로, 프로세서(130)는 사용자가 요청한 연산 명령이 공개 소프트웨어 기반인지 비공개 소프트웨어 기반인지를 판단할 수 있다. 판단 결과, 비공개 소프트웨어 기반이었으면, 프로세서(130)는 앞서 상술한 바와 같이 동형 암호 방식을 이용한 연산 처리를 수행할 수 있다. The processor 130 determines a driving method. Specifically, the processor 130 may determine whether the operation command requested by the user is based on open software or closed software. As a result of the determination, if it is based on non-public software, the processor 130 may perform calculation processing using the homomorphic encryption method as described above.

반대로, 공개 소프트웨어 기반이었으면, 프로세서(130) 해당 공개 소프트웨어가 설치되어 있는지, 설치되어 있는지를 판단할 수 있다. 만약, 설치되어 있는 경우, 프로세서(130)는 기설정된 공개 소프트웨어를 이용한 연산 동작을 수행할 수 있다. 만약, 설치되어 있지 않으면, 해당 공개 소프트웨어를 외부 장치로부터 수신하도록 통신 장치(110)를 제어할 수 있다. Conversely, if it is based on open software, the processor 130 may determine whether or not the corresponding open software is installed. If installed, the processor 130 may perform calculation operations using pre-set open software. If not installed, the communication device 110 may be controlled to receive the open software from an external device.

프로세서(130)는 외부 장치로부터 공개 소프트웨어, 공개 소프트웨어에 대응되는 서명 정보 및 공개 소프트웨어에 대응되는 해시 정보를 수신한다. 구체적으로, 상술한 공개 소프트웨어는 검증된 저장소(또는 외부 장치)에 저장되어 있을 수 있으며, 프로세서(130)는 상술한 저장소로부터 해당 소프트웨어를 수신하도록 통신 장치(110)를 제어할 수 있다. 이때, 프로세서(130)는 상술한 소프트웨어의 검증을 위한 서명 정보 및 해시 정보를 함께 수신할 수 있다. The processor 130 receives open software, signature information corresponding to the open software, and hash information corresponding to the open software from an external device. Specifically, the aforementioned open software may be stored in a verified storage (or an external device), and the processor 130 may control the communication device 110 to receive corresponding software from the aforementioned storage. At this time, the processor 130 may receive the above-described signature information and hash information for verifying the software together.

그리고 프로세서(130)는 공개 소프트웨어를 수신하면 공개 소프트웨어에 대한 무결성을 검사하고, 무결성이 확인되면 비밀 키를 생성할 수 있다. 구체적으로, 프로세서(130)는 공개 소프트웨어에 대한 무결성 검사를 수행하고, 무결성 검사에 문제가 없으면, 해당 소프트웨어를 메모리(120)에 저장할 수 있다. 그리고 프로세서(130)는 해당 소프트웨어에 적용될 비밀 키를 생성할 수 있다. When the open software is received, the processor 130 checks the integrity of the open software and generates a secret key when the integrity is confirmed. Specifically, the processor 130 may perform an integrity check on open software, and if there is no problem in the integrity check, the corresponding software may be stored in the memory 120 . Also, the processor 130 may generate a secret key to be applied to corresponding software.

구체적으로, 프로세서(130)는 제1 랜덤 키 및 제2 랜덤 키를 생성하고, 생성된 제1 랜덤 키 및 제2 랜덤 키를 XOR 연산하여 상기 소프트웨어 또는 TEE 기능에 대응되는 비밀 키를 생성할 수 있다. Specifically, the processor 130 may generate a first random key and a second random key, and perform an XOR operation on the generated first random key and the second random key to generate a secret key corresponding to the software or TEE function. there is.

이때, 프로세서(130)는 키 관리 장치로부터 ID 기반 비밀 키를 수신하도록 통신 장치(110)를 제어할 수 있다. 이와 같이 ID 기반 비밀 키를 수신하면, 제1 랜덤 키(또는 제2 랜덤 키)를 ID 기반 비밀 키로 암호화하고, 제2 랜덤 키를 수신한 서명 키로 암호화하여 개별적으로 저장하거나, 외부 장치에 해당 암호화된 제1 랜덤 키 및 암호화된 제2 랜덤 키를 전송할 수 있다. 또한, 프로세서(130)는 수신한 ID 기반 비밀 키를 TEE 기능을 이용하여 암호화하고, 암호화된 ID 기반 비밀 키를 메모리(120)의 보호 영역에 저장할 수 있다. In this case, the processor 130 may control the communication device 110 to receive the ID-based secret key from the key management device. When the ID-based secret key is received in this way, the first random key (or the second random key) is encrypted with the ID-based secret key, the second random key is encrypted with the received signing key, and individually stored, or the corresponding encryption is performed in an external device. The encrypted first random key and the encrypted second random key may be transmitted. In addition, the processor 130 may encrypt the received ID-based secret key using the TEE function and store the encrypted ID-based secret key in a protection area of the memory 120 .

이와 같은 비밀 키를 이용하여 프로세서(130)는 상술한 소프트웨어에 의한 연산 결과를 암호화하거나, 암호화된 연산 결과를 복호화하는 동작을 수행할 수 있다. Using such a secret key, the processor 130 may perform an operation of encrypting an operation result by the above-described software or decrypting an encrypted operation result.

프로세서(130)는 보호 영역에 저장된 공개 소프트웨어 및 데이터를 이용하여 공개 소프트웨어에 대응되는 연산을 수행한다. 이때 프로세서(130)는 상술한 데이터를 평문 상태에서 상술한 공개 소프트웨어에 대응되는 연산 동작을 수행할 수 있다. 이를 위하여 암호화된 데이터가 있는 경우, 상술한 비밀 키를 이용하여 복호화하고, 복호화된 상태에서 연산 작업을 수행할 수 있다. 그리고 프로세서(130)는 데이터의 저장이 필요한 경우에는 상술한 비밀 키를 이용하여 데이터를 암호화하고, 암호화된 데이터를 메모리(120)에 저장할 수 있다. The processor 130 performs an operation corresponding to the open software using the open software and data stored in the protection area. At this time, the processor 130 may perform an arithmetic operation corresponding to the above-described open software with the above-described data in a plain text state. To this end, if there is encrypted data, it can be decrypted using the above-described secret key, and an operation operation can be performed in the decrypted state. Also, when data storage is required, the processor 130 may encrypt the data using the aforementioned secret key and store the encrypted data in the memory 120 .

이때, 프로세서(130)는 암호화된 연산 결과와 공개 소프트웨어에 대한 정보를 메모리에 저장할 수 있다. 이에 따라 프로세서(130)는 암호화하여 저장된 데이터를 이용하는 과정에서, 공개 소프트웨어가 이용하는 데이터가 메모리에 암호문 형태로 저장되어 있으면, 암호문에 대응되는 공개 소프트웨어 정보와 연산을 수행할 소프트웨어를 비교하여 동일 소프트웨어이면 암호문을 비밀 키를 이용하여 복호화할 수 있다. In this case, the processor 130 may store encrypted operation results and information on open software in a memory. Accordingly, in the process of using encrypted and stored data, if the data used by the open software is stored in the form of cipher text in the memory, the processor 130 compares the open software information corresponding to the cipher text with the software to perform the operation, and if the data is the same software The ciphertext can be decrypted using the secret key.

프로세서(130)는 암호화된 연산 결과 및 비밀 키에 대응되는 암호화 키 정보를 전송하도록 통신 장치를 제어할 수 있다. 이때, 암호화 키 정보는, 비밀 키를 구성하는 제1 비밀 키를 개인 키로 암호화한 제1 데이터와 비밀 키를 구성하는 제2 비밀 키를 서명 정보를 이용하여 암호화한 제2 데이터를 포함할 수 있다. The processor 130 may control the communication device to transmit encryption key information corresponding to the encrypted operation result and the secret key. At this time, the encryption key information may include first data obtained by encrypting the first secret key constituting the secret key with the private key and second data obtained by encrypting the second secret key constituting the secret key using signature information. .

이와 같이 본 개시는 비밀 키를 두 가지 정보(즉, ID 기반 비밀 키와 인증서 정보)를 이용하여 암호화하는바, 즉, 연관성 없는 두 정보를 활용한 암호화 기법인바 양자 내성을 갖는다. As described above, the present disclosure encrypts a secret key using two pieces of information (ie, an ID-based secret key and certificate information), that is, it is an encryption technique using two pieces of unrelated information and thus has quantum tolerance.

한편, 프로세서(130)는 비공개 소프트웨어를 이용하여 연산 명령이 입력되면, 연산 명령을 동형 암호문에 대응되는 동형 연산을 이용하여 연산 명령을 수행할 수 있다. On the other hand, if a calculation command is input using non-public software, the processor 130 may perform the calculation command by using the isomorphic operation corresponding to the isomorphic ciphertext.

이상과 같이 본 개시에 따른 전자 장치(100)는 해킹뿐만 아니라 악의적인 소프트웨어가 사용자 데이터를 광고 또는 데이터 판매 목적과 같은 악의적인 누출이 발생하지 않도록 안전하게 보호하는 것이 가능하다. As described above, the electronic device 100 according to the present disclosure can safely protect user data from not only hacking but also malicious software from leaking user data for the purpose of advertising or selling data.

한편, 도 2를 도시하고 설명함에 있어서, 전자 장치(100)의 기본 구성만을 도시하고 설명하였지만, 구현시에 전자 장치(100)는 상술한 구성 이외에 다른 구성(예를 들어, 디스플레이, 조작 장치, 카메라, 스피커, 마이크 등)을 더 포함할 수 있다. 또한, 도시된 예에서는 프로세서(130)가 하나인 것으로 도시하였지만, 구현시에 프로세서(130)는 복수의 프로세서로 구성될 수도 있다. 또는 하나의 프로세서(130)로 구성되되, 내부에는 복수의 프로세서 코어가 포함되어 있을 수 있다. Meanwhile, in the illustration and description of FIG. 2, only the basic configuration of the electronic device 100 has been shown and described, but in implementation, the electronic device 100 has other configurations (eg, a display, a control device, camera, speaker, microphone, etc.) may be further included. In addition, in the illustrated example, although the processor 130 is shown as one, in implementation, the processor 130 may include a plurality of processors. Alternatively, it may be composed of one processor 130, and a plurality of processor cores may be included therein.

도 3은 본 개시의 프로세서의 구체적인 구성을 설명하기 위한 도면이다. 3 is a diagram for explaining a specific configuration of a processor of the present disclosure.

도 3을 참조하면, 프로세서(130)는 제1 프로세서 코어(131), 제2 프로세서 코어(132)를 포함한다. Referring to FIG. 3 , the processor 130 includes a first processor core 131 and a second processor core 132 .

제1 프로세서 코어(131)는 일반적인 CPU, GPU 등으로 구성될 수 있으며, 비공개 소프트웨어(50)를 이용한 연산 명령이 입력된 경우, 데이터(60)를 동형 암호화 방식을 이용하여 연산 처리를 수행하고, 그 연산 결과를 출력할 수 있다(80). The first processor core 131 may be composed of a general CPU, GPU, etc., and when an operation command using the non-public software 50 is input, the data 60 is subjected to operation processing using a homomorphic encryption method, The calculation result can be output (80).

제2 프로세서 코어(132)는 SGX(Software Guard eXtension) 기능을 수행하는 프로세서 코어이며, 공개 소프트웨어(70)를 이용한 연산 명령이 입력된 경우, 앞서 설명한 바와 같은 공개 소프트웨어 대응되는 연산 동작을 수행할 수 있다. 그리고 제2 프로세서 코어(132)는 해당 연산 결과를 비밀 키를 암호화하고, 암호화된 상태로 출력할 수 있다(80). 한편, 도시된 예에서는 SGX를 이용하는 것으로 도시하고 설명하였으나, 구현시에는 SGX 이외에 다른 TEE 기술이 이용될 수도 있다. The second processor core 132 is a processor core that performs a Software Guard eXtension (SGX) function, and when an operation command using the open software 70 is input, it can perform a calculation operation corresponding to the open software as described above. there is. The second processor core 132 may encrypt the corresponding operation result with the secret key and output the result in an encrypted state (80). Meanwhile, in the illustrated example, it has been illustrated and described as using SGX, but other TEE technologies other than SGX may be used in implementation.

제2 프로세서 코어(132)는 비밀 키(또는 마스터 키)를 생성할 수 있다. 이때, 제2 프로세서 코어(132)는 상술한 비밀 키를 앞서 설명한 하이브리드 암호화 방식으로 저장할 수 있다. 구체적으로, 비밀 키는 두 개의 랜덤 값의 XOR 연산으로 생성될 수 있으며, 두 랜덤 값 중 하나는 ID 기반 비밀 키로 암호화하여 저장되고, 다른 랜덤 값은 소프트웨어에 대응되는 서명 정보로 암호화하여 저장될 수 있다. 그리고 상술한 ID 기반 비밀 키는 SGX 기능을 사용하여 암호화하여 저장될 수 있다. 이와 같은 비밀 키를 이용하기 때문에, 동일한 소프트웨어를 이용하는 경우에만 복호화 기능이 제공될 수 있다. 즉, 다른 소프트웨어를 이용하여 복호화 요청은 비밀 키가 상이하기 때문에 동작되지 않는다. The second processor core 132 may generate a secret key (or master key). In this case, the second processor core 132 may store the above-described secret key using the hybrid encryption method described above. Specifically, the secret key may be generated by XOR operation of two random values, one of the two random values may be encrypted and stored with an ID-based secret key, and the other random value may be encrypted and stored with signature information corresponding to software. there is. Further, the above-described ID-based secret key may be encrypted and stored using the SGX function. Since such a secret key is used, a decryption function can be provided only when the same software is used. That is, a decryption request using other software is not operated because the secret key is different.

한편, 상술한 어플리케이션이 업데이트되면, 제2 프로세서 코어(132)는 상술한 비밀 키 생성 등의 동작을 다시 수신하고, 기존 비밀 키를 삭제하고, 업데이트된 어플리케이션에 대응되는 비밀 키를 생성하여 저장할 수 있다. Meanwhile, when the above-described application is updated, the second processor core 132 may receive the above-described secret key generation operation again, delete the existing secret key, and generate and store a secret key corresponding to the updated application. there is.

이와 같은 프로세서(130)의 출력은 공개 소프트웨어를 이용한 출력 결과 또는 동형 암호화에 따른 출력 결과인바, 이를 검증하는 전자 장치(90) 측에서는 연산 방식에 따른 방식으로 출력 결과를 이용하는 것이 가능하다. Since the output of the processor 130 is an output result using open software or an output result according to homomorphic encryption, it is possible to use the output result in a method according to an operation method on the side of the electronic device 90 that verifies it.

예를 들어, 동형 암호화 방식인 경우, 전자 장치(90)는 동형 연산에 대응되는 비밀 키를 이용하여 연산 결과를 복호화할 수 있다. 이러한 경우, 연산 결과를 얻을 수 있지만, 프로세서(130)와 전자 장치(90) 모두 평문 상태의 데이터를 처리한 것은 아닌바 평문에 대한 데이터 보호가 가능하다. For example, in the case of a homomorphic encryption method, the electronic device 90 may decrypt an operation result using a secret key corresponding to the homomorphic operation. In this case, an operation result may be obtained, but since neither the processor 130 nor the electronic device 90 processes data in a plain text state, data protection for plain text is possible.

만약, SGX(또는 TEE) 방식인 경우, 전자 장치(90)는 암호문과 해당 암호문에 대응되는 암호화 키 정보를 수신할 수 있다. 구체적으로, 전자 장치(90)는 암호화 키를 이용하여 비밀 키를 복원할 수 있다. 예를 들어, 전자 장치(90)는 키 관리 장치를 통하여 ID 기반 비밀 키를 수신할 수 있으며, 공개 소프트웨어 인증서 정보를 취득할 수 있다. 그리고 취득된 ID 기반 비밀 키와 인증서 정보를 이용하여 암호화 키 정보 내의 제1 비밀 키와 제2 비밀 키를 복원할 수 있으며, 복원된 제1 비밀 키와 제2 비밀 키를 XOR 연산하여 비밀 키를 확복할 수 있다. In the case of the SGX (or TEE) method, the electronic device 90 may receive cipher text and encryption key information corresponding to the cipher text. Specifically, the electronic device 90 may restore the secret key using the encryption key. For example, the electronic device 90 may receive an ID-based private key through a key management device and obtain public software certificate information. In addition, the first private key and the second private key in the encryption key information may be restored using the obtained ID-based private key and certificate information, and the restored first private key and the second private key may be XOR-operated to obtain the private key. can be assured

이와 같이 비밀 키를 확보하면, 전자 장치(90)는 해당 비밀 키로, 암호문을 복호할 수 있다. 이 과정에서, 전자 장치(90)는 평문 상태가 아닌 연산 결과만 알기 때문에, 평문을 확인하는 것이 불가능하다. 또한, SGX(132)는 공개 소프트웨어에 대응되는 인스트럭셕만을 수행하여 동작하기 때문에, 불필요한 동작을 수행할 수 없다. 또한, 앞서 설명한 바와 같이, 설치되는 소프트웨어는 무결성 검사 및 소프트웨어 서명 키를 이용하고, 암호화 키 정보 중 일부는 소프트웨어 서명 키가 이용되어, 데이터에 불필요한 개입을 수행하는 것이 불가능하다. If the secret key is secured in this way, the electronic device 90 can decrypt the cipher text with the corresponding secret key. In this process, since the electronic device 90 only knows the result of the operation, not the plain text state, it is impossible to check the plain text. In addition, since the SGX 132 operates only by executing instructions corresponding to open software, unnecessary operations cannot be performed. In addition, as described above, installed software uses an integrity check and a software signature key, and some of the encryption key information uses the software signature key, making it impossible to perform unnecessary intervention on data.

도 4는 본 개시의 공개 코드를 이용한 실시 예를 설명하기 위한 시퀀스도이다. 4 is a sequence diagram for explaining an embodiment using an open code of the present disclosure.

도 4를 참조하면, 외부 장치(100)는 공개 소프트웨어 및 해당 공개 소프트웨어에 대응되는 각종 정보(예를 들어, 서명 정보, 해시 정보)를 저장한다. 이러한 외부 장치(100)는 검증된 회사 또는 기간의 서버 또는 전자 장치일 수 있으며, 누구나 해당 소프트웨어에 대한 소스 코드를 확인할 수 있도록 공개되어 있을 수 있다. 또한, 상술한 서명 정보 및 해시 정보도 상술한 소프트웨어를 이용하여 어떠한 방식으로 작성 및 생성되었는지에 대한 정보도 공개되어 있을 수 있다. Referring to FIG. 4 , the external device 100 stores open software and various types of information (eg, signature information, hash information) corresponding to the open software. The external device 100 may be a server or electronic device of a verified company or company, and may be open so that anyone can check the source code for the corresponding software. In addition, information on how the above-described signature information and hash information were written and generated using the above-described software may also be disclosed.

전자 장치(100)는 외부 장치로부터 공개 소프트웨어, 공개 소프트웨어에 대응되는 서명 정보 및 공개 소프트웨어에 대응되는 해시 정보를 수신한다(S410).The electronic device 100 receives open software, signature information corresponding to the open software, and hash information corresponding to the open software from the external device (S410).

그리고 전자 장치(100)는 수신한 공개 소프트웨어에 대한 무결성을 검사하고, 무결성이 확인되면, 수신한 공개 소프트웨어를 TEE 기능에 대응되는 보호 영역에 저장한다(S420). 한편, 구현시에는 보호 영역 이외에 일반 영역에 저장될 수도 있다. Then, the electronic device 100 checks the integrity of the received open software, and if the integrity is confirmed, stores the received open software in a protection area corresponding to the TEE function (S420). Meanwhile, in implementation, it may be stored in a general area other than a protection area.

그리고 전자 장치(100)는 공개 소프트웨어에 대응되는 비밀 키를 생성한다(S430). 이때, 전자 장치(100)는 비밀 키에 대응되는 암호화 키 정보 생성 등을 위하여, 외부 키 관리 장치로부터 ID 기반 비밀 키를 요청하여 수신할 수 있다. 이러한 ID 기반 비밀 키에서, 상술한 ID는 해당 공개 소프트웨어에 대응되는 해시 값이 이용되거나, 소프트웨어의 시리얼 정보, 코드 ID 등 유니크한 값들이 이용될 수 있다. Then, the electronic device 100 generates a secret key corresponding to the open software (S430). In this case, the electronic device 100 may request and receive an ID-based secret key from an external key management device in order to generate encryption key information corresponding to the secret key. In such an ID-based secret key, a hash value corresponding to the corresponding open software or a unique value such as serial information or code ID of the software may be used as the above-described ID.

보호 영역에 저장된 공개 소프트웨어 및 데이터를 이용하여 공개 소프트웨어에 대응되는 연산을 수행한다(S440). 이와 같이 공개 소프트웨어를 이용한 동작이 수행되며, 공개 소프트웨어는 앞서 설명한 바와 같이 소스가 오픈되어 있기 때문에 불필요한 악의적인 코드가 포함되어 있기 어렵다. 따라서, TEE(또는 SGX) 기능을 탑재한 CPU의 제조사나 임의로 악의적인 코드를 수행하도록 하기 어렵다. An operation corresponding to the open software is performed using the open software and data stored in the protection area (S440). In this way, the operation using the open software is performed, and since the source of the open software is open as described above, it is difficult to include unnecessary malicious codes. Therefore, it is difficult for the manufacturer of the CPU equipped with the TEE (or SGX) function to arbitrarily execute malicious code.

한편, 도시된 예에서는 하나의 공개 소프트웨어만을 수신하여 동작하는 것으로 도시하였지만, 구현시에 전자 장치(100)는 복수의 공개 소프트웨어를 이용하는 것도 가능하며, 각 공개 소프트웨어별로 개별적인 비밀 키를 이용하는 것이 가능하다. On the other hand, in the illustrated example, it is shown that only one open software is received and operated, but in implementation, the electronic device 100 may use a plurality of open software, and it is possible to use a separate secret key for each open software. .

그리고 연산 결과를 외부 장치(300)에 전송할 수 있다(S450). 한편, 도시된 예에서는 S/W를 전송한 장치와 연산 결과를 수신받는 장치가 동일한 것으로 도시하였으나, 구현시에 소프트웨어를 제공하는 장치와 연산 결과를 제공받는 장치는 다른 장치일 수 있다. Then, the calculation result may be transmitted to the external device 300 (S450). Meanwhile, in the illustrated example, a device that transmits S/W and a device that receives calculation results are shown to be the same, but in implementation, a device that provides software and a device that receives calculation results may be different devices.

도 5는 본 개시의 일 실시 예에 따른 암호화 방법을 설명하기 위한 흐름도이다. 5 is a flowchart illustrating an encryption method according to an embodiment of the present disclosure.

도 5를 참조하면, 먼저 외부 장치로부터 공개 소프트웨어, 공개 소프트웨어에 대응되는 서명 정보 및 공개 소프트웨어에 대응되는 해시 정보를 수신한다(S410). 상술한 외부 장치는 검증된 외부 기관 또는 업체의 서버 등일 수 있다. Referring to FIG. 5 , open software, signature information corresponding to the open software, and hash information corresponding to the open software are first received from an external device (S410). The aforementioned external device may be a server of a verified external organization or company.

수신한 공개 소프트웨어를 TEE(또는 SGX) 기능에 대응되는 보호 영역에 저장한다(S420). 구현시에는 수신한 공개 소프트웨어에 대한 무결성 검사를 수행하고, 무결성이 확인된 공개 소프트웨어만 보호 영역에 저장할 수 있다. The received open software is stored in a protection area corresponding to the TEE (or SGX) function (S420). Upon implementation, an integrity check is performed on received open software, and only open software whose integrity has been confirmed can be stored in the protection area.

공개 소프트웨어에 대응되는 비밀 키를 생성한다(S430). 구체적으로, 제1 랜덤 값 및 제2 랜덤 값을 생성하고, 생성된 두 랜덤 값을 XOR 연산하여 비밀 키를 생성할 수 있다. 이때, 하나의 제1 랜덤 값은 ID 기반 비밀 키로 암호화되고, 제2 랜덤 값을 서명 정보로 암호화되어 연산 결과를 이용하는 외부 장치에 제공될 수 있다. 이와 같이 비밀 키를 하이브리드 방식으로 암호화하는바, 양자 내성을 가질 수 있다. A secret key corresponding to the open software is generated (S430). Specifically, a first random value and a second random value may be generated, and a secret key may be generated by performing an XOR operation on the two generated random values. In this case, one first random value may be encrypted with an ID-based secret key, and a second random value may be encrypted with signature information and provided to an external device using an operation result. In this way, since the secret key is encrypted in a hybrid method, quantum tolerance can be obtained.

보호 영역에 저장된 공개 소프트웨어 및 데이터를 이용하여 공개 소프트웨어에 대응되는 연산을 수행한다(S440). 만약, 데이터가 암호화되어 있는 경우, 즉, 이전에 해당 공개 소프트웨어로 암호화한 것이라면, 비밀 키를 이용하여 복호화를 수행하고, 복호화된 데이터를 이용하여 공개 소프트웨어에 대응되는 연산을 수행할 수 있다. 이와 같이 평문 상태에서 연산을 수행하는바 보다 빠르게 연산 동작을 수행할 수 있다. 또한, 데이터의 저장 과정에서는 상술한 비밀 키를 이용하여 암호화하여 저장되는바, 저장된 데이터에 대한 보안성도 확보할 수 있다. An operation corresponding to the open software is performed using the open software and data stored in the protection area (S440). If the data is encrypted, that is, if it has been previously encrypted with corresponding open software, decryption may be performed using the secret key, and operations corresponding to the open software may be performed using the decrypted data. In this way, it is possible to perform a calculation operation faster than performing an operation in a plain text state. In addition, in the process of storing data, since it is encrypted and stored using the above-described secret key, security of the stored data can be secured.

그리고 연산 결과를 외부 장치(300)에 전송할 수 있다(S450). 이때 연산 결과는 공개 소프트웨어에 대응되는 연산 결과를 비밀 키를 이용하여 암호화하고, 암호화된 연산 결과가 전송될 수 있다. 그리고 연산 결과와 함께 비밀 키에 대응되는 암호화 키 정보를 전송할 수 있다. Then, the calculation result may be transmitted to the external device 300 (S450). At this time, the calculation result corresponding to the open software may be encrypted using a secret key, and the encrypted calculation result may be transmitted. In addition, encryption key information corresponding to the secret key may be transmitted together with the operation result.

여기서, 암호화 키 정보는, 비밀 키를 구성하는 제1 비밀 키를 개인 키로 암호화한 제1 데이터와 비밀 키를 구성하는 제2 비밀 키를 서명 정보를 이용하여 암호화한 제2 데이터를 포함할 수 있다. Here, the encryption key information may include first data obtained by encrypting a first secret key constituting the secret key with a private key and second data obtained by encrypting a second secret key constituting the secret key using signature information. .

한편, 도시된 예에서는 S/W를 전송한 장치와 연산 결과를 수신받는 장치가 동일한 것으로 도시하였으나, 구현시에 소프트웨어를 제공하는 장치와 연산 결과를 제공받는 장치는 다른 장치일 수 있다. Meanwhile, in the illustrated example, a device that transmits S/W and a device that receives calculation results are shown to be the same, but in implementation, a device that provides software and a device that receives calculation results may be different devices.

도 6은 본 개시의 일 실시 예에 따른 암호화 방법을 설명하기 위한 흐름도이다. 6 is a flowchart for explaining an encryption method according to an embodiment of the present disclosure.

먼저, 연산을 수행하기 위한 소프트웨어를 확인받을 수 있다(S510). 만약, 연산을 수행하기 위한 소프트웨어가 공개 소프트웨어인 경우, 앞서 도 5에서 설명한 바와 같은 동작을 수행할 수 있다. First, software for performing calculations may be checked (S510). If the software for performing the calculation is open software, the operation described above with reference to FIG. 5 may be performed.

만약, 비공개 소프트웨어를 위한 연산이 요청되면, 이하와 같은 동작을 수행할 수 있다. If an operation for non-public software is requested, the following operation may be performed.

구체적으로, 연산 명령을 동형 암호문에 대응되는 동형 연산을 이용하여 연산 명령을 수행할 수 있다. Specifically, the arithmetic command may be performed by using the isomorphic arithmetic corresponding to the homomorphic ciphertext.

그리고 연산 결과를 송신할 수 있다(S630).And the calculation result can be transmitted (S630).

한편, 상술한 본 개시의 다양한 실시 예 중 적어도 일부에 따른 방법들은, 기존 전자 장치에 설치 가능한 애플리케이션 형태로 구현될 수 있다. Meanwhile, methods according to at least some of the various embodiments of the present disclosure described above may be implemented in the form of an application that can be installed in an existing electronic device.

또한, 상술한 본 개시의 다양한 실시 예 중 적어도 일부에 따른 방법들은, 기존 전자 장치에 대한 소프트웨어 업그레이드, 또는 하드웨어 업그레이드만으로도 구현될 수 있다. In addition, the methods according to at least some of the various embodiments of the present disclosure described above may be implemented with only a software upgrade or hardware upgrade of an existing electronic device.

또한, 상술한 본 개시의 다양한 실시 예 중 적어도 일부에 따른 방법들은, 전자 장치에 구비된 임베디드 서버, 또는 전자 장치 중 적어도 하나의 외부 서버를 통해 수행되는 것도 가능하다.Also, methods according to at least some of the various embodiments of the present disclosure described above may be performed through an embedded server included in the electronic device or an external server of at least one of the electronic devices.

한편, 본 개시의 일 실시 예에 따르면, 이상에서 설명된 다양한 실시 예들은 기기(machine)(예: 컴퓨터)로 읽을 수 있는 저장 매체(machine-readable storage media에 저장된 명령어를 포함하는 소프트웨어로 구현될 수 있다. 기기는, 저장 매체로부터 저장된 명령어를 호출하고, 호출된 명령어에 따라 동작할 수 있는 장치로서, 개시된 실시 예들에 따른 전자 장치(예: 전자 장치(A))를 포함할 수 있다. 명령이 프로세서에 의해 실행될 경우, 프로세서가 직접, 또는 프로세서의 제어 하에 다른 구성요소들을 이용하여 명령에 해당하는 기능을 수행할 수 있다. 명령은 컴파일러 또는 인터프리터에 의해 생성 또는 실행되는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, '비일시적 저장매체'는 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다. 예로, '비일시적 저장매체'는 데이터가 임시적으로 저장되는 버퍼를 포함할 수 있다. 일 실시 예에 따르면, 본 문서에 개시된 다양한 실시 예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로 배포되거나, 또는 애플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들(예: 스마트폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품(예: 다운로더블 앱(downloadable app))의 적어도 일부는 제조사의 서버, 애플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.Meanwhile, according to an embodiment of the present disclosure, various embodiments described above may be implemented as software including instructions stored in a machine-readable storage medium (eg, a computer). A device is a device capable of calling a stored command from a storage medium and operating according to the called command, and may include an electronic device (eg, the electronic device A) according to the disclosed embodiments. When executed by this processor, the processor may directly or use other components under the control of the processor to perform a function corresponding to the instruction, and the instruction may include code generated or executed by a compiler or an interpreter. A device-readable storage medium may be provided in the form of a non-transitory storage medium, where a 'non-transitory storage medium' is a tangible device, and a signal (e.g. : electromagnetic waves), and this term does not distinguish between cases in which data is stored semi-permanently and temporarily stored in storage media. For example, 'non-temporary storage media' means that data is temporarily stored. According to an embodiment, the method according to various embodiments disclosed in this document may be provided by being included in a computer program product, which is a product that is a seller and a buyer. The computer program product is distributed in the form of a machine-readable storage medium (eg compact disc read only memory (CD-ROM)), or through an application store (eg Play Store™) or may be distributed (eg downloaded or uploaded) online, directly between two user devices (eg smartphones) In the case of online distribution, a computer program product (eg downloadable app) At least a part of may be temporarily stored or temporarily generated in a storage medium readable by a device such as a manufacturer's server, an application store server, or a relay server memory.

본 개시의 다양한 실시 예들은 기기(machine)(예: 컴퓨터)로 읽을 수 있는 저장 매체(machine-readable storage media에 저장된 명령어를 포함하는 소프트웨어로 구현될 수 있다. 기기는 저장 매체로부터 저장된 명령어를 호출하고, 호출된 명령어에 따라 동작이 가능한 장치로서, 개시된 실시 예들에 따른 전자 장치(예: 전자 장치(100))를 포함할 수 있다. Various embodiments of the present disclosure may be implemented as software including commands stored in a storage medium readable by a machine (eg, a computer). The device calls the stored commands from the storage medium. And, as a device capable of operating according to the called command, it may include an electronic device (eg, the electronic device 100) according to the disclosed embodiments.

상술한 명령이 프로세서에 의해 실행될 경우, 프로세서가 직접 또는 상술한 프로세서의 제어하에 다른 구성요소들을 이용하여 상술한 명령에 해당하는 기능을 수행할 수 있다. 명령은 컴파일러 또는 인터프리터에 의해 생성 또는 실행되는 코드를 포함할 수 있다. When the above-described command is executed by a processor, the processor may perform a function corresponding to the above-described command by using other components directly or under the control of the above-described processor. An instruction may include code generated or executed by a compiler or interpreter.

이상에서는 본 개시의 바람직한 실시 예에 대하여 도시하고 설명하였지만, 본 개시는 상술한 특정의 실시 예에 한정되지 아니하며, 청구범위에서 청구하는 본 개시의 요지를 벗어남이 없이 당해 개시가 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 개시의 기술적 사상이나 전망으로부터 개별적으로 이해되어서는 안 될 것이다.Although the preferred embodiments of the present disclosure have been shown and described above, the present disclosure is not limited to the specific embodiments described above, and is common in the art to which the disclosure belongs without departing from the gist of the present disclosure claimed in the claims. Of course, various modifications are possible by those with knowledge of, and these modifications should not be individually understood from the technical spirit or perspective of the present disclosure.

100 : 전자 장치 110 : 통신 장치
120 : 메모리 130 : 프로세서
100: electronic device 110: communication device
120: memory 130: processor

Claims (18)

전자 장치에 있어서,
외부 장치와 통신을 수행하는 통신 장치;
데이터를 저장하는 메모리; 및
TEE(Trusted Execution Environment) 기능을 지원하는 프로세서;를 포함하고,
상기 프로세서는,
상기 외부 장치로부터 공개 소프트웨어, 상기 공개 소프트웨어에 대응되는 서명 정보 및 상기 공개 소프트웨어에 대응되는 해시 정보를 수신하면, 상기 수신한 공개 소프트웨어를 상기 TEE 기능에 대응되는 보호 영역에 저장하고, 상기 공개 소프트웨어에 대응되는 비밀 키를 생성하고, 상기 보호 영역에 저장된 공개 소프트웨어 및 상기 데이터를 이용하여 상기 공개 소프트웨어에 대응되는 연산을 수행하는 전자 장치.
In electronic devices,
a communication device that communicates with an external device;
memory to store data; and
A processor supporting a Trusted Execution Environment (TEE) function;
the processor,
When open software, signature information corresponding to the open software, and hash information corresponding to the open software are received from the external device, the received open software is stored in a protection area corresponding to the TEE function, and the open software An electronic device that generates a corresponding secret key and performs an operation corresponding to the open software using the open software and the data stored in the protection area.
제1항에 있어서,
상기 프로세서는,
상기 비밀 키를 제1 비밀 키 및 제2 비밀 키로 나누고, 상기 제1 비밀 키를 상기 개인키로 암호화하여 저장하고, 상기 제2 비밀 키를 상기 서명 정보를 이용하여 암호화하여 저장하는 전자 장치.
According to claim 1,
the processor,
An electronic device that divides the private key into a first private key and a second private key, encrypts and stores the first private key with the private key, and encrypts and stores the second private key using the signature information.
제2항에 있어서,
상기 비밀 키는 상기 제1 비밀 키 및 상기 제2 비밀 키를 XOR 연산하여 산출되는 전자 장치.
According to claim 2,
The secret key is calculated by performing an XOR operation on the first secret key and the second secret key.
제1항에 있어서,
상기 프로세서는,
상기 수신한 개인 키를 상기 TEE 기능을 이용하여 암호화하고, 암호화된 개인 키를 상기 보호 영역에 저장하는 전자 장치.
According to claim 1,
the processor,
An electronic device that encrypts the received private key using the TEE function and stores the encrypted private key in the protection area.
제1항에 있어서,
상기 프로세서는,
상기 공개 소프트웨어에 대응되는 연산 결과를 상기 비밀 키를 이용하여 암호화하는 전자 장치.
According to claim 1,
the processor,
An electronic device that encrypts an operation result corresponding to the open software using the secret key.
제5항에 있어서,
상기 프로세서는,
상기 암호화된 연산 결과 및 상기 비밀 키에 대응되는 암호화 키 정보를 전송하도록 상기 통신 장치를 제어하는 전자 장치.
According to claim 5,
the processor,
An electronic device that controls the communication device to transmit encryption key information corresponding to the encrypted operation result and the secret key.
제6항에 있어서,
상기 암호화 키 정보는,
상기 비밀 키를 구성하는 제1 비밀 키를 상기 개인 키로 암호화한 제1 데이터와 상기 비밀 키를 구성하는 제2 비밀 키를 상기 서명 정보를 이용하여 암호화한 제2 데이터를 포함하는 전자 장치.
According to claim 6,
The encryption key information,
An electronic device comprising first data obtained by encrypting a first secret key constituting the secret key with the private key, and second data obtained by encrypting a second secret key constituting the secret key using the signature information.
제5항에 있어서,
상기 프로세서는,
상기 암호화된 연산 결과와 상기 공개 소프트웨어에 대한 정보를 상기 메모리에 저장하는 전자 장치.
According to claim 5,
the processor,
An electronic device that stores the encrypted operation result and information on the open software in the memory.
제8항에 있어서,
상기 프로세서는,
상기 공개 소프트웨어가 이용하는 데이터가 상기 메모리에 암호문 형태로 저장되어 있으면, 상기 암호문에 대응되는 공개 소프트웨어 정보와 연산을 수행할 소프트웨어를 비교하여 동일 소프트웨어이면 상기 암호문을 상기 비밀 키를 이용하여 복호화하는 전자 장치.
According to claim 8,
the processor,
If data used by the open software is stored in the form of cipher text in the memory, an electronic device that compares open software information corresponding to the cipher text with software to perform an operation, and decrypts the cipher text using the secret key if it is the same software. .
제1항에 있어서,
상기 프로세서는,
상기 공개 소프트웨어를 수신하면 상기 공개 소프트웨어에 대한 무결성을 검사하고, 무결성이 확인되면 상기 비밀 키를 생성하는 전자 장치.
According to claim 1,
the processor,
An electronic device that checks integrity of the open software upon receiving the open software, and generates the private key when the integrity is confirmed.
제1항에 있어서,
상기 프로세서는,
비공개 소프트웨어를 이용하여 연산 명령이 입력되면, 상기 연산 명령을 동형 암호문에 대응되는 동형 연산을 이용하여 상기 연산 명령을 수행하는 전자 장치.
According to claim 1,
the processor,
An electronic device that, when an operation command is input using non-public software, performs the operation command by using an isomorphic operation corresponding to an isomorphic ciphertext.
TEE(Trusted Execution Environment) 기능을 지원하는 프로세서를 포함하는 전자 장치의 암호화 방법에 있어서,
상기 외부 장치로부터 공개 소프트웨어, 상기 공개 소프트웨어에 대응되는 서명 정보 및 상기 공개 소프트웨어에 대응되는 해시 정보를 수신하는 단계;
상기 수신한 공개 소프트웨어를 상기 TEE 기능에 대응되는 보호 영역에 저장하는 단계;
상기 공개 소프트웨어에 대응되는 비밀 키를 생성하는 단계; 및
상기 보호 영역에 저장된 공개 소프트웨어 및 상기 데이터를 이용하여 상기 공개 소프트웨어에 대응되는 연산을 수행하는 단계;를 포함하는 암호화 방법.
In the encryption method of an electronic device including a processor supporting a TEE (Trusted Execution Environment) function,
receiving open software, signature information corresponding to the open software, and hash information corresponding to the open software from the external device;
storing the received open software in a protection area corresponding to the TEE function;
generating a secret key corresponding to the open software; and
and performing an operation corresponding to the open software using the open software stored in the protection area and the data.
제12항에 있어서,
상기 공개 소프트웨어에 대응되는 연산 결과를 상기 비밀 키를 이용하여 암호화하는 단계;를 더 포함하는 암호화 방법.
According to claim 12,
The encryption method further comprising encrypting an operation result corresponding to the open software using the secret key.
제13항에 있어서,
상기 암호화된 연산 결과 및 상기 비밀 키에 대응되는 암호화 키 정보를 전송하는 단계;를 더 포함하는 암호화 방법.
According to claim 13,
The encryption method further comprising transmitting encryption key information corresponding to the encrypted operation result and the secret key.
제14항에 있어서,
상기 암호화 키 정보는,
상기 비밀 키를 구성하는 제1 비밀 키를 상기 개인 키로 암호화한 제1 데이터와 상기 비밀 키를 구성하는 제2 비밀 키를 상기 서명 정보를 이용하여 암호화한 제2 데이터를 포함하는 암호화 방법.
According to claim 14,
The encryption key information,
and first data obtained by encrypting a first secret key constituting the secret key with the private key, and second data obtained by encrypting a second secret key constituting the secret key using the signature information.
제13항에 있어서,
상기 암호화된 연산 결과와 상기 공개 소프트웨어에 대한 정보를 메모리에 저장하는 단계;를 더 포함하는 암호화 방법.
According to claim 13,
and storing the encrypted operation result and the information on the open software in a memory.
제16항에 있어서,
상기 공개 소프트웨어가 이용하는 데이터가 상기 메모리에 암호문 형태로 저장되어 있으면, 상기 암호문에 대응되는 공개 소프트웨어 정보와 연산을 수행할 소프트웨어를 비교하여 동일 소프트웨어이면 상기 암호문을 상기 비밀 키를 이용하여 복호화하는 단계;를 더 포함하는 암호화 방법.
According to claim 16,
If data used by the open software is stored in the form of ciphertext in the memory, comparing open software information corresponding to the ciphertext with software to perform an operation, and decrypting the ciphertext using the private key if the software is the same; Encryption method further comprising a.
제12항에 있어서,
상기 공개 소프트웨어를 수신하면 상기 공개 소프트웨어에 대한 무결성을 검사하는 단계;를 더 포함하는 암호화 방법.
According to claim 12,
The encryption method further comprising checking integrity of the open software when the open software is received.
KR1020220165867A 2021-12-17 2022-12-01 Electronic apparatus and method for encryption thereof KR20230092747A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/KR2022/020685 WO2023113573A1 (en) 2021-12-17 2022-12-19 Electronic device and encryption method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020210182226 2021-12-17
KR20210182226 2021-12-17

Publications (1)

Publication Number Publication Date
KR20230092747A true KR20230092747A (en) 2023-06-26

Family

ID=86947665

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220165867A KR20230092747A (en) 2021-12-17 2022-12-01 Electronic apparatus and method for encryption thereof

Country Status (1)

Country Link
KR (1) KR20230092747A (en)

Similar Documents

Publication Publication Date Title
CN100487715C (en) Date safety storing system, device and method
CN102271037B (en) Based on the key protectors of online key
EP2795829B1 (en) Cryptographic system and methodology for securing software cryptography
CN108566381A (en) A kind of security upgrading method, device, server, equipment and medium
US7457960B2 (en) Programmable processor supporting secure mode
KR102218572B1 (en) Processing method for preventing replication attacks, and server and client
CN107453880B (en) Cloud data secure storage method and system
US11436305B2 (en) Method and system for signing an artificial intelligence watermark using implicit data
US8245307B1 (en) Providing secure access to a secret
CN108718233B (en) Encryption method, computer equipment and storage medium
CN107005407A (en) Use the TPM of server remote password service
CN110401538A (en) Data ciphering method, system and terminal
CN111130799B (en) Method and system for HTTPS protocol transmission based on TEE
CN107196907A (en) A kind of guard method of Android SO files and device
CN105468940A (en) Software protection method and apparatus
CN109005184A (en) File encrypting method and device, storage medium, terminal
US20070242822A1 (en) System, device, method, and program for communication
CN113630412A (en) Resource downloading method, resource downloading device, electronic equipment and storage medium
US11775692B2 (en) Method and system for encrypting data using a kernel
KR20140089703A (en) Method and apparatus for security of mobile data
CN110740036A (en) Anti-attack data confidentiality method based on cloud computing
KR20230092747A (en) Electronic apparatus and method for encryption thereof
JP6203556B2 (en) Information processing system
WO2023113573A1 (en) Electronic device and encryption method
CN104392153A (en) Software protection method and system