KR102354044B1 - The method of recovering private key using mnemonic code - Google Patents

The method of recovering private key using mnemonic code Download PDF

Info

Publication number
KR102354044B1
KR102354044B1 KR1020200092451A KR20200092451A KR102354044B1 KR 102354044 B1 KR102354044 B1 KR 102354044B1 KR 1020200092451 A KR1020200092451 A KR 1020200092451A KR 20200092451 A KR20200092451 A KR 20200092451A KR 102354044 B1 KR102354044 B1 KR 102354044B1
Authority
KR
South Korea
Prior art keywords
user node
server
private key
generated
key
Prior art date
Application number
KR1020200092451A
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 KR1020200092451A priority Critical patent/KR102354044B1/en
Application granted granted Critical
Publication of KR102354044B1 publication Critical patent/KR102354044B1/en

Links

Images

Classifications

    • 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/0894Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
    • 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
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
    • 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
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • H04L2209/38

Abstract

Provided is a method for recovering a private key using a mnemonic code executed in a computing device. The method of the present invention comprises: a first step of generating 18 mnemonic codes and a master seed using a password set by a user in a user node; a second step of generating a wallet using the master seed generated in the first step and a PIN code set in the user node; a third step of transmitting a public key of the wallet generated in the second step and an account name of the user node to a server; a fourth step of generating, by the server, an electronic signature using the account name transmitted from the user node and a private key of the server; a fifth step of randomly generating, by the server, a salt to generate a secrete key of the user node with an electronic signature generated in the fourth step, and then transmitting the secrete key to the user node; a sixth step of encrypting, by the user node, the mnemonic codes generated in the first step through the secret key transmitted in the fifth step, and transmitting the same to the server; and a seventh step of storing, by the server, the account name transmitted in the fourth step, the salt generated in the fifth step, and the encrypted mnemonic codes transmitted in the sixth step in a database. Therefore, a decentralized private key recovery system with enhanced security can be implemented.

Description

니모닉 코드를 이용한 개인키 복구 방법{The method of recovering private key using mnemonic code}The method of recovering private key using mnemonic code}

본 발명은 니모닉 코드를 이용한 개인키 복구 방법에 관한 것이다. 더욱 상세하게는, 탈중앙화된 개인키 복구 서비스를 통해 보안성을 강화하고, 유저만 알 수 있는 비밀번호와 PIN CODE를 이용하여 개인키 복구를 수행함으로써 보안성을 더욱 강화할 수 있는 니모닉 코드를 이용한 개인키 복구 방법에 관한 것이다. The present invention relates to a private key recovery method using a mnemonic code. More specifically, individuals using a mnemonic code that can enhance security through a decentralized private key recovery service and further strengthen security by performing private key recovery using a password and PIN CODE that only the user can know It relates to a key recovery method.

블록체인(Block Chain)은 네트워크에 참여하는 모든 사용자가 관리 대상이 되는 모든 데이터를 분산하여 저장하는 데이터 분산처리기술을 의미한다. 거래 정보가 담긴 원장(原帳)을 거래 주체나 특정 기관에서 보유하는 것이 아니라 네트워크 참여자 모두가 나누어 가지는 기술이라는 점에서 '분산원장기술(DLT:Distributed Ledger Technology)' 또는 '공공거래장부'라고도 한다. 블록체인은 거래 내용이 담긴 블록(Block)을 사슬처럼 연결(chain)한 것이라 하여 붙여진 명칭이다. 이러한 블록체인은 거래 내용의 위변조와 같은 해킹을 막기 위한 기술이며, 거래에 참여하는 모든 사용자에게 거래 내역을 보내 주며 거래 때마다 이를 대조해 데이터 위조를 막는 방식을 사용한다. Block chain refers to a data distribution processing technology in which all users participating in the network distribute and store all data to be managed. It is also called 'Distributed Ledger Technology (DLT)' or 'Public Transaction Ledger' in that the ledger containing transaction information is not owned by the transaction subject or a specific institution, but is a technology shared by all network participants. . Blockchain is a name given to the fact that blocks containing transaction contents are linked like a chain. This block chain is a technology to prevent hacking, such as forgery or forgery of transaction contents, and it sends transaction details to all users participating in the transaction and uses a method to prevent data forgery by comparing it with each transaction.

블록체인은 금융기관에서 모든 거래를 담보하고 관리하는 기존의 금융 시스템에서 벗어나 P2P(Peer to Peer;개인 대 개인) 거래를 지향하는, 탈(脫)중앙화를 핵심 개념으로 한다. P2P란 서버나 클라이언트 없이 개인 컴퓨터 사이를 연결하는 통신망을 말하며, 연결된 각각의 컴퓨터가 서버이자 클라이언트 역할을 하며 정보를 공유하는 방식이다. 다수의 노드가 같은 데이터를 공유하고 검증하는 방식을 통해 디지털 상에 신뢰관계를 형성하게 된다. 이러한 환경은 중개자 없이 P2P로 편리하게 계약을 체결하고 수정할 수 있는 스마트 컨트랙트를 실현 가능하게 한다.The core concept of blockchain is decentralization, which aims for P2P (Peer to Peer) transactions, away from the existing financial system that secures and manages all transactions in financial institutions. P2P refers to a communication network that connects personal computers without a server or client, and each connected computer acts as a server and client and shares information. By sharing and verifying the same data by multiple nodes, a trust relationship is formed in the digital world. This environment makes it possible to realize smart contracts that can conveniently conclude and modify contracts with P2P without intermediaries.

기존 금융 시스템에서는 금융회사들이 중앙 서버에 거래 기록을 보관해 온 반면, P2P 방식을 기반으로 하는 블록체인에서는 거래 정보를 블록에 담아 차례대로 연결하고 이를 모든 참여자가 공유한다.In the existing financial system, financial companies have kept transaction records on a central server, whereas in a blockchain based on the P2P method, transaction information is stored in blocks, connected in turn, and shared by all participants.

그리고, 블록체인 상의 모든 거래 정보가 블록에 기록되기 위해서는 유효한 서명이 있어야 하고, 이러한 서명은 유효한 디지털 키에 의해 수행된다. 디지털 키는 개인키(private key)와 공개키(public key) 쌍으로 구성되는데, 공개키는 은행의 계좌번호 역할을 하고, 개인키는 계좌의 비밀번호 역할을 한다. 따라서, 개인키 관리는 중요한 문제이며, 개인키의 분실 시 문제가 발생할 가능성이 있기 때문에 높은 주의를 요구한다. 그러나, 개인키를 분실하는 경우 복구가 상당히 어렵거나 불가능하여 해당 디지털 자산에 대한 권리를 상실하게 된다. 이에 따라, 본 발명에서는 분실한 개인키를 복구하고 다시 생성하기 위한 방법을 제안한다. And, in order for all transaction information on the block chain to be recorded in a block, a valid signature is required, and this signature is performed by a valid digital key. A digital key consists of a pair of a private key and a public key. The public key serves as a bank account number, and the private key serves as a password for the account. Therefore, private key management is an important issue, and high attention is required because there is a possibility that a problem may occur when the private key is lost. However, if the private key is lost, recovery is quite difficult or impossible, resulting in loss of the rights to the corresponding digital asset. Accordingly, the present invention proposes a method for recovering and regenerating a lost private key.

한국 등록특허 10-1857223 (공고일자 2018년 5월 11일)Korean Patent Registration 10-1857223 (Announcement Date May 11, 2018)

본 발명이 해결하고자 하는 기술적 과제는, 블록체인 네트워크 내에서 거래 정보 기록을 위해 이용하는 디지털 키인 개인키를 분실하는 경우를 대비하여, 니모닉 코드를 이용하여 랜덤하게 생성된 마스터 시드와, 유저만 알 수 있는 비밀번호와 PIN CODE를 이용하여 개인키를 복구함으로써 보안성이 강화된 니모닉 코드를 이용한 개인키 복구 방법을 제공하는 것이다. The technical problem to be solved by the present invention is a master seed randomly generated using a mnemonic code in case the private key, which is a digital key used for recording transaction information in the block chain network, is lost, and only the user can know. It is to provide a private key recovery method using a mnemonic code with enhanced security by recovering the private key using the existing password and PIN CODE.

