METHOD FOR GENERING PROOF OF EPLEA TIME BETWEEN EVENTS IN A NETWORK OF ASYNCHRONOUS NODES
A method using a trusted execution environment with multiple clocks and a TPM in asynchronous networks addresses high energy consumption and hardware attack vulnerabilities, ensuring secure and efficient time verification in distributed ledgers.
Patent Information
- Application Number
- FR2022008140
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-08-05
- Publication Date
- 2024-10-04
- Estimated Expiration
- 2042-08-05
AI Technical Summary
Existing consensus mechanisms for distributed ledgers, such as Proof of Work and Proof of Stake, face issues with high energy consumption and vulnerability to hardware attacks, particularly in asynchronous networks, affecting transaction integrity and security.
A method utilizing a trusted execution environment (TEE) with multiple clocks and a TPM to measure and verify time elapsed between events, ensuring robustness against hardware attacks and reducing energy consumption by using a secure enclave and external precision clocks.
The method provides a reliable and energy-efficient proof of elapsed time between events in asynchronous networks, enhancing transaction security and integrity in distributed ledgers.
Smart Images

Figure 00000020_0000 
Figure 00000020_0001 
Figure 00000021_0000
Abstract
Description
Title of the invention: METHOD FOR GENERATING PROOF OF TIME ELAPSED BETWEEN EVENTS IN A NETWORK OF ASYNCHRONOUS NODES Technical field
[0001] The present invention generally relates to methods of proving the time elapsed between two events in an asynchronous network. It finds particular application in a consensus mechanism relating to a history of transactions on a distributed ledger (ledgef). STATE OF THE PRIOR ART
[0002] Many consensus mechanisms have been proposed to validate transactions before incorporating them into a distributed ledger (ledger), the best known being Proof of Work or PoW (Proof of Work) and Proof of Stake or PoS (Proof of Stake). These mechanisms generally serve several purposes: verifying the integrity of transactions, i.e. that they are neither falsified nor corrupted, authenticating the entities that issued these transactions, and finally ensuring the correction of the history of these transactions. Indeed, modifying the history of different transactions can lead to very damaging situations: double spending, debiting a cryptocurrency account in the absence of sufficient credit, violation of a condition of execution of a smart contract.Proof of work verifiably guarantees (but at the cost of some latency) a correct transaction history but requires considerable energy consumption. Moreover, both proof of work and proof of stake require a miner reward system that is not appropriate for certain application contexts.
[0003] Proof of elapsed time and / or verification of elapsed time is a topic of great interest as it is at the heart of security and trust in blockchain technology. Current research focuses on so-called verifiable duration functions (or equivalently verifiable delay or time interval functions) or VFD (Verifiable Delay Functions). These functions use a triplet of algorithms: an initialization algorithm (Setup) of a pair of evaluation (ek) and verification (¾ ) parameters as a function of a security level (2) and a given duration (T), an algorithm for evaluating a function (Eval) from an input value (x) and the evaluation parameter (¾), the evaluation function giving an output value (3) and a proof (77) and finally a verification algorithm (Verify) providing a result boolean from the verification parameter (vfc), the input and output values (%,2 ) and the proof (77). The principle of such a duration verification function is that it is not possible to anticipate the value of the parameters U- and vk before the expiration of the duration T, and that any parallelization of computation to execute the initialization algorithm more quickly leads to an evaluation result indistinguishable from a random number.
[0004] A presentation of verifiable delay functions can be found in the article by D. Boneh et al. entitled "Verifiable delay functions", published in Advances in Cryptology, CRYPTO 2018, Springer Int'l Publishing, pp. 757-788. Verifiable delay functions can be implemented in different ways.
[0005] A first approach consists of constructing such a function by means of a secure enclave or TEE (Trusted Execution Environment). More precisely, such an enclave executes the aforementioned evaluation algorithm. It receives the input value x as well as a pair of evaluation and verification parameters (ekfk), and provides as output, on the one hand, a hashed value of x, by means of a hash function whose complexity depends on the difficulty parameter 2 , and, on the other hand, a proof 77 obtained as a signature of y by means of the private key of an asymmetric cryptosystem stored in the enclave. The enclave is synchronized on an external clock to perform the evaluation of the duration T. However, this clock is a single point of attack (singlepoint of attack) and can be subject to malicious actions likely to corrupt the result of the evaluation.
[0006] A second approach consists of sequentially performing draws of a random number, to perform a hash of the input value x concatenated with the random number thus obtained, i.e. xja until a certain condition on the hash result is verified, said condition depending on the degree of difficulty 2. This is the principle on which the proof of work used in the Bitcoin and Ethereum blockchains is based, which consumes a lot of energy. Other evaluation functions based on recursive SNARKs (Succinct Non-Interactive ARguments of Knowledge) (SNARK of SNARK). These use recursive hash functions using homomorphic encryption techniques, which also consume a lot of energy.
[0007] Finally, a third approach to implement the evaluation function is to use a polynomial construction consisting of sequentially calculating (2 times) the square of a hash function in a Galois field. Like the previous one, this approach requires making significant calculations that cannot be parallelized and optimized, which therefore still leads to significant energy consumption.
[0008] The Proof of Elapsed Time (PoET) algorithm is a Nakamoto-type consensus mechanism for permissioned blockchains that requires significantly lower energy consumption. lower than in Bitcoin. Proof of Work (PoW) is replaced here by a lottery system that generates a random waiting time for each miner (or validator node) in the chain. To do this, each miner has a secure enclave (TEE) that provides them with a certified random time they must wait before being allowed to submit their next block to consensus. Any participating node in the chain must be able to verify that the waiting time was indeed generated by the certified random draw in the secure enclave and that this waiting time was indeed respected by the miner.
[0009] The PoET algorithm has been successfully deployed in the Hyperledger Sawtooth blockchain. However, secure enclaves (SGX) use an external timer located outside the trusted execution area (TEE) and are susceptible to certain hardware attacks aimed at corrupting the generated wait times.
[0010] An object of the present invention is therefore to propose a method of proving the time elapsed between transactions sent by a node to a distributed ledger (ledgef) and, more generally, between events occurring in an asynchronous network node, which does not have the aforementioned drawbacks, in particular which is relatively simple, low in energy consumption and robust to hardware attacks. Statement of the invention
[0011] The present invention is defined by a method for proving the time elapsed between successive events occurring in a node of an asynchronous network, said node comprising an embedded system partitioned into a trusted zone and an untrusted zone, the trusted zone comprising a secure execution environment or TEE in which the integrity and confidentiality of the code and data are ensured, and a trusted hardware component or TPM comprising a first clock, called the control clock, giving the time elapsed from its last initialization and a monotonic counter indicating the number of initializations of the control clock, the TEE environment having a second clock, called the system clock, and receiving on the one hand the control clock of the TPM and on the other hand a third clock, called the precision clock, from a peripheral external to the embedded system,the control clock having a higher degree of security than the system clock and the precision clock, the precision clock having a higher precision and stability than the control clock and the system clock, said method being original in that: , an application residing in the TEE environment measures the time at which an event observed by the node occurs, the measurement being carried out using the first, second and third clocks, to provide a first, a second and third time measurements relative to the observed event; said application determines, from the measurements thus obtained for the observed event and those obtained for a previous event, a first, a second and a third measurement of time elapsed between said observed event and the previous event; said application verifies the consistency of the first, second and third clocks by comparing the elapsed time measurements thus obtained and if they do not differ more than a predetermined tolerance margin, forms a proof message of elapsed time between the observed event and the previous event, the elapsed time message comprising the value of the monotonic counter, the time measurements relating to the observed event and the drifts of the second ^tee) and third clock ^gps) with respect to the first clock over the elapsed time interval; said application signs said message with a private key of the node before transmitting it over the asynchronous network.
[0012] Advantageously, the drifts of the control clock and the system clock relative to the precision clock are integrated over time by said application and, when one of them exceeds a predetermined maximum value, the latter is corrected.
[0013] The present invention also relates to a method of proving the time elapsed between successive transactions issued by a node, called a client node, to a distributed register, characterized in that it implements a method of proving the time elapsed between successive events as defined above, the observed event being the formation of a transaction by said client node.
[0014] Advantageously, the transaction issued by the client node further comprises a hash of the application code at the time the transaction is formed.
[0015] According to an exemplary embodiment, the transaction issued by the client node further comprises the value of a transaction counter, said counter being incremented with each transaction issued.
[0016] The transaction issued by the client node may further comprise a measurement of the time at which the previous transaction was issued, the measurement having been carried out by means of the control clock and being signed by a private key of the TPM module.
[0017] According to a variant, prior to the emission of successive transactions, the client node emits a recording transaction to the distributed register, said recording transaction comprising an initial value of the monotonic counter, and indicates the initial values of the control clock, the system clock and the precision clock.
[0018] The verification can be carried out by a third-party node of the asynchronous network, called a validator node, for a new transaction issued by the client node, said method being characterized in that the validator node extracts from the current transaction the value of the monotonic account and checks in the distributed ledger that it is identical to that of the previous transaction, then extracts the drifts of the second and third clocks and compares them to a predetermined tolerance margin to check the consistency of the client node clocks.
[0019] Advantageously, prior to verifying the consistency of the client node's clocks, the verifier node ensures, using the signature of the transaction, that it has indeed been issued by the client node.
[0020] The verifier node then extracts from the client node's transaction the value of the precision clock and compares it to the value of its own precision clock upon receipt of this transaction, and verifies that the difference of the second with the first is greater than zero and less than a predetermined maximum propagation time.
[0021] Preferably, the verifier node is a node having a degree of reliability greater than a predetermined value, the degree of reliability of a node being an increasing function of the number of successfully validated transactions and the time elapsed since its recording in the distributed ledger.
[0022] If the verification has been successfully carried out, the validator node issues a transaction, called a validation transaction, comprising a hash of the validated transaction and the time at which it was received, measured by the precision clock of the validator node.
[0023] The validator node may pre-verify the consistency of its first, second, and third clocks before issuing the validation transaction to the distributed ledger.
[0024] The validation transaction typically includes measurements of the time at which validation is performed by means of the first, second and third clocks, the value of the monotonic counter of the validator node as well as the drifts of the second and third clocks of the validator node with respect to the first clock of the validator node over the time interval elapsed since the last transaction issued by the validator node.
[0025] Advantageously, the validation transaction further comprises a hash of the code executing the verification in the TEE environment of the validator node, at the time when the transaction of the client node is validated. Brief description of the drawings
[0026] Other characteristics and advantages of the invention will appear on reading a preferred embodiment of the invention, made with reference to the attached figures among which:
[0027] [Fig.l] schematically represents a network of asynchronous nodes illustrating the context of application of the present invention;
[0028] [Fig.2] schematically represents a system embedded in a node asynchronous method for implementing the method for generating proof of time elapsed between two events according to an embodiment of the present invention;
[0029] [Fig.3] represents a verification of the consistency of the times measured by different clocks in the embedded system of [Fig.2];
[0030] [Fig.4] represents a flowchart of a method for generating proof of time elapsed between successive events within a node, according to a general embodiment of the present invention;
[0031] [Fig.5] represents a method of verifying the time elapsed between transactions successive messages issued by a node in a distributed ledger;
[0032] [Fig.6A] schematically represents a step of registering a client node in the implementation of the verification method of [Fig.5];
[0033] [Fig.6B] schematically represents a step of validation of time elapsed between two successive transactions issued by a client node.
[0034] DETAILED DESCRIPTION OF PARTICULAR EMBODIMENTS
[0035] We consider in the following a network of asynchronous nodes, each node able to send messages on the network. By asynchronous node network, we mean that the different nodes in the network are not synchronized by a common clock.
[0036] Without loss of generality, we will assume in the following that these messages are transactions intended to be recorded in a distributed ledger (distributed ledger), which may be a transaction graph or a blockchain. The blockchain is formed by the concatenation of temporally ordered transactions stamped by the nodes that issued them.
[0037] A network of asynchronous nodes, 100, has been schematically represented in [Fig.l].
[0038] It comprises at least one transmitter node, 110, capable of generating and transmitting a transaction, called a client transaction, providing proof of elapsed time, and at least one validator node, 120, intended to verify the accuracy of the proof thus provided, the validator node storing the transaction in the distributed ledger when the proof is considered accurate. Each node of the network, 130, can then read the transaction in the ledger and verify that this proof is indeed accurate.
[0039] The generation of proof of elapsed time in the transmitting node uses an embedded system comprising a trusted zone, the architecture of which is schematically represented in [Fig.2].
[0040] The embedded system or SOM (System On Module), 200, can be produced in the form of a daughter card intended to be plugged into the motherboard of the node in question. The embedded system comprises a trusted zone 210, itself comprising a secure execution environment, 213, also called TEE (Trusted Execution Environment) and a trusted hardware component, 215, also called TPM (Trusted Platform Module). The trusted zone, 210, is isolated from the non-secure environment zone, called “normal”, 220.
[0041] The execution code and data residing in the TEE environment are protected against software attacks. More specifically, the confidentiality and integrity of the execution code and data are guaranteed. The TEE has a processor and a memory area allowing applications residing there to be executed without risk of corruption. An example of a TEE is SGX™ (Software Guard extensions) from Intel.
[0042] The TPM module, 215, is a passive device without an operating system but which may contain secure hardware elements such as a safe for storing cryptographic keys, a random number generator, or, as in the present case, a counter acting as a secure chronometer (timer). Several clocks are available in the embedded system: - a first clock, called the control clock, 217, having the highest level of security, is provided by the TPM module. It gives the time elapsed since its last initialization. This clock can be reset by means of an initialization command from the TEE. Each time the control clock is initialized, a permanent monotonic counter, called the permanent reset counter, is incremented. It is important to note that this permanent reset counter can never be reset, even by the TEE. The drift of the control clock relative to a reference clock can also be corrected by an adjustment command from the TEE; - a second clock, is provided by a persistent counter (TA timer), 221, of the TEE environment operating system. This second clock can only be updated by accessing the highest privilege level of the operating system; - a third clock is constituted by an external clock of higher precision than the first two, Clk_GPS, called the reference clock, for example a GPS time provided by a GPS receiver, 230, from the satellite navigation messages that it receives, is transmitted to the TEE environment of the embedded system. It should however be noted that this reference clock can be corrupted, either because fake navigation messages (GPS spoofing) are received by the receiver and lead to an erroneous time, or because the external clock is the subject of an attack during its routing between the GPS receiver and the environment TEE; - a fourth optional clock can be provided by a module 221 of the operating system of the unsecured environment, 220, of the embedded system (for example a Linux system clock). This clock, Clk_REE, unprotected and modifiable by the user, is transmitted to the TEE environment.
[0043] A trusted application intended to be executed within the TEE environment aims to verify the consistency of the different clocks and to reconcile the measurements of time elapsed between two events, from these same clocks. More precisely, as illustrated in Fig. 3, the trusted application, 219, hereinafter noted ETC_app, ensures that the time intervals respectively measured by the reference clock, the second and, where appropriate, the third clock are indeed consistent with the time interval measured by the control clock, in other words that:
[0044] [Math.l] I ^GPS " ^TPM i < Ëmax (1-D
[0045] [Math.2] I ^TEE ” ^TPM ! < 8max (1-2)
[0046] [Math.3] 1 ^REE " ^TPMI < 8max (1-3)
[0047] with:
[0048] [Math.4] = time _time _TPM, (2-1)
[0049] [Math.5] ATEE ~ time_TEE(txi+^~ time_TEE{tXi) , (2-2)
[0050] [Math.6] ^gps ~ time _GPS(txi+^~ time _GPS(tx}) , (2-3)
[0051] [Math.7] ^ree - time_REE(txi+i)- time_REE(txi) , (2-4)
[0052] and where emax is a tolerance margin, tXj and tXi+^ are two successive events observed by the embedded system, for example the times when two successive transactions are issued.
[0053] When conditions (1-1), (1-2) and, optionally (1-3), are verified, the ETC _app application concludes that the measurements of elapsed time between successive events are consistent and transmits a proof of elapsed time message over the network. This message includes data relating to event ^ / +i, the rank of this event, i + 1, the time at which this event occurred, measured by the different clocks of the embedded system, the drifts of the clocks external to the TPM module with respect to the control clock, namely ^gps = Agps " ^tpm, £tee — ^tee " ^tpm and, where appropriate £rEe — ^ree ■ ^tpm- It is important to note that the drifts are estimated here with respect to the control clock, which is the most reliable, and not with respect to the reference clock which is the most precise and the most stable.On the other hand, within the embedded system, as soon as conditions (ll) to (l-3) are met, in other words, as soon as the elapsed time measurements are consistent with each other, the clocks of the TPM module, the TEE environment and the REE environment are corrected for their drift relative to the reference clock.
[0054] An example of a proof of elapsed time message typically contains a first data field containing the data, D, relating to the observed event (¾^); a counter incremented at each new event giving the index (i + 1) of the observed event; a first time field, giving the time at which this event occurred, measured by the control clock as well as the contents of the permanent reset counter, i.e. tinte_TPM(txi+^ || CTRAZ; a second time field resulting from the concatenation of the time measured by the clock Clk_TEE, and the drift ^'tee ~ ^tee~^tpm over the interval separating the observed event and the previous event, i.e. time _TEE(tXi+^ || &tee ' a third time field resulting from the concatenation of the elapsed time, ^gps, measured by the reference clock and the drift £gps = ^gps " ^tpm relative to the control clock over the same interval, i.e. tinte _GPS(txi+^) || eGPS;and finally a fourth optional time field, resulting from the concatenation of the time measured by the clock Clk_REE, and the drift eREE — AREE- ^tpm -, over the same interval, ^time_REE(txM) || eREE . ;
[0055] The message may also advantageously include an additional field containing a hashed value of the code of the trusted application, ETC_app, by means of a hash function. The code in question is that which is stored in the TEE environment at the time when the ETC_app application performs the consistency check.
[0056] It can finally understand the time at which the previous measured event occurred. by the control clock, or time _TPM(tXj), stored in a memory of the TEE environment. This value makes it possible to ensure the time chaining of events occurring within the transmitting node.
[0057] The message is then signed using the private key of the sending node before being transmitted over the network.
[0058] A third-party node, called a validator node, receiving a proof of elapsed time message can first of all verify by means of the node's public key that the elapsed time has indeed been measured by the transmitting node. It can then ensure the consistency of the transmitting node's clocks during the measurement. To do this, it first ensures that the value of the CTRAZ counter has not changed since the previous event, verifies that the conditions (1-1), (1-2) and, where applicable, (1-3) are indeed respected by comparing the absolute values || Sy-pp| e0 where applicable, |pppp| , with the tolerance margin, smax. If these absolute values are less than the tolerance margin, the validator node concludes that the clocks are consistent.
[0059] It can finally reconstruct the history of events within the transmitting node with the exact time intervals between successive events. The time intervals are given with the precision of the reference clock, Clk_GPS, and the reliability of the control clock, Clk_TPM, of the transmitting node.
[0060] [Fig.4] summarizes in flowchart form a method for generating proof of time elapsed between successive events within a node, according to a general embodiment of the present invention.
[0061] We place ourselves in the same conditions as previously, the embedded system of the node has at least a first clock, called control clock, within a TPM module, a second clock provided by the operating system of the TEE environment, called system clock, and a third clock, external and unprotected, of precision substantially greater than the first and second clocks and, for this reason, called precision clock.
[0062] In a first step 410, the embedded system of the node measures the time at which the observed event occurs with the first, second and third clocks.
[0063] In step 420, a trusted application in the TEE zone verifies the consistency of the clocks from the obtained measurements time_TPM(tXi+^ time_TEE{txi+^ and time_GPS(txi+})- To this end, it measures the time interval elapsed between the observed event and the previous event, by difference with the previous measurements, time__TPM(txù time_TEE(tx^ and time^GPSitX^, also stored in the TEE zone, i.e. ^tpM' ^tee^ ^gps- More precisely, the trusted application verifies that the elapsed time interval measurements do not differ more than a predetermined tolerance margin, in other words that the drifts of the second and third clocks relative to the first over the interval separating two successive events, are less than a tolerance margin.
[0064] If so, it is concluded that the clocks are consistent and the method continues to step 440.
[0065] If not, the measurement is not reliable or an attack has taken place and we return to step 410 to observe the next event. Alternatively, or after several failures, the embedded system declares itself faulty.
[0066] In step 440, if the cumulative drifts over time exceed a predetermined maximum value, the drifts are corrected in 445 on the basis of the precision clock.
[0067] In step 450, the embedded system forms a proof of elapsed time message as described previously. In particular, the message comprises an event counter, the permanent reset counter, the time at which said event occurred, as measured by means of the different clocks, i.e. time _TPM[tX i+^ time_TPM(txM), time_TEE(txM), and time_GPS(txM) and the drifts of the second and third clocks with respect to the control clock, etee> egp,s. The message may further contain the hash of the code of the trusted application, ETC _app and / or the hash of the time at which the previous event occurred.
[0068] In step 460, the embedded system signs the message using the node's secret key and transmits the message thus signed over the network.
[0069] This method of generating proof allows a third-party node in the network to verify that the time elapsed between two successive events of the sending node is correct. It can be applied, for example, to prove the times at which a sensor takes measurements in an IoT network or, as described below, in a consensus mechanism to validate one or more transactions to be added to the distributed ledger (ledgef).
[0070] [Fig.5] represents a method of verifying the time elapsed between successive transactions sent by a node to a distributed register.
[0071] It will be assumed that the distributed ledger technology used allows the deployment of smart contracts, also called autonomous contracts or "smart contracts". An example of such technology is Ethereum. As a reminder, a smart contract is a program that is deployed (i.e. stored) in a distributed ledger (ledgef) and can be executed by any node in the network.
[0072] The verification method described below allows a verifier node to verify the time elapsed between two successive transactions sent by a transmitter node, also called a client, to a distributed ledger. The transmitter node comprises an embedded system (SOM) as described previously in relation to [Fig.2].
[0073] It includes a preliminary registration phase (enrollment), 510, during in which the sending node transmits a transaction to a first smart contract, SC_REC. This registration phase, described in detail later, allows the node to authenticate itself to the network peers and to store in the chain the initial time of each of the first, second and third clocks, l ime _TPM(tXo), lime __TEE[tx^ lime _GPS(tX^ read in the TEE environment of its embedded system.
[0074] Following this recording, the sending node can send, at 520, transactions, called “client” transactions, comprising, on the one hand, a payload to be recorded in the distributed register (ledger) and, on the other hand, proof of time elapsed since the sending of the last transaction. This transaction can be considered as a particular case of message generated according to the proof generation method previously described in relation to [Fig.5].
[0075] This client transaction therefore includes the permanent reset counter, the times provided by the various internal clocks, Clk_TPM, Clk_TEE, Clk_GPS, where applicable, Clk_REE, as well as their respective drifts relative to the control clock.
[0076] The client transaction may further contain the hashed value of the trusted application code, —aPP , and / or that of the time, time _T PM(tx^ at which the client node issued the previous transaction.
[0077] The consistency of the times provided by each of the clocks is verified by the sending node before it sends a client transaction to the distributed register (ledger).
[0078] Any third-party node in the network can then verify that the time elapsed between two successive transactions of the client node is correct.To do this, it first checks that the permanent reset counter has not varied, then checks that the measurements of time elapsed between the current transaction and the previous transaction, by means of the different internal clocks, i.e. ^tpm^ ^tee, ^gps do not differ more than a tolerance margin. Alternatively or cumulatively, it can extract the times time_TPM(txi+]), time_TEE(txM), time_GPS(txi+^ (if applicable time_REE(tXi+i)) of the current transaction, and read from the distributed register (ledger) the times time_TPM(tx^,time_TEE{tx^, tinie_GPS(txi),Cmie_REE(txi), of the previous transaction and deduces the measurements of time elapsed between the transactions, by the different clocks, i.e. ATEE^GPS^et , if applicable. The differences between the measurements of time elapsed must not be greater than the tolerance margin emax, .
[0079] Certain so-called validator nodes (playing the role of miners) can attest that they have successfully carried out such a verification and record this attestation in the register distributed (ledger) by means of a transaction, called a validation transaction, transmitted to the SC _REC smart contract.
[0080] Before issuing such a transaction in 520, a validator node must have previously registered according to the registration procedure described above and have a sufficient reputation rating, as detailed later. The validation transaction attests that the validator node has carried out a verification of the proof of time elapsed between two successive transactions of a client node. Before proceeding with the verification of the consistency of the measurements of time elapsed between successive client transactions, the validator node itself ensures the consistency of its own clocks.
[0081] The validation transaction is specific in that it includes in its payload the hashed value of the client transaction that was verified using a hash function as well as the reference time at which this client transaction was verified.
[0082] It further comprises, in the same format as the client transaction: a counter incremented for each new transaction issued by the validator node, giving here the index (j + 1) of the validation transaction; a first time field, giving the time at which the validation occurred, measured by the control clock of the validator node as well as the content of the permanent reset counter of this node, i.e. time TPM^^tX +ij || CTRAZ val (the upper index “val” indicates that the value is relative to the validator node); a second time field resulting from the concatenation of the time elapsed between transactions j (not necessarily a validation transaction) and j + l, as measured by the clock TEEval^ with the drift Pval — Aval . over the interval separating the validation transaction and the bTEE “ nTEE nTPM 1 previous transaction of the validator node, or time TEEval(tx || ETee ' a third time field resulting from the concatenation of the elapsed time, A£pS, as measured by the reference clock of the validator node and the drift pval — _ Downstream from the validator node's control clock, i.e. bGPS ~ ^GPS nTPM^ 11 & time GPS^^Xj^ || s^ps ' ct en^n a fourth optional time field, resulting from the concatenation of the elapsed time, measured by the clock afa REE™1, and the drift Pval — Aval _ A™! , over the same interval, i.e. bREE “ nREE nTPM time_REEva\tXj+^ || ■
[0083] The validation transaction may further contain the hashed value of the trusted application code, ETCvaï _app and / or that of the time, time_TPMva\tXj+^ at which the previous transaction was issued.
[0084] Before validating a client transaction, the validator node can ensure that the reference time at which it performs the validation is greater than the reference time contained in the client transaction but does not exceed the latter by a maximum propagation time in the network, in other words that:
[0085] [Math. 8] 0< (time_GPSval(tXj+^-time_^ <r (3)where is a maximum propagation time in the network.
[0086] A node in the network can be assigned a trust / reputation rating based on the number N of validated transactions it has issued and the time elapsed 4 since its registration in the chain. The larger the number N and the longer the time 4, the more reliable the node will be considered. When the trust / reputation rating of a node is sufficiently high, it can be authorized to become a validator node. The rating threshold required to be a validator node can increase over time, so as to control the total number of verifier nodes in the chain.
[0087] [Fig.6A] illustrates the step of registering a client node, 510, in the method of verifying the time elapsed between successive transactions of [Fig.5].
[0088] The registration transaction (designated by X _enrolment in the figure) of the node is issued at a time noted "registration start tinte" and recorded in the distributed register (ledger) after being validated. It includes the initial values of the first, second and third clocks, time_TPM(tx^, time_TEE(tx^ time_GPS(tX^) , the value of the reset counter (this counter may not have a zero value during recording). It may also include the hash of the trusted application, ETC _app, as well as the time (measured by the TPM clock) at which the previous transaction was issued by the client node. The registration transaction is signed using the private key of the node in question.
[0089] This transaction is transmitted to the recording smart contract, SC_REC. It can then be validated by a validator node, thus simplifying validation because the consistency check of the time elapsed measurements since the previous transaction is omitted here.
[0090] Once the node is registered in the distributed register (ledger), it can issue client transactions (denoted tx_client) to the SC_REC smart contract, as soon as it has verified the consistency of its clocks as described previously. Each transaction includes a proof of time elapsed between the issued transaction and the previous transaction.
[0091] [Fig.6B] schematically represents a step of validation of time elapsed between two successive transactions issued by a client node. Successive transactions of the same node are authenticated by means of their signature.
[0092] A validator node can check the consistency of the elapsed time measurements between successive transactions. The validator node first ensures that the value of the reset counter has not varied between the two transactions (no resetting of the control clock), reads from the transaction the values of the different internal clocks present in the current transaction, reads from the distributed register (ledger) the values of the internal clocks present in the previous transaction recorded in the distributed register (ledger), and deduces the elapsed time measurements between these two transactions by means of the different clocks, namely ^tpm, ^gps, ^tee, and optionally ^ree, and ensures their consistency with each other within a tolerance margin. If these measurements are consistent, the validator node transmits a validation transaction to the smart contract, after ensuring the consistency of its own clocks.The customer transaction is recorded in the distributed ledger when it is validated by a predetermined number of validator nodes. Recording can be done in blocks, after a predetermined number of customer transactions have been validated.< / r>
Claims
Claims
1. Method for proving the time elapsed between successive events occurring in a node of an asynchronous network, said node comprising an embedded system (200) partitioned into a trusted zone (210) and an untrusted zone (220), the trusted zone comprising a secure execution environment or TEE (213) in which the integrity and confidentiality of the code and data are ensured, and a trusted hardware component or TPM (215) comprising a first clock, called the control clock, giving the time elapsed from its last initialization and a monotonic counter indicating the number of initializations of the control clock, the TEE environment having a second clock, called the system clock, and receiving on the one hand the control clock of the TPM and on the other hand a third clock, called the precision clock, from a peripheral external to the embedded system,the control clock having a higher degree of security than the system clock and the precision clock, the precision clock having higher accuracy and stability than the control clock and the system clock, wherein: an application residing in the TEE environment measures (410) the time at which an event observed by the node occurs, the measurement being carried out using the first, second and third clocks, to provide first, second and third time measurements relating to the observed event;, said application determines (420), from the measurements thus obtained for the observed event and those obtained for a previous event, a first, a second and a third measurement of time elapsed between said observed event and the previous event; said application verifies the consistency (430) of the first, second and third clocks by comparing the elapsed time measurements thus obtained and if they do not differ more than a predetermined tolerance margin, forms a proof message (440) of time elapsed between the observed event and the previous event, the elapsed time message comprising the value of the monotonic counter, the time measurements relating to the observed event and the drifts of the second (£tee) and third clock ^gps) with respect to the first clock over the elapsed time interval; said application signs (460) said message with a private key of the node before transmitting it over the asynchronous network.
2. Method of proving the time elapsed between successive events according to claim 1, characterized in that the drifts of the control clock and the system clock relative to the precision clock are integrated over time by said application and that, when one of them exceeds a predetermined maximum value, the latter is corrected.
3. Method of proving the time elapsed between successive transactions issued by a node, called a client node, to a distributed register, characterized in that it implements a method of proving the time elapsed between successive events according to claim 1 or 2, the observed event being the formation of a transaction by said client node.
4. A method of proving elapsed time between successive transactions according to claim 3, characterized in that the transaction issued by the client node further comprises a hash of the application code at the time the transaction is formed.
5. Method of proving time elapsed between successive transactions according to claim 3 or 4, characterized in that the transaction issued by the client node further comprises the value of a transaction counter, said counter being incremented with each transaction issued.
6. Method of proving the time elapsed between successive transactions according to one of claims 3 to 5, characterized in that the transaction issued by the client node further comprises a measurement of the time at which the previous transaction was issued, the measurement having been carried out by means of the control clock and being signed by a private key of the TPM module.
7. Method of proving time elapsed between successive transactions according to one of claims 3 to 6, characterized in that, prior to the emission of successive transactions, the client node emits a recording transaction (510) to the distributed register, said recording transaction comprising an initial value of the monotonic counter, and indicates the initial values of the control clock, the system clock and the precision clock.
8. Method for verifying the time elapsed between successive transactions issued by a client node implementing the method of proof of time elapsed according to one of claims 3 to 7, the verification being carried out by a third-party node of the asynchronous network, called a validator node, for a new transaction issued by the client node, said method being characterized in that the validator node extracts from the current transaction the value of the monotonic account and checks in the distributed register that it is identical to that of the previous transaction, then extracts the drifts of the second and third clocks and compares them to a predetermined tolerance margin to check the consistency of the client node clocks.
9. Method for verifying the time elapsed between successive transactions issued by a client node according to claim 8, characterized in that, prior to verifying the consistency of the clocks of the client node, the verifier node ensures using the signature of the transaction that it has indeed been issued by the client node.
10. Method for verifying the time elapsed between successive transactions issued by a client node according to claim 8 or 9, characterized in that the verifier node extracts from the transaction of the client node the value of the precision clock and compares it with the value of its own precision clock upon receipt of this transaction, and verifies that the difference of the second with the first is greater than zero and less than a predetermined maximum propagation time.
11. Method for verifying the time elapsed between successive transactions issued by a client node according to one of claims 8 to 10, characterized in that the verifying node is a node having a degree of reliability greater than a predetermined value, the degree of reliability of a node being an increasing function of the number of transactions successfully validated and the time elapsed since its recording in the distributed register.
12. Method for verifying the time elapsed between successive transactions issued by a client node according to one of claims 8 to 11, characterized in that, if the verification has been carried out successfully, the validator node issues a transaction, called a validation transaction, comprising a hash of the validated transaction and the time at which it was received, measured by the precision clock of the validator node.
13. Method for verifying the time elapsed between successive transactions issued by a client node according to claim 12, characterized in that the validator node first verifies the consistency of its first, second and third clocks before issuing the validation transaction to the distributed register.
14. Method for verifying the time elapsed between successive transactions issued by a client node according to claim 13, characterized in that that the validation transaction includes measurements of the time at which validation is performed by means of the first, second and third clocks, the value of the monotonic counter of the validator node as well as the drifts of the second and third clocks (£^ç) of the validator node with respect to the first clock of the validator node over the time interval elapsed since the last transaction issued by the validator node.
15. Method for verifying the time elapsed between successive transactions issued by a client node according to claim 14, characterized in that the validation transaction further comprises a hash of the code performing the verification in the TEE environment of the validator node, at the time when the transaction of the client node is validated.
