Possible to make EVM run encrypted code?

Either edit the EVM to be able to run executions on encrypted code, or on the fly decrypt stored code with a given key on execution call?

Comments

  • mimarobmimarob Member Posts: 33
    This would be a very useful feature, unfortunately since all miner nodes execute the code they'd have to have the key which makes it not very secret since it also had to be stored in the block chain.
  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,291 mod
    @plorph, simple answer is no. All nodes need to be able to run the bytecode and even if that bytecode is JIT decrypted, still all nodes need the key and so any node can make the unencrypted bytecode public.

    There is an emerging field of research called 'homomorphic encryption' which seeks to run operations across encrypted data in a way that mutates the underlaying data without it being decrypted.
  • drinkcoffee2016drinkcoffee2016 Member Posts: 5
    edited July 2016
    I agree with @mimarob and @o0rgaman0o: The code is public and has to be public so all miners can execute it.

    Having the code public means that people using your contract have some idea what they are using. That is, in the real world, would you sign a contract without being able to read it?


    >'homomorphic encryption' which seeks to run operations across encrypted data

    The partial homomorphic encryption techniques which do exist today are extremely computationally expensive. It could be expected that any true homomorphic encryption operations that do eventually exist would be even more computationally expensive. Using computationally expensive operations seems to me to be against the model of Ethereum, where the idea is to do small operations which could run on a "late 1990s-era mobile phone".
    Post edited by drinkcoffee2016 on
Sign In or Register to comment.