A method for code-blocks encryption which enables dynamic decryption of encrypted executable code

A code-block encryption method for decrypting an encrypted executable code in a dynamic manner is provided to minimize the exposure of the executable code to the outside in a process for executing an executable code. A basic block division process is performed to divide an executable code into basic blocks on the basis of a position of a control moving command. An executable code block having a constant size is recomposed by using the basic blocks of the executable code. A repetition process is performed to repeat an executable code block corresponding to a destination of a control moving command in order to avoid presence of a prior encryption block or two or more keys before a block encryption process. The block encryption process is performed.