1. A method for generating a software module, the method comprising: providing an entity block to be included to the software module, the entity block containing a code block of software and optionally a data section, generating a first fingerprint of the entity block using a hash function, wherein the fingerprint allows the verification of the integrity of the code block of software and, if present, the data section of said entity block, encrypting the first fingerprint of the entity block using the private key of a public key pair, to generate a digital signature of the entity block, combining the entity block and the encrypted fingerprint of the entity block to form an integrity protected entity block, encrypting the integrity protected entity block using a random secret key to form an encrypted and integrity protected entity block, encrypting the random secret key using the private key of a public key pair, and generating the software module by combining the encrypted and integrity protected entity block, and the encrypted random secret key, wherein the entity block of the software module comprises instructions to execute another software module, and wherein the instructions enable: decryption of an encrypted random secret key of the other software module, decryption of the encrypted and integrity protected entity block of the other software module using the decrypted random secret key, to obtain the decrypted integrity protected entity block of the other software module, decryption of the encrypted first fingerprint comprised in the integrity protected entity block of the other software module and generation of another second fingerprint of the entity block using the same hash function as used to generate the encrypted fingerprint of the other software module, verification of the integrity of the entity block of the integrity protected entity block of the other software module by comparing the decrypted first fingerprint with the generated second fingerprint, and execution of the entity block of the other software module, only in case the integrity of the entity block of the other software module is verified.