다만, 본 발명이 해결하고자 하는 기술적 과제들은 상기 과제들로 한정되는 것이 아니며, 본 발명의 기술적 사상 및 영역으로부터 벗어나지 않는 범위에서 다양하게 확장될 수 있다. However, the technical problems to be solved by the present invention are not limited to the above problems, and may be variously expanded without departing from the technical spirit and scope of the present invention.

상기 과제를 해결하기 위한 본 발명의 실시예에 따른 니모닉 코드를 이용한 개인키 복구 방법은, 컴퓨팅 장치에서 실행되는 방법으로서, 사용자 노드에서 사용자가 설정한 비밀번호를 이용하여 18개의 니모닉 코드와 마스터 시드를 생성하는 제1 단계, 상기 제1 단계에서 생성한 마스터 시드와 상기 사용자 노드에서 설정한 핀 코드(PIN CODE)를 이용하여 지갑을 생성하는 제2 단계, 상기 제2 단계에서 생성한 지갑의 공개키와 상기 사용자 노드의 계정 이름을 서버로 전송하는 제3 단계, 상기 서버는 상기 사용자 노드로부터 전송받은 계정 이름과 상기 서버의 개인키를 이용하여 전자서명을 생성하는 제4 단계, 상기 서버는 랜덤하게 솔트를 생성하여 상기 제4 단계에서 생성한 전자서명과 함께 상기 사용자 노드의 비밀키를 생성한 후 상기 사용자 노드로 상기 비밀키를 전송하는 제5 단계, 상기 사용자 노드는 상기 제5 단계에서 전송받은 상기 비밀키를 통해 상기 제1 단계에서 생성한 상기 니모닉 코드를 암호화하여 상기 서버로 전송하는 제6 단계, 및 상기 서버는 상기 제4 단계에서 전송받은 계정 이름과 상기 제5 단계에서 생성한 솔트와 상기 제6 단계에서 전송받은 암호화된 니모닉 코드를 데이터베이스에 저장하는 제7 단계를 포함한다. The private key recovery method using a mnemonic code according to an embodiment of the present invention for solving the above problems is a method executed in a computing device, and 18 mnemonic codes and a master seed are obtained using a password set by a user in a user node. The first step of generating, the second step of creating a wallet using the master seed generated in the first step and the PIN CODE set in the user node, the public key of the wallet created in the second step and a third step of transmitting the account name of the user node to a server, a fourth step of the server generating an electronic signature using the account name transmitted from the user node and the private key of the server, the server randomly A fifth step of generating a salt and generating the secret key of the user node together with the digital signature generated in the fourth step, and transmitting the secret key to the user node, the user node receiving the A sixth step of encrypting the mnemonic code generated in the first step through the secret key and transmitting it to the server, and the server includes the account name transmitted in the fourth step and the salt generated in the fifth step and a seventh step of storing the encrypted mnemonic code received in the sixth step in a database.

상기 과제를 해결하기 위한 본 발명의 실시예에 따른 니모닉 코드를 이용한 개인키 복구 방법은, 상기 제7 단계 이후, 상기 사용자 노드는 상기 서버에게 본인인증을 위한 인증서와 함께 암호화된 니모닉 코드와 비밀키를 요청하는 제8 단계, 상기 서버는 상기 사용자 노드가 전송한 인증서를 검증한 후 상기 인증서가 유효하면 상기 데이터베이스에 저장된 상기 사용자 노드의 데이터를 읽는 제9 단계, 상기 서버는 상기 데이터베이스에 저장된 계정 이름과 상기 서버의 개인키를 통해 전자서명을 생성하는 제10 단계, 상기 서버는 상기 제10 단계에서 생성한 전자서명과 상기 데이터베이스에 저장된 솔트를 이용하여 상기 사용자 노드의 상기 비밀키를 복구하는 제11 단계, 상기 서버는 상기 데이터베이스에 저장된 암호화된 니모닉 코드와 상기 제11 단계에서 복구된 상기 사용자 노드의 비밀키를 상기 사용자 노드로 전송하는 제12 단계, 상기 사용자 노드는 상기 제12 단계에서 전송받은 상기 사용자 노드의 비밀키를 통해 상기 니모닉 코드를 복호화하고, 이전에 설정한 사용자 노드의 비밀번호를 통해 마스터 시드를 복구하는 제13 단계, 및 상기 사용자 노드는 이전에 설정한 핀 코드(PIN CODE)와 상기 제13 단계 복구된 마스터 시드를 통해 지갑을 복구하는 제14 단계를 포함한다. In the private key recovery method using a mnemonic code according to an embodiment of the present invention for solving the above problems, after the seventh step, the user node sends the encrypted mnemonic code and the secret key together with the certificate for self-authentication to the server Eighth step of requesting, the server verifies the certificate transmitted by the user node, and if the certificate is valid, a ninth step of reading the data of the user node stored in the database, the server is the account name stored in the database and a tenth step of generating an electronic signature through the private key of the server, an eleventh step of the server recovering the private key of the user node using the digital signature generated in the tenth step and the salt stored in the database step, the server transmits the encrypted mnemonic code stored in the database and the secret key of the user node recovered in step 11 to the user node, a 12th step, wherein the user node receives the A thirteenth step of decrypting the mnemonic code through the secret key of the user node, and recovering the master seed through the previously set password of the user node, and the user node using the previously set PIN CODE and the Step 13 A 14th step of restoring the wallet through the restored master seed is included.

본 발명의 기타 구체적인 사항들은 상세한 설명 및 도면들에 포함되어 있다.Other specific details of the invention are included in the detailed description and drawings.

본 발명에 따르면, 블록체인 네트워크 내에서 거래 정보 기록을 위해 이용하는 개인키를 분실하더라도 복구가 가능하며, 개인키 분실에 따른 유/무형 자산에 대한 권리를 상실하게 될 염려를 줄일 수 있다. According to the present invention, even if the private key used for recording transaction information in the block chain network is lost, it can be recovered, and the fear of losing the right to tangible/intangible assets due to the loss of the private key can be reduced.

또한, 본 발명에 따르면, 유저만 알 수 있는 비밀번호와 PIN CODE를 이용하여 개인키 복구를 수행함으로써 보안성이 강화된 탈중앙화 개인키 복구 시스템을 구현할 수 있다. In addition, according to the present invention, it is possible to implement a decentralized private key recovery system with enhanced security by performing private key recovery using a password and PIN CODE that only the user can know.

다만, 본 발명의 효과는 상기 효과들로 한정되는 것이 아니며, 본 발명의 기술적 사상 및 영역으로부터 벗어나지 않는 범위에서 다양하게 확장될 수 있다. However, the effects of the present invention are not limited to the above effects, and may be variously expanded without departing from the spirit and scope of the present invention.

도 1은 BIP39에 따른 니모닉 코드 생성 및 마스터 시드 생성과정을 설명하기 위한 도면이다.
도 2는 BIP44에 따른 지갑 생성시 입력값에 대한 프로토콜을 설명하기 위한 도면이다.
도 3은 본 발명에 따른 기술적 사상이 적용될 수 있는 블록체인을 이용한 분산처리 시스템을 도시한 도면이다.
도 4 및 도 5는 블록체인 시스템에서 이용되는 블록의 연결을 도시한 블록도이다.
도 6은 본 발명의 실시예에 따른 개인키 생성 및 니모닉 코드를 백업하는 과정을 도시한 도면이다.
도 7은 본 발명의 실시예에 따른 개인키 복원 과정을 도시한 도면이다.
도 8은 본 발명의 실시예에 따른 니모닉 코드를 이용한 개인키 복구 방법을 순차적으로 도시한 흐름도이다.
도 9는 본 발명의 실시예에 따른 노드의 컴퓨팅 장치의 구성도이다.
1 is a diagram for explaining a process of generating a mnemonic code and generating a master seed according to BIP39.
2 is a diagram for explaining a protocol for an input value when creating a wallet according to BIP44.
3 is a diagram illustrating a distributed processing system using a block chain to which the technical idea according to the present invention can be applied.
4 and 5 are block diagrams illustrating the connection of blocks used in a block chain system.
6 is a diagram illustrating a process of generating a private key and backing up a mnemonic code according to an embodiment of the present invention.
7 is a diagram illustrating a private key restoration process according to an embodiment of the present invention.
8 is a flowchart sequentially illustrating a private key recovery method using a mnemonic code according to an embodiment of the present invention.
9 is a block diagram of a computing device of a node according to an embodiment of the present invention.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나, 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 것이며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. Advantages and features of the present invention and methods of achieving them will become apparent with reference to the embodiments described below in detail in conjunction with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but will be embodied in various different forms, and only these embodiments allow the disclosure of the present invention to be complete, and common knowledge in the art to which the present invention pertains It is provided to fully inform those who have the scope of the invention, and the present invention is only defined by the scope of the claims.

