Circuit and method for interfacing with peripheral circuits
The interface circuit with a state-controlled register manages access and operations between processors and peripheral circuits, ensuring secure and efficient data handling by intercepting and transforming data, thus addressing the challenge of processor demands and secret protection.
Patent Information
- Application Number
- FR2023003154
- Authority / Receiving Office
- FR · FR
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-04
AI Technical Summary
Generic processors face significant processing demands when interacting with peripheral circuits, particularly in cryptographic operations, and need to manipulate device secrets like encryption keys while ensuring software access is restricted.
An interface circuit with a register storing a state parameter that controls access requests based on the state value and destination address, allowing selective operations and data manipulation, including intercepting and transforming data values, and controlling peripheral circuits through a clock reset mechanism.
Enhances secure interaction between processors and peripheral circuits by preventing unauthorized access to sensitive data, improving processing efficiency, and reducing energy consumption by allowing parallel processing and minimizing direct software interaction with secrets.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Title of the invention: Circuit and method for interfacing with peripheral circuits Technical field
[0001] The present disclosure relates generally to circuits and methods for interfacing with peripheral circuits. Prior art
[0002] Certain generic processors included in electronic devices are required to interact with peripheral circuits. In certain cases, these peripheral circuits may provide security-related functions, such as cryptographic operations, such as encryption operations, signature and / or hash value generation, etc.
[0003] One problem with interactions between the generic processor and peripheral circuits is the significant demand placed on the generic processor in terms of handling communications with the peripheral circuits.
[0004] In addition, the generic processor may be required to manipulate secrets of the devices, such as, for example, encryption keys. These secrets are, for example, manipulated by the generic processor during the execution of cryptographic operations. However, it is desirable that software, executed by the generic processor, does not have access to these secrets.
[0005] There is therefore a need for a solution to improve the interactions between a generic processor and peripheral circuits. Summary of the invention
[0006] One embodiment provides an interface circuit connected to at least a first and a second peripheral circuit, and comprising a register storing a state parameter, the interface circuit being configured to: - receive an access request for writing or reading, from a processor and to a destination address in the first peripheral circuit; and - generating a write and / or read operation to the first and / or second peripheral circuit, the operation and its destination being selected based on the state value and the destination address.
[0007] According to one embodiment, when the access request is an access request for writing data, the interface circuit is further configured to select the operation and / or its destination as a function furthermore of the value of the data.
[0008] According to one embodiment, when the access request is an access request for writing a first data value or a second data value, different from the first data value, in the first circuit and when the state parameter is programmed to a first state value, the generated operation comprises writing another data value, generated by the second peripheral circuit, to the destination address in the first peripheral circuit.
[0009] According to one embodiment, when the state parameter is programmed to a second state value, different from the first state value, the operation comprises reading in the first peripheral circuit a data value stored at the destination address and writing the data value in the second peripheral circuit.
[0010] According to one embodiment, the above circuit is further configured to, when the state parameter is programmed to an initialization value, authorize access, by the processor, to each of the at least two peripheral circuits.
[0011] According to one embodiment, when the access request is an access request for writing a prohibited data value, the generated operation comprises programming the value of the state parameter to the initialization value and deleting the content of at least one of the peripheral circuits.
[0012] According to one embodiment, the generated operation further comprises reading and / or writing in a third peripheral circuit connected to the interface circuit.
[0013] According to one embodiment, the above circuit is further configured to, following the access request for reading or writing from the processor, return a default value to the processor.
[0014] One embodiment provides an electronic device comprising: - the above interface circuit; and - the at least two peripheral circuits connected to the interface circuit; and - the processor connected to the interface circuit and configured to transmit an access request for reading or writing to a destination address in one of the at least two peripheral circuits.
[0015] According to one embodiment, the at least two peripheral circuits comprise a first cryptographic circuit and a number generator, and wherein the interface circuit is configured to, when the state parameter is programmed to a first state value, intercept an access request for writing an encryption key from the processor and to a destination address in the first cryptographic circuit and command the writing of another value, generated by the number generator, to the destination address in the first cryptographic circuit.
[0016] According to one embodiment, the at least two circuits further comprise a second cryptographic circuit, and in which the interface circuit is configured to, when the state parameter is programmed to a second state value different from the first state value, intercept a write and / or read access request from the processor to a destination address in the first cryptographic circuit and command the writing of a data value, previously stored at the destination address in the first cryptographic circuit, in the second cryptographic circuit.
[0017] According to one embodiment, the above circuit further comprises a clock reset circuit configured to activate and / or deactivate the at least two peripheral circuits and wherein the interface circuit is configured to control the clock reset circuit.
[0018] One embodiment provides a method comprising: - the reception, by an interface circuit, of an access request for writing or reading, coming from a processor and towards a destination address in a first peripheral circuit connected to the interface circuit; - the generation, by the interface circuit, of a write and / or read operation to the first and / or a second peripheral circuit connected to the interface circuit, the operation and its destination being selected as a function of the value of a state parameter, stored in a register of the interface circuit, and of the destination address.
[0019] According to one embodiment, when the access request is an access request for writing data, the generated operation and / or its destination are selected furthermore as a function of the value of the data.
[0020] According to one embodiment, the above method further comprises providing, by the interface circuit and to the processor, a default value in response to the access request for reading or writing. Brief description of the drawings
[0021] These characteristics and advantages, as well as others, will be explained in detail in the following description of particular embodiments given without limitation in relation to the attached figures among which:
[0022] [Fig.l] is a block diagram of an electronic device comprising a coupling and chaining circuit according to an embodiment of the present description;
[0023] [Fig.2] illustrates in more detail a circuit of the electronic device according to an embodiment of the present description;
[0024] [Fig.3] is a block diagram illustrating an example of an operation implemented by the coupling and chaining circuit;
[0025] [Fig.4A] is a block diagram illustrating an example of an operation implemented by the coupling and chaining circuit;
[0026] [Fig.4B] is a block diagram illustrating an example of another operation implemented implemented by the coupling and chaining circuit;
[0027] [Fig.5A] is a block diagram illustrating an example of another operation implemented implemented by the coupling and chaining circuit;
[0028] [Fig.5B] is a block diagram illustrating an example of yet another operation implemented by the coupling and chaining circuit;
[0029] [Fig.6] is a flowchart illustrating steps carried out during different operating modes of the coupling and chaining circuit;
[0030] [Fig.7] is a table showing examples of different operations performed by the coupling and chaining circuit as a function of a state value; and
[0031] [Fig.8] is a block diagram illustrating another embodiment of an electronic device. Description of the embodiments
[0032] The same elements have been designated by the same references in the different figures. In particular, the structural and / or functional elements common to the different embodiments may have the same references and may have identical structural, dimensional and material properties.
[0033] For the sake of clarity, only the steps and elements useful for understanding the described embodiments have been shown and are detailed. In particular, the cryptographic algorithms, such as AES (Asymmetry Encryption Standard) type algorithms, as well as the key derivation algorithms, are not described in detail and are known to those skilled in the art.
[0034] Unless otherwise specified, when referring to two elements connected to each other, this means directly connected without intermediate elements other than conductors, and when referring to two elements connected (in English "coupled") to each other, this means that these two elements can be connected or be connected by means of one or more other elements.
[0035] In the following description, when reference is made to absolute position qualifiers, such as the terms "front", "back", "top", "bottom", "left", "right", etc., or relative position qualifiers, such as the terms "above", "below", "upper", "lower", etc., or to orientation qualifiers, such as the terms "horizontal", "vertical", etc., reference is made unless otherwise specified to the orientation of the figures.
[0036] Unless otherwise specified, the expressions "about", "approximately", "substantially", and "of the order of" mean to within 10%, preferably to within 5%.
[0037] [Fig.l] is a block diagram of an electronic device 100 comprising an integrated circuit 102 according to an embodiment of the present description.
[0038] The electronic device 100 is for example a mobile electronic device, such as a mobile telephone, or an electronic card such as a microcircuit card.
[0039] The circuit 102 comprises for example a processor 104 (CPU) connected to a non-volatile memory 106 (NV MEM) and to a volatile memory 108 (RAM) via a system bus 110. By way of example, the memory 106 is a Flash type memory, and the memory 108 is a RAM type memory (from the English "Random Access Memory").
[0040] According to one embodiment, the circuit 102 further comprises an interface circuit 112 (CCB - from the English "Coupling and Chaining Bridge") connected to the bus 110 via a bus 114. The term "coupling" refers to one or more transactions carried out in parallel by two peripheral circuits while the term "chaining" refers to one or more transactions carried out in series by two peripheral circuits. In other words, in a chaining operation, the two peripheral circuits involved are occupied one after the other. The interface circuit is for example configured to provide a connection between the bus 114 and peripheral circuits. The interface circuit 112 will also be called here "coupling and chaining circuit", because it is capable of carrying out coupling and / or chaining functions in relation to the peripheral circuits. The bus 114 is for example an AHB type bus (from the English "Advanced High-performance Bus").In other examples, the bus 114 is an APB (Advanced Peripheral Bus) or AXI (Advanced External Interface) type bus.
[0041] The circuit 102 comprises, for example, peripheral circuits 116, 118, 120 and / or 122.
[0042] The circuit 116 (AES) is for example a cryptographic circuit. The cryptographic circuit 116 is for example configured to encrypt and / or decrypt data according to a symmetric encryption algorithm, such as for example an AES (Advanced Encryption Standard) type algorithm.
[0043] The circuit 118 (SHA) is for example another cryptographic circuit. By way of example, the circuit 118 is a circuit configured to perform hashing operations, for example according to an algorithm of the SHA type (from the English "Secure Digest Algorithm"). By way of example, the cryptographic circuit 118 is further configured to perform cryptographic operations, such as for example, symmetric key generation and / or key derivation functions and / or shared key calculations, for example used for ECDH encryption and decryption (from the English "Elliptic Curve Diffie Hellman"). In another example, the cryptographic circuit 118 is configured to generate signatures of the SHA1, SHA2 and / or SHA3 type or keyed hash message authentication codes (HMAC - the English "hashed MAC").
[0044] The circuit 120 (RNG) is, for example, a purely random number generator (TRNG - from the English "True Random Number Generation") using a source physics of randomness based, for example, on intrinsic properties of the material on which it is implemented. In another example, the number generator is a pseudo-random number generator, for example a linear congruential generator.
[0045] In another example, the number generator 120 is implemented in software, for example software stored and executed in the coupling and chaining circuit 112 in the case where the latter comprises a suitable processor and memory. In this example, the circuit 102 is configured so that the processor 104 does not have access to the values generated by the number generator 120 for a peripheral circuit among the circuits 116, 118 or 122.
[0046] The circuit 122 (PKA) is for example a key accelerator. For example, the circuit 122 is configured to perform pre-calculations on a private or public key before it is for example processed by the cryptographic circuit 116 or by the cryptographic circuit 118.
[0047] The processor 104 is for example a generic and non-secure processor. Thus, when sensitive data of the circuit 102, such as cryptographic keys stored in the non-volatile memory 106, are manipulated by the processor 104, their integrity is not guaranteed.
[0048] According to one embodiment, the cryptographic circuits 116 and 118 and the circuit 122 are each connected, via a dedicated bus, to the coupling and chaining circuit 112. In the example where the number generator 120 is a hardware circuit, the latter is also connected, for example, to the coupling and chaining circuit 112 via a dedicated bus. The coupling and chaining circuit 112 is configured to perform chaining operations on data exchanged between the circuits 116 to 122.
[0049] For example, other peripheral circuits, for example other cryptographic circuits, are also connected to the coupling and chaining circuit 112 and in other embodiments, one or more of the circuits 116, 118, 120 and / or 122 could be omitted.
[0050] [Fig.2] illustrates in more detail the circuit 102 according to an embodiment of the present description.
[0051] The circuits 116, 118, 120 and 122 are, for example, each respectively connected to the coupling and chaining circuit 112 via a bus 200, 202, 204 and 206. For example, the buses 110, 114 and 200 to 206 are AHB type buses. In other examples, the buses 110, 114 and 200 to 206 are APB or AXI type buses. In yet another example, the buses 110, 114 and 200 to 206 are proprietary buses.
[0052] For example, the coupling and chaining circuit 112 is connected to other peripheral circuits (not shown) via dedicated buses. For example, the coupling and chaining circuit 112 is connected to a cyclic redundancy check circuit configured to generate error checking codes based on data values.
[0053] For example, circuit 102 further comprises a reset and clock control circuit 210 (RCC). For example, circuit 210 is configured to control the timing of circuit 116, respectively 118, 120 and 122, via clock buses 208, respectively 211, 212 and 214.
[0054] By way of example, the coupling and chaining circuit 112 is further configured to control the activation of one or more peripheral circuits 116, 118 and / or 122 via the clock reset circuit 210. By way of example, the coupling and chaining circuit 112 transmits one or more activation signals aes_hclk_en, sha_hclk_en, pka_hclk_en, ccb_hclk_en and / or mg_hclk_en to the clock reset circuit 210 in order to force the clock reset circuit 210 to clock the circuits 116, 118, 122, 112 and / or 120. When the clock reset circuit 210 is forced to clock the circuits 116, 118 and / or 122, it is no longer possible to disable the timing in software, for example by programming in registers of circuit 210.By means of the activation signals aes_hclk_en, sha_hclk_en and / or pka_hclk_en, the coupling and chaining circuit 112 is therefore capable of activating one or more of the circuits 116, 118, 120 and 122.
[0055] The coupling and chaining circuit 112 is configured to perform read and / or write operations between the peripheral circuits 116, 118, 120 and / or 122 following the reception of an access request, to one of the peripheral circuits 116, 118, 120 and / or 122 and coming from the processor 104.
[0056] For example, the coupling and chaining circuit 112 comprises a register 216 (CCB REGISTER) configured to store a state parameter. For example, the state value conditions the behavior of the coupling and chaining circuit. For example, for two different values of the state parameter, the peripheral circuits involved, and / or the type of operations performed, differ. The state value is for example programmed by the coupling and chaining circuit 112, and in particular by a state machine produced by the coupling and chaining circuit 112. The value of the state parameter written in the register 216 imposes a type of operation, for example a read and / or write operation, in the circuit 122.The value of the state parameter imposes, for example, in addition, a sequence of states in the state machine, each state of the state machine being associated with one or more chaining and / or coupling operations between at least two peripheral circuits. More particularly, a configuration value is for example stored in a register of the state machine. This value corresponds for example to a configuration of the circuit. coupling and chaining circuit 112, and for each configuration value, the value of the state parameter indicates to the coupling and chaining circuit 112 an operation to be performed. Thus, depending on the configuration value, the same value of the state parameter means, for example, two different transactions. Thus, the possible sequences of the values taken by the state parameter differ depending on the value of the configuration parameter.
[0057] [Fig.3] is a block diagram illustrating an example of an operation implemented by the coupling and chaining circuit 112, between the circuits 120 and 122.
[0058] As an example, [Fig. 3] illustrates a chaining operation, implemented by the coupling and chaining circuit 112. This operation is for example carried out for a first configuration value of the state machine. In particular, during the performance of the operation described, the value of the state parameter evolves. For example, the value of the state parameter is incremented following each transaction between two circuits.
[0059] In the example illustrated by [Fig.3], the processor 104 transmits a write data item of a private key, or more generally a data value, to a destination address in the circuit 122.
[0060] According to one embodiment, the coupling and chaining circuit 112 is configured to intercept the data value, transmitted via the bus 114. The coupling and chaining circuit 112 is further configured to, upon receipt of the write access request, command the generation of a value by the number generator 120. For example, before, or directly following, the transmission of the data value to be written by the processor, it is verified that a random value is available in the number generator circuit 120. For example, if no data is available in the number generator circuit 120, an error signal is generated. For example, following the generation of the error signal, all the data stored in the circuits 116, 118 and 122 are erased. Additionally, for example, following generation of the error signal, the write access request is abandoned.In another example, for one or more given configuration values, processor 104 is permitted to write a value, known to processor 104, to circuit 122.
[0061] The coupling and chaining circuit 112 is then configured to generate a new write request to the circuit 122 upon receipt of a write access request, in a volatile memory of the circuit 122, coming from the processor 104. The writing in the circuit 122 controlled by the coupling and chaining circuit 122 is for example carried out at the destination address indicated in the write access request by the processor 104.
[0062] For example, whatever the value of the key, or more generally of the data, transmitted by the processor 104, it is a value generated by the number generator 120 which is written to the desired destination address in the circuit 122.
[0063] According to one embodiment, the coupling and chaining circuit 112 is further configured to prohibit reading in the circuit 122 to the processor 104. For example, the coupling and chaining circuit 112 is configured to return to the processor 104 a default value in response to an access request, coming from the processor 104, for reading and / or writing in the circuit 122. Thus, the value stored in a volatile memory of the circuit 122, instead of the data value transmitted by the processor 104, is inaccessible by the processor 104.
[0064] [Fig.4A] is a block diagram illustrating an example of an operation implemented by the coupling and chaining circuit 112 between the circuits 122 and 116. More particularly, [Fig.4A] illustrates a chaining operation from the circuit 122 to the cryptographic circuit 116.
[0065] As an example, [Fig.4A] illustrates a chaining operation, implemented by the coupling and chaining circuit 112. This operation is for example carried out for a second configuration value of the state machine. In particular, during the performance of the operation described, the value of the state parameter evolves. For example, the value of the state parameter is incremented following each transaction between two circuits.
[0066] In the example illustrated by [Fig.4A], the processor 104 wishes to access the circuit 122. The processor 104 transmits, for example, an access request for writing data stored at a destination address in the circuit 122.
[0067] According to one embodiment, the coupling and chaining circuit 112 is configured to provide a default value to the processor 104 in response to a write access request, coming from the processor 104. By way of example, the default value consists of indicating to the processor that the writing has been carried out, for example by returning a write completed value (or “write done” in English). The coupling and chaining circuit 112 is further configured to, in response to the request for access to the destination address in the circuit 122, generate an access request for writing the data value stored at the destination address in the circuit 122, to the cryptographic circuit 116. The coupling and chaining circuit 112 is further configured, for example, to transform the write request from the processor 104 into a read request at the address given by the processor 104 in the volatile memory of the circuit 122 using a dedicated bus.The value retrieved from the volatile memory of the circuit 122 is then written, by the coupling and chaining circuit 112, into the circuit 116 at a fixed address which corresponds, for example, to the input of a FIFO (First Input First Output) type memory. In the event that a problem is detected, such as writing in the wrong format, for example a . writing 1 byte or 2 bytes instead of writing 4 bytes, an error is returned to processor 104 in response to the write request.
[0068] The cryptographic circuit 116 is then configured to encrypt the data value, for example according to an AES encryption algorithm. For example, the encrypted value is accessible by the processor 104.
[0069] The value of the data transmitted by the processor 104 is, for example, an additional parameter to the operation performed. For example, the value of the data indicates an address in the circuit 116 to which the data, stored at the destination address in the circuit 122, is to be written.
[0070] In another example, the coupling and chaining circuit 112 is configured to perform the operation described in relation to [Fig.4A] only when the data value transmitted by the processor 104 is equal to a value defined upstream, such as for example a so-called magic value. For example, upon receipt of an access request for writing a data value, the coupling and chaining circuit 112 is configured to compare the data value with a value for example stored in a register of the coupling and chaining circuit 112. For example, the comparison is performed by a state machine. For example, in the case where the two values differ, the coupling and chaining circuit 112 is configured to, for example, perform an operation such as writing 0 in the volatile memory of the circuit 122.The writing of 0, by the processor 104, causes, for example, the stopping of the chaining operations, indicates to the circuit 122 the end of the transfer and allows the passage to the next configuration value for the state machine.
[0071] [Fig.4B] is a block diagram illustrating an example of an operation implemented by the coupling and chaining circuit 112 between the circuits 122 and 116. More particularly, [Fig.4B] illustrates a chaining operation from the circuit 116 to the cryptographic circuit 122. This operation is for example carried out for a third configuration value of the state machine. In particular, during the performance of the described operation, the value of the state parameter evolves. For example, the value of the state parameter is incremented following each transaction between two circuits.
[0072] The processor 104 transmits for example an access request for writing to a destination address in the circuit 122. For example, the chaining operation is performed when the data value transmitted by the processor 104 is equal to a value defined upstream, for example a magic value, for example equal to OxCCB. When the value transmitted by the processor 104 is different from the magic value, the coupling and chaining circuit 112 is configured to allow the writing of 0 in the volatile memory of the circuit 122 and to indicate the end of the writing in the volatile memory of the circuit 122 and the transition to the next configuration value for the state machine. The end of the writing in the volatile memory of the circuit 122 therefore causes the reprogramming of the configuration value. For example, the comparison operation between the magic value and the data transmitted by the processor 104 is carried out for a given value of the state parameter.
[0073] In another example, the coupling and chaining circuit 112 is for example configured to, for example, control the decryption of the value stored at the destination address in the circuit 116, and its writing in the circuit 122. By way of example, the value of the data to be written supplied by the processor 104 indicates an address in the circuit 122 to which the decrypted value is to be written.
[0074] In one example, the value of the data to be written transmitted by the processor 104 which allows the coupling and chaining circuit 112 to determine between which peripheral circuits the operation is to be carried out.
[0075] [Fig.5A] is a block diagram illustrating an example of an operation implemented by the coupling and chaining circuit 112. More particularly, the operation illustrated in relation to [Fig.5A] is carried out between the circuit 122 and the cryptographic circuit 118. This operation is for example carried out for a fourth configuration value of the state machine. In particular, during the performance of the described operation, the value of the state parameter evolves. For example, the value of the state parameter is incremented following each transaction between two circuits.
[0076] Upon receipt of an access request for writing a data value to a destination address in the circuit 122, the coupling and chaining circuit 112 is for example configured to command the writing of the data already stored at the destination address in the circuit 122 to the circuit 118.
[0077] In one example, the value of the data transmitted by the processor 104 corresponds to an address in the circuit 118 to which the data is to be written. In another example, the value of the data to be written does not provide any information and a single address in the circuit 118 is accessible for writing.
[0078] In another example, the data value transmitted by the processor 104 indicates, for example, between which peripheral devices the operation is to be performed.
[0079] In the example illustrated by [Fig.5A], the circuit 118 is configured to perform cryptographic signature operations such as SHA2 or HMAC cryptographic operations, such as, for example, key derivation operations. The coupling and chaining circuit 112 is further configured to, in response to the access request transmitted by the processor 104, transmit a default value to the processor 104. The processor 104 then does not have access to the values stored in the circuits 118 and 122.
[0080] [Fig.5B] is a block diagram illustrating an example of an operation between the cryptographic circuits 116 and 118, implemented by the coupling and chaining circuit 112. This operation is for example carried out for a fifth value of configuration of the state machine. In particular, during the execution of the described operation, the value of the state parameter evolves. For example, the value of the state parameter is incremented following each transaction between two circuits.
[0081] Programming the configuration value to a value different from that described in relation to [Fig.4A] allows for example the state machine to be placed in a state allowing chaining operations from circuit 118 to circuit 116 and no longer from circuit 122 to circuit 118.
[0082] In another example, the operation described in relation to [Fig.5B] is performed when the state parameter is programmed to the second state value. For example, in this case, it is the value of the data transmitted by the processor 104 which allows, for example, the coupling and chaining circuit 112 to distinguish whether the operation performed is that described by [Fig.4A] or that described in relation to [Fig.5B]. In other words, the value of the data to be written determines whether the operation to be performed involves the circuit 122 or the circuit 118.
[0083] As an example, the processor 104 sends an access request for writing to a destination address in the cryptographic circuit 118. As an example, the processor 104 requests access to the result previously generated by the circuit 118 following the operation described in relation to [Fig.5A].
[0084] In the example described in relation to [Fig.5B], the coupling and chaining circuit 112 is for example configured to intercept the write access request and to command the writing of the data, already stored at the destination address in the circuit 118, to the circuit 116. By way of example, the data value transmitted by the processor 104 corresponds to an address in the circuit 116 to which the data of the circuit 118 is to be written.
[0085] For example, the circuit 116 is configured to encrypt the data. The processor 104 then has access to the data value encrypted by the circuit 116, for example.
[0086] According to one embodiment, the coupling and chaining circuit 112 is configured to return a default value in response to the access request coming from the processor 104.
[0087] Although the operations described in relation to FIGS. 3, 4A, 4B, 5A and 5B are performed following a write access request from the processor 104, it is entirely possible to configure the coupling and chaining circuit 112 so that these operations are performed following read access requests. In all cases, the coupling and chaining circuit 112 is configured to never authorize access to the processor 104 to data stored in one of the peripheral circuits 118, 120 and 122. For example, only data encrypted by the peripheral circuit 116 are accessible by the processor 104.
[0088] [Fig.6] is a flowchart illustrating steps carried out during different operating modes of the coupling and chaining circuit 112.
[0089] In the remainder of the description, the term “suspicious event” refers to any unexpected transaction on the bus 114 and / or another bus. For example, a suspicious event occurs during a physical attack on the circuit 102. Malicious software injected into the circuit 102 may also be the cause of a suspicious event. A suspicious event also occurs, for example, during an attack or hardware failure of the circuit 102.
[0090] For example, the coupling and chaining circuit 112 comprises a state machine configured to detect the presence of a suspicious event to and / or in the coupling and chaining circuit 112. For example, the state machine is configured to monitor transactions performed on the buses 114, 200, 202, 204 and 206. For example, each time an access request for writing a data value is received from the processor 104, the state machine is configured to compare the data value with, for example, a list of authorized values. For example, when the data value does not correspond to any of the data values included in the list, a suspicious event is detected. For example, the list of authorized values comprises several sub-lists, each sub-list indicating authorized data values in association with a given state value.
[0091] For example, in a step 600 (CCOP=0) the configuration value is an initial value. For example, each time the circuit 102 is started, the verification value is automatically programmed to the initial value. The coupling and chaining circuit 112 is then placed in a standard mode 601 (LEGACY MODE). For example, when it is placed in the standard mode, the coupling and chaining circuit 112 is configured to act as a router. In particular, the state machine is, for example, deactivated. For example, in the standard mode, the coupling and chaining circuit 112 is configured to authorize and route the transactions, requested by the processor 104, to one or more peripheral circuits. In particular, when the coupling and chaining circuit 112 acts as a router, the chaining or coupling operations are, for example, not executable.Upon receipt of an access request to a peripheral, the coupling and chaining circuit 112 then generates one or more transactions to only the peripheral circuit in question, and not to several peripherals.
[0092] In other examples, the standard mode is used for testing purposes. Use cases of the circuit 102 are for example tested via particular data manipulations and associated tests and manipulations of non-secret values.
[0093] As an example, the configuration value is for example programmed towards a configuration value, different from the initial value, in a step 602 (CCOP!=0). The coupling and chaining circuit 112 is then placed in a protected mode 603 (PROTECTED MODE). For example, in the protected mode, the coupling and chaining circuit 112 is configured to, depending on the value of the state parameter contained in the register 216 and / or the value of a data item transmitted for writing by the processor 104, carry out one of the operations described in relation to FIGS. 3, 4A, 4B, 5A and / or 5B.
[0094] Step 602 further comprises, for example, access requests for writing keys in the circuit 122. The coupling and chaining circuit 112 is then configured to perform, for each request to write a key in the circuit 122, the operation described in relation to [Fig.3].
[0095] Although the sequence of operations described in step 602 consists of writing keys, generated by the number generator 120, it is entirely conceivable that other operations, for example having an objective other than writing keys, are performed. The person skilled in the art will know how to adapt and configure the chaining and coupling circuit 112 to perform the desired operations between the desired peripheral circuits when the state parameter is programmed at the first state value.
[0096] In a step 604 (EXPECTED BEHAVIOR?), the state machine verifies that no suspicious event occurs. For example, step 604 is performed in parallel with step 602. In another example, step 604 is performed following the writing of keys in the circuit 12. The state machine verifies, for example, that the writing in the volatile memory of the circuit 122 took place without error. For example, the state machine further verifies that the entire memory of the circuit 122 is written.
[0097] If a suspicious event is detected (branch N at the output of block 604), the method continues in a step 605 (IPRST). For example, step 605 comprises reprogramming the configuration value to the initial value, returning the coupling and chaining circuit 112 to the standard state 601. For example, step 605 further comprises deleting the contents of the volatile memory of the circuit 122. For example, step 605 further comprises deleting the contents of memories internal to the peripheral circuits 116, 118, 120 and 122. For example, step 605 further comprises erasing secret values, such as for example encryption keys, stored in different registers of the peripheral circuits 122, 116 and 118.
[0098] If, during the performance of step 604, no suspicious event is detected by the state machine (branch Y), the method continues for example in a step 606 (OPSTEP ++). For example, during the performance of step 606, the state parameter is programmed, or incremented, to a new value.
[0099] Step 606 further comprises, in response to a write or read access request from the processor 104, executing an operation from among the operations for example described in relation to figures 4A, 4B, 5A and / or 5B. The nature of the operation and the peripheral circuits concerned are a function of the value of the state parameter and the configuration value, and for example of the value of the data transmitted for writing.
[0100] Following step 606, a step 607 (MORE ACTIONS?) is performed, for example by the state machine. For example, during step 607, the state machine determines whether other actions, for example depending on the configuration value, are to be performed. If this is the case (branch Y), the method resumes in a new implementation of step 604.
[0101] For example, the configuration value of the state machine determines the type of operation. For example, the operation described in relation to [Fig.5A] is performed before the operation described in relation to [Fig.5B]. For example, the operations performed are, in order, the operation described in relation to [Fig.5A], the execution of cryptographic operations such as a hash operation by the circuit 118 and the operation described in relation to [Fig.5B].
[0102] For example, if no other action is to be performed, (branch N at the output of block 607) the method ends in a step 608 (END).
[0103] Step 608 takes place for example when the processor 104 no longer commands any access request to one or more of the peripheral circuits 116, 118, 120 and / or 122. Step 608 is then a final step in which the processor 104 has access for reading the results stored in the volatile memory of the circuit 122.
[0104] Following step 608, the method ends in an embodiment of step 605, in which the value of the state parameter is reset and the contents of the internal memories of the circuits 116 to 122 are erased. The coupling and chaining circuit is then placed back in the standard mode.
[0105] [Fig.7] is a table showing examples of different operations carried out by the coupling and chaining circuit 112 depending on the value of the state parameter.
[0106] A column 700 (OPSTEP) indicates for example the values that can be taken by the state parameter for a configuration value of the state machine. For example, a sequence of values of the state parameter 0x6, 0x4, 0x8 and OxA, represents a succession of states of the state machine for a given configuration value. Step 606 then allows the transition from one state to the next state. The state parameter is for example accessible by the processor 104 in reading mode but is not accessible in writing mode by the processor 104. Similarly, once in the protected mode, the circuit 102, in particular the coupling and chaining circuit 112, is configured to not authorize the processor 104 to modify the configuration value and the state value. The evolution of these values is for example internal to the coupling and chaining circuit chaining 112. The possible state sequences depend, for example, on the current configuration value. The value 0x0 indicates, for example, that the configuration value is programmed to the initial value and therefore that the circuit 112 is in standard mode.
[0107] For example, when the value is less than 0x10, a binary object is being generated. For example, the binary object comprises an encryption, for example by the circuit 116 and according to a Galois / Counter mode (GCM - "Galois Counter Mode") of the value provided by the number generator circuit 120. The binary object allows for example the provision of a reference value making it possible for example to verify the integrity of the data handled during the transactions between the processor 104 and the circuits 122, 120, 118 and 116. The reference value is for example calculated according to the sequence of operations carried out.
[0108] A column 702 (MODE IN PKA) indicates an operating mode of the circuit 122 as a function of the value of the state parameter. In the example illustrated by [Fig.7], the operating mode of the circuit 122 is defined by a value that can be equal to 0x24 or to N / A. For example, in the standard mode, the circuit 122 is automatically placed in an operating mode associated with the value N / A, indicating for example that the circuit 122 is operating normally or is inoperative. For example, the value 0x24 indicates that access to the circuit 122 is controlled by the coupling and chaining circuit 112 and as a function of the configuration value. For example, the value of the configuration parameter imposes the operating mode of the circuit 122.
[0109] A column 704 (GCMPH IN AES) indicates a mode of operation of the circuit 116. For example, when the value of column 704 is equal to 0x2, the circuit 116 is configured to encrypt, according to a Galois / Counter mode, payload data. For example, when the value of column 704 is equal to 0x3, the binary object is completely generated and the reference value can be recovered, for example by the coupling and chaining circuit 112. The value N / A indicates that the circuit 116 operates as expected in the standard mode.
[0110] A column 706 (OPERATION) indicates the type of operations, for example among the operations described in relation to FIGS. 3, 4A, 4B, 5A and / or 5B, is achievable, depending on the value of the state parameter. For example, in the standard mode, the coupling and chaining circuit 112 acts as a router. Thus, the operations described in relation to FIGS. 3, 4A, 4B, 5A and 5C are not executable (N / A). For example, when the value of the state parameter is 0x6, the possible operation is that described in relation to [Fig. 3] (RNG->PKA). For example, when the value of the state parameter is equal to 0x8, the possible operation is that described in relation to [Fig. 4A] (PKA ->AES). For example, when the state parameter is equal to OxA or 0x4, no chaining and coupling operation is possible. The processor 104 then has, for example, when the value of the state parameter is equal to 0x4, the authorization to write in the circuit 122, but no operation, neither coupling nor chaining, will be carried out by the coupling and chaining circuit 112 in response to this writing.
[0111] A column 708 (END) indicates for example a parameter setting of the coupling and chaining circuit 112 indicating the end of an operation. For example, each time a value indicating the end of an operation is stored, the state parameter is reprogrammed, or incremented, to a new value of the state parameter. The reprogramming, or the incrementation of the value of the state parameter, is for example executed by the state machine. In particular, the state machine is configured to reprogram or increment the value of the state parameter when a final condition is verified. For example, the final condition corresponds to the writing of the value 0x3, for example in the circuit 116 and according to the example described in relation to the column 704. The writing of this value is for example triggered by the processor 104 or by another hardware circuit of the circuit 102. In particular, the processor 104 does not have the authorization to modify the state value.However, when the value of the state parameter is equal to the value OxA, the processor 104 programs, for example, a value indicating the end of an operation. For example, the programming of this value by the processor 104 causes the coupling and chaining circuit 112 to return to standard mode.
[0112] A column 710 (CPU ACTION) indicates for example the actions that can be carried out by the processor 104 depending on the value of the state parameter.
[0113] For example, when the state parameter has the value 0x6, the processor 104 can transmit write requests to the circuit 122 (WRITE IN PKA). Column 706 then indicates that the operation described in relation to [Fig. 3] is carried out. In this example, keys generated by the number generator circuit 120 are written to the volatile memory of the circuit 122.
[0114] For example, a value RNGOKF SET is stored when a pre-set number of keys has been written into the memory of the circuit 122. In another example, the value RNGOKF SET is stored when the memory of the circuit 122 is full. For example, storing the value RNGOKF SET causes the state parameter to be programmed, or incremented, to the value 0x8.
[0115] For example, when the value of the state parameter is equal to 0x4, the state machine is for example configured to check the contents of the volatile memory of the circuit 122. For example, the state machine checks that all of the data transmitted by the processor 104 has been written into the volatile memory of the circuit 122. For example, once the memory check has been successfully completed, a value of data DATAOKF SET is stored in the coupling and chaining circuit 112.
[0116] For example, when the state of the state machine is the value 0x4, the processor 104 writes a private key in the circuit 122. For example, the write sequence for the write operation depends on the value of the state parameter stored in the register 216.
[0117] For example, storing the value DATAOKF SET causes the value of the state parameter to be reprogrammed, or incremented, to the value 0x8.
[0118] When the value of the state parameter is equal to 0x8, the processor 104 can, for example, transmit write and / or read requests to the circuit 122 (READ / WRITE IN PKA). Column 706 indicates that the operation performed by the coupling and chaining circuit 112 is then, for example, the operation described in relation to [Fig.4A]. For example, once the requests transmitted by the processor 104 have been processed, a value GCMPH=0x3 is stored. For example, the processor 104 is configured to indicate to the coupling and chaining circuit 112 that the access request sequence for reading in the circuit 122 is complete. For example, this indication takes the form of an access request for writing a data value, the data value being, for example, known by the state machine and indicating that the reading and / or writing sequence is complete.
[0119] Storing the value GCMPH=0x3 causes the value of the state parameter to be reprogrammed, or incremented, to the value OxA. The operating mode of the circuit 116 is then also modified.
[0120] When the value of the state parameter is equal to OxA, the coupling and chaining circuit 112 is configured to receive access requests for reading data in the circuit 116 (READ IN AES) from the processor 104. The processor 104 also reads, in the peripheral circuit 116, the reference value generated via the binary object. The coupling and chaining circuit 112 is then configured to perform no operation (N / A). Once the reading in the circuit 116 is complete, an IPRST value is, for example, stored in the coupling and chaining circuit 112. The storage of the IPRST value causes, for example, the reprogramming of the state parameter to the initial value. For example, the peripheral circuits 116, 118 and 122 are reset (RESET). In particular, the contents, such as encryption keys, of one or more of circuits 122, 116 and 118 are deleted. Although the example of [Fig.7] is based on specific values, these values are given only as an example, and could be changed to other values in other embodiments. .
[0121] [Fig.8] is a block diagram illustrating another embodiment of the electronic device 100.
[0122] As an example, the circuit 102 includes a secure zone 800 (SECURED AREA) connected to an unsecured area 802 (APP. AND CPU AREA) via an 804 bus.
[0123] For example, the secure zone 800 comprises the circuits 116, 118, 120 and 122 as well as the coupling and chaining circuit 112. For example, the circuit 122 is connected to a volatile memory 805 (PKA RAM) configured to store data transmitted by the coupling and chaining circuit 112.
[0124] The secure zone 800 further comprises, for example, another cryptographic circuit 806 (AES2), for example configured to encrypt and / or decrypt data according to a cryptographic algorithm, such as, for example, an AES type algorithm.
[0125] By way of example, the secure zone 800 further comprises other peripheral circuits 808, such as for example a cyclic redundancy control circuit.
[0126] By way of example, the secure area 800 further comprises a dedicated processor 810 (CPU2) connected to the coupling and chaining circuit 112 via a bus. The area 800 further comprises, for example, a non-modifiable non-volatile memory 812 (ROM, from the English “Read Only Memory”) as well as a volatile memory 814 (CPU RAM) and a non-volatile memory 816 (NV MEM2). The dedicated processor 802 is configured to perform the coupling and / or chaining operations via the coupling and chaining circuit 112. According to this embodiment, only the processor 810 is configured to perform secure operations, and consequently, to manipulate the generated binary objects.
[0127] For example, the unsecured area 802 includes the processor 104, as well as the non-volatile and volatile memories 106 and 108.
[0128] An advantage of the described embodiments is that the processor 104 cannot read the clear data and cannot make a transaction with the coupling and chaining circuit 112.
[0129] Another advantage of the described embodiments is that the dedicated processor 810, although able to use the coupling and chaining circuit 112, cannot read clear data either. The use of the processor 810 provides an additional level of isolation for sensitive data and secrets.
[0130] Another advantage of the described embodiments, comprising the combination, at the system level, of the peripheral circuits with a chaining or coupling circuit, is that they make it possible to improve performance in terms of processing time and / or to provide new functionalities without modifying the existing peripherals. The peripheral circuits, such as for example a cryptographic circuit and a cyclic redundancy control circuit, or any other peripheral circuit, have the possibility of being used separately or in combination depending on the mode of use of the coupling and chaining circuit.
[0131] Another advantage of the described embodiments is that they allow the processing of a data value by two peripheral circuits in parallel. The use of the coupling and chaining circuit allows the surface area of the circuit to be reduced. A chaining operation requires only a single data transfer request from the processor 104. Thus, the described embodiments allow the performance, and in terms of processing time, of the device to be improved and reduce its energy consumption.
[0132] Another advantage of the described embodiments is that, compared to using only the processor without a coupling and chaining circuit, fewer operations are required to perform a chaining or coupling operation between two peripherals. Indeed, a single access request from the processor allows the generation, by the coupling and chaining circuit, of other operations.
[0133] An advantage of the embodiments described in connection with Figures 3, 4A, 4B, 5A and 5B is that neither the processor 104 nor the processor 810 ever manipulates clear data. The processor 104 can only directly use the peripherals when the coupling and chaining circuit is in standard mode.
[0134] Various embodiments and variants have been described. Those skilled in the art will understand that certain features of these various embodiments and variants could be combined, and other variants will occur to those skilled in the art. In particular, the type of operation performed as a function of the value of the state parameter may vary. Although the illustrated examples describe the processing of encryption keys, other types of data processing may be implemented. The values that can be taken per state parameter may of course differ from the values described, in particular with the values described in relation to [Fig. 7]. Similarly, the type of operations performed by the coupling and chaining circuit and the peripheral circuits involved may differ from the operations, for example, described in Figures 3, 4A, 4B, 5A and / or 5B.
[0135] Finally, the practical implementation of the embodiments and variants described is within the reach of the person skilled in the art from the functional indications given above. In particular, although the peripheral circuits described are mainly cryptographic circuits, other types of circuits can be connected to the coupling and chaining circuit.
Claims
Claims
1. Interface circuit (112) connected to at least a first and a second peripheral circuit (116, 118, 120, 122), and comprising a register (216) storing a state parameter, the interface circuit being configured to: - receive an access request for writing or reading, from a processor (104) and to a destination address in the first peripheral circuit; and - generate a write and / or read operation to the first and / or the second peripheral circuit, the operation and its destination being selected according to the state value and the destination address.
2. The interface circuit (112) of claim 1, wherein, when the access request is an access request for writing data, the interface circuit is further configured to select the operation and / or its destination further depending on the value of the data.
3. An interface circuit according to claim 1 or 2, wherein, when the access request is an access request for writing a first data value or a second data value, different from the first data value, in the first circuit and when the state parameter is programmed to a first state value, the generated operation comprises writing another data value, generated by the second peripheral circuit, to the destination address in the first peripheral circuit (116, 118, 120, 122).
4. The interface circuit (112) of claim 3, wherein when the state parameter is programmed to a second state value, different from the first state value, the operation comprises reading from the first peripheral circuit (116, 118, 120, 122) a data value stored at the destination address and writing the data value to the second peripheral circuit (116, 118, 120, 122).
5. The interface circuit (112) of any one of claims 1 to 4, further configured to, when the state parameter is programmed to an initialization value, allow access, by the processor (104), to each of the at least two peripheral circuits (116, 118, 120, 122).
6. The interface circuit (112) of claim 5, wherein when the access request is an access request for writing a prohibited data value, the generated operation comprises programming the value of the state parameter to the initialization value and deleting the contents of at least one of the peripheral circuits (116, 118, 120, 122).
7. An interface circuit (112) according to any one of claims 1 to 6, wherein the generated operation further comprises reading and / or writing to a third peripheral circuit (116, 118, 120, 122) connected to the interface circuit.
8. An interface circuit (112) according to any one of claims 1 to 7, further configured to, following the read or write access request from the processor (104), return a default value to the processor.
9. Electronic device (100) comprising: - the interface circuit (112) according to any one of claims 1 to 8; and - the at least two peripheral circuits (116, 118, 120, 122) connected to the interface circuit; and - the processor (104) connected to the interface circuit and configured to transmit an access request for reading or writing to a destination address in one of the at least two peripheral circuits.
10. The device of claim 9, wherein the at least two peripheral circuits comprise a first cryptographic circuit (122) and a number generator (120), and wherein the interface circuit (112) is configured to, when the state parameter is programmed to a first state value, intercept an access request for writing an encryption key from the processor (104) to a destination address in the first cryptographic circuit and command the writing of another value, generated by the number generator, to the destination address in the first cryptographic circuit.
11. A device (100) according to claim 9 or 10, wherein the at least two circuits further comprise a second cryptographic circuit (116, 118), and wherein the interface circuit (112) is configured to, when the state parameter is programmed to a second state value different from the first state value, intercept a write and / or read access request from the processor (104) to a destination address in the first cryptographic circuit and command the writing of a data value, previously stored at the destination address in the first cryptographic circuit, in the second cryptographic circuit.
12. The device (100) of any one of claims 9 to 11, further comprising a clock reset circuit (210) configured to activate and / or deactivate the at least two peripheral circuits (116, 118, 120, 122) and wherein the interface circuit (112) is configured to control the clock reset circuit.
13. Method comprising: - receiving, by an interface circuit (112), an access request for writing or reading, from a processor (104) and to a destination address in a first peripheral circuit (116, 118, 120, 122) connected to the interface circuit; - generating, by the interface circuit, a writing and / or reading operation to the first and / or a second peripheral circuit connected to the interface circuit, the operation and its destination being selected as a function of the value of a state parameter, stored in a register (216) of the interface circuit, and of the destination address.
14. Method according to claim 13, wherein, when the access request is an access request for writing data, the generated operation and / or its destination are selected further depending on the value of the data.
15. The method of claim 13 or 14, further comprising providing, by the interface circuit (112) and to the processor (104), a default value in response to the read or write access request.
Citation Information
Patent Citations
Methods, apparatus, and systems for secure demand paging and other paging operations for processor devices
EP1870814A1
Apparatus and method for implementing IPSEC transforms within an integrated circuit
US6708273B1
