Nothing Special   »   [go: up one dir, main page]

TW201818258A - Data storage method utilized in non-volatile storage space in integrated circuit, and trusted integrated circuit - Google Patents

Data storage method utilized in non-volatile storage space in integrated circuit, and trusted integrated circuit Download PDF

Info

Publication number
TW201818258A
TW201818258A TW106127335A TW106127335A TW201818258A TW 201818258 A TW201818258 A TW 201818258A TW 106127335 A TW106127335 A TW 106127335A TW 106127335 A TW106127335 A TW 106127335A TW 201818258 A TW201818258 A TW 201818258A
Authority
TW
Taiwan
Prior art keywords
data
owner
space
chip
address range
Prior art date
Application number
TW106127335A
Other languages
Chinese (zh)
Inventor
付穎芳
Original Assignee
香港商阿里巴巴集團服務有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 香港商阿里巴巴集團服務有限公司 filed Critical 香港商阿里巴巴集團服務有限公司
Publication of TW201818258A publication Critical patent/TW201818258A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting 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
    • G06F21/79Protecting 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 in semiconductor storage media, e.g. directly-addressable memories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)

Abstract

A data storage method utilized in a non-volatile storage space in an integrated circuit (IC), and a trusted integrated circuit. The data storage method comprises: creating, in the integrated circuit, the non-volatile storage space; wherein the non-volatile storage space has attributes including a parameter representing storage of owner data in the non-volatile storage space, and a storage address range of the owner data; and the storage address range of the owner data represents a maximum data length allowable for requesting data from the integrated circuit. The method resolves a technical issue in the prior art in which when reading, from a non-volatile space of a trusted IC, the raw data, the read raw data has low accuracy.

Description

晶片中非易失性儲存空間的資料儲存方法和可信晶片    Data storage method for non-volatile storage space in chip and trusted chip   

本發明涉及資料儲存領域,具體而言,涉及一種晶片中非易失性儲存空間的資料儲存方法和可信晶片。 The present invention relates to the field of data storage, and in particular, to a data storage method for a nonvolatile storage space in a chip and a trusted chip.

使用者可以在可信安全晶片中創建非易失空間,可以為非易失空間賦予如表1所示的屬性: Users can create non-volatile space in the trusted security chip, and can assign the attributes shown in Table 1 to the non-volatile space:     

圖1示出了根據現有技術的一種使用者獲取非易失空間資料的互動示意圖,如圖1所示,具體包括如下步驟:(1)屬主C向可信晶片T發起存取非易失空間請求;(2)可信晶片T響應屬主C請求,要求其反饋密碼、非易失空間編號以及資料長度;(3)屬主C回傳密碼、要存取的非易失空間編號、非易失資料長度給可信晶片T;(4)可信晶片T驗證密碼和非易失空間索引編號的正 確性,以及非易失空間的資料長度L是否滿足下式:L|Last_adress-First_adress| (1) FIG. 1 shows a schematic diagram of an interaction of a user to obtain non-volatile space data according to the prior art. As shown in FIG. 1, it specifically includes the following steps: (1) The owner C initiates access to the non-volatile chip T to access the non-volatile space T Space request; (2) the trusted chip T responds to the request of the owner C, asking it to feedback the password, the non-volatile space number, and the data length; (3) the owner C returns the password, the non-volatile space number to be accessed, The non-volatile data length is given to the trusted chip T; (4) The trusted chip T verifies the correctness of the password and the index number of the non-volatile space, and whether the data length L of the non-volatile space satisfies the following formula: L | Last_adress-First_adress | (1)

上式中,First_adress表示非易失空間初始實體位址,Last_adress表示非易失空間末位實體位址。 In the above formula, First_adress represents the initial physical address of the non-volatile space, and Last_adress represents the last physical address of the non-volatile space.

如果密碼和非易失空間編號正確,其獲取的資料長度L也滿足公式(1),則可信晶片返回屬主C要存取的資料,流程結束。否則,直接終止流程。 If the password and the non-volatile space number are correct, and the data length L obtained by it also satisfies formula (1), the trusted chip returns the data to be accessed by the owner C, and the process ends. Otherwise, the process is terminated directly.

現有國際TCG標準安全晶片規範了可信安全晶片的非易失空間的固定大小、存取授權,該規範中其狀態標識資料預設為0,容易與屬主資料0相混淆,導致使用者獲取資料時,獲取到的部分資料可能是狀態標識資料0,而非使用者真正儲存的資料0。例如,屬主C申請了6位元組的非易失空間,其存放了4個位元組的資料,如表2所示:屬主空間編號為1,屬主名稱為C,屬主空間編號對應的非易失空間的大小為6位元組,即資料長度最大可為6位元組,其對應的實體位址為FFFFF0~FFFFF6,在其實體位址中存放了4位元組,屬主寫入的資料為“1101”,TCG標準預設沒有寫入資料的兩位元組為00,即屬主資料為1101 00 (加粗斜體的數字表示狀態資料,不加粗的數字表示屬主資料,如表1所示的屬主資料)。 The existing international TCG standard security chip regulates the fixed size and access authorization of the non-volatile space of the trusted security chip. In this specification, the status identification data is preset to 0, which is easy to be confused with the owner data 0, resulting in user access. In the case of data, some of the obtained data may be the status identification data 0, rather than the data 0 actually stored by the user. For example, owner C applies for a 6-byte non-volatile space that stores 4 bytes of data, as shown in Table 2: the owner space number is 1, the owner name is C, and the owner space The size of the corresponding non-volatile space is 6 bytes, that is, the data length can be up to 6 bytes. The corresponding physical address is FFFFF0 ~ FFFFF6, and 4 bytes are stored in its physical address. The main written data is "1101". The TCG standard presets the two-byte tuple without written data as 00, that is, the master data is 1101 00 (Bold italic numbers indicate status data, non-bold numbers indicate Owner profile, as shown in Table 1).

當儲存資料較長,且經常變更時,屬主C不一定能記住自己存了多長,且存了什麼資料,比如當屬主C並當屬主向使用者獲取資料長度5時,且響應可信晶片要求反饋的資訊:使用者輸入正確的密碼****,Nv_index編號1,可信晶片接到資訊後,驗證密碼和Nv索引編號的正確性,也驗證其長度5<6,是其可允許的範圍內,因此返回給屬主C資料長度為1101 0 ,這樣屬主C的原始資料由1101變成了1101 0 ,造成了資料的錯誤。 When the stored data is long and frequently changed, the owner C may not be able to remember how long and what data he has stored, such as when the owner C and the owner obtain the data length 5 from the user, and Respond to the information requested by the trusted chip: the user enters the correct password ****, Nv_index number 1, after receiving the information, the trusted chip verifies the correctness of the password and the NV index number, and also verifies its length 5 <6, It is within the allowable range, so the length of the data returned to the owner C is 1101 0. In this way, the original data of the owner C has been changed from 1101 to 1101 0 , causing data errors.

針對上述現有技術從可信安全晶片的非易失空間中讀取原始資料時,讀取到的原始資料準確性差的技術問題,目前尚未提出有效的解決方案。 Aiming at the technical problem that the original data read from the non-volatile space of the trusted security chip in the prior art is poor in accuracy, no effective solution has been proposed at present.

本發明實施例提供了一種晶片中非易失性儲存空間的資料儲存方法和可信晶片,以至少解決現有技術從可信安全晶片的非易失空間中讀取原始資料時,讀取到的原始資料準確性差的技術問題。 An embodiment of the present invention provides a data storage method for a non-volatile storage space in a chip and a trusted chip, so as to at least solve the problem in the prior art when reading original data from the non-volatile space of a trusted security chip. Technical issues with poor accuracy of the original data.

根據本發明實施例的一個方面,提供了一種晶片中非易失性儲存空間的資料儲存方法,包括:在晶片中創建非易失性儲存空間,其中,非易失性儲存空間的屬性至少包 括:用於表徵在非易失性儲存空間中儲存屬主資料的參數,屬主資料的儲存位址範圍;其中,屬主資料的儲存位址範圍用於表徵允許向晶片請求資料時的最大資料長度。 According to an aspect of an embodiment of the present invention, a data storage method for a non-volatile storage space in a chip is provided, including: creating a non-volatile storage space in a chip, wherein the attributes of the non-volatile storage space include at least : Parameters used to characterize the storage of owner data in non-volatile storage space, the storage address range of the owner data; among them, the storage address range of the owner data is used to characterize the largest data when data is allowed to be requested from the chip length.

根據本發明實施例的另一方面,還提供了一種獲取儲存在晶片中的資料的方法,包括:接收用於存取晶片的非易失性儲存空間的存取請求;響應存取請求,得到驗證資訊和需要請求的資料長度;在驗證驗證資訊通過的情況下,判斷需要請求的資料長度是否處於非易失性儲存空間中預先設置的屬主資料的儲存位址範圍之內;如果需要請求的資料長度處於屬主資料的儲存位址範圍之內,則允許返回屬主資料的內容;其中,屬主資料的儲存位址範圍用於表徵允許向晶片請求資料時的最大資料長度。 According to another aspect of the embodiments of the present invention, a method for acquiring data stored in a chip is also provided, including: receiving an access request for accessing a non-volatile storage space of the chip; responding to the access request, obtaining Verification information and required data length; In the case of verification verification information, determine whether the required data length is within the storage address range of the owner data preset in the non-volatile storage space; if required, If the length of the data is within the storage address range of the owner data, the content of the owner data is allowed to be returned. Among them, the storage address range of the owner data is used to characterize the maximum data length when data is requested from the chip.

根據本發明實施例的另一方面,還提供了一種可信晶片,包括:記憶體,包括非易失性儲存空間,其中,非易失性儲存空間的屬性至少包括:用於表徵在非易失性儲存空間中儲存屬主資料的參數,屬主資料的儲存位址範圍;其中,屬主資料的儲存位址範圍用於表徵允許向晶片請求資料時的最大資料長度。 According to another aspect of the embodiments of the present invention, a trusted chip is further provided, including: a memory, including a non-volatile storage space, wherein the attributes of the non-volatile storage space at least include: The parameters of the owner data stored in the volatile storage space are the storage address range of the owner data. The storage address range of the owner data is used to represent the maximum data length when the data is allowed to be requested from the chip.

根據本發明實施例的另一方面,還提供了一種獲取儲存在晶片中的資料的系統,包括:存取設備端,用於發出用於存取晶片的非易失性儲存空間的存取請求;可信晶片,與存取設備端通訊,用於響應存取請求,獲取存取設備端返回的驗證資訊和需要請求的資料長度,在驗證驗證資訊通過的情況下,如果需要請求的資料長度處於屬主 資料的儲存位址範圍之內,則允許返回屬主資料的內容;其中,屬主資料的儲存位址範圍用於表徵允許向晶片請求資料時的最大資料長度。 According to another aspect of the embodiments of the present invention, a system for acquiring data stored in a chip is also provided, including: an access device end for issuing an access request for accessing a non-volatile storage space of the chip The trusted chip communicates with the access device to respond to the access request and obtain the authentication information returned by the access device and the required data length. If the authentication information passes, the required data length is required. Within the storage address range of the owner data, it is allowed to return the content of the owner data; among them, the storage address range of the owner data is used to characterize the maximum data length when the data is allowed to be requested from the chip.

根據本發明實施例的另一方面,還提供了一種獲取儲存在晶片中的資料的裝置,包括:接收模組,用於接收用於存取晶片的非易失性儲存空間的存取請求;響應模組,用於響應存取請求,得到驗證資訊和需要請求的資料長度;判斷模組,用於在驗證驗證資訊通過的情況下,判斷需要請求的資料長度是否處於非易失性儲存空間中預先設置的屬主資料的儲存位址範圍之內;控制模組,用於如果需要請求的資料長度處於屬主資料的儲存位址範圍之內,則允許返回屬主資料的內容;其中,屬主資料的儲存位址範圍用於表徵允許向晶片請求資料時的最大資料長度。 According to another aspect of the embodiments of the present invention, a device for acquiring data stored in a chip is further provided, including: a receiving module for receiving an access request for accessing a non-volatile storage space of the chip; The response module is used to respond to the access request to obtain the verification information and the required data length; the judgment module is used to determine whether the required data length is in the non-volatile storage space when the verification information is passed Within the storage address range of the owner data set in advance; a control module for allowing the content of the owner data to be returned if the length of the requested data is within the storage address range of the owner data; among them, The storage address range of the owner data is used to characterize the maximum data length when data is allowed to be requested from the chip.

在本發明實施例中,採用限定屬主資料的儲存位址範圍的方式,透過在晶片中創建非易失儲存空間之後,向非易失性儲存空間寫入屬主資料,並根據屬主資料的大小確定屬主資料的儲存位址範圍,根據屬主資料的大小和屬主資料的儲存位址範圍返回屬主需要獲取的資料,達到了準確獲取屬主資料的目的,從而實現了保證屬主獲取原始資料的正確性的技術效果,進而解決了現有技術從可信安全晶片的非易失空間中讀取原始資料時,讀取到的原始資料準確性差的技術問題。 In the embodiment of the present invention, the method of limiting the storage address range of the owner data is adopted. After the nonvolatile storage space is created in the chip, the owner data is written into the nonvolatile storage space, and according to the owner data, The size determines the storage address range of the owner's data, and returns the data that the owner needs to obtain according to the size of the owner's data and the storage address range of the owner's data. The purpose of accurately obtaining the owner's data is achieved, thereby ensuring the ownership. The main technical effect of obtaining the correctness of the original data, thereby solving the technical problem of poor accuracy of the read original data when the original technology reads the original data from the non-volatile space of the trusted security chip.

10‧‧‧電腦終端 10‧‧‧Computer Terminal

102a~102n‧‧‧處理器 102a ~ 102n‧‧‧Processor

104‧‧‧記憶體 104‧‧‧Memory

801‧‧‧記憶體 801‧‧‧Memory

901‧‧‧存取設備端 901‧‧‧Access device side

903‧‧‧可信晶片 903‧‧‧trusted chip

1001‧‧‧接收模組 1001‧‧‧Receiving module

1003‧‧‧響應模組 1003‧‧‧ Response Module

1005‧‧‧判斷模組 1005‧‧‧Judgment Module

1007‧‧‧控制模組 1007‧‧‧Control Module

1009‧‧‧寫入模組 1009‧‧‧write module

1101‧‧‧記憶體 1101‧‧‧Memory

1103‧‧‧處理器 1103‧‧‧Processor

S302~S304‧‧‧步驟 S302 ~ S304‧‧‧ steps