본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며, 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 및/또는 "포함하는(comprising)"은 언급된 구성요소, 단계, 동작 및/또는 소자는 하나 이상의 다른 구성요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다.The terminology used herein is for the purpose of describing the embodiments, and is not intended to limit the present invention. In this specification, the singular also includes the plural unless specifically stated otherwise in the phrase. As used herein, "comprises" and/or "comprising" refers to the presence of one or more other components, steps, operations and/or elements mentioned. or addition is not excluded.

다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어(기술 및 과학적 용어를 포함)는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있을 것이다. 또한, 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다.Unless otherwise defined, all terms (including technical and scientific terms) used herein may be used with the meaning commonly understood by those of ordinary skill in the art to which the present invention belongs. In addition, terms defined in a commonly used dictionary are not to be interpreted ideally or excessively unless specifically defined explicitly.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예들을 보다 상세하게 설명하고자 한다. 도면 상의 동일한 구성요소에 대해서는 동일한 참조 부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. The same reference numerals are used for the same components in the drawings, and repeated descriptions of the same components are omitted.

BIP는 "Bitcoin Improvement Proposals"의 약자로서, 비트코인 기능개선을 위한 제안을 담은 문서이다. 비트코인이 공식적인 구조를 가지고 있지 않기 때문에 아이디어를 전달하는 표준방식이다. 즉, BIP는 비트코인의 기술을 논의하기 위해 작성하거나 공개된 제안 양식이다. BIP is an abbreviation of "Bitcoin Improvement Proposals," and is a document containing proposals for improving Bitcoin functions. Since Bitcoin has no formal structure, it is a standard way of conveying ideas. In other words, a BIP is a form of proposal written or published to discuss the technology of Bitcoin.

BIP의 유형과 관련해서는 ① 표준 트랙 BIP로서, 비트코인 네트워크 프로토콜, 블록 또는 트랜잭션 유효성 검사에 적합한 BIP이다. 이러한 유형의 BIP는 비트코인의 기본 기술의 핵심이다. ② 정보 BIP는 주로 디자인 및 일반 지침과 같은 문제를 중심으로 한다. 즉, 솔루션 확장, 블록 변경 또는 해싱 프로토콜 변경과 같은 사안에 대한 제안이다. ③ 프로세스 BIP는 비트코인 프로세스에 대한 제안 변경이다. 프로세스 BIP는 표준 트랙 BIP와 유사하나, 프로세스 BIP는 비트코인 프로토콜 외부에서만 적용된다는 차이점이 있다. Regarding the type of BIP: ① As a standard track BIP, it is a BIP suitable for Bitcoin network protocol, block or transaction validation. This type of BIP is at the heart of the underlying technology of Bitcoin. ② Information BIP mainly focuses on issues such as design and general guidelines. That is, it is a proposal for issues such as extending a solution, changing a block, or changing a hashing protocol. ③ Process BIP is a proposed change to the Bitcoin process. Process BIP is similar to standard track BIP, with the difference that process BIP applies only outside the Bitcoin protocol.

BIP의 종류와 관련하여, BIP32는 정보 BIP로서, HD 지갑(Hierarchical Deterministic Wallet)의 일반적인 형식과 HD 지갑을 구축하는 방법을 설명한 문서이다. 또한, BIP39는 표준 트랙 BIP로서, 니모닉 코드(Mnemonic Code)를 만들어서 HD지갑을 쉽게 복구하는 방법을 설명한 문서이다. 또한, BIP44는 표준 트랙 BIP로서, 미리 정의된 다섯 가지 트리 레벨의 구조로 다중화폐 및 다중계정 구조를 제안하는 문서이다. 본 발명은 상술한 BIP들을 활용하여 개인키 관리 및 복구 서비스를 제공하는 KMS(Key Management Service) 시스템을 제안한다.Regarding the type of BIP, BIP32 is an information BIP, a document that describes the general format of an HD wallet (Hierarchical Deterministic Wallet) and how to build an HD wallet. In addition, BIP39 is a standard track BIP, a document explaining how to easily recover an HD wallet by creating a mnemonic code. In addition, BIP44 is a standard track BIP, a document that proposes a multi-currency and multi-account structure with five predefined tree-level structures. The present invention proposes a KMS (Key Management Service) system that provides a private key management and recovery service by utilizing the above-described BIPs.

도 1은 BIP39에 따른 니모닉 코드 생성 및 마스터 시드 생성과정을 설명하기 위한 도면이다. 도 2는 BIP44에 따른 지갑 생성시 입력값에 대한 프로토콜을 설명하기 위한 도면이다. 1 is a diagram for explaining a process of generating a mnemonic code and generating a master seed according to BIP39. 2 is a diagram for explaining a protocol for an input value when creating a wallet according to BIP44.

상기 BIP들에 대해 구체적으로 설명하면, (1) BIP39는 니모닉 코드를 생성하고, 마스터 시드를 생성한다. In detail with respect to the BIPs, (1) BIP39 generates a mnemonic code and a master seed.

① 니모닉 코드의 생성과정은, 랜덤하게 0과 1로 이루어진 192비트 시퀀스를 생성한다. 생성된 시퀀스를 SHA-256 해쉬함수를 통해 해쉬 값을 생성한다. 생성된 해쉬값의 앞에서부터 6비트를 앞에서 생성한 시퀀스 뒤에 이어 붙인다. 총 198비트의 시퀀스가 생성되고 이 시퀀스를 앞에서부터 11비트씩 나눈다. 각각 나눈 시퀀스들을 미리 정의된 워드리스트 테이블에 매핑시켜 18개의 단어를 생성한다.① The mnemonic code generation process randomly generates a 192-bit sequence consisting of 0's and 1's. The generated sequence generates a hash value through the SHA-256 hash function. 6 bits from the front of the generated hash value are concatenated after the previously generated sequence. A total sequence of 198 bits is generated, and the sequence is divided by 11 bits from the front. 18 words are created by mapping each divided sequence to a predefined word list table.

이때, 상기 테이블은 00000000000 ~ 11111111111의 비트를 인덱스로 하여 각각 다른 단어들로 맵핑 되어있다. 예를 들어, 4비트의 시퀀스에서 앞에서 2비트씩 나누었을 경우 시퀀스가 0010이라면 매핑 테이블은 < 00 - abandon, 01 - ability, 10 - army, 11 - zoo >이고, 결과값은 abandon, army가 된다(도 1 참조). In this case, the table is mapped to different words using bits of 00000000000 to 11111111111 as indexes. For example, in a 4-bit sequence, if the sequence is 0010, the mapping table is < 00 - abandon, 01 - ability, 10 - army, 11 - zoo >, and the result is abandon, army (See Fig. 1).

② 마스터 시드의 생성 과정은, 앞에서 생성된 니모닉 코드와 솔트로 HMAC-SHA512 해쉬함수를 2048번 실행하여 512비트의 마스터 시드를 생성한다. 여기에서 솔트의 값은 mnemonic + (암호문)으로 사용한다. 본 발명은 암호문을 사용자의 비밀번호로 대체하는 것을 특징으로 한다. ② The master seed generation process creates a 512-bit master seed by executing the HMAC-SHA512 hash function 2048 times with the previously generated mnemonic code and salt. Here, the salt value is used as mnemonic + (ciphertext). The present invention is characterized in that the encrypted text is replaced with the user's password.

(2) BIP32는 지갑 생성 과정을 나타낸다. 지갑 생성 과정은 우선, CKD(Child Key Derivation) 함수를 재귀적으로 5번 사용하여 지갑 주소를 생성한다. CKD 함수는 두 개의 입력값을 받으며, 첫 번째 입력값은 부모키 값이고, 두 번째 입력값은 0과 232-1사이의 임의의 수이다. (2) BIP32 represents the wallet creation process. In the wallet creation process, first, the CKD (Child Key Derivation) function is used recursively 5 times to generate a wallet address. The CKD function takes two input values, the first input value is the parent key value, and the second input value is a random number between 0 and 2 32 -1.

