A computer-implemented method of generating a protected implementation of an algorithm expressed in the form of code stored in a memory, the method comprising: expanding an original source code implementing the algorithm into a single set of real operations; combining each real operation using real data with the real data it uses, to obtain a combination represented in a way which uses an actual real data fragment in a form different from an original form; producing a set of duplicated and mutated decoy operations representing an alternative implementation of the algorithm, applied to decoy data; combining the set of decoy operations with the set of real operations including the combinations, to obtain an implementation where the decoy operations interact with the real operations and the real data processed by the real operations, such that a real data flow of in the implementation is difficult to analyze; and transforming the implementation into a resulting code stored in the memory and that can be executed, wherein combining the set of decoy operations with the set of real operations, comprises: interleaving operations from each set with operations from all of the other sets of operations, to obtain a combined set such that when the combined set is executed, all sets of operations are effectively executed at the same time; and conflating the data flow of operations from different sets within the combined set with each other by progressively selecting groups of operations and routing their outputs through a routing operation which forwards each output to a correct receiving operation. expanding an original source code implementing the algorithm into a single set of real operations; combining each real operation using real data with the real data it uses, to obtain a combination represented in a way which uses an actual real data fragment in a form different from an original form; producing a set of duplicated and mutated decoy operations representing an alternative implementation of the algorithm, applied to decoy data; combining the set of decoy operations with the set of real operations including the combinations, to obtain an implementation where the decoy operations interact with the real operations and the real data processed by the real operations, such that a real data flow of in the implementation is difficult to analyze; and transforming the implementation into a resulting code stored in the memory and that can be executed, wherein combining the set of decoy operations with the set of real operations, comprises: interleaving operations from each set with operations from all of the other sets of operations, to obtain a combined set such that when the combined set is executed, all sets of operations are effectively executed at the same time; and conflating the data flow of operations from different sets within the combined set with each other by progressively selecting groups of operations and routing their outputs through a routing operation which forwards each output to a correct receiving operation. interleaving operations from each set with operations from all of the other sets of operations, to obtain a combined set such that when the combined set is executed, all sets of operations are effectively executed at the same time; and conflating the data flow of operations from different sets within the combined set with each other by progressively selecting groups of operations and routing their outputs through a routing operation which forwards each output to a correct receiving operation.