KR20220079751A - Smart Contract System Using External Storage Based on Blockchain And Method Therefor - Google Patents

Smart Contract System Using External Storage Based on Blockchain And Method Therefor Download PDF

Info

Publication number
KR20220079751A
KR20220079751A KR1020200168660A KR20200168660A KR20220079751A KR 20220079751 A KR20220079751 A KR 20220079751A KR 1020200168660 A KR1020200168660 A KR 1020200168660A KR 20200168660 A KR20200168660 A KR 20200168660A KR 20220079751 A KR20220079751 A KR 20220079751A
Authority
KR
South Korea
Prior art keywords
value
data
encryption
smart contract
transaction
Prior art date
Application number
KR1020200168660A
Other languages
Korean (ko)
Other versions
KR102484453B1 (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 KR1020200168660A priority Critical patent/KR102484453B1/en
Publication of KR20220079751A publication Critical patent/KR20220079751A/en
Application granted granted Critical
Publication of KR102484453B1 publication Critical patent/KR102484453B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/02Reservations, e.g. for tickets, services or events
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Tourism & Hospitality (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Power Engineering (AREA)
  • Development Economics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

본 개시의 일 측면에 의하면, 스마트 계약(smart contract)의 거래대상(transaction object)을 구매자에게 제공하기 위하여, 블록체인 네트워크와 연동된 외부 스토리지(external storage)에 오프체인 데이터(off-chain data)를 단계별로 암호화하여 분산 저장하고, 암호화된 데이터를 온체인 데이터(on-chain data)를 이용하여 단계별로 복호화하여 구매자에게 거래대상을 제공하는 스마트 계약방법 및 시스템을 제공한다.According to one aspect of the present disclosure, in order to provide a transaction object of a smart contract to a purchaser, off-chain data is stored in an external storage linked with a block chain network. We provide a smart contract method and system that provides a transaction target to a buyer by encrypting and storing the encrypted data step by step and decrypting the encrypted data step by step using on-chain data.

Description

외부 스토리지를 이용한 블록체인 기반의 스마트 계약 시스템 및 방법 {Smart Contract System Using External Storage Based on Blockchain And Method Therefor}Smart Contract System Using External Storage Based on Blockchain And Method Therefor

본 발명은 외부 스토리지를 이용한 스마트 계약 시스템 및 방법에 관한 것이다.The present invention relates to a smart contract system and method using external storage.

이 부분에 기술된 내용은 단순히 본 실시예에 대한 배경 정보를 제공할 뿐 종래기술을 구성하는 것은 아니다.The content described in this section merely provides background information for the present embodiment and does not constitute the prior art.

종래 중앙 집중식 네트워크 환경(centralized network environment)에서는 자원(resource)의 거래(transaction)에 신뢰할 수 있는 제3자의 개입이 필요하였다. 그러나 중앙 집중식 네트워크 환경에서는 거래에 시간과 비용이 소요된다는 점, 제3자의 신뢰성을 담보할 수 없는 점, 자원 거래의 당사자가 주도하는 거래가 될 수 없다는 점 등의 문제가 있었다.In a conventional centralized network environment, the intervention of a trusted third party is required in a transaction of a resource. However, in a centralized network environment, there are problems such as that the transaction takes time and money, the reliability of a third party cannot be guaranteed, and the transaction cannot be led by the parties to the resource transaction.

이에 탈중앙화 시스템인 블록체인(blockchain) 기술이 도입되었으나, 현재의 블록체인 기술로는 네트워크 상에 거래 자원, 즉 거래대상(transaction object) 또는 거래대가(consideration) 중 어느 하나를 가진 일방이 거래대상 또는 거래대가를 블록체인 네트워크에 선등록하는 경우, 선등록하는 당사자가 거래상 손해를 입을 가능성이 있다. 여기서 선등록이란, 거래대상 또는 거래대가 중 어느 하나를 다른 하나에 우선하여 스마트 계약에 등록시키는 것을 의미한다. 예컨대, 거래 당사자가 거래 성립 여부를 알 수 없는 상황에서 블록체인 네트워크에 거래대상을 선등록하는 경우, 거래대상에 관한 데이터의 기밀성(confidentiality)이 훼손될 수 있다. 뿐만 아니라, 블록체인 네트워크에 대용량 데이터를 등록하는 경우 네트워크의 속도가 저하되고, 네트워크의 모든 노드가 대용량 데이터를 원장(ledger)에 등록해야 하는 비효율성이 있다. Accordingly, blockchain technology, a decentralized system, was introduced. However, with the current block chain technology, one party who has either a transaction resource on the network, that is, a transaction object or a transaction consideration, is a transaction target. Alternatively, if the transaction consideration is pre-registered in the blockchain network, there is a possibility that the party who pre-registers may suffer loss in the transaction. Here, the pre-registration means that either one of the transaction object or the transaction price is registered in the smart contract with priority over the other. For example, if a transaction target is pre-registered in the block chain network in a situation where the transaction party cannot know whether a transaction is established, the confidentiality of data about the transaction target may be damaged. In addition, when large data is registered in the blockchain network, the speed of the network is lowered, and there is inefficiency in that all nodes in the network must register large data in the ledger.

이러한 성능 저하 및 비효율성 문제를 해결하고자, 거래 관련 데이터를 블록체인 네트워크에 저장하여 관리하는 온체인 데이터(on-chain data)와 블록체인 네트워크와 연동된 외부 스토리지(external storage)에 저장하여 관리하는 오프체인 데이터(off-chain data)로 구분하여 데이터를 저장 및 관리하는 방식이 제안된 바 있다. 그러나 블록체인 네트워크와 외부 스토리지를 연동하는 경우, 종래 중앙 집중식 네트워크 환경에서와 마찬가지로 데이터의 해킹이나 불법 복제에 노출되는 문제가 있다.In order to solve such performance degradation and inefficiency problems, on-chain data that stores and manages transaction-related data in the blockchain network and external storage linked to the blockchain network are stored and managed. A method of storing and managing data by classifying it as off-chain data has been proposed. However, in the case of linking the block chain network and external storage, there is a problem of being exposed to hacking or illegal copying of data as in the conventional centralized network environment.

따라서, 자원의 거래에 있어 자원의 선등록 당사자의 손해와 블록체인 네트워크의 성능 저하 및 비효율성을 방지할 수 있는 거래 시스템의 고안이 필요하다.Therefore, it is necessary to devise a transaction system that can prevent the loss of the party who pre-registered the resource and the degradation and inefficiency of the block chain network in the transaction of the resource.

본 개시의 일 측면에 의하면, 스마트 계약(smart contract)의 거래대상(transaction object)을 구매자에게 제공하기 위하여, 블록체인 네트워크와 연동된 외부 스토리지(external storage)에 오프체인 데이터(off-chain data)를 단계별로 암호화하여 분산 저장하고, 암호화된 데이터를 온체인 데이터(on-chain data)를 이용하여 단계별로 복호화하여 구매자에게 거래대상을 제공하는 스마트 계약방법 및 시스템을 제공하는 데 주된 목적이 있다.According to one aspect of the present disclosure, in order to provide a transaction object of a smart contract to a purchaser, off-chain data is stored in an external storage linked with a block chain network. The main purpose is to provide a smart contract method and system that provides a transaction target to a buyer by encrypting and storing the encrypted data step by step and decrypting the encrypted data step by step using on-chain data.

본 개시의 일 측면에 의하면, 외부 스토리지(external storage)를 이용한 스마트 계약(smart contract) 방법에 있어서, 블록체인 네트워크의 한 노드로부터 비밀키(secret key) 및 상기 거래대상을 입력받는 과정; 기 설정된 순서에 따라, 상기 비밀키를 기초로 n 개(n은 2 이상의 자연수)의 해시코드를 생성하고, 상기 거래대상을 n 개의 데이터로 분할하고, 분할된 데이터를 상기 기 설정된 순서의 역순으로 상기 해시코드를 기초로 암호화하여 n 개의 외부 스토리지(external storage) 각각에 저장하는 과정; 및 상기 해시코드 중 상기 기 설정된 순서에 따라 마지막으로 생성된 해시코드인 루트코드(root code) 및 상기 비밀키를 상기 블록체인 네트워크(blockchain network)의 분산원장(distributed ledger)에 등록하는 과정을 포함하는 것을 특징으로 하는 스마트 계약방법을 제공한다.According to one aspect of the present disclosure, in a smart contract method using external storage, the process of receiving a secret key and the transaction target from one node of a block chain network; According to a preset order, n hash codes (n is a natural number greater than or equal to 2) are generated based on the secret key, the transaction target is divided into n pieces of data, and the divided data is divided into the reverse order of the preset order. Encrypting based on the hash code and storing the n number of external storage (external storage) each; and registering a root code, which is a hash code last generated according to the preset order among the hash codes, and the secret key in a distributed ledger of the blockchain network. It provides a smart contract method, characterized in that

본 개시의 다른 측면에 의하면, 전술한 거래대상 제공방법에 있어서, 상기 외부 스토리지 각각에 저장하는 과정은, 상기 기 설정된 순서에 따라 제1 내지 제n 해시코드를 생성하되, 상기 비밀키를 기초로 상기 제1 해시코드를 생성하고, 각 해시코드보다 인덱스가 1 작은 해시코드를 기초로 상기 제2 내지 제n 해시코드를 생성하는 과정; 및 상기 기 설정된 순서에 따라 상기 거래대상을 제1 내지 제n 데이터로 분할하되, 분할된 데이터를 각 인덱스(index)에 대응하는 해시코드를 기초로 상기 기 설정된 순서의 역순으로 암호화하여 제n 내지 제1 암호값(encrypted value)을 차례로 생성하고, 생성된 암호값을 차례로 제n 내지 제1 외부 스토리지에 각각 저장하는 과정을 포함하는 것을 특징으로 하는 스마트 계약방법을 제공한다.According to another aspect of the present disclosure, in the above-described transaction object providing method, the storing in each of the external storages includes generating first to n-th hash codes according to the preset order, but based on the secret key generating the first hash code, and generating the second to n-th hash codes based on a hash code having an index smaller than that of each hash code by one; and dividing the transaction target into first to n-th data according to the preset order, and encrypting the divided data in the reverse order of the preset order based on a hash code corresponding to each index, and n-th to n-th data There is provided a smart contract method comprising the steps of sequentially generating a first encrypted value, and sequentially storing the generated encrypted value in nth to first external storage, respectively.

본 개시의 다른 측면에 의하면, 전술한 거래대상 제공방법에 있어서, 상기 거래대상을 획득하는 과정은, 상기 비밀키를 이용하여 상기 위치변조값 및 상기 암호키변조값으로부터 제1 위치값 및 제1 암호키를 각각 획득하는 과정; 및 획득된 제1 위치값 및 획득된 제1 암호키를 기초로 상기 제n 내지 제1 암호값을 상기 기 설정된 순서에 따라 복호화하고, 각 복호화 수행마다 무결성 검증을 수행하여 무결성이 검증된 거래대상을 획득하는 과정을 포함하는 것을 특징으로 하는 스마트 계약방법을 제공한다.According to another aspect of the present disclosure, in the above-described transaction object providing method, the process of acquiring the transaction object includes a first position value and a first value from the position modulation value and the encryption key modulation value using the secret key. A process of obtaining each encryption key; and decrypting the n-th to first encryption values based on the obtained first position value and the obtained first encryption key according to the preset order, and performing integrity verification for each decryption to verify the integrity of the transaction target. It provides a smart contract method comprising the process of acquiring

본 개시의 또 다른 측면에 의하면, 전술한 거래대상 제공방법에 있어서, 상기 루트코드와 상기 획득된 제n 해시코드를 기초로 거래 전체의 무결성을 검증하고, 상기 획득된 제n 해시코드를 상기 블록체인 네트워크의 분산원장에 추가하는 과정을 더 포함하는 것을 특징으로 하는 스마트 계약방법을 제공한다.According to another aspect of the present disclosure, in the above-described transaction object providing method, the integrity of the entire transaction is verified based on the root code and the obtained n-th hash code, and the obtained n-th hash code is applied to the block. It provides a smart contract method, characterized in that it further comprises the process of adding to the distributed ledger of the chain network.

본 개시의 일 측면에 의하면, 스마트 계약의 거래대상을 제공하는 데 있어, 블록체인 네트워크와 연동된 외부 스토리지에 거래대상을 단계별로 암호화하여 분산 저장하고, 온체인 데이터를 기초로 암호화된 데이터를 단계별로 복호화하여 거래대상을 획득하게 하는 거래대상 제공방법을 제공함으로써 판매자(seller)의 거래대상 선등록에 따른 불이익을 방지하고, 블록체인 네트워크의 성능 저하를 방지하며, 외부 스토리지 사용에 의한 데이터 누출 및/또는 변조를 방지하는 효과가 있다.According to one aspect of the present disclosure, in providing a transaction target for a smart contract, the transaction target is encrypted step-by-step in an external storage linked with the blockchain network and distributed and stored, and encrypted data based on on-chain data is stored step by step By providing a method of providing a transaction target that enables the acquisition of a transaction object by decrypting it with / or has the effect of preventing tampering.

본 개시의 다른 측면에 의하면, 가장 마지막에 복호화된 데이터를 블록체인 네트워크에 등록시킴으로써 거래 전체의 무결성을 검증할 수 있고, 거래 당사자 또는 제3자를 부인봉쇄(non-repudiation)하게 하는 효과가 있다. According to another aspect of the present disclosure, by registering the last decrypted data in the blockchain network, the integrity of the entire transaction can be verified, and there is an effect of non-repudiation of the transaction party or a third party.

따라서, 본 개시의 다양한 측면에 따른 거래대상 제공방법을 이용하는 경우, 서로 신뢰하지 않는 제3자 간 대용량 콘텐츠 등을 네트워크 성능 저하 없이 안전하게 거래할 수 있는 효과가 있다.Accordingly, when the method for providing a transaction target according to various aspects of the present disclosure is used, there is an effect of safely transacting large-capacity content between third parties who do not trust each other without degrading network performance.

도 1은 본 개시의 일 실시예에 따른 외부 스토리지를 이용한 스마트 계약 시스템을 나타내는 개념도이다.
도 2는 본 개시의 일 실시예에 따른 스마트 계약 방법을 나타내는 순서도이다.
도 3은 본 개시의 일 실시예에 따라 분할 및 암호화된 데이터를 외부 스토리지에 저장하는 방법의 예시도이다.
도 4는 본 개시의 일 실시예에 따른 암호화 과정을 나타내는 예시도이다.
도 5는 본 개시의 일 실시예에 따른 복호화 과정을 나타내는 예시도이다.
1 is a conceptual diagram illustrating a smart contract system using external storage according to an embodiment of the present disclosure.
2 is a flowchart illustrating a smart contract method according to an embodiment of the present disclosure.
3 is an exemplary diagram of a method of storing divided and encrypted data in an external storage according to an embodiment of the present disclosure.
4 is an exemplary diagram illustrating an encryption process according to an embodiment of the present disclosure.
5 is an exemplary diagram illustrating a decoding process according to an embodiment of the present disclosure.

이하, 본 개시의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다. 각 도면의 구성요소들에 열람부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 개시를 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 개시의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, some embodiments of the present disclosure will be described in detail with reference to exemplary drawings. It should be noted that, in adding the reference numerals to the components of each drawing, the same components are to have the same reference numerals as much as possible even if they are displayed on different drawings. In addition, in describing the present disclosure, if it is determined that a detailed description of a related known configuration or function may obscure the gist of the present disclosure, the detailed description thereof will be omitted.

또한, 본 개시의 구성 요소를 설명하는 데 있어서, 제2, 제1 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 명세서 전체에서, 어떤 부분이 어떤 구성요소를 '포함', '구비'한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 '…부', '모듈' 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.In addition, in describing the components of the present disclosure, terms such as second and first may be used. These terms are only for distinguishing the elements from other elements, and the essence, order, or order of the elements are not limited by the terms. Throughout the specification, when a part 'includes' or 'includes' a certain element, this means that other elements may be further included, rather than excluding other elements, unless otherwise stated. . In addition, the '... Terms such as 'unit' and 'module' mean a unit that processes at least one function or operation, which may be implemented as hardware or software or a combination of hardware and software.

첨부된 도면과 함께 이하에 개시될 상세한 설명은 본 개시의 예시적인 실시형태를 설명하고자 하는 것이며, 본 개시가 실시될 수 있는 유일한 실시형태를 나타내고자 하는 것이 아니다.DETAILED DESCRIPTION The detailed description set forth below in conjunction with the appended drawings is intended to describe exemplary embodiments of the present disclosure and is not intended to represent the only embodiments in which the present disclosure may be practiced.

본 개시는 외부 스토리지(external storage)를 이용한 스마트 계약(smart contract) 방법으로서, 외부 스토리지에 거래대상(transaction object)을 저장하고, 스마트 계약이 성립된 후 외부 스토리지에 저장된 거래대상을 구매자(buyer)에게 제공하는 방법을 기술한다. 본 개시에서는 블록체인 네트워크(blockchain network)의 분산원장(distributed ledger)에 저장되는 데이터인 온체인 데이터(on-chain data)와 외부 스토리지에 저장되는 오프체인 데이터(off-chain data)를 구분한다. 이를 통하여, 판매자(seller)의 거래대상 선등록에 따른 불이익을 방지하고 거래대상의 데이터 크기에 의한 분산원장의 비대화와 블록체인 네트워크의 속도 저하를 방지한다.The present disclosure is a smart contract method using external storage, storing a transaction object in the external storage, and after the smart contract is established, the transaction object stored in the external storage to the buyer Describe how to provide In the present disclosure, on-chain data, which is data stored in a distributed ledger of a blockchain network, and off-chain data, which is stored in external storage, are distinguished. Through this, the disadvantage caused by the seller's pre-registration of the transaction target is prevented, and the spread of the distributed ledger due to the data size of the transaction target and the slowdown of the block chain network are prevented.

도 1은 본 개시의 일 실시예에 따른 외부 스토리지를 이용한 스마트 계약 시스템을 나타내는 개념도이다.1 is a conceptual diagram illustrating a smart contract system using external storage according to an embodiment of the present disclosure.

본 개시에서는 판매자(seller)가 온체인 데이터로서 비밀키(secret key)를 제공하고, 오프체인 데이터로서 거래대상을 제공한다. 여기서 거래대상이란 콘텐츠(content), 예컨대, 사진(picture), 동영상(video), 소프트웨어(software), 음악(music) 등일 수 있으나, 이에 한하지 않고 신주인수권부사채(bond with warrant) 등 시장에서 거래될 수 있는 모든 대상이 될 수 있다. 스마트 계약 시스템은 거래대상을 분할하고, 분할된 거래대상을 각각 순차적으로 암호화하여 외부 스토리지에 분산 저장한다. 거래는 구매자(buyer)가 스마트 계약의 거래조건을 성취할 수 있는 거래대가(consideration)를 블록체인 네트워크의 분산원장, 구체적으로는 해당 스마트 계약의 데이터베이스(database)에 등록시킴으로써 성립된다. 이러한 거래대가는 돈, 코인(coin), 주식(stock), 콘텐츠 등이 될 수 있으나, 이에 한하지 않고 시장에서 거래의 대가로 제공될 수 있는 모든 대가가 될 수 있다. 계약의 이행은 블록체인 네트워크가 외부 스토리지에 분산 저장된 데이터를 복호화하는 데 사용되는 정보들, 예컨대 트랜잭션을 발생시켜 비밀키 등을 구매자에게 전달함으로써 수행된다. 이러한 계약의 이행은 구매자가 복호화한 데이터의 데이터 무결성(data integrity)을 검증하고, 검증 결과를 블록체인 네트워크의 분산원장에 추가함으로써 완료될 수 있다. 이러한 검증 결과의 추가로 본 스마트 계약 시스템에 의한 거래에 부인봉쇄(non-repudiation)의 효과가 발생한다.In the present disclosure, a seller provides a secret key as on-chain data, and provides a transaction target as off-chain data. Here, the transaction target may be content, for example, pictures, videos, software, music, etc., but is not limited thereto, and transactions in the market such as bonds with warrants It can be anything that can be. The smart contract system divides the transaction target, encrypts each divided transaction target sequentially, and stores them in an external storage. A transaction is established by registering the transaction consideration that the buyer can fulfill the transaction conditions of the smart contract in the distributed ledger of the blockchain network, specifically, the database of the smart contract. Such transaction consideration may be money, coins, stock, content, etc., but is not limited thereto and may be any consideration that can be provided in exchange for a transaction in the market. Execution of the contract is performed by generating information, such as a transaction, used by the blockchain network to decrypt data distributed and stored in external storage, and delivering a secret key to the purchaser. The implementation of this contract can be completed by verifying the data integrity of the data decrypted by the buyer and adding the verification result to the distributed ledger of the blockchain network. In addition to these verification results, the effect of non-repudiation occurs in the transaction by this smart contract system.

도 1을 참조하면, 판매자(또는 블록체인 네트워크의 판매자 노드, 이하 생략)는 거래 제안서(transaction proposal)에 관한 트랜잭션을 발생시켜 블록체인 네트워크에 등록시켜, 블록체인 네트워크의 모든 노드들이 해당 거래 제안서를 조회할 수 있게 한다. 이때 거래 제안서에는 거래 성립에 관한 조건, 거래대상에 관한 정보가 포함될 수 있다. 판매자는 스마트 계약의 조건을 만족한 구매자(또는 블록체인 네트워크의 구매자 노드, 이하 생략)에게 전송되도록 비밀키를 블록체인 네트워크에 더 등록시킨다. 이러한 비밀키는 거래대상이 저장된 위치와 암호화된 거래대상을 복호화할 수 있는 키로, 비밀키는 구매자의 공개키(public key)를 기초로 암호화된 키임이 바람직하다.Referring to FIG. 1 , a seller (or a seller node of a blockchain network, hereinafter omitted) generates a transaction related to a transaction proposal and registers it in the blockchain network, and all nodes in the blockchain network send the transaction proposal. make it viewable. In this case, the transaction proposal may include information on conditions for establishing a transaction and a transaction target. The seller further registers the secret key in the blockchain network to be transmitted to the buyer (or the buyer node of the blockchain network, hereinafter omitted) that satisfies the conditions of the smart contract. The secret key is a key capable of decrypting the location where the transaction object is stored and the encrypted transaction object, and the secret key is preferably an encrypted key based on the public key of the purchaser.

판매자는 외부 스토리지에 거래대상을 업로드(upload)한다. 이때 거래대상은 분할되고 비밀키를 기초로 암호화되어 물리적 또는 논리적으로 분할된 외부 스토리지에 각각 분산 저장된다. 분산 저장으로 인해 거래대상을 외부 스토리지에 업로드함에 따라 발생할 수 있는 데이터 해킹 또는 불법 복제 등의 문제를 방지할 수 있다.The seller uploads the transaction object to the external storage. At this time, the transaction target is divided, encrypted based on the secret key, and distributed and stored in physically or logically divided external storage. Due to distributed storage, it is possible to prevent problems such as data hacking or illegal copying that may occur when a transaction object is uploaded to an external storage.

블록체인 네트워크는 거래대상을 외부 스토리지에 암호화 및 분산 저장하는 데 사용된 정보인 거래대상의 저장위치, 거래대상을 복호화할 수 있는 암호키 및/또는 거래의 무결성을 검증하기 위한 루트코드(root code) 등을 분산원장에 더 등록시킴으로써 계약의 이행이 수행되도록 한다. 여기서 루트코드는 거래의 이행 과정에서 거래대상을 복호화할 때, 복호화된 거래대상의 데이터 무결성을 보장할 수 있는 코드임이 바람직하다. 루트코드의 구체적인 예는 도 3에서 후술한다.The blockchain network is the information used to encrypt and distributedly store the transaction object in external storage, the storage location of the transaction object, the encryption key that can decrypt the transaction object, and/or the root code for verifying the integrity of the transaction. ), etc. are further registered in the distributed ledger so that the performance of the contract is performed. Here, it is preferable that the root code is a code that can ensure the data integrity of the decrypted transaction object when decrypting the transaction object during the transaction execution process. A specific example of the root code will be described later with reference to FIG. 3 .

구매자가 블록체인 네트워크에 거래대가를 등록시키는 등 거래 조건을 만족시킴으로써 거래가 성립되면, 구매자는 블록체인 네트워크로부터 비밀키, 거래대상의 저장위치 및/또는 거래대상을 복호화할 수 있는 암호키를 전달받아 암호화된 거래대상을 외부 스토리지로부터 다운로드(download)받고, 암호화된 거래대상을 복호화하여 거래대상을 획득한다. 여기서 블록체인 네트워크로부터 비밀키 등을 제공받는 방식은, 예컨대 블록체인 네트워크가 스마트 계약의 비밀키 등에 대한 트랜잭션을 발생시키고, 구매자 노드가 함수를 호출하여 스마트 계약으로부터 비밀키 등을 획득하는 방법일 수 있으나 이에 한하지 않고 이 분야 통상의 기술자에게 자명한 방식에 의할 수 있다. 이때, 복호화된 거래대상의 데이터 무결성이 보장되어야 하므로 구매자는 루트코드를 추가로 전달받아 거래 전체의 무결성을 검증할 수 있다. 또는, 복호화 결과로 생성된 정보를 블록체인 네트워크에 등록시킴으로써 블록체인 네트워크의 모든 노드가 거래의 무결성을 공유하도록 한다.When a transaction is established by satisfying the transaction conditions such as registering the transaction price in the block chain network, the buyer receives the secret key, the storage location of the transaction target, and/or the encryption key that can decrypt the transaction target from the block chain network. The encrypted transaction object is downloaded from the external storage, and the encrypted transaction object is decrypted to obtain the transaction object. Here, the method of receiving the secret key from the block chain network is, for example, a method in which the block chain network generates a transaction for the secret key of the smart contract, and the purchaser node calls a function to obtain the secret key from the smart contract. However, the present invention is not limited thereto and may be performed in a manner obvious to those skilled in the art. At this time, since the data integrity of the decrypted transaction target must be guaranteed, the purchaser can additionally receive the root code to verify the integrity of the entire transaction. Alternatively, by registering the information generated as a result of decryption in the blockchain network, all nodes in the blockchain network share the integrity of the transaction.

도 2는 본 개시의 일 실시예에 따른 스마트 계약 방법을 나타내는 순서도이다.2 is a flowchart illustrating a smart contract method according to an embodiment of the present disclosure.

도 1에서는 판매자가 거래 제안서를 등록하면 구매자가 제안서의 거래조건을 만족시킴으로써 스마트 계약이 성립되는 실시예가 기술되었으나, 이러한 스마트 계약은 도 2에서와 같이 구매자의 요구에 맞추어 판매자가 거래 제안서를 제공함으로써 거래조건을 만족시켜 성립될 수 있으며, 이에 한하지 않는다.In FIG. 1, when the seller registers a transaction proposal, an embodiment in which a smart contract is established by the buyer satisfying the transaction conditions of the proposal has been described. It can be established by satisfying the transaction conditions, but is not limited thereto.

구매자는 블록체인 네트워크에 트랜잭션을 발생시켜 서비스를 요청한다(S200).The buyer requests a service by generating a transaction on the blockchain network (S200).

구매자가 요청하는 서비스를 제공하고자 하는 판매자가 트랜잭션을 발생시켜 거래대상의 제공에 대한 거래 제안서를 블록체인 네트워크에 등록시킨다(S202).The seller who wants to provide the service requested by the buyer generates a transaction and registers the transaction proposal for the provision of the transaction object in the block chain network (S202).

구매자는 등록된 하나 이상의 거래 제안서를 조회하여, 특정 구매자가 제시한 거래대가를 블록체인 네트워크에 등록시킨다(S204). 이때 등록되는 거래대가는 보증금(deposit)으로서 총 거래대가의 일부일 수 있고, 구매자는 데이터 무결성이 검증된 거래대가를 획득한 후 잔여 거래대가를 블록체인 네트워크에 등록하여 판매자에게 지급되도록 할 수 있다. 이와 같이, 거래대상과 거래대가를 제공하는 구체적 거래방식이 스마트 계약의 내용에 따라 달라짐은 자명하다.The buyer inquires one or more registered transaction proposals and registers the transaction price suggested by a specific purchaser in the blockchain network (S204). At this time, the registered transaction price may be a part of the total transaction price as a deposit, and after the buyer obtains the transaction price with data integrity verified, the remaining transaction price can be registered in the blockchain network to be paid to the seller. As such, it is self-evident that the specific transaction method that provides the transaction target and transaction consideration varies depending on the contents of the smart contract.

거래가 요청된 판매자는 거래대상을 외부 스토리지에 업로드하고(S206), 거래대상의 암호화에 사용된 비밀키를 블록체인 네트워크에 등록시킨다(S208). 이러한 비밀키는 구매자가 제공하는 공개키에 의해 암호화된 키임이 바람직하며, 구매자는 자신의 공개키에 대응하는 개인키(private key)를 이용하여 비밀키를 복호화할 수 있다. 판매자는 분산 저장된 거래대상의 위치를 알 수 있는 정보(도 2의 저장위치 등)와 분산 저장된 거래대상을 복호화할 수 있는 정보(도 2의 암호키 등) 및/또는 전체 거래의 무결성을 검증할 수 있는 정보(도 2의 루트코드 등)를 블록체인 네트워크에 더 등록시킨다(S208).The seller who has requested the transaction uploads the transaction object to the external storage (S206) and registers the secret key used for encryption of the transaction object in the block chain network (S208). The private key is preferably a key encrypted by a public key provided by the purchaser, and the purchaser can decrypt the private key using a private key corresponding to his or her public key. The seller can verify the information (such as the storage location of Fig. 2) that can know the location of the transaction object stored in a distributed manner, information that can decrypt the transaction object stored in the distribution (such as the encryption key in Fig. 2) and/or the integrity of the entire transaction. Possible information (such as the root code in FIG. 2) is further registered in the block chain network (S208).

판매자는 비밀키, 루트코드, 거래대상의 저장위치, 암호키 등을 기초로, 업로드된 거래대상을 분할 및 암호화하여 외부 스토리지에 분산 저장한다(S210).The seller divides and encrypts the uploaded transaction object based on the secret key, the root code, the storage location of the transaction object, the encryption key, and the like, and distributes and stores the uploaded transaction object in external storage (S210).

여기서, S208 단계 및 S210 단계의 선후는 변경될 수 있으며, S206 내지 S210 단계는 병렬적으로 수행될 수 있다.Here, the precedence of steps S208 and S210 may be changed, and steps S206 to S210 may be performed in parallel.

S204 단계에서 등록된 거래대가가 거래 제안서의 거래 조건을 만족시키면 스마트 계약이 성립된다(S214). 이러한 스마트 계약의 성립은 S200 내지 S212 단계가 모두 수행된 후에 이루어짐이 바람직하나, 일부 단계가 생성, 변경, 생략된 경우에도 이루어질 수 있음은 자명하다.If the transaction consideration registered in step S204 satisfies the transaction conditions of the transaction proposal, a smart contract is established (S214). The establishment of such a smart contract is preferably made after all steps S200 to S212 are performed, but it is self-evident that some steps can be created, changed, or omitted.

스마트 계약의 성립에 따라 블록체인 네트워크는 구매자에게 비밀키, 거래대상의 저장위치(또는 거래대상을 참조할 수 있는 주소값 등) 및/또는 암호키를 전달한다(S216). 이러한 전달은 구매자 노드로 비밀키, 거래대상의 저장위치 및/또는 암호키가 포함된 트랜잭션을 발생시킴으로써 수행될 수 있다.According to the establishment of the smart contract, the blockchain network delivers the secret key, the storage location of the transaction object (or an address value that can refer to the transaction object, etc.) and/or the encryption key to the purchaser (S216). This transfer can be performed by generating a transaction containing the private key, the storage location of the transaction target and/or the encryption key to the purchaser node.

구매자는 전달받은 저장위치, 암호키 및/또는 비밀키를 이용하여 외부 스토리지로부터 거래대상을 다운로드하고(S218), 다운로드한 거래대상을 복호화한다(S220).The purchaser downloads the transaction object from the external storage using the received storage location, encryption key and/or secret key (S218), and decrypts the downloaded transaction object (S220).

구매자는 블록체인 네트워크로부터 루트코드를 추가로 전달받아(S222), 복호화된 거래대상의 데이터 무결성을 최종적으로 검증하고(S224), 검증 결과를 블록체인 네트워크에 등록시킨다(S226).The buyer additionally receives the root code from the block chain network (S222), finally verifies the data integrity of the decrypted transaction target (S224), and registers the verification result in the block chain network (S226).

성공적으로 검증되어 스마트 계약의 계약 이행이 완료된 경우(S228) 블록체인 네트워크는 판매자에게 거래대가를 지급한다(S230). 검증 결과, 데이터 무결성이 인정되지 않은 경우에는 블록체인 네트워크는 판매자에게 거래대가를 지급하지 않거나, 일부만 지급하거나, 판매자에게 거래대상을 재업로드하도록 요청할 수 있으나, 이는 예시적인 것으로 데이터 무결성에 문제가 있는 경우 스마트 계약 시스템에 기 설정된 방식 또는 판매자와 구매자 간 계약된 내용에 의하여 처리됨이 바람직하다.When it is successfully verified and the contract execution of the smart contract is completed (S228), the blockchain network pays the transaction price to the seller (S230). As a result of the verification, if data integrity is not recognized, the blockchain network may not pay the transaction price to the seller, pay only a portion, or request the seller to re-upload the transaction object, but this is an example and In this case, it is preferable to process according to the method preset in the smart contract system or the contract between the seller and the buyer.

S228 단계에서 스마트 계약의 이행 완료 확인은 스마트 계약의 내용에 비추어 거래대상, 거래대가가 계약 내용에 부합하는 지 여부 등을 더 고려하어 수행됨이 바람직하다. 예컨대, 판매자가 제공한 거래대상의 품질, 구매자가 제공한 거래대가의 위/변조 여부 등이 더 고려될 수 있다.In step S228, it is preferable that the confirmation of the completion of the smart contract is performed in consideration of the transaction target and whether the transaction price conforms to the contract contents in light of the contents of the smart contract. For example, the quality of the transaction object provided by the seller, whether forgery/falsification of the transaction price provided by the buyer, etc. may be further considered.

도 2는 각 과정을 순차적으로 실행하는 것으로 기재하고 있으나, 이는 본 개시의 일 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것이다. 다시 말해, 본 개시의 일 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 개시의 일 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 도 2에 기재된 순서를 변경하여 실행하거나 각 과정 중 하나 이상의 과정을 병렬적으로 실행하는 것으로 다양하게 수정 및 변형하여 적용 가능할 것이므로, 도 2의 시계열적인 순서로 한정되는 것은 아니다.2 illustrates that each process is sequentially executed, this is merely illustrative of the technical idea of an embodiment of the present disclosure. In other words, one of ordinary skill in the art to which an embodiment of the present disclosure pertains may change the order described in FIG. Since it may be applied by various modifications and variations to be executed in parallel, it is not limited to the time series sequence of FIG. 2 .

도 3은 본 개시의 일 실시예에 따라 분할 및 암호화된 데이터를 외부 스토리지에 저장하는 방법의 예시도이다.3 is an exemplary diagram of a method of storing divided and encrypted data in an external storage according to an embodiment of the present disclosure.

도 3을 참조하면 스마트 계약 시스템은 거래대상을 기 설정된 순서(예: 데이터 배열 순서)에 따라 분할하고, 분할된 순서의 역순으로 암호화하며, 암호화된 순서의 역순, 즉 기 설정된 순서로 다시 복호화함으로써 데이터의 기밀성(confidentiality)을 보장할 수 있다.Referring to FIG. 3, the smart contract system divides the transaction target according to a preset order (eg, data arrangement order), encrypts it in the reverse order of the divided order, and decrypts it again in the reverse order of the encrypted order, that is, the preset order. Data confidentiality can be guaranteed.

스마트 계약 시스템(또는 외부 스토리지, 이하 생략)는 거래대상을 기 설정된 순서에 따라 n 개의 데이터(n은 2 이상의 자연수), 즉, 제1 데이터 내지 제n 데이터로 분할한다. 스마트 계약 시스템은 분할된 각 데이터를 각각의 암호키를 이용하여 암호화하기 위하여, 분할된 데이터의 각 인덱스에 대응하는 n 개의 암호키(encrypt key), 즉, 제1 암호키 내지 제n 암호키를 생성한다. 즉, 제1 데이터를 암호화하는 데 제1 암호키가 사용되는 것이다. 이때, n 개의 암호키를 서로 다르게 생성하기 위하여 ECC(Elliptic Curve Cryptography) 기반의 차일드키(child key) 생성 알고리즘 등을 사용할 수 있다. The smart contract system (or external storage, hereinafter omitted) divides the transaction target into n pieces of data (n is a natural number greater than or equal to 2), that is, first data to n-th data according to a preset order. The smart contract system uses n encryption keys corresponding to each index of the divided data, that is, the first encryption key to the nth encryption key, in order to encrypt each divided data using each encryption key. create That is, the first encryption key is used to encrypt the first data. In this case, in order to generate n encryption keys differently, an ECC (Elliptic Curve Cryptography)-based child key generation algorithm, etc. may be used.

이러한 암호키는 암호화된 데이터를 복호화하는 과정에서 다시 사용되나, 암호화 과정에서와 달리 자신보다 1 작은 인덱스의 암호값(encrypted value)이 복호화되어야 그다음 인덱스의 암호키를 얻을 수 있도록 복호화가 진행될 수 있다. 예컨대, 각 암호값은 자신보다 1 큰 인덱스의 암호키를 더 암호화하여 포함할 수 있으며, 이때 제 n 암호값은 자신보다 1 큰 인덱스의 암호키가 존재하지 않으므로 자신보다 1 큰 인덱스의 암호키를 포함하지 않도록 구성될 수 있다.This encryption key is used again in the process of decrypting the encrypted data, but unlike in the encryption process, the encrypted value of an index that is one less than itself must be decrypted before decryption can proceed to obtain the encryption key of the next index. . For example, each encryption value may include an encryption key of an index 1 larger than itself, and in this case, the n th encryption value is an encryption key of an index 1 larger than itself because there is no encryption key of an index larger than itself. It may be configured not to include.

스마트 계약 시스템은 기 설정된 순서의 역순, 즉 분할된 데이터의 인덱스가 내림차순인 순서로 각 분할된 데이터를 암호화하여 외부 스토리지의 각 위치에 암호화된 데이터를 분산 저장한다. 구체적으로, 스마트 계약 시스템은 제n 데이터를 제n 암호키를 이용하여 암호화함으로써 제n 암호값을 생성하고, 제n 암호값을 분산 저장하여 제n 암호값을 참조할 수 있는 제n 위치값을 획득한다. 이후, 제(n-1) 데이터를 제(n-1) 암호키를 이용하여 암호화한 후(제(n-1) 암호화값 생성) 제(n-1) 위치값에 제(n-1) 암호값을 저장한다. 이러한 과정은 제1 암호값이 외부 스토리지에 저장될 때까지 계속된다.The smart contract system encrypts each divided data in the reverse order of the preset order, that is, the index of the divided data is in descending order, and distributes and stores the encrypted data in each location of the external storage. Specifically, the smart contract system generates an n-th encryption value by encrypting n-th data using an n-th encryption key, and distributes and stores the n-th encryption value to obtain an n-th position value that can refer to the n-th encryption value. acquire After that, after encrypting the (n-1)th data using the (n-1)th encryption key (generating the (n-1)th encryption value), the (n-1)th position value is Save the password value. This process continues until the first encryption value is stored in the external storage.

여기서 외부 스토리지는 분산 해시테이블(distributed hash table)일 수 있으며, 그에 따라 제1 위치값 내지 제n 위치값은 분산 해시테이블의 각 노드를 참조하기 위한 해시키(hash key)일 수 있다.Here, the external storage may be a distributed hash table, and accordingly, the first to n-th position values may be hash keys for referencing each node of the distributed hash table.

이러한 위치값은 암호화된 데이터를 복호화하는 과정에서 다시 사용되나, 암호화 과정에서와 달리 직전 인덱스의 암호값이 복호화되어야 그다음 인덱스의 위치값을 얻을 수 있도록 복호화가 진행된다. 예컨대, 각 암호값은 자신보다 1 큰 인덱스의 위치값을 더 암호화하여 포함할 수 있으며, 이때 제 n 암호값은 자신보다 1 큰 인덱스의 위치값이 존재하지 않으므로 자신보다 1 큰 인덱스의 위치값을 포함하지 않도록 구성될 수 있다.This position value is used again in the process of decrypting the encrypted data, but unlike in the encryption process, the encryption value of the previous index must be decrypted before decryption is performed so that the position value of the next index can be obtained. For example, each cryptographic value may further include the encrypted position value of the index 1 larger than itself, and in this case, since the nth cryptographic value does not have a position value of the index 1 larger than itself, the position value of the index 1 larger than itself is included. It may be configured not to include.

도 4는 본 개시의 일 실시예에 따른 암호화 과정을 나타내는 예시도이다.4 is an exemplary diagram illustrating an encryption process according to an embodiment of the present disclosure.

본 개시의 일 실시예에 따른 암호화 과정은 이후 복호화의 각 단계에서 복호화된 데이터의 데이터 무결성을 검증할 수 있도록 수행된다. n 개의 분할된 데이터는 인덱스의 내림차순 순서로 암호화되며, 각 암호화된 데이터는 직전 암호화된 데이터, 즉 자신보다 인덱스가 1 큰 데이터의 암호화 과정에서 사용된 데이터를 이용하여 암호화된다. 스마트 계약 시스템은 암호화된 데이터를 복호화하는 경우 데이터의 무결성을 검증하기 위하여 암호화 과정에서 해시코드(hash code)를 더 이용한다. 이러한 해시코드는 분할된 데이터의 각 인덱스에 대응하도록 제1 해시코드 내지 제n 해시코드로 구성되며, 제1 해시코드는 비밀키를 이용하여 생성되고, 제2 내지 제n 해시코드는 직전 생성된 해시코드를 기초로 생성된다.The encryption process according to an embodiment of the present disclosure is performed to verify the data integrity of the decrypted data in each subsequent decryption step. The n pieces of divided data are encrypted in descending order of the index, and each encrypted data is encrypted using the data used in the encryption process of the previously encrypted data, that is, data whose index is 1 larger than itself. The smart contract system further uses a hash code in the encryption process to verify the integrity of the data when decrypting the encrypted data. This hash code is composed of a first hash code to an n-th hash code to correspond to each index of the divided data, the first hash code is generated using a secret key, and the second to n-th hash code is generated just before It is generated based on the hash code.

도 4를 참조하면, 스마트 계약 시스템은 각 분할된 데이터의 인덱스가 증가하는 순서로 제1 데이터 및 비밀키를 기 설정된 함수(예: 해시함수)의 입력값으로 입력하여 제1 해시코드를 생성한다. 이후, 제2 데이터 및 제1 해시코드를 기 설정된 함수의 입력값으로 입력하여 제2 해시코드를 생성한다. 스마트 계약 시스템은 각 데이터의 인덱스를 1씩 증가시키며 전술한 절차를 반복하여, 제1 해시코드 내지 제n 해시코드를 생성한다. 이때, 제n 해시코드는 거래 전체의 무결성을 입증하기 위한 코드로서, 루트코드가 되어 블록체인 네트워크에 등록된다.Referring to FIG. 4 , the smart contract system generates a first hash code by inputting the first data and the secret key as input values of a preset function (eg, a hash function) in the order of increasing index of each divided data. . Thereafter, the second hash code is generated by inputting the second data and the first hash code as input values of a preset function. The smart contract system increments the index of each data by 1 and repeats the above-described procedure to generate a first hash code to an n-th hash code. At this time, the n-th hash code is a code for verifying the integrity of the entire transaction, and becomes the root code and is registered in the blockchain network.

스마트 계약 시스템은 거래대상이 분할된 순서의 역순, 즉 분할된 데이터의 인덱스가 1씩 감소하는 순서로 각 분할된 데이터를 암호화한 제n 내지 제1 암호값을 얻고, 얻어진 암호값을 외부 스토리지에 분산 저장한다. 스마트 계약 시스템은 제n 데이터 및 루트코드를 제n 암호키를 이용하여 암호화함으로써 제n 암호값을 획득한다. 획득된 제n 암호값은 제n 위치값으로 조회 가능한 외부 스토리지의 위치에 저장된다. 이후, 스마트 계약 시스템은 제(n-1) 데이터, 제(n-1) 해시코드, 제n 위치값, 제n 암호키를 제(n-1) 암호키를 이용하여 암호화함으로써 제(n-1) 암호값을 획득한다. 스마트 계약 시스템은 각 데이터의 인덱스를 1씩 감소시키며 전술한 절차를 반복하여 제n 암호값 내지 제1 암호값을 생성하고, 제1 위치값을 획득한다.The smart contract system obtains the nth to first encryption values obtained by encrypting each divided data in the reverse order of the order in which the transaction target is divided, that is, the index of the divided data decreases by 1, and stores the obtained encryption value in the external storage. distributed storage. The smart contract system obtains the n-th encryption value by encrypting the n-th data and the root code using the n-th encryption key. The obtained n-th encryption value is stored in an external storage location that can be inquired as an n-th location value. Thereafter, the smart contract system encrypts the (n-1)th data, the (n-1)th hash code, the nth position value, and the nth encryption key using the (n-1)th encryption key, thereby 1) Obtain an encryption value. The smart contract system decrements the index of each data by 1, repeats the above-described procedure, generates an nth cryptographic value to a first cryptographic value, and obtains a first location value.