CKD함수는 결과값으로 자식키를 생성한다. CKD(m,3) = b, CKD(b,5) = c 일 때 CKD(CKD(m,3),5)라고 쓸 수 있고 이것을 간편하게 m/3/5 라고 쓴다. 재귀적이란 이전 CKD의 결과값을 다음 CKD함수의 첫 번째 입력값으로 삽입하는 것이다. 더욱 구체적으로, 5번 중 첫 번째 수행에서 입력값으로 마스터 시드를 입력하고 결과값으로 마스터 개인키가 생성된다. 마스터 개인키를 통해 마스터 공개키를 생성한다. 이후 함수에는 두 키 페어를 각각 CKD 함수의 입력값으로 넣어 자식 개인키와 자식 공개키 쌍을 생성한다.The CKD function creates a child key with the result value. When CKD(m,3) = b, CKD(b,5) = c, CKD(CKD(m,3),5) can be written, and it is simply written as m/3/5. Recursive means inserting the result of the previous CKD as the first input of the next CKD function. More specifically, in the first execution of number 5, the master seed is input as an input value, and a master private key is generated as a result value. The master public key is generated from the master private key. Afterwards, the two key pairs are put as input values of the CKD function, respectively, to generate a child private key and a child public key pair.

(3) BIP44는 지갑 생성시 입력값에 대한 프로토콜이다. 상기 BIP32에서 지갑 주소를 생성할 때 입력값을 정의해 놓은 것이다. BIP44의 구조는 m / 목적 / 코인 종류 / 계정 / 잔액 주소 여부 / 사용 가능한 주소 인덱스이며, m은 시드값이고, 목적은 BIP44에 의해 44로 고정한다. 코인 종류는 암호화폐의 유형을 지정하며, SLIP0044라는 표준 문서에 여러 암호화폐가 정의되어 있다. 본 발명은 이더리움 기반으로 60으로 사용한다. 계정에는 일반적으로 계정을 식별할 수 있는 값이 들어간다. 본 발명은 이 항목에 사용자 노드의 PIN CODE를 사용한다. 잔액 주소 여부는 비트코인을 제외한 모든 블록체인은 일반적으로 0을 사용한다. 주소 인덱스는 0 과 232-1사이의 임의의 수로 i번째 지갑 주소를 의미한다.(3) BIP44 is a protocol for input values when creating a wallet. The input value is defined when creating a wallet address in BIP32. The structure of BIP44 is m / purpose / coin type / account / balance address / usable address index, m is the seed value, and the purpose is fixed to 44 by BIP44. Coin type specifies the type of cryptocurrency, and several cryptocurrencies are defined in a standard document called SLIP0044. The present invention uses 60 based on Ethereum. An account usually contains a value that can identify the account. The present invention uses the PIN CODE of the user node for this item. For the balance address, all blockchains except Bitcoin generally use 0. The address index is a random number between 0 and 2 32 -1 and means the i-th wallet address.

블록체인 기술에 있어서 유저의 개인키 관리 이슈는 대단히 중요하다. 하지만, 탈중앙성을 해치지 않으면서 유저의 개인키를 복구하는 것은 매우 어렵다. 따라서, 본 발명은 탈중앙화와 중앙화 사이의 효율적인 절충안을 택하여 개인키 복구 서비스를 제공한다.In blockchain technology, the user's private key management issue is very important. However, it is very difficult to recover a user's private key without compromising decentralization. Accordingly, the present invention provides a private key recovery service by taking an efficient compromise between decentralization and centralization.

먼저, 기존의 개인키 복구 서비스의 경우 유저의 개인키를 특정 키로 암호화하여 서버에 저장하여 복구해주는 프로세스를 이용한다. 이때, 개인키를 암호화하는 특정 키는 어떻게 관리되는 것인지, 서비스 제공업체에서 이 키를 어떻게 불러와서 사용하는지에 따라 해당 키를 중앙 통제 가능한지 불가능한지가 결정된다. 아마도 대부분의 개인키 복구 서비스는 중앙화 되어있다고 표현할 수 있다. First, in the case of the existing private key recovery service, a process of encrypting the user's private key with a specific key and storing it in the server for recovery is used. At this time, depending on how the specific key that encrypts the private key is managed and how the service provider retrieves and uses this key, it is determined whether the key can be centrally controlled or not. Perhaps it can be said that most private key recovery services are centralized.

탈중앙화된 개인키 복구 서비스는 중앙화된 서버 없이 개인키 복구에 필요한 모든 데이터를 유저가 기입해야하는 서비스를 의미한다. 일반적으로 탈중앙화된 개인키 복구 서비스를 제공하기 위해서는 니모닉 코드를 사용한다. 이 경우 유저는 반드시 12 ~ 24개의 나열된 단어 리스트를 기억해야만 한다. 만약 단어 리스트를 잊어버린다면 개인키는 절대 복구할 수 없다. 따라서 복잡한 글자로 구성된 개인키를 대신하여 상대적으로 기억하기 쉬운 니모닉 코드를 사용한다고 해도 단어 리스트를 온전히 기억하기는 쉽지 않다. 따라서, 몇몇의 유저는 보다 더 간편하게 단말기의 종속성없이 언제 어디서나 쉽게 개인키 복구가 가능한 시스템을 요구하게 된다. Decentralized private key recovery service refers to a service in which users must enter all data necessary for private key recovery without a centralized server. In general, a mnemonic code is used to provide a decentralized private key recovery service. In this case, the user must memorize a list of 12 to 24 listed words. If you forget the word list, the private key can never be recovered. Therefore, even if a relatively easy-to-remember mnemonic code is used instead of the private key composed of complex letters, it is not easy to memorize the word list completely. Accordingly, some users require a system capable of easily recovering the private key anytime, anywhere without the dependency of the terminal.

이하에서는 우선, 본 발명의 개념이 적용될 수 있는 블록체인을 이용한 분산처리 시스템에 관해 설명하기로 한다. Hereinafter, first, a distributed processing system using a block chain to which the concept of the present invention can be applied will be described.

도 3은 본 발명에 따른 기술적 사상이 적용될 수 있는 블록체인을 이용한 분산처리 시스템을 도시한 도면이다.3 is a diagram illustrating a distributed processing system using a block chain to which the technical idea according to the present invention can be applied.

도 3을 참조하면 블록체인을 이용한 분산처리 시스템(100)은 복수의 노드들(110-170)로 이루어진 분산형 네트워크(distributed network) 시스템이다. 상기 분산형 네트워크(100)를 구성하는 노드들(110-170)은 컴퓨터, 이동 단말기, 전용 전자 장치 등 연산 능력이 있는 전자 장치일 수 있다.Referring to FIG. 3 , the distributed processing system 100 using the block chain is a distributed network system composed of a plurality of nodes 110-170. The nodes 110 to 170 constituting the distributed network 100 may be electronic devices having computing power, such as computers, mobile terminals, and dedicated electronic devices.

일반적으로 분산형 네트워크(100)는 블록체인이라 불리는 블록(block)의 연결 묶음 내에 모든 참여 노드에 공통으로 알려진 정보를 저장하고 참조할 수 있다. 상기 노드들(110-170)은 상호간 통신이 가능하며 블록체인을 저장, 관리 및 전파를 담당하는 완전 노드(full node)와 단순하게 트랜잭션에만 참여할 수 있는 간이 노드(light node)로 구분될 수 있다. 본 명세서에서 별다른 설명 없이 노드에 대하여 언급되는 경우, 이는 분산형 네트워크에 참여하며 블록체인을 생성, 저장 또는 검증하는 동작을 수행하는 완전 노드를 지칭하는 경우가 많으나, 이에 한정되는 것은 아니다. In general, the decentralized network 100 can store and refer to information commonly known to all participating nodes in a connected bundle of blocks called blockchain. The nodes 110-170 can communicate with each other and can be divided into a full node that stores, manages, and propagates the block chain and a light node that can simply participate in transactions. . In this specification, when referring to a node without further explanation, it often refers to a full node that participates in a distributed network and performs an operation to create, store, or verify a block chain, but is not limited thereto.