S502~S508‧‧‧步驟 S502 ~ S508‧‧‧step

S702~S708‧‧‧步驟 S702 ~ S708‧‧‧step

此處所說明的圖式用來提供對本發明的進一步理解,構成本申請的一部分,本發明的示意性實施例及其說明用於解釋本發明,並不構成對本發明的不當限定。在圖式中:圖1是根據現有技術的一種使用者獲取非易失空間資料的互動示意圖;圖2是根據本發明實施例的一種可選的電腦終端的硬體結構方塊圖;圖3是根據本發明實施例的一種晶片中非易失性儲存空間的資料儲存方法流程圖;圖4是根據本發明實施例的一種可選的晶片中非易失性儲存空間的資料儲存方法流程圖;圖5是根據本發明實施例的一種可選的存取非易失性儲存空間的屬主資料的方法流程圖;圖6是根據本發明實施例的一種可選的TCG信任鏈的結構示意圖;圖7是根據本發明實施例的一種獲取儲存在晶片中的資料的方法流程圖;圖8是根據本發明實施例的一種可信晶片的結構示意圖;圖9是根據本發明實施例的一種獲取儲存在晶片中的資料的系統結構示意圖;圖10是根據本發明實施例的一種獲取儲存在晶片中的資料的裝置結構示意圖;以及 圖11是根據本發明實施例的一種可選的電腦終端的結構方塊圖。 The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present application. The schematic embodiments of the present invention and the descriptions thereof are used to explain the present invention, and do not constitute an improper limitation on the present invention. In the drawings: FIG. 1 is a schematic diagram of the interaction of a user to obtain non-volatile space data according to the prior art; FIG. 2 is a block diagram of the hardware structure of an optional computer terminal according to an embodiment of the present invention; FIG. 3 is A flowchart of a method for storing data in a non-volatile storage space in a chip according to an embodiment of the present invention; FIG. 4 is a flowchart of a method for storing data in a non-volatile storage space in a chip according to an embodiment of the present invention; 5 is a flowchart of an optional method for accessing owner data of a non-volatile storage space according to an embodiment of the present invention; FIG. 6 is a schematic structural diagram of an optional TCG trust chain according to an embodiment of the present invention; 7 is a flowchart of a method for acquiring data stored in a wafer according to an embodiment of the present invention; FIG. 8 is a schematic structural diagram of a trusted wafer according to an embodiment of the present invention; FIG. 9 is an acquisition according to an embodiment of the present invention FIG. 10 is a schematic structural diagram of a device for acquiring data stored in a wafer according to an embodiment of the present invention; and FIG. 11 is a diagram illustrating a root system. Block diagram showing the computer terminal of an alternative embodiment of the present invention.

為了使本技術領域的人員更好地理解本發明方案,下面將結合本發明實施例中的圖式,對本發明實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本發明一部分的實施例,而不是全部的實施例。基於本發明中的實施例,本領域具有通常知識者在沒有做出創造性勞動前提下所獲得的所有其他實施例,都應當屬於本發明保護的範圍。 In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be described clearly and completely in combination with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only The embodiments are part of the present invention, but not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those with ordinary knowledge in the art without making creative work should fall within the protection scope of the present invention.

需要說明的是,本發明的說明書和申請專利範圍及上述圖式中的術語“第一”、“第二”等是用於區別類似的對象,而不必用於描述特定的順序或先後次序。應該理解這樣使用的資料在適當情況下可以互換,以便這裡描述的本發明的實施例能夠以除了在這裡圖示或描述的那些以外的順序實施。此外,術語“包括”和“具有”以及他們的任何變形,意圖在於覆蓋不排他的包含,例如,包含了一系列步驟或單元的過程、方法、系統、產品或設備不必限於清楚地列出的那些步驟或單元,而是可包括沒有清楚地列出的或對於這些過程、方法、產品或設備固有的其它步驟或單元。 It should be noted that the terms “first” and “second” in the scope of the description and patent application of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the materials used as such are interchangeable under appropriate circumstances so that the embodiments of the invention described herein can be implemented in an order other than those illustrated or described herein. Furthermore, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units need not be limited to those explicitly listed Those steps or units may instead include other steps or units not explicitly listed or inherent to these processes, methods, products or equipment.

首先,在對本申請實施例進行描述的過程中出現的部分名詞或術語適用於如下解釋: 非易失儲存(Non-volatile memory,簡稱為Nv),作為一種儲存技術,其可以保證在設備掉電的時候,設備中儲存的資料不會丟失,常用來保護使用者非常敏感的資料。 First of all, some terms or terms appearing during the description of the embodiments of this application are applicable to the following explanations: Non-volatile memory (Non-volatile memory, referred to as Nv), as a storage technology, it can ensure that the device is powered off. When data is stored in the device, it will not be lost, which is often used to protect users' very sensitive data.

屬主資料,指使用者向儲存設備中儲存的資料,其中,屬主指對資料進行操作的主體。 Owner data refers to the data stored in the storage device by the user, and the owner refers to the subject that operates the data.

可信,指一個實體一直以一種可預期的方式為特定的目標運行。 Trustworthy means that an entity has been operating for a specific purpose in a predictable manner.

可信計算(Trusted computing),是在計算和通訊系統中廣泛使用的基於硬體安全模組支持下的可信計算平臺,使用該可信計算平臺可以提高系統整體的安全性。其核心機制是透過信任鏈機制構建可信計算環境。 Trusted computing is a trusted computing platform supported by hardware security modules that is widely used in computing and communication systems. Using this trusted computing platform can improve the overall security of the system. Its core mechanism is to build a trusted computing environment through a chain of trust mechanism.

可信安全晶片,是一種具有產生加解密密鑰功能的晶片,可信安全晶片也能夠進行高速的資料加密和解密,以及充當保護基本輸入輸出系統和操作系統不被修改的輔助處理器。 The trusted security chip is a chip with the function of generating encryption and decryption keys. The trusted security chip can also perform high-speed data encryption and decryption, and act as an auxiliary processor to protect the basic input and output system and operating system from being modified.

實施例1Example 1

根據本發明實施例,還提供了一種晶片中非易失性儲存空間的資料儲存方法的方法實施例。 According to an embodiment of the present invention, a method embodiment of a data storage method for a non-volatile storage space in a chip is also provided.

本申請實施例1所提供的方法實施例可以在移動終端、電腦終端或者類似的運算裝置中執行。圖2示出了一種用於實現晶片中非易失性儲存空間的資料儲存方法的電腦終端(或移動設備)的硬體結構方塊圖。如圖2所示, 電腦終端10(或移動設備10)可以包括一個或多個(圖中採用102a、102b,......,102n來示出)處理器102(處理器102可以包括但不限於微處理器MCU或可編程邏輯器件FPGA等的處理裝置)、用於儲存資料的記憶體104、以及用於通訊功能的傳輸模組4。除此以外,還可以包括:顯示器、輸入/輸出介面(I/O介面)、通用序列匯流排(USB)通訊埠(可以作為I/O介面的通訊埠中的一個通訊埠被包括)、網路介面、電源和/或相機。本領域具有通常知識者可以理解,圖2所示的結構僅為示意,其並不對上述電子裝置的結構造成限定。例如,電腦終端10還可包括比圖2中所示更多或者更少的組件,或者具有與圖2所示不同的配置。 The method embodiments provided in Embodiment 1 of this application may be executed in a mobile terminal, a computer terminal, or a similar computing device. FIG. 2 shows a block diagram of a hardware structure of a computer terminal (or mobile device) for implementing a data storage method of a non-volatile storage space in a chip. As shown in FIG. 2, the computer terminal 10 (or the mobile device 10) may include one or more (shown by 102a, 102b, ..., 102n in the figure) a processor 102 (the processor 102 may include It is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 4 for communication functions. In addition, it can also include: display, input / output interface (I / O interface), universal serial bus (USB) communication port (can be included as one of the communication ports of the I / O interface), network Interface, power supply and / or camera. Those skilled in the art can understand that the structure shown in FIG. 2 is only a schematic diagram, and does not limit the structure of the electronic device. For example, the computer terminal 10 may further include more or fewer components than those shown in FIG. 2, or have a configuration different from that shown in FIG. 2.

應當注意到的是上述一個或多個處理器102和/或其他資料處理電路在本文中通常可以被稱為“資料處理電路”。該資料處理電路可以全部或部分的體現為軟體、硬體、韌體或其他任意組合。此外,資料處理電路可為單個獨立的處理模組,或全部或部分的結合到電腦終端10(或移動設備)中的其他元件中的任意一個內。如本申請實施例中所涉及到的,該資料處理電路作為一種處理器控制(例如與介面連接的可變電阻終端路徑的選擇)。 It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits." The data processing circuit may be fully or partially embodied as software, hardware, firmware, or any other combination. In addition, the data processing circuit may be a single independent processing module, or all or part of the data processing circuit may be incorporated into any one of the other components in the computer terminal 10 (or mobile device). As mentioned in the embodiment of the present application, the data processing circuit is controlled as a processor (for example, selection of a variable resistance terminal path connected to an interface).

記憶體104可用於儲存應用軟體的軟體程式以及模組,如本發明實施例中的晶片中非易失性儲存空間的資料儲存方法對應的程式指令/資料儲存裝置,處理器102透過運行儲存在記憶體104內的軟體程式以及模組,從而執 行各種功能應用以及資料處理,即實現上述的應用程式的漏洞檢測方法。記憶體104可包括高速隨機記憶體,還可包括非易失性記憶體,如一個或者多個磁性儲存裝置、快閃記憶體、或者其他非易失性固態記憶體。在一些實例中,記憶體104可進一步包括相對於處理器102遠端設置的記憶體,這些遠端記憶體可以透過網路連接至電腦終端10。上述網路的實例包括但不限於互聯網、企業內部網、局域網、移動通訊網及其組合。 The memory 104 may be used to store software programs and modules of application software, such as a program instruction / data storage device corresponding to a data storage method of a non-volatile storage space in a chip in the embodiment of the present invention. The software programs and modules in the memory 104 execute various functional applications and data processing, that is, implement the above-mentioned application program's vulnerability detection method. The memory 104 may include high-speed random access memory, and may further include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely disposed relative to the processor 102, and these remote memories may be connected to the computer terminal 10 through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

此處需要說明的是,在一些可選實施例中,上述圖2所示的電腦設備(或移動設備)可以包括硬體元件(包括電路)、軟體元件(包括儲存在電腦可讀媒體上的電腦代碼)、或硬體元件和軟體元件兩者的結合。應當指出的是,圖2僅為特定具體實例的一個實例,並且旨在示出可存在於上述電腦設備(或移動設備)中的部件的類型。 What needs to be explained here is that in some optional embodiments, the computer device (or mobile device) shown in FIG. 2 described above may include hardware components (including circuits) and software components (including those stored on computer-readable media). Computer code), or a combination of hardware and software components. It should be noted that FIG. 2 is only one example of a specific specific example, and is intended to illustrate the types of components that may be present in the computer device (or mobile device) described above.

在上述運行環境下,本申請提供了如圖3所示的晶片中非易失性儲存空間的資料儲存方法。圖3是根據本發明實施例1的晶片中非易失性儲存空間的資料儲存方法的流程圖,包括如下步驟: Under the above-mentioned operating environment, the present application provides a data storage method for a non-volatile storage space in a chip as shown in FIG. 3. 3 is a flowchart of a method for storing data in a non-volatile storage space in a chip according to Embodiment 1 of the present invention, including the following steps:

步驟S302,在晶片中創建非易失性儲存空間,其中,非易失性儲存空間的屬性至少包括:用於表徵在非易失性儲存空間中儲存屬主資料的參數,屬主資料的儲存位址範圍;其中,屬主資料的儲存位址範圍用於表徵允許向晶片請求資料時的最大資料長度。 Step S302, a non-volatile storage space is created in the chip, wherein the attributes of the non-volatile storage space include at least: parameters for characterizing the storage of the owner data in the non-volatile storage space, and the storage of the owner data Address range; where the storage address range of the owner data is used to characterize the maximum data length when data is allowed to be requested from the chip.

在上述步驟S302所限定的技術方案中,上述非易失 儲存空間的儲存模式可以採用大端模式和小端模式,大端模式是指資料的高位元組保存在內部記憶體的低位址中,而資料的低位元組保存在內部記憶體的高位址中;而小端模式是指資料的高位元組保存在內部記憶體的高位址中,而資料的低位元組保存在內在的低位址中,該儲存模式可以將位址的高低和資料的位權有效結合起來,高位址部分資料的權值高,低位址部分資料的權值低。 In the technical solution defined in the above step S302, the storage mode of the non-volatile storage space may adopt a big-endian mode and a little-endian mode. The big-endian mode means that the high byte of data is stored in the low address of the internal memory. The low byte of the data is stored in the high address of the internal memory; the little-endian mode means that the high byte of the data is stored in the high address of the internal memory and the low byte of the data is stored in the internal low address This storage mode can effectively combine the height of the address with the bit weight of the data. The weight of the data at the high address is high, and the weight of the data at the low address is low.

需要說明的是,非易失性儲存空間的屬性之一屬主資料為使用者存入到非易失性儲存空間的資料,例如,使用者儲存的資料為“1101”,則該資料即為儲存到非易失性儲存空間的屬主資料;非易失性儲存空間的另一個屬性屬主資料的儲存位址範圍的長度為允許使用者讀取非易失性儲存空間的最大資料長度,例如,屬主資料的儲存位址範圍為:FFFFF0~FFFFF6,則允許使用者向晶片請求資料時的最大資料長度為7。此外,在晶片中創建非易失性儲存空間可以保證在設備掉電時,儲存在晶片中的資料不會丟失,從而可以用來儲存比較重要的資料。 It should be noted that one of the owner data of the non-volatile storage space is the data stored in the non-volatile storage space by the user. For example, if the data stored by the user is "1101", the data is Owner data stored in non-volatile storage space; another attribute of non-volatile storage space is the length of the storage address range of the owner data is the maximum data length that allows users to read the non-volatile storage space, For example, the storage address range of the owner data is: FFFFF0 ~ FFFFF6. The maximum data length when the user is allowed to request data from the chip is 7. In addition, the creation of non-volatile storage space in the chip can ensure that the data stored in the chip will not be lost when the device is powered off, so it can be used to store more important data.

基於上述實施例步驟S302所公開的方案中,可以獲知在晶片中創建非易失性儲存空間,可以保證使用者儲存在晶片中的資料在設備掉電時,不會丟失,進而提高了資料儲存的安全性。 Based on the solution disclosed in step S302 of the above embodiment, it can be learned that a non-volatile storage space is created in the chip, which can ensure that the data stored by the user will not be lost when the device is powered off, thereby improving data storage. Security.

