Abstract:
Disclosed are methods and systems of implementing a right over a content or contents. Various implementations may include means and operations for receiving, for example in an execution environment and from a secure element, a first key for implementing a right over an encrypted content; decrypting said content in said execution environment with the help of the first key; and implementing the right over the content in said execution environment. Various implementations may also include means and operations for receiving a second key in, for example, said execution environment, from the secure element; and encrypting said content in sad execution environment with the help of the second key.

Description:
TECHNICAL CONTEXT 
       [0001]    The invention lies in the field of digital security, and in particular managing rights relating to a content to which access is made secure. 
         [0002]    Certain information or data, possibly of large size, needs to be made accessible only in secure manner to computer applications or to human users. Access requires a request to be sent by a requester (an application, optionally acting on behalf of a human user) to a controller having a register of rights. It is known to give different rights as a function of the requester, in particular the right to read or the right to modify the data, or the right to execute an application. 
         [0003]    Furthermore, in order to use this information or data of large size, referred to as “content”, it is necessary to have an execution environment. This environment makes it possible in particular to use peripherals including a screen and a keyboard, and it also makes available a large amount of memory space and a powerful processor. 
         [0004]    In order to protect access to the content, the content may be encrypted with a cryptographic key. The cryptographic keys may be stored in secure elements, which are execution environments that often (but nevertheless not necessarily) have resources that are less extensive, in particular a processor of smaller power or a memory of smaller size, in comparison with an execution environment capable of using the content. In contrast, environments for storing cryptographic keys are made secure both in software terms and in hardware terms. They are protected against physical attacks, such as differential power analysis (DPA) attacks. Such an environment is referred to as a secure element. It may be constituted by or included in and implemented by a subscriber identity module (SIM) card, in a component of the embedded secure element (eSE) type constituted by a chipset that is distinct from the main processor of the electronic device, or in a removable component of the secure element (SE) type, e.g. a micro-secure digital (SD) card. A secure element may for example satisfy the specifications of ISO7816 or the Common criteria standard. It may dialog with an execution, environment of the electronic device with the help of Application Protocol Data Unit (APDU) commands and responses. 
         [0005]    Typically, the execution environment having greater resources may be a secure execution environment, which means that it is protected in software terms, but it is not protected against physical attacks, in particular because of its complexity. 
         [0006]    In order to exercise a right over a content, e.g. in order to execute a trusted application providing a trusted service, to broadcast a piece of music having protected rights, or to gain read or write access to an encrypted content, the user or the application acting on behalf of the user needs to obtain the cryptographic key situated in the secure element, so that the secure element transmits a cryptographic key for decrypting the content in the execution environment. 
         [0007]    Since the execution environment is not protected against physical attack, e.g. DPA attacks, the cryptographic key provided by the secure element might then be revealed to attackers carrying out en attack against the secure element. 
       DEFINITION OF THE INVENTION AND ITS ASSOCIATED ADVANTAGES 
       [0008]    The present invention seeks to respond to this problem by proposing a method of implementing a right over a content, the method comprising:
       a reception step of receiving, in an execution environment and from a secure element, a first key for implementing a right over an encrypted content;   a decryption step of decrypting said content in said execution environment with the help of the first key; and   an implementation step of implementing the right over the content in the execution environment;       
 
         [0012]    the method being characterized in that it further comprises:
       a reception step of receiving a second key in said execution environment from the secure element; and   an encryption step of encrypting said content in said execution environment with the help of the second key.       
 
         [0015]    By means of this method, it is possible to prevent physical attacks, e.g. a DPA attack, revealing a cryptographic key used for encryption, since the key is modified each time the content is used. 
         [0016]    The content may be stored in a secure memory of the execution environment, however it may also be stored in a memory of a remote server accessible via a telecommunications network. 
         [0017]    A token for identifying the content may be stored in a non-shared zone of secure non-volatile memory of the execution environment. The method may further comprise a reception step of receiving, in the execution environment and from the secure element, a memory address in which the encrypted content is stored. This makes it possible to avoid retaining the address at which the content is stored, thereby increasing security relating to the content. 
         [0018]    The invention also provides a trusted computer application comprising instructions that, when executed by a processor, cause a method as described above to be implemented. 
         [0019]    The invention also provides a secure element for controlling a content, the element comprising storage means for storing a current cryptographic key associated with an encrypted content, and being characterized in that it further comprises:
       verification and transmission means for verifying a right of a requester relating to said content and for transmitting said current cryptographic key to said requester if said verification is successful; and   selection and transmission means for selecting a new cryptographic key for encrypting said content once the content is implemented by the requester, and for transmitting the new key to the requester.       
 
         [0022]    By means of this device, it is possible not only to reduce the risks of an encrypted content being read by an attacker using a physical attack, since the keys are modified on each use, but it is also possible to control access to the content by a secure element. 
         [0023]    The secure element may further comprise selection means for selecting a new memory zone in a content storage memory of an execution environment in order to store the content once the right is implemented by the requester. This increases security. 
         [0024]    According to a particular characteristic, a size of a memory zone in which the content is stored is modified once the right has been implemented. 
         [0025]    The invention also provides an electronic device comprising a secure element as described above and an execution environment in which a requesting application can be implemented and the content can be stored. 
         [0026]    The invention also provides a method of implementing a right over a content, the method comprising:
       at least one use step of using the content in said execution environment, and before each step of using the content:
           a reception step of receiving in an execution environment and from a secure element a first referred to as a current key, in order to use an encrypted content; and   a decryption step of decrypting said content in said execution environment with the help of the current key;   
               
 
         [0030]    the method being characterized in that it further comprises:
       a reception step of receiving a second key, referred to as a following key, in said execution environment from the secure element; and   after each step of using the content, a step of encrypting said content in said, execution environment with the help of the following key, and a step of storing the content in a memory.       
 
         [0033]    The invention also provides a secure element for controlling a content, the element comprising storage means for storing a current cryptographic key associated with an encrypted content, and being characterized in that it further comprises:
       verification and transmission means for verifying a right of use of a requester relating to said content and for transmitting said current cryptographic key to said requester if said verification is successful; and   selection and transmission means for selecting a new cryptographic key, referred to as a following key, for encrypting said content once the content is used by the requester, and for transmitting the following key to the requester.       
 
     
    
     
       LIST OF FIGURES 
         [0036]      FIG. 1  shows an electronic device using prior art principles. 
           [0037]      FIG. 2  shows a method of implementing a right on a content using prior art principles. 
           [0038]      FIG. 3  shows an electronic device using the principles of the present disclosure. 
           [0039]      FIGS. 4 and 5  show tables used in the  FIG. 3  device. 
           [0040]      FIG. 6  shows a method of implementing a right on a content with the help of a device as shown. 
           [0041]      FIG. 7  shows another electronic device using the principles of the present disclosure. 
       
    
    
     DETAILED DESCRIPTION 
       [0042]      FIG. 1  shows an electronic device  10 , which in this example is a telecommunications terminal, e.g. a mobile telephone. It comprises an execution environment  100  and a secure element  200 . 
         [0043]    The execution environment  100  includes an application  110  and a content C in a nonvolatile memory zone  120 . The content C is encrypted, and the application  110  has software means for performing an operation of decrypting the content C, but it does not have a key enabling the content C to be decrypted also has means for making use of the content C once it has been decrypted, such as for example reading the content C if it is a piece of music protected by rights, or executing the content C if it is an application. 
         [0044]    Other applications similar to the application  110  may be present in the execution environment  100 , and they have access to the memory zone  120  in which the content C is stored, since this memory zone  120  is a memory zone that is shared between various applications, and may for example be usable with contents of large volume. Contents other than the content C may also be present in the shared memory of the execution environment  100 . 
         [0045]    The terminal  10  may include other execution environments (not shown) in addition to the execution environment  100 . Each execution environment has an operating system under which the applications contained in the execution environment are executed, a processor of its own or shared with other execution environments, enabling the operating system and the applications to be executed, and a memory or memory zone specific to the execution environment. 
         [0046]    The secure element  200  has a secure memory zone  210  in which a key K is stored. This key is a permanent key, which is not modified as a function of uses of the content C undertaken by the application  110  or other applications of the execution environment  100 . 
         [0047]    Communications channels  290  are installed between the secure element  200  and the applications of the execution environment  100 , e.g. the application  110 . If the execution environment  100  is a secure execution environment, the communications channels  290  are also secure communications channels. A secure execution environment is adapted in particular to executing trusted applications, i.e. applications that provide a guarantee of security to the final human user, such as a payment application. 
         [0048]      FIG. 2  shows the steps of a process of using a content C, which process in this example comprises the application  110  reading and modifying the content in application of prior art principles known to the inventors. A first step S 1  consists in the application  110  using a communications channel  290  between the secure environment  200  and the execution environment  100  that is associated therewith to access the cryptographic key K that it needs for decrypting the content C. 
         [0049]    This is done by the steps S 1  and S 2 . The application  110  extracts the content C from the memory zone  120  in which it is stored (steps S 3  and S 4 ), and then decrypts it during a step  95 . The application reads the content and modifies it during a step S 6 , and then re-encrypts it with the key K during a step S 7 . The application stores it in its modified form in the memory zone  120  (steps S 8  and S 9 ), and then deletes the key K from the volatile memory of the execution environment  100  during a step S 10 . The application  110  will need to look for the key K in the secure element  100  on the next occasion during which it desires to use the content C. 
         [0050]      FIG. 3  shows an electronic device  20  constituting an embodiment of the general principles of the present disclosure. It is described with reference to the electronic device  10  of  FIG. 1 , with identical reference numbers being used for elements that are in common. The electronic device  20  may also be a telecommunications terminal, for example a smartphone or a portable tablet. 
         [0051]    Like the device  10 , the electronic device  20  has an execution environment  100  implementing applications TA 1 , TA 2 , TA 3 , . . . , and in particular an application  110 . The notation TA is short for the term “trusted application”, since in an advantageous embodiment, the applications concerned are trusted applications and the execution environment  100  is a secure environment. 
         [0052]    The execution environment  100  also stores contents in memory zones that are not volatile, and in particular an encrypted content C in a nonvolatile memory zone  120 . 
         [0053]    The electronic device  20  also has a secure element  200 . The secure element  200  includes a memory zone  210  in which cryptographic keys are stored. 
         [0054]    The secure element  200  also includes a control application  220  that is an application developed to be executed with the limited but secure resources of the secure element  200 , for example a Java applet or a SIM card applet. Its function is to verify the rights of a requester (a requesting application of the execution environment  100  seeking to use the content C or any other content stored in a nonvolatile memory of the execution environment. This verification may be performed by using a double-entry table T specifying, for each application of the execution environment  100  known to the secure element  200  and for each memory zone of the execution environment  100  in which there is content C to which access is managed by the secure element, the rights of the application over the content. 
         [0055]    The table T is shown in  FIG. 4 , where the applications TA 1 , TA 2 , TA 3 , and TA 4  are marked, and in which the memory zones are specified in the form of tokens Tok 1 , Tok 2 , Tok 3 , and Tok 4 . Read, write, and read-and-execute rights are written R, W, and R/X respectively. The table T is stored in the secure element  200 . 
         [0056]    As shown in  FIG. 5 , each of the tokens Tok 1 , Tok 2 , Tok 3 , and Tok 4  is associated in a single-entry table T′ both with a memory zone A 1 , A 2 , A 3 , A 4  (where the term “zone” is used for example to specify a register address and a memory zone size) and also with cryptographic means K 1 , K 2 , K 3 , K 4  with which the content stored at the address of the corresponding memory zone that is protected. The cryptographic means may be a symmetric cryptographic key or a pair of asymmetric cryptographic keys. The table T is stored in the memory zone  210 . 
         [0057]    The secure element  200  also includes an application  230  for selecting new cryptographic keys and possibly a content address. Selecting a new key may involve generating it, e.g. randomly, or else selecting it from a bank of keys, e.g. a pre-existing bank. 
         [0058]    This step of managing the memory may be performed in cooperation with a dedicated application of the execution environment. The application  230  may also be capable of generating a new memory zone address (and an associated memory zone size) in the shared memory of the execution environment  100  for a content, such as the content C, in order to store it in a different memory zone of the memory zone  120 . By way of example, this function makes it possible to define memory zones  121  and  122  in the shared nonvolatile memory of the execution environment  100  that are different from the memory zone  120 . The addresses and the size of these memory zones are stored in the corresponding rows of the table T′. The application  230  may also decide to increase or decrease the size of the memory zone in which the content is stored, or, without defining a new memory zone for the content C, it may decide to authorize writing over only a portion of the memory zone. 
         [0059]    The applications  220  and  230  may constitute a single application, possessing both of the rights-control and the key-selection (or generation) functions, this second function possibly being associated with a function for generating a memory zone address (and size). 
         [0060]    The execution environment  100  thus has different memory zones  120 ,  121 , or  122 , the content C being stored for example in the memory zone  120 . It also has an application  110  (or TA 1 ) that can store as a token Tok 1  for the content C in a nonvolatile memory zone  110   a  that is specific thereto, i.e. a nonvolatile memory zone that is not shared with other applications TA 2 , TA 3 . 
         [0061]    The application  110  communicates with the controller application  220  and the selection application  230  via a communications channel  290 , which may be a secure channel. 
         [0062]      FIG. 6  shows the steps of a process of using the content C, specifically reading and modifying the content, by means of the application  110  in accordance with the principles of the disclosure. 
         [0063]    A first step S 101  consists in the application  110  searching the non-shared memory  120  for the token Tok 1  of the content C. This is obtained during the step S 102 . 
         [0064]    Thereafter, during a step S 103 , the application  110  makes a request to the control application  220  of the secure element  200  for the cryptographic key K needed for decrypting the content C, by sending the token Tok 1 , and an identifier TA 1  enabling the control application  220  to identify the application  110  as the requester, and also the type of rights that it seeks to exercise on the content, e.g. R for reading. In an implementation, a key may also be associated with a particular access right, e.g. read access. 
         [0065]    During a step S 104 , the control application  220  examines the table T or the basis of the information received during the step S 103 , and if the application  110  is authorized to exercise the right A over the content, it interrogates the memory  210  to extract a key K and a memory address A therefrom (steps S 105  and S 106 ). 
         [0066]    The control application  220  transmits this key K and address A to the application  110  during a step S 107 . The application  110  extracts the content C from the memory identified by the address A (steps S 108 , S 109 ), and then decrypts it during a step S 110  with the help of the key K. Thereafter, during a step S 111 , it reads the content, exercising the right for which it requested the key, and it possibly modifies the content, if it is configured to modify the content. 
         [0067]    When the application  110  has finished exercising its right over the content C, it informs the selection application  230  for selecting the key and the address (by transmitting an end signal FIN during a step S 112  together with the identifier TA 1  of the application  110 ) which selection application acts during a step S 113  to select a new key K′ (or a new pair of asymmetrical cryptographic keys) and optionally a new address A′, and also a new token Tok 1 ′, if there is a new address. It transmits them to the application  110  (step S 114 ). The selection application  230  also stores in the memory zone  210  the new key K′ in a new row of the table T′ corresponding to the content C as identified by the token Tok 1 ′ or by the old token Tok 1  if it has not been modified (step S 115 ). 
         [0068]    The application  110  encrypts the content C with the key K′ during a step S 116 . Thereafter it stores it in the memory zone  121  (steps S 117  and S 118 ). It also stores the token Tok 1 ′ in the non-shared memory zone  110   a  during a step S 119  and during a step S 120  it deletes the address A′ and the key K′ from the volatile memory of the execution environment  100 . 
         [0069]    It is specified that if asymmetrical cryptographic keys are used, then the key transmitted by the secure element during step S 107  is the private key and the key transmitted by the secure element during step S 114  is the public key. 
         [0070]    It is also specified that a new address (and consequently a new token) may be selected on each occasion, or else that selection may be imposed by the secure element or the application  110 . The steps from S 112  upwards that amount to releasing the content, which content could then be used by another user, may also be imposed by a master function of the execution environment  100 . In general manner, the tokens and the keys may be regenerated after each write operation. In the absence of content modification, this regeneration may also be forced by the secure element  200  or by an application of the execution environment  100 , e.g. a trusted application of the environment  100 , if it is a secure environment (as mentioned below). 
         [0071]    In the presently-described example, only one iteration of the steps S 101  to S 120  of the method is described, this iteration implementing two keys, i.e. the first key K or “current” key and the second K′ or “following” key. Nevertheless, the steps S 101  to S 120  of the method may be repeated. On each new iteration of these steps S 101  to S 120 , the following key of the iteration preceding the new iteration becomes the current key of the new iteration, and a new following key is selected. 
         [0072]      FIG. 7  shows a variant of a device in accordance with the principles of the present disclosure, in which use of the device implements a method in accordance with the principles of the disclosure. 
         [0073]    In this variant, the content. C is stored in a non-volatile memory  510  of a remote server  500  that is accessible via a telecommunications network  400 , which may involve, singly or in combination, wireless technology, e.g. a cell phone telecommunications network or near field communication, or wired technology, e.g. using a protocol such as Ethernet in the Internet. With a wired connection, the remote server may be implemented on a local network and use a connection of the universal serial bus (USB) type (although this is not necessarily the case). The execution environment  100  implements the application  110  which has a non-shared memory zone  110   a  in which the application  110  stores the tokens for the contents that the application  110  might access. The tokens associated with the content C is associated in the table T′ stored in the memory zone  210  of the secure element  200  with an address A in the network  400 , such as a universal resource locator (URL) address on the Internet, which address is transmitted with the key K for decrypting or with the key K′ for encrypting. As for the memory zones  120 ,  121 , and  122  in the execution environment ( FIGS. 3 and 6 ), the address in the network may be selected after each implementation of a right over the content C. Thus, after the content C has been extracted from the memory  510  of a server  500 , it may be stored, with or without modification, in a memory  610  of a server  600  that is likewise accessible via the network  400 . 
         [0074]    In  FIG. 1 , two execution environments  100  and  300  are shown. One may be a secure execution environment, e.g. the environment  100 , and the other may be a general purpose execution environment, e.g. the environment  300 . The secure environment  100  is started when no other execution environment has been started, so as to enable the integrity of the electronic device to be verified. The general purpose environment  300  implements applications from various sources. By way of example, the characteristics of a secure execution environment are listed in the document TEE Protection Profile issued by Global Platform. A secure execution environment implements trusted applications, which, by way of example, have access to all of the functions made available by the main processor and memory of the terminal. Hardware or software protection protects them from applications implemented in the general purpose environment. 
         [0075]    The principles of the invention may be implemented in the secure environment  100  or in the general purpose execution environment  300 , with contents stored in the storage memory of the corresponding execution environment. Thus, a non-volatile memory zone  320  in the general purpose execution environment  300  may store a content over which the application  310  seeks to exercise a right under the control of the control application  220  of the secure element  200 . 
         [0076]    Furthermore, when the content is stored in a memory or a server accessible over the network  400 , and when both of the applications  310  and  110  seek to exercise a right on the content, an “ongoing session” field is added to the table T stored in the secure element  200 , such that if one of these applications is exercising a right over the content, the secure element  200  does not transmit the key and the address to the other application when it requests them, but waits for the “ongoing session” field to return to a value indicating that the content is free for use, at the end of the ongoing exercise of the right, at which time it sends the address and the key to the requesting application. Other mutual exclusion techniques may be used, such as semaphores, for example. 
         [0077]    A mutual exclusion technique may be implemented in similar manner in the architecture of  FIG. 3 , assuming that a plurality of applications of the execution environment  100 , e.g. the applications TA 1 , TA 2 , TA 3  or TA 4  seek to implement rights over the same content. 
         [0078]    The invention is not limited to the implementations described, but extends to all variants within the ambit of the scope of the claims.