Cryptoleq is a language consisting of one, the eponymous, instruction, is capable of performing general-purpose computation on encrypted programs and is a close relative to Subleq. Cryptoleq works on continuous cells of memory using direct and indirect addressing, and performs two operations and on three values , , and :
where , and are addressed by the instruction pointer, IP, with the value of IP addressing , IP + 1 point to and IP + 2 to .
In Cryptoleq operations and are defined as follows:
where and are encrypted values based on a cryptographic parameter, .
The main difference with Subleq is that in Subleq, simply subtracts from and equals to . Cryptoleq is also homomorphic to Subleq, modular inversion and multiplication is homomorphic to subtraction and the operation of corresponds the Subleq test if the values were unencrypted. A program written in Subleq can run on a Cryptoleq machine, meaning backwards compatibility. Cryptoleq though, implements fully homomorphic calculations and since the model is be able to do multiplications. Multiplication on an encrypted domain is assisted by a unique function that is assumed to be difficult to reverse engineer and allows re-encryption of a value based on the operation. equals to encrypted zero if the of the value is equal or less than zero, being the unencrypted , or equals to the re-encrypted otherwise. The multiplication algorithm is a top-down model that is based on addition and subtraction, uses the function and does not have conditional jumps nor branches.