스마트 계약 시스템은 제1 위치값 및 비밀키를 16진수 연산(예: 산술 논리 연산(arithmetic and logic calculation))하여 위치변조값(encoded location reference)을 생성하고, 제1 암호키 및 비밀키를 16진수 연산하여 암호키변조값(encoded encrypt key)을 생성한다. 이러한 위치변조값 및 암호키변조값은 각각 블록체인 네트워크의 분산원장에 추가되어, 스마트 계약이 성립된 구매자의 노드에 전달된다.The smart contract system generates an encoded location reference by performing a hexadecimal operation (eg, arithmetic and logic calculation) on the first location value and the secret key, and sets the first encryption key and the secret key to 16 Generates an encoded encrypt key by performing a hexadecimal operation. These position modulation values and encryption key modulation values are added to the distributed ledger of the blockchain network, respectively, and transmitted to the node of the purchaser where the smart contract is established.

도 5는 본 개시의 일 실시예에 따른 복호화 과정을 나타내는 예시도이다.5 is an exemplary diagram illustrating a decoding process according to an embodiment of the present disclosure.

도 5에는 도 4에 따라 암호화 및 분산 저장된 데이터를 복호화하는 예시가 나타나 있다.FIG. 5 shows an example of decrypting data encrypted and distributed according to FIG. 4 .

