The classic approach of secure function evaluation (SFE) also deals with encrypted programs but is often based on Yao’s Garbled Circuits. The concept of garbled circuits is an alternative to homomorphically encrypted function representations and is currently considered the most effective way to hide program functionality. In contrast to FHE encryted data, garbled circuits encrypt the function tables of boolean gates. The input values are used as row and column keys to decrypt the output value of the gates. Garbled circuits only support one pass linear circuits.
The Java-based sample implementation uses AES to encrypt the function tables and supports delegation only, i.e. the untrusted party is not allowed to input it’s own data which the first party encrypts during an oblivious transfer protocol.
The software is available on github.