可選的,非易失性儲存空間的屬性至少還包括如下至少之一:空間編號、空間屬主名稱、空間授權密碼、空間大小和空間實體位址範圍。 Optionally, the attributes of the non-volatile storage space further include at least one of the following: space number, space owner name, space authorization password, space size, and space entity address range.

在一種可選的實施例中,表3為已經寫入屬主資料的非易失性儲存空間的屬性表,如表3所示。 In an optional embodiment, Table 3 is an attribute table of the non-volatile storage space in which the owner data has been written, as shown in Table 3.

在表3中,屬主的空間編號為1,空間屬主名稱為C,屬主空間編號為1的屬主空間大小為6位元組,即資料長度最大可為6位元組,其對應的空間實體位址範圍為FFFFF0~FFFFF6,在其實體位址中存放了4位元組,其儲存位址範圍為FFFFF1~FFFFF4,寫入的屬主資料為“1101”。 In Table 3, the owner space number is 1, the space owner name is C, and the owner space number is 1. The owner space size is 6 bytes, that is, the data length can be up to 6 bytes, which corresponds to The space physical address range is FFFFF0 ~ FFFFF6, and 4 bytes are stored in its physical address. The storage address range is FFFFF1 ~ FFFFF4, and the owner data written is "1101".

可選的,圖4示出了在晶片中創建非易失性儲存空間之後,晶片中非易失性儲存空間的資料儲存方法的流程示意圖,如圖4所示,該方法還包括如下步驟: Optionally, FIG. 4 shows a flowchart of a method for storing data in a non-volatile storage space in a chip after the non-volatile storage space is created in the chip. As shown in FIG. 4, the method further includes the following steps:

步驟S304,向非易失性儲存空間寫入屬主資料,並根據屬主資料的大小確定屬主資料的儲存位址範圍,其中,透過屬主資料的資料塊的初始儲存位址和末尾儲存位址來確定儲存位址範圍。 In step S304, the owner data is written into the non-volatile storage space, and the storage address range of the owner data is determined according to the size of the owner data. The initial storage address and the end storage of the data block of the owner data are determined. Address to determine the storage address range.

在一種可選的實施例中,在屬主資料的儲存模式為小端模式的情況下,假設屬主資料的大小為L,屬主資料的 資料塊的初始儲存位址,即屬主資料的低位元組所在的內部記憶體位址為Min_adress,屬主資料的資料塊的末尾儲存位址,即屬主資料的高位元組所在的內部記憶體位址為Max_adress,則L、Min_adress和Max_adress滿足下式:L|Max_adress-Min-adress| (2) In an optional embodiment, when the storage mode of the owner data is a little-endian mode, assuming that the size of the owner data is L, the initial storage address of the data block of the owner data, that is, the owner data The internal memory address where the low byte is located is Min_adress, and the storage address at the end of the data block belonging to the owner data, that is, the internal memory address where the high byte of the owner data is located is Max_adress. : L | Max_adress-Min-adress | (2)

因此,根據屬主資料的大小L以及屬主資料的初始儲存位址Min_adress可以確定屬主資料的末尾位址Max_adress,進而可以確定屬主資料的儲存位址範圍。例如,向非易失性儲存空間寫入的屬主資料為“1101”,該屬主資料的大小為4位元組,則該屬主資料的儲存位址範圍的長度也為4位元組,如果此時屬主資料的初始儲存位址為FFFFF1,則該屬主資料的末尾位址為FFFFF4,屬主資料的資料塊的儲存位址範圍為FFFFF1~FFFFF4。 Therefore, according to the size L of the owner data and the initial storage address Min_adress of the owner data, the last address Max_adress of the owner data can be determined, and the storage address range of the owner data can be determined. For example, if the owner data written to the non-volatile storage space is "1101" and the size of the owner data is 4 bytes, then the length of the storage address range of the owner data is also 4 bytes. If the initial storage address of the owner data at this time is FFFFF1, the last address of the owner data is FFFFF4, and the storage address range of the data block of the owner data is FFFFF1 ~ FFFFF4.

可選的,圖5示出了在向非易失性儲存空間寫入屬主資料,並根據屬主資料的大小確定屬主資料的儲存位址範圍之後,存取非易失性儲存空間的屬主資料的方法流程圖,如圖5所示,該方法包括如下步驟:步驟S502,接收用於存取非易失性儲存空間的存取請求;步驟S504,響應存取請求,得到驗證資訊和需要請求的資料長度;步驟S506,在驗證驗證資訊通過的情況下,判斷需 要請求的資料長度是否處於屬主資料的儲存位址範圍之內;步驟S508,如果需要請求的資料長度處於屬主資料的儲存位址範圍之內,則允許返回屬主資料的內容。 Optionally, FIG. 5 shows how to access the nonvolatile storage space after the owner data is written into the nonvolatile storage space and the storage address range of the owner data is determined according to the size of the owner data. The method flow chart of the owner data, as shown in FIG. 5, the method includes the following steps: step S502, receiving an access request for accessing the non-volatile storage space; step S504, responding to the access request, obtaining verification information And the required data length; step S506, if the verification information passes, determine whether the required data length is within the storage address range of the owner data; step S508, if the required data length is within the owner Within the storage address range of the data, it is allowed to return the content of the owner data.

作為一種可選的實施例,存取設備端向可信晶片發起存取非易失性空間請求,可信晶片接收到存取設備端發送的非易失性空間請求後,響應存取設備端的請求,並要求存取設備端反饋驗證資訊以及屬主資料的長度資訊;存取設備端向可信晶片發送驗證資訊以及屬主資料的長度資訊,例如,存取的屬主資料的長度為4位元組;可信晶片驗證存取設備端返回的驗證資訊是否符合要求,在驗證資訊符合要求的情況下,判斷需要請求的資料長度是否處於屬主資料的儲存位址範圍之內,例如,需要請求的資料長度為4位元組,屬主資料的儲存位址範圍為FFFFF1~FFFFF4,屬主資料的最大儲存長度為4位元組,請求的資料長度滿足公式(2),因此,可信晶片允許存取屬主資料,並返回儲存位址範圍為FFFFF1~FFFFF4的屬主資料。 As an optional embodiment, the access device end initiates a request for accessing the non-volatile space to the trusted chip. After receiving the non-volatile space request sent by the access device end, the trusted chip responds to the access device end. Request and request the access device to feedback the verification information and the length information of the owner data; the access device sends verification information and the length information of the owner data to the trusted chip, for example, the length of the accessed owner data is 4 Bytes; the trusted chip verifies whether the verification information returned by the access device meets the requirements, and if the verification information meets the requirements, determines whether the length of the data to be requested is within the storage address range of the owner data, for example, The required data length is 4 bytes. The storage address range of the owner data is FFFFF1 ~ FFFFF4. The maximum storage length of the owner data is 4 bytes. The requested data length satisfies formula (2). The letter chip allows access to the owner data and returns the owner data with the storage address range of FFFFF1 ~ FFFFF4.

需要說明的是,上述驗證資訊可以用來驗證存取設備端是否有存取的權限以及確定存取設備端存取資料的位置,從而可以進一步提高存取資料的準確性。 It should be noted that the above verification information can be used to verify whether the access device has access permissions and determine the location where the access device accesses data, thereby further improving the accuracy of the access data.

可選的,如果需要請求的資料長度處於屬主資料的儲存位址範圍之外,則中止獲取屬主資料的流程,和/或輸出用於表徵請求失敗的提示資訊。 Optionally, if the length of the requested data is outside the storage address range of the owner data, the process of obtaining the owner data is suspended, and / or the prompt information used to characterize the request failure is output.

作為一種可選的實施例,在可信晶片驗證存取設備端返回的驗證資訊符合要求的情況下,可信晶片進一步判斷需要請求的資料長度是否處於屬主資料的儲存位址範圍之內,如果需要請求的資料長度處於屬主資料的儲存位址範圍之外,例如,需要請求的資料長度為4位元組,而屬主資料的儲存位址範圍為FFFFF1~FFFFF3,屬主資料的最大儲存長度為3位元組,請求的資料長度不滿足公式(2),因此,可信晶片不允許存取屬主資料,直接終止流程,並輸出此次請求失敗的提示資訊。 As an optional embodiment, when the trusted chip verifies that the authentication information returned by the access device meets the requirements, the trusted chip further determines whether the length of the data to be requested is within the storage address range of the owner data. If the requested data length is outside the storage address range of the owner data, for example, the required data length is 4 bytes, and the storage address range of the owner data is FFFFF1 ~ FFFFF3. The storage length is 3 bytes, and the requested data length does not satisfy formula (2). Therefore, the trusted chip does not allow access to the owner data, directly terminates the process, and outputs a prompt message for the failure of the request.

可選的,驗證資訊至少包括如下至少之一:需要存取的空間編號、密碼。 Optionally, the authentication information includes at least one of the following: a space number and a password to be accessed.

作為一種可選的實施例,驗證上述需要存取的空間編號可以確認可信晶片中是否存有該空間編號,進一步驗證密碼可以確認當前存取的使用者是否有存取權限,從而可以進一步提高存取資料的準確性。 As an optional embodiment, verifying the space number that needs to be accessed can confirm whether the space number is stored in the trusted chip, and further verifying the password can confirm whether the currently accessed user has access rights, which can further improve Accuracy of access to data.

可選的,在驗證驗證資訊失敗的情況下,返回無法獲取屬主資料的提示資訊。 Optionally, if the verification information fails to be verified, a prompt message indicating that the owner data cannot be obtained is returned.

在一種可選的實施例中,使用者需要存取的空間編號為2,但可信晶片中不存在空間編號為2的屬主資料,在這種情況下,中止獲取屬主資料的流程,並向存取設備端發送提示資訊,提示不存在空間編號為2的屬主資料。在另一種可選的實施例中,使用者需要存取的空間編號為2,可信晶片中存在空間編號為2的屬主資料,當檢測到密碼不對,在這種情況下,同樣會中止獲取屬主資料的流 程,並向存取設備端發送提示資訊,提示密碼不正確,並要求其再次操作。 In an optional embodiment, the user needs to access the space number 2 but the owner data of the space number 2 does not exist in the trusted chip. In this case, the process of obtaining the owner data is suspended, And send prompt information to the access device end, prompting that there is no owner data with space number 2. In another optional embodiment, the user needs to access the space number 2 and the owner chip has the space number 2 in the trusted chip. When the password is detected to be incorrect, in this case, it will also be suspended. The process of obtaining the owner's information, and sending reminder information to the access device, prompting that the password is incorrect, and asking it to operate again.

在一種優選的實施例中,屬主C申請了6位元組的非易失性空間,其存放了4個位元組的資料,如表4所示:屬主空間編號Nv_index為1,空間屬主名稱User_name為C,屬主空間編號1對應的空間大小Nv_Size為6位元組,即資料長度最大可為6位元組;其對應的實體位址為FFFFF0~FFFFF6,在實體位址中存放了4位元組,屬主寫入的資料為“1101”,TCG標準預設沒有寫入的屬主資料Data為 00 ,即Data資料項資料為1101 00 (加粗斜體的數字表示狀態資料,不加粗的數字表示屬主資料,如表4所示的屬主資料)。 In a preferred embodiment, the owner C applies for a 6-byte non-volatile space, which stores data of 4 bytes, as shown in Table 4: the owner space number Nv_index is 1, and the space The owner name User_name is C, and the space size Nv_Size corresponding to the owner space number 1 is 6 bytes, that is, the data length can be up to 6 bytes; its corresponding physical address is FFFFF0 ~ FFFFF6, in the physical address 4 bytes are stored. The data written by the owner is "1101". The TCG standard presets the owner data that is not written as 00 , that is, the data data item data is 1101 00 (the bold italic number indicates the status Data, bold numbers indicate owner data, as shown in Table 4).

當儲存的資料較長且經常變更時,屬主可能不記得在儲存空間中儲存資料長度為多長的資料,例如,當屬主要求向可信晶片獲取資料的長度為5,並響應了可信晶片要求反饋的資訊,包括:屬主輸入的正確的密碼****,以及空間編號Nv_index 1後,可信晶片接到上述驗證資訊後,驗證密碼和空間編號反饋正確,並驗證其要求獲取的 資料長度5大於屬主資料的長度4,由於請求資料長度不在其允許存取的範圍內,因此可信晶片提示請求資料超出預存範圍,終止獲取屬主資料的流程。 When the stored data is long and frequently changed, the owner may not remember how long the data is stored in the storage space. For example, when the owner requested that the length of the data from the trusted chip be 5 and responded to The information that the chip requires feedback includes: the correct password **** entered by the owner, and the space number Nv_index 1. After receiving the above verification information, the trusted chip verifies that the password and space number are correct and verifies their requirements. The length 5 of the acquired data is greater than the length 4 of the owner data. Since the requested data length is not within the range allowed by the owner, the trusted chip prompts the requested data to exceed the pre-stored range and terminates the process of obtaining the owner data.

可信計算能夠在計算運算的同時進行安全防護,使計算結果總是與預期一致,計算全程可測可控,不被干擾。 Trusted computing can perform security protection at the same time as the calculation operation, so that the calculation result is always consistent with the expectation, and the calculation process can be measured and controlled without being disturbed.

可信計算的核心要素是可信鏈與可信根,其中,可信計算可以透過信任鏈機制構架可信計算環境。在可信根為包含有非易失性儲存空間的可信晶片的情況下,存在另一種可選的實施例,具體如下:目前可信計算有國內可信平臺控制模組(Trusted Platform Control Module,TPCM)和國際TCG標準組織的可信平臺模組(Trusted Platform Module,TPM)兩種技術路線。 The core elements of trusted computing are the trusted chain and the trusted root. Among them, trusted computing can build a trusted computing environment through a trusted chain mechanism. When the trusted root is a trusted chip containing non-volatile storage space, there is another alternative embodiment, which is as follows: Currently, trusted computing has a domestic trusted platform control module (Trusted Platform Control Module). (TPCM) and Trusted Platform Module (TPM) of the International TCG Standards Organization.

可信計算的核心要素是可信鏈與可信根,TCG規範中的可信平臺模組(Trusted Platform Module,TPM)是可信計算平臺的硬體可信根,TPM是提供受保護的安全儲存、密碼運算能力的安全晶片。TPM透過物理方式與計算平臺相連並透過外部匯流排連接到CPU上,例如PC機平臺上採取直接固化在主板上的方式並透過LPC匯流排連接。 The core elements of trusted computing are the trusted chain and the trusted root. The Trusted Platform Module (TPM) in the TCG specification is the hardware trusted root of the trusted computing platform. The TPM is to provide protected security. Storage, cryptographic computing security chip. The TPM is physically connected to the computing platform and connected to the CPU through an external bus. For example, the PC platform is directly cured on the motherboard and connected through the LPC bus.

