• Can trusted Hardware (eg. sgx + town crier) replace most smart contract usecases or are they more complementary to each other?

  • How does trusted hardware like town crier work?

1 Answer 1


Trusted hardware works by having hardware that is physically difficult to examine or tamper with without destroying it, able to provide an attestation that they are running a particular program, signed by a key that is in turn signed by the hardware manufacturer.

It requires trust in the hardware manufacturer that there hardware really works as advertised and that their signing key has not leaked, and also the belief that the tamper-proofing is really secure enough for the purpose it is being used for.

Although you can (if the above works correctly) be sure that the operation carried out by trusted hardware was as described, you need someone to own and operate that hardware. If, whether by accident or by design, the hardware that you expected your program to be run on becomes unavailable, you may need the ability to switch to trusted hardware owned and operated by someone else.

A promising pattern is to store data that needs to be shared by multiple parties on the blockchain, but do some of the calculations on that data with trusted hardware. This gives you the benefit of faster / cheaper operation than you could get with a blockchain, and the ability to perform interactive processes on private data. By publishing the results on the blockchain, you can maintain a common view of the results of the trusted hardware operations that will outlast the operation of that particular piece of hardware.

In the Town Crier case, the system uses a secure enclave to create a proof that a web page was sent using an HTTPS page with a particular certificate. This proof can then be sent to a smart contract on a blockchain.

The same pattern is followed by Teechan, which uses trusted hardware to create payment channels to manage the ownership of a pot of money that has been locked on the blockchain until a timeout. Funds can be unlocked on the blockchain either based on a signed message by the trusted device or, should the trusted device become unavailable, once a timeout has elapsed.

  • Is the private key known to the person who bought the trusted hardware?
    – Ini
    Commented Oct 22, 2017 at 1:36
  • No, the enclave can generate a private key that the and the owner of the hardware is not supposed to be able to extract. It's not clear how far this will hold up in practice, though. Commented Oct 22, 2017 at 5:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.