본 개시의 일 실시예에 따른 복호화 과정은 암호화된 데이터를 복호화하는 과정은 복호화의 각 단계에서 복호화된 데이터의 데이터 무결성을 검증하여, 어느 단계에서라도 데이터 무결성이 검증되지 않으면 거래 전체의 무결성이 검증될 수 없도록 수행된다. n 개의 암호값은 인덱스의 오름차순 순서로 복호화되며, 각 복호화된 데이터는 직전 복호화된 데이터, 즉 자신보다 인덱스가 1 작은 데이터의 복호화 과정에서 획득한 데이터를 이용하여 복호화된다. 복호화 과정에서 획득한 데이터는 다음 복호화할 암호값을 참조할 수 있는 위치값과 복호화에 사용되는 해시코드이다.In the decryption process according to an embodiment of the present disclosure, the process of decrypting the encrypted data verifies the data integrity of the decrypted data in each step of decryption, and if the data integrity is not verified in any step, the integrity of the entire transaction is verified. performed so that it cannot be The n encrypted values are decrypted in the ascending order of the index, and each decrypted data is decrypted using the data obtained in the process of decrypting the immediately decrypted data, that is, data having an index smaller than itself by one. The data obtained during the decryption process is a location value that can refer to the next encryption value to be decrypted and a hash code used for decryption.