TCG規範中給出了對可信(trusted)的定義:一個實體一直以一種可預期的方式為特定的目標運行。可信計算的核心機制是透過信任鏈機制構建可信計算環境,目前運行實體是否可信是建立系統前一運行過程是否可信的基礎上。基於這種信任關係,如果系統從一個初始的信任根出 發,在平臺計算環境的每一次轉換時,這種信任可以透過傳遞的方式維持下去,從而在計算平臺上建立了一級驗證一級,一級信任一級的可信鏈,該計算環境就始終是可信的,它就能夠被本地使用者或遠端實體信任。圖6示出了TCG信任鏈的結構示意圖,如圖6所示,圖中實線箭頭表示可信度量連接,虛線箭頭表示可信報告連接,加粗實線箭頭表示可信儲存連接,加粗虛線箭頭表示可信網路連接。 The definition of trusted is given in the TCG specification: An entity has been operating in a predictable manner for a specific purpose. The core mechanism of trusted computing is to build a trusted computing environment through the trust chain mechanism. Whether the current operating entity is trusted is based on whether the previous operating process of the system is trusted. Based on this trust relationship, if the system starts from an initial root of trust, this trust can be maintained in a transitive manner at each transition of the platform's computing environment, thereby establishing a level of verification, a level of trust on the computing platform. The first-level trusted chain, the computing environment is always trusted, and it can be trusted by local users or remote entities. Figure 6 shows the structure of the TCG trust chain. As shown in Figure 6, solid arrows in the figure represent trusted metric connections, dotted arrows represent trusted report connections, bold solid arrows represent trusted storage connections, and bold Dotted arrows indicate trusted network connections.

可信計算的關鍵技術包括可信度量,可信報告,可信儲存和可信網路連接等幾部分。 The key technologies of trusted computing include trusted metrics, trusted reports, trusted storage, and trusted network connections.

可信平臺控制模組TPCM實現了可信平臺模組的基本功能,其功能組成和與TPM基本相同,但由於TPM的核心度量根CRTM處於基本輸入輸出系統BIOS中,不受TPM的保護,因此,TPCM提出新的可信度量根設計,解決了可信度量根的起始度量點問題,改變了啟動和度量順序,在此基礎上,建立了以該晶片為信任根的信任鏈度量流程,實現了由該晶片控制整個系統的啟動,I/O介面控制以及系統配置等,體現了該晶片對系統可信性的控制作用。 The Trusted Platform Control Module TPCM implements the basic functions of the Trusted Platform Module. Its functional composition is basically the same as that of the TPM, but because the core measurement root CRTM of the TPM is in the basic input and output system BIOS and is not protected by the TPM, so TPCM proposed a new design of the trusted metric root, solved the problem of the initial metric point of the trusted metric root, changed the startup and measurement order, and based on this, established a trust chain metric process using the chip as the root of trust. The start of the entire system, I / O interface control, and system configuration are controlled by the chip, which reflects the chip's control of system credibility.

在計算平臺的運行控制傳遞過程中,可信根TPCM判斷其下一級執行代碼的真實性和完整性是否被篡改,如果沒有,系統將運行控制權傳遞到下一級可信執行代碼,系統的可信範圍因擴大到下一級功能代碼;同理,這種系統控制權不斷傳遞,就可以實現信任鏈的建立和傳遞過程, 最終實現系統範圍可信構建。一個完整的系統可信傳遞過程要從可信根開始,系統控制權順序由可信平臺控制模組傳遞到可信的BIOS,再傳遞到可信的操作系統裝載器,從可信的操作系統裝載器傳遞到可信的操作系統,再從可信的操作系統傳遞到可信的應用。 During the transfer of operation control of the computing platform, the trusted root TPCM judges whether the authenticity and integrity of the execution code at the next level has been tampered with. If not, the system passes the operation control to the trusted execution code at the next level. The trust scope is expanded to the next level of function code; similarly, the continuous transfer of system control power can realize the establishment and transfer process of the trust chain, and finally the system-wide trusted construction. A complete system trusted transfer process starts from the trusted root, the system control order is transferred from the trusted platform control module to the trusted BIOS, and then to the trusted operating system loader, from the trusted operating system The loader is passed to the trusted operating system, and then from the trusted operating system to the trusted application.

可信安全晶片具有產生加解密密鑰的功能,也能夠進行高速的資料加密和解密,以及充當保護BIOS和操作系統不被修改的輔助處理器。 The trusted security chip has the function of generating encryption and decryption keys, can also perform high-speed data encryption and decryption, and acts as an auxiliary processor to protect the BIOS and operating system from being modified.

TPM安全晶片用途十分廣泛,配合專用軟體可以實現以下用途: The TPM security chip is very versatile and can be used with special software to achieve the following uses:

(1)儲存、管理BIOS開機密碼以及硬碟密碼。以往這些事務都是由BIOS做的,玩過的朋友可能知道,忘記了密碼只要取下CMOS電池,給CMOS放電就清除密碼了。如今這些密鑰實際上是儲存於固化在晶片的儲存單元中,即便是掉電其資訊亦不會丟失。相比於BIOS管理密碼,TPM安全晶片的安全性要大為提高。 (1) Store and manage BIOS power-on passwords and hard disk passwords. In the past, these tasks were performed by the BIOS. Friends who have played it may know that if you forget the password, you only need to remove the CMOS battery and discharge the CMOS to clear the password. These keys are actually stored in the storage unit that is solidified on the wafer, and their information will not be lost even if power is lost. Compared with the BIOS management password, the security of the TPM security chip is greatly improved.

(2)TPM安全晶片可以進行範圍較廣的加密。TPM安全晶片除了能進行傳統的開機加密以及對硬碟進行加密外,還能對系統登入、應用軟體登入進行加密。比如MSN、QQ、網遊以及網上銀行的登入資訊和密碼,都可以透過TPM加密後再進行傳輸,這樣就不用擔心資訊和密碼被人竊取。 (2) The TPM security chip can perform a wide range of encryption. In addition to the traditional boot encryption and hard disk encryption, the TPM security chip can also encrypt system login and application software login. For example, MSN, QQ, online games, and online banking login information and passwords can be encrypted by TPM before being transmitted, so there is no need to worry about the information and password being stolen.

(3)加密硬碟的任意分區。可以加密本本上的任意一個硬碟分區,也可以將一些敏感的文件放入該分區以策 安全。比如有些本本廠商採用的一鍵恢復功能,就是該用途的集中體現之一(其將系統鏡像放在一個TPM加密的分區中)。還有一些大型商業軟體公司(如:Microsoft)也會利用其作為加密分區的手段(如:著名的BitLocker)。 (3) Encrypt any partition of the hard disk. You can encrypt any hard disk partition on the notebook, and you can also put some sensitive files into this partition for security. For example, the one-button recovery function used by some manufacturers is one of the concentrated manifestations of this purpose (it places the system image in a TPM-encrypted partition). There are also some large commercial software companies (such as: Microsoft) will also use it as a means of encrypted partitions (such as: the famous BitLocker).

需要說明的是,對於前述的各方法實施例,為了簡單描述,故將其都表述為一系列的動作組合,但是本領域技術人員應該知悉,本發明並不受所描述的動作順序的限制,因為依據本發明,某些步驟可以採用其他順序或者同時進行。其次,本領域技術人員也應該知悉,說明書中所描述的實施例均屬於優選實施例,所涉及的動作和模組並不一定是本發明所必須的。 It should be noted that, for the foregoing method embodiments, for simplicity of description, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action order. Because according to the present invention, certain steps may be performed in another order or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the description are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

透過以上的實施方式的描述,本領域的技術人員可以清楚地瞭解到根據上述實施例的方法可借助軟體加必需的通用硬體平臺的方式來實現,當然也可以透過硬體,但很多情況下前者是更佳的實施方式。基於這樣的理解,本發明的技術方案本質上或者說對現有技術做出貢獻的部分可以以軟體產品的形式體現出來,該電腦軟體產品儲存在一個儲存媒體(如ROM/RAM、磁碟、光碟)中,包括若干指令用以使得一台終端設備(可以是手機,電腦,伺服器,或者網路設備等)執行本發明各個實施例的方法。 Through the description of the above embodiments, a person skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary universal hardware platform, and of course, also by hardware, but in many cases The former is a better implementation. Based on such an understanding, the technical solution of the present invention, in essence, or a part that contributes to the existing technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk). ) Includes several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of the embodiments of the present invention.

實施例2Example 2

根據本發明實施例,還提供了一種獲取儲存在晶片中的資料的方法實施例。 According to an embodiment of the present invention, an embodiment of a method for acquiring data stored in a wafer is also provided.

本申請提供了如圖7所示的獲取儲存在晶片中的資料的方法。圖7是根據本發明實施例2的獲取儲存在晶片中的資料的方法流程圖。包括如下步驟:步驟S702,接收用於存取晶片的非易失性儲存空間的存取請求;步驟S704,響應存取請求,得到驗證資訊和需要請求的資料長度;步驟S706,在驗證驗證資訊通過的情況下,判斷需要請求的資料長度是否處於非易失性儲存空間中預先設置的屬主資料的儲存位址範圍之內;步驟S708,如果需要請求的資料長度處於屬主資料的儲存位址範圍之內,則允許返回屬主資料的內容;其中,屬主資料的儲存位址範圍用於表徵允許向晶片請求資料時的最大資料長度。 This application provides a method for acquiring data stored in a chip as shown in FIG. 7. 7 is a flowchart of a method for acquiring data stored in a wafer according to Embodiment 2 of the present invention. It includes the following steps: Step S702, receiving an access request for accessing the nonvolatile storage space of the chip; Step S704, responding to the access request, obtaining verification information and the required data length; and step S706, verifying the verification information In the case of passing, it is judged whether the length of the data to be requested is within the storage address range of the owner data preset in the non-volatile storage space; step S708, if the length of the data to be requested is in the storage position of the owner data Within the address range, the content of the owner data is allowed to be returned; among them, the storage address range of the owner data is used to represent the maximum data length when the data is allowed to be requested from the chip.

在上述步驟S702至步驟S708所限定的方案中,上述存取晶片可以為可信晶片,該可信晶片中包含非易失性儲存空間。上述非易失儲存空間的儲存模式可以採用大端模式和小端模式,在屬主資料的儲存模式為小端模式的情況下,假設屬主資料的大小為L,屬主資料的資料塊的初始儲存位址,即屬主資料的低位元組所在的內部記憶體位址為Min_adress,屬主資料的資料塊的末尾儲存位址,即屬主資料的高位元組所在的內部記憶體位址為Max_adress,則L、Min_adress和Max_adress滿足下式:L|Max_adress-Min_adress| In the solution defined in the above steps S702 to S708, the access chip may be a trusted chip, and the trusted chip includes a non-volatile storage space. The storage mode of the above non-volatile storage space can adopt big-endian mode and little-endian mode. When the storage mode of the owner data is little-endian mode, it is assumed that the size of the owner data is L, and the size of the data block of the owner data is The initial storage address, that is, the internal memory address of the low byte that belongs to the master data is Min_adress, and the last storage address of the data block that belongs to the master data, that is, the internal memory address of the high byte that belongs to the master data is Max_adress. , Then L, Min_adress, and Max_adress satisfy the following formula: L | Max_adress-Min_adress |

在存取設備端向可信晶片發起存取非易失性空間請求,可信晶片接收到存取設備端發送的非易失性空間請求後,響應存取設備端的請求,並要求存取設備端反饋驗證資訊以及屬主資料的長度資訊;存取設備端向可信晶片發送驗證資訊以及屬主資料的長度資訊,例如,存取的屬主資料的長度為4位元組;可信晶片驗證存取設備端返回的驗證資訊是否符合要求,在驗證資訊符合要求的情況下,判斷需要請求的資料長度是否處於屬主資料的儲存位址範圍之內,例如,需要請求的資料長度為4位元組,屬主資料的儲存位址範圍為FFFFF1~FFFFF4,屬主資料的最大儲存長度為4位元組,請求的資料長度滿足公式:L|Max_adress-Min_adress| After the access device side initiates a request for accessing the non-volatile space to the trusted chip, the trusted chip receives the non-volatile space request sent by the access device side, responds to the request of the access device side, and requests the access device The client sends verification information and the length information of the owner data; the access device sends verification information and the length information of the owner data to the trusted chip, for example, the length of the accessed owner data is 4 bytes; the trusted chip Verify whether the verification information returned by the access device meets the requirements. In the case that the verification information meets the requirements, determine whether the length of the data to be requested is within the storage address range of the owner data. For example, the length of the data to be requested is 4 Bytes. The storage address range of the owner data is FFFFF1 ~ FFFFF4. The maximum storage length of the owner data is 4 bytes. The requested data length meets the formula: L | Max_adress-Min_adress |

因此,可信晶片允許存取屬主資料,並返回儲存位址範圍為FFFFF1~FFFFF4的屬主資料。 Therefore, the trusted chip allows access to the owner data and returns the owner data with the storage address range of FFFFF1 ~ FFFFF4.

需要說明的是,上述驗證資訊可以用來驗證存取設備端是否有存取的權限以及確定存取設備端存取資料的位置,從而可以進一步提高存取資料的準確性。上述非易失儲存空間的儲存模式可以採用大端模式和小端模式,大端模式是指資料的高位元組保存在內部記憶體的低位址中,而資料的低位元組保存在內部記憶體的高位址中;而小端模式是指資料的高位元組保存在內部記憶體的高位址中,而資料的低位元組保存在內在的低位址中,該儲存模式可以將位址的高低和資料的位權有效結合起來,高位址部分資料的權值高,低位址部分資料的權值低。 It should be noted that the above verification information can be used to verify whether the access device has access permissions and determine the location where the access device accesses data, thereby further improving the accuracy of the access data. The storage mode of the above non-volatile storage space can use big-endian mode and little-endian mode. Big-endian mode means that the high byte of data is stored in the low address of internal memory, and the low byte of data is stored in internal memory. The high-end address of the address; and the little-endian mode means that the high-order bytes of data are stored in the high-address of internal memory, and the low-order bytes of data are stored in the internal low-address. This storage mode can The bit weights of the data are effectively combined, and the weights of the data of the high address part are high, and the weights of the data of the low address part are low.

