Patent ID: 7817799

Claim:
A method, comprising: maintaining a first write only register in an encryption engine of a cryptographic unit; maintaining a second write only register in a decryption engine of the cryptographic unit; maintaining an error flag in the cryptographic unit; writing a cryptographic key in the first write only register and the second write only register, wherein the cryptographic key is inaccessible for reading from any entity that is external to the cryptographic unit; subsequent to writing the cryptographic key in the first write only register and the second write only register and prior to receiving encrypted data for decryption at the cryptographic unit performing: determining whether the first write only register has a different value than the second write only register because of an error in the cryptographic unit; setting the error flag, to indicate the error in the cryptographic unit, in response to determining that the first write only register has a different value than the second write only register; and setting the error flag to indicate proper functioning of the cryptographic unit, in response to determining that the first write only register does not have a different value than the second write only register; and subsequent to setting the error flag, performing: receiving the encrypted data for decryption at the cryptographic unit; decrypting the encrypted data in the cryptographic unit by using the cryptographic key written in the second write only register of the decryption engine, in response to determining that the error flag indicates proper functioning of the cryptographic unit; and responding with an error indication, in response to determining that the error flag indicates the error in the cryptographic unit.