Cryptographic agility
A method for updating a device, including: receiving, by the device, a public one-time signature key; receiving, by the device, a secret encryption key; receiving an encrypted update package and signature from an update provider; verifying the signature using the public one-time signature key; decrypting the encrypted update package using the secret encryption key; and updating the device using the decrypted update package.
1 . A method for updating a device, the method comprising:
during a provisioning process:
receiving, by the device, a public one-time signature (OTS) key;
receiving, by the device, a secret encryption key; and
provisioning code to run a one-time signature verification in the device; and
during an update process:
receiving at least one signed message including an encrypted update package and a command to enable a critical update mode from an update provider;
verifying the signature using the public OTS key;
when the signature is verified, enabling the critical update mode;
decrypting the encrypted update package using the secret encryption key; and
updating the device using the decrypted update package.
2 . The method of claim 1 , wherein, during the provisioning process, the method further comprising;
provisioning the device with a secret seed; and
reserving code space in the device for key generation using the secret seed.
3 . A method for updating a device by an update provider, the method comprising:
sending, by the update provider to the device, a critical update mode command signed using a first public one-time signature (OTS) key;
encrypting an update package using a secret encryption key;
signing a message including the encrypted update package using a second secret one-time signature key; and
sending the signed message including the encrypted update package to the device to update or replace code stored on the device to perform one or more cryptographic operations, the one or more cryptographic operations including a one-time signature verification operation.
4 . A method for updating a device, the method comprising:
during a provisioning process:
receiving, by the device, a first public one-time signature key and a second public one-time signature key;
receiving, by the device, a secret encryption key;
receiving, by the device, code to perform one or more cryptographic operations on the device, the one or more cryptographic operations including a one-time signature verification;
during a critical update process:
receiving, by the device, an update mode message and a first signature;
verifying, by the device, the first signature using the first public one-time signature key;
in response to verifying the first signature, entering, by the device, a critical update mode;
receiving, by the device, an encrypted update package and a second signature from an update provider;
verifying, by the device, the second signature using the second public one-time signature key;
in response to verifying the second signature, decrypting, by the device, the encrypted update package using the secret encryption key; and
updating, by the device, the code on the device using the decrypted update package.
5 . A method for updating a device by an update provider, the method comprising:
during a provisioning process:
sending a first public one-time signature key and a second public one-time signature key to the device;
sending a secret encryption key; and
sending code to the device, the code configured to cause the device to perform one or more cryptographic operations, the one or more cryptographic operations including a one-time signature verification operation;
during a critical update process:
producing a first signature of an update mode message using a first secret one-time signature key corresponding to the first public one-time signature key;
sending the update mode message and the first signature to the device to cause the device to enter a critical update mode;
encrypting an update package using the secret encryption key, the update package including update code to update or replace the code on the device;
producing a second signature of the encrypted update package using a second secret one-time signature key corresponding to the second public one-time signature key; and
sending the encrypted update package and second signature to the device.
6 . A method for requesting a certificate by an updated device, the method comprising:
receiving, by the updated device, a public certification authority signature key;
receiving, by the updated device, a secret one-time signature key;
generating a new updated device secret key and public key;
producing a signature request for the new updated device public key;
producing a first signature of the signature request using the secret one-time signature key;
sending the signature request and the first signature to a certification authority; and
receiving a certificate including a signature of the certificate from the certification authority.
7 . The method of claim 6 , further comprising:
provisioning the updated device with a secret seed; and
reserving code space in the updated device for key generation using the secret seed.
8 . The method of claim 6 , further comprising:
provisioning code to run a one-time signature verification in the updated device.
9 . The method of claim 6 , wherein the first signature is based on a secret certification authority signature key.
10 . A method for generating a certificate for an updated device, the method comprising:
sending a public certification authority signature key to the updated device;
sending a secret one-time signature key to the updated device;
receiving a certificate request for a new updated device public key and a first signature for the certificate request from the updated device, wherein the first signature is based on the secret one-time signature key;
verifying the first signature and the certificate request;
producing a certificate for the new updated device public key including a second signature of the certificate using a secret certification authority signature key corresponding to the public certification authority signature key; and
sending the certificate and second signature to the updated device.
11 . The method of claim 1 , wherein, during the provisioning process, receiving, by the device, the public OTS key, comprises:
receiving, by the device, a first public OTS key and a second public OTS key.
12 . The method of claim 11 , wherein the at least one signed message includes a first message signed by a first OTS key and including the command and a second message signed by a second OTS key and including the encrypted update package.
13 . The method of claim 12 , further comprising:
receiving, by the device, the first message;
verifying the first message using the first public OTS key;
in response to verifying the first message:
enabling the critical update mode based on the command of the first message; and
disabling any updates that utilize current cryptographic schemes;
receiving, by the device, the second message;
verifying the second message using the second public OTS key; and
in response to verifying the second message, decrypting the encrypted update package using the secret encryption key; and
updating the device using the decrypted update package.
14 . The method of claim 1 , further comprising:
provisioning the device with a secret seed; and
reserving code space in the device for key generation using the secret seed.
15 . The method of claim 3 , wherein, during a provisioning process that is performed before sending the critical update mode command, the method comprises:
provisioning the device with the first public OTS key and the second public OTS key;
provisioning the device with the secret encryption key; and
provisioning code to perform one or more cryptographic operations on the device, the one or more operations including a one-time signature verification operation.
16 . The method of claim 3 , further comprising:
provisioning the device with a secret seed; and
reserving code space in the device for key generation using the secret seed.
17 . The method of claim 4 , wherein in response to verifying the first signature, the method further comprises disabling any updates that utilize the code to perform the one or more cryptographic operations.
18 . The method of claim 4 , further comprising:
provisioning the device with a secret seed; and
reserving code space in the device for key generation using the secret seed.