基於上述實施例步驟S702至步驟S708所公開的方案中,可以獲知透過在晶片中創建非易失儲存空間之後,向非易失性儲存空間寫入屬主資料,並根據屬主資料的大小確定屬主資料的儲存位址範圍,根據屬主資料的大小和屬主資料的儲存位址範圍返回屬主需要獲取的資料,達到了準確獲取屬主資料的目的,從而實現了保證屬主獲取原始資料的正確性的技術效果,進而解決了現有技術從可信安全晶片的非易失空間中讀取原始資料時,讀取到的原始資料準確性差的技術問題。 Based on the solutions disclosed in steps S702 to S708 of the above embodiment, it can be learned that after creating a non-volatile storage space in a chip, the owner data is written into the non-volatile storage space, and determined according to the size of the owner data The storage address range of the owner's data, according to the size of the owner's data and the storage address range of the owner's data, returns the data that the owner needs to obtain. The purpose of accurately obtaining the owner's data is achieved, thereby ensuring that the owner obtains the original data. The technical effect of the correctness of the data further solves the technical problem of poor accuracy of the read original data when the original technology reads the original data from the non-volatile space of the trusted security chip.

可選的,非易失性儲存空間的屬性至少還包括如下至少之一:空間編號,空間屬主名稱、空間授權密碼、空間大小和空間實體位址範圍。 Optionally, the attributes of the non-volatile storage space further include at least one of the following: space number, space owner name, space authorization password, space size, and space entity address range.

在一種可選的實施例中,表5為已經寫入屬主資料的非易失性儲存空間的屬性表,如表5所示。 In an optional embodiment, Table 5 is an attribute table of the non-volatile storage space in which the owner data has been written, as shown in Table 5.

在表5中,屬主的空間編號為1,空間屬主名稱為C,屬主空間編號為1的屬主空間大小為6位元組,即資料長度最大可為6位元組,其對應的空間實體位址範圍為 FFFFF0~FFFFF6,在其實體位址中存放了4位元組,其儲存位址範圍為FFFFF1~FFFFF4,寫入的屬主資料為“1101”。 In Table 5, the owner space number is 1, the space owner name is C, and the owner space number is 1. The owner space size is 6 bytes, that is, the data length can be up to 6 bytes, which corresponds to The space physical address range is FFFFF0 ~ FFFFF6, and 4 bytes are stored in its physical address. The storage address range is FFFFF1 ~ FFFFF4, and the owner data written is "1101".

可選的,在接收用於存取晶片的非易失性儲存空間的存取請求之前,方法還包括:向非易失性儲存空間寫入屬主資料,並根據屬主資料的大小確定屬主資料的儲存位址範圍,其中,透過屬主資料的資料塊的初始儲存位址和末尾儲存位址來確定儲存位址範圍。 Optionally, before receiving the access request for the non-volatile storage space for accessing the chip, the method further includes: writing owner data to the non-volatile storage space, and determining the owner's data according to the size of the owner data. The storage address range of the master data, where the storage address range is determined by the initial storage address and the end storage address of the data block that is the master data.

在一種可選的實施例中,在屬主資料的儲存模式為小端模式的情況下,假設屬主資料的大小為L,屬主資料的資料塊的初始儲存位址,即屬主資料的低位元組所在的內部記憶體位址為Min_adress,屬主資料的資料塊的末尾儲存位址,即屬主資料的高位元組所在的內部記憶體位址為Max_adress,則L、Min_adress和Max_adress滿足下式:L|Max_adress-Min_adress| In an optional embodiment, when the storage mode of the owner data is a little-endian mode, assuming that the size of the owner data is L, the initial storage address of the data block of the owner data, that is, the owner data The internal memory address where the low byte is located is Min_adress, and the storage address at the end of the data block belonging to the owner data, that is, the internal memory address where the high byte of the owner data is located is Max_adress, then L, Min_adress and Max_adress satisfy the following formula : L | Max_adress-Min_adress |

因此,根據屬主資料的大小L以及屬主資料的初始儲存位址Min_adress可以確定屬主資料的末尾位址Max_adress,進而可以確定屬主資料的儲存位址範圍。例如,向非易失性儲存空間寫入的屬主資料為“1101”,該屬主資料的大小為4位元組,則該屬主資料的儲存位址範圍的長度也為4位元組,如果此時屬主資料的初始儲存位址為FFFFF1,則該屬主資料的末尾位址為FFFFF4,屬主資料的資料塊的儲存位址範圍為FFFFF1~FFFFF4。 Therefore, according to the size L of the owner data and the initial storage address Min_adress of the owner data, the last address Max_adress of the owner data can be determined, and the storage address range of the owner data can be determined. For example, if the owner data written to the non-volatile storage space is "1101" and the size of the owner data is 4 bytes, then the length of the storage address range of the owner data is also 4 bytes. If the initial storage address of the owner data at this time is FFFFF1, the last address of the owner data is FFFFF4, and the storage address range of the data block of the owner data is FFFFF1 ~ FFFFF4.

可選的,如果需要請求的資料長度處於屬主資料的儲 存位址範圍之外,則中止獲取屬主資料的流程,和/或輸出用於表徵請求失敗的提示資訊。 Optionally, if the length of the requested data is outside the storage address range of the owner data, the process of obtaining the owner data is suspended, and / or the prompt information used to characterize the failure of the request is output.

作為一種可選的實施例,在可信晶片驗證存取設備端返回的驗證資訊符合要求的情況下,可信晶片進一步判斷需要請求的資料長度是否處於屬主資料的儲存位址範圍之內,如果需要請求的資料長度處於屬主資料的儲存位址範圍之外,例如,需要請求的資料長度為4位元組,而屬主資料的儲存位址範圍為FFFFF1~FFFFF3,屬主資料的最大儲存長度為3位元組,請求的資料長度不滿足公式L|Max_adress-Min_adress|,因此,可信晶片不允許存取屬主資料,直接終止流程,並輸出此次請求失敗的提示資訊。 As an optional embodiment, when the trusted chip verifies that the authentication information returned by the access device meets the requirements, the trusted chip further determines whether the length of the data to be requested is within the storage address range of the owner data. If the requested data length is outside the storage address range of the owner data, for example, the required data length is 4 bytes, and the storage address range of the owner data is FFFFF1 ~ FFFFF3. The storage length is 3 bytes, and the requested data length does not satisfy the formula L | Max_adress-Min_adress |, therefore, the trusted chip does not allow access to the owner's data, directly terminates the process, and outputs a prompt message that the request failed.

實施例3Example 3

根據本發明實施例,還提供了一種可信晶片的實施例。 According to an embodiment of the present invention, an embodiment of a trusted chip is also provided.

本申請提供了如圖8所示的可信晶片的結構示意圖。圖8是根據本發明實施例3的可信晶片的結構示意圖,該可信晶片包括:記憶體801。其中,記憶體801,包括非易失性儲存空間,其中,非易失性儲存空間的屬性至少包括:用於表徵在非易失性儲存空間中儲存屬主資料的參數,屬主資料的儲存位址範圍;其中,屬主資料的儲存位址範圍用於表徵允許向晶片請求資料時的最大資料長度。 This application provides a schematic structural diagram of a trusted chip as shown in FIG. 8. FIG. 8 is a schematic structural diagram of a trusted chip according to Embodiment 3 of the present invention. The trusted chip includes a memory 801. The memory 801 includes a non-volatile storage space, and the attributes of the non-volatile storage space include at least: parameters for characterizing the owner data stored in the non-volatile storage space, and the storage of the owner data Address range; where the storage address range of the owner data is used to characterize the maximum data length when data is allowed to be requested from the chip.

在上述記憶體801所限定的技術方案中,上述非易失儲存空間的儲存模式可以採用大端模式和小端模式,大端模式是指資料的高位元組保存在內部記憶體的低位址中,而資料的低位元組保存在內部記憶體的高位址中;而小端模式是指資料的高位元組保存在內部記憶體的高位址中,而資料的低位元組保存在內在的低位址中,該儲存模式可以將位址的高低和資料的位權有效結合起來,高位址部分資料的權值高,低位址部分資料的權值低。 In the technical solution defined by the memory 801, the storage mode of the non-volatile storage space may adopt a big-endian mode and a little-endian mode. The big-endian mode means that the high-order byte of data is stored in the low-address of the internal memory , And the low byte of the data is stored in the high address of the internal memory; the little-endian mode means that the high byte of the data is stored in the high address of the internal memory, and the low byte of the data is stored in the internal low address In medium, this storage mode can effectively combine the height of the address with the bit weight of the data. The data of the high address part has a high weight and the data of the low address part has a low weight.

需要說明的是,非易失性儲存空間的屬性之一屬主資料為使用者存入到非易失性儲存空間的資料,例如,使用者儲存的資料為“1101”,則該資料即為儲存到非易失性儲存空間的屬主資料;非易失性儲存空間的另一個屬性屬主資料的儲存位址範圍的長度為允許使用者讀取非易失性儲存空間的最大資料長度,例如,屬主資料的儲存位址範圍為:FFFFF0~FFFFF6,則允許使用者向晶片請求資料時的最大資料長度為7。此外,在晶片中創建非易失性儲存空間可以保證在設備掉電時,儲存在晶片中的資料不會丟失,從而可以用來儲存比較重要的資料。 It should be noted that one of the owner data of the non-volatile storage space is the data stored in the non-volatile storage space by the user. For example, if the data stored by the user is "1101", the data is Owner data stored in non-volatile storage space; another attribute of non-volatile storage space is the length of the storage address range of the owner data is the maximum data length that allows users to read the non-volatile storage space, For example, the storage address range of the owner data is: FFFFF0 ~ FFFFF6. The maximum data length when the user is allowed to request data from the chip is 7. In addition, the creation of non-volatile storage space in the chip can ensure that the data stored in the chip will not be lost when the device is powered off, so it can be used to store more important data.

由上可知,在晶片中創建非易失性儲存空間,可以保證使用者儲存在晶片中的資料在設備掉電時,不會丟失,進而提高了資料儲存的安全性。 It can be known from the above that creating a non-volatile storage space in the chip can ensure that the data stored in the chip by the user will not be lost when the device is powered off, thereby improving the security of data storage.

實施例4Example 4

根據本發明實施例,還提供了一種獲取儲存在晶片中 的資料的系統實施例。 According to an embodiment of the present invention, an embodiment of a system for acquiring data stored in a wafer is also provided.

本申請提供了如圖9所示的獲取儲存在晶片中的資料的系統。圖9是根據本發明實施例4的獲取儲存在晶片中的資料的系統結構示意圖,該系統包括:存取設備端901和可信晶片903。其中,存取設備端901,用於發出用於存取晶片的非易失性儲存空間的存取請求;可信晶片903,與存取設備端通訊,用於響應存取請求,獲取存取設備端返回的驗證資訊和需要請求的資料長度,在驗證驗證資訊通過的情況下,如果需要請求的資料長度處於屬主資料的儲存位址範圍之內,則允許返回屬主資料的內容;其中,屬主資料的儲存位址範圍用於表徵允許向可信晶片請求資料時的最大資料長度。 The present application provides a system for acquiring data stored in a chip as shown in FIG. 9. 9 is a schematic structural diagram of a system for acquiring data stored in a chip according to Embodiment 4 of the present invention. The system includes: an access device end 901 and a trusted chip 903. Among them, the access device end 901 is used to issue an access request for accessing the non-volatile storage space of the chip; the trusted chip 903 communicates with the access device end to respond to the access request and obtain access The verification information returned by the device and the length of the requested data. In the case that the verification information passes, if the requested data length is within the storage address range of the owner data, the content of the owner data is allowed to be returned; The storage address range of the owner data is used to characterize the maximum data length when data is allowed to be requested from the trusted chip.

在一種可選的實施例中,上述可信晶片中包含非易失性儲存空間。上述非易失儲存空間的儲存模式可以採用大端模式和小端模式,在屬主資料的儲存模式為小端模式的情況下,假設屬主資料的大小為L,屬主資料的資料塊的初始儲存位址,即屬主資料的低位元組所在的內部記憶體位址為Min_adress,屬主資料的資料塊的末尾儲存位址,即屬主資料的高位元組所在的內部記憶體位址為Max_adress,則L、Min_adress和Max_adress滿足下式:L|Max_adress-Min_adress| In an optional embodiment, the trusted chip includes a non-volatile storage space. The storage mode of the above non-volatile storage space can adopt big-endian mode and little-endian mode. When the storage mode of the owner data is little-endian mode, it is assumed that the size of the owner data is L, and the size of the data block of the owner data is The initial storage address, that is, the internal memory address of the low byte that belongs to the master data is Min_adress, and the last storage address of the data block that belongs to the master data, that is, the internal memory address of the high byte that belongs to the master data is Max_adress. , Then L, Min_adress, and Max_adress satisfy the following formula: L | Max_adress-Min_adress |

在存取設備端向可信晶片發起存取非易失性空間請求,可信晶片接收到存取設備端發送的非易失性空間請求 後,響應存取設備端的請求,並要求存取設備端反饋驗證資訊以及屬主資料的長度資訊;存取設備端向可信晶片發送驗證資訊以及屬主資料的長度資訊,例如,存取的屬主資料的長度為4位元組;可信晶片驗證存取設備端返回的驗證資訊是否符合要求,在驗證資訊符合要求的情況下,判斷需要請求的資料長度是否處於屬主資料的儲存位址範圍之內,例如,需要請求的資料長度為4位元組,屬主資料的儲存位址範圍為FFFFF1~FFFFF4,屬主資料的最大儲存長度為4位元組,請求的資料長度滿足公式:L|Max_adress-Min_adress| After the access device side initiates a request for accessing the non-volatile space to the trusted chip, the trusted chip receives the non-volatile space request sent by the access device side, responds to the request of the access device side, and requests the access device The client sends verification information and the length information of the owner data; the access device sends verification information and the length information of the owner data to the trusted chip, for example, the length of the accessed owner data is 4 bytes; the trusted chip Verify whether the verification information returned by the access device meets the requirements. In the case that the verification information meets the requirements, determine whether the length of the data to be requested is within the storage address range of the owner data. For example, the length of the data to be requested is 4 Bytes. The storage address range of the owner data is FFFFF1 ~ FFFFF4. The maximum storage length of the owner data is 4 bytes. The requested data length meets the formula: L | Max_adress-Min_adress |

因此,可信晶片允許存取屬主資料,並返回儲存位址範圍為FFFFF1~FFFFF4的屬主資料。 Therefore, the trusted chip allows access to the owner data and returns the owner data with the storage address range of FFFFF1 ~ FFFFF4.

