Tamper detection device and tamper detection program
The tampering detection device and program ensure accurate detection of data tampering by verifying hash values across multiple nodes, addressing the issue of undetected tampering when the blockchain hash value is compromised.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- DENSO CORP
- Filing Date
- 2025-09-15
- Publication Date
- 2026-06-04
AI Technical Summary
Existing tampering detection methods fail to accurately detect data tampering when the hash value recorded in the blockchain is itself tampered with, allowing malicious actors to evade detection.
A tampering detection device and program that utilizes a data storage system with a database and blockchain nodes to verify the integrity of original data hash values by comparing them across multiple nodes, ensuring accuracy through consensus-based verification.
Enables accurate detection of data tampering even if the hash value is altered, enhancing the reliability of tampering detection by utilizing a consensus-based verification mechanism.
Smart Images

Figure 2026091798000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a tampering detection device that detects tampering when data is tampered with, and a tampering detection program.
Background Art
[0002] Patent Document 1 discloses a technique for detecting tampering with data recorded in a database. The tampering detection system disclosed in Patent Document 1 registers the hash value of the data registered in the database in a blockchain. When data is acquired, the hash value of the data is recalculated and compared with the hash value in the blockchain to enable tampering detection. The description of the prior art document is incorporated herein by reference as an explanation of the technical elements in this specification.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] However, the tampering detection method disclosed in Patent Document 1 cannot detect tampering when the hash value recorded in the blockchain is tampered with. Specifically, when a malicious third party tampers with the original data stored in the database, calculates the hash value of the tampered original data, and overwrites the hash value recorded in the blockchain with the hash value of the tampered original data, tampering cannot be detected. Thus, in that the tampering of the original data cannot be detected when the hash value calculated from the original data is also tampered with, there is a desire to improve the accuracy of detecting that the original data has been tampered with in the technology disclosed in Patent Document 1.
[0005] This disclosure is made in light of these circumstances and aims to provide a data tampering detection device and a data tampering detection program that can accurately detect tampering with the original data. [Means for solving the problem]
[0006] The above objectives are achieved by combinations of features described in the independent claims, and the subordinate claims provide further advantageous specific examples. The reference numerals in parentheses in the claims indicate a correspondence with specific embodiments described later as one aspect, and do not limit the disclosed technical scope.
[0007] One disclosure relating to a tamper detection device for achieving the above objective is: A tampering detection device that detects tampering when the original data stored in the data storage system (10) has been altered, The data storage system is The original data DB (22) is a database that stores the original data, A blockchain node (30) holds a blockchain (31) which includes a block (40) in which the original data hash value (71), which is a hash value calculated from the original data, The tampering detection device is The original data acquisition unit (91) acquires the original data from the original data DB, The original data acquisition unit calculates a hash value from the original data acquired by the original data acquisition unit, and the original data matching unit (92, 392) determines whether the calculated hash value matches the original data hash value corresponding to the original data acquired by the original data acquisition unit. The blockchain node is designated as the local node (30A), and the other node data acquisition unit (93) acquires the original data hash value corresponding to the original data acquired by the original data acquisition unit from other nodes (30B, 30C) that are different from the local node and hold the blockchain, A hash value verification unit (94) verifies whether the original data hash value that the original data matching unit determined to match the original data has been tampered with, based on the original data hash value recorded on its own node and corresponding to the original data, and the original data hash value obtained by the other node data acquisition unit. Based on the judgment result of the original data matching unit and the verification result of the hash value verification unit, the tampering determination unit (95, 295, 395) determines whether or not the original data has been tampered with, It is a tampering detection device that includes [a specific feature / function].
[0008] The original data matching unit calculates a hash value from the original data and determines whether the calculated hash value matches the original data hash value. Assuming that the original data hash value has not been tampered with, if the original data has been tampered with, the hash value calculated from the original data should not match the original data hash value.
[0009] Then, the hash value verification unit verifies whether the original data hash value, which the original data matching unit determines to match the original data, has been tampered with, based on the original data hash value recorded on its own node and the original data hash value recorded on other nodes.
[0010] Therefore, the tampering detection unit can determine whether the original data has been tampered with based on the judgment result of the original data matching detection unit and the verification result of the hash value verification unit. Thus, the tampering detection device can detect that the original data has been tampered with even if the hash value of the original data has been altered, and can therefore detect tampering with the original data with high accuracy.
[0011] One disclosure relating to a tamper detection program for achieving the above objectives is: A data storage system (10) comprising a data storage system (10) comprising a data storage system (10) comprising a data storage system (22) which is a database storing the original data, a data storage system (22) which is The processor, The original data acquisition unit (91) acquires the original data from the original data DB, The original data acquisition unit calculates a hash value from the original data acquired by the original data acquisition unit, and the original data matching unit (92, 392) determines whether the calculated hash value matches the original data hash value corresponding to the original data acquired by the original data acquisition unit. The blockchain node is designated as the local node (30A), and the other node data acquisition unit (93) acquires the original data hash value corresponding to the original data acquired by the original data acquisition unit from other nodes (30B, 30C) that are different from the local node and hold the blockchain, A hash value verification unit (94) verifies whether the original data hash value that the original data matching unit determined to match the original data has been tampered with, based on the original data hash value recorded on its own node and corresponding to the original data, and the original data hash value obtained by the other node data acquisition unit. This is a tamper detection program that functions as a tamper detection unit (95, 295, 395) that determines whether or not the original data has been tampered with, based on the judgment result of the original data matching unit and the verification result of the hash value verification unit. [Brief explanation of the drawing]
[0012] [Figure 1] A diagram showing the configuration of the data storage system according to the first embodiment. [Figure 2] A diagram showing the components of a control circuit. [Figure 3] A diagram explaining blockchain. [Figure 4] A diagram showing the data structure of a block. [Figure 5] A diagram showing that a plurality of blockchain nodes are interconnected. [Figure 6] A diagram showing the functions executed by the control circuit in the first embodiment. [Figure 7] A diagram showing the flow of processing executed by the control circuit in the first embodiment. [Figure 8] A diagram showing the flow of processing executed by the control circuit in the second embodiment. [Figure 9] A diagram showing the configuration of the data storage system in the third embodiment. [Figure 10] A diagram showing the functions executed by the control circuit in the third embodiment. [Figure 11] A diagram showing the flow of processing executed by the control circuit in the third embodiment. [Figure 12] A diagram showing the flow of processing executed by the control circuit in the fourth embodiment.
Modes for Carrying Out the Invention
[0013] <First Embodiment> Hereinafter, embodiments will be described based on the drawings. FIG. 1 shows the configuration of a data storage system 10 according to the first embodiment. The data storage system 10 includes an original data management terminal 20 and a blockchain node 30.
[0014] The original data management terminal 20 is a terminal that manages original data. The original data can also be called raw data. The original data is data that serves as a basis for calculating a hash value. The original data may be electronic data and has no other restrictions. An example of the original data is various data that can be obtained from a vehicle, for example, the driving distance and the remaining battery level of the in-vehicle battery. Another example of the original data is multimedia data including one or both of video data and audio data.
[0015] The original data management terminal 20 includes a communication circuit 21, an original data DB 22, and a control circuit 23. The communication circuit 21 is a circuit for communicating with the blockchain node 30. Communication by the communication circuit 21 is either wired communication, wireless communication, or both. The original data DB 22 is a database for storing original data in the data storage system 10. The original data DB 22 stores original data grouped into arbitrary units, associated with original data IDs that identify that original data. The original data DB 22 is stored in a storage medium 24. The storage medium 24 is a hardware device. The storage medium 24 is, for example, a hard disk.
[0016] As shown in Figure 2, the control circuit 23 comprises a processor 23a, RAM 23b, and storage 23c. The processor 23a is hardware for arithmetic processing and can execute various programs by accessing RAM 23b. The storage 23c is a storage medium that stores programs executed by the processor 23a. The programs stored in storage 23c include a tamper detection program for detecting tampering if the original data stored in the original data DB 22 has been altered. When the processor 23a executes this tamper detection program, the original data management terminal 20 operates as a tamper detection device.
[0017] Furthermore, the storage 23c may store data processing programs that perform operations such as adding and deleting original data to the original data DB 22, and programs for controlling the communication circuit 21.
[0018] Blockchain node 30 holds blockchain 31. Blockchain node 30 also includes blockchain DB 32, control circuit 33, and communication circuit 34. Blockchain 31 contains multiple blocks 40, as shown in Figure 3. In the example in Figure 3, blockchain 31 has five blocks 40.
[0019] Figure 4 shows the data structure of block 40. Block 40 comprises a block header 50 and a block body 60. The block header 50 contains the block number 51, the Merkle root 52, and the previous block hash value 53.
[0020] Block number 51 is assigned to block 40 to distinguish it from other blocks 40. Merkle root 52 is the hash value of block body 60. More specifically, Merkle root 52 is the hash value calculated when transaction 70 is added to block body 60, based on the hash value of the previous block body 60 and the hash value of the newly added transaction 70. Hash values are calculated using various pre-configured hash functions, such as SHA-256. The previous block hash value 53 is the hash value calculated from the entirety of the previous block 40. Note that the first block 40 does not have a previous block 40. Therefore, the previous block hash value 53 included in the first block 40 is an arbitrary hash value, such as the hash value of the block creation date and time, or the hash value of current events news at that time.
[0021] The block body 60 contains one or more transactions 70. Each transaction 70 contains an original data hash value 71 and an original data ID 72. The original data hash value 71 is a hash value calculated from the original data identified by the original data ID 72.
[0022] Let's return to the explanation in Figure 1. Blockchain DB 32 is a database that stores the original data hash value 71 and original data ID 72 recorded in all blocks 40. Blockchain 31 and Blockchain DB 32 are stored in storage medium 35. Storage medium 35 is a hardware device. The storage medium 35 in which Blockchain 31 is stored and the storage medium 35 in which Blockchain DB 32 is stored may be the same or different.
[0023] The hardware configuration of the control circuit 33 is the same as that of the control circuit 23 in the original data management terminal 20. As shown in Figure 2, the control circuit 33 also includes a processor 33a, RAM 33b, and storage 33c. The storage 33c stores programs that the processor 33a executes. By executing the programs stored in storage 33c, the processor 33a performs updates to the blockchain 31 and blockchain DB 32. The communication circuit 34 is a circuit for communicating with the original data management terminal 20 and other blockchain nodes 30B and 30C shown in Figure 5. Communication by the communication circuit 34 is either wired communication or wireless communication, or both.
[0024] As shown in Figure 5, multiple blockchain nodes 30 can communicate with each other via a communication network 80. In Figure 5, blockchain node 30A is the same blockchain node 30 shown in Figure 1. Therefore, blockchain node 30A is an element of the data storage system 10. Figure 5 shows three blockchain nodes 30A, 30B, and 30C.
[0025] In the following, blockchain node 30A may be referred to as the local node, and the other blockchain nodes 30 may be referred to as other nodes. In Figure 1, there are two other nodes, blockchain nodes 30B and 30C. However, there may be three or more other nodes. There is no upper limit to the number of other nodes. The number of other nodes may be 100 or more, or even 1000 or more. Note that blockchain nodes 30 other than blockchain node 30A may be connected to a different source data management terminal 20 than the source data management terminal 20 to which blockchain node 30A is connected. The configuration of the other nodes is the same as that of blockchain node 30A. Therefore, the other nodes also hold blockchain 31.
[0026] In the data storage system 10, the original data hash value 71 calculated from the original data stored in the original data DB 22 is recorded in the blockchain 31. The original data hash value 71 is also recorded in the blockchain DB 32. Therefore, if the original data stored in the original data DB 22 is tampered with, it is easier to detect the tampering. This is because, if the original data is tampered with, the original data hash value 71 calculated from the tampered original data will no longer match the original data hash value 71 recorded in the blockchain 31 or the original data hash value 71 stored in the blockchain DB 32.
[0027] However, if the following occurs, even if the original data is tampered with, the original data hash value 71 calculated from the tampered original data will match the original data hash value 71 recorded in blockchain 31 or blockchain DB 32.
[0028] In other words, a malicious third party tampers with the original data stored in the original data DB22, and then calculates the original data hash value 71 from the tampered original data. Then, they overwrite the original data hash value 71 recorded in the blockchain 31 and the original data hash value 71 stored in the blockchain DB32 with the calculated original data hash value 71. When this is done, the original data hash value 71 calculated from the original data will match the original data hash value 71 recorded in the blockchain 31 or the blockchain DB32. Therefore, in this embodiment, the control circuit 23 executes the function shown in Figure 6.
[0029] Figure 6 shows the functions performed by the control circuit 23. When the processor 23a executes the tamper detection program stored in the storage 23c, the control circuit 23 functions as the original data acquisition unit 91, original data matching unit 92, other node data acquisition unit 93, hash value verification unit 94, and tamper detection unit 95 shown in Figure 6.
[0030] The source data acquisition unit 91 acquires source data from the source data DB 22. The source data to be acquired is identified by the source data ID entered by the user through user operation or other means.
[0031] The original data matching determination unit 92 obtains the original data hash value corresponding to the original data obtained by the original data acquisition unit 91 from the blockchain DB 32. It also calculates a hash value from the original data obtained by the original data acquisition unit 91. Various hash functions can be used to calculate the hash value if they are set in advance. Then, it determines whether the hash value calculated from the original data matches the original data hash value 71 obtained from the blockchain DB 32.
[0032] The other node data acquisition unit 93 acquires the original data hash value 71 from the other node, which corresponds to the original data acquired by the original data acquisition unit 91. The other node refers to a node different from the local node. The local node is blockchain node 30, i.e., blockchain node 30A, which has the blockchain DB 32 from which the original data matching determination unit 92 acquired the original data hash value. Therefore, in Figure 1, the other nodes are blockchain nodes 30B and 30C.
[0033] The number of other nodes from which the other node data acquisition unit 93 obtains the original data hash value 71 is multiple. The other node data acquisition unit 93 may obtain the original data hash value 71 from all other nodes that are capable of obtaining it. However, in the first embodiment, the number of other nodes from which the other node data acquisition unit 93 obtains the original data hash value 71 is set in advance. If the number of other nodes from which the original data hash value 71 is obtained is a part of the other nodes from which the data storage system 10 can communicate, the other node data acquisition unit 93 randomly determines which other nodes will obtain the original data hash value 71.
[0034] Furthermore, the other node data acquisition unit 93 may select a certain percentage of other nodes from which the data storage system 10 can communicate to acquire the original data hash value 71. However, if the number of nodes obtained by converting this percentage does not exceed a certain number, the original data hash value 71 will be acquired from that certain number of other nodes.
[0035] The hash value verification unit 94 verifies whether the original data hash value 71, which is recorded on its own node and corresponds to the original data, has not been tampered with. For this verification, in addition to the original data hash value 71 obtained from its own node, the other node data acquisition unit 93 uses the original data hash value 71 obtained from other nodes.
[0036] Assuming that the original data hash values 71 obtained from any blockchain node 30 have not been tampered with, all original data hash values 71 obtained by the other node data acquisition unit 93 should be the same. However, the hash value verification unit 94 also considers the possibility that some of the original data hash values 71 obtained from some blockchain nodes 30 may have been tampered with.
[0037] The hash value verification unit 94 calculates the ratio of the original data hash values 71 that are the same as the original data hash value 71 obtained from its own node, out of all the original data hash values 71 obtained. The total original data hash values 71 obtained are the sum of the original data hash values 71 obtained from its own node and the original data hash values 71 obtained from other nodes.
[0038] The hash value verification unit 94 compares the calculated ratio with the ratio threshold. If the calculated ratio is higher than the ratio threshold, the hash value verification unit 94 determines that the original data hash value 71 obtained from its own node has not been tampered with. The higher the ratio threshold, the more reliable the determination that the original data hash value 71 obtained from its own node has not been tampered with. However, if the ratio threshold is high, it becomes difficult to determine that the original data hash value 71 obtained from its own node has not been tampered with, even if it has not. In other words, if the ratio threshold is high, it may be determined that the original data hash value 71 obtained from its own node has potentially been tampered with, even if it has not.
[0039] The ratio threshold is set considering the points mentioned above. The ratio threshold is, for example, 50%. In this case, if the ratio of the original data hash values 71 obtained from the local node that are the same as the original data hash values 71 is higher than 50% of all obtained original data hash values 71, then it is determined that the original data hash values 71 obtained from the local node have not been tampered with.
[0040] The ratio threshold may be changed according to the number of blockchain nodes 30 that have obtained the original data hash value 71, using the concept of a solution to the Byzantine Generals Problem. The Byzantine Generals Problem is known to allow for correct consensus if there are F fraudulent computers and at least 2F+1 legitimate computers. Applying this to this embodiment, we consider the number of tampered original data hash values 71 to be F. The ratio threshold can be calculated as (2F+1) / (F+2F+1). For example, if F is 1, the ratio threshold is 0.75, or 75%. Considering integer percentages, the ratio threshold can be set to 72% when F is 2, 70% when F is 3 or 4, and 69% when F is 5.
[0041] The tampering detection unit 95 determines whether the original data has been tampered with based on the determination result of the original data matching detection unit 92 and the verification result of the hash value verification unit 94. Specifically, the tampering detection unit 95 determines that the original data may have been tampered with if the determination result of the original data matching detection unit 92 is that the data does not match. In addition, the tampering detection unit 95 also determines that the original data may have been tampered with if the verification result of the hash value verification unit 94 indicates that the original data hash value 71 obtained from its own node may have been tampered with.
[0042] On the other hand, the tampering detection unit 95 determines that the original data has not been tampered with if the original data matching detection unit 92 determines that the data matches, and the hash value verification unit 94 determines that the original data hash value 71 obtained from its own node has not been tampered with. Note that, in order to avoid making the diagram complex, the lines showing the data flow between the tampering detection unit 95 and other elements have been omitted in Figure 6.
[0043] Figure 7 shows the process executed by the control circuit 23 when the processor 23a executes the tamper detection program. The process shown in Figure 7 is executed when a request for the provision of original data is made to the data storage system 10. The request for the provision of original data includes an original data ID that identifies the original data to be provided.
[0044] S1 is executed by the original data acquisition unit 91. In S1, the original data is acquired from the original data DB 22 based on the original data ID included in the original data provision request.
[0045] Steps S2 through S4 are executed by the original data matching determination unit 92. In S2, a hash value is calculated from the original data obtained in S1. In S3, the original data hash value 71, which has the same original data ID as the original data obtained in S1, is obtained from the blockchain DB 32. In S4, it is determined whether the hash value calculated in S2 matches the original data hash value 71 obtained in S3. If the result of the determination in S4 is NO, the process proceeds to S8; if the result of the determination in S4 is YES, the process proceeds to S5.
[0046] S5 is executed by the hash value verification unit 94. In S5, the blockchain node 30A, which is the local node, obtains the original data hash value 71 from the blockchain 31 it holds, which has the same original data ID as the original data obtained in S1.
[0047] S6 is executed by the other node data acquisition unit 93. In S6, the other node acquires the original data hash value 71 from a block 40 of the blockchain 31 held by the other node, which has the same block number as the block 40 from which the original data hash value 71 was acquired in S5, and which has the same original data ID as the original data acquired in S1. The other node from which the original data hash value 71 is acquired is, for example, a predetermined number of other nodes. If the predetermined number of other nodes are part of the other nodes that can communicate, the other node from which the original data hash value 71 is acquired is determined randomly.
[0048] S7 is executed by the hash value verification unit 94. In S7, it is determined whether the ratio of the original data hash values 71 obtained in S5 and S6 that are the same as the original data hash value 71 obtained from the local node in S5 is higher than the ratio threshold. The ratio threshold is, for example, 50%, as described in the explanation of the hash value verification unit 94. If the result of S7 is NO, it can be determined that the original data hash value 71 obtained from the local node may have been tampered with. If the result of S7 is NO, the process proceeds to S8. On the other hand, if the result of S7 is YES, the process proceeds to S9.
[0049] S8 and S9 are executed by the tampering detection unit 95. If the process proceeds to S8, it is determined that the original data may have been tampered with. If it is determined that the data may have been tampered with, this may be indicated on the display unit of the original data management terminal 20. On the other hand, if the process proceeds to S9, it is determined that the original data has not been tampered with. If the process proceeds to S9, this may be indicated on the display unit of the original data management terminal 20.
[0050] In the first embodiment described above, the original data matching determination unit 92 calculates a hash value from the original data (S2) and determines whether the calculated hash value matches the original data hash value 71 (S4). Assuming that the original data hash value 71 has not been tampered with, if the original data has been tampered with, the hash value calculated from the original data should not match the original data hash value 71. Therefore, if the hash value calculated from the original data does not match the original data hash value 71 (S4: NO), the tampering determination unit 95 determines that the original data may have been tampered with (S8).
[0051] Furthermore, the hash value verification unit 94 verifies whether the original data hash value 71, which the original data matching determination unit 92 determines to be a match with the original data, has been tampered with, based on the original data hash value 71 recorded on its own node and the original data hash value 71 recorded on other nodes (S7). If, as a result of this verification, it is determined that there is a possibility that the original data hash value 71 has been tampered with (S7:NO), the tampering determination unit 95 also determines that there is a possibility that the original data has been tampered with (S8).
[0052] In this way, the tampering detection unit 95 can determine whether the original data has been tampered with based on the determination result of the original data matching detection unit 92 and the verification result of the hash value verification unit 94. Therefore, the original data management terminal 20 can detect that the original data has been tampered with even if the original data hash value 71 has been altered, thus enabling accurate detection of original data tampering.
[0053] Furthermore, the data storage system 10 includes a blockchain DB 32 in which the original data hash values 71 are stored. The original data matching determination unit 92 then obtains the original data hash value 71 corresponding to the original data obtained by the original data acquisition unit 91 from the blockchain DB 32 (S3). In this way, in this embodiment, the tampering of the original data can be detected by utilizing the original data hash value 71 stored in the blockchain DB 32.
[0054] Furthermore, the original data hash value 71 stored in blockchain DB32 and the original data hash value 71 recorded in blockchain 31 should match. In particular, if the system periodically checks whether the original data hash value 71 stored in blockchain DB32 and the original data hash value 71 recorded in blockchain 31 are consistent, there is a high probability that the two original data hash values 71 will match. Therefore, the hash value verification unit 94 verifies whether the original data hash value 71 recorded in blockchain 31 has been tampered with, rather than the original data hash value 71 stored in blockchain DB32.
[0055] Furthermore, if the number of other nodes that acquire the original data hash value 71 is only a fraction of the other nodes with which the data storage system 10 can communicate, the other node data acquisition unit 93 randomly selects the other nodes that acquire the original data hash value 71. This improves the reliability of the hash value verification unit 94's verification of whether the original data hash value 71 recorded on its own node has not been tampered with.
[0056] <Second Embodiment> Next, a second embodiment will be described. In this second embodiment and subsequent descriptions, elements having the same reference numerals as those used up to that point are identical to the elements with the same reference numerals in the previous embodiments, unless otherwise specified. Also, when only a part of the configuration is described, the previously described embodiments can be applied to the other parts of the configuration.
[0057] In the second embodiment, the functions performed by the control circuit 23 differ from those in the first embodiment. Figure 8 shows the functions performed by the control circuit 23 in the second embodiment. As shown in Figure 8, in the second embodiment, the control circuit 23 includes a blockchain DB verification unit 296. Also, the processing of the tampering detection unit 295 differs from that of the tampering detection unit 95 in the first embodiment.
[0058] The blockchain DB verification unit 296 obtains the original data hash value 71 corresponding to the original data obtained by the original data acquisition unit 91 from the blockchain DB 32, based on the original data ID. The blockchain DB verification unit 296 also obtains the original data hash value 71 corresponding to the original data obtained by the original data acquisition unit 91 from the blockchain 31, based on the original data ID. The blockchain DB verification unit 296 then determines whether the original data hash value 71 obtained from the blockchain DB 32 matches the original data hash value 71 obtained from the blockchain 31.
[0059] The tampering detection unit 295 determines whether the original data has been tampered with based on the determination result of the original data matching detection unit 92, the verification result of the hash value verification unit 94, and the determination result of the blockchain DB verification unit 296. More specifically, the tampering detection unit 295 determines that the original data may have been tampered with in addition to the cases in which the tampering detection unit 95 determines that the original data may have been tampered with. The tampering detection unit 295 also determines that the original data may have been tampered with if the blockchain DB verification unit 296 determines that the original data hash value 71 obtained from the blockchain DB 32 does not match the original data hash value 71 obtained from the blockchain 31.
[0060] Figure 9 shows the process that the control circuit 23 executes in place of the process shown in Figure 7 in the second embodiment. The process shown in Figure 9 differs from the process shown in Figure 7 in that it executes S5-1 after S5. S5-1 is executed by the blockchain DB verification unit 296. In S5-1, it is determined whether the original data hash value 71 obtained from the blockchain DB 32 in S3 matches the original data hash value 71 obtained from the local node's blockchain 31 in S5. If the result of the determination in S5-1 is NO, the process proceeds to S8. Therefore, if the result of the determination in S5-1 is NO, it is determined that the original data may have been tampered with. On the other hand, if the result of the determination in S5-1 is YES, the process proceeds to S6. The process from S6 onward is the same as in Figure 7, so it is omitted from the illustration.
[0061] In this second embodiment, the blockchain DB verification unit 296 determines whether the original data hash value 71 obtained from the blockchain DB matches the original data hash value 71 obtained from the blockchain 31. As a result, the tampering determination unit 295 can determine that there is a possibility of tampering even if the original data hash value 71 obtained from the blockchain DB 32 does not match the original data hash value 71 obtained from the blockchain 31.
[0062] <Third Embodiment> Figure 10 shows the configuration of the data storage system 310 of the third embodiment. The data storage system 310 differs from the data storage system 10 in that the blockchain node 30 does not have a blockchain DB 32. In addition, some of the functions performed by the control circuit 23 differ from those of the first and second embodiments.
[0063] Figure 11 shows the processing performed by the control circuit 23 when the processor 23a executes the tamper detection program in the third embodiment. In the third embodiment, the control circuit 23 also functions as a source data acquisition unit 91, an other node data acquisition unit 93, and a hash value verification unit 94. In addition, in the third embodiment, the control circuit 23 also functions as a source data matching determination unit 392 and a tampering determination unit 395.
[0064] In the third embodiment, since there is no blockchain DB 32, the original data matching determination unit 392 uses the original data hash value 71 recorded in the blockchain 31 to determine if the original data matches.
[0065] The original data matching determination unit 392 obtains the original data hash value corresponding to the original data obtained by the original data acquisition unit 91 from the blockchain 31 based on the original data ID. It also calculates a hash value from the original data obtained by the original data acquisition unit 91. Then, it determines whether the hash value calculated from the original data matches the original data hash value 71 obtained from the blockchain 31.
[0066] The tampering detection unit 395 determines whether the original data has been tampered with based on the determination result of the original data matching detection unit 392 and the verification result of the hash value verification unit 94. The processing of the detection unit 395 is the same as that of the tampering detection unit 95, except that it uses the determination result of the original data matching detection unit 392 instead of the determination result of the original data matching detection unit 92. Note that in Figure 11, the lines showing the data flow between the tampering detection unit 395 and other elements have been omitted.
[0067] Figure 12 shows the process that the control circuit 23 executes in place of Figure 7 in the third embodiment. The process shown in Figure 12 executes S3-1 in place of S3 in Figure 7.
[0068] S3-1 is executed by the original data matching determination unit 392. In S3-1, the original data hash value 71, which has the same original data ID as the original data obtained in S1, is obtained from the blockchain 31. Then, the process proceeds to S4.
[0069] Although embodiments have been described above, the disclosed technology is not limited to the embodiments described above. The following modifications are also included within the scope of disclosure, and further modifications can be made in various ways without departing from the gist of the invention.
[0070] <Example 1> Data storage systems 10 and 310 were equipped with a source data management terminal 20, but data storage systems may also be provided without a source data management terminal 20. In this case, the blockchain node 30 is equipped with the source data DB 22. Furthermore, the functions of the control circuit 23 are performed by the control circuit 33 provided by the blockchain node 30.
[0071] <Modification 2> In Figure 7, after the original data matching unit 92 determines whether the hash values match in S2-S4, the hash value verification unit 94 determines in S5 and S7 whether the original data hash value 71 has been tampered with. However, the order may be reversed, with the hash value verification unit 94 performing its processing first, followed by the original data matching unit 92. Similarly, in Figure 12, the hash value verification unit 94 may perform its processing first, followed by the original data matching unit 392.
[0072] <Variation 3> In the first embodiment, it was explained that in order for the hash value verification unit 94 to calculate the ratio to be compared with the ratio threshold, the other node data acquisition unit 93 may acquire the original data hash value 71 from all other nodes that can acquire the original data hash value 71, or the number of other nodes from which the original data hash value 71 is acquired may be set in advance. In this modified example 3, the number of other nodes from which the original data hash value 71 is acquired is 3, regardless of which other nodes can acquire the original data hash value 71. The reason for setting the number of other nodes from which the original data hash value 71 is 3 is explained below.
[0073] In the data storage system 10, the original data hash value 71 is held by multiple blockchain nodes 30. However, from the perspective of data sovereignty, the original data is held by only one blockchain node 30 or one original data management terminal 20 associated with that blockchain node 30. Therefore, it can be considered that there is only one node with a motive to tamper with the original data. In other words, it can be considered that there is only one fraudulent node. As mentioned above, using the idea of solving the Byzantine Generals Problem, if there are F fraudulent computers, a consensus can be reached correctly if there are 2F+1 or more legitimate computers. If we put 1 in F, we get "3". Since there are 3 legitimate nodes and 1 fraudulent node, there are a total of 4 nodes. From the above, the number of other nodes that can obtain the original data hash value 71 should be 3. The 3 other nodes can be determined randomly.
[0074] The ratio threshold can be calculated as (2F+1) / (F+2F+1) as described in the first embodiment, so it is 75%. The hash value verification unit 94 calculates the ratio of original data hash values 71 that are the same as the original data hash value 71 obtained from its own node, and if the calculated ratio is 75% or more, it determines that the original data hash value 71 has not been tampered with. [Explanation of Symbols]
[0075] 10...Data storage system, 20...Original data management terminal (tamper detection device), 22...Original data DB, 30...Blockchain node, 30A...Own node, 30B...Other node, 30C...Other node, 31...Blockchain, 32...Blockchain DB, 40...Block, 71...Original data hash value, 91...Original data acquisition unit, 92...Original data matching unit, 93...Other node data acquisition unit, 94...Hash value verification unit, 95...Tampering detection unit, 295...Tampering detection unit, 296...Blockchain DB verification unit, 392...Original data matching unit, 395...Tampering detection unit
Claims
1. A tampering detection device that detects tampering when the original data stored in the data storage system (10) has been altered, The aforementioned data storage system is The original data DB (22) is a database that stores the aforementioned original data, A blockchain node (30) holds a blockchain (31) which includes a block (40) in which a hash value (71) calculated from the original data is recorded, The aforementioned tampering detection device is A data acquisition unit (91) that acquires the original data from the original data DB, A data matching determination unit (92, 392) calculates a hash value from the original data acquired by the original data acquisition unit and determines whether the calculated hash value matches the original data hash value corresponding to the original data acquired by the original data acquisition unit. The blockchain node is designated as the local node (30A), and the other node data acquisition unit (93) acquires the original data hash value corresponding to the original data acquired by the original data acquisition unit from other nodes (30B, 30C) that are different from the local node and hold the blockchain, A hash value verification unit (94) verifies whether the original data hash value, which the original data matching determination unit determined to be a match with the original data, has been tampered with, based on the original data hash value recorded on the local node and corresponding to the original data, and the original data hash value acquired by the other node data acquisition unit. A tampering determination unit (95, 295, 395) determines whether or not the original data has been tampered with based on the determination result of the original data matching determination unit and the verification result of the hash value verification unit, A tampering detection device that includes [a specific feature / function].
2. The aforementioned data storage system is The system includes a blockchain DB (32) which is a database in which the aforementioned original data hash values are stored. The original data matching determination unit (92) obtains the original data hash value corresponding to the original data obtained by the original data acquisition unit from the blockchain DB, and determines whether the obtained original data hash value matches the hash value calculated from the original data obtained by the original data acquisition unit. The tampering detection device according to claim 1.
3. The blockchain DB verification unit (296) obtains the original data hash value corresponding to the original data obtained by the original data acquisition unit from the blockchain DB and the blockchain, respectively, and determines whether the original data hash value obtained from the blockchain DB matches the original data hash value obtained from the blockchain. The tampering determination unit (295) determines whether or not the original data has been tampered with based on the determination result of the original data matching determination unit, the verification result of the hash value verification unit, and the determination result of the blockchain DB verification unit. The tampering detection device according to claim 2.
4. The original data matching determination unit (392) obtains the original data hash value corresponding to the original data obtained by the original data acquisition unit from the blockchain, and determines whether the obtained original data hash value matches the hash value calculated from the original data obtained by the original data acquisition unit. The tampering detection device according to claim 1.
5. The aforementioned other node data acquisition unit acquires the original data hash value corresponding to the original data acquired by the original data acquisition unit from the three aforementioned other nodes. The hash value verification unit calculates the ratio of the original data hash value obtained from its own node to the original data hash value, and if the calculated ratio is 75% or more, it determines that the original data hash value has not been tampered with. The tampering detection device according to claim 1.
6. The other node data acquisition unit randomly determines which other node will acquire the original data hash value corresponding to the original data if the other node that acquires the original data hash value is only a part of the other nodes that can acquire the original data hash value. A tampering detection device according to any one of claims 1 to 5.
7. A data storage system (10) comprising a data storage system (10) comprising a data storage system (22) which is a database storing the original data, and a blockchain node (30) which holds a blockchain (31) which includes a block (40) in which a hash value (71) calculated from the original data is recorded, wherein the original data stored in the system is tampered with, and the tamper detection program is executed by a processor to detect tampering, The aforementioned processor, A data acquisition unit (91) that acquires the original data from the original data DB, A data matching determination unit (92, 392) calculates a hash value from the original data acquired by the original data acquisition unit and determines whether the calculated hash value matches the original data hash value corresponding to the original data acquired by the original data acquisition unit. The blockchain node is designated as the local node (30A), and the other node data acquisition unit (93) acquires the original data hash value corresponding to the original data acquired by the original data acquisition unit from other nodes (30B, 30C) that are different from the local node and hold the blockchain, A hash value verification unit (94) verifies whether the original data hash value, which the original data matching determination unit determined to be a match with the original data, has been tampered with, based on the original data hash value recorded on the local node and corresponding to the original data, and the original data hash value acquired by the other node data acquisition unit. A tamper detection program that functions as a tamper detection unit (95, 295, 395) that determines whether or not the original data has been tampered with, based on the determination result of the original data matching unit and the verification result of the hash value verification unit.