Security threats such as viruses, worms, trojans and spyware affects the security and authentication of software codes, forcing software developers to build security schemes for better software protection. These software threats exploit the authenticated data of the software and confidentiality, integrity and accessibility is greatly affected by these software threats. A number of code security techniques like tamper resistant packaging, code obfuscation, register encoding etc have been developed which mainly concentrates on providing solutions for a particular type of threats and are vulnerable to code tampering and code injection by complicated attackers. Hence, code encryption technique has become an active area of research. This paper proposes a novel software protection code encryption scheme based on the index table.