需要說明的是,上述驗證資訊可以用來驗證存取設備端是否有存取的權限以及確定存取設備端存取資料的位置,從而可以進一步提高存取資料的準確性。上述非易失儲存空間的儲存模式可以採用大端模式和小端模式,大端模式是指資料的高位元組保存在內部記憶體的低位址中,而資料的低位元組保存在內部記憶體的高位址中;而小端模式是指資料的高位元組保存在內部記憶體的高位址中,而資料的低位元組保存在內在的低位址中,該儲存模式可以將位址的高低和資料的位權有效結合起來,高位址部分資料的權值高,低位址部分資料的權值低。 It should be noted that the above verification information can be used to verify whether the access device has access permissions and determine the location where the access device accesses data, thereby further improving the accuracy of the access data. The storage mode of the above non-volatile storage space can use big-endian mode and little-endian mode. Big-endian mode means that the high byte of data is stored in the low address of internal memory, and the low byte of data is stored in internal memory. The high-end address of the address; and the little-endian mode means that the high-order bytes of data are stored in the high-address of internal memory, and the low-order bytes of data are stored in the internal low-address. This storage mode can The bit weights of the data are effectively combined, and the weights of the data of the high address part are high, and the weights of the data of the low address part are low.

由上可知,透過在晶片中創建非易失儲存空間之後,向非易失性儲存空間寫入屬主資料,並根據屬主資料的大 小確定屬主資料的儲存位址範圍,根據屬主資料的大小和屬主資料的儲存位址範圍返回屬主需要獲取的資料,達到了準確獲取屬主資料的目的,從而實現了保證屬主獲取原始資料的正確性的技術效果,進而解決了現有技術從可信安全晶片的非易失空間中讀取原始資料時,讀取到的原始資料準確性差的技術問題。 It can be known from the above that after creating a non-volatile storage space in the chip, the owner data is written into the non-volatile storage space, and the storage address range of the owner data is determined according to the size of the owner data. The size and storage address range of the owner's data returns the data that the owner needs to obtain, achieving the purpose of accurately obtaining the owner's data, thereby achieving the technical effect of ensuring the correctness of the original data obtained by the owner, thereby solving the existing technology When reading the original data from the non-volatile space of the trusted security chip, the technical problem of the read original data is inaccurate.

可選的,可信晶片903還用於向非易失性儲存空間寫入屬主資料,並根據屬主資料的大小確定屬主資料的儲存位址範圍,其中,透過屬主資料的資料塊的初始儲存位址和末尾儲存位址來確定儲存位址範圍。 Optionally, the trusted chip 903 is also used to write the owner data into the non-volatile storage space, and determine the storage address range of the owner data according to the size of the owner data. To determine the range of storage addresses.

實施例5Example 5

根據本發明實施例,還提供了一種用於實施上述實施例2的獲取儲存在晶片中的資料的裝置,如圖10所示,該裝置包括:接收模組1001、響應模組1003、判斷模組1005和控制模組1007。其中,接收模組1001,用於接收用於存取晶片的非易失性儲存空間的存取請求;響應模組1003,用於響應存取請求,得到驗證資訊和需要請求的資料長度;判斷模組1005,用於在驗證驗證資訊通過的情況下,判斷需要請求的資料長度是否處於非易失性儲存空間中預先設置的屬主資料的儲存位址範圍之內;控制模組1007,用於如果需要請求的資料長度處於 屬主資料的儲存位址範圍之內,則允許返回屬主資料的內容;其中,屬主資料的儲存位址範圍用於表徵允許向晶片請求資料時的最大資料長度。 According to an embodiment of the present invention, a device for acquiring data stored in a chip for implementing the above embodiment 2 is also provided. As shown in FIG. 10, the device includes a receiving module 1001, a response module 1003, and a judgment module. Group 1005 and control module 1007. The receiving module 1001 is used to receive an access request for accessing the non-volatile storage space of the chip; the response module 1003 is used to respond to the access request, obtain verification information and the required data length; judge Module 1005 is used to determine whether the length of the data to be requested is within the storage address range of the owner data preset in the non-volatile storage space when the verification information passes; the control module 1007 is used to If the length of the requested data is within the storage address range of the owner data, the content of the owner data is allowed to be returned; among them, the storage address range of the owner data is used to represent the maximum data when the data is allowed to be requested from the chip length.

上述存取晶片可以為可信晶片,該可信晶片中包含非易失性儲存空間。上述非易失儲存空間的儲存模式可以採用大端模式和小端模式,在屬主資料的儲存模式為小端模式的情況下,假設屬主資料的大小為L,屬主資料的資料塊的初始儲存位址,即屬主資料的低位元組所在的內部記憶體位址為Min_adress,屬主資料的資料塊的末尾儲存位址,即屬主資料的高位元組所在的內部記憶體位址為Max_adress,則L、Min_adress和Max_adress滿足下式:L|Max_adress-Min_adress| The access chip may be a trusted chip, and the trusted chip includes a non-volatile storage space. The storage mode of the above non-volatile storage space can adopt big-endian mode and little-endian mode. When the storage mode of the owner data is little-endian mode, it is assumed that the size of the owner data is L, and the size of the data block of the owner data is The initial storage address, that is, the internal memory address of the low byte that belongs to the master data is Min_adress, and the last storage address of the data block that belongs to the master data, that is, the internal memory address of the high byte that belongs to the master data is Max_adress. , Then L, Min_adress, and Max_adress satisfy the following formula: L | Max_adress-Min_adress |

在存取設備端向可信晶片發起存取非易失性空間請求,可信晶片接收到存取設備端發送的非易失性空間請求後,響應存取設備端的請求,並要求存取設備端反饋驗證資訊以及屬主資料的長度資訊;存取設備端向可信晶片發送驗證資訊以及屬主資料的長度資訊,例如,存取的屬主資料的長度為4位元組;可信晶片驗證存取設備端返回的驗證資訊是否符合要求,在驗證資訊符合要求的情況下,判斷需要請求的資料長度是否處於屬主資料的儲存位址範圍之內,例如,需要請求的資料長度為4位元組,屬主資料的儲存位址範圍為FFFFF1~FFFFF4,屬主資料的最大儲存長度為4位元組,請求的資料長度滿足公式:L|Max_adress-Min_adress| After the access device side initiates a request for accessing the non-volatile space to the trusted chip, the trusted chip receives the non-volatile space request sent by the access device side, responds to the request of the access device side, and requests the access device The client sends verification information and the length information of the owner data; the access device sends verification information and the length information of the owner data to the trusted chip, for example, the length of the accessed owner data is 4 bytes; the trusted chip Verify whether the verification information returned by the access device meets the requirements. In the case that the verification information meets the requirements, determine whether the length of the data to be requested is within the storage address range of the owner data. For example, the length of the data to be requested is 4 Bytes. The storage address range of the owner data is FFFFF1 ~ FFFFF4. The maximum storage length of the owner data is 4 bytes. The requested data length meets the formula: L | Max_adress-Min_adress |

因此,可信晶片允許存取屬主資料,並返回儲存位址範圍為FFFFF1~FFFFF4的屬主資料。 Therefore, the trusted chip allows access to the owner data and returns the owner data with the storage address range of FFFFF1 ~ FFFFF4.

需要說明的是,上述驗證資訊可以用來驗證存取設備端是否有存取的權限以及確定存取設備端存取資料的位置,從而可以進一步提高存取資料的準確性。上述非易失儲存空間的儲存模式可以採用大端模式和小端模式,大端模式是指資料的高位元組保存在內部記憶體的低位址中,而資料的低位元組保存在內部記憶體的高位址中;而小端模式是指資料的高位元組保存在內部記憶體的高位址中,而資料的低位元組保存在內在的低位址中,該儲存模式可以將位址的高低和資料的位權有效結合起來,高位址部分資料的權值高,低位址部分資料的權值低。 It should be noted that the above verification information can be used to verify whether the access device has access permissions and determine the location where the access device accesses data, thereby further improving the accuracy of the access data. The storage mode of the above non-volatile storage space can use big-endian mode and little-endian mode. Big-endian mode means that the high byte of data is stored in the low address of internal memory, and the low byte of data is stored in internal memory. The high-end address of the address; and the little-endian mode means that the high-order bytes of data are stored in the high-address of internal memory, and the low-order bytes of data are stored in the internal low-address. This storage mode can The bit weights of the data are effectively combined, and the weights of the data of the high address part are high, and the weights of the data of the low address part are low.

由上可知,透過在晶片中創建非易失儲存空間之後,向非易失性儲存空間寫入屬主資料,並根據屬主資料的大小確定屬主資料的儲存位址範圍,根據屬主資料的大小和屬主資料的儲存位址範圍返回屬主需要獲取的資料,達到了準確獲取屬主資料的目的,從而實現了保證屬主獲取原始資料的正確性的技術效果,進而解決了現有技術從可信安全晶片的非易失空間中讀取原始資料時,讀取到的原始資料準確性差的技術問題。 It can be known from the above that after creating a non-volatile storage space in the chip, the owner data is written into the non-volatile storage space, and the storage address range of the owner data is determined according to the size of the owner data. The size and storage address range of the owner's data returns the data that the owner needs to obtain, achieving the purpose of accurately obtaining the owner's data, thereby achieving the technical effect of ensuring the correctness of the original data obtained by the owner, thereby solving the existing technology When reading the original data from the non-volatile space of the trusted security chip, the technical problem of the read original data is inaccurate.

此處需要說明的是,上述接收模組1001、響應模組1003、判斷模組1005和控制模組1007對應於實施例2中的步驟S702至步驟S708,四個模組與對應的步驟所實現的實例和應用場景相同,但不限於上述實施例2所公開的 內容。需要說明的是,上述模組作為裝置的一部分可以運行在實施例1提供的電腦終端10中。 What needs to be explained here is that the above-mentioned receiving module 1001, response module 1003, judgment module 1005, and control module 1007 correspond to steps S702 to S708 in Embodiment 2. The four modules and the corresponding steps are implemented. The examples and application scenarios are the same, but are not limited to the content disclosed in the above embodiment 2. It should be noted that, as a part of the device, the above module can be run in the computer terminal 10 provided in the first embodiment.

可選的,非易失性儲存空間的屬性至少還包括如下至少之一:空間編號,空間屬主名稱、空間授權密碼、空間大小和空間實體位址範圍。 Optionally, the attributes of the non-volatile storage space further include at least one of the following: space number, space owner name, space authorization password, space size, and space entity address range.

在一種可選的實施例中,表6為已經寫入屬主資料的非易失性儲存空間的屬性表,如表6所示。 In an optional embodiment, Table 6 is an attribute table of the non-volatile storage space in which the owner data has been written, as shown in Table 6.

在表6中,屬主的空間編號為1,空間屬主名稱為C,屬主空間編號為1的屬主空間大小為6位元組,即資料長度最大可為6位元組,其對應的空間實體位址範圍為FFFFF0~FFFFF6,在其實體位址中存放了4位元組,其儲存位址範圍為FFFFF1~FFFFF4,寫入的屬主資料為“1101”。 In Table 6, the owner space number is 1, the space owner name is C, and the owner space number is 1. The owner space size is 6 bytes, that is, the data length can be up to 6 bytes, which corresponds to The space physical address range is FFFFF0 ~ FFFFF6, and 4 bytes are stored in its physical address. The storage address range is FFFFF1 ~ FFFFF4, and the owner data written is "1101".

可選的,如圖10所示,上述獲取儲存在晶片中的資料的裝置還包括:寫入模組1009,用於向非易失性儲存空間寫入屬主資料,並根據屬主資料的大小確定屬主資料的儲存位址範圍,其中,透過屬主資料的資料塊的初始儲 存位址和末尾儲存位址來確定儲存位址範圍。 Optionally, as shown in FIG. 10, the device for acquiring data stored in the chip further includes: a writing module 1009 for writing the owner data to the non-volatile storage space, and according to the data of the owner data, The size determines the storage address range of the owner data, wherein the storage address range is determined by the initial storage address and the end storage address of the data block of the owner data.

在一種可選的實施例中,在屬主資料的儲存模式為小端模式的情況下,假設屬主資料的大小為L,屬主資料的資料塊的初始儲存位址,即屬主資料的低位元組所在的內部記憶體位址為Min_adress,屬主資料的資料塊的末尾儲存位址,即屬主資料的高位元組所在的內部記憶體位址為Max_adress,則L、Min_adress和Max_adress滿足下式:L|Max_adress-Min_adress| In an optional embodiment, when the storage mode of the owner data is a little-endian mode, assuming that the size of the owner data is L, the initial storage address of the data block of the owner data, that is, the owner data The internal memory address where the low byte is located is Min_adress, and the storage address at the end of the data block belonging to the owner data, that is, the internal memory address where the high byte of the owner data is located is Max_adress, then L, Min_adress and Max_adress satisfy the following formula : L | Max_adress-Min_adress |

因此,根據屬主資料的大小L以及屬主資料的初始儲存位址Min_adress可以確定屬主資料的末尾位址Max_adress,進而可以確定屬主資料的儲存位址範圍。例如,向非易失性儲存空間寫入的屬主資料為“1101”,該屬主資料的大小為4位元組,則該屬主資料的儲存位址範圍的長度也為4位元組,如果此時屬主資料的初始儲存位址為FFFFF1,則該屬主資料的末尾位址為FFFFF4,屬主資料的資料塊的儲存位址範圍為FFFFF1~FFFFF4。 Therefore, according to the size L of the owner data and the initial storage address Min_adress of the owner data, the last address Max_adress of the owner data can be determined, and the storage address range of the owner data can be determined. For example, if the owner data written to the non-volatile storage space is "1101" and the size of the owner data is 4 bytes, then the length of the storage address range of the owner data is also 4 bytes. If the initial storage address of the owner data at this time is FFFFF1, the last address of the owner data is FFFFF4, and the storage address range of the data block of the owner data is FFFFF1 ~ FFFFF4.

可選的,如果需要請求的資料長度處於屬主資料的儲存位址範圍之外,則中止獲取屬主資料的流程,和/或輸出用於表徵請求失敗的提示資訊。 Optionally, if the length of the requested data is outside the storage address range of the owner data, the process of obtaining the owner data is suspended, and / or the prompt information used to characterize the request failure is output.

