Patent Publication Number: US-2021192059-A1

Title: Data Registration Method, Data Decryption Method, Data Structure, Computer, and Program

Description:
TECHNICAL FIELD 
     The present invention relates to data registration methods, data decryption methods, data structures, computers, and programs. 
     BACKGROUND ART 
     Through the years, a mechanism that ensures the reliability without requiring centralized management has been getting popular, in particular, in a field of bitcoin which is cryptocurrency. This mechanism called blockchain ensures the reliability of exchanged information through a consensus building process within a distributed network. Its soundness is maintained by preventing frauds, such as tampering or double-spending, in the entire system. In this blockchain, cryptocurrency transaction information (transaction) between participants is organized into a unit called “block”, and blocks are linked in the form of a chain and managed in chronological order. A new block is approved through a consensus algorithm such as Proof of Work in a distributed network. This means that the currency transaction recorded inside a block has been consented in the entire system. The ledger of a series of transaction information pieces managed using this blockchain is called the “distributed ledger”. Nodes participating in a network have the same distributed ledger. 
     Nowadays, blockchain platform technologies are also developed in which advanced script code is registered in the distributed ledger in addition to currency transactions and in which the execution and results of the script code are also subjected to consensus. For example, in a blockchain platform typified by Ethereum or Hyperledger Fabric, script code is executed using each transaction as input, the execution result is stored in a key-value store, a representative value of the store at the time is also recorded in the block in the distributed ledger (for example, non-patent document 1). In cryptocurrency described above, the content of a transaction is limited to a currency transaction record such as “who passed how much to whom”. In contrast, in these succeeding blockchain technologies, the user himself/herself can programmably set information to be recorded by using a transaction and script code. This makes it easy to apply blockchain to various applications other than currency transactions, such as securities exchange, insurance business, and copyright management. These platform technologies are called smart contract blockchain because a contract is subjected to consensus among participants. 
     PRIOR ART DOCUMENT 
     Patent Document 
     
         
         Patent document 1: Japanese Patent Application Publication No. 2017-50763 
       
    
     Non-Patent Document 
     
         
         Non-patent document 1: IBM Corporation, “Blockchain for beginners”, [Online], Sep. 15, 2016, [retrieved on Oct. 3, 2017], Internet (URL: https://www.ibm.com/developerworks/jp/cloud/library/j_cl-blockchain-basics-bluemix/index.html) 
         Non-patent document 2: FUJITSU LABORATORIES LTD., “Development of Security Reinforcement Technology for Blockchain”, 2. Document Encryption Technology on Blockchain through Secret Sharing-based Key Management, [Online], Oct. 19, 2016, [retrieved on Oct. 3, 2017], Internet (URL: http://pr.fujitsu.com/jp/news/2016/10/19.html) 
       
    
     SUMMARY OF THE INVENTION 
     Problem to be Solved by the Invention 
     The above blockchain systems are based on the assumption that information is disclosed among all the nodes. However, there are cases, depending on the application, where it is desirable to conceal some areas of transactions and disclose the concealed areas only to participants involved. For example, according to the method disclosed in patent document 1, which is applied to the license management of contents, encrypted information can be communicated via a blockchain of a cryptocurrency type. In this method, target data to be encrypted is a common key for a content, and concealed information is exchanged only between the terminals of two parties, a right holder and a user. However, in this method, it is impossible to select an area to be concealed. 
     For the case where the user can programmably set the items of a contract as in smart contract blockchains, it is desired that concealment can be designed more flexibly. For example, in a case where a smart contract blockchain is applied to transactions of cargo insurance policies in trade business, it is desired that items to be concealed can be set flexibly among multiple items and that the disclosure range can be set to a combination of multiple different organizations such an insurance company, an advising bank, and an issuing bank. In this case, management information is complex such as which items are encrypted in the contract data having multiple items, to which users the information is disclosed, and which keys need to be used for the decryption. Further, key exchange procedures necessary for obtaining common keys and management of public keys and secret keys are complex, which imposes a heavy burden in operation on the users when they use the system. 
     To address these problems, it is conceivable to have a centralized concealment server outside the blockchain system as in non-patent document 2. The concealment server stores management information for concealment and provides functions of encryption and decryption in response to requests from the users. Concealed information is included into the contract data, which is stored in the distributed ledger in the blockchain system. The concealment server manages encryption items and disclosure ranges. This reduces the burden on the users. However, in non-patent document 2, the advantages of distributed authority, which is a feature of the blockchain system, are impaired. For example, it is difficult to prevent internal frauds such as a case where the administrator of the concealment server abuses his/her authority and peeks at confidential information stored by another company. In addition, in a case where the administrator of the concealment server stops the service, it is not easy to decrypt encrypted data registered in the distributed ledger only with the users&#39; authority. In addition, since keys are exchanged outside the blockchain system, no evidence of who passed a key to whom remains, which can impair the reliability of transaction evidence. 
     An objective of the present invention made in light of these points is to provide a data registration method, data decryption method, data structure, computer, and program capable of managing data registered in a distributed ledger with part of the data flexibly concealed without a centralized concealment server and without bothering the users with complicated procedures or key management. 
     Means for Solving the Problem 
     To solve the above problems, a data registration method in a computer, according to the present embodiment, includes: generating a common key for encrypting and decrypting an item included in data that is registered in a distributed ledger; acquiring a public key for each account of a user having access authority to the item; encrypting the common key with the public key for each account; and registering the common key encrypted for each account in the distributed ledger via a transaction. 
     To solve the above problems, a data decryption method in a computer, according to the present embodiment, includes: acquiring data that is registered in a distributed ledger via a transaction and includes an encrypted item; acquiring concealment management information registered in the distributed ledger, via a transaction; acquiring the encrypted item and an encrypted common key for decrypting the encrypted item, from the concealment management information; decrypting the encrypted common key using a secret key corresponding to the common key; and decrypting the encrypted item using the decrypted common key. 
     To solve the above problems, a data structure for concealment management information, according to the present embodiment, includes: account information on a user having access authority to an encrypted item of data registered in a distributed ledger via a transaction; information indicating the encrypted item; information on a public key for encrypting a common key for decrypting the encrypted item; and the common key encrypted with the public key. The account information identifies which user the concealment management information corresponds to. The common key is decrypted using a secret key corresponding to the public key. The decrypted common key is used for decrypting the encrypted item. 
     To solve the above problems, a computer according to the present embodiment includes a processor that performs: generating a common key for encrypting and decrypting an item included in data that is registered in a distributed ledger; acquiring a public key for each account of a user having access authority to the item; encrypting the common key with the public key for each account; and registering the common key encrypted for each account in the distributed ledger via a transaction. 
     To solve the above problems, a program according to the present embodiment causes a computer to perform generating a common key for encrypting and decrypting an item included in data that is registered in a distributed ledger; acquiring a public key for each account of a user having access authority to the item; encrypting the common key with the public key for each account; and registering the common key encrypted for each account in the distributed ledger via a transaction. 
     Effect of the Invention 
     The data registration method, data decryption method, data structure, computer, and program according to the present invention makes it possible to manage data registered in distributed ledgers with part of the data flexibly concealed without a centralized concealment server and without bothering the users with complicated procedures or the key management. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is a functional block diagram illustrating a schematic configuration of a concealment system according to the present embodiment. 
         FIG. 2A  is a diagram illustrating an example of contract data before encryption. 
         FIG. 2B  is a diagram illustrating an example of the contract data after encryption. 
         FIG. 3  is a functional block diagram of a verification terminal according to the present embodiment. 
         FIG. 4  is a diagram illustrating concealment management information according to the present embodiment. 
         FIG. 5  is a functional block diagram of an intermediate server according to the present embodiment. 
         FIG. 6  is a sequence diagram illustrating a creation process of concealment management information according to the present embodiment. 
         FIG. 7  is a functional block diagram of a user terminal according to the present embodiment. 
         FIG. 8A  is a flowchart illustrating a process that an intermediate server according to embodiment 1 executes. 
         FIG. 8B  is a flowchart illustrating a subroutine of an encryption process in 
         FIG. 8A . 
         FIG. 9  is a flowchart illustrating a decryption process that an intermediate server executes. 
     
    
    
     MODE FOR CARRYING OUT THE INVENTION 
       FIG. 1  is a functional block diagram illustrating a concealment system S of the present embodiment. The concealment system S of the present embodiment includes a network NW, verification terminals  1 A,  1 B, and  1 C, intermediate servers  2 A,  2 B, and  2 C, and user terminals  3 A,  3 B,  3 C,  3 X,  3 Y,  3 Z,  3 S,  3 T, and  3 U. The network NW of the present embodiment is a blockchain network. The verification terminals  1 A,  1 B, and  1 C of the present embodiment are blockchain verification terminals. The user terminals  3 A,  3 B, and  3 C are used in organization  1 , the user terminals  3 X,  3 Y, and  3 Z are used in organization  2 , and the user terminals  3 S,  3 T, and  3 U are used in organization  3 . Examples of the organizations include insurance companies and banks. 
     The user terminals  3 A,  3 B, and  3 C are connected to the verification terminal  1 A via the intermediate server  2 A. The user terminals  3 X,  3 Y, and  3 Z are connected to the verification terminal  1 B via the intermediate server  2 B. The user terminals  3 S,  3 T, and  3 U are connected to the verification terminal  1 C via the intermediate server  2 C. 
     To avoid repetitive explanation, processes executed by the verification terminal  1 A, the intermediate server  2 A, and the user terminals  3 A,  3 B, and  3 C will be mainly described in the following. The same description applies to the verification terminal  1 B, the intermediate server  2 B, and the user terminals  3 X,  3 Y, and  3 Z and also applies to the verification terminal  1 C, the intermediate server  2 C, and the user terminals  3 S,  3 T, and  3 U. 
     The verification terminal  1 A has software with basic functions for using a blockchain system, such as verification and transfer of transactions and recording transactions into distributed ledgers  12 A described later (see  FIG. 3 ) and reference to them. The verification terminal  1 A may utilize a general-purpose blockchain platform such as Ethereum or Hyperledger Fabric, instead of using dedicated software for using the concealment system S. The intermediate server  2 A receives requests from each user terminal connected to the intermediate server  2 A, communicates with the verification terminal  1 A, and executes specified processes. Each intermediate server is operated separately at each organizational unit having different administrative authority. One intermediate server is assigned to one verification terminal. Multiple user terminals in the same organization may be connected to one intermediate server. An intermediate server connected to user terminals in an organization is not directly connected to user terminals in another organization. The verification terminal  1 A and the intermediate server  2 A does not necessarily need to be physically separated, but they may be in the same physical terminal by utilizing virtualization or other techniques. 
     The verification terminals  1 A,  1 B, and  1 C are connected to one another via the network NW. In the example illustrated in  FIG. 1 , three verification terminals are connected to the network NW, but the number of verification terminals is not limited to this example. In addition, although in the example illustrated in  FIG. 1 , three user terminals are connected to each of the intermediate servers  2 A,  2 B, and  2 C, the number of user terminals is not limited to this example. Although functions of the concealment system S of the present embodiment will be described in the following, it does not mean to exclude the other functions included in the concealment system S. 
       FIG. 2A  illustrates an example of structured contract data used in the present embodiment. In contract data, as illustrated in  FIG. 2A , date (“date”), description (“description”), contractors (“contractors”), the amount of money (“amount”), charge amount (“charges”), and other information are associated with contract ID (“contract1”). This contract data relates to a contract made between multiple people. The contract data is generated at a user terminal by user input. Part of the contract data is not disclosed to the entire concealment system S, but it is encrypted (concealed) by a method described later and recorded in distributed ledgers  12 A. After execution of the encryption, as shown in areas R 21  and R 22  in  FIG. 2B , some items (“contractors”, “amount”, and “charges”) of the contract data are encrypted. Data registered in the distributed ledgers  12 A is not limited to contract data, but any other kinds of data may be registered. 
     Keys for decryption are shared with only specified user terminals under the concealment system S. The intermediate servers perform decryption automatically. Hence, the user terminals do not display ciphertext as in  FIG. 2B . Thus, the users do not directly see cyphertext as shown in  FIG. 2B . The user terminals display cleartext as shown in  FIG. 2A . 
       FIG. 3  is a functional block diagram of the verification terminal  1 A. The verification terminal  1 A includes a control unit  11  and a storage unit  12 . The verification terminals  1 B and  1 C have the same or a similar hardware configuration as or to that of the verification terminal  1 A, and hence, description thereof is omitted. 
     The control unit  11  includes one or more processors. The processors may include one or more memories that store a program for various processes and information during calculation. The memories include volatile memories and non-volatile memories. The memories include memories separate from the processors and the processors&#39; built-in memories. The processors include general-purpose processors that read specific programs and execute specific functions and processors dedicated to specific processes. The dedicated processors include Application Specific Integrated Circuits (ASICs). The processors include Programmable Logic Devices (PLDs). The PLDs include Field-Programmable Gate Arrays (FPGAs). The control unit  11  may be a System on a Chip (SoC) or a System in a Package (SiP) in which one or more processors work cooperatively. 
     The control unit  11  has a contract-data storage function  11 A and a concealment management function  11 B. The contract-data storage function  11 A and the concealment management function  11 B are implemented using script code. The script code is stored in the storage unit  12 . The script code refers to programs that are executable in distributed computing and called, for example, “chaincode” in Hyperledger Fabric and “contract” in Ethereum, which are smart contract blockchain platforms. Depending on the blockchain platform, script code is stored inside distributed ledgers  12 A in some cases. Generally, in a smart contract blockchain system, this script code is executed according to a transaction issued by a user terminal, and a consensus is formed on the execution results with the verification terminal  1 B or  1 C in another organization. Key-value data which is the execution results and the consensus result are recorded in the distributed ledger  12 A held in the verification terminal  1 A. 
     The storage unit  12  is constructed semiconductor memory, magnetic memory, or the like. The storage unit  12  includes a DB for storing any information such as logs, programs, and contents. The storage unit  12  may function also as work memory. The distributed ledger  12 A stored by the storage unit  12  has a state DB  12 A 2  inside, which stores data of key-value expression. A data store  12 A 1  in a form of a chain unique to blockchain stores snapshots (such as hash values) of the state DB  12 A 2 , including execution results of the script code. 
     In the present embodiment, following the protocol of the blockchain being used, the verification terminal  1 A executes the script code for the contract-data storage function  11 A and the concealment management function  11 B. The contract-data storage function  11 A receives a transaction including contract data from the intermediate server  2 A and records the transaction in the distributed ledger  12 A, following the protocol of the blockchain. In the case where the contract data includes items to be encrypted, the items are encrypted (concealed) at the intermediate server  2 A. Thus, the contract data received by the contract-data storage function  11 A has encrypted parts as illustrated in  FIG. 2B . Since ciphertext is handled as character strings, flags may be added that explicitly indicates that they are encrypted. 
     The concealment management function  11 B receives a transaction including information necessary for concealment from the intermediate server  2 A and registers the transaction in the distributed ledger  12 A as concealment management information, following the protocol of the blockchain. The data structure of the concealment management information, as shown in  FIG. 4  as an example, has information on a public key (see area R 41 ) used for key exchange, information (see area R 42 ) indicating which item of the contract data is encrypted, and information on common keys (which have already been encrypted using the public key) (see area R 43 ) for the respective encryption items, those information pieces being associated with the account information of each user who has access authority to the encryption items. Here, the account means an ID for uniquely identifying a user. For example, in the example shown in  FIG. 4 , the account information of user A (userA) in organization  1  (org1) is indicated as “org1.userA”, for example. The concealment management information may include identity information (see area R 44 ) for identifying the account (for example, a certificate issued by a certificate authority (CA) or a hash for a public key for signature verification). By verifying an account against the identity information, the verification terminal  1 A can verify whether a transaction has been issued by the account. Thus, the verification terminal  1 A prevents an unauthorized user from making unauthorized writing in the concealment management information. 
       FIG. 5  is a functional block diagram of the intermediate server  2 A. The intermediate servers  2 B and  2 C have the same or a similar hardware configuration as or to that of the intermediate server  2 A, and hence, description thereof is omitted. 
     The intermediate server  2 A includes a verification-terminal coordination unit  21 , a key generation unit  22 , a contract-data processing unit  23 , a key registration unit  24 , and an encryption⋅decryption processing unit  25 . These functional units are executed by the processor of the intermediate server  2 A. 
     The verification-terminal coordination unit  21  has a transaction transmission function  21 A, a distributed-ledger reference function  21 B, and a signature-key storing DB  21 C. The transaction transmission function  21 A receives information from each functional unit, generates a transaction necessary for recoding in the distributed ledger  12 A, and transmits it to the verification terminal  1 A. Generating a transaction in a blockchain system requires an electronic signature key associated with each account. The electronic signature keys are stored in the signature-key storing DB  21 C. The distributed-ledger reference function  21 B, having a function for referring to the distributed ledger  12 A held by the verification terminal  1 A, acquires contract data or concealment management information on the distributed ledger  12 A in response to a request from each functional unit. 
     The key generation unit  22  has a public-key⋅secret-key generation function  22 A and a common-key generation function  22 B. The public-key⋅secret-key generation function  22 A generates public keys and/or secret keys in response to requests from other functional units. The public-key⋅secret-key generation function  22 A in the present embodiment generates a pair of public and secret keys for each user account. The public-key⋅secret-key generation function  22 A is capable of updating pairs of public and secret keys regularly. At each update, the intermediate server  2 A re-registers pairs of updated public and secret keys in the distributed ledger  12 A as concealment management information. Pairs of public and secret keys are used for key exchange to share common keys. The public-key⋅secret-key generation function  22 A uses, for example, an RSA public-key cryptosystem to generate public keys and secret keys. The public-key⋅secret-key generation function  22 A passes generated key pairs to the key registration unit  24 . 
     The common-key generation function  22 B generates common keys to be used for encrypting or decrypting items of contract data at the encryption⋅decryption processing unit  25 . the present embodiment utilizes a common-key cryptosystem, such as, for example, AES-GCM, as an example of encryption and decryption. Specifically, the present embodiment uses the same key for, both encryption and decryption. In the following, this key is referred to as the common key. The common-key generation function  22 B in the present embodiment generates a common key for each item to be encrypted included in data. For example, in the case of setting item A to be accessible only from the user terminal  3 A, the user terminal  3 X, and the user terminal  3 S, the common-key generation function  22 B generates a common key for item A. Then, the common-key generation function  22 B encrypts the common key with the public key of the user terminal  3 A, encrypts the common key with the public key of the user terminal  3 X, and encrypts the common key with the public key of the user terminal  3 S. In this case, item A is the item associated with the common key. Although details will be described later, in the following embodiment 1, in the case of receiving a request for registering contract data in the state where a common key has been already distributed to a specified account, the common key is used. In contrast, in the following embodiment 2, a common key is newly generated at every reception of a request for registering contract data. 
     The contract-data processing unit  23  has a contract-data registration function  23 A and a contract-data acquisition function  23 B. 
     When some items of contract data are specified for encryption, the contract-data registration function  23 A requests the encryption⋅decryption processing unit  25  to perform the encryption. After the encryption, the contract-data registration function  23 A transmits the contract data to the verification-terminal coordination unit  21 . The contract data is issued as a transaction via the verification-terminal coordination unit  21 , and recorded in the distributed ledger  12 A, following the process of the blockchain system. In other words, the contract-data registration function  23 A registers the contract data in the distributed ledger  12 A via the transaction. 
     When acquired contract data includes encrypted items, the contract-data acquisition function  23 B requests the encryption⋅decryption processing unit  25  to perform the decryption. After the decryption is executed, the contract-data acquisition function  23 B transmits the contract data to the requesting terminal. 
     The key registration unit  24  has a public-key registration function  24 A, a secret-key storage function  24 B, and a secret-key storing DB  24 C. The public-key registration function  24 A registers the public keys generated by the key generation unit  22  in the distributed ledger  12 A via the verification terminal  1 A. At this time, the public keys are registered via transactions. The secret-key storage function  24 B registers the secret keys generated by the key generation unit  22  in the secret-key storing DB  24 C inside the intermediate server  2 A to prevent these secret keys from leaking outside. 
     The encryption⋅decryption processing unit  25  executes an encryption or decryption process on the items requested to be encrypted or decrypted, in response to a request from the contract-data processing unit  23  and transmits the resultant data to the contract-data processing unit  23 . The encryption⋅decryption processing unit  25  has an encryption function  25 A, a decryption function  25 B, and a concealment-management-information acquisition function  25 C which works in corporation with these two functions. 
     The encryption function  25 A determines the account of a user terminal requesting encryption, receives contract data before encryption and concealment management information acquired by the concealment-management-information acquisition function  25 C, encrypts requested items, and outputs the contract data including the encrypted items. 
     The decryption function  25 B determines the account of a user terminal requesting decryption, receives contract data including encryption items and concealment management information acquired by the concealment-management-information acquisition function  25 C, decrypts the encryption items, and outputs the decrypted contract data. 
     The concealment-management-information acquisition function  25 C acquires concealment management information on a specified account from the verification terminal  1 A via the verification-terminal coordination unit  21  and passes it to the encryption function  25 A or the decryption function  25 B. 
       FIG. 6  is a diagram illustrating a process of creating concealment management information, executed by the intermediate servers  2 A,  2 B, and  2 C and the respective verification terminals  1 A,  1 B, and  1 C. Although hereinafter the three verification terminals  1 A,  1 B, and  1 C are collectively referred to as a verification terminal  1 , a process from each intermediate server to a verification terminal is performed using the corresponding verification terminal. Here, description is made, as an example, of a case where the user terminal  3 A specifies only the user terminals  3 X and  3 S as the destinations to which common keys are to be distributed and where the user terminal  3 A sets the contractors (“contractors”) and the amount of money (“amount”) as the items to be encrypted. 
     The intermediate server  2 A generates a public key and a secret key corresponding to the public key for each account of the user terminals  3 A,  3 B, and  3 C, includes the generated public keys in a transaction through the verification-terminal coordination unit  21 , and transmits the transaction to the verification terminal  1  (step S 1 ). In the same way, the intermediate server  2 B and the intermediate server  2 C generate a public key and a secret key for each of the user terminals  3 X,  3 Y, and  3 Z, and  3 S,  3 T, and  3 U, include the generated public keys in a transaction through the verification-terminal coordination unit  21 , and transmit the transaction to the verification terminal  1  (step S 2  and step S 3 ). 
     The verification terminal  1  consents to the received transaction including the public keys, following the protocol of the blockchain system and registers the public keys in the distributed ledger  12 A as concealment management information via the concealment management function  11 B (step S 4 ). As shown in area R 51 , the distributed ledger  12 A stores the account for each user and the public key with these associated with each other. The registration process described above can be executed, for example, when an account is created. 
     At a certain time, the intermediate server  2 A receives the information indicating which items in the contract data transmitted from the user terminal  3 A are to be encrypted with common keys (specifically, the items of the contractors “contractors” and the amount of money “amount” with respect to contract1 and contract2) and the information indicating to which accounts the common keys are to be distributed to disclose the information (specifically, the user terminal  3 X “org2.userX” and the user terminal  3 S “org3.userS”) (step S 5 ). 
     The intermediate server  2 A generates a different common key for each item specified for encryption by the user terminal  3 A (step S 6 ). Specifically, the intermediate server  2 A generates four different common keys for “contract1.contractors”, “contract2. contractors”, “contract1.amount”, and “contract2.amount”. 
     The intermediate server  2 A acquires the public keys of the accounts to which the common keys are to be distributed, specified by the user terminal  3 A, from the concealment management information on the distributed ledger via the verification terminal  1 . Specifically, the intermediate server  2 A requests the verification terminal  1  to send concealment management information including the public keys of the user terminal  3 X and the user terminal  3 S (step S 7 ). The intermediate server  2 A also acquires the public key of the user terminal  3 A which is the requesting account. The verification terminal  1  acquires the requested concealment management information from the distributed ledger  12 A and transmits it to the intermediate server  2 A (step S 8 ). 
     The intermediate server  2 A encrypts each common key with each acquired public key. Specifically, for a common key, the intermediate server  2 A generates the common key for the user terminal  3 A that has been encrypted with the public key of the user terminal  3 A, the common key for the user terminal  3 B that has been encrypted with the public key of the user terminal  3 X, and the common key for the user terminal  3 B that has been encrypted with the public key of the user terminal  3 S (step S 9 ). The intermediate server  2 A generates a transaction including “information indicating the encryption items” and “the common keys for the encryption items” for each of the accounts that are the distribution destinations of the encrypted common keys and transmits it to the verification terminal  1  (step S 10 ). The verification terminal  1  consents to the received transaction, following the protocol of the blockchain system, and registers it in the distributed ledger  12 A as concealment management information (step S 11 ). As shown in area R 52 , information on the encrypted common keys is stored for the contractors (“contractors”) and the amounts of money (“amount”). The intermediate server  2 A creates concealment management information in this manner. 
       FIG. 7  is a functional block diagram of the user terminal  3 A. The user terminal  3 A has a control unit  31 , a display unit  32 , and a storage unit  33 . Other user terminals have the same hardware configuration as that of the user terminal  3 A, and hence, description thereof is omitted. 
     The control unit  31  has one or multiple processors. The control unit  31  executes a program defining control procedure to control the functional units of the user terminal  3 A. 
     The display unit  32  is, for example, a display device such as a liquid crystal display, an organic electroluminescence (EL) display, or an inorganic EL display, but the display unit  32  is not limited to those types. In the present embodiment, as an example, the display unit  32  is constructed a touch screen, which is capable of receiving selection operation made by the user&#39;s fingers or a stylus. Examples of the selection operation include pressing, touching, tapping, contacting, and nearing. 
     The storage unit  33  may be constructed semiconductor memory, magnetic memory, or the like. The storage unit  33  has a DB for storing any information such as logs, programs, and contents. The storage unit  33  may function also as work memory. 
     Exemplary embodiments for encryption and decryption according to operation policy will be described below. 
     Embodiment 1 
     In embodiment 1, contract data is encrypted and decrypted on the assumption that the common keys have been already distributed (registered in the distributed ledger  12 A) to the specified accounts through the process in  FIG. 6 . In other words, in embodiment 1, the intermediate server  2 A performs encryption and decryption using common keys that have been already distributed. In this case, in the case of receiving a request, in a state where contract data with some items already encrypted is stored on the distributed ledger  12 A, for further encrypting the contract data from a user terminal, the contract data in the distributed ledger  12 A is updated. 
       FIG. 8A  is a flowchart illustrating a method of encrypting data that the intermediate server  2 A executes in response to a request from a user terminal. As illustrated in  FIG. 8A , when the contract-data processing unit  23  receives contract data transmitted by the user terminal, the contract-data processing unit  23  requests the encryption⋅decryption processing unit  25  to encrypt the contract data (step S 41 ). 
     When the encryption⋅decryption processing unit  25  receives the request for encrypting the contract data, the encryption function  25 A determines the account of the user terminal requesting the encryption and acquires concealment management information on the account from the distributed ledger  12 A through the concealment-management-information acquisition function  25 C (step S 42 ). The encryption function  25 A extracts all the pairs of the items of the contract data having common keys (in other words, the items of the contract data that can be encrypted) and the encrypted common keys corresponding to these items, included in the concealment management information (step S 43 ). Assuming that the items of the contract data that can be encrypted are, for example, the accounts for which org1.userA has requested encryption in area R 52  in  FIG. 6 , they are contract1.contractors, contract2.contractors, contract 1.amount, and contract2.amount. The encryption function  25 A performs an encryption process using information on the items and the common keys, as illustrated in  FIG. 8B  (step S 44 ). 
     As illustrated in  FIG. 8B , the encryption function  25 A encrypts the items of the contract data that can be encrypted using the extracted common keys. Each common key has been encrypted. Hence, the encryption⋅decryption processing unit  25  decrypts each common key with the secret keys stored the secret-key storing DB  24 C (step S 51 ). 
     The encryption function  25 A encrypts each item of the contract data that can be encrypted, using the corresponding decrypted common key (step S 52 ). Through this process, the contract data with part of the items of the contract data encrypted is outputted. The encryption⋅decryption processing unit  25  transmits the contract data with part of the items encrypted to the contract-data processing unit  23  (step S 53 ). 
     Returning to  FIG. 8A , the contract-data processing unit  23  transmits the contract data with part of the items encrypted to the verification-terminal coordination unit  21 , and the verification-terminal coordination unit  21  includes the contract data into a transaction and transmits the transaction to the verification terminal  1 A (step S 45 ). The verification terminal  1 A consents to the transaction, following the protocol of the blockchain system and registers the contract data with part of the items encrypted in the distributed ledger. 
       FIG. 9  is a flowchart illustrating a method of decrypting data that the intermediate servers  2 B and  2 C execute. The details are as follows. Here, description will be made of a case of receiving a request for decryption from the user terminal  3 X or the user terminal  3 S which is permitted to decrypt the encryption items. Note that in the case where the encryption⋅decryption processing unit  25  receives a request for decryption from a user terminal for which the decryption is not permitted, the encryption⋅decryption processing unit  25  does not execute the following decryption process but returns a screen indicating an error or a screen with the encrypted items displayed as blank, to the user terminal. 
     The contract-data processing unit  23  receives a request for decrypting the encryption items of the contract data from a user terminal. Receiving the request for decryption, the contract-data processing unit  23  requests the encryption⋅decryption processing unit  25  to perform the decryption (step S 61 ). 
     The concealment-management-information acquisition function  25 C of the encryption⋅decryption processing unit  25  acquires the concealment management information and the contract data from the distributed ledger  12 A (step S 62 ). The concealment-management-information acquisition function  25 C acquires the list of all the pairs of the encryption items for which the common keys have been distributed and the respective common keys, for the account requesting the decryption (step S 63 ). Here, the above common keys included in the concealment management information have been encrypted with the public key of the above account. Hence, the encryption⋅decryption processing unit  25  acquires the secret key for the above account from the secret-key storing DB  24 C (step S 64 ) and decrypts all the encrypted common keys with the secret key (step S 65 ). 
     The encryption⋅decryption processing unit  25  decrypts all the encrypted items of the contract data including the encryption items, using all the above decrypted common keys (step S 66 ). When the encryption⋅decryption processing unit  25  determines that steps S 65  and S 66  have been executed on all the encryption items that can be decrypted and the common keys (Yes step S 67 ), the encryption⋅decryption processing unit  25  transmits the contract data with the encryption items decrypted to the contract-data processing unit  23  (step S 68 ). Having acquired the contract data, the contract-data acquisition function  23 B of the contract-data processing unit  23  transmits the contract data to the account requesting the decryption. Through this process, the display unit of the user terminal  3 X or the user terminal  3 S displays the decrypted contract data. Thus, the user can view the contract data. 
     The present embodiment allows contract data to be encrypted and decrypted using blockchain without using a centralized server. This makes it possible to encrypt and decrypt contract data while maintaining advantage of distributed authority. 
     In the present embodiment, a public key is generated for each account of a user having the access authority for an item to be encrypted. This allows the user himself/herself to specify encryption items of contract data and the disclosure range in a flexible manner. In other words, the users having no access authority cannot sneak a look at the data the viewing authority for which the user does not have. 
     In addition, since the concealment management information is managed on the distributed ledger  12 A in the present embodiment, the complexity of concealment procedures or key management is reduced, which in turns reduces the operational cost and security risk. 
     In the present embodiment, the concealment management information is registered in the distributed ledger  12 A via transactions. Concealment of contract data is performed by acquiring the concealment management information registered in the distributed ledger  12 A. This improves the resistance to attack on the concealment management information. 
     In the present embodiment, a common key is generated for each item to be encrypted included in contract data. This makes it possible to specify which item to be encrypted in a flexible manner. 
     In the present embodiment, when common keys have been distributed (registered in the distributed ledger  12 A) to the accounts of users having the access authority for items, the intermediate server  2 A encrypts common keys and respective items, using the common keys that have been already distributed. Thus, when registering contract data, processes for registering new common keys are not necessary to encrypt the contract data, which reduces the processing load of the intermediate server  2 A. 
     In the present embodiment, since keys are exchanged on the blockchain in the concealment system S, past key exchange histories, such as who has been permitted to view which item and to whom common keys have been distributed, are maintained as records. Further, tampering with keys is more difficult and the evidence is more convincing than in the case where keys are exchanged in an external server. 
     The above embodiment has been described as a typical example. However, it is apparent to those skilled in the art that many changes and substitutions are possible within the spirit and the scope of the present invention. Hence, it should not be understood that the present invention is limited by the above embodiment, but various modifications and changes are possible without departing from the range of the claims. For example, multiple configuration blocks depicted in a configuration diagram of the embodiment may be combined into one, or one configuration block may be divided into multiple ones. 
     Embodiment 2 
     In the above embodiment 1, the intermediate server  2 A encrypts specified items using common keys in the concealment management information and register the contract data. In contrast, the intermediate server  2 A in embodiment 2 always generates new common keys every time the intermediate server  2 A receives a request for registering the contract data, and the intermediate server  2 A encrypts specified items and registers the contract data. Details of embodiment 2 are as follows. The same description of embodiment 2 as that of embodiment 1 will be omitted. 
     When the contract-data processing unit  23  receives a request for registering contract data from a user terminal, the contract-data processing unit  23  specifies which item of the contract data is to be encrypted and to which account the common key is to be distributed. The information specified may be inputted through the user terminal  3 A or may be set in advance in a setting file. In response to the request for registering the contract data, the key generation unit  22  generates new common keys. Note that these processes correspond to steps S 5  and S 6  in  FIG. 6 . It is assumed that the processes at steps S 1  to S 4  in  FIG. 6  have been performed already. 
     The intermediate server  2 A creates concealment management information by a method illustrated in  FIG. 6 . Specifically, the intermediate server  2 A executes steps S 7  to S 11  illustrated in  FIG. 6 , but here description thereof is omitted because the description is the same. 
     The encryption function  25 A acquires concealment management information from the distributed ledger  12 A through the concealment-management-information acquisition function  25 C. The encryption function  25 A encrypts part of the item of the contract data, using the newly generated common keys included in the concealment management information. The contract-data processing unit  23  transmits the contract data with part of the items encrypted to the verification-terminal coordination unit  21 , which includes the contract data in a transaction and transmits it to the verification terminal  1 A. 
     Embodiment 3 
     In embodiment 3, when the intermediate server  2 A registers the contract data with part of the items encrypted and the common keys, the intermediate server  2 A may notify the user terminals to which the contract data is disclosed. In addition, when the user who has written in the contract data changes the common keys, the intermediate server  2 A may communicate the change to the user terminals to which the contract data is disclosed. 
     In the case where the verification terminal, the intermediate server, or the user terminal is composed of a computer, these functions can be implemented by storing a program in which process details for implementing each function are described, in a storage unit inside or outside the computer and by a central processing unit (CPU) of the computer reading and executing the program. Such a program can be distributed by, for example, selling, giving, and renting portable recording media such as DVD and CD-ROM. Alternatively, such a program can be distributed by, for example, storing the program in a storage unit of a server on a network and transferring the program from the server to other computers via the network. Computers that execute such a program may, for example, temporarily store the program recorded on a portable recording medium or transferred from a server in its own storage unit. As another implementation aspect of this program, a computer may read the program directly from a portable recording medium and execute processes according to the program. Further, every time a program is transferred from a server to this computer, the computer may sequentially execute a process according to the received program. 
     EXPLANATION OF THE REFERENCE NUMERALS 
     
         
         
           
             S concealment system 
               1 A,  1 B,  1 C verification terminal 
             control unit 
               11 A contract-data storage function 
               11 B concealment management function 
               12  storage unit 
               12 A distributed ledger 
               12 A 1  data store 
               12 A 2  state DB 
               2 A,  2 B,  2 C intermediate server 
               21  verification-terminal coordination unit 
               21 A transaction transmission function 
               21 B distributed-ledger reference function 
               21 C signature-key storing DB 
               22  key generation unit 
               22 A public-key⋅secret-key generation function 
               22 B common-key generation function 
               23  contract-data processing unit 
               23 A contract-data registration function 
               23 B contract-data acquisition function 
               24  key registration unit 
               24 A public-key registration function 
               24 B secret-key storage function 
               24 C secret-key storing DB 
               25  encryption⋅decryption processing unit 
               25 A encryption function 
               25 B decryption function 
               25 C concealment-management-information acquisition function 
               3 A,  3 B,  3 C,  3 X,  3 Y,  3 Z,  3 S,  3 T,  3 U user terminal 
               31  control unit 
               32  display unit 
               33  storage unit