상기 블록체인에 연결되어 있는 각 블록들은 일정 기간 내의 거래 내역, 즉 트랜잭션(transaction)들을 포함한다. 상기 노드들은 각각 역할에 따라 블록체인을 생성, 저장 또는 검증함으로써 트랜잭션들을 관리할 수 있다.Each block connected to the block chain includes transaction details within a certain period, that is, transactions. The nodes can manage transactions by creating, storing, or verifying the blockchain according to their respective roles.

실시 형태에 따라 상기 트랜잭션은 다양한 형태의 거래를 나타낼 수 있다. 일 실시예에서 상기 트랜잭션은 가상화폐의 소유 상태 및 그 변동을 나타내기 위한 금융 거래에 해당할 수 있다. 다른 실시예에서 상기 트랜잭션은 물건의 소유 상태 및 그 변동을 나타내기 위한 실물 거래에 해당할 수 있다. 또 다른 실시예에서 상기 트랜잭션은 정보의 기록, 저장 및 이송을 나타내기 위한 정보 공유 과정에 해당할 수 있다. 상기 분산형 네트워크(100)에서 거래를 수행하는 노드들은 각각의 암호학적 연관관계가 있는 개인키(private key) 및 공개키(public key) 쌍을 가질 수 있다.According to an embodiment, the transaction may represent various types of transactions. In one embodiment, the transaction may correspond to a financial transaction for indicating the ownership status of virtual currency and its change. In another embodiment, the transaction may correspond to a physical transaction for indicating the ownership status of the object and its change. In another embodiment, the transaction may correspond to an information sharing process to indicate the recording, storage and transfer of information. Nodes performing a transaction in the distributed network 100 may have a private key and a public key pair each cryptographically related.

도 4 및 도 5는 블록체인 시스템에서 이용되는 블록의 연결을 도시한 블록도이다.4 and 5 are block diagrams illustrating the connection of blocks used in a block chain system.

도 4를 참조하면 블록체인(200)은 순차적으로 연결된 하나 이상의 블록들(210, 220, 230)의 분산 데이터베이스의 일종이다. 상기 블록체인(200)은 블록체인 시스템 내 사용자의 거래 내역을 저장하고 관리하기 위해 사용되며, 상기 블록체인 시스템의 네트워크에 참여하는 각 노드가 블록을 생성하여 상기 블록체인(200)에 연결한다. 도 2에는 제한된 수의 블록들(210, 220, 230)이 도시되어 있으나 블록체인에 포함될 수 있는 블록의 수는 이에 제한되지 아니한다.Referring to FIG. 4 , the block chain 200 is a kind of distributed database of one or more sequentially connected blocks 210 , 220 , 230 . The block chain 200 is used to store and manage user's transaction details in the block chain system, and each node participating in the network of the block chain system creates a block and connects it to the block chain 200 . Although a limited number of blocks 210 , 220 , and 230 are illustrated in FIG. 2 , the number of blocks that can be included in the block chain is not limited thereto.

상기 블록체인(200)에 포함된 각 블록은 블록 헤더(211)와 블록 바디(213)를 포함하도록 구성될 수 있다. 상기 블록 헤더(211)는 각 블록들간의 연결 관계를 나타내기 위하여 이전 블록(220)의 해시 값을 포함할 수 있다. 상기 블록체인(200)이 유효한지 검증하는 과정에서 상기 블록 헤더(211) 내의 연결 관계가 사용된다. 상기 블록 바디(213)는 상기 블록(210)에 저장되고 관리되는 데이터, 예를 들어 트랜잭션 리스트 또는 트랜잭션 체인을 포함할 수 있다.Each block included in the block chain 200 may be configured to include a block header 211 and a block body 213 . The block header 211 may include a hash value of the previous block 220 to indicate a connection relationship between blocks. In the process of verifying whether the block chain 200 is valid, the connection relationship in the block header 211 is used. The block body 213 may include data stored and managed in the block 210 , for example, a transaction list or a transaction chain.

도 5를 참조하면, 상기 블록 헤더(211)는 이전 블록의 해시(2112), 현재 블록의 해시(2113), 넌스(Nonce)(2114)를 포함할 수 있다. 또한, 상기 블록 헤더(211)는 블록 내의 트랜잭션 리스트의 헤더를 나타내는 루트(2115)를 포함할 수 있다.Referring to FIG. 5 , the block header 211 may include a hash 2112 of a previous block, a hash 2113 of a current block, and a nonce 2114 . Also, the block header 211 may include a root 2115 indicating a header of a transaction list in a block.

전술된 바와 같이, 상기 블록체인(200)은 연결된 하나 이상의 블록들을 포함할 수 있다. 상기 하나 이상의 블록들은 상기 블록 헤더(211) 내의 해시 값에 기초하여 연결된다. 상기 블록 헤더(211)에 포함된 이전 블록의 해시 값(2112)은 직전 블록(220)에 대한 해시 값으로서 직전 블록(220)에 포함된 현재 해시(2213)와 동일한 값이다. 상기 하나 이상의 블록들은 각 블록 헤더 내의 이전 블록의 해시 값에 의하여 연쇄적으로 연결된다. 상기 분산형 네트워크에 참여하는 노드들은 상기 하나 이상의 블록들에 포함된 이전 블록의 해시 값에 기반하여 블록의 유효성을 검증하므로 악의적인 단일 노드가 이미 생성된 블록의 내용을 위조 또는 변조하는 행위가 불가능하다.As described above, the blockchain 200 may include one or more connected blocks. The one or more blocks are connected based on a hash value in the block header 211 . The hash value 2112 of the previous block included in the block header 211 is the same as the current hash 2213 included in the previous block 220 as a hash value of the previous block 220 . The one or more blocks are chained by the hash value of the previous block in each block header. Nodes participating in the distributed network verify the validity of a block based on the hash value of the previous block included in the one or more blocks, so it is impossible for a single malicious node to forge or alter the contents of an already created block do.

상기 블록 바디(213)는 트랜잭션 리스트(2131)를 포함할 수 있다. 상기 트랜잭션 리스트(2131)는 블록체인 기반의 거래의 목록이다. 예를 들면, 상기 트랜잭션 리스트(2131)는 상기 블록체인 기반의 금융 시스템에서 이루어진 금융 거래에 대한 기록을 포함할 수 있다. 상기 트랜잭션 리스트(2131)는 트리(tree) 형태로 표현될 수 있으며, 예를 들어, 사용자 A가 사용자 B에게 전송한 금액을 목록 형태로 기록하며, 블록 내의 저장 길이는 현재 블록에 포함된 트랜잭션의 수에 기초하여 증감될 수 있다.The block body 213 may include a transaction list 2131 . The transaction list 2131 is a list of blockchain-based transactions. For example, the transaction list 2131 may include a record of financial transactions made in the blockchain-based financial system. The transaction list 2131 may be expressed in the form of a tree, and for example, the amount transmitted by user A to user B is recorded in the form of a list, and the storage length in the block is the length of the transaction included in the current block. It can be increased or decreased based on the number.

그리고, 블록(210)은 블록 헤더(211)와 블록 바디(213)에 포함된 정보 이외의 기타 정보(2116)를 포함할 수 있다. In addition, the block 210 may include other information 2116 other than the information included in the block header 211 and the block body 213 .

분산형 네트워크에 참여하는 노드들은 동일한 블록체인을 가지며, 블록에는 동일한 트랜잭션이 저장된다. 트랜잭션 목록이 포함된 블록이 네트워크에 공유되므로 모든 참여자가 검증할 수 있다.Nodes participating in a decentralized network have the same blockchain, and the same transactions are stored in blocks. A block containing a list of transactions is shared on the network, so all participants can verify it.

이하에서는, 본 발명의 실시예에 따른 니모닉 코드를 이용한 개인키 복구 방법에 대해 설명하기로 한다. 본 발명의 실시예에 따른 니모닉 코드를 이용한 개인키 복구 방법은 컴퓨팅 장치에서 실행되는 알고리즘이다.Hereinafter, a method for recovering a private key using a mnemonic code according to an embodiment of the present invention will be described. The private key recovery method using a mnemonic code according to an embodiment of the present invention is an algorithm executed in a computing device.