도 5를 참조하면, 스마트 계약 시스템은 비밀키, 위치변조값, 암호키변조값을 구매자의 노드에 전달하고, 구매자 노드는 비밀키를 기초로 역연산을 수행하여 위치변조값, 암호키변조값으로부터 각각 제1 위치값, 제1 암호키를 획득한다.Referring to FIG. 5, the smart contract system transmits the secret key, the location modulation value, and the encryption key modulation value to the purchaser's node, and the purchaser node performs an inverse operation based on the secret key to perform an inverse operation on the location modulation value and the encryption key modulation value. A first position value and a first encryption key are obtained from each.

구매자 노드는 암호값이 암호화된 순서의 역순, 즉 암호값의 인덱스가 1씩 증가하는 순서로 외부 스토리지로부터 각 암호값을 획득하여 복호화한다. 구매자 노드는 제1 위치값을 이용하여 제1 암호값을 획득하고, 제1 암호키를 이용하여 제1 암호값을 복호화하여 제1 데이터, 제1 해시코드, 제2 위치값 및 제2 암호키를 획득한다. 이후, 구매자 노드는 인덱스를 1씩 증가시키며 전술한 절차를 반복하여 제1 데이터 내지 제n 데이터를 생성하여 전체 거래대상을 얻는다.The purchaser node acquires and decrypts each encryption value from the external storage in the reverse order of the encryption order of the encryption value, that is, the index of the encryption value increases by 1. The purchaser node obtains the first encryption value using the first location value, and decrypts the first encryption value using the first encryption key to obtain the first data, the first hash code, the second location value, and the second encryption key. to acquire Thereafter, the buyer node increments the index by 1 and repeats the above-described procedure to generate the first data to the n-th data to obtain the entire transaction target.

