1. A method for operating a tachograph having an application controller and a security controller, wherein the application controller has an associated memory that stores a program executed by the application controller, and the security controller has an associated further memory that stores a further program executed by the security controller, wherein the application controller is connected to the security controller, the method comprising: providing an encrypted program code having at least one associated signature to the security controller; evaluating header data of the encrypted program code, wherein the header data is one of encrypted and decrypted; decrypting by the security controller the encrypted program code if the header data check is successful; verifying the decrypted program code using the at least one signature; detecting whether the decrypted program code is intended for at least one of the application controller and the security controller; replacing at least one of the program in the memory and the further program in the further memory with the decrypted program code based at least in part on the detection; and clearing at least one of the at least partly replaced program and the at least partly replaced further program for execution based at least in part on a result of the verification.