A system for validating firmware, for example in an embedded computer system, includes means within the embedded system (10) for returning an authentication code in dependence upon the firmware (18) itself and the value of an external challenge. A user (24) receives the authentication code from the system (10) and checks it against a check authentication code created by an agent (28), computer algorithm or trusted third party who knows what firmware should be present. The user (24) accepts the firmware as valid if the response from the system (10) and the agent (28) agree. The firmware is compressed and the rest of the memory (14) filled with random data (36) to prevent an attacker storing spoofing code within the memory.