한편, 전술한 절차만을 거쳐 데이터를 복호화하는 경우 구매자 노드가 복호화한 데이터가 판매자(판매자 노드)가 업로드한 거래대가와 일치하는지를 보장할 수 없는 문제가 발생한다. 이에 따라, 전술한 절차마다 복호화된 데이터를 기초로 데이터의 무결성을 검증하는 과정을 더 수행함이 바람직하다.On the other hand, when data is decrypted through only the above-described procedure, there is a problem in that it cannot be guaranteed whether the data decrypted by the buyer node matches the transaction price uploaded by the seller (seller node). Accordingly, it is preferable to further perform a process of verifying the integrity of the data based on the decrypted data for each procedure described above.

도 5를 참조하면, 구매자 노드는 제1 데이터와 제1 해시코드를 이용하여 복호화된 데이터의 데이터 무결성을 검증한다. 구체적으로 구매자 노드는 제1 암호값을 복호화하여 획득한 제1 데이터와, 전달받은 비밀키를 제1 해시코드를 생성할 때 사용하였던 기 설정된 함수의 입력값으로 입력하여 생성된 값이 제1 암호값을 복호화하여 획득한 제1 해시코드와 일치하는지를 판단하여 데이터 무결성을 검증한다. 이후, 구매자 노드는 제2 암호값을 복호화하여 획득한 제2 데이터와 제1 해시코드를 기 설정된 함수의 입력값으로 입력하여 생성된 값이 제2 암호값을 복호화하여 획득한 제2 해시코드와 일치하는지를 판단하여 데이터 무결성을 검증한다. 구매자 노드는 인덱스를 1씩 증가시키며 각 복호화 과정마다 전술한 무결성 검증 절차를 수행한다. 구매자 노드는 n 번째 데이터 무결성 검증 절차가 수행된 후, 블록체인 네트워크로부터 전달받은(또는 분산원장을 조회한) 루트코드와 제n 암호값을 복호화하여 획득한 제n 해시코드, 즉 복호화된 루트코드 간 일치 여부를 더 판단하여 거래 전체의 무결성을 검증할 수 있다. 이때, 복호화 과정에서 어느 한 무결성 검증 절차라도 검증에 실패하는 경우 루트해시의 무결성 검증이 수행되지 않게 되므로, 루트해시의 무결성 검증은 거래 전체의 무결성을 검증하는 의미가 된다.Referring to FIG. 5 , the purchaser node verifies the data integrity of the decrypted data using the first data and the first hash code. Specifically, the purchaser node inputs the first data obtained by decrypting the first encryption value and the received secret key as the input value of the preset function used to generate the first hash code, and the generated value is the first password. Data integrity is verified by determining whether the value matches the first hash code obtained by decrypting it. Thereafter, the purchaser node inputs the second data and the first hash code obtained by decrypting the second encryption value as an input value of a preset function, and the value generated by decrypting the second encryption value is obtained by decrypting the second hash code and Data integrity is verified by determining whether they match. The purchaser node increments the index by 1 and performs the aforementioned integrity verification procedure for each decryption process. After the nth data integrity verification procedure is performed, the purchaser node receives the nth hash code obtained by decrypting the nth encryption value and the root code received from the blockchain network (or inquiring the distributed ledger), that is, the decrypted root code. It is possible to verify the integrity of the entire transaction by further determining whether it is a match or not. At this time, if any one integrity verification procedure fails in the decryption process, the integrity verification of the root hash is not performed. Therefore, the integrity verification of the root hash means verifying the integrity of the entire transaction.

