Town Crier vs DECO: which oracle to use in the blockchain?

Today, only the lazy has not written about blockchain technology, cryptocurrencies and how cool it is. But this article will not praise this technology, we will just talk about its shortcomings and ways to eliminate them.





While working on one of the projects at Altirix Systems, the task of secure, censorship-resistant confirmation of data from a source external to the blockchain appeared. It was necessary to confirm the changes in the records of the third system and, based on these changes, execute one or another branch in the logic of the smart contract. At first glance, the task is quite trivial, but when the financial condition of one of the parties participating in the process depends on the result of its implementation, additional requirements appear. First of all, it is all-round confidence in such a validation mechanism. But first things first.



, , , - . - (flight delay, ..). -, , , . , Town Crier DECO. - -, , .





, - 0.001 btc bitcoin- . , - , , : , - , , - ?



2 : - -, โ€” , . , , , Oraclize, TLSNotary ( TLS ). Oraclize , , , : Town Crier DECO. , .



Town Crier



Town Crier (TC) IC3 (The Initiative for CryptoCurrencies and Contracts) 2016 CCSโ€™16. TC: - , , TC , . TC TEE (Trusted Execution Environment) . TC Intel SGX.

Town Crier โ€” TC Server.



TC Contract front end TC. CU (- ) TC Server. TC Server Relay, ( ) . Enclave progencl, , , progencl - .



Intel SGX , API, ecall. Ecall . , , . , , ocall. Ocall . ocall .



Enclave secure channel -, TLS handshake . TLS (mbedTLS) HTTP- SGX. , Enclave root CA certificates ( ), . Request Handler datagram , Ethereum, . Ethereum, requested datagram, skTC Relay.



Relay Client Interface, TCP, Blockchain Interface. Client Interface . ecall timestamp, skTC att ( ), att Intel Attestation Service (IAS), timestamp time service. Blockchain Interface datagrams. Geth โ€” Ethereum Relay RPC calls.



TEE, TC , 3 . 15 tx/sec, 20 65 tx/sec, , Bitcoin โ€” 26 tx/sec.



DECO



DECO (Decentralized Oracles for TLS) CCSโ€™20, , TLS . .

DECO c TLS , - , , , TLS. DECO prover (-), verifier () web-server ( ).





DECO , (prover) D (verifier), D TLS- S. , TLS TLS- , (provenance difficulty).



DECO KEnc KMac. Q -, R , KMac, TLS . DECO , ยซยป KMac (prover), . KMac prover verifier โ€” KpMac KvMac. KMac KpMac โŠ• KvMac = KMac.



, .



, Chainlink, , Ethereum, Bitcoin Hyperledger, : . , Chainlink , , ( ). , . .



Chainlink PoC DECO , Mixicles. Forbes, , Chainlink DECO Cornell University.







, Town Crier:



  1. Rogue smart-contact code injection on TEE nodes.

    : TEE -, , , , () - . private key, /.

    , . , .



  2. Contract state ciphertext changes leak.

    : , -, contract state . , , contact state , - , - .

    .



  3. Side-channel attacks.

    , . โ€” Prime and Probe.



    :



    • t0: .
    • t1: , ( ). cache line keybit. , keybit = 0 X cache line 2. , X, , , .
    • t2: , โ€” , . . keybit, .




: Intel SGX side-channel attacks, , , Prime and Probe , .



, .



Spectre Foreshadow (L1TF), Prime and Probe. - . Spectre-v2, .



DECO, :



  1. Prover Integrity: prover server server . server prover.
  2. Verifier Integrity: verifier prover .
  3. : verifier (, ).


DECO , . , verifier fresh nonce. , verifier (IP-). , verifier server . Proxy.





Town Crier , DECO . : , , .



Town Crier DECO
(0.6s to finish) (10.50s to finish the protocol)
hardware , TLS


: DECO , LAN 0.37 , 2PC-HMAC (0,13 ). DECO TLS, . IC3: LAN 10,50 . , Town Crier 0,6 , 20 , DECO. , TC .



: Intel SGX (side-channel attacks) -. DECO , , proxy . DECO .



: , Intel SGX DECO. TC .



: Town Crier , TEE. , Intel SGX Intel Core 6- . DECO , DECO TEE. DECO , hardware TC, DECO .





, , Town Crier DECO . DECO , , , , . TC DECO, , side-channel attack . , DECO 2020 , , . Town Crier 4 , .




All Articles