CA2382913C

System and method for securely upgrading firmware

Abstract

Upgraded firmware for a microcontroller is created and encrypted to construct afile (116) that can be distributed and installed by technicians in the field. The encryptionincludes character encryption (210) of the data as well as a second level of blockencryption (216). Within the encrypted file (116), information about the firmware andthe target microcontroller (104) is included. The distributed firmware file (116) is storedon a portable device, such as a PDA, that can communicate with the targetmicrocontroller (104) to effect a firmware transfer from the PDA (112) to themicrocontroller (104). The microcontroller (104) includes a programming routine thatreceives the encrypted data stream from the PDA and decrypts the data before storing thenew firmware image. The programming routine also identifies when updating thefirmware has left the firmware in an unusable condition and prevents operation of themicrocontroller until the firmware is restored. Accordingly, the security of the firmwareis maintained throughout the distribution and upgrade process and the integrity of theupgrade process is maintained as well.

CA2382913C, drawing sheet 1
Sheet 1 of 6

Term

Term ended

Expired 19 April 2022, 4.4 years ago.

  1. Priority
  2. Filed
  3. Granted
  4. Expired
  5. Today

14 claims: 4 independent, 10 dependent

  1. 1
    CA 02382913 2005-09-30 THE EMBODIMENTS OF THE INVENTION IN WHICH AN EXCLUSIVE PROPERTY OR PRIVILEGE IS CLAIMED ARE DEFINED AS FOLLOWS:1. A method for constructing an encrypted file comprising the steps of: obtaining a first key and a second key having a same size;obtaining a third key that is constructed by rearranging and combining the first and second keys, wherein the third key is larger in size than the first and second keys;obtaining a fourth key that is constructed by selecting a subset of the third key, wherein the fourth key is smaller in size than the first, second and third keys;encrypting (210) a source file (256) by encrypting a plurality of segments of the source file (256) using the fourth key to generate a first encrypted file (260), the size of each of said plurality of segments being equal in size to the fourth key;and encrypting (216) the first encrypted file (260) by encrypting a plurality of blocks of the first encrypted file (260) using the third key to generate a second encrypted file (268), the size of each of said plurality of blocks being equal in size to the third key.
  2. 6
    A method for constructing a firmware file for a target microcontroller, comprising the steps of:obtaining a firmware image file (256) for the target microcontroller (104);encrypting (210) each byte of the firmware image file (256) using a first key to generate a first encrypted file (260), said first key having a value and wherein said value of the first key depends on a device (102) using the target microcontroller (104);and encrypting (216) each block of the first encrypted file (260) using a second key to generate a second encrypted file (268), wherein the first key is a subset of the second key.
  3. 12
    A computer readable media bearing instructions for constructing an encrypted file, said instructions being arranged to cause one or more processors upon execution thereof to perform the steps of:obtaining a first key and a second key having a same size;obtaining a third key that is constructed by rearranging and combining the first and second keys, wherein the third key is larger in size than the first and second keys;obtaining a fourth key that is constructed by selecting a subset of the third key, wherein the fourth key is smaller in size than the first, second and third keys;-27CA 02382913 2005-09-30 encrypting the source file by encrypting a plurality of segments of a source file using the fourth key to generate a first encrypted file, the size of each segment being equal in size to the fourth key;and encrypting the first encrypted file by encrypting a plurality of blocks of the first encrypted file using the third key to generate a second encrypted file, the size of each block being equal in size to the third key.
  4. 13
    A computer readable encrypted firmware distribution file (116) embodied in a carrier wave, comprising:a first file (260) encrypted according to a first algorithm, said first file comprising a firmware image (256) for a target microcontroller (104);a header (262) comprising information about one or both of the target microcontroller (104) and the firmware image (256);a second file (268) encrypted according to a second algorithm;said second file (268) comprising the first file (260), the header (262) and a first integrity indicator (266) calculated from the first file (260) and the header (262);and a second integrity indicator (270) calculated from the second file (268).