Abstract:
There is disclosed a method of providing a software update to a secure element comprised in a host device, comprising converting the software update into a sequence of ciphertext blocks using a chained encryption scheme, and transmitting said sequence of ciphertext blocks to the host device. Furthermore, there is disclosed a method of installing a software update on a secure element comprised in a host device, comprising receiving, by the host device, a sequence of ciphertext blocks generated by a method of providing a software update of the kind set forth, converting said sequence of ciphertext blocks into the software update, and installing the software update on the secure element. Furthermore, corresponding computer program products and a corresponding host device are disclosed.

Description:
FIELD 
       [0001]    The present disclosure relates to a method of providing a software update to a secure element comprised in a host device. Furthermore, the present disclosure relates to a method of installing a software update on a secure element comprised in a host device. Furthermore, the present disclosure relates to corresponding computer program products and to a corresponding host device. 
       BACKGROUND 
       [0002]    Today, security plays an important role in many electronic devices and computing environments. For example, conventional mobile electronic devices may be used for payment transactions which require that sensitive payment-related data, such as user credentials, are input and/or stored on said devices. Such mobile electronic devices may for instance be equipped with a near field communication (NFC) interface based on radio frequency (RF) technology, in order to exchange payment-related data with a payment terminal device at a point-of-sale (POS). 
         [0003]    Traditionally, sensitive payment-related data have been incorporated into dedicated security tokens such as smart cards, in which the data are inherently confined to a relatively trusted environment. However, with the advent of integrated solutions, in particular the integration of so-called secure elements (SEs) in mobile devices, payment-related data are often exposed to a potentially hostile environment, and therefore the confidentiality of these data may be at stake. 
         [0004]    A secure element is often implemented as an embedded chip, more specifically as a tamper-resistant integrated circuit with (pre-) installed smart-card-grade applications, for instance payment applications, which have a prescribed functionality and a prescribed level of security. Alternatively, so-called Subscriber Identity Modules (SIMs) or Universal Subscriber Identity Modules (USIMs) may be used as secure elements. Furthermore, secure digital (SD) cards, such as traditional SD cards or micro-SD cards, may be used as secure elements. A secure element may be embedded in a mobile device or another host device, for example as a small outline package soldered directly on a printed circuit board. Alternatively, a secure element may be comprised in said mobile device as a removable component (e.g. a SIM or an SD card). 
         [0005]    Although a secure element offers a relatively secure environment for executing applications, it is relatively difficult to achieve and maintain this level of security, for example when operating components of the secure element need to be installed and/or configured. In particular if the software installed on a secure element needs to be updated, for example the secure element&#39;s operating system, then the secure element may be susceptible to attacks. Although many techniques exist for providing secure software updates, these techniques usually do not address updating software on secure elements of the kind set forth. For example, WO 2012/109640 A2 describes a secure software update that provides an update utility with an update definition, a private encryption key and a public signature key to a target device. A software update package is prepared on portable media that includes an executable update program, a checksum for the program that is encrypted with a symmetrical key, an encrypted symmetrical key that is encrypted with a public encryption key and a digital signature prepared with a private signature key. The update process authenticates the digital signature, decrypts the symmetrical key using the private encryption key, and decrypts the checksum using the symmetrical key. A new checksum is generated for the executable update program and compared to the decrypted checksum. If inconsistencies are detected during the update process, the process is terminated. Otherwise, the software update can be installed with a relatively high degree of assurance against corruption, viruses and third party interference. 
         [0006]    As another example, WO 2007/014314 A2 describes improved techniques to update software in electronic devices that are already in use. In one embodiment, software can be updated in a secure and controlled manner using cryptography. The authenticity of the updated software as well as its appropriateness for the particular electronic device can be confirmed prior to update. The software can also be updated on a per module basis. In one embodiment, a server hosts software updates for various electronic devices, and supplies the appropriate software update to the electronic devices via a data network. 
         [0007]      FIG. 1  shows a conventional computing system in which a secure element is used. The computing system  100  comprises a host device  102 , a host device vendor  108 , a trusted service manager  110 , and a secure element issuer  112 . The host device  102  may for example be a so-called smart phone or a tablet equipped with NFC technology, as described above. The host device  102  comprises a central processing unit  104  and a secure element  106 . 
         [0008]    In order to prepare the computing system  100  for use, the secure element issuer  112  issues a secure element  106  for integration into the host device  102 . In addition, the secure element issuer  112 , or the secure element producer (not shown) on their behalf, installs an initial version of an operating system on the secure element  106 . It is noted that the operating system of the secure element  106  is referred to as “Secure OS” in the remainder of this document. Furthermore, the host device vendor  108  installs an initial version of an operating system of the host device  102  in the host device  102 , typically in a Flash memory (not shown) of said host device  102 . It is noted that the operating system of the host device  102  is referred to as “Host OS” in the remainder of this document. 
         [0009]    In use, both the Secure OS and the Host OS may have to be updated, for example in order to provide additional security features or other functionality. Typically, the host device vendor  108  is responsible for installing updates of the Host OS on the host device  102 . For example, many host devices are nowadays configured to automatically receive and install broadcasted updates of the Host OS. An example of such a regularly updated Host OS is the Android operating system. The Secure OS may also have to be updated on a regular basis. However, in this case, a third party referred to as a trusted service manager (TSM)  110  typically acts as an intermediate for installing updates of the Secure OS. In particular, since the secure element issuer  112  no longer has access to secure elements which are already in the field (i.e. in use), it provides updates of the Secure OS to the trusted service manager  110 . 
         [0010]    Subsequently, the trusted service manager  110  manages the installation of the Secure OS updates on the secure element  106 . 
         [0011]    Unfortunately, however, the mechanisms used to install these updates on the secure element  106  are typically quite cumbersome. In particular, they rely on hardware-specific encryption methods which are complicated and inflexible. Also, they typically require setting up secure point-to-point communication channels between secure elements and trusted service managers. In view thereof, there exists a need to facilitate and simplify the installation of operating system updates on secure elements. It is noted that the same problem may occur if other software updates have to be installed on secure elements; in other words, this problem is not limited to updates of the Secure OS. Thus, in more general terms, there exists a need to facilitate and simplify the installation of software updates on secure elements of the kind set forth. 
       SUMMARY 
       [0012]    There is disclosed a method of providing a software update to a secure element comprised in a host device, comprising converting the software update into a sequence of ciphertext blocks using a chained encryption scheme, and transmitting said sequence of ciphertext blocks to the host device. 
         [0013]    According to an illustrative embodiment, converting the software update comprises generating each ciphertext block of the sequence, except the first ciphertext block, by encrypting a plaintext block that comprises a part of the software update. 
         [0014]    According to a further illustrative embodiment, the plaintext block is encrypted with a key that is comprised in a previous ciphertext block of the sequence. 
         [0015]    According to a further illustrative embodiment, the first ciphertext block of the sequence is generated by encrypting, with a root key, a key to be used for generating the second ciphertext block of the sequence. 
         [0016]    According to a further illustrative embodiment, the sequence of ciphertext blocks is cryptographically signed before it is transmitted to the host device. 
         [0017]    According to a further illustrative embodiment, said sequence of ciphertext blocks is integrated into a software update for the host device. 
         [0018]    Furthermore, there is disclosed a computer program product comprising program instructions which, when being executed by a processing unit, cause said processing unit to carry out or control steps of a method of providing a software update of the kind set forth. 
         [0019]    Furthermore, there is disclosed a method of installing a software update on a secure element comprised in a host device, comprising receiving, by the host device, a sequence of ciphertext blocks representing the software update, said sequence having been generated by a method of providing a software update of the kind set forth, converting said sequence of ciphertext blocks into the software update, and installing the software update on the secure element. 
         [0020]    According to a further illustrative embodiment, converting the sequence of ciphertext blocks comprises extracting a plaintext block that comprises a part of the software update from each ciphertext block of the sequence, except the first ciphertext block. 
         [0021]    According to a further illustrative embodiment, extracting a plaintext block from a ciphertext block comprises decrypting the ciphertext block with a key that is comprised in a previous ciphertext block of the sequence. 
         [0022]    According to a further illustrative embodiment, before extracting a plaintext block from each ciphertext block except the first ciphertext block, the first ciphertext block is decrypted with a root key in order to unlock a key for decrypting the second ciphertext block of the sequence. 
         [0023]    According to a further illustrative embodiment, a cryptographic signature of the sequence of ciphertext blocks is verified before the sequence of ciphertext blocks is converted. 
         [0024]    According to a further illustrative embodiment, said sequence of ciphertext blocks is extracted from a software update for the host device. 
         [0025]    Furthermore, there is disclosed a computer program product comprising program instructions which, when being executed by a processing unit, cause said processing unit to carry out or control steps of a method of installing a software update of the kind set forth. 
         [0026]    Furthermore, there is disclosed a host device comprising a secure element, said host device being arranged to perform a method of installing a software update of the kind set forth. 
     
    
     
       DESCRIPTION OF DRAWINGS 
         [0027]    Embodiments will be described in more detail with reference to the appended drawings, in which: 
           [0028]      FIG. 1  shows a conventional computing system in which a secure element is used; 
           [0029]      FIG. 2  shows an illustrative embodiment of a computing system in accordance with the present disclosure; 
           [0030]      FIG. 3  shows an illustrative embodiment of an encryption method; 
           [0031]      FIG. 4  shows an illustrative embodiment of a decryption method; 
           [0032]      FIG. 5  shows an illustrative embodiment of a communication method; 
           [0033]      FIG. 6  shows an illustrative embodiment of an installation method; 
           [0034]      FIG. 7  shows an illustrative embodiment of a signing method; 
           [0035]      FIG. 8A  shows an illustrative embodiment of a chained encryption scheme; 
           [0036]      FIG. 8B  shows an illustrative embodiment of a chained signing scheme. 
       
    
    
     DESCRIPTION OF EMBODIMENTS 
       [0037]      FIG. 2  shows an illustrative embodiment of a computing system in accordance with the present disclosure. Again, the computing system  200  comprises a host device  102  (including a central processing unit  104  and a secure element  106 ), a host device vendor  108  and a secure element issuer  112 . However, in contrast with the conventional computing system of  FIG. 1 , the computing system  200  does not comprise a trusted service manager. That is to say, updates of the Secure OS may be provided and installed via the host device vendor  108 . Thereby, there is no need for a trusted service manager or other third party, and thus the installation of said updates is simplified. In order to maintain an adequate security level, updates of the Secure OS comprise sequences of ciphertext blocks based on a chained encryption scheme. A Secure OS update may be broadcasted by the host device vendor  108  to the host device  102  as a software package or a software image containing said sequence of ciphertext blocks. Thus, contrary to conventional software updates for secure elements, the same software package or software image may be broadcasted to many host devices, and there is no need for setting up secure point-to-point communication channels between secure elements and trusted service managers. A host device  102  reassembles a Secure OS update and subsequently installs the Secure OS update on the secure element  106 . Thus, the upgrade of the operating system of the secure element  106  is effectively done in a broadcasted way. It is emphasized that other types of software updates for the secure element may be provided and installed in the same way. That is to say, the present disclosure is not limited to updates of the Secure OS, but it also applies to other types of software updates. 
         [0038]      FIG. 3  shows an illustrative embodiment of an encryption method. The Secure OS update may comprise a sequence of ciphertext blocks which may be encrypted by means of this encryption method  300 . According to this illustrative embodiment, the encryption method  300  comprises the following steps. First, a root ciphertext is generated  302  by encrypting a first key with a root key. Basically, the root ciphertext contains an encrypted version of the key that will be used for encrypting the first ciphertext block that contains a part of the Secure OS update. Second, the Secure OS update is split  304  into parts, i.e. into plaintext blocks that each contain a part of the software, i.e. the Secure OS update. Next, the first ciphertext block of the sequence is generated  306  by concatenating a first plaintext block and a second key and encrypting the result of this concatenation with the first key. In this way, the second key, which will be used for encrypting the next (i.e. the second) plaintext block, is comprised in the first ciphertext block. Next, the second ciphertext block is generated  308  by concatenating the second plaintext block and a third key and encrypting the result of this concatenation with the second key. This process is repeated for all plaintext blocks. Thus, assuming that there are n plaintext blocks, then the last but one step comprises generating  310  the (n-1) th  ciphertext block by concatenating the (n-1) th  plaintext block and an nth key and encrypting the result of this concatenation with an (n-1) th  key. Furthermore, the last step comprises generating  312  the n th  ciphertext block by encrypting the n th  plaintext block with the n th  key. 
         [0039]    In this way, the Secure OS update effectively comprises a sequence of ciphertext blocks which can either be broadcasted directly as a software package or software image, or which can easily be integrated into a Host OS update, for example by embedding or interleaving said ciphertext blocks into/with the data that constitute the Host OS update. Furthermore, since every key is used only once, the security risks that might arise when broadcasting the Secure OS update are effectively mitigated. It is noted that methods for integrating one set of data into another are known as such. That is to say, if the ciphertext blocks are to be integrated into the Host OS update (or into another software update for the host device), then the skilled person may apply any suitable method to integrate said ciphertext blocks. 
         [0040]    The ciphertext blocks may for example be formatted as so-called application protocol data units (APDUs). An APDU is a commonly used communication unit for exchanging data between smart cards—i.e. real or emulated smart cards—and smart card readers. Thus, the Secure OS update may either comprise a software package or software image constituted by sequence of APDUs, or a sequence of APDUs embedded into or interleaved with data units of the Host OS update. The data units of the Host OS update may, in turn, also be formatted as APDUs. Furthermore, it is noted that the encryption method may be carried out by the secure element issuer  112 , for example in a secure environment, or, if appropriate, by the host device vendor  108  on behalf of the secure element issuer  112 . The encryption method may be embodied in a computer program which is executable by a processing unit owned by the secure element issuer  112  or the host device vendor  108 , as the case may be. 
         [0041]      FIG. 4  shows an illustrative embodiment of a decryption method. Basically, the decryption method  400  mirrors the encryption method  300  shown in  FIG. 3 . The host device  102  executes the decryption method  400 . More specifically, the actual decryption may be performed by the secure element  106 , at least partially under the control of the central processing unit  104 , for example. In this way, a reasonable level of security may be achieved. According to this illustrative embodiment, the decryption method  400  comprises the following steps. First, the root ciphertext block is decrypted  402  with the root key, which results in the first key. The root key may have been stored in the secure element  106  by the secure element issuer  112 , or by the secure element producer on his behalf, before or during installation, for example, and it may have been agreed upon and shared with the host device vendor  108  using an appropriate protocol, such as the Diffie-Hellman key agreement protocol. Second, the first ciphertext block—i.e. the first ciphertext block of the sequence that actually contains a part of the Secure OS update—is decrypted  404  with the first key, which results in the first plaintext block and the second key. Next, the second ciphertext block is decrypted  406  with the second key, which results in the second plaintext block and the third key. This process is repeated for all ciphertext blocks. Thus, assuming that there are n ciphertext blocks, then the last but one decryption step comprises decrypting  408  the (n-1) th  ciphertext block with the (n-1) th  key, which results in the (n-1) th  plaintext block and the nth key. The last decryption step comprises decrypting  410  the n th  ciphertext block with the nth key, which results in the n th  plaintext block. At this stage, a sequence of n plaintext blocks has become available. These plaintext blocks are reassembled  412  in a final step, thereby yielding the Secure OS update. It is noted that the final step of reassembling the Secure OS update is not an actual decryption step, but it is the counterpart of the step of splitting the Secure OS update in the encryption method of  FIG. 3 . 
         [0042]      FIG. 5  shows an illustrative embodiment of a communication method. As a first step of the communication method  500 , ciphertext blocks are generated by means of the encryption method  300  shown in  FIG. 3 . Subsequently, a Secure OS update signature is generated by means of a signing method  700 , which will be explained in detail with reference to  FIG. 7 . Next, the ciphertext blocks are formatted  502  as APDUs. Finally, the APDUs are broadcasted  504 , for example in the form of a software package or a software image, via the host device vendor  108  to the host device  102 . It is noted that the mapping of these steps to the functional units of the computing system  200  may take different forms. That is to say, as mentioned above, that the encryption method  300  may for example be carried out by the secure element issuer  112  or, if appropriate, by the host device vendor  108  on behalf of the secure element issuer  112 . The same applies to generating  700  the Secure OS update signature and formatting  502  the ciphertext blocks as APDUs. The broadcasting step  504  is in this example performed by the host device vendor  108 ; in order to facilitate said broad-casting the host device vendor  108  may integrate the APDUs into the Host OS update, as explained above. This integration also increases the user friendliness of the system, because the host device will receive less software updates. 
         [0043]      FIG. 6  shows an illustrative embodiment of an installation method. As a first step of the installation method  600 , the host device  102  receives  602  a Secure OS update from the host device vendor  108 . Subsequently, the Secure OS update signature is verified  604 . For example, the signature may have been generated using a private key, and the secure element  106  may contain the corresponding public key which shall be used to verify the signature. The signature may have been embedded in or appended to the first APDU of the Secure OS update, in order to avoid that the sequence of APDUs is decrypted in case the signature is not valid. Thereby, security is further enhanced and it is prevented that computing resources are wasted. If the signature is not valid, then the subsequent steps of the installation method  600  will not be performed and the host device  102  waits for a new Secure OS update. Otherwise, the APDUs are unformatted  606  in a next step. Next, the decryption method  400  shown in  FIG. 4  is carried out, i.e. the ciphertext blocks are decrypted and the Secure OS update is reassembled. Subsequently, the Secure OS update is installed  608  on the secure element  106 . It is noted that the mapping of these steps to the functional units of the host device  102  may take different forms. That is to say, as mentioned above, that the actual decryption steps of the decryption method  400  may for example be performed by the secure element  106 , at least partially under the control of the central processing unit  104 . The Secure OS update may be received by the central processing unit  104  via a communication unit (not shown) of the mobile device  102 . The verification of the signature, the unformatting of the APDUs and the installation of the Secure OS update may involve both the central processing unit  104  and the secure element  106 . In order to achieve a high level of security, the secure element  106  preferably performs most of the operations necessary to carry out these steps. In order to perform such operations, the secure element  106  may also include a processing unit (not shown). 
         [0044]      FIG. 7  shows an illustrative embodiment of a signing method. The signing method  700  is an example of a method for generating the Secure OS Update signature. As a first step, an n th  hash value is created  702  by hashing the n th  ciphertext block. Subsequently, an (n-1) th  hash value is created  704  by concatenating the (n-1) th  ciphertext block and the n th  hash value and by hashing the result of this concatenation. This is repeated until all ciphertext blocks have been processed. Thus, in the final steps, a second hash value is created  706  by concatenating the second ciphertext block and a third hash value and by hashing the result of this concatenation. Subsequently, a first hash value is created  708  by concatenating the first ciphertext block and the second hash value and by hashing the result of this concatenation. Finally, the Secure OS update signature is generated  710  by concatenating the root ciphertext block and the first hash value and by signing the result of this concatenation, for example by means of a cryptographic function that takes a private key of a public-private key pair as an input. 
         [0045]      FIG. 8A  shows an illustrative embodiment of a chained encryption scheme.  FIG. 8B  shows an illustrative embodiment of a chained signing scheme. These figures further elucidate the encryption method  300  shown in  FIG. 3  and the signing method  700  shown in  FIG. 7 , respectively. 
         [0046]    It is noted that a host device may be interpreted in a broad sense so as to include, for example, smart cards. Accordingly, a method in accordance with the present disclosure may also be used to advantage in a smart card, in order to facilitate the installation of software updates on a secure element embedded in such a smart card. 
         [0047]    It is noted that the drawings are schematic. In different drawings, similar or identical elements are provided with the same reference signs. Furthermore, it is noted that in an effort to provide a concise description of the illustrative embodiments, implementation details which fall into the customary practice of the skilled person may not have been described. It should be appreciated that in the development of any such implementation, as in any engineering or design project, numerous implementation-specific decisions must be made in order to achieve the developers&#39; specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another. Moreover, it should be appreciated that such a development effort might be complex and time consuming, but would nevertheless be a routine undertaking of design, fabrication, and manufacture for those of ordinary skill. 
         [0048]    Finally, it is noted that the skilled person will be able to design many alternative embodiments without departing from the scope of the appended claims. In the claims, any reference sign placed between parentheses shall not be construed as limiting the claim. The word “comprise(s)” or “comprising” does not exclude the presence of elements or steps other than those listed in a claim. The word “a” or “an” preceding an element does not exclude the presence of a plurality of such elements. Measures recited in the claims may be implemented by means of hardware comprising several distinct elements and/or by means of a suitably programmed processor. In a device claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage. 
       LIST OF REFERENCE SIGNS 
       [0049]      100  computing system 
         [0050]      102  host device 
         [0051]      104  central processing unit 
         [0052]      106  secure element 
         [0053]      108  host device vendor 
         [0054]      110  trusted service manager 
         [0055]      112  secure element issuer 
         [0056]      200  computing system 
         [0057]      300  encryption method 
         [0058]      302  encryption method step 
         [0059]      304  encryption method step 
         [0060]      306  encryption method step 
         [0061]      308  encryption method step 
         [0062]      310  encryption method step 
         [0063]      312  encryption method step 
         [0064]      400  decryption method 
         [0065]      402  decryption method step 
         [0066]      404  decryption method step 
         [0067]      406  decryption method step 
         [0068]      408  decryption method step 
         [0069]      410  decryption method step 
         [0070]      412  decryption method step 
         [0071]      500  communication method 
         [0072]      502  communication method step 
         [0073]      504  communication method step 
         [0074]      600  installation method 
         [0075]      602  installation method step 
         [0076]      604  installation method step 
         [0077]      606  installation method step 
         [0078]      608  installation method step 
         [0079]      700  signing method 
         [0080]      702  signing method step 
         [0081]      704  signing method step 
         [0082]      706  signing method step 
         [0083]      708  signing method step 
         [0084]      710  signing method step