이러한 거래 전체의 무결성을 검증하는 또 하나의 실시예로는, 복호화된 루트코드를 블록체인 네트워크에 등록하는 것이다. 이로써 블록체인 네트워크의 모든 노드가 해당 거래 전체의 무결성에 관한 정보를 공유하게 되고, 추후 거래 당사자의 일방 또는 제3자를 부인봉쇄하게 하는 효과가 있다.Another embodiment of verifying the integrity of the entire transaction is to register the decrypted root code in the blockchain network. As a result, all nodes in the blockchain network share information about the integrity of the entire transaction, which has the effect of preventing one party or a third party from denying the transaction in the future.

명세서에 설명되는 스토리지(storage), 네트워크(network), 과정, 단계 등의 다양한 구현예들은, 디지털 전자 회로, 집적 회로, FPGA(field programmable gate array), ASIC(application specific integrated circuit), 컴퓨터 하드웨어, 펌웨어, 소프트웨어, 및/또는 이들의 조합으로 실현될 수 있다. 이러한 다양한 구현예들은 프로그래밍 가능 시스템상에서 실행 가능한 하나 이상의 컴퓨터 프로그램들로 구현되는 것을 포함할 수 있다. 프로그래밍 가능 시스템은, 저장 시스템, 적어도 하나의 입력 디바이스, 그리고 적어도 하나의 출력 디바이스로부터 데이터 및 명령을 수신하고 이들에게 데이터 및 명령을 전송하도록 결합된 적어도 하나의 프로그래밍 가능 프로세서(이것은 특수 목적 프로세서일 수 있거나 혹은 범용 프로세서일 수 있음)를 포함한다. 컴퓨터 프로그램들(이것은 또한 프로그램들, 소프트웨어, 소프트웨어 애플리케이션들 혹은 코드로서 알려져 있음)은 프로그래밍 가능 프로세서에 대한 명령어들을 포함하며 "컴퓨터가 읽을 수 있는 기록매체"에 저장된다. Various implementations of storage, networks, processes, steps, etc. described in the specification may include digital electronic circuits, integrated circuits, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), computer hardware, It may be implemented in firmware, software, and/or a combination thereof. These various implementations may include being implemented in one or more computer programs executable on a programmable system. The programmable system includes at least one programmable processor (which may be a special purpose processor) coupled to receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device. or may be a general-purpose processor). Computer programs (also known as programs, software, software applications or code) contain instructions for a programmable processor and are stored on a "computer-readable recording medium".

컴퓨터가 읽을 수 있는 기록매체는, 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 이러한 컴퓨터가 읽을 수 있는 기록매체는 ROM, CD-ROM, 자기 테이프, 플로피디스크, 메모리 카드, 하드 디스크, 광자기 디스크, 스토리지 디바이스 등의 비휘발성(non-volatile) 또는 비 일시적인(non-transitory) 매체 또는 데이터 전송 매체(data transmission medium)와 같은 일시적인(transitory) 매체를 더 포함할 수도 있다. 또한, 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산 방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수도 있다.The computer-readable recording medium includes all types of recording devices in which data readable by a computer system is stored. These computer-readable recording media are non-volatile or non-transitory, such as ROM, CD-ROM, magnetic tape, floppy disk, memory card, hard disk, magneto-optical disk, and storage device. It may further include a medium or a transitory medium such as a data transmission medium. In addition, the computer-readable recording medium may be distributed in network-connected computer systems, and computer-readable codes may be stored and executed in a distributed manner.

