Rollback resistant security
Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for rollback resistant security are disclosed. In one aspect, a method, during a boot process of a computing device, includes the actions of obtaining a secret key derived from device-specific information for the computing device. The method further includes verifying that a signature for a software module is valid. The method further includes obtaining information indicating a current version of the software module. The method further includes using the secret key to generate a first encryption key corresponding to the current version of the software module and a second encryption key corresponding to a prior version of the software module. The method further includes preventing future access to the secret key until the computing device is rebooted. The method further includes providing the software module access to the first encryption key and the second encryption key.
1 . A computing-implemented method comprising:
in response to upgrading a prior version of a software module, determining a current version number for a current version of the software module, wherein previous version numbers for previous versions of the software module are derivable from the current version number;
storing an indication of the current version number; and
during a boot process of a computing device:
extracting a software version number from a digital signature for the software module to be loaded, and
upon a determination that the software version number matches a previous version number of the software module, preventing access to encrypted user information associated with the current version of the software module.
2 . The method of claim 1 , further comprising:
upon a determination that the software version number associated with the software module to be loaded matches the previous version number, generating a prior encryption key corresponding to the previous version of the software module.
3 . The method of claim 2 , further comprising:
providing the software module access to the previous version of the software module and to the prior encryption key to enable decryption of information associated with the previous version.
4 . The method of claim 1 , further comprising:
generating, based on a device-specific key, a first encryption key corresponding to the current version of the software module and a second encryption key corresponding to the prior version of the software module; and
after generating the first encryption key and the second encryption key, preventing future access to the device-specific key until a next reboot of the computing device.
5 . The method of claim 4 , wherein the device-specific key is stored on a system on a chip (SoC), and wherein the preventing of the future access to the device-specific key is performed by the SoC.
6 . The method of claim 4 , wherein the device-specific key is stored in hardware, is immutable, and is not accessible to the software module.
7 . The method of claim 4 , wherein the preventing of the future access to the device-specific key comprises overwriting the device-specific key.
8 . The method of claim 4 , wherein the preventing of the future access to the device-specific key comprises an adjustment of permissions for the software module to access the device-specific key.
9 . The method of claim 4 , wherein the generating of the first encryption key and the second encryption key comprises:
obtaining information indicating the current version of the software module installed on the computing device; and
using the device-specific key to generate a first value corresponding to the current version and a second value corresponding to the prior version, wherein the first encryption key is based on the first value, and the second encryption key is based on the second value.
10 . The method of claim 9 , wherein the generating of the first encryption key comprises hashing the first value, and wherein the generating of the second encryption key comprises hashing the second value.
11 . The method of claim 10 , wherein the hashing of the first value and of the second value is based on a same hashing algorithm.
12 . The method of claim 10 , wherein the hashing of the first value is based on a first hashing algorithm, and wherein the hashing of the second value is based on a second hashing algorithm.
13 . The method of claim 9 , wherein a respective first or second value comprises a combination of the device-specific key with a respective version number of a respective current or prior version of the software module.
14 . The method of claim 8 , wherein a respective first or second value comprises a combination of the device-specific key with a public key associated with the software module and a respective version number of a respective current or prior version of the software module.
15 . The method of claim 8 , wherein a respective first or second value comprises a concatenation of a software identifier associated with the software module with a public key associated with the software module, a respective version number of a respective current or prior version of the software module, and the device-specific key.
16 . The method of claim 1 , wherein the software module is an operating system or a kernel.
17 . The method of claim 10 , further comprising:
determining that the prior version of the software module has been updated to the current version of the software module; and
in response to determining that the prior version of the software module has been updated to the current version of the software module:
decrypting user information using a second encryption key corresponding to the prior version of the software module, and
encrypting the decrypted user information using a first encryption key corresponding to the current version of the software module.
18 . A computing device comprising:
one or more processors; and
data storage, wherein the data storage has stored thereon computer-executable instructions that, when executed by the one or more processors, cause the computing device to perform operations comprising:
in response to upgrading a prior version of a software module, determining a current version number for a current version of the software module, wherein previous version numbers for previous versions of the software module are derivable from the current version number;
storing an indication of the current version number; and
during a boot process of a computing device;
extracting a software version number from a digital signature for the software module to be loaded, and
upon a determination that the software version number matches a previous version of the software module, preventing access to encrypted user information associated with the current version of the software module.
19 . A non-transitory computer-readable medium storing software comprising instructions executable by a computing device that, upon execution, cause the computing device to perform operations comprising:
in response to upgrading a prior version of a software module, determining a current version number for a current version of the software module, wherein previous version numbers for previous versions of the software module are derivable from the current version number;
storing an indication of the current version number; and
during a boot process of a computing device:
extracting a software version number from a digital signature for the software module to be loaded, and
upon a determination that the software version number matches a previous version of the software module, preventing access to encrypted user information associated with the current version of the software module.
20 . The method of claim 1 , further comprising:
upon a determination that the software version number matches the current version number of the software module:
generating a current encryption key corresponding to the current version, and
decrypting user information that is stored on the computing device using a prior encryption key that corresponds to the prior version of the software module, and re-encrypting the user information with the current encryption key.
21 . The method of claim 1 , further comprising:
during the boot process of the computing device:
verifying, by a bootloader, that the digital signature for the software module to be loaded is valid.
22 . The method of claim 1 , wherein preventing access to encrypted user information associated with the current version of the software module comprises preventing generation of an encryption key corresponding to the current version of the software module.