TWI751962B - Secured device, secured method, secured system, and secured apparatus - Google Patents
Secured device, secured method, secured system, and secured apparatus Download PDFInfo
- Publication number
- TWI751962B TWI751962B TW110124963A TW110124963A TWI751962B TW I751962 B TWI751962 B TW I751962B TW 110124963 A TW110124963 A TW 110124963A TW 110124963 A TW110124963 A TW 110124963A TW I751962 B TWI751962 B TW I751962B
- Authority
- TW
- Taiwan
- Prior art keywords
- bus
- host
- data
- security
- nvm
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/78—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Storage Device Security (AREA)
- Information Transfer Systems (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
本發明是一種電子系統安全性的技術領域,特別是一種用於保護周邊裝置之間資料處置的方法和系統。The present invention relates to the technical field of electronic system security, in particular to a method and system for protecting data handling between peripheral devices.
電子系統使用各種類型的匯流排介面在主機裝置和周邊裝置之間進行通信。匯流排介面的示例包括內部積體電路間I2 C(Inter-Integrated-Circuit, I2 C)匯流排和序列周邊介面(Serial Peripheral Interface, SPI)匯流排。 I2 C匯流排例如在2014年4月4日於NXP Semiconductors的UM10204,修訂版6中的“ I2 C匯流排規範和用戶手冊”中進行了說明,在此引入作為參考。Electronic systems use various types of bus interfaces to communicate between host devices and peripheral devices. Examples include a bus interface integrated circuit between the internal I 2 C (Inter-Integrated- Circuit, I 2 C) bus, and the serial peripheral interface (Serial Peripheral Interface, SPI) bus. I 2 C bus such as are described in the April 4, 2014 in the NXP Semiconductors UM10204, Revision 6 of "I 2 C bus specification and user manual", which is hereby incorporated by reference.
相關申請的交叉引用:CROSS-REFERENCE TO RELATED APPLICATIONS:
本申請是2015年5月17日提交的美國專利申請14 / 714,298的部分延續(CIP),其請求2014年7月24日提交的美國臨時專利申請62 / 028,345的優先權。該申請通過引用併入本文。本申請涉及在相同(even date)提交的,題為“安全系統啟動監控器”(“ Secure System Boot Monitor”)的美國專利申請,代理人案卷號1041-2004。這些相關申請的公開內容通過引用併入本文。This application is a continuation-in-part (CIP) of US Patent Application 14/714,298, filed May 17, 2015, which claims priority to US Provisional Patent Application 62/028,345, filed July 24, 2014. This application is incorporated herein by reference. This application is related to US Patent Application, Attorney Docket No. 1041-2004, filed even date, entitled "Secure System Boot Monitor". The disclosures of these related applications are incorporated herein by reference.
本文描述的實施例提供了一種包括介面和處理器的安全裝置。該介面,係被配置為連接到一匯流排,該匯流排由一主機和一第二裝置耦接,其中至少該第二裝置以一從動模式在該匯流排上操作,並且其中該主機操作在該匯流排上作為一匯流排主控,可至少代表該安全裝置來啟動在該匯流排上的資料處置。Embodiments described herein provide a security device that includes an interface and a processor. The interface is configured to be connected to a bus bar coupled by a master and a second device, wherein at least the second device operates on the bus in a slave mode, and wherein the master operates Acting as a bus master on the bus can at least initiate data processing on the bus on behalf of the security device.
在一個實施例中,該處理器被配置為以從動模式在該匯流排上進行操作。在另一個實施例中,該安全裝置還通過與該匯流排不同的另一匯流排耦合到該主機,並且,該處理器被配置為經由該另一匯流排請求該主機啟動該資料處置。In one embodiment, the processor is configured to operate on the busbar in a slave mode. In another embodiment, the security device is further coupled to the host through another bus than the bus, and the processor is configured to request the host to initiate the data handling via the other bus.
在一些實施例中,該請求的資料處置包括以下之一:(i)從第二裝置讀取資料,(ii)將資料寫入該第二裝置,以及(iii)在該第二裝置的第一和第二位址之間傳送資料。在其他實施例中,該請求的資料處置指定了預期的資料處置信息,並且,該處理器被配置為在該匯流排上監控與該請求的資料處置所相對應的實際處置信息,並通過檢測至少部分該預期處置信息與該實際處置信息不同來識別該安全違規。該處理器被配置為檢測至少一個元件選擇自一列表包括一操作碼元件,一位址元件和一資料元件,該至少一個元件係在該預期處置信息和該實際處置信息之間不同。In some embodiments, the requested data handling includes one of: (i) reading data from the second device, (ii) writing data to the second device, and (iii) at the second device's Data is sent between the first and second addresses. In other embodiments, the requested material disposition specifies expected material disposition information, and the processor is configured to monitor on the bus for actual disposition information corresponding to the requested material disposition, and to detect by At least part of the expected disposition information differs from the actual disposition information to identify the security violation. The processor is configured to detect that at least one element is selected from a list including an opcode element, an address element and a data element, the at least one element being different between the expected disposition information and the actual disposition information.
在一個實施例中,該處理器被配置為在該請求的資料處置的期間內或期間外,通過識別該匯流排上已經違反了一預定的安全策略,來識別該安全違規。在另一個實施例中,請求的資料處置包括從該第二裝置讀取資料,並且該處理器被配置為在該匯流排上監控由該主機從該第二裝置讀取在該匯流排上的資料。在又一個實施例中,該處理器被配置為在該主機一第一寫入操作的執行期間,通過覆蓋一個或多個在該匯流排上信號的邏輯值,來請求該主機啟動該第一寫入操作至該第二裝置,並且施加一第二不同的寫入操作至該第二裝置。In one embodiment, the processor is configured to identify the security violation by identifying that a predetermined security policy has been violated on the bus, either during or outside the requested data handling period. In another embodiment, the requested data handling includes reading data from the second device, and the processor is configured to monitor, on the bus, data read on the bus by the host from the second device material. In yet another embodiment, the processor is configured to request the host to initiate the first write operation by overriding the logic value of one or more signals on the bus during execution of a first write operation by the host A write operation is performed to the second device, and a second, different write operation is applied to the second device.
在一些實施例中,該處理器被配置為在該主機一第一讀取操作的執行期間,通過覆蓋一個或多個在該匯流排上信號的邏輯值,來請求該主機啟動該第一讀取操作至該第二裝置,並且施加一第二不同的讀取操作至該第二裝置。在其他實施例中,該處理器被配置為請求該主機啟動通過該匯流排存取該第二裝置的一資料處置,斷開連接該主機與該第二裝置之間的該匯流排的一信號,以及通過匯流排取代該主機去存取該第二裝置。在其他實施例中,響應於識別出該安全違規,該處理器被配置為執行一保護行動,以防止暴露或修改在存取該第二裝置時出現在該匯流排上的資料。In some embodiments, the processor is configured to request the host to initiate the first read by overriding the logic value of one or more signals on the bus during execution of a first read operation by the host Fetch operations to the second device, and apply a second, different read operation to the second device. In other embodiments, the processor is configured to request the host to initiate a data process accessing the second device through the bus, disconnect a signal connecting the bus between the host and the second device , and replace the host to access the second device through the bus. In other embodiments, in response to identifying the security violation, the processor is configured to perform a protective action to prevent exposure or modification of data present on the bus when the second device is accessed.
在一個實施例中,該安全裝置和該第二裝置都被執行在共同封裝(common package)中,並且通過該共同封裝內的該匯流排互連。In one embodiment, both the safety device and the second device are implemented in a common package and are interconnected by the busbars within the common package.
根據本文描述的實施例,還提供了一種方法,該方法包括:在安全裝置中,該安全裝置連接到一主機和一第二裝置所耦合到的一匯流排,其中至少第二裝置在該匯流排上以從動模式操作,並且其中該主機操作在該匯流排上作為主控,並至少代表安全裝置在該匯流排上啟動資料處置,。由安全裝置請求主機為該安全裝置啟動通過該匯流排存取該第二裝置的一資料處置;至少在該主機通過該匯流排存取該第二裝置以執行該請求的資料處置期間內,監控該匯流排上的一個或多個信號;以及基於該監控的信號,識別在執行該請求的資料處置時是否發生一安全違規。In accordance with embodiments described herein, there is also provided a method comprising: in a safety device, the safety device is connected to a bus to which a host and a second device are coupled, wherein at least the second device is at the bus The bus operates in a slave mode, and wherein the master operates on the bus as a master and at least initiates data processing on the bus on behalf of a security device. requesting the host by the security device to initiate a data process for the security device that accesses the second device through the bus; monitoring at least during the host's access to the second device through the bus to perform the requested data process one or more signals on the bus; and based on the monitored signals, identifying whether a security violation occurred while performing the requested data processing.
根據本文描述的實施例,還提供了一種包括主機和安全裝置的安全系統。包括:一主機與一匯流排耦合,該主機被配置操作為一匯流排主控,並通過在從動裝置和該主機觸發的匯流排存取操作之間進行仲裁來存取與該匯流排耦合的從動裝置;以及一安全裝置偶和到該匯流排的,並配置為:請求主機啟動資料處置,用以存取作為從動裝置連接到該匯流排的第二裝置;至少在該主機通過該匯流排存取該第二裝置以執行該請求的資料處置期間內,監控該匯流排上的一個或多個信號;以及基於該監控的信號,識別在執行該請求的資料處置時是否發生一安全違規。According to embodiments described herein, there is also provided a security system including a host and a security device. Including: a master coupled to a bus, the master configured to operate as a bus master and to access the bus coupling by arbitrating between slave devices and bus access operations triggered by the master a slave device; and a safety device coupled to the bus and configured to: request the host to initiate data handling for accessing a second device connected to the bus as a slave; at least when the host passes During the period during which the bus accesses the second device to perform the requested data processing, monitoring one or more signals on the bus; and identifying, based on the monitored signals, whether a signal occurred while performing the requested data processing Security violation.
在一個實施例中,該安全裝置被配置為以從動模式在該匯流排上進行操作。在另一個實施例中,該安全裝置還通過與該匯流排不同的另一匯流排耦合到該主機,並且,該安全裝置被配置為經由該另一匯流排請求該主機啟動該資料處置。In one embodiment, the safety device is configured to operate on the busbar in a slave mode. In another embodiment, the security device is further coupled to the host through another bus than the bus, and the security device is configured to request the host to initiate the data handling via the other bus.
在一些實施例中,該請求的資料處置指定了預期的資料處置信息,其中,該安全裝置被配置為在該匯流排上監控與該請求的資料處置所相對應的實際處置信息,以及識別該安全違規,藉由檢測至少部分該預期處置信息與該實際處置信息不同。在其他實施例中,該請求的資料處置包括從該第二裝置讀取資料,以及其中該安全裝置被配置為在該匯流排上的監控,由該主機從該第二裝置讀取在該匯流排上的資料。在其他實施例中,該安全裝置被配置為在該主機該第一寫入操作的執行期間,通過覆蓋一個或多個在該匯流排上信號的邏輯值,來請求該主機啟動該第一寫入操作至該第二裝置,並且施加一第二不同的寫入操作至該第二裝置。In some embodiments, the requested data disposition specifies expected data disposition information, wherein the security device is configured to monitor the actual disposition information corresponding to the requested data disposition on the bus, and to identify the A security violation by detecting that at least part of the expected disposition information differs from the actual disposition information. In other embodiments, the requested data handling includes reading data from the second device, and wherein the security device is configured to monitor on the bus, read by the host from the second device on the bus information on the row. In other embodiments, the security device is configured to request the host to initiate the first write by overriding the logic value of one or more signals on the bus during execution of the first write operation by the host write operations to the second device, and apply a second, different write operation to the second device.
在一個實施例中,該安全裝置被配置為在該主機一第一讀取操作的執行期間,通過覆蓋一個或多個在該匯流排上信號的邏輯值,來請求該主機啟動該第一讀取操作至該第二裝置,並且施加一第二不同的讀取操作至該第二裝置。在另一個實施例中,該安全裝置被配置為請求該主機啟動通過該匯流排存取該第二裝置的一資料處置,斷開連接該主機與該第二裝置之間的該匯流排的一信號,以及通過匯流排取代該主機去存取該第二裝置。在又一個實施例中,響應於識別出該安全違規,該安全裝置執行一保護行動,以防止暴露或修改在存取該第二裝置時出現在該匯流排上的資料。In one embodiment, the security device is configured to request the host to initiate the first read by overriding the logic value of one or more signals on the bus during execution of a first read operation by the host Fetch operations to the second device, and apply a second, different read operation to the second device. In another embodiment, the security device is configured to request the host to initiate a data process that accesses the second device through the bus, disconnecting a connection to the bus between the host and the second device signal, and replace the host to access the second device through the bus. In yet another embodiment, in response to identifying the security violation, the security device performs a protective action to prevent exposure or modification of data present on the bus when the second device is accessed.
根據本文描述的實施例,還提供了一種方法,該方法包括在一安全系統包括一主機操作在一匯流排上作為一匯流排主控,從動裝置耦合至該主機,由主機在由該從動裝置和該主機觸發的匯流排存取操作之間進行仲裁;通過與該匯流排耦合的一安全裝置,請求該主機啟動一資料處置,藉以存取耦合至該匯流排最為從動的一第二裝置;至少在該主機通過該匯流排存取該第二裝置以執行該請求的資料處置期間內,經由該安全裝置監控該匯流排上的一個或多個信號;以及基於該監控的信號,藉由該安全裝置,識別在執行該請求的資料處置時是否發生一安全違規In accordance with embodiments described herein, there is also provided a method comprising a safety system including a host operating on a bus as a bus master, a slave device coupled to the host, by the host operating on a bus by the slave Arbitration between a slave device and a bus access operation triggered by the host; through a safety device coupled to the bus, the host is requested to initiate a data processing to access a first slave coupled to the bus that is the most slave two devices; monitoring, via the security device, one or more signals on the bus, at least during the host accessing the second device through the bus to perform the requested data processing; and based on the monitored signals, Identifying, by the security device, whether a security violation occurred while performing the requested data processing
根據本文描述的實施例,還提供了設備,包括:一安全裝置提供一安全服務至一主機,其中,該安全裝置,該主機和該安全裝置外部的一非揮發性記憶體(NVM)耦合至一共同匯流排; 以及一專用裝置驅動器在該主機上執行,其中,該裝置驅動器被配置為在該安全裝置和該非揮發性記憶體(NVM)裝置之間進行調解,並且其中,該安全裝置被配置為從該主機上執行的一應用程式來接收一安全命令,並通過存取在該匯流排上該非揮發性記憶體(NVM)裝置來執行該安全命令,通過該專用裝置驅動器對該應用程式通透。In accordance with embodiments described herein, there is also provided apparatus comprising: a security device providing a security service to a host, wherein the security device, the host and a non-volatile memory (NVM) external to the security device are coupled to a common bus; and a dedicated device driver executing on the host, wherein the device driver is configured to mediate between the secure device and the non-volatile memory (NVM) device, and wherein the secure device is configured to receive a security command from an application executing on the host, and execute the security command by accessing the non-volatile memory (NVM) device on the bus, to the application through the dedicated device driver transparent.
通過以下結合附圖對實施例的詳細描述,可以更全面地理解這些和其他實施例,其中:These and other embodiments can be more fully understood from the following detailed description of the embodiments in conjunction with the accompanying drawings, in which:
在主控從動配置中,作為匯流排主控裝置的主機裝置通常通過匯流排耦合到多個從動裝置。主機作為匯流排主控被允許在該匯流排上啟動資料處置,但是從動裝置只能通過響應主機來存取匯流排。然而,在一些實際情況中,期望一個從動裝置能夠啟動並執行與另一從動裝置的資料處置。In a master-slave configuration, the master device, which is the bus master, is typically coupled to multiple slave devices through the bus. A master as a bus master is allowed to initiate data processing on that bus, but slaves can only access the bus by responding to the master. However, in some practical situations, it is desirable for one slave device to be able to initiate and perform data processing with another slave device.
本文描述的實施例提供了用於使用匯流排監控來執行和保護從動裝置之間的主控調解的資料處置的系統和方法。監控匯流排的裝置可以通過附加的不同匯流排耦合到主機,並通過該附加匯流排向主機請求資料處置。Embodiments described herein provide systems and methods for data handling using bus monitoring to perform and protect master mediation between slave devices. The device monitoring the bus can be coupled to the host through an additional different bus and request data handling from the host through the additional bus.
在一些實施例中,主機執行可能需要存取匯流排的一個或多個應用程式,以及一裝置驅動器調解匯流排上的資料處置。主機在裝置驅動器和其他嘗試存取匯流排的應用程式之間進行仲裁。In some embodiments, the host executes one or more applications that may require access to the bus, and a device driver mediates data handling on the bus. The host arbitrates between the device driver and other applications trying to access the bus.
在一些實施例中,第一裝置(例如,從動可信賴平台模組(Trusted Platform Module, TPM)或其他安全處理器)需要在第二裝置(例如,從動快閃記憶體)中執行資料處置。為此,第一裝置例如通過使用中斷或輪詢通知標誌技術來請求主機中的裝置驅動器在匯流排上啟動資料處置以代表其存取第二裝置。第一裝置監控由主機在匯流排上代表其執行的資料處置,以確保正確執行資料處置,例如,不損害主機。In some embodiments, a first device (eg, a slave Trusted Platform Module (TPM) or other secure processor) needs to execute data in a second device (eg, a slave flash memory) dispose of. To this end, the first device requests the device driver in the host to initiate data handling on the bus to access the second device on its behalf, eg, by using an interrupt or polling notification flag technique. The first device monitors data processing performed by the host on its behalf on the bus to ensure that data processing is performed correctly, eg, without harming the host.
在一些實施例中,第一裝置不僅可以如上所述監控匯流排以用於驗證所請求的資料處置,而且可以用於監控匯流排上沒有違反安全策略(例如,預定義),例如,藉由具有存取權限給主機的攻擊者。In some embodiments, the first device may not only monitor the bus as described above for verifying the requested data disposition, but may also monitor that a security policy (eg, predefined) has not been violated on the bus, eg, by An attacker with access rights to the host.
第一裝置可以在主機至少在執行請求的資料處置中通過匯流排存取第二裝置的時間段內,監控匯流排上的一個或多個信號。第一裝置基於監控的信號來識別在執行所請求的資料處置中是否發生了安全違規。當檢測到安全違規時,第一裝置可以執行保護動作,例如,例如在存取第二裝置時防止暴露出現在匯流排上的資料的動作。在一個實施例中,可以基於預定義的策略來選擇保護動作。The first device may monitor one or more signals on the bus during a time period when the host accesses the second device through the bus at least in performing the requested data handling. The first device identifies, based on the monitored signals, whether a security breach has occurred in performing the requested data processing. When a security violation is detected, the first device may perform protective actions, eg, actions that prevent exposure of data present on the bus bar when the second device is accessed. In one embodiment, protection actions may be selected based on predefined policies.
第一裝置可以請求主機啟動任何合適的資料處置,例如,(i)從第二裝置讀取資料,(ii)將資料寫入第二裝置,或者(iii)在第二裝置中的不同位址之間傳輸資料。從第二裝置讀取或寫入第二裝置的資料可以被加密和/或被簽名。The first device may request the host to initiate any suitable data handling, eg, (i) reading data from the second device, (ii) writing data to the second device, or (iii) at a different address in the second device transfer data between. Data read from or written to the second device may be encrypted and/or signed.
第一裝置可以通過檢測在所請求的資料處置中指定的至少一部分預期處置信息與在匯流排上被監控的實際處置信息不同來識別安全違規。這種不匹配可能發生在至少一個資料處置元件中,例如資料處置的操作碼或命令類型元件,位址元件和/或資料元件。在一些實施例中,第一裝置可以響應於在所請求的資料處置的時間段之內或之外檢測到匯流排上已經違反了預定義的安全策略(例如,已經存取了受保護的位址),來識別安全違規。The first device may identify a security violation by detecting that at least a portion of the expected disposition information specified in the requested material disposition differs from the actual disposition information monitored on the bus. Such a mismatch may occur in at least one data handling element, such as an opcode or command type element of the data handling, an address element and/or a data element. In some embodiments, the first device may respond to detecting that a predefined security policy has been violated on the bus (eg, a protected bit has been accessed, within or outside the time period of the requested data handling) address) to identify security violations.
在一個實施例中,所請求的資料處置包括從第二裝置讀取資料,並且第一裝置監控匯流排,以通過匯流排監控主機從第二裝置讀取的資料。在另一個實施例中,第一裝置請求主機啟動對第二裝置的虛擬寫入(或虛擬讀取)操作。然後,第一裝置通過在主機執行虛擬寫入(或虛擬讀取)操作的過程中覆蓋匯流排上一個或多個信號的邏輯值,將不同的寫入(或讀取)操作應用於第二裝置。在其他實施例中,在主機執行請求的資料處置期間,第一裝置斷開連接在主機和第二裝置之間的匯流排的信號,並通過匯流排而不是主機存取第二裝置。In one embodiment, the requested data handling includes reading data from the second device, and the first device monitors the bus to monitor data read by the host from the second device via the bus. In another embodiment, the first device requests the host to initiate a virtual write (or virtual read) operation to the second device. The first device then applies a different write (or read) operation to the second device by overriding the logic value of one or more signals on the bus while the host is performing the virtual write (or virtual read) operation device. In other embodiments, the first device disconnects the signal from the bus between the host and the second device and accesses the second device through the bus rather than the host during the host's execution of the requested data handling.
在示例配置中,安全系統包括從動安全裝置和從動非揮發性記憶體(NVM)裝置。為了向主機提供安全服務,安全裝置需要存取位於安全裝置外部的非揮發性記憶體(NVM)裝置。主機執行一個專用的裝置驅動程式,該驅動程式在安全裝置和非揮發性記憶體(NVM)裝置之間進行調解。安全裝置從主機上執行的應用程式接收安全命令,並通過匯流排存取非揮發性記憶體(NVM)裝置,通過專用裝置驅動程式對應用程式通透地執行安全命令。In an example configuration, the safety system includes a slave safety device and a slave non-volatile memory (NVM) device. In order to provide security services to the host, the security device needs to access a non-volatile memory (NVM) device located outside the security device. The host implements a dedicated device driver that mediates between the secure device and the non-volatile memory (NVM) device. The security device receives security commands from the application program running on the host, and accesses the non-volatile memory (NVM) device through the bus, and executes the security command transparently to the application program through the dedicated device driver.
在所公開的技術中,主機操作為匯流排主控器,並且通過運行在匯流排上進行調解的裝置驅動器來與一個或多個從動裝置共享匯流排。監控裝置監控匯流排以檢測安全違規。監控裝置耦合到匯流排以用於監控和控制匯流排上的信號,並且可以請求主機來在匯流排上啟動資料處置。替代地,監控裝置另外通過不同的匯流排耦合到主機,用於請求主機在匯流排上啟動資料處置。通過監控匯流排,監控裝置能夠監控(snoop)匯流排上的資料處置及/或甚至用對主機隱藏的期望資料處置來覆蓋(override)或替換匯流排上的資料處置。In the disclosed technology, a master operates as a bus master and shares the bus with one or more slave devices by running a device driver that mediates on the bus. The monitoring device monitors the busbars to detect safety violations. A monitoring device is coupled to the bus for monitoring and controlling signals on the bus, and can request the host to initiate data processing on the bus. Alternatively, the monitoring device is additionally coupled to the host through a different bus for requesting the host to initiate data processing on the bus. By monitoring the bus, the monitoring device can snoop the data disposition on the bus and/or even override or replace the data disposition on the bus with a desired data disposition hidden from the host.
系統描述
第1圖是示意性地示出根據本文描述的實施例的安全系統20的框圖。在本示例中,安全系統20包括使用匯流排36連接到周邊(peripheral)從動裝置28和32的主機裝置24。從動裝置28和32分別表示為SLAVE1以及SLAVE2。在本示例中,匯流排36包括序列周邊介面(SPI)匯流排。在其他實施例中,匯流排36可以包括任何其他合適的匯流排,例如,低腳位數匯流排(Low Pin Count bus, LPC)或內部積體電路(Inter-Integrated Circuit, I2
C)匯流排。例如,可以使用I2
C匯流排連接到電子可抹除可程式化唯讀記憶體(Electrically Erasable Programmable Read-Only Memory , EEPROM)裝置。固態儲存裝置的其他匯流排介面可以包括,例如,安全數位(SD)介面,多媒體卡(MMC)介面或並聯快閃記憶體介面(parallel Flash interface)。為了簡潔起見,主機裝置也簡稱為“主機”。System Description Figure 1 is a block diagram schematically illustrating a
在一些實施例中,第1圖所示之SLAVE1是主機在匯流排36上的從動裝置28,並且另外監控和控制匯流排36的匯流排信號。在替代實施例中,SLAVE1耦合到匯流排36以監控和控制匯流排信號,但是,通過另一個匯流排(未顯示),例如I2
C匯流排,耦合到主機以作為可能的從動裝置。In some embodiments, SLAVE1 shown in FIG. 1 is the
在安全系統20的主控從動配置中,僅允許主機裝置24通過匯流排36啟動讀取或寫入處置。另一方面,每個從動裝置僅可以響應(response)於主機裝置24的請求來存取匯流排36。在這種主控從動配置中,SLAVE1和SLAVE2不能通過匯流排36直接相互通信,而是要求它們的通信由主機來調解(mediated)。對於SLAVE1作為匯流排36上的從動以及對於SLAVE1通過另一條匯流排與主機耦合,需要這種調解(mediation)。In the master-slave configuration of
SLAVE1和SLAVE2可以包含任何合適類型的裝置。在一種配置中, 從動裝置28(SLAVE1)可以包括有時也稱為可信賴平台模組(Trusted Platform Module, TPM)的安全裝置,而 從動裝置32(SLAVE2)可以包括非揮發性記憶體(NVM)。從動裝置28和32的其他合適的配置也可以被使用。通常,SLAVE1可以包括任何合適的控制器,例如嵌入式控制器(Embedded Controller, EC)。在示例實施例中,SLAVE2可以包括任何合適類型的非揮發性記憶體(NVM),例如,唯讀記憶體(Read Only Memory, ROM),一次性可程式(One Time Programmable, OTP)記憶體,EEPROM或快閃記憶體。替代地,SLAVE2可以包括揮發性記憶體,諸如隨機存取記憶體(Random Access Memory, RAM)裝置。SLAVE1 and SLAVE2 may comprise any suitable type of device. In one configuration, slave device 28 (SLAVE1 ) may include a safety device sometimes referred to as a Trusted Platform Module (TPM), while slave device 32 (SLAVE2) may include non-volatile memory (NVM). Other suitable configurations of driven
注意,從動裝置之一,包括記憶體裝置的系統配置不是強制性的。在一些實施例中,SLAVE1和SLAVE2包括可能需要在監控匯流排的同時經由主機彼此處置信息的控制器。Note that the system configuration of one of the slave devices, including the memory device, is not mandatory. In some embodiments, SLAVE1 and SLAVE2 include controllers that may need to process information from each other via the host while monitoring the bus.
在本示例中,SLAVE1包括用於連接至匯流排36的匯流排介面40,配置為執行所公開技術的處理器44,和配置為儲存由處理器44實施的一個或多個安全策略的記憶體48。處理器44包括從從動介面邏輯(Slave interface logic)52和介面監控邏輯(Interface Monitor Logic, IML)56。從動介面邏輯(Slave interface logic)52處理SLAVE1和主機裝置24之間的通信。當主機裝置24代表SLAVE1存取SLAVE2時,介面監控56(IML 56)監控,控制並有選擇地覆蓋(override)匯流排信號。在一些實施例中,經由SLAVE1,介面監控56(IML 56)監控匯流排以驗證從主機請求的資料處置的正確執行。在一個實施例中,介面監控56(IML 56)另外監控匯流排,以檢測可能違反一個或多個與特定請求的資料處置無關並且可以儲存在記憶體48中的定安全策略(predefined security policies)。In this example, SLAVE1 includes a
在安全系統20中,SLAVE1通過監控匯流排36上的資料處置並防止未經授權的資料處置,例如使用介面監控56(IML 56),來保護對SLAVE2的存取,主機裝置24或另一具有匯流排主控能力的裝置,試圖未經授權地存取SLAVE2。在一些實施例中,SLAVE1的介面監控56(IML 56)監控匯流排36以攔截由主機實際執行的經由SLAVE1所請求的資料處置,並驗證該資料處置被正確執行。響應於檢測到匯流排上的違反規定,例如,在主機執行所請求的資料處置期間,介面監控56(IML 56)可以應用適當的保護動作。In
在一些實施例中,保護動作用於防止在資料處置期間不期望的洩漏,或可能暴露給匯流排36的秘密信息的暴露。在一些實施例中,保護動作防止匯流排上的資料損壞或防止資料損壞到儲存在SLAVE2中的資料,例如未經授權的嘗試來修改儲存在SLAVE2中的設置或配置信息。In some embodiments, protective actions are used to prevent undesired leakage during data handling, or exposure of secret information that may be exposed to
主機裝置24包括CPU 60,係執行一個或多個應用程式64,以及專用裝置驅動器68。在一些實施例中,SLAVE1包括安全裝置,該安全裝置具有專用裝置驅動器,向主機裝置24提供實現可信計算和其他安全策略所需的功能。CPU 60在CPU執行的並且可能需要存取匯流排36的各種程式或程序之間進行仲裁,例如應用程式64和專用裝置驅動器68。應用程式64可以包括例如提供安全儲存服務的安全應用程式,例如,系統資源對儲存信息的控制的存取。
專用裝置驅動器68協調SLAVE1和SLAVE2之間的通信。例如,裝置驅動器68通透地(transparently)對應用程式64提供對SLAVE1的間接存取SLAVE2。當執行內部任務或計算時,SLAVE1可能需要存取SLAVE2,例如,以便從SLAVE2讀取資料或向SLAVE2寫入資料。 SLAVE1可能需要獨立於主機裝置24上執行中的應用程式64來存取SLAVE2。或者,SLAVE1需要存取SLAVE2來完成應用程式64發出的命令。A
SLAVE1可以從動裝置驅動器68請求以各種方式存取SLAVE2。在一個實施例中,SLAVE1內部例如在預定的暫存器中準備請求,並產生中斷信號以通知裝置驅動器經由匯流排36讀取請求。在另一實施例中,裝置驅動器(68)輪詢SLAVE1內的暫存器。以確定是否有待處理的請求。在又一個實施例中,裝置驅動器68,例如響應於應用64向從動裝置發送命令(例如,安全命令)而有條件地檢查SLAVE1中的暫存器值。SLAVE1 may request
當裝置驅動器68從SLAVE1接收存取SLAVE2的請求時,CPU在裝置驅動器68和其他應用程式(64)之間進行仲裁,並代表SLAVE1通過匯流排36存取SLAVE2。例如,當SLAVE2包含非揮發性記憶體(NVM)或其他內存時,SLAVE1可以請求裝置驅動程式68存取匯流排36以執行資料處置,例如(i)從給定非揮發性記憶體(NVM)位址讀取資料,(ii)向給定非揮發性記憶體(NVM)位址寫入資料, (iii)將資料從一個非揮發性記憶體(NVM)位址複製到另一非揮發性記憶體(NVM)位址。When
使用匯流排監控的安全方法Safe method using bus monitoring
安全系統20可能會受到未經授權的攻擊者的破壞,例如篡改主機裝置24。攻擊者例如可能檢測到受控裝置1(SLAVE1)從主機請求的資料處置,並使主機向受控裝置2(SLAVE2)申請與請求的資料處置不同的資料處置。例如,用於公開秘密信息或進行未經授權的資料修改,例如,對儲存在SLAVE2中的信息。通過監控匯流排36,SLAVE1可以檢測到匯流排上的違規事件並採取相應的保護措施。
在下面的實施例的描述中,假設主機裝置24通過受控裝置2(SLAVE2)執行的資料處置作為邏輯值序列出現在匯流排上。對應於給定資料處置的序列通常包括位址部分和資料部分,即[位址,資料]。邏輯值序列還可以包括標識(identifies) 資料處置處理類型的操作碼(opcode),在這種情況下,該序列可以在匯流排上顯示為[操作碼,位址,資料]。在該示例中,當SLAVE1截取操作碼部分時,它可以修改(例如,覆蓋其邏輯值)位址部分,資料部分或兩者。資料處置的操作碼,位址和資料部分在本文中也統稱為“處置信息”(transaction information)。In the description of the following embodiments, it is assumed that the data processing performed by the
第2圖是示意性地示出根據本文描述的實施例的用於基於匯流排監控來保護主控調解資料處置的方法的流程圖。該方法可以例如由第1圖的從動裝置28的處理器44執行。在描述該方法時,作為非限制性示例,從動裝置28(SLAVE1)包括安全裝置,和從動裝置32(SLAVE2)包括快閃記憶體,例如SPI快閃記憶體,-當匯流排36包括SPI匯流排時。FIG. 2 is a flow diagram schematically illustrating a method for securing master mediation data handling based on bus monitoring, according to embodiments described herein. The method may be performed, for example, by the
該方法開始於處理器44(SLAVE1的)在重置保持步驟100從快閃記憶體啟動。在一個實施例中,處理器44包括合適的 介面和電路(未示出),以在存取快閃記憶體時維持主機裝置24處於重置狀態,通常是系統啟動過程的一部分。在一個實施例中,為了加載啟動程式,處理器44從快閃記憶體加載資料區塊,驗證資料區塊的真實性(authenticity),並將已認證的資料區塊局部性地(locally)儲存在記憶體48中。上述啟動機制將主機保持在重置不是強制性的。在替代實施例中,也可以使用其他合適的啟動方法。The method begins with processor 44 (of SLAVE1 ) booting from flash memory at
在資料處置請求步驟104,處理器44請求主機裝置24的裝置驅動器68啟動資料處置,該資料處置包括通過匯流排36存取快閃記憶體。所請求的資料處置可以包括例如(i)從給定的快閃記憶體位址讀取資料, (ii)將資料寫入給定的Flash位址,或(iii)將資料從一個Flash位址複製到另一個不同的Flash位址。At data handling
在監控步驟108,處理器44使用介面監控56(IML 56)監控匯流排36,以在匯流排上攔截所請求的資料處置,以驗證資料處置是否按預期執行。例如,在寫入處置的情況下-驗證資料處置中指定的資料確實已寫入處置中指定的位址。 IML監控一個或多個匯流排信號,例如晶片選擇(Chip-Selec, CS)信號,時脈信號和承載資料和位址信息的匯流排信號。當匯流排36包括SPI匯流排時,介面監控56(IML 56)可以通過SPI匯流排的主控輸出從動輸入(Master-Out Slave-In, MOSI)信號,主控輸入從動輸出(Master-In Slave-Out, MISO)信號或兩者來監控資料和位址信息。At
在步驟108,處理器44可以例如基於所請求的資料處置中的信息或處理器已知的其他信息,以各種方式在匯流排上攔截所請求的資料處置。注意,在請求資料處置的時間與裝置驅動器實際執行所請求的資料處置的時間之間,主機可以在匯流排上啟動由應用程序64啟動的其他資料處置,資料處置處理器44通常忽略該其他資料處置。在示例實施例中,在讀取,寫入或複製處置的情況下,處理器44攔截在所請求的資料處置中特定的位址信息。在寫入處置的情況下,處理器可以攔截要寫入的資料(或該資料的一部分)。At
進一步在步驟108,響應於在匯流排上攔截所請求的資料處置(或資料處置的一部分),處理器(使用IML)監控匯流排以驗證所請求的資料處置是否按預期執行。例如,處理器驗證主機是否通過匯流排36以請求的資料處置中指定的位址或位址範圍存取快閃記憶體。在寫入和複製處置中,處理器可以驗證要寫入或複製的資料是否與請求的寫入或複製處置中指定的資料匹配。處理器可以另外驗證在執行所請求的資料處置(或者也可能是其他資料處置)時,不違反記憶體48中指定的安全策略。另外,處理器44可以驗證沒有違反獨立於任何特定資料處置請求而指定的安全策略。Further at
在違規檢查步驟112,處理器檢查是否在匯流排36上檢測到違規。如上所述,可能由於(i)違反了儲存在記憶體48中的預定策略(例如,存取受保護的位址或位址範圍)而引起違規,或(ii)事件的發生,其中在匯流排上截獲的資料處置信息的至少一部分與步驟104的請求資料處置中的相應處置信息不同。In a
當在步驟112未檢測到違規時,處理器44進行到資料處置完成步驟116,以完成資料處置,並循環回到步驟104以請求主機的後續資料處置。處理器可以通過監控匯流排直到主機完成執行所請求的資料處置來完成資料處置。替代地或附加地,處理器通過主機的裝置驅動器完成資料處置。例如,處理器從動裝置接收裝置驅動器已從快閃記憶體讀取的資料,完成通知或兩者。When no violation is detected at
響應於在步驟112處檢測到違規,處理器44進行到保護步驟120,在該步驟中,處理器施加適當的保護動作以防止秘密信息的洩漏或暴露。示例性保護動作將在下面描述。在步驟120之後,處理器可以循環回到步驟104,以請求主機通過匯流排36啟動與快閃記憶體的後續資料處置。In response to detecting a violation at
在步驟120,處理器44可以施加各種保護動作。在一些實施例中,保護動作包括重置安全系統20的一個或多個元件,例如重置主機裝置24。替代地或附加地,處理器例如通過修改匯流排上的一個或多個信號的邏輯值來破壞匯流排36。 ,或斷開主機與匯流排的連接。At
修改匯流排信號的方法例如在美國專利申請公開2018/0239727中有所描述,該專利的公開內容通過引用併入本文。例如,在一些實施例中,SLAVE1的匯流排介面40與主機裝置24並行地驅動匯流排36的一個或多個匯流排信號。SLAVE1可以通過應用覆蓋(override)主機並行驅動的邏輯值的邏輯值來破壞匯流排。例如,通過使用比主機的相應線路驅動器更強的線路驅動器,或通過在由主機驅動的匯流排信號上串聯添加一個電阻器以衰減主機驅動的信號,來實現匯流排信號的邏輯值的覆蓋(Overriding)。在另一個實施例中,主機信號通過SLAVE1路由到SLAVE2,SLAVE1根據需要屏蔽匯流排信號的邏輯值。下面將進一步描述用於將主機與匯流排斷開連接的方法。Methods of modifying busbar signals are described, for example, in US Patent Application Publication 2018/0239727, the disclosure of which is incorporated herein by reference. For example, in some embodiments,
使用匯流排監控與記憶體裝置保護資料處置的示例方法Example method for securing data handling using bus monitoring and memory devices
下面的示例實施例指的是其中受控裝置2(SLAVE2)包括記憶體裝置,例如快閃記憶體的系統配置。The following example embodiments refer to a system configuration in which the controlled device 2 (SLAVE2) includes a memory device, such as a flash memory.
第3圖和第4圖是示意性地示出了根據本文描述的實施例的用於安全的讀取和寫入操作的方法的流程圖。第3圖和第4圖的方法例如由SLAVE1的處理器44執行。下述的第3圖和第4圖可以與上述的第2圖的方法結合。Figures 3 and 4 are flowcharts schematically illustrating methods for secure read and write operations according to embodiments described herein. The methods of Figs. 3 and 4 are executed, for example, by the
第3圖的方法在讀取處置請求步驟150處開始,其中處理器44請求主機的裝置驅動器68啟動讀取處置,該讀取處置從快閃記憶體(SLAVE2)中的給定位址讀取資料。如上所述,在監控步驟154,處理器監控匯流排36(使用介面監控56(IML 56))以識別正在由裝置驅動器執行的請求的讀取處置。The method of FIG. 3 begins at a read
在一些實施例中,所讀取的資料處置在匯流排信號上以表示用於讀取的起始位址的邏輯值序列出現,隨後是表示在讀取一個或多個位置時,從快閃記憶體中取回的一個或多個資料單元(例如,位元單元)的邏輯值。在示例實施例中,處理器通過檢測在所請求的讀取處置中指定的起始位址來識別匯流排上的所請求的讀取處置。In some embodiments, the read data is disposed on the bus signal as a sequence of logic values representing the starting address for the read, followed by a sequence of logic values representing when one or more locations are read, from the flash The logical value of one or more data units (eg, bit units) retrieved from memory. In an example embodiment, the processor identifies the requested read transaction on the bus by detecting the starting address specified in the requested read transaction.
響應於識別匯流排上的讀取處置,處理器在監控步驟158處繼續監控匯流排,以捕獲匯流排上代表主機並行讀取的資料的邏輯值。處理器捕獲所請求的讀取處置中指定的一個或多個資料單元(例如,位元組)。In response to identifying the read transaction on the bus, the processor continues to monitor the bus at monitoring
在一些實施例中,使用密碼簽名對從快閃記憶體中取回到的資料進行簽名,在這種情況下,處理器可以使用簽名來驗證讀取資料的完整性(integrity)。在一些實施例中,從快閃記憶體中取回的資料被加密,在這種情況下,處理器可以解密讀取的資料。在一些實施例中,除了在匯流排上捕獲的資料之外,處理器還通過裝置驅動器接收讀取的資料的版本。在這些實施例中,處理器可以通過在直接在匯流排上捕獲的資料與通過裝置驅動器間接讀取的資料之間進行比較,來驗證主機未被篡改。在步驟158之後,第3圖的方法結束。In some embodiments, the data retrieved from flash memory is signed using a cryptographic signature, in which case the processor can use the signature to verify the integrity of the read data. In some embodiments, data retrieved from flash memory is encrypted, in which case the processor can decrypt the data read. In some embodiments, in addition to the data captured on the bus, the processor receives a version of the read data through the device driver. In these embodiments, the processor can verify that the host has not been tampered with by comparing data captured directly on the bus with data read indirectly through the device driver. After
在第3圖的方法中,SLAVE1在由主機施加到快閃記憶體的讀取處置期間監管匯流排信號。可以以類似的方式使用第3圖的方法,以在主機施加到快閃記憶體的寫入處置期間監聽匯流排信號。在一些實施例中,通過監聽匯流排,SLAVE1驗證所請求的資料處置是否按預期執行。In the method of Figure 3, SLAVE1 supervises the bus signal during a read process applied to the flash memory by the host. The method of Figure 3 can be used in a similar manner to listen for bus signals during write transactions applied to flash memory by the host. In some embodiments, by listening to the bus, SLAVE1 verifies that the requested data handling is performed as expected.
在第3圖的方法中,處理器44執行期望的寫入操作,該期望的寫入操作將期望的資料寫到快閃記憶體中的期望的位址,而不向主機暴露所寫的位址,資料或兩者。In the method of FIG. 3,
第4圖的方法在虛擬(dummy)寫入處置請求步驟200開始,處理器44請求裝置驅動器68通過匯流排36向快閃記憶體(SLAVE2)啟動虛擬(dummy)寫入處置。虛擬(dummy)寫入處置指定快閃記憶體中的位址。快閃記憶體,可以是預定義的虛擬位址或用於寫入的實際位址。虛擬(dummy)寫入處置可能指定一個操作碼,並將虛擬(dummy)資料寫入到指定的位址。虛擬寫入處置可能在匯流排上顯示為[操作碼,虛擬位址,虛擬資料]。在該示例中,偽位址隨時間流逝,虛擬(dummy)資料隨時間跟隨虛擬(dummy)資料。The method of FIG. 4 begins at a dummy write
在監控步驟204,處理器監控匯流排36(使用介面監控56(IML 56))以識別由裝置驅動器執行的所請求的虛擬(dummy)寫入處置。處理器可以例如通過在匯流排上檢測在所請求的資料處置中指定的操作碼和/或虛擬(dummy)位址來識別匯流排上的虛擬(dummy)寫入處置。At
在覆蓋(overriding)步驟208,處理器在虛擬寫入處置期間覆蓋(overriding)匯流排上的邏輯值,其中邏輯值表示期望的寫入操作。為此,處理器44用期望的寫入操作的相應值來覆蓋虛擬(dummy)寫入處置的資料,位址和操作碼部分中的一個或多個。結果,期望的資料被寫入快閃記憶體中的期望的位址。請注意,主機通常不知道此匯流排覆蓋(overriding)操作,並且所需寫入處置的資料,位址和操作碼值保持不變。In an
在一些實施例中,當如上所述覆蓋匯流排信號時,處理器44另外監控由匯流排介面驅動的匯流排信號。通過監控匯流排信號,處理器44可以按預期驗證將預期資料寫入了預期位址。In some embodiments, the
在第4圖的方法中,SLAVE1用期望的不同資料的寫入處置和可能在快閃記憶體中的位址來覆蓋虛擬(dummy)寫入處置。可以以類似的方式使用第4圖的方法,以用期望的讀取處置覆蓋虛擬(dummy)寫入讀取處置,例如,從快閃記憶體中的期望位址進行讀取。In the method of Figure 4, SLAVE1 overwrites the dummy write handle with the desired write handle of the different data and possibly an address in flash memory. The method of Figure 4 can be used in a similar manner to overwrite a dummy write read transaction with a desired read transaction, eg, reading from a desired address in flash memory.
通過斷開主機與匯流排的連接來安全存取從動裝置的方法Method for safely accessing slave devices by disconnecting the master from the bus
第5圖是示意性地示出根據本文描述的實施例的支持將主控裝置從匯流排斷開的安全系統250的區塊圖。安全系統250可以用於實現第1圖的安全系統20。FIG. 5 is a block diagram schematically illustrating a
在安全系統250中,主機裝置24包括匯流排主控,該匯流排主控通過SPI匯流排254連接到從動裝置28(SLAVE1)和32(SLAVE2)。SPI匯流排包括時脈(CLK)線和兩條資料線,稱為主控輸出從動輸入(Master-Out Slave-In, MOSI)和主控輸入主控輸出Master-In Slave-Out, MISO)。 CLK,MOSI和MISO線是所有裝置(在本示例中,主機裝置24以及從動裝置28和32)公用的。此外,每個從動裝置都可以使用專用的晶片選擇(Chip-Select, CS)線進行選擇。在本示例中,主機裝置24使用表示為CS#1的CS線選擇SLAVE1,並且使用表示為CS#2的CS線選擇SLAVE2。In
作為主機的主機裝置24連接到所有CS線路。另一方面,每個從動裝置僅連接到其自己的CS線。通常,主機裝置24通過使用相應的CS線選擇期望的從動裝置來啟動資料處置,然後使用CLK,MOSI和MISO線與該裝置通信。 MOSI線用於從主機到從動裝置的傳輸,而MISO線用於從從動裝置到主機的傳輸。The
與傳統的SPI從動裝置不同,SLAVE1被定義為從動裝置,但仍然能夠驅動其他裝置的CS線,例如SLAVE2的CS#2線。如第5圖中可見,SLAVE1的匯流排介面40被配置為並行地驅動CS#2線到主機裝置24。當系統包括具有各自的CS線的多個從動裝置(例如,SLAVE2)時,SLAVE1可以被配置為驅動與主機裝置24並行的任何CS線。Unlike traditional SPI slaves, SLAVE1 is defined as a slave, but is still capable of driving the CS line of other devices, such as the
在第5圖中,MOSI和MISO線直接連接到SLAVE1。另一方面,MOSI和MISO線通過SLAVE1間接連接到SLAVE2。在這種配置中,SLAVE1控制主機的MOSI和MISO線是連接到SLAVE2還是從SLAVE2斷開。 SLAVE1包括MISO選擇器260和MOSI選擇器262。MISO和MOSI選擇器中的每一個包括兩個輸入端口和單個輸出端口。在任何給定時間,處理器44使用SEL控制輸入控制選擇器,以在其輸出端口和其輸入端口之一之間內部連接。可以使用任何合適的電路元件,例如使用多工器(multiplexer)元件,來實現MISO和MOSI選擇器。In Figure 5, the MOSI and MISO lines are connected directly to SLAVE1. On the other hand, MOSI and MISO lines are indirectly connected to SLAVE2 through SLAVE1. In this configuration, SLAVE1 controls whether the host's MOSI and MISO lines are connected to or disconnected from SLAVE2. SLAVE1 includes
當主機裝置24從SLAVE2讀取資料時,SLAVE1可以控制MISO選擇器在主機和SLAVE2之間連接MISO線,在這種情況下,SLAVE1可以並行讀取匯流排上的資料。或者,SLAVE1斷開主機MISO線與SLAVE2的連接,以防止讀取的資料暴露給主機。 SLAVE1的處理器44可能向主機MISO線注入其他資料,而不是從SLAVE2取回的資料。When the
當主機裝置24將資料寫入SLAVE2時,SLAVE1可以控制MOSI選擇器將主機MOSI線連接到SLAVE2,從而允許主機將資料寫入從動裝置。替代地,SLAVE1使用MOSI選擇器斷開主機MOSI線與SLAVE2的連接,並且處理器44可以向SLAVE2注入其他位址和/或資料,從而執行不同的寫入處置。When the
在一些實施例中,當MISO選擇器將主機MISO線連接到SLAVE2時,SLAVE1可以攔截主機讀取處置並覆蓋讀取處置的資料/位址。類似地,當MOSI選擇器將主機MOSI線路連接到SLAVE2時,SLAVE1可以攔截主機寫入處置,並覆蓋寫入處置的資料/位址。In some embodiments, when the MISO selector connects the host MISO line to SLAVE2, SLAVE1 can intercept the host read handle and overwrite the data/address of the read handle. Similarly, when the MOSI selector connects the host MOSI line to SLAVE2, SLAVE1 can intercept the host write disposition and overwrite the data/address of the write disposition.
第6圖是流程圖,其示意性地示出了根據本文描述的實施例的通過從匯流排斷開主機來安全存取從動裝置的方法。該方法可以由第5圖的安全系統250中的從動裝置28(第5圖中同時標示為SLAVE1)的處理器44執行。在本示例中,SLAVE1包括安全裝置,SLAVE2包括快閃記憶體,並且匯流排254包括SPI匯流排。第6圖的方法可以與以上第2圖的方法結合。Figure 6 is a flow diagram schematically illustrating a method of securely accessing a slave device by disconnecting a master from a bus, according to embodiments described herein. The method may be performed by the
該方法在資料處置請求步驟300處開始,處理器44請求主機裝置24的裝置驅動器68啟動對快閃記憶體的虛擬(dummy)寫入處置或虛擬(dummy)讀取處置。虛擬(dummy)讀取或寫入處置指定操作碼(可選),快閃記憶體中的實際或虛擬位址,並且在進行寫入處置時可能指定實際或虛擬(dummy)資料。The method begins at a data
在監控步驟304,處理器44監控匯流排36(例如,使用介面監控56(IML 56))以識別由裝置驅動器執行的所請求的虛擬(dummy)寫入或虛擬(dummy)讀取處置。處理器可以例如通過檢測在所請求的資料處置中指定的快閃記憶體位址和/或操作碼來識別匯流排上的虛擬(dummy)寫入或虛擬(dummy)讀取處置。At
在斷開步驟308,響應於標識請求的資料處置(例如,基於資料處置的操作碼),處理器將主機與SPI匯流排斷開。在寫入處置的情況下,處理器使用MOSI選擇器262將主機與SLAVE2斷開連接,而在讀取處置的情況下,處理器使用MISO選擇器260將主機斷開。或者,處理器可以使用MISO選擇器260斷開MISO和MOSI線。同時選擇兩個選擇器。在一些實施例中,處理器獨立於在匯流排上標識所請求的資料處置而將主機與匯流排斷開連接。At
基於在步驟304檢測到的資料處置是寫入或讀取處置,處理器分別進行到寫入步驟312或讀取步驟316。Based on whether the data disposition detected at
在步驟312,處理器通過SPI匯流排寫入快閃記憶體,將預期資料寫入預期位址,而不管主機經由MOSI線傳送的任何資料和位址如何。在這種技術中,處理器用對主機隱藏的所需寫入處置覆蓋虛擬寫入處置。在一些實施例中,除了(例如,並行地)寫入快閃記憶體之外,處理器還可以監控由主機驅動的MOSI線以檢測可能的違規。在一些實施例中,除了(例如,並行地)寫入快閃記憶體之外,處理器還可以監控由處理器驅動的MOSI線以檢測可能的違規。At
在步驟316,處理器通過SPI匯流排從快閃記憶體的預期位址讀取資料。由於主機MISO線已從快閃記憶體斷開連接,因此主機對處理器讀取的實際資料保持隱藏狀態。在一些實施例中,除了(例如,與之並行地)從快閃記憶體讀取之外,處理器還向主機發送諸如虛擬(dummy)資料之類的其他資料。At
在步驟312和316中的每一個之後,該方法結束。After each of
第1圖中所示的安全系統20和主機裝置24,從動裝置28和從動裝置32以及第5圖中的安全系統250的配置是示例配置,僅出於概念清楚的目的而示出。可替代地,也可以使用任何其他合適的安全系統,主機裝置和從動裝置配置。為了清楚起見,從圖中省略了對於理解本發明的原理不是必需的元件,諸如各種介面,控制電路,尋址電路,定時和排序電路以及調試電路(debugging circuits)。The configurations of
在第1圖和第2圖所示的示例係統配置中,參照第圖1和第5圖,CPU 60,從動裝置28和從動裝置32被實現為單獨的積體電路(IC)。然而,在替代實施例中,CPU,從動裝置28和從動裝置32中的至少兩個可以集成在單個多晶片封裝(Multi-Chip Package, MCP)或系統晶片(System on Chip, SoC)中的單獨的半導體晶粒(die)上,並且通過內部匯流排可以互連。在示例實施例中,從動裝置28(例如,控制器)和從動裝置32(例如,快閃記憶體)在多晶片模組(Multi-Chip Module, MCM)中實現。在從動裝置28和從動裝置32在同一封裝內(例如,在MCM或MCP裝置中)實現的實施例中,兩個裝置在公共封裝內共享相同的SPI介面線(例如,MISO,MOSI和CLK)。這樣的實施例提供了改進的安全性,因為在試圖違反預期功能的情況下攻擊或操縱兩個從動裝置從動裝置之間的信號需要攻擊者打開復合裝置。In the example system configuration shown in Figures 1 and 2, with reference to Figures 1 and 5,
可以使用任何合適的硬體來實現從動裝置28的不同元件,例如在專用積體電路(ASIC)或場域可程式化邏輯閘陣列(Field Programmable Gate Array, FPGA)中。在一些實施例中,可以使用軟體或使用硬體和軟體元件的組合來實現從動裝置28的一些元件(elements)。例如,在本實施例中,從從動介面邏輯52和介面監控56(IML 56)可以被實現為專用硬體模組。記憶體48可以包括任何合適類型的記憶體和儲存技術,例如RAM。The various elements of
通常,主機裝置24中的CPU 60和從動裝置28中的處理器44中的每一個都包括通用處理器,該通用處理器以軟體編程以執行本文描述的功能。該軟體可以例如通過網絡以電子形式下載到相關處理器,或者可以替代地或附加地將其提供和/或儲存在非暫時性有形介質上,例如磁性,光學或電子記憶體。Typically,
包含密碼共同處理器的安全系統Security system including a cryptographic co-processor
考慮安全系統的示例配置,例如第1圖的系統20,其中主機裝置24通過匯流排36作為匯流排主控連接到從動裝置28(第1圖中同時標示為SLAVE1),從動裝置28用作主機裝置24的密碼共同處理器(cryptographic co-processor),以及連接到從動裝置32(第1圖中同時標示為SLAVE2),該從動裝置32包括在主機和密碼共同處理器(cryptographic co-processor)兩者外部的非揮發性記憶體(NVM)裝置。密碼共同處理器在本文中也稱為安全裝置。Consider an example configuration of a safety system, such as
主機執行安全應用程序64,該安全應用程序借助安全裝置提供安全服務。安全應用程序將安全命令發送到安全裝置,並從安全裝置接收相應的命令響應。在為安全應用程序提供服務時,有時需要安全裝置存取NVM裝置。The host executes a
主機執行專用裝置驅動器68,該裝置驅動器對安全應用程序通透地(transparently)在安全裝置和外部NVM裝置之間進行調解。裝置驅動器使安全裝置可以通過裝置驅動器間接存取外部NVM。從主機接收到安全命令後,安全裝置將執行安全命令,該命令可能要求通過專用裝置驅動器通過匯流排存取NVM裝置,從而對應用程序通透(transparently)。The host implements a
在一些實施例中,例如,在執行安全應用程序所請求的安全命令時,安全裝置請求主機為該安全裝置啟動通過匯流排存取外部NVM的資料處置。在主機在執行請求的資料處置時通過匯流排存取NVM裝置的期間內,安全裝置監控匯流排上的一個或多個信號,並根據監控的信號識別執行請求的過程中是否發生了安全違規行為資料處置。In some embodiments, for example, when executing a security command requested by the security application, the security device requests the host to initiate data handling for the security device to access the external NVM over the bus. The security device monitors one or more signals on the bus during the time that the host is accessing the NVM device through the bus while performing the requested data processing, and identifies, based on the monitored signals, whether a security violation has occurred in the execution of the request Data handling.
如本段中所述,配置有密碼共同處理器的安全系統可以使用匯流排監控技術將上述實施例中的任何一個應用於安全系統20和250。As described in this paragraph, a security system configured with a cryptographic co-processor may apply any of the above-described embodiments to
上面描述的實施例是作為示例給出的,並且也可以使用其他合適的實施例。例如,儘管上述實施例主要涉及SPI匯流排,但是這些實施例類似地適用於I2 C匯流排。進一步可選地,所公開的實施例不限於串行匯流排,而是類似地適用於並行匯流排。在某些實施例中,SLAVE1通過與其他從動裝置(例如SLAVE2)不同的匯流排連接到主機(可能但不一定作為從動裝置)。在這樣的實施例中,SLAVE1還連接到匯流排,在該匯流排上主機連接到諸如SAVE2的其他從動裝置,以允許匯流排監控和保護,例如,使用上述方法和系統。The embodiments described above are given as examples and other suitable embodiments may also be used. For example, although the above embodiment relates SPI bus, these embodiments are similarly applied to I 2 C bus. Further alternatively, the disclosed embodiments are not limited to serial busbars, but are similarly applicable to parallel busbars. In some embodiments, SLAVE1 is connected to the master (possibly but not necessarily as a slave) through a different bus than other slaves (eg, SLAVE2). In such an embodiment, SLAVE1 is also connected to a busbar where the master is connected to other slaves such as SAVE2 to allow busbar monitoring and protection, eg, using the methods and systems described above.
在上述一些實施例中,SLAVE1通過識別匯流排上的操作碼,位址或資料元件來檢測資料處置。或者,僅檢測這種元件的一部分可能就足夠了。例如,SLAVE1可以通過僅檢測位址元件的一部分(例如指定位址範圍的最高有效部分)來檢測資料處置。In some of the above-described embodiments, SLAVE1 detects data dispositions by identifying opcodes, addresses, or data elements on the bus. Alternatively, it may be sufficient to detect only a part of such an element. For example, SLAVE1 can detect data dispositions by detecting only a portion of an address element (eg, the most significant portion of a specified address range).
儘管本文描述的實施例主要是指其中SPI匯流排以單模式運行的實施例,但是所公開的實施例類似地適用於以雙模式或四模式運行的SPI匯流排。Although the embodiments described herein primarily refer to embodiments in which the SPI bus operates in single mode, the disclosed embodiments are similarly applicable to SPI busses operating in dual mode or quad mode.
儘管本文描述的實施例主要針對用於在裝置之間進行連接的SPI和I2 C匯流排,但是本文描述的方法和系統也可以與其他合適類型的外圍匯流排一起使用,例如增強型序列周邊介面匯流排(Enhanced Serial Peripheral Interface, eSPI)。Although the embodiments described herein mainly for SPI and I 2 C bus for connecting between the devices, the methods and systems described herein may be used with other suitable types of peripheral bus together, such as enhanced serial peripheral Interface bus (Enhanced Serial Peripheral Interface, eSPI).
儘管在上述實施例中,SLAVE2主要被稱為快閃記憶體或NVM裝置,但本文所述的方法和系統也可以用於其他應用中,其中SLAVE2可以是任何其他合適的周邊裝置,例如揮發性記憶體或其他系統中的裝置。例如,SLAVE2可以包括任何合適的控制器或監控裝置。Although in the above-described embodiments, SLAVE2 is primarily referred to as a flash memory or NVM device, the methods and systems described herein can also be used in other applications where SLAVE2 can be any other suitable peripheral device, such as a volatile memory or other device in the system. For example, SLAVE2 may include any suitable controller or monitoring device.
應當理解,上述實施例是作為示例引用的,並且所附權利要求不限於上文已經具體示出和描述的內容。而是,範圍包括上文描述的各種特徵的組合和子組合,以及本領域技術人員在閱讀前述描述後將想到的並且其在現有技術中未公開的其變型和修改。通過引用併入本專利申請的文件應被認為是本申請的組成部分,除了在這些併入文件中以與本說明書中明確或隱含的定義相抵觸的方式定義任何術語的範圍外,應該考慮本說明書中的定義。It should be understood that the above-described embodiments are cited by way of example and that the appended claims are not limited to what has been particularly shown and described above. Rather, the scope includes combinations and subcombinations of the various features described above, as well as variations and modifications thereof that would occur to one skilled in the art upon reading the foregoing description and which are not disclosed in the prior art. The documents incorporated by reference into this patent application should be considered to be a part of this application, except that the scope of any term is defined in such incorporated documents in a manner inconsistent with any express or implied definition in this specification, consideration should be given to Definitions in this specification.
20:安全系統 24:主機裝置 250:安全系統 28:從動裝置 32:從動裝置 36:序列周邊界面匯流排 40:匯流排介面 44:處理器 48:記憶體 52:從動介面邏輯 56:介面監控 60:CPU中央處理器 64:應用程式 68:裝置驅動器20: Security System 24: Host device 250: Security Systems 28: Slave device 32: Slave device 36: Serial peripheral interface bus 40: Bus interface 44: Processor 48: Memory 52: Slave Interface Logic 56: Interface monitoring 60: CPU central processing unit 64: Apps 68: Device Driver
第1圖是示意性地示出了根據本文描述的實施例的安全系統的框圖。 第2圖是流程圖,其示意性地示出了根據本文所述的實施例的,用於基於監控來保護主控-媒介資料處置的方法。 第3圖和第4圖是流程圖,其示意性地示出了根據本文所述實施例的,用於安全讀取和寫入操作的方法。 第5圖是示意性地示出了根據本文描述的實施例的,支持將主控裝置從匯流排斷開的安全系統的框圖。以及 第6圖是示意性地示出了根據本文描述的實施例的,通過將主機與匯流排斷開連接來對從動裝置的安全存取的方法的框圖。Figure 1 is a block diagram schematically illustrating a security system according to embodiments described herein. Figure 2 is a flow diagram schematically illustrating a method for securing master-media material handling based on monitoring, in accordance with embodiments described herein. Figures 3 and 4 are flowcharts that schematically illustrate methods for secure read and write operations in accordance with embodiments described herein. Figure 5 is a block diagram schematically illustrating a safety system supporting disconnection of a master device from a bus bar, according to embodiments described herein. as well as 6 is a block diagram schematically illustrating a method of secure access to a slave device by disconnecting a master from a bus, according to embodiments described herein.
20:安全系統 20: Security System
24:主控裝置(主機) 24: Main control device (host)
250:安全系統 250: Security Systems
28:從動裝置 28: Slave device
32:從動裝置 32: Slave device
36:序列周邊界面匯流排 36: Serial peripheral interface bus
40:匯流排介面 40: Bus interface
44:處理器 44: Processor
48:記憶體 48: Memory
52:從動介面邏輯 52: Slave Interface Logic
56:介面監控 56: Interface monitoring
60:CPU中央處理器 60: CPU central processing unit
64:應用程式 64: Apps
68:裝置驅動器 68: Device Driver
Claims (10)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16/377,211 US10783250B2 (en) | 2014-07-24 | 2019-04-07 | Secured master-mediated transactions between slave devices using bus monitoring |
US16/377,211 | 2019-04-07 |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202139040A TW202139040A (en) | 2021-10-16 |
TWI751962B true TWI751962B (en) | 2022-01-01 |
Family
ID=72806531
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW110124963A TWI751962B (en) | 2019-04-07 | 2020-04-06 | Secured device, secured method, secured system, and secured apparatus |
TW109111542A TWI733399B (en) | 2019-04-07 | 2020-04-06 | Secured device, secured method, secured system, and secured apparatus |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109111542A TWI733399B (en) | 2019-04-07 | 2020-04-06 | Secured device, secured method, secured system, and secured apparatus |
Country Status (3)
Country | Link |
---|---|
JP (1) | JP7033383B2 (en) |
CN (1) | CN111797440B (en) |
TW (2) | TWI751962B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113037506A (en) * | 2021-02-25 | 2021-06-25 | 山东英信计算机技术有限公司 | Interface switching control method, device, equipment and computer readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060107032A1 (en) * | 2004-11-17 | 2006-05-18 | Paaske Timothy R | Secure code execution using external memory |
TW201015323A (en) * | 2008-08-26 | 2010-04-16 | Atmel Corp | Secure information processing |
US7949866B2 (en) * | 2002-11-18 | 2011-05-24 | Arm Limited | Exception types within a secure processing system |
CN102819699A (en) * | 2012-06-04 | 2012-12-12 | 珠海欧比特控制工程股份有限公司 | Processor system |
TWI489378B (en) * | 2008-05-24 | 2015-06-21 | Via Tech Inc | Apparatus and method for precluding execution of certain instructions in a secure execution mode microprocessor |
Family Cites Families (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2686170B1 (en) * | 1992-01-14 | 1996-09-06 | Gemplus Card Int | MASS MEMORY CARD FOR MICROCOMPUTER. |
US6088450A (en) * | 1996-04-17 | 2000-07-11 | Intel Corporation | Authentication system based on periodic challenge/response protocol |
JPH10143436A (en) * | 1996-11-08 | 1998-05-29 | Hitachi Ltd | Security controller |
JP2005182525A (en) * | 2003-12-19 | 2005-07-07 | Fujitsu Ltd | Storage device |
US7664965B2 (en) * | 2004-04-29 | 2010-02-16 | International Business Machines Corporation | Method and system for bootstrapping a trusted server having redundant trusted platform modules |
US20060059360A1 (en) * | 2004-07-01 | 2006-03-16 | Ortkiese Jerry B | Authenticating controller |
JP2006338615A (en) * | 2005-06-06 | 2006-12-14 | Renesas Technology Corp | Data communication system |
US8886955B2 (en) * | 2007-03-28 | 2014-11-11 | Nuvoton Technology Corporation | Systems and methods for BIOS processing |
CN101329631B (en) * | 2007-06-21 | 2011-03-16 | 大唐移动通信设备有限公司 | Method and apparatus for automatically detecting and recovering start-up of embedded system |
GB2460275B (en) * | 2008-05-23 | 2012-12-19 | Exacttrak Ltd | A Communications and Security Device |
KR101122697B1 (en) * | 2008-12-22 | 2012-03-09 | 한국전자통신연구원 | Method and system to prevent Data leakage using Content Inspection based USB Memory Device |
WO2014175861A1 (en) * | 2013-04-23 | 2014-10-30 | Hewlett-Packard Development Company, L.P. | Recovering from compromised system boot code |
JP5612158B1 (en) * | 2013-05-07 | 2014-10-22 | 山洋電気株式会社 | Master-slave communication device and communication method thereof |
US20140366131A1 (en) * | 2013-06-07 | 2014-12-11 | Andes Technology Corporation | Secure bus system |
US9892077B2 (en) * | 2013-10-07 | 2018-02-13 | Qualcomm Incorporated | Camera control interface slave device to slave device communication |
JP6267596B2 (en) * | 2014-07-14 | 2018-01-24 | 国立大学法人名古屋大学 | Communication system, communication control apparatus, and unauthorized information transmission prevention method |
US10303880B2 (en) * | 2014-07-24 | 2019-05-28 | Nuvoton Technology Corporation | Security device having indirect access to external non-volatile memory |
CN106156632B (en) * | 2015-05-17 | 2019-10-29 | 新唐科技股份有限公司 | Safety device and method of the security service to host, safety equipment are provided in it |
US10095891B2 (en) * | 2015-06-08 | 2018-10-09 | Nuvoton Technology Corporation | Secure access to peripheral devices over a bus |
US9921915B2 (en) * | 2015-10-16 | 2018-03-20 | Quanta Computer Inc. | Baseboard management controller recovery |
JP6559619B2 (en) * | 2016-07-06 | 2019-08-14 | 日本電信電話株式会社 | COMMUNICATION SYSTEM, COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM |
JP6740789B2 (en) * | 2016-08-03 | 2020-08-19 | 富士通株式会社 | Storage control device and storage device management program |
TW201818253A (en) * | 2016-11-11 | 2018-05-16 | 英業達股份有限公司 | Detection system and detection method |
-
2020
- 2020-04-06 TW TW110124963A patent/TWI751962B/en active
- 2020-04-06 TW TW109111542A patent/TWI733399B/en active
- 2020-04-07 JP JP2020069117A patent/JP7033383B2/en active Active
- 2020-04-07 CN CN202010266082.XA patent/CN111797440B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7949866B2 (en) * | 2002-11-18 | 2011-05-24 | Arm Limited | Exception types within a secure processing system |
US20060107032A1 (en) * | 2004-11-17 | 2006-05-18 | Paaske Timothy R | Secure code execution using external memory |
TWI489378B (en) * | 2008-05-24 | 2015-06-21 | Via Tech Inc | Apparatus and method for precluding execution of certain instructions in a secure execution mode microprocessor |
TW201015323A (en) * | 2008-08-26 | 2010-04-16 | Atmel Corp | Secure information processing |
CN102819699A (en) * | 2012-06-04 | 2012-12-12 | 珠海欧比特控制工程股份有限公司 | Processor system |
Also Published As
Publication number | Publication date |
---|---|
TW202103037A (en) | 2021-01-16 |
JP2020177661A (en) | 2020-10-29 |
TW202139040A (en) | 2021-10-16 |
JP7033383B2 (en) | 2022-03-10 |
CN111797440A (en) | 2020-10-20 |
TWI733399B (en) | 2021-07-11 |
CN111797440B (en) | 2023-05-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10783250B2 (en) | Secured master-mediated transactions between slave devices using bus monitoring | |
US8838950B2 (en) | Security architecture for system on chip | |
TWI632483B (en) | Security device and method of providing security service to host therein, security apparatus and computer software product | |
JP5153887B2 (en) | Method and apparatus for transfer of secure operating mode access privileges from a processor to a peripheral device | |
US10846438B2 (en) | RPMC flash emulation | |
EP3928199B1 (en) | Hybrid firmware code protection | |
EP3329416B1 (en) | Secure input/output device management | |
US12001689B2 (en) | Transparently attached flash memory security | |
US20230342472A1 (en) | Computer System, Trusted Function Component, and Running Method | |
TWI751962B (en) | Secured device, secured method, secured system, and secured apparatus | |
US10592663B2 (en) | Technologies for USB controller state integrity protection | |
JP7293163B2 (en) | CONTROLLER HAVING FLASH EMULATION FUNCTION AND CONTROL METHOD | |
JP7005676B2 (en) | Safety devices and safety methods for monitoring system startup | |
JP7079558B2 (en) | Safety device for SPI flash | |
US11734457B2 (en) | Technology for controlling access to processor debug features |