본 명세서에 설명되는 시스템들 및 기법들의 다양한 구현예들은, 프로그램가능 컴퓨터에 의하여 구현될 수 있다. 여기서, 컴퓨터는 프로그램가능 프로세서, 데이터 저장 시스템(휘발성 메모리, 비휘발성 메모리, 또는 다른 종류의 저장 시스템이거나 이들의 조합을 포함함) 및 적어도 한 개의 커뮤니케이션 인터페이스를 포함한다. 예컨대, 프로그램가능 컴퓨터는 서버, 네트워크 기기, 셋톱박스, 내장형 장치, 컴퓨터 확장 모듈, 개인용 컴퓨터, 랩톱, PDA(Personal Data Assistant), 클라우드 컴퓨팅 시스템 또는 모바일 장치 중 하나일 수 있다.Various implementations of the systems and techniques described herein may be implemented by a programmable computer. Here, the computer includes a programmable processor, a data storage system (including volatile memory, non-volatile memory, or other types of storage systems or combinations thereof), and at least one communication interface. For example, the programmable computer may be one of a server, a network appliance, a set-top box, an embedded device, a computer expansion module, a personal computer, a laptop, a Personal Data Assistant (PDA), a cloud computing system, or a mobile device.

이상의 설명은 본 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 실시예들은 본 실시예의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of this embodiment, and a person skilled in the art to which this embodiment belongs may make various modifications and variations without departing from the essential characteristics of the present embodiment. Accordingly, the present embodiments are intended to explain rather than limit the technical spirit of the present embodiment, and the scope of the technical spirit of the present embodiment is not limited by these embodiments. The protection scope of this embodiment should be interpreted by the following claims, and all technical ideas within the scope equivalent thereto should be interpreted as being included in the scope of the present embodiment.

Claims (16)

외부 스토리지(external storage)를 이용한 스마트 계약(smart contract) 방법에 있어서,
블록체인 네트워크의 한 노드로부터 비밀키(secret key) 및 상기 거래대상을 입력받는 과정;
기 설정된 순서에 따라, 상기 비밀키를 기초로 n 개(n은 2 이상의 자연수)의 해시코드를 생성하고, 상기 거래대상을 n 개의 데이터로 분할하고, 분할된 데이터를 상기 기 설정된 순서의 역순으로 상기 해시코드를 기초로 암호화하여 n 개의 외부 스토리지(external storage) 각각에 저장하는 과정; 및
상기 해시코드 중 상기 기 설정된 순서에 따라 마지막으로 생성된 해시코드인 루트코드(root code) 및 상기 비밀키를 상기 블록체인 네트워크(blockchain network)의 분산원장(distributed ledger)에 등록하는 과정
을 포함하는 것을 특징으로 하는 스마트 계약방법.
In a smart contract method using external storage,
A process of receiving a secret key and the transaction target from one node of the block chain network;
According to a preset order, n hash codes (n is a natural number greater than or equal to 2) are generated based on the secret key, the transaction target is divided into n pieces of data, and the divided data is divided into the reverse order of the preset order. Encrypting based on the hash code and storing the n number of external storage (external storage) each; and
A process of registering a root code, which is a hash code last generated according to the preset order among the hash codes, and the secret key in a distributed ledger of the blockchain network
A smart contract method comprising a.
제1항에 있어서,
상기 루트코드는, 상기 분할된 데이터 중 상기 기 설정된 순서의 역순에 따라 마지막으로 분할된 데이터 및 상기 해시코드 중 상기 기 설정된 순서에 따라 마지막에서 두번째로 생성된 해시코드를 기 설정된 함수의 입력값으로 입력하여 획득되는 것을 특징으로 하는 스마트 계약방법.
According to claim 1,
The root code is the last divided data according to the reverse order of the preset order among the divided data and the hash code generated second from the last according to the preset order among the hash codes as an input value of a preset function. A smart contract method, characterized in that it is obtained by inputting it.
제1항에 있어서,
상기 외부 스토리지 각각에 저장하는 과정은,
상기 기 설정된 순서에 따라 제1 내지 제n 해시코드를 생성하되, 상기 비밀키를 기초로 상기 제1 해시코드를 생성하고, 각 해시코드보다 인덱스가 1 작은 해시코드를 기초로 상기 제2 내지 제n 해시코드를 생성하는 과정; 및
상기 기 설정된 순서에 따라 상기 거래대상을 제1 내지 제n 데이터로 분할하되, 분할된 데이터를 각 인덱스(index)에 대응하는 해시코드를 기초로 상기 기 설정된 순서의 역순으로 암호화하여 제n 내지 제1 암호값(encrypted value)을 차례로 생성하고, 생성된 암호값을 차례로 제n 내지 제1 외부 스토리지에 각각 저장하는 과정
을 포함하는 것을 특징으로 하는 스마트 계약방법.
According to claim 1,
The process of storing in each of the external storage is,
First to n-th hash codes are generated according to the preset order, the first hash codes are generated based on the secret key, and the second to n-th hash codes are generated based on a hash code having an index 1 smaller than each hash code. The process of generating n hash codes; and
The transaction target is divided into first to n-th data according to the preset order, and the divided data is encrypted in the reverse order of the preset order based on a hash code corresponding to each index to n-th to n-th data. 1 A process of sequentially generating an encrypted value, and sequentially storing the generated encrypted value in n-th to first external storage, respectively
A smart contract method comprising a.
제3항에 있어서,
상기 제1 해시코드는, 상기 제1 데이터 및 상기 비밀키를 기 설정된 함수의 입력값으로 입력하여 획득되고,
상기 제2 내지 제n 해시코드는, 각 인덱스에 대응하는 분할된 데이터 및 각 해시코드보다 인덱스가 1 작은 해시코드를 상기 기 설정된 함수의 입력값으로 입력하여 획득되는 것을 특징으로 하는 스마트 계약방법.
4. The method of claim 3,
The first hash code is obtained by inputting the first data and the secret key as input values of a preset function,
The second to nth hash codes are obtained by inputting divided data corresponding to each index and a hash code having an index smaller than that of each hash code by one as an input value of the preset function.
제3항에 있어서,
상기 외부 스토리지에 각각 저장하는 과정은,
제1 내지 제n 암호키(encrypt key)를 더 이용하여, 상기 제1 내지 제n 데이터를 각 인덱스에 대응하는 해시코드와 함께 각 인덱스에 대응하는 암호키를 이용하여 암호화함으로써 상기 제n 내지 제1 암호값을 생성하는 것을 특징으로 하는 스마트 계약방법.
4. The method of claim 3,
The process of storing each in the external storage is,
Further using the first to nth encryption keys (encrypt key), the nth to nth data by encrypting the first to nth data using an encryption key corresponding to each index together with a hash code corresponding to each index 1 A smart contract method characterized by generating a cryptographic value.
제5항에 있어서,
상기 제n 내지 제1 외부 스토리지에서 상기 제n 내지 제1 암호값을 참조하기 위한 각각의 위치값인 제n 내지 제1 위치값에 있어, 상기 제(n-1) 내지 제1 암호값은 각 암호값보다 인덱스가 1 큰 위치값을 더 암호화하여 생성되는 것을 특징으로 하는 스마트 계약방법.
6. The method of claim 5,
In the n-th to the first position value that is each position value for referring to the n-th to the first encryption value in the n-th to the first external storage, the (n-1) to the first encryption value is each A smart contract method, characterized in that it is generated by further encrypting a position value having an index 1 greater than the cryptographic value.
제6항에 있어서,
상기 제n 내지 제1 외부 스토리지는 각각 분산 해시테이블(distributed hash table)을 구성하는 각 노드이고,
상기 제n 내지 제1 위치값은 상기 제n 내지 제1 암호값이 저장된, 상기 분산 해시테이블의 각 노드를 참조하기 위한 해시키(hash key)인 것을 특징으로 하는 스마트 계약방법.
7. The method of claim 6,
The n-th to the first external storage is each node constituting a distributed hash table, respectively,
The n-th to the first location value is a hash key for referencing each node of the distributed hash table in which the n-th to the first cryptographic value is stored.
제6항에 있어서,
상기 블록체인 네트워크의 분산원장에 등록하는 과정은,
상기 블록체인 네트워크의 분산원장에 상기 제1 위치값 및 상기 제1 암호키를 더 등록하는 것을 특징으로 하는 스마트 계약방법.
7. The method of claim 6,
The process of registering in the distributed ledger of the blockchain network is,
A smart contract method, characterized in that the first location value and the first encryption key are further registered in the distributed ledger of the block chain network.
제8항에 있어서,
상기 제1 위치값 및 상기 제1 암호키의 등록은,
상기 제1 위치값 및 상기 비밀키를 16진수 연산하여 생성한 위치변조값 및 상기 제1 암호키 및 상기 비밀키를 16진수 연산하여 생성한 암호키변조값을 상기 블록체인 네트워크의 분산원장에 더 등록함으로써 수행되는 것을 특징으로 하는 스마트 계약방법.
9. The method of claim 8,
The registration of the first position value and the first encryption key,
The position modulation value generated by hexadecimal operation of the first position value and the secret key and the encryption key modulation value generated by hexadecimal operation of the first encryption key and the secret key are further added to the distributed ledger of the blockchain network A smart contract method, characterized in that it is performed by registering.
제9항에 있어서,
상기 블록체인 네트워크의 한 노드가 상기 스마트 계약의 거래조건을 성취하는 경우, 상기 거래조건을 성취한 노드에 상기 비밀키, 상기 위치변조값 및 상기 암호키변조값을 전달하는 과정
을 더 포함하는 것을 특징으로 하는 스마트 계약방법.
10. The method of claim 9,
When one node of the block chain network achieves the transaction condition of the smart contract, the process of transferring the secret key, the location modulation value, and the encryption key modulation value to the node that has achieved the transaction condition
A smart contract method further comprising a.
제10항에 있어서,
상기 위치변조값 및 상기 암호키변조값을 이용하여 상기 제n 내지 제1 암호값을 상기 기 설정된 순서에 따라 복호화하여 상기 거래대상을 획득하는 과정
을 더 포함하는 것을 특징으로 하는 스마트 계약방법.
11. The method of claim 10,
A process of obtaining the transaction target by decrypting the n-th to the first encryption value according to the preset order by using the position modulation value and the encryption key modulation value
A smart contract method further comprising a.
제11항에 있어서,
상기 거래대상을 획득하는 과정은,
상기 비밀키를 이용하여 상기 위치변조값 및 상기 암호키변조값으로부터 제1 위치값 및 제1 암호키를 각각 획득하는 과정; 및
획득된 제1 위치값 및 획득된 제1 암호키를 기초로 상기 제n 내지 제1 암호값을 상기 기 설정된 순서에 따라 복호화하고, 각 복호화 수행마다 무결성 검증을 수행하여 무결성이 검증된 거래대상을 획득하는 과정
을 포함하는 것을 특징으로 하는 스마트 계약방법.
12. The method of claim 11,
The process of acquiring the transaction target is
obtaining a first position value and a first encryption key from the position modulation value and the encryption key modulation value using the secret key, respectively; and
Based on the obtained first position value and the obtained first encryption key, the nth to first encryption values are decrypted according to the preset order, and integrity verification is performed for each decryption to obtain a transaction target whose integrity is verified. process of obtaining
A smart contract method comprising a.
제12항에 있어서,
상기 무결성이 검증된 거래대상을 획득하는 과정은,
상기 획득된 제1 위치값을 이용하여 제1 암호값을 획득하고, 상기 획득된 제1 암호키를 이용하여 획득된 제1 암호값을 복호화하여 제1 데이터, 제1 해시코드, 제2 위치값 및 제2 암호키를 획득하고, 획득된 제1 데이터 및 상기 비밀키를 상기 기 설정된 함수의 입력값으로 입력하여 생성된 값과 획득된 제1 해시코드를 비교함으로써 상기 제1 데이터의 무결성 검증을 수행하는 것을 특징으로 하는 스마트 계약방법.
13. The method of claim 12,
The process of acquiring the transaction target for which the integrity has been verified,
A first encryption value is obtained using the obtained first location value, and the obtained first encryption value is decrypted using the obtained first encryption key to obtain first data, a first hash code, and a second location value. and obtaining a second encryption key, inputting the obtained first data and the secret key as an input value of the preset function, and comparing the obtained first hash code with a value generated to verify the integrity of the first data A smart contract method characterized in that it is performed.
제13항에 있어서,
상기 무결성이 검증된 거래대상을 획득하는 과정은,
제i 위치값(1< i <n, i는 자연수), 제i 암호키, 제i 암호값에 대해서는, 상기 제i 위치값을 이용하여 획득된 제i 암호값을 획득하고, 상기 제i 암호키를 이용하여 상기 제i 암호값을 복호하여 제i 데이터, 제i 해시코드, 제(i+1) 위치값 및 제(i+1) 암호키를 획득하고, 획득된 제i 데이터 및 획득된 제(i-1) 해시코드를 상기 기 설정된 함수의 입력값으로 입력하여 생성된 값을 획득된 제i 해시코드를 비교함으로써 무결성 검증을 수행하는 것을 특징으로 하는 스마트 계약방법.
14. The method of claim 13,
The process of acquiring the transaction target for which the integrity has been verified,
With respect to the ith position value (1< i < n, i is a natural number), the ith encryption key, and the ith encryption value, the ith encryption value obtained using the ith position value is obtained, and the ith encryption value is obtained. The i-th encryption value is decrypted using the key to obtain the i-th data, the i-th hash code, the (i+1)-th position value, and the (i+1)-th encryption key, and the obtained i-th data and the obtained A smart contract method, characterized in that integrity verification is performed by comparing an i-th hash code obtained by inputting a (i-1)-th hash code as an input value of the preset function and a value generated.
제14항에 있어서,
상기 무결성이 검증된 거래대상을 획득하는 과정은,
획득된 제n 위치값을 이용하여 상기 제n 암호값을 획득하고, 획득된 제n 암호키를 이용하여 획득된 제n 암호값을 복호화하여 제n 데이터, 제n 해시코드를 획득하고, 획득된 제n 데이터 및 획득된 제(n-1) 해시코드를 상기 기 설정된 함수의 입력값으로 입력하여 생성된 값과 획득된 제n 해시코드를 비교함으로써 무결성 검증을 수행하는 것을 특징으로 하는 스마트 계약방법.
15. The method of claim 14,
The process of acquiring the transaction target for which the integrity has been verified,
The n-th encryption value is obtained by using the obtained n-th position value, and the obtained n-th encryption value is decrypted using the obtained n-th encryption key to obtain n-th data and an n-th hash code. A smart contract method, characterized in that integrity verification is performed by comparing the value generated by inputting the n-th data and the obtained (n-1)-th hash code as an input value of the preset function with the obtained n-th hash code .
제14항에 있어서,
상기 루트코드와 상기 획득된 제n 해시코드를 기초로 거래 전체의 무결성을 검증하고, 상기 획득된 제n 해시코드를 상기 블록체인 네트워크의 분산원장에 추가하는 과정
을 더 포함하는 것을 특징으로 하는 스마트 계약방법.
15. The method of claim 14,
The process of verifying the integrity of the entire transaction based on the root code and the obtained n-th hash code, and adding the obtained n-th hash code to the distributed ledger of the blockchain network
A smart contract method further comprising a.
KR1020200168660A 2020-12-04 2020-12-04 Smart Contract System Using External Storage Based on Blockchain And Method Therefor KR102484453B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200168660A KR102484453B1 (en) 2020-12-04 2020-12-04 Smart Contract System Using External Storage Based on Blockchain And Method Therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200168660A KR102484453B1 (en) 2020-12-04 2020-12-04 Smart Contract System Using External Storage Based on Blockchain And Method Therefor