作為一種可選的實施例,在可信晶片驗證存取設備端返回的驗證資訊符合要求的情況下,可信晶片進一步判斷需要請求的資料長度是否處於屬主資料的儲存位址範圍之內,如果需要請求的資料長度處於屬主資料的儲存位址範圍之外,例如,需要請求的資料長度為4位元組,而屬主 資料的儲存位址範圍為FFFFF1~FFFFF3,屬主資料的最大儲存長度為3位元組,請求的資料長度不滿足公式L|Max_adress-Min_adress|,因此,可信晶片不允許存取屬主資料,直接終止流程,並輸出此次請求失敗的提示資訊。 As an optional embodiment, when the trusted chip verifies that the authentication information returned by the access device meets the requirements, the trusted chip further determines whether the length of the data to be requested is within the storage address range of the owner data. If the requested data length is outside the storage address range of the owner data, for example, the required data length is 4 bytes, and the storage address range of the owner data is FFFFF1 ~ FFFFF3. The storage length is 3 bytes, and the requested data length does not satisfy the formula L | Max_adress-Min_adress |, therefore, the trusted chip does not allow access to the owner's data, directly terminates the process, and outputs a prompt message that the request failed.

實施例6Example 6

本發明的實施例可以提供一種電腦終端,該電腦終端可以是電腦終端群中的任意一個電腦終端設備。可選地,在本實施例中,上述電腦終端也可以替換為移動終端等終端設備。 An embodiment of the present invention may provide a computer terminal, and the computer terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal described above may also be replaced with a terminal device such as a mobile terminal.

可選地,在本實施例中,上述電腦終端可以位於電腦網路的多個網路設備中的至少一個網路設備。 Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices in a computer network.

可選地,圖11是根據本發明實施例的一種電腦終端的結構方塊圖。如圖11所示,該電腦終端A可以包括:一個或多個(圖中僅示出一個)處理器1103以及記憶體1101。 Optionally, FIG. 11 is a structural block diagram of a computer terminal according to an embodiment of the present invention. As shown in FIG. 11, the computer terminal A may include: one or more processors (only one is shown in the figure) a processor 1103 and a memory 1101.

其中,記憶體可用於儲存軟體程式以及模組,如本發明實施例中的安全漏洞檢測方法和裝置對應的程式指令/模組,處理器透過運行儲存在記憶體內的軟體程式以及模組,從而執行各種功能應用以及資料處理,即實現上述的系統漏洞攻擊的檢測方法。記憶體可包括高速隨機記憶體,還可以包括非易失性記憶體,如一個或者多個磁性儲存裝置、快閃記憶體、或者其他非易失性固態記憶體。在 一些實例中,記憶體可進一步包括相對於處理器遠端設置的記憶體,這些遠端記憶體可以透過網路連接至終端A。上述網路的實例包括但不限於互聯網、企業內部網、局域網、移動通訊網及其組合。 The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the security vulnerability detection method and device in the embodiments of the present invention. The processor runs the software programs and modules stored in the memory, thereby Perform various functional applications and data processing, that is, to achieve the above-mentioned detection method of system vulnerability attacks. The memory may include high-speed random memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include a memory remotely disposed relative to the processor, and these remote memories may be connected to the terminal A through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

處理器可以透過傳輸裝置調用記憶體儲存的資訊及應用程式,以執行下述步驟:在晶片中創建非易失性儲存空間,其中,非易失性儲存空間的屬性至少包括:用於表徵在非易失性儲存空間中儲存屬主資料的參數,屬主資料的儲存位址範圍;其中,屬主資料的儲存位址範圍用於表徵允許向晶片請求資料時的最大資料長度。 The processor can call the information and applications stored in the memory through the transmission device to perform the following steps: create a non-volatile storage space in the chip, wherein the attributes of the non-volatile storage space include at least: The parameters of the owner data are stored in the non-volatile storage space, and the address range of the owner data is stored therein. The address range of the owner data is used to represent the maximum data length when the data is allowed to be requested from the chip.

可選的,上述處理器還可以執行如下步驟的程式碼:向非易失性儲存空間寫入屬主資料,並根據屬主資料的大小確定屬主資料的儲存位址範圍,其中,透過屬主資料的資料塊的初始儲存位址和末尾儲存位址來確定儲存位址範圍。 Optionally, the processor may also execute the code of the following steps: write the owner data into the non-volatile storage space, and determine the storage address range of the owner data according to the size of the owner data, wherein, through the owner The initial storage address and the last storage address of the data block of the master data determine the storage address range.

可選的,上述處理器還可以執行如下步驟的程式碼:接收用於存取非易失性儲存空間的存取請求;響應存取請求,得到驗證資訊和需要請求的資料長度;在驗證驗證資訊通過的情況下,判斷需要請求的資料長度是否處於屬主資料的儲存位址範圍之內;如果需要請求的資料長度處於屬主資料的儲存位址範圍之內,則允許返回屬主資料的內容。 Optionally, the processor may further execute code of the following steps: receiving an access request for accessing the non-volatile storage space; responding to the access request, obtaining verification information and a required data length; verifying and verifying When the information passes, determine whether the length of the data to be requested is within the storage address range of the owner's data; if the length of the data to be requested is within the storage address range of the owner's data, return of the owner's data is allowed content.

可選的,上述處理器還可以執行如下步驟的程式碼:如果需要請求的資料長度處於屬主資料的儲存位址範圍之 外,則中止獲取屬主資料的流程,和/或輸出用於表徵請求失敗的提示資訊。 Optionally, the processor may further execute code of the following steps: if the requested data length is outside the storage address range of the owner data, the process of obtaining the owner data is suspended, and / or the output is used for characterization Notification of failed request.

採用本發明實施例,提供了一種獲取儲存在晶片中的資料的方法的方案,透過在晶片中創建非易失儲存空間之後,向非易失性儲存空間寫入屬主資料,並根據屬主資料的大小確定屬主資料的儲存位址範圍,根據屬主資料的大小和屬主資料的儲存位址範圍返回屬主需要獲取的資料,達到了準確獲取屬主資料的目的,從而實現了保證屬主獲取原始資料的正確性的技術效果,進而解決了現有技術從可信安全晶片的非易失空間中讀取原始資料時,讀取到的原始資料準確性差的技術問題。 According to the embodiment of the present invention, a method for obtaining data stored in a chip is provided. After creating a non-volatile storage space in the chip, the owner data is written into the non-volatile storage space, and according to the owner, The size of the data determines the storage address range of the owner's data, and returns the data that the owner needs to obtain according to the size of the owner's data and the storage address range of the owner's data. The purpose of accurately obtaining the owner's data is achieved, thereby guaranteeing The technical effect that the owner obtains the correctness of the original data, thereby solving the technical problem of poor accuracy of the read original data when the original technology reads the original data from the non-volatile space of the trusted security chip.

本領域具有通常知識者可以理解,圖11所示的結構僅為示意,電腦終端也可以是智慧型手機(如Android手機、iOS手機等)、平板電腦、掌聲電腦以及行動上網裝置(Mobile Internet Devices,MID)、PAD等終端設備。圖11其並不對上述電子裝置的結構造成限定。例如,電腦終端11還可包括比圖11中所示更多或者更少的組件(如網路介面、顯示裝置等),或者具有與圖11所示不同的配置。 Those skilled in the art can understand that the structure shown in FIG. 11 is only a schematic, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, an applause computer, and a mobile Internet device (Mobile Internet Devices). , MID), PAD and other terminal equipment. FIG. 11 does not limit the structure of the electronic device. For example, the computer terminal 11 may further include more or less components (such as a network interface, a display device, etc.) than those shown in FIG. 11, or may have a configuration different from that shown in FIG. 11.

本領域具有通常知識者可以理解上述實施例的各種方法中的全部或部分步驟是可以透過程式來指令終端設備相關的硬體來完成,該程式可以儲存於一電腦可讀儲存媒體中,儲存媒體可以包括:快閃隨身碟、唯讀記憶體(Read-Only Memory,ROM)、隨機存取記憶體 (Random Access Memory,RAM)、磁碟或光碟等。 Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium. The storage medium It may include: flash drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.

實施例7Example 7

本發明的實施例還提供了一種儲存媒體。可選地,在本實施例中,上述儲存媒體可以用於保存上述實施例2所提供的獲取儲存在晶片中的資料的方法所執行的程式碼。 An embodiment of the present invention also provides a storage medium. Optionally, in this embodiment, the foregoing storage medium may be used to store code executed by the method for obtaining data stored in a chip provided in the foregoing Embodiment 2.

可選地,在本實施例中,上述儲存媒體可以位於電腦網路中電腦終端群中的任意一個電腦終端中,或者位於移動終端群中的任意一個移動終端中。 Optionally, in this embodiment, the storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

可選地,在本實施例中,儲存媒體被設置為儲存用於執行以下步驟的程式碼:接收用於存取晶片的非易失性儲存空間的存取請求;響應存取請求,得到驗證資訊和需要請求的資料長度;在驗證驗證資訊通過的情況下,判斷需要請求的資料長度是否處於非易失性儲存空間中預先設置的屬主資料的儲存位址範圍之內;如果需要請求的資料長度處於屬主資料的儲存位址範圍之內,則允許返回屬主資料的內容;其中,屬主資料的儲存位址範圍用於表徵允許向晶片請求資料時的最大資料長度。 Optionally, in this embodiment, the storage medium is configured to store code for performing the following steps: receiving an access request for a non-volatile storage space for accessing the chip; responding to the access request and obtaining verification Information and required data length; in the case of verification verification information, determine whether the required data length is within the storage address range of the owner data preset in the non-volatile storage space; if the requested If the data length is within the storage address range of the owner data, the content of the owner data is allowed to be returned; among them, the storage address range of the owner data is used to characterize the maximum data length when the data is allowed to be requested from the chip.

可選地,在本實施例中,儲存媒體被設置為儲存還用於執行以下步驟的程式碼:向非易失性儲存空間寫入屬主資料,並根據屬主資料的大小確定屬主資料的儲存位址範圍,其中,透過屬主資料的資料塊的初始儲存位址和末尾儲存位址來確定儲存位址範圍。 Optionally, in this embodiment, the storage medium is configured to store code that is further used to perform the following steps: write the owner data to the non-volatile storage space, and determine the owner data according to the size of the owner data Of storage address ranges, where the storage address range is determined by the initial storage address and the end storage address of the data block that owns the data.

可選地,在本實施例中,儲存媒體被設置為儲存還用 於執行以下步驟的程式碼:如果需要請求的資料長度處於屬主資料的儲存位址範圍之外,則中止獲取屬主資料的流程,和/或輸出用於表徵請求失敗的提示資訊。 Optionally, in this embodiment, the storage medium is configured to store code that is also used to perform the following steps: if the requested data length is outside the storage address range of the owner data, the acquisition of the owner data is suspended Process, and / or output a message to indicate that the request failed.

上述本發明實施例序號僅僅為了描述,不代表實施例的優劣。 The sequence numbers of the foregoing embodiments of the present invention are only for description, and do not represent the superiority or inferiority of the embodiments.

在本發明的上述實施例中,對各個實施例的描述都各有側重,某個實施例中沒有詳述的部分,可以參見其他實施例的相關描述。 In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For a part that is not described in detail in an embodiment, reference may be made to the description of other embodiments.

在本申請所提供的幾個實施例中,應該理解到,所揭露的技術內容,可透過其它的方式實現。其中,以上所描述的裝置實施例僅僅是示意性的,例如單元的劃分,僅僅為一種邏輯功能劃分,實際實現時可以有另外的劃分方式,例如多個單元或組件可以結合或者可以集成到另一個系統,或一些特徵可以忽略,或不執行。另一點,所顯示或討論的相互之間的耦合或直接耦合或通訊連接可以是透過一些介面,單元或模組的間接耦合或通訊連接,可以是電性或其它的形式。 In the several embodiments provided in this application, it should be understood that the disclosed technical content may be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or integrated into another unit. A system or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, units or modules, and may be electrical or other forms.

作為分離部件說明的單元可以是或者也可以不是物理上分開的,作為單元顯示的部件可以是或者也可以不是物理單元,即可以位於一個地方,或者也可以分佈到多個網路單元上。可以根據實際的需要選擇其中的部分或者全部單元來實現本實施例方案的目的。 The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, which may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.

另外,在本發明各個實施例中的各功能單元可以集成在一個處理單元中,也可以是各個單元單獨物理存在,也 可以兩個或兩個以上單元集成在一個單元中。上述集成的單元既可以採用硬體的形式實現,也可以採用軟體功能單元的形式實現。 In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.

集成的單元如果以軟體功能單元的形式實現並作為獨立的產品銷售或使用時,可以儲存在一個電腦可讀取儲存媒體中。基於這樣的理解,本發明的技術方案本質上或者說對現有技術做出貢獻的部分或者該技術方案的全部或部分可以以軟體產品的形式體現出來,該電腦軟體產品儲存在一個儲存媒體中,包括若干指令用以使得一台電腦設備(可為個人電腦、伺服器或者網路設備等)執行本發明各個實施例方法的全部或部分步驟。而前述的儲存媒體包括:USB隨身碟、唯讀記憶體(ROM,Read-Only Memory)、隨機存取記憶體(RAM,Random Access Memory)、行動硬碟、磁碟或者光碟等各種可以儲存程式碼的媒體。 When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention essentially or part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, It includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present invention. The aforementioned storage media include: USB flash drives, Read-Only Memory (ROM), Random Access Memory (RAM), mobile hard disks, magnetic disks, or optical disks. Code media.

以上僅是本發明的優選實施方式,應當指出,對於本技術領域的具有通常知識者來說,在不脫離本發明原理的前提下,還可以做出若干改進和潤飾,這些改進和潤飾也應視為本發明的保護範圍。 The above are only the preferred embodiments of the present invention. It should be noted that for those with ordinary knowledge in the technical field, without departing from the principles of the present invention, several improvements and retouches can be made. It is regarded as the protection scope of the present invention.

Claims (14)