도 6은 본 발명의 실시예에 따른 개인키 생성 및 니모닉 코드를 백업하는 과정을 도시한 도면이다. 6 is a diagram illustrating a process of generating a private key and backing up a mnemonic code according to an embodiment of the present invention.

도 6을 참조하면, 우선, 사용자 노드는 BIP39과정에서 사용자가 설정한 비밀번호를 이용하여 18개의 니모닉 코드들과 마스터 시드를 생성한다(S100). 니모닉 코드란, 지갑을 복구하기 위한 12개~24개의 나열된 단어들이며, 시드란, 난수를 발생시킬 때 무작위성을 지키기 위해 사용되는 것이다. Referring to FIG. 6 , first, the user node generates 18 mnemonic codes and a master seed using the password set by the user in the BIP39 process (S100). A mnemonic code is a list of 12 to 24 words to recover a wallet, and a seed is used to keep randomness when generating a random number.

이어서, 사용자 노드는 BIP32와 BIP44과정을 통해 상기 S100 단계에서 생성한 마스터 시드와 사용자 노드에서 설정한 PIN CODE를 이용하여 지갑을 생성한다(S110).Next, the user node creates a wallet using the master seed generated in step S100 and the PIN CODE set in the user node through the BIP32 and BIP44 processes (S110).

이어서, 사용자 노드는 상기 S110 단계에서 생성한 지갑의 공개키와 사용자 노드의 계정 이름을 서버로 전송한다(S120). Next, the user node transmits the public key of the wallet generated in step S110 and the account name of the user node to the server (S120).

이어서, 서버는 사용자 노드로부터 전송받은 계정 이름과 서버의 개인키를 이용하여 전자서명을 만든다(S130).Next, the server creates an electronic signature using the account name received from the user node and the server's private key (S130).

이어서, 서버는 랜덤하게 솔트를 생성하여 상기 S130 단계에서 만든 전자서명과 함께 사용자 노드의 비밀키를 생성한 후 사용자 노드로 상기 비밀키를 전송한다(S140). 솔트란, 무차별 대입 공격(brute-force attack)을 가능하게 하는 조회 테이블 생성을 힘들게 하여 악의적인 공격자로부터 원본 데이터를 안전하게 보호하기 위해 사용된다.Next, the server generates a salt at random, generates a secret key of the user node together with the digital signature created in step S130, and transmits the secret key to the user node (S140). Salt is used to safely protect original data from malicious attackers by making it difficult to create a lookup table that enables a brute-force attack.

이어서, 사용자 노드는 상기 S140 단계에서 전송받은 사용자 노드의 비밀키를 통해 상기 S100 단계에서 생성한 니모닉 코드를 암호화하여 서버로 전송한다(S150). Next, the user node encrypts the mnemonic code generated in step S100 through the secret key of the user node received in step S140 and transmits it to the server (S150).

이어서, 서버는 상기 S130 단계에서 전송받은 계정 이름과 상기 S140 단계에서 생성한 솔트와 상기 S150 단계에서 전송받은 암호화된 니모닉 코드를 데이터베이스에 저장한다(S160).Next, the server stores the account name received in step S130, the salt generated in step S140, and the encrypted mnemonic code received in step S150 in a database (S160).

도 7은 본 발명의 실시예에 따른 개인키 복원 과정을 도시한 도면이다. 7 is a diagram illustrating a private key restoration process according to an embodiment of the present invention.

도 7을 참조하면, 우선, 사용자 노드는 서버에게 본인인증을 위한 인증서와 함께 암호화된 니모닉 코드와 비밀키를 요청한다(S200).Referring to FIG. 7 , first, a user node requests an encrypted mnemonic code and a secret key together with a certificate for self-authentication from the server (S200).

이어서, 서버는 사용자 노드가 전송한 인증서를 검증한 후 인증서가 유효하면 데이터베이스에 저장된 사용자 노드의 데이터를 불러온다(S210).Then, after verifying the certificate transmitted by the user node, the server fetches the data of the user node stored in the database if the certificate is valid (S210).

이어서, 서버는 데이터베이스에 저장된 계정 이름과 서버의 개인키를 통해 전자서명을 생성한다(S220).Next, the server generates an electronic signature through the account name stored in the database and the server's private key (S220).

이어서, 서버는 상기 S220 단계에서 생성한 전자서명과 데이터베이스에 저장된 솔트를 이용하여 사용자 노드의 비밀키를 복구한다(S230). 사용자 노드의 비밀키는 이전에 생성한 사용자 노드의 비밀키와 같은 입력값이 들어가므로 이전에 생성한 사용자 노드의 비밀키와 동일한 비밀키로 복구할 수 있다.Then, the server recovers the secret key of the user node using the digital signature generated in step S220 and the salt stored in the database (S230). Since the secret key of the user node contains the same input value as the secret key of the previously generated user node, it can be recovered with the same secret key as the previously created secret key of the user node.

이어서, 서버는 데이터베이스에 저장된 암호화된 니모닉 코드와 상기 S230 단계에서 복구된 사용자 노드의 비밀키를 사용자 노드로 전송한다(S240). Next, the server transmits the encrypted mnemonic code stored in the database and the secret key of the user node recovered in step S230 to the user node (S240).

이어서, 사용자 노드는 상기 S240 단계에서 전송받은 사용자 노드의 비밀키를 통해 니모닉 코드를 복호화하고 이전에 설정한 사용자 노드의 비밀번호를 통해 마스터 시드를 복구한다(S250).Next, the user node decrypts the mnemonic code through the secret key of the user node received in step S240, and restores the master seed through the previously set password of the user node (S250).

이어서, 사용자 노드는 이전에 설정한 PIN CODE와 S250 단계에서 복구된 마스터 시드를 통해 지갑을 복구한다(S260).Next, the user node restores the wallet through the previously set PIN CODE and the master seed restored in step S250 (S260).

도 8은 본 발명의 실시예에 따른 니모닉 코드를 이용한 개인키 복구 방법을 순차적으로 도시한 흐름도이다. 8 is a flowchart sequentially illustrating a private key recovery method using a mnemonic code according to an embodiment of the present invention.

본 발명은 유저의 단말기에서 BIP39를 기반으로 랜덤한 128 ~ 256bits의 키를 생성하여 12 ~ 24개의 랜덤한 단어의 배열을 생성한다. 위에서 생성한 단어들과 “Mnmonic”+ 비밀번호로 구성된 솔트를 조합하여 마스터 시드를 생성한다. The present invention generates an array of 12 to 24 random words by generating a key of random 128 to 256 bits based on BIP39 in the user's terminal. The master seed is created by combining the words created above and the salt consisting of “Mnmonic” + password.

그리고, BIP32를 기반으로 생성되는 마스터 시드를 통해 HD 지갑을 생성한다.And, an HD wallet is created through the master seed created based on BIP32.

그리고, BIP44를 기반으로 지갑 어플리케이션의 PIN CODE를 어카운트 값으로 하는 2^32개의 개인키 세트를 생성하여 사용한다.And, based on BIP44, a set of 2^32 private keys using the PIN CODE of the wallet application as the account value is generated and used.

여기에서 change의 경우 비트코인에만 해당이 되므로 본 발명에서는 0으로 고정한다. 예를 들어, 123999를 PIN CODE로 하는 계정의 14번째 주소의 개인키는 m/44’/60’/123999’/0/15 이 된다. In the case of change, it is fixed to 0 in the present invention because it is applicable only to Bitcoin. For example, the private key of the 14th address of the account with 123999 as the PIN code becomes m/44’/60’/123999’/0/15.

그리고, 유저의 계정명을 서버의 백업용 개인키로 서명하여 만든 전자서명과 서버에서 랜덤하게 생성한 솔트와 함께 해시하여 유저의 비밀키를 생성한다. Then, the user's account name is hashed with the digital signature created by signing the server's backup private key and the salt randomly generated by the server to generate the user's private key.

해당 비밀키를 클라이언트에게 전송하여 클라이언트는 해당 비밀키로 유저의 니모닉 코드를 암호화하고 서버로 전송한다. 서버는 해당 암호 데이터를 위에서 생성한 유저의 솔트와 유저의 계정명과 함께 데이터베이스에 저장한다.By sending the corresponding private key to the client, the client encrypts the user's mnemonic code with the corresponding private key and sends it to the server. The server stores the password data in the database along with the salt of the user created above and the user's account name.