Publications (2)

Publication Number Publication Date
KR20220079751A true KR20220079751A (en) 2022-06-14
KR102484453B1 KR102484453B1 (en) 2023-01-03

Family

ID=81980585

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200168660A KR102484453B1 (en) 2020-12-04 2020-12-04 Smart Contract System Using External Storage Based on Blockchain And Method Therefor

Country Status (1)

Country Link
KR (1) KR102484453B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116467754A (en) * 2023-06-20 2023-07-21 深圳奥联信息安全技术有限公司 Password secure storage system, password secure storage method, computer equipment and storage medium
KR102638798B1 (en) * 2023-09-11 2024-02-21 주식회사 페어스퀘어랩 Method and system for managing wallets on blockchain networks

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190089506A (en) * 2018-01-23 2019-07-31 박동화 System and method for e-contract with shared and distributed ledger coupled with outer storage devices
KR20200064663A (en) * 2018-11-29 2020-06-08 (주)코리아트리즈 method and system of smart electronic contracting based on block chain
KR20200127643A (en) * 2019-05-03 2020-11-11 주식회사 바스랩 Method and Apparatus for Distributed Processing of Data for Document Management

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190089506A (en) * 2018-01-23 2019-07-31 박동화 System and method for e-contract with shared and distributed ledger coupled with outer storage devices
KR20200064663A (en) * 2018-11-29 2020-06-08 (주)코리아트리즈 method and system of smart electronic contracting based on block chain
KR20200127643A (en) * 2019-05-03 2020-11-11 주식회사 바스랩 Method and Apparatus for Distributed Processing of Data for Document Management

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116467754A (en) * 2023-06-20 2023-07-21 深圳奥联信息安全技术有限公司 Password secure storage system, password secure storage method, computer equipment and storage medium
CN116467754B (en) * 2023-06-20 2023-10-10 深圳奥联信息安全技术有限公司 Password secure storage system, password secure storage method, computer equipment and storage medium
KR102638798B1 (en) * 2023-09-11 2024-02-21 주식회사 페어스퀘어랩 Method and system for managing wallets on blockchain networks

Also Published As

Publication number Publication date
KR102484453B1 (en) 2023-01-03

Similar Documents

Publication Publication Date Title
US11449641B2 (en) Integrity of communications between blockchain networks and external data sources
JP7181539B2 (en) METHOD AND APPARATUS FOR MANAGING USER IDENTIFICATION AND AUTHENTICATION DATA
CN108830600B (en) Block chain-based electronic invoice system and implementation method
US9672514B2 (en) Systems and methods for conducting transactions and communications using a trusted third party
US8799981B2 (en) Privacy protection system
US20200320178A1 (en) Digital rights management authorization token pairing
CN111292041B (en) Electronic contract generation method, device, equipment and storage medium
US10880100B2 (en) Apparatus and method for certificate enrollment
CN112131316A (en) Data processing method and device applied to block chain system
US20180006823A1 (en) Multi-hop secure content routing based on cryptographic partial blind signatures and embedded terms
CN115203749B (en) Data transaction method and system based on block chain
US20220014354A1 (en) Systems, methods and devices for provision of a secret
US11997075B1 (en) Signcrypted envelope message
CN115567312B (en) Alliance chain data authority management system and method capable of meeting various scenes
KR20220079751A (en) Smart Contract System Using External Storage Based on Blockchain And Method Therefor
US20230299975A1 (en) Time-based digital signature
Ghanmi et al. A secure data storage in multi-cloud architecture using blowfish encryption algorithm
CN110827034B (en) Method and apparatus for initiating a blockchain transaction
CN112671543A (en) Public verifiable outsourcing attribute-based encryption method based on block chain
RU2707398C1 (en) Method and system for secure storage of information in file storages of data
US12047496B1 (en) Noncustodial techniques for granular encryption and decryption
WO2023235199A1 (en) A system for managing distributed digital rights
KR20230020086A (en) File distribution system using blockchain and distributed encryption
AU2022200415A1 (en) User verification systems and methods
CN118473791A (en) Streaming media privacy protection and sharing method and system, camera and cloud server

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