一種可信晶片,其特徵在於,包括:記憶體,包括非易失性儲存空間,其中,該非易失性儲存空間的屬性至少包括:用於表徵在該非易失性儲存空間中儲存屬主資料的參數,和該屬主資料的儲存位址範圍;其中,該屬主資料的儲存位址範圍用於表徵允許向晶片請求資料時的最大資料長度。     A trusted chip includes: a memory, including a non-volatile storage space, wherein the attributes of the non-volatile storage space at least include: used to characterize storing owner data in the non-volatile storage space Parameters, and the storage address range of the owner's data; where the storage address range of the owner's data is used to characterize the maximum data length when data is allowed to be requested from the chip.     一種獲取儲存在晶片中的資料的系統,其特徵在於,包括:存取設備端,用於發出用於存取晶片的非易失性儲存空間的存取請求;可信晶片,與該存取設備端通訊,用於響應該存取請求,獲取該存取設備端返回的驗證資訊和需要請求的資料長度,在驗證該驗證資訊通過的情況下,如果該需要請求的資料長度處於屬主資料的儲存位址範圍之內,則允許返回該屬主資料的內容;其中,該屬主資料的儲存位址範圍用於表徵允許向該可信晶片請求資料時的最大資料長度。     A system for acquiring data stored in a chip, comprising: an access device end for issuing an access request for a non-volatile storage space for accessing the chip; a trusted chip, and the access Device-side communication is used to respond to the access request to obtain the authentication information returned by the access device and the required data length. In the case of verifying that the authentication information passes, if the required data length is in the owner data Within the storage address range, the content of the owner data is allowed to be returned; the storage address range of the owner data is used to characterize the maximum data length when data is allowed to be requested from the trusted chip.     一種晶片中非易失性儲存空間的資料儲存方法,其特徵在於,包括: 在晶片中創建非易失性儲存空間,其中,該非易失性儲存空間的屬性至少包括:用於表徵在該非易失性儲存空間中儲存屬主資料的參數,該屬主資料的儲存位址範圍;其中,該屬主資料的儲存位址範圍用於表徵允許向該晶片請求資料時的最大資料長度。     A data storage method for a non-volatile storage space in a chip, comprising: creating a non-volatile storage space in a chip, wherein the attributes of the non-volatile storage space at least include: The parameter of the owner data is stored in the volatile storage space, and the address range of the owner data is used for storing the address range of the owner data.     根據申請專利範圍第3項所述的方法,其中,該非易失性儲存空間的屬性至少還包括如下至少之一:空間編號、空間屬主名稱、空間授權密碼、空間大小和空間實體位址範圍。     The method according to item 3 of the scope of patent application, wherein the attributes of the non-volatile storage space further include at least one of the following: space number, space owner name, space authorization password, space size, and space entity address range .     根據申請專利範圍第3或4項所述的方法,其中,在晶片中創建非易失性儲存空間之後,該方法還包括:向該非易失性儲存空間寫入該屬主資料,並根據該屬主資料的大小確定該屬主資料的儲存位址範圍,其中,透過該屬主資料的資料塊的初始儲存位址和末尾儲存位址來確定該儲存位址範圍。     The method according to item 3 or 4 of the scope of patent application, wherein after the non-volatile storage space is created in the chip, the method further comprises: writing the owner data to the non-volatile storage space, and according to the The size of the owner data determines the storage address range of the owner data, wherein the storage address range is determined by the initial storage address and the end storage address of the data block of the owner data.     根據申請專利範圍第5項所述的方法,其中,在向該非易失性儲存空間寫入該屬主資料,並根據該屬主資料的大小確定該屬主資料的儲存位址範圍之後,該方法還包括:接收用於存取該非易失性儲存空間的存取請求;響應該存取請求,得到驗證資訊和需要請求的資料長 度;在驗證該驗證資訊通過的情況下,判斷該需要請求的資料長度是否處於該屬主資料的儲存位址範圍之內;如果該需要請求的資料長度處於該屬主資料的儲存位址範圍之內,則允許返回該屬主資料的內容。     The method according to item 5 of the scope of patent application, wherein after writing the owner data into the non-volatile storage space and determining the storage address range of the owner data according to the size of the owner data, the The method further includes: receiving an access request for accessing the non-volatile storage space; responding to the access request, obtaining verification information and a required data length; and in the case of verifying that the verification information passes, determining the required request Whether the length of the data is within the storage address range of the owner's data; if the requested data length is within the storage address range of the owner's data, the content of the owner's data is allowed to be returned.     根據申請專利範圍第6項所述的方法,其中,如果該需要請求的資料長度處於該屬主資料的儲存位址範圍之外,則中止獲取該屬主資料的流程,和/或輸出用於表徵請求失敗的提示資訊。     The method according to item 6 of the scope of patent application, wherein if the length of the requested data is outside the storage address range of the owner data, the process of obtaining the owner data is suspended, and / or the output is used for Information indicating that the request failed.     根據申請專利範圍第6項所述的方法,其中,該驗證資訊至少包括如下至少之一:需要存取的空間編號、密碼。     The method according to item 6 of the scope of patent application, wherein the verification information includes at least one of the following: a space number and a password to be accessed.     根據申請專利範圍第6項所述的方法,其中,在驗證該驗證資訊失敗的情況下,返回無法獲取該屬主資料的提示資訊。     The method according to item 6 of the scope of patent application, wherein when the verification of the verification information fails, the prompt information that the owner information cannot be obtained is returned.     一種獲取儲存在晶片中的資料的方法,其特徵在於,包括:接收用於存取晶片的非易失性儲存空間的存取請求;響應該存取請求,得到驗證資訊和需要請求的資料長度; 在驗證該驗證資訊通過的情況下,判斷該需要請求的資料長度是否處於該非易失性儲存空間中預先設置的屬主資料的儲存位址範圍之內;如果該需要請求的資料長度處於該屬主資料的儲存位址範圍之內,則允許返回該屬主資料的內容;其中,該屬主資料的儲存位址範圍用於表徵允許向該晶片請求資料時的最大資料長度。     A method for acquiring data stored in a chip, comprising: receiving an access request for accessing a non-volatile storage space of the chip; responding to the access request, obtaining authentication information and a required data length ; In the case of verifying that the verification information passes, determine whether the required data length is within the storage address range of the owner data preset in the non-volatile storage space; if the required data length is within the Within the storage address range of the owner data, it is allowed to return the content of the owner data; among them, the storage address range of the owner data is used to characterize the maximum data length when data is allowed to be requested from the chip.     根據申請專利範圍第10項所述的方法,其中,該非易失性儲存空間的屬性至少還包括如下至少之一:空間編號,空間屬主名稱、空間授權密碼、空間大小和空間實體位址範圍。     The method according to item 10 of the scope of patent application, wherein the attributes of the non-volatile storage space further include at least one of the following: space number, space owner name, space authorization password, space size, and space entity address range .     根據申請專利範圍第10或11項所述的方法,其中,在接收用於存取晶片的非易失性儲存空間的存取請求之前,該方法還包括:向該非易失性儲存空間寫入該屬主資料,並根據該屬主資料的大小確定該屬主資料的儲存位址範圍,其中,透過該屬主資料的資料塊的初始儲存位址和末尾儲存位址來確定該儲存位址範圍。     The method according to item 10 or 11 of the patent application scope, wherein before receiving an access request for accessing the non-volatile storage space of the chip, the method further comprises: writing to the non-volatile storage space The owner data, and the storage address range of the owner data is determined according to the size of the owner data, wherein the storage address is determined by the initial storage address and the end storage address of the data block of the owner data range.     根據申請專利範圍第10項所述的方法,其中,如果該需要請求的資料長度處於該屬主資料的儲存位址範圍之外,則中止獲取該屬主資料的流程,和/或輸出用於表徵請求失敗的提示資訊。     The method according to item 10 of the scope of patent application, wherein if the length of the requested data is outside the storage address range of the owner data, the process of obtaining the owner data is suspended, and / or the output is used for Information indicating that the request failed.     一種獲取儲存在晶片中的資料的裝置,其特徵在於,包括:接收模組,用於接收用於存取晶片的非易失性儲存空間的存取請求;響應模組,用於響應該存取請求,得到驗證資訊和需要請求的資料長度;判斷模組,用於在驗證該驗證資訊通過的情況下,判斷該需要請求的資料長度是否處於該非易失性儲存空間中預先設置的屬主資料的儲存位址範圍之內;控制模組,用於如果該需要請求的資料長度處於該屬主資料的儲存位址範圍之內,則允許返回該屬主資料的內容;其中,該屬主資料的儲存位址範圍用於表徵允許向該晶片請求資料時的最大資料長度。     A device for acquiring data stored in a chip, comprising: a receiving module for receiving an access request of a non-volatile storage space for accessing the chip; and a response module for responding to the storage Fetch the request to obtain the verification information and the required data length; the judgment module is used to determine whether the required data length is in the owner set in the non-volatile storage space if the verification information passes. The data is within the storage address range; the control module is used to allow the content of the owner's data to be returned if the length of the requested data is within the storage address range of the owner's data; The data storage address range is used to characterize the maximum data length when data is allowed to be requested from the chip.    
TW106127335A 2016-11-11 2017-08-11 Data storage method utilized in non-volatile storage space in integrated circuit, and trusted integrated circuit TW201818258A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610998449.0A CN108073351B (en) 2016-11-11 2016-11-11 Data storage method of nonvolatile storage space in chip and credible chip
??201610998449.0 2016-11-11

Publications (1)

Publication Number Publication Date
TW201818258A true TW201818258A (en) 2018-05-16

Family

ID=62109463

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106127335A TW201818258A (en) 2016-11-11 2017-08-11 Data storage method utilized in non-volatile storage space in integrated circuit, and trusted integrated circuit

Country Status (3)

Country Link
CN (1) CN108073351B (en)
TW (1) TW201818258A (en)
WO (1) WO2018086469A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI687837B (en) * 2018-12-18 2020-03-11 英業達股份有限公司 Hardware structure of a trusted computer and trusted booting method for a computer
US10783253B2 (en) 2018-12-13 2020-09-22 Inventec (Pudong) Technology Corporation Hardware structure of a trusted computer and trusted booting method for a computer
TWI728635B (en) * 2020-01-02 2021-05-21 系微股份有限公司 Storage device information management method compatible with different storage specifications
TWI745784B (en) * 2019-11-08 2021-11-11 精品科技股份有限公司 Disc security system
TWI748633B (en) * 2020-09-07 2021-12-01 神雲科技股份有限公司 Server device and server system

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109634541B (en) * 2018-12-06 2022-06-10 中国船舶重工集团公司第七0七研究所 Printer information security monitoring method based on trusted computing
CN111625831B (en) * 2019-02-28 2023-05-30 阿里巴巴集团控股有限公司 Trusted security measurement method and device
CN112784322A (en) * 2019-11-08 2021-05-11 精品科技股份有限公司 Bit lock disk management system
CN115079803B (en) * 2022-05-20 2024-03-29 上海瑞浦青创新能源有限公司 Abnormal power-down data storage device suitable for microcontroller
CN117909284B (en) * 2024-03-13 2024-07-12 深圳曦华科技有限公司 Data access method, device, computer equipment and storage medium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5742677A (en) * 1995-04-03 1998-04-21 Scientific-Atlanta, Inc. Information terminal having reconfigurable memory
US8286883B2 (en) * 2007-11-12 2012-10-16 Micron Technology, Inc. System and method for updating read-only memory in smart card memory modules
CN101477494B (en) * 2009-01-20 2011-12-21 成都市华为赛门铁克科技有限公司 Data write-in method and memory system
CN101986325A (en) * 2010-11-01 2011-03-16 山东超越数控电子有限公司 Computer security access control system and method
US8793462B2 (en) * 2011-05-24 2014-07-29 International Business Machines Corporation Implementing storage adapter performance optimization with enhanced resource pool allocation
US9152793B2 (en) * 2012-09-28 2015-10-06 Intel Corporation Methods, systems and apparatus to self authorize platform code
CN103645863B (en) * 2013-12-12 2017-12-08 北京奇安信科技有限公司 Method for reading data and system, the wiring method and system of shared drive
CN104951405B (en) * 2014-03-28 2019-09-06 三星电子株式会社 Storage system and the method that storage system is executed and verifies write-protect
US10146942B2 (en) * 2015-02-24 2018-12-04 Dell Products, Lp Method to protect BIOS NVRAM from malicious code injection by encrypting NVRAM variables and system therefor
CN105159847A (en) * 2015-08-12 2015-12-16 北京因特信安软件科技有限公司 Disk change record method based on trusted chip
CN105955916B (en) * 2016-04-29 2019-09-20 华为技术有限公司 A kind of method that writing immediate, equipment and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10783253B2 (en) 2018-12-13 2020-09-22 Inventec (Pudong) Technology Corporation Hardware structure of a trusted computer and trusted booting method for a computer
TWI687837B (en) * 2018-12-18 2020-03-11 英業達股份有限公司 Hardware structure of a trusted computer and trusted booting method for a computer
TWI745784B (en) * 2019-11-08 2021-11-11 精品科技股份有限公司 Disc security system
TWI728635B (en) * 2020-01-02 2021-05-21 系微股份有限公司 Storage device information management method compatible with different storage specifications
TWI748633B (en) * 2020-09-07 2021-12-01 神雲科技股份有限公司 Server device and server system

Also Published As

Publication number Publication date
CN108073351B (en) 2021-06-15
CN108073351A (en) 2018-05-25
WO2018086469A1 (en) 2018-05-17

Similar Documents

Publication Publication Date Title
TW201818258A (en) Data storage method utilized in non-volatile storage space in integrated circuit, and trusted integrated circuit
US11741230B2 (en) Technologies for secure hardware and software attestation for trusted I/O
US11843705B2 (en) Dynamic certificate management as part of a distributed authentication system
TWI667586B (en) System and method for verifying changes to uefi authenticated variables
KR101662618B1 (en) Measuring platform components with a single trusted platform module
US20200119929A1 (en) Securing firmware
KR101402542B1 (en) Persistent security system and method
US20110093693A1 (en) Binding a cryptographic module to a platform
US20200026882A1 (en) Methods and systems for activating measurement based on a trusted card
US11575672B2 (en) Secure accelerator device pairing for trusted accelerator-to-accelerator communication
TWI745629B (en) Computer system and method for initializing computer system
JP2007140956A (en) Information processing system, management server, terminal and information processor
JP2008171389A (en) Method for domain logon and computer
US20210243030A1 (en) Systems And Methods To Cryptographically Verify An Identity Of An Information Handling System
CN111901304B (en) Registration method and device of mobile security equipment, storage medium and electronic device
WO2023179745A1 (en) Trusted verification method and apparatus
CN112016090B (en) Secure computing card, and measuring method and system based on secure computing card
JP6769999B2 (en) Secure computing environment
US12067121B2 (en) Trusted boot method and apparatus, electronic device, and readable storage medium
US8185941B2 (en) System and method of tamper-resistant control
US9064118B1 (en) Indicating whether a system has booted up from an untrusted image
US11822668B2 (en) Systems and methods for authenticating configurations of an information handling system
US20230010345A1 (en) Systems and methods for authenticating hardware of an information handling system
US20230344620A1 (en) Personal private key encryption device
CN115935363A (en) Security override for computing devices