이렇게 되면 서버는 유저의 니모닉 코드는 쉽게 알아낼 수 있지만 유저의 비밀번호와 PIN CODE를 모르기 때문에 개인키 복구에 있어서 탈중앙화 되었다고 볼 수 있다.In this case, the server can easily find out the user's mnemonic code, but since it does not know the user's password and PIN CODE, it can be considered that it is decentralized in recovering the private key.

또한, 악의적인 해커의 입장에서는 유저의 니모닉 코드를 찾아내더라도 비밀번호와 PIN CODE를 찾아내어야 유저의 계정을 탈취할 수 있으므로 보안성은 더욱 높아졌다고 볼 수 있다.In addition, from the standpoint of a malicious hacker, even if the user's mnemonic code is found, the user's account can be hijacked only by finding the password and PIN CODE, so the security is further improved.

유저가 계정의 키를 복구하고 싶으면 계정의 소유권을 증명하여 서버에게 데이터를 요청한다. 서버는 앞서 했던 과정과 같이 유저가 소유권을 증명한 계정명을 서버의 백업용 개인키로 서명하여 전자서명을 만든다. 이에 따라 생성된 전자서명은 데이터베이스에 계정명과 함께 저장된 솔트와 함께 해시하여 비밀키를 생성한다. If the user wants to recover the account key, he/she requests data from the server by proving the ownership of the account. The server creates a digital signature by signing the account name that the user has proven ownership of with the server's backup private key as in the previous process. Accordingly, the generated digital signature is hashed with the salt stored along with the account name in the database to generate a secret key.

이때, 생성된 비밀키와 데이터베이스에 저장된 암호문을 함께 클라이언트로 보낸다. 유저는 전달받은 비밀키와 암호문을 이용하여 니모닉 코드를 복구한다. At this time, the generated secret key and the ciphertext stored in the database are sent together to the client. The user recovers the mnemonic code using the received secret key and ciphertext.

그리고 유저의 패스워드와 PIN CODE를 입력하여 계정에 사용되는 키 세트를 복구한다.Then, enter the user's password and PIN CODE to recover the key set used for the account.

도 9는 본 발명의 실시예에 따른 노드의 컴퓨팅 장치의 구성도이다.9 is a block diagram of a computing device of a node according to an embodiment of the present invention.

도 9를 참조하면, 본 발명의 실시예에 따른 노드의 컴퓨팅 장치(1000)는 프로세서(1100)와 메모리(1200)를 포함하고, 프로세서(1100)는 하나 이상의 코어(core) 및 그래픽 처리부 및/또는 다른 구성요소와 신호를 송수신하는 연결 통로(예를 들어, 버스(bus) 등)를 포함할 수 있다.Referring to FIG. 9 , the computing device 1000 of a node according to an embodiment of the present invention includes a processor 1100 and a memory 1200 , and the processor 1100 includes one or more cores and a graphic processing unit and/or Alternatively, it may include a connection path (eg, a bus, etc.) for transmitting and receiving signals with other components.

일 실시예에 따른 프로세서(1100)는 메모리(1200)에 저장된 하나 이상의 인스트럭션을 실행함으로써, 도 4와 관련하여 설명된 개인키 생성 알고리즘의 동작을 실행한다. The processor 1100 according to an embodiment executes the operation of the private key generation algorithm described with reference to FIG. 4 by executing one or more instructions stored in the memory 1200 .

예를 들어, 프로세서(1100)는 메모리에 저장된 하나 이상의 인스트럭션을 실행함으로써 하나 이상의 노드에서 발생되는 사용자 식별인증 및 개인키 생성에 관한 정보들을 수집하고, 상기 수집된 정보들에 기초하여 트랜잭션을 발생시켜 적어도 하나의 노드에 대해 관련 정보를 제공한다. For example, the processor 1100 collects information about user identification authentication and private key generation generated in one or more nodes by executing one or more instructions stored in the memory, and generates a transaction based on the collected information. Provides related information for at least one node.

한편, 프로세서(1100)는 내부에서 처리되는 신호(또는, 데이터)를 일시적 및/또는 영구적으로 저장하는 램(RAM: Random Access Memory) 및 롬(ROM: Read-Only Memory)을 더 포함할 수 있다. 또한, 프로세서(1100)는 그래픽 처리부, 램 및 롬 중 적어도 하나를 포함하는 시스템온칩(SoC: system on chip) 형태로 구현될 수 있다. Meanwhile, the processor 1100 may further include a random access memory (RAM) and a read-only memory (ROM) for temporarily and/or permanently storing signals (or data) processed therein. . Also, the processor 1100 may be implemented in the form of a system on chip (SoC) including at least one of a graphic processing unit, a RAM, and a ROM.

메모리(1200)에는 프로세서(1100)의 처리 및 제어를 위한 프로그램들(하나 이상의 인스트럭션들)을 저장할 수 있다. 메모리(1200)에 저장된 프로그램들은 기능에 따라 복수 개의 모듈들로 구분될 수 있다.The memory 1200 may store programs (one or more instructions) for processing and controlling the processor 1100 . Programs stored in the memory 1200 may be divided into a plurality of modules according to functions.

본 발명의 실시예와 관련하여 설명된 시스템의 동작들은 하드웨어로 직접 구현되거나, 하드웨어에 의해 실행되는 소프트웨어 모듈로 구현되거나, 또는 이들의 결합에 의해 구현될 수 있다. 소프트웨어 모듈은 RAM(Random Access Memory), ROM(Read Only Memory), EPROM(Erasable Programmable ROM), EEPROM(Electrically Erasable Programmable ROM), 플래시 메모리(Flash Memory), 하드 디스크, 착탈형 디스크, CD-ROM, 또는 본 발명이 속하는 기술 분야에서 잘 알려진 임의의 형태의 컴퓨터 판독가능 기록매체에 상주할 수도 있다.The operations of the system described in relation to the embodiment of the present invention may be implemented directly in hardware, as a software module executed by hardware, or by a combination thereof. A software module may contain random access memory (RAM), read only memory (ROM), erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, hard disk, removable disk, CD-ROM, or It may reside in any type of computer-readable recording medium well known in the art to which the present invention pertains.

본 발명의 구성 요소들은 하드웨어인 컴퓨터와 결합되어 실행되기 위해 프로그램(또는 어플리케이션)으로 구현되어 매체에 저장될 수 있다. 본 발명의 구성 요소들은 소프트웨어 프로그래밍 또는 소프트웨어 요소들로 실행될 수 있으며, 이와 유사하게, 실시 예는 데이터 구조, 프로세스들, 루틴들 또는 다른 프로그래밍 구성들의 조합으로 구현되는 다양한 알고리즘을 포함하여, C, C++, 자바(Java), 어셈블러(assembler) 등과 같은 프로그래밍 또는 스크립팅 언어로 구현될 수 있다. 기능적인 측면들은 하나 이상의 프로세서들에서 실행되는 알고리즘으로 구현될 수 있다.The components of the present invention may be implemented as a program (or application) to be executed in combination with a computer, which is hardware, and stored in a medium. Components of the present invention may be implemented as software programming or software components, and similarly, embodiments may include various algorithms implemented as data structures, processes, routines, or combinations of other programming constructs, including C, C++ , may be implemented in a programming or scripting language such as Java, assembler, or the like. Functional aspects may be implemented in an algorithm running on one or more processors.

전술된 실시예들은 모든 면에서 예시적인 것이며 한정적인 것이 아닌 것으로 이해되어야 하며, 본 발명의 범위는 전술된 상세한 설명보다는 후술될 청구범위에 의해 나타내어질 것이다. 그리고 이 청구범위의 의미 및 범위는 물론, 그 등가개념으로부터 도출되는 모든 변경 및 변형 가능한 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.It is to be understood that the above-described embodiments are illustrative in all respects and not restrictive, and the scope of the present invention will be indicated by the following claims rather than the foregoing detailed description. And it should be construed that all changes and modifications derived from the meaning and scope of the claims as well as equivalent concepts are included in the scope of the present invention.

100: 분산형 네트워크
110~170: 노드들
200: 블록체인
210, 220, 230: 블록
100: decentralized network
110-170: nodes
200: Blockchain
210, 220, 230: block

Claims (2)

컴퓨팅 장치에서 실행되는 방법으로서,
사용자 노드에서 사용자가 설정한 비밀번호를 이용하여 18개의 니모닉 코드와 마스터 시드를 생성하는 제1 단계;
상기 제1 단계에서 생성한 마스터 시드와 상기 사용자 노드에서 설정한 핀 코드(PIN CODE)를 이용하여 지갑을 생성하는 제2 단계;
상기 제2 단계에서 생성한 지갑의 공개키와 상기 사용자 노드의 계정 이름을 서버로 전송하는 제3 단계;
상기 서버는 상기 사용자 노드로부터 전송받은 계정 이름과 상기 서버의 개인키를 이용하여 전자서명을 생성하는 제4 단계;
상기 서버는 랜덤하게 솔트를 생성하여 상기 제4 단계에서 생성한 전자서명과 함께 상기 사용자 노드의 비밀키를 생성한 후 상기 사용자 노드로 상기 비밀키를 전송하는 제5 단계;
상기 사용자 노드는 상기 제5 단계에서 전송받은 상기 비밀키를 통해 상기 제1 단계에서 생성한 상기 니모닉 코드를 암호화하여 상기 서버로 전송하는 제6 단계; 및
상기 서버는 상기 제4 단계에서 전송받은 계정 이름과 상기 제5 단계에서 생성한 솔트와 상기 제6 단계에서 전송받은 암호화된 니모닉 코드를 데이터베이스에 저장하는 제7 단계;를 포함하는, 니모닉 코드를 이용한 개인키 복구 방법.
A method executed on a computing device, comprising:
A first step of generating 18 mnemonic codes and a master seed using the password set by the user in the user node;
a second step of creating a wallet using the master seed generated in the first step and a PIN code set in the user node;
a third step of transmitting the public key of the wallet generated in the second step and the account name of the user node to a server;
a fourth step of generating, by the server, an electronic signature using the account name received from the user node and the private key of the server;
a fifth step of generating, by the server, a secret key of the user node together with the digital signature generated in the fourth step by randomly generating a salt, and then transmitting the secret key to the user node;
a sixth step of encrypting, by the user node, the mnemonic code generated in the first step using the secret key received in the fifth step, and transmitting the encrypted mnemonic code to the server; and
A seventh step of the server storing the account name transmitted in the fourth step, the salt generated in the fifth step, and the encrypted mnemonic code transmitted in the sixth step in a database; using a mnemonic code, including How to recover private key.
제 1항에 있어서,
상기 제7 단계 이후,
상기 사용자 노드는 상기 서버에게 본인인증을 위한 인증서와 함께 암호화된 니모닉 코드와 비밀키를 요청하는 제8 단계;
상기 서버는 상기 사용자 노드가 전송한 인증서를 검증한 후 상기 인증서가 유효하면 상기 데이터베이스에 저장된 상기 사용자 노드의 데이터를 읽는 제9 단계;
상기 서버는 상기 데이터베이스에 저장된 계정 이름과 상기 서버의 개인키를 통해 전자서명을 생성하는 제10 단계;
상기 서버는 상기 제10 단계에서 생성한 전자서명과 상기 데이터베이스에 저장된 솔트를 이용하여 상기 사용자 노드의 상기 비밀키를 복구하는 제11 단계;
상기 서버는 상기 데이터베이스에 저장된 암호화된 니모닉 코드와 상기 제11 단계에서 복구된 상기 사용자 노드의 비밀키를 상기 사용자 노드로 전송하는 제12 단계;
상기 사용자 노드는 상기 제12 단계에서 전송받은 상기 사용자 노드의 비밀키를 통해 상기 니모닉 코드를 복호화하고, 이전에 설정한 사용자 노드의 비밀번호를 통해 마스터 시드를 복구하는 제13 단계; 및
상기 사용자 노드는 이전에 설정한 핀 코드(PIN CODE)와 상기 제13 단계 복구된 마스터 시드를 통해 지갑을 복구하는 제14 단계;를 더 포함하는, 니모닉 코드를 이용한 개인키 복구 방법.
The method of claim 1,
After the seventh step,
an eighth step of requesting, by the user node, an encrypted mnemonic code and a secret key together with a certificate for self-authentication from the server;
a ninth step of reading, by the server, data of the user node stored in the database if the certificate is valid after verifying the certificate transmitted by the user node;
a tenth step of generating, by the server, an electronic signature using the account name stored in the database and the private key of the server;
an eleventh step of the server recovering the secret key of the user node using the digital signature generated in the tenth step and the salt stored in the database;
a twelfth step of transmitting, by the server, the encrypted mnemonic code stored in the database and the secret key of the user node recovered in the eleventh step to the user node;
a thirteenth step of the user node decrypting the mnemonic code through the secret key of the user node received in the twelfth step, and recovering the master seed through the previously set password of the user node; and
The method of recovering the private key using a mnemonic code, further comprising: the user node recovering the wallet through the previously set PIN code and the master seed restored in the 13th step.
KR1020200092451A 2020-07-24 2020-07-24 The method of recovering private key using mnemonic code KR102354044B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200092451A KR102354044B1 (en) 2020-07-24 2020-07-24 The method of recovering private key using mnemonic code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200092451A KR102354044B1 (en) 2020-07-24 2020-07-24 The method of recovering private key using mnemonic code

Publications (1)

Publication Number Publication Date
KR102354044B1 true KR102354044B1 (en) 2022-01-20

Family

ID=80052776

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200092451A KR102354044B1 (en) 2020-07-24 2020-07-24 The method of recovering private key using mnemonic code

Country Status (1)

Country Link
KR (1) KR102354044B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102629335B1 (en) * 2023-01-11 2024-01-25 주식회사 그루핀 Electronic device for digital wallet management based on doubled mnemonic code, and operating method thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101857223B1 (en) 2017-11-13 2018-05-11 주식회사 온더 Method and system for user identification based block chain token
KR20190118795A (en) * 2018-04-11 2019-10-21 주식회사 크레스텍 System for and method of transmiting digital asset including cryptocurrency
US20190362340A1 (en) * 2018-05-25 2019-11-28 Bitfi, Inc. Secure multiple cryptocurrency wallet and methods of use thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101857223B1 (en) 2017-11-13 2018-05-11 주식회사 온더 Method and system for user identification based block chain token
KR20190118795A (en) * 2018-04-11 2019-10-21 주식회사 크레스텍 System for and method of transmiting digital asset including cryptocurrency
US20190362340A1 (en) * 2018-05-25 2019-11-28 Bitfi, Inc. Secure multiple cryptocurrency wallet and methods of use thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Palatinus, Marek, et al. "Mnemonic code for generating deterministic keys." https://github.com/bitcoin/bips/blob/482aa02e825d84206be5bb95c198198a13c5b9e1/bip-0039.mediawiki. mediawiki (2013) *
Zheng, Zhongxiang, et al. "A Key Backup Scheme Based on Bitcoin." IACR Cryptol. ePrint Arch. 2017 (2017) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102629335B1 (en) * 2023-01-11 2024-01-25 주식회사 그루핀 Electronic device for digital wallet management based on doubled mnemonic code, and operating method thereof

Similar Documents

Publication Publication Date Title
JP6841911B2 (en) Information protection systems and methods
JP6515246B2 (en) Determination of common secrets for the secure exchange of information and hierarchical and deterministic encryption keys
CN108885741B (en) Tokenization method and system for realizing exchange on block chain
EP3664005B1 (en) Credential generation and distribution method and system for a blockchain network
JP7381480B2 (en) Blockchain implementation method and system for authentication based on bilinear map accumulator
KR20200066258A (en) System and method for information protection
EP3659082B1 (en) Computer-implemented system and method enabling secure storage of a large blockchain over a plurality of storage nodes
JP7231630B2 (en) Blockchain-implemented security systems and methods for blinded consequent selection
TW202131659A (en) Computer implemented method and system for storing certified data on a blockchain
CN116349203A (en) Identifying denial of service attacks
Skudnov Bitcoin clients
KR102354044B1 (en) The method of recovering private key using mnemonic code
US20220200792A1 (en) Selective data disclosure via a block chain
KR102520066B1 (en) The private key management and recovery system that storing distributed the key backup data
KR20220142254A (en) Multi-signature wallet system in blockchain using the bloom filter

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant