Method and device for verifying at least one piece of data obtained from a data provision service
The method and device validate data from external services by comparing execution results and using time stamps and signatures within a blockchain, addressing the trustworthiness issue of oracles and ensuring data accuracy.
Patent Information
- Application Number
- FR2023002399
- Authority / Receiving Office
- FR · FR
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-15
- Publication Date
- 2024-09-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing blockchain systems lack a reliable mechanism to verify the trustworthiness and accuracy of data provided by external oracles, which can inadvertently or maliciously provide erroneous data.
A method and device for verifying data from external data supply services, such as oracles, by comparing the results of a command execution between multiple smart contracts within a blockchain, using time stamps and electronic signatures to ensure data integrity and validity.
Ensures the accuracy and reliability of data provided by external services by validating the data through multiple smart contracts, preventing errors and ensuring data integrity and authenticity.
Smart Images

Figure 00000000_0000
Abstract
Description
Description Title of the invention: Method and device for verifying at least one piece of data obtained from a data supply service
[0001] 1. Field of the invention
[0002] — The invention relates to the general field of telecommunications networks, and more precisely to blockchain technology.
[0003] 2. Prior Art
[0004] — A blockchain is a trusted execution system guaranteeing, by example, the integrity and transparency of the execution of a process. Concretely, the Blockchain forms a distributed database whose users play a active role in its updating. It securely stores, in several blocks of data connected / chained together, the history of all transactions carried out by users. It is also accessible by each user without any inter- mediator. Thus, each user has the possibility to check the data that constitute and therefore its validity.
[0005] — Smart contracts of blockchains allow, for example, the management of the execution of process tasks and the allocation of these tasks in a decentralized and reliable manner. The objective of these contracts smart is to digitize physical processes by replacing paper contracts by computer code.
[0006] — To function properly, some smart contracts may need to data external to the blockchain, but the blockchain cannot access data stored outside its network. To solve this problem, the contract in- Telligent has the possibility of using the services of an "oracle" which has the possibility to add data from the outside world into a blockchain. Oracles provide a lot of data such as temperatures, results sports, schedules, etc. Depending on the information provided by the Oracles, the smart contract will execute or not.
[0007] — It must be noted that there is no technical mechanism which allows ensure that the oracle is trustworthy or that it has not made a mistake in providing information.
[0008] — 3. Statement of the invention
[0009] — The invention improves the state of the art and proposes for this purpose a method of verification of at least one first piece of data obtained from a supply service of data, the process being implemented by a verification device and ca- characterized in that it includes the following steps: obtaining an order issued to said service; obtaining said at least one first data item corresponding to a first result of execution of said command by said service; obtaining at least one second data corresponding to a second result of execution of said command; verification of said at least one first data item based on said second result. Advantageously, the invention makes it possible to check the information / data provided by a data provision service. Concretely, the method obtains a command issued, for example by a user, to a data provision service and one or more data (first data) corresponding to the result (first result) of the execution of the command by the service. It also obtains a second result of execution of the command (the command being able to be executed by the method itself) then verifies the data or data obtained from the service for example via a comparison of the results of execution of the command. If they are identical then the data or data provided by the service are considered to be verified. According to a particular embodiment of the invention, a method as described above is characterized in that said service provides a blockchain with data external to said blockchain and in that said command is obtained from a first smart contract registered in said blockchain and said at least one first data item is obtained from a second smart contract registered in said blockchain. Advantageously, this embodiment makes it possible to control the information / data provided by a data provision service external to a blockchain such as an oracle. As a result, this embodiment proposes a new role associated with the management of a blockchain; that of oracle data verifier. Indeed, an oracle can accidentally or knowingly (for example when it is malicious) return erroneous data or omit data in its response. Thus, the invention makes it possible to verify the result (i.e. data) obtained following the execution of a command by an oracle and its completeness. Concretely, the method obtains from a first smart contract registered in the blockchain an order issued by a user to a first oracle. The method also obtains the result of the execution of the order by the first oracle, for example from a second smart contract. According to a particular embodiment, the first and second smart contracts are one and the same smart contract. According to a particular embodiment, the command can be obtained from the first smart contract and from the user of the blockchain. This embodiment makes it possible to compare the requests obtained and to ensure that the request to be processed by the process, i.e. issued by the first user to the oracle, is indeed the correct one. The method then obtains a second result of executing the command, for example from a second oracle. Then, the method verifies the first result, for example by comparing it to the second result. If they are identical, then the data provided by the service (i.e., the first oracle) is considered valid. According to a particular embodiment, the method can itself execute the command, in which case the method can be considered as the second oracle. According to a particular embodiment of the invention, a method as described above is characterized in that said verification step corresponds to a comparison of said at least one first data item with said second result and when the result of said comparison is negative a request for validity of all or part of said second result is sent to a third smart contract registered in said blockchain. This embodiment makes it possible to validate all or part of the second execution result of the command with a smart contract (third smart contract within the meaning of the invention) registered in the blockchain. Since a smart contract cannot be altered over time, all of the tests carried out by the third smart contract on the second execution result can be considered as certified. Thus, the result of these tests makes it possible to certify the validity of all or part of the second execution result of the command. The invention also proposes a method of validation, by a smart contract registered in a blockchain, of at least one piece of data obtained from a service for supplying said blockchain with data external to said blockchain, the method being characterized in that it comprises the following steps: obtaining a request sent to said service, said request comprising a first timestamp and a command; obtaining a first result of execution of said command by said service ; obtaining all or part of a second result of execution of said command comprising said at least one piece of data associated with a signature electronic and a second time stamp; and when said at least one data item is not included in said first result verification of the validity of said at least one piece of data via the control of the validity of said signature, of the seniority of said second stamp temporal in relation to the said first time stamp and the validity of said at least one data as a result of said command. Advantageously, the invention makes it possible to ensure the validity of the information / data provided by a data provision service of a blockchain. Concretely, the method obtains for example from a first user registered on a blockchain a request for information / data(s) (query within the meaning of the invention) sent to a first oracle (data provision service within the meaning of the invention). The request comprises at least one command to be executed by the oracle and a first timestamp indicating for example the date of issue or creation of the request / query. The method then obtains the result of the execution of the command by the oracle. The result is for example obtained from a smart contract registered on the blockchain. The method then obtains all or part of a second result of execution of the command, for example via a second user of the blockchain such as a second oracle. The response includes one or more data with, for each data obtained, an electronic signature and a second associated timestamp. For example, when the command is a SQL (Structure Query Language) type query, the data may correspond to one or more records in a database (one or more rows in the database). The second timestamp may then correspond to information on the chronology of the writing of the data within the database, such as the index of the database when it is only accessible in writing (no deletion of record / data / row within the database) or to a timestamp of the data itself. The electronic signature may correspond to the electronic signature of the entity that feeds the database. When the data obtained is not included in the first query execution result, the method verifies the validity of the received data by performing several tests. The first test consists of verifying that the signature associated with a piece of data is valid. Obviously, this assumes that the method has cryptographic key(s) (private and / or public) allowing this verification. The second test aims to verify that the received data is prior to the creation or issue of the query. To do this, the method verifies that the timestamp of the query is later than the timestamps of the data. Finally, the method also verifies that the received data corresponds to a valid response to the query.In case the received data corresponds to one or more rows of a database, the method checks that the set of data corresponds to a possible result of executing the SQL command. A command is a computer instruction allowing the execution of an order, an action or a series of orders and actions. An electronic signature (or digital signature) is a sequence of characters used to authenticate the author of data (for example, the entity that added data to a database) and to guarantee its authenticity. An electronic signature can also guarantee the inalterability of the data once it has been signed by the entity that holds / shares it. As is well known, most existing digital signature procedures are based on asymmetric cryptography such as the RSA algorithm. According to a particular embodiment of the invention, a method as described above is characterized in that the verification step is followed by a step of issuing a notification of validity of said at least one item of data. This embodiment makes it possible to inform / notify a user of the blockchain (oracle or not) of the validity or invalidity of the data obtained. According to a particular embodiment of the invention, a method as described above is characterized in that said verification step is preceded by a step of obtaining (E20) a parameter whose value corresponds to a financial amount and in that when the result of said verification is positive all or part of the value of said parameter is sent (E120, E121) to a user of said blockchain. This embodiment makes it possible to remunerate a user (for example a second oracle) of the blockchain when the latter provides / finds valid data (i.e. data which corresponds to all or part of a possible result of execution of the command) not transmitted by the oracle. To do this, the method obtains, for example from the first oracle, a parameter whose value corresponds to a financial amount. The value of the parameter can correspond to an amount denominated in a currency of a country, to a defined number of tokens of a cryptocurrency or more generally to any market value (for example calculation tokens of a computer server). Concretely, the parameter can be assimilated to a deposit / escrow granted by the oracle in the event of an error by the latter.When an error is found, all or part of the deposit is returned to the user (for example on one of their smart contracts) who detected the error, i.e. to the user who provided the process with valid data not transmitted by the oracle. The invention also relates to a device for verifying at least one first item of data obtained from a data supply service, characterized in that it comprises: a first module for obtaining a command sent to said service ; a second module for obtaining said at least one first data cor- corresponding to a first result of execution of said command by said service ; a third module for obtaining at least a second cor- corresponding to a second execution result of said command; a module for verifying said at least one first data item as a function of the said second result. The term module can correspond to a software component as well as to a hardware component or a set of hardware and software components, a software component itself corresponding to one or more computer programs or sub-programs or more generally to any element of a program capable of implementing a function or a set of functions as described for the modules concerned. In the same way, a hardware component corresponds to any element of a hardware assembly capable of implementing a function or a set of functions for the module concerned (integrated circuit, smart card, memory card, etc.). The invention also relates to a computer program comprising instructions for implementing the verification and / or validation method described above according to any of the particular embodiments described above, when said program is executed by a processor. The method can be implemented in various ways, in particular in hard-wired form or in software form. This program can use any programming language, and be in the form of source code, object code, or intermediate code between source code and object code, such as in a partially compiled form, or in any other desirable form. The invention also relates to a recording medium or information medium readable by a computer, and comprising instructions of a computer program as mentioned above. The recording media mentioned above can be any entity or device capable of storing the program. For example, the medium can comprise a storage means, such as a ROM, for example a CD ROM or a microelectronic circuit ROM, or a magnetic recording means, for example a hard disk. Furthermore, the recording media can correspond to a transmissible medium such as an electrical or optical signal, which can be conveyed via an electrical or optical cable, by radio or by other means. The programs according to the invention can in particular be downloaded from a network such as the Internet. This verification device and the computer program implementing the verification method have characteristics and advantages similar to those described previously in relation to the verification process. The computer program implementing the validation method has characteristics and advantages similar to those described previously in relation to the validation method. 4, List of figures Other characteristics and advantages of the invention will appear more clearly on reading the following description of particular embodiments, given as simple illustrative and non-limiting examples, and the appended drawings, among which: [Fig.1] [Fig.1] illustrates an example of an environment for implementing the invention according to a particular embodiment of the invention; [Fig.2] [Fig.2] represents the hardware architecture of a verification device according to a particular embodiment. [Fig.3] [Fig.3] represents in the form of a flowchart the main stages of the verification and validation methods according to a particular embodiment of the invention, 5. Description of an embodiment of the invention [Fig. 1] illustrates an example of an environment for implementing the invention according to a particular embodiment. The environment represented in [Fig. 1] comprises a blockchain BC and a database BDD. The environment also comprises two terminals O and BH belonging to users of the blockchain capable of providing the blockchain with data external to the blockchain. Terminal O belongs, for example, to an oracle. Terminal BH integrates a verification device capable of implementing the verification method and may also belong to an oracle. The environment further comprises a terminal S belonging to a user of the blockchain BC. The BC blockchain and / or a smart contract registered on the BC blockchain is capable of implementing the validation process. The O, S and BH terminals are, for example, terminals of the smartphone type (smartphone in English), tablet, server, connected television, connected object, on-board computer of a car, personal computer or any other terminal capable of communicating (sending and / or receiving requests) according to state-of-the-art technologies via, for example, an IP network (100), the network being able to be private or public. According to a particular embodiment of the invention, the BC blockchain can be hosted by one or more computer servers. [Fig. 2] illustrates a DISP device configured to implement the verification method according to a particular embodiment of the invention. The DISP device has the conventional architecture of a computer, and notably comprises a memory MEM, a processing unit UT, equipped for example with a processor PROC, and controlled by the computer program PG stored in memory MEM. The computer program PG comprises instructions for implementing the steps of the verification method as described later in support of [Fig.3], when the program is executed by the processor PROC. At initialization, the code instructions of the computer program PG are for example loaded into a memory before being executed by the processor PROC. The processor PROC of the processing unit UT notably implements the steps of the verification method according to any one of the particular embodiments described in relation to [Fig. 3] and according to the instructions of the computer program PG. The DISP device comprises a first obtaining module OBTI capable of obtaining a command issued to a data supply service such as, for example, an oracle of a blockchain. The command can be obtained from a user of the blockchain or from a smart contract registered in the blockchain. The DISP device also comprises a second OBT2 obtaining module capable of obtaining at least one piece of data corresponding to a result of execution of the command by the data supply service. The DISP device also comprises a third obtaining module OBT3 capable of obtaining a second result of execution of said command. The second result is for example obtained by the DISP device following the execution of the command by the verification method. The DISP device further comprises a verification module VERIF of the data(s) obtained via the OBT2 module. The verification is carried out, for example, by comparing the data(s) with the second result obtained via the OBT3 module. [Fig.3] illustrates steps of the verification and validation methods according to a particular embodiment of the invention in connection with the implementation environment described in support of [Fig.1]. In step E30, the oracle O sends a parameter to a smart contract SCy whose value corresponds to a financial amount, for example a number of tokens of a cryptographic currency, a number of tokens offering credits for using the BC blockchain or an amount denominated in an official currency of a country (Euro, Dollars, etc.). Concretely, the oracle O transfers a sum of money to the smart contract SCy. This money can be seen as a guarantee granted by the oracle O allowing for example to guarantee a certain quality of service / execution of action(s) on its part. When the oracle makes an error, the guarantee can be used to compensate the client and / or remunerate the actor who detected the error. The parameter is received by the SCy smart contract during step E20. In step E21, the smart contract SCy obtains from a client's terminal S an order whose recipient is the oracle O (not shown). The smart contract SCy also obtains a first timestamp associated with the received order. This timestamp corresponds, for example, to the date on which the order was received by the smart contract SCy and / or to a block number of the blockchain BC associated with the order. Alternatively, the timestamp may correspond to the date of creation of the order and / or of issue by the terminal S. Alternatively, the order is obtained from a client's smart contract (SC c). The order is, for example, obtained via or following the receipt of an event broadcast within the blockchain indicating the issuance, by the client's smart contract, of the order to the oracle O. According to a particular embodiment of the invention, the smart contract SCy relays the command obtained from the client's terminal S or from the smart contract SCc to the oracle and the terminal BH. Alternatively, the command is obtained by the terminal BH via or following the reception of an event broadcast within the blockchain indicating the transmission of the command to the oracle O. The command is obtained by the oracle O and the terminal BH respectively in steps E31 and E41. During step E32, the oracle executes the command. The command is for example capable of obtaining a set of rows from a table stored in a digital storage space such as a file, a database BDD, etc. For example, the command may correspond to a query carried out in a computer language of the SQL, NoSQL, OQL, Prolog type or to a list of filtering parameters making it possible to obtain, from the database BDD, one or more records (i.e. rows). Let's take the case of an SQL query for weather data. The database / DB table can correspond to: | Index [Latitude |Longitude [Temperature e Precipitation [Date [signa (Millimeter) Smm D1 sl 8mm Da |s2 7mm [ps [ss Omm s4 Omm DS ss The BDD database stores chronologically the temperature and rainfall readings of a weather station identified by its GPS position (latitude, longitude). Each new record added to the BDD table (index +1) is associated with an electronic signature Sn of the service that entered the information in the table and with a time data Dn (second time stamp in the sense of the invention) indicating for example the date of the temperature and rainfall measurements. In our case the electronic signature can correspond to the signature of the national meteorological service of the country or locality that manages the weather station in question. Alternatively, the signature may correspond to a digital fingerprint (e.g. a hash) of a unique piece of data belonging to the signatory and stored in one of their smart contracts within the blockchain. The database obtains the SQL query in step E52 and sends the result to the oracle O in step E53. In our example the SQL query can be: Select * From BDD where Index > 2 Once the result has been received by the oracle O (E33), it retransmits it (E34) to the smart contract SCy. The result received by the smart contract SCy during step E24 may, for example, correspond to: [index [Latitude (Longitude [Temperature Precipitation [Date [signature | (Millimeter) ? om [7396 |wc smm [2 |sz 3 [07 |-1396 |&c 7mm |pa \|ss 4 40.77 -73.96 11°C Omm D4 s4 In the example described above, the record of index 5 is not present even though it also corresponds to a possible result of the SQL query / command. The result provided by the oracle O is therefore partial (error by omission). This error can be accidental (data integrity problem following a technical / network problem) or caused by the oracle, for example, when it optimizes its processes to go faster, resulting in a lack of verification and lower processing quality. Since the information is provided by a so-called trusted entity, i.e. the oracle O, the SCy smart contract may not perform a validity test. According to a particular embodiment of the invention, the smart contract SCy can test the signature(s) of the data received from the oracle O (result of the command received during step E24). The smart contract SCy sends (E24_1) to the smart contract of the client SCC the result of the command obtained from the oracle O, the result being received by the smart contract of the client SCc at step E14_1. Obviously this assumes that the smart contract SCy knows the email address of smart contract SCc. The address of smart contract SCç is, for example, obtained when the command is received from the client's smart contract SCc (E21). Alternatively, the email address of smart contract SCc is sent from terminal S at the same time as the command (E21). In case the signatures are tested and they are not valid the SCy smart contract sends (E24_1) instead of or in addition to the result of the command a parameter indicating that the data sent is not valid. In step E45, the BH terminal sends a request to the SCc smart contract to obtain the result of the command provided by the oracle to the SCc smart contract. According to a particular embodiment of the invention, the sending of the request can be issued following the reception (for example from the blockchain or from the terminal S) by the terminal BH of an event indicating that the smart contract SCc and / or SCy has received the result of the command from the oracle O. Alternatively, the BH terminal sends a request to the SCy smart contract to obtain the command result provided by the oracle. The request is received by the smart contract SCc in step E15. The result received in step E14_1 is then transmitted to the terminal BH (E16) and then received by the terminal BH in step E46. At this stage, the terminal BH has the command received in step E41 and the result of the command provided by the oracle O in step E46. The terminal BH can then verify the result, for example, on behalf of the user of the terminal S. Thus, in step E47, the terminal BH issues the command to the database BDD. The command is received by the database in step E57. The result of the command is obtained by the database BDD in step E58 and then transmitted to the terminal BH in step E48. The terminal BH then compares (E49) the two results of the command obtained respectively during steps E46 and E48 in order to verify the result transmitted by the oracle O to the smart contract SCy.When the results are identical, the verification method considers that the result provided by the oracle O to the smart contract SCc / SCy is valid. Otherwise, the verification method tests the validity of all or part of the data obtained during step E48 from the blockchain and more particularly from the smart contract SC, which implements the validation method. Concretely, the terminal BH sends (E49) a request for validation of all or part of the data obtained during step E48 to the smart contract SCy. The request is received and then processed by the smart contract SCy in step E29. Concretely, the smart contract SCy carries out (cumulatively or alternatively) three tests in order to determine whether the data received from the terminal BH are valid. The first test consists of verifying that the signature (Sn) associated with each data received (recording) is valid. Obviously, this assumes that the process has cryptographic key(s) (private and / or public) allowing this verification. The second test aims to verify that the data received is indeed prior to the creation or transmission of the request. To do this, the process verifies that the timestamp of the command is indeed later than the timestamps of the data received from the BH terminal. Finally, the process also verifies that the data received corresponds to a valid response to the request. In our example, the process verifies that the data received corresponds to a possible result of executing the SQL command. Concretely, the process verifies that the index of the data received from the BH terminal is indeed > 2. Alternatively, the comparison of the results of the command obtained respectively during steps E46 and E48 and carried out by the terminal BH can be carried out by the smart contract SCy. According to a particular embodiment of the invention, when data received from the terminal BH is not included in the result of the command obtained from the oracle (E24) and this data is determined to be valid by the smart contract SCy, then all or part of the deposit is paid back to the terminal BH (steps E121, E131) and / or to the client S (steps E120, E110) via, for example, a transfer of all or part of the amount of the deposit to a smart contract of the client (SCc) or of the holder of the terminal BH (SCan). Obviously, the valid data received from the BH terminal and not included in the result of the command obtained from the oracle (E24) can also be sent to the client's smart contract (SCçc) during step E120. It goes without saying that the embodiment described above has been given for purely indicative purposes and is in no way limiting, and that numerous modifications can easily be made by those skilled in the art without departing from the scope of the invention. According to other particular embodiments of the invention, the invention also applies to data other than weather data, such as, for example, information on the recycling of elements constituting a manufactured product, making it possible, for example, to calculate the carbon footprint of the product in question or information on the traceability of elements of a product, such as the parts of an automobile.
Claims
Claims
1. Method for verifying at least one first data item obtained from a data provision service (O), the method being implemented by a verification device (DISP) and characterized in that it includes the following steps: - obtaining (E41) an order issued to said service; - obtaining (E46) said at least one first corresponding data to a first result of execution of said command by said service; - obtaining (E48) at least one second data item corresponding to a second result of execution of said command; - verification (E49) of said at least one first data item as a function of the said second result.
2. A method according to claim | wherein said service provides to a blockchain (BC) of data external to said blockchain and in that the said order is obtained from a first contract in- telligent (SCy) registered in said blockchain and said at least one first data is obtained from a second smart contract (SC (c) registered in said blockchain.
3. A method according to claim ! wherein said verifying step corresponds to a comparison of said at least one first data item with said second result and when the result of said comparison is negative a request for validity of all or part of said second result is sent (E49) to a third smart contract (SCy) registered in said blockchain.
4. Validation method, by a smart contract (SCy) registered in a blockchain, of at least one piece of data obtained from a service providing said blockchain with data external to said blockchain blocks (O), the method being characterized in that it comprises the steps following: - obtaining a request sent to said service, said request including a first timestamp and a order ; - obtaining (E24) a first result of execution of said command by said service; - obtaining (E29) all or part of a second execution result of said command comprising said at least one data item associated with an electronic signature and a second time stamp; and when said at least one data item is not included in said first result - verification (E29) of the validity of said at least one piece of data via the control of the validity of said signature, of the seniority of said second timestamp relative to said first timestamp temporal and validity of said at least one data as result of said command.
5. The method of claim 4 wherein said verifying step is followed by a step of sending (E120, El21) a notification of validity of said at least one piece of data.
6. The method of claim 4 wherein said verifying step is preceded by a step of obtaining (E20) a parameter whose value corresponds to a financial amount and that when the result of said verification is positive all or part of the value of said parameter is sent (E120, E121) to a user of said blockchain.
7. Verification device (DISP) of at least one first data item obtained from a data provision service characterized in that that it includes: - a first module (OBT1) for obtaining a command issued at- destination of said service; - a second module (OBT2) for obtaining said at least one first data corresponding to a first execution result of said order by said service; - a third module (OBT3) to obtain at least one second data corresponding to a second execution result of said order ; - a verification module (VERIF) of said at least one first given as a function of said second result.
8. Computer program comprising instructions for implementing implementation of verification and validation processes according to one any of claims 1 to 3 and 4 to 6, when the program is executed by a processor.
Citation Information
Patent Citations
Index structure for blockchain ledger
US20210232568A1
Communication network node, methods, and a mobile terminal
US20220029813A1
