[go: up one dir, main page]

CN113127901B - Processing method, device and chip for data encryption transmission - Google Patents

Processing method, device and chip for data encryption transmission Download PDF

Info

Publication number
CN113127901B
CN113127901B CN202110431379.1A CN202110431379A CN113127901B CN 113127901 B CN113127901 B CN 113127901B CN 202110431379 A CN202110431379 A CN 202110431379A CN 113127901 B CN113127901 B CN 113127901B
Authority
CN
China
Prior art keywords
data
prediction method
destination address
historical
prediction
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
CN202110431379.1A
Other languages
Chinese (zh)
Other versions
CN113127901A (en
Inventor
李伟
王凯
陈韬
南龙梅
刘燕江
杜怡然
金羽
吕广秋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Information Engineering University Of Chinese People's Liberation Army Cyberspace Force
Original Assignee
PLA Information Engineering University
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 PLA Information Engineering University filed Critical PLA Information Engineering University
Priority to CN202110431379.1A priority Critical patent/CN113127901B/en
Publication of CN113127901A publication Critical patent/CN113127901A/en
Application granted granted Critical
Publication of CN113127901B publication Critical patent/CN113127901B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/606Protecting data by securing the transmission between two devices or processes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Storage Device Security (AREA)
  • Communication Control (AREA)
  • Facsimile Transmission Control (AREA)

Abstract

The application discloses a processing method, a device and a chip for data encryption transmission, wherein the method comprises the following steps: under the condition that first data transmitted by a first module corresponding to a chip are received, carrying out encryption processing on the first data to obtain encrypted first data, and inputting the encrypted first data into a bus in the chip; under the condition that second data are output from the bus, decrypting the second data to obtain decrypted second data, and transmitting the decrypted second data to a second module corresponding to the chip; the first module and the second module are modules for realizing corresponding functions respectively.

Description

一种数据加密传输的处理方法、装置及芯片Processing method, device and chip for encrypted data transmission

技术领域technical field

本申请涉及数据处理技术领域,尤其涉及一种数据加密传输的处理方法、装置及电子设备。The present application relates to the technical field of data processing, and in particular to a processing method, device and electronic equipment for encrypted data transmission.

背景技术Background technique

探针攻击是一种通过探测SoC片上系统(System on Chip)内的总线、接口或模块等直接获取系统敏感信息的攻击方法,也是最直接最有效的物理攻击方法。探针攻击的重点目标主要有四个部分:片上数据传输、片上数据存储、对外接口通信和片外数据存储。Probe attack is an attack method that directly obtains sensitive information of the system by detecting the bus, interface or module in the SoC System on Chip (System on Chip), and it is also the most direct and effective physical attack method. The key targets of probe attacks mainly include four parts: on-chip data transmission, on-chip data storage, external interface communication, and off-chip data storage.

由于SoC中不同功能模块的数据传输协议和电路结构不同,为了实现针对每个模块的数据加密保护,每个模块都必须设计独立的数据加密方案。Since the data transmission protocols and circuit structures of different functional modules in the SoC are different, in order to realize the data encryption protection for each module, each module must design an independent data encryption scheme.

但是,这种数据加密方案存在复杂较高的情况,导致SoC各模块之间的数据加密传输复杂度较高,会引起数据加密传输性能较差的缺陷。However, such a data encryption scheme has high complexity, which leads to high complexity of data encryption transmission between modules of the SoC, and causes a defect of poor performance of data encryption transmission.

发明内容Contents of the invention

有鉴于此,本申请提供一种数据加密传输的处理方法、装置及芯片,用以解决芯片中数据加密传输性能较差的缺陷。In view of this, the present application provides a data encryption transmission processing method, device and chip to solve the defect of poor data encryption transmission performance in the chip.

本申请的一个方面提出了一种数据加密传输的处理方法,所述方法包括:One aspect of the present application proposes a method for processing encrypted data transmission, the method comprising:

在接收到芯片对应的第一模块传输来的第一数据的情况下,对所述第一数据进行加密处理,以得到加密的第一数据,并将所述加密的第一数据输入所述芯片中的总线;In the case of receiving the first data transmitted from the first module corresponding to the chip, encrypting the first data to obtain encrypted first data, and inputting the encrypted first data into the chip in the bus;

在有第二数据从所述总线输出的情况下,对所述第二数据进行解密处理,以得到解密的第二数据,并将所述解密的第二数据传输给所述芯片对应的第二模块;When there is second data output from the bus, decrypt the second data to obtain decrypted second data, and transmit the decrypted second data to the corresponding second chip of the chip. module;

其中,所述第一模块和所述第二模块分别为用于实现相应功能的模块。Wherein, the first module and the second module are respectively modules for realizing corresponding functions.

上述方法,优选的,对所述第一数据进行加密处理,以得到加密的第一数据,包括:In the above method, preferably, encrypting the first data to obtain encrypted first data includes:

利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据;performing XOR processing on the first data by using the target value corresponding to the first data to obtain encrypted first data;

其中,对所述第二数据进行解密处理,以得到解密的第二数据,包括:Wherein, decrypting the second data to obtain the decrypted second data includes:

利用所述第二数据对应的目标数值对所述第二数据进行异或处理,以得到解密的第二数据。Exclusive OR processing is performed on the second data by using the target value corresponding to the second data to obtain decrypted second data.

上述方法,优选的,在接收到芯片中的第一模块传输来的第一数据之前,所述方法还包括:In the above method, preferably, before receiving the first data transmitted by the first module in the chip, the method further includes:

获得所述第一数据对应的预测目的地址;Obtain a predicted destination address corresponding to the first data;

根据所述预测目的地址,获得所述第一数据对应的目标数值。Obtain a target value corresponding to the first data according to the predicted destination address.

上述方法,优选的,在接收到芯片对应的第一模块传输来的第一数据之后,在利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据之前,所述方法还包括:In the above method, preferably, after receiving the first data transmitted from the first module corresponding to the chip, XOR processing is performed on the first data by using the target value corresponding to the first data, so as to obtain the encrypted first data Before a data, the method also includes:

判断所述第一数据对应的预测目的地址是否与所述第一数据对应的实际目的地址是否相一致;judging whether the predicted destination address corresponding to the first data is consistent with the actual destination address corresponding to the first data;

如果一致,执行所述步骤:利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据;If they are consistent, perform the step of: using the target value corresponding to the first data to perform XOR processing on the first data to obtain encrypted first data;

如果不一致,根据所述第一数据对应的实际目的地址,重新获得所述第一数据对应的目标数值,执行所述步骤:利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据。If not, according to the actual destination address corresponding to the first data, reacquire the target value corresponding to the first data, and perform the step of: using the target value corresponding to the first data to perform an exclusive operation on the first data Or process to get encrypted first data.

上述方法,优选的,获得所述第一数据对应的预测目的地址,包括:In the above method, preferably, obtaining the predicted destination address corresponding to the first data includes:

获得所述总线最近一次所传输的历史数据的历史目的地址;Obtain the historical destination address of the historical data transmitted by the bus last time;

按照第一预测方式,对所述历史目的地址进行处理,以得到所述第一数据对应的预测目的地址;Processing the historical destination address according to the first prediction mode to obtain the predicted destination address corresponding to the first data;

其中,所述第一预测方式至少基于所述历史数据的历史目的地址与所述历史数据的预测目的地址之间的对应关系、第二预测方式和所述芯片中的中断请求的类型确定,所述第二预测方式为所述第一预测方式被切换之间的预测方式。Wherein, the first prediction method is determined based at least on the correspondence between the historical destination address of the historical data and the predicted destination address of the historical data, the second prediction method, and the type of the interrupt request in the chip, so The second prediction method is a prediction method between which the first prediction method is switched.

上述方法,优选的,所述第二预测方式为:定态递增预测方式、暂态递增预测方式、定态跳转预测方式、暂态跳转预测方式、定态保持预测方式或暂态保持预测方式;In the above method, preferably, the second prediction method is: a steady state incremental prediction method, a transient incremental prediction method, a steady state jump prediction method, a transient state jump prediction method, a steady state maintenance prediction method or a transient state maintenance prediction method Way;

其中,所述定态递增预测方式、所述暂态递增预测方式、所述定态跳转预测方式和所述暂态跳转预测方式中分别以地址递增的方式在所述历史目的地址的基础上获得预测地址,所述定态保持预测方式和所述暂态保持预测方式中以保持地址的方式在所述历史目的地址的基础上获得预测地址。Wherein, in the steady-state incremental prediction method, the transient incremental prediction method, the steady-state jump prediction method, and the transient jump prediction method, the addresses are incremented on the basis of the historical destination address. The prediction address is obtained on the basis of the historical destination address in the manner of maintaining the address in the steady-state maintaining prediction mode and the transient state maintaining prediction mode.

上述方法,优选的:The above method, preferably:

在所述第二预测方式为所述定态递增预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址相一致,所述第一预测方式与所述第二预测方式保持一致;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;In the case where the second prediction method is the steady-state incremental prediction method, if the historical destination address of the historical data is consistent with the predicted destination address of the historical data, the first prediction method is the same as the second prediction method. The two prediction methods are consistent; if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the first prediction method and the first prediction method is the Describe the transient incremental prediction method;

在所述第二预测方式为所述暂态递增预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且所述中断请求为第一中断类型,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且所述中断请求为第二中断类型,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址相一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态递增预测方式;When the second prediction method is the transient increment prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data and the interrupt request is of the first interrupt type, the The second prediction method is switched to the first prediction method and the first prediction method is the transient jump prediction method; if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data And the interrupt request is the second interrupt type, the second prediction method is switched to the first prediction method and the first prediction method is the transient state hold prediction method; if the historical purpose of the historical data The address is consistent with the prediction destination address of the historical data, the second prediction method is switched to the first prediction method and the first prediction method is the steady-state incremental prediction method;

在所述第二预测方式为所述暂态跳转预测方式的情况下,如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址相一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态跳转预测方式;如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址递增的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址保持的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;In the case where the second prediction method is the transient jump prediction method, if the predicted destination address of the historical data is consistent with the predicted destination address of the data transmitted on the bus before the historical data, The second prediction method is switched to the first prediction method and the first prediction method is the static jump prediction method; if the prediction destination address of the historical data and the historical data are transmitted before the The prediction destination address of the data on the bus is the relationship of address increment, the second prediction mode is switched to the first prediction mode and the first prediction mode is the transient increment prediction mode; if the history The predicted destination address of the data and the predicted destination address of the data transmitted on the bus before the historical data is an address hold relationship, the second prediction method is switched to the first prediction method and the first prediction The method is the transient state maintenance prediction method;

在所述第二预测方式为所述定态跳转预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;In the case where the second prediction method is the steady-state jump prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the The first prediction method and the first prediction method is the transient jump prediction method;

在所述第二预测方式为所述暂态保持预测方式的情况下,如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址保持的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态保持预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且没有新的中断请求,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且有新的中断请求,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;In the case where the second prediction mode is the transient hold prediction mode, if the predicted destination address of the historical data and the predicted destination address of the data transmitted on the bus before the historical data are of address hold Relationship, the second prediction method is switched to the first prediction method and the first prediction method is the steady-state maintenance prediction method; if the historical destination address of the historical data and the prediction purpose of the historical data The address is inconsistent and there is no new interrupt request, the second prediction method is switched to the first prediction method and the first prediction method is the transient increment prediction method; if the historical destination address of the historical data is the same as The prediction destination address of the historical data is inconsistent and there is a new interrupt request, the second prediction method is switched to the first prediction method and the first prediction method is the transient jump prediction method;

在所述第二预测方式为所述定态保持预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式。In the case where the second prediction method is the steady-state maintenance prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the A first prediction method and the first prediction method is the transient state-holding prediction method.

上述方法,优选的,在对所述第一数据进行加密处理,以得到加密的第一数据之前,所述方法还包括:In the above method, preferably, before encrypting the first data to obtain the encrypted first data, the method further includes:

读取预设的第一配置参数;Read the preset first configuration parameter;

在所述第一配置参数表征需要进行数据加密的情况下,执行所述步骤:对所述第一数据进行加密处理,以得到加密的第一数据;In the case where the first configuration parameter indicates that data encryption is required, the step is performed: encrypting the first data to obtain encrypted first data;

在所述第一配置参数表征不需要进行数据加密的情况下,将所述第一数据输入所述总线;In the case that the first configuration parameter indicates that data encryption is not required, input the first data into the bus;

其中,在对所述第二数据进行解密处理,以得到解密的第二数据之前,所述方法还包括:Wherein, before decrypting the second data to obtain the decrypted second data, the method further includes:

读取预设的第二配置参数;Read the preset second configuration parameter;

在所述第二配置参数表征需要进行数据解密的情况下,执行所述步骤:对所述第二数据进行解密处理,以得到解密的第二数据;In the case where the second configuration parameter indicates that data decryption is required, perform the step of: decrypting the second data to obtain decrypted second data;

在所述第二配置参数表征不需要进行数据解密的情况下,将所述第二数据传输给所述芯片对应的第二模块。In a case where the second configuration parameter indicates that data decryption is not required, the second data is transmitted to a second module corresponding to the chip.

本申请的另一方面还提供了一种数据加密传输的处理装置,至少包括:Another aspect of the present application also provides a processing device for encrypted data transmission, including at least:

加密单元,用于在接收到芯片对应的第一模块传输来的第一数据的情况下,对所述第一数据进行加密处理,以得到加密的第一数据,并将所述加密的第一数据输入所述芯片中的总线;The encryption unit is configured to, in the case of receiving the first data transmitted from the first module corresponding to the chip, perform encryption processing on the first data to obtain encrypted first data, and convert the encrypted first data into data input to the bus in the chip;

解密单元,用于在有第二数据从所述总线输出的情况下,对所述第二数据进行解密处理,以得到解密的第二数据,并将所述解密的第二数据传输给所述芯片对应的第二模块;a decryption unit, configured to decrypt the second data when there is second data output from the bus to obtain decrypted second data, and transmit the decrypted second data to the The second module corresponding to the chip;

其中,所述第一模块和所述第二模块分别为用于实现相应功能的模块。Wherein, the first module and the second module are respectively modules for realizing corresponding functions.

本申请的另一方面还提供了一种芯片,包括:Another aspect of the present application also provides a chip, including:

总线;bus;

处理模块,用于:在接收到所述芯片对应的第一模块传输来的第一数据的情况下,对所述第一数据进行加密处理,以得到加密的第一数据,并将所述加密的第一数据输入所述总线;The processing module is configured to: in the case of receiving the first data transmitted by the first module corresponding to the chip, encrypt the first data to obtain encrypted first data, and convert the encrypted the first data input to the bus;

所述处理模块,还用于:在有第二数据从所述总线输出的情况下,对所述第二数据进行解密处理,以得到解密的第二数据,并将所述解密的第二数据传输给所述芯片对应的第二模块;The processing module is further configured to: when there is second data output from the bus, decrypt the second data to obtain decrypted second data, and convert the decrypted second data transmit to the second module corresponding to the chip;

其中,所述第一模块和所述第二模块分别为用于实现相应功能的模块。Wherein, the first module and the second module are respectively modules for realizing corresponding functions.

从上述技术方案可以看出,本申请公开的一种数据加密传输的处理方法、装置及芯片中,在接收到芯片中的第一模块传输来的第一数据时,对第一数据进行加密处理,再将加密的第一数据传输到芯片中的总线,而有第二数据从总线输出时,对第二数据进行解密处理,进而将解密的第二数据传输给芯片中的第二模块。可见,由于芯片中所有模块之间的数据传输与存储都必须依托于总线才能完成,本申请中通过对传输在总线上的数据进行加密,由此攻击者通过探针探测芯片中的数据时所得到的数据均为经过加密后的数据,而无法获取到任何敏感数据,由此实现对芯片中各个模块传输和存储的数据的保护,同时,无需针对不同模块设计独立的加密方案,从而降低数据加密传输的复杂度,由此在实现芯片中数据加密传输的同时,提高数据加密传输的性能。It can be seen from the above technical solution that in the method, device and chip for processing encrypted data transmission disclosed in the present application, when the first data transmitted by the first module in the chip is received, the first data is encrypted. , and then transmit the encrypted first data to the bus in the chip, and when the second data is output from the bus, decrypt the second data, and then transmit the decrypted second data to the second module in the chip. It can be seen that since the data transmission and storage between all modules in the chip must rely on the bus to complete, in this application, by encrypting the data transmitted on the bus, the attacker detects the data in the chip through the probe. The obtained data is all encrypted data, and any sensitive data cannot be obtained, thereby realizing the protection of the data transmitted and stored by each module in the chip, and at the same time, there is no need to design independent encryption schemes for different modules, thereby reducing data The complexity of encrypted transmission, thereby improving the performance of encrypted data transmission while realizing encrypted data transmission in the chip.

附图说明Description of drawings

为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.

图1为本申请实施例一提供的一种数据加密传输的处理方法的流程图;FIG. 1 is a flow chart of a method for processing encrypted data transmission provided in Embodiment 1 of the present application;

图2为SoC芯片的结构示意图;Fig. 2 is the structural representation of SoC chip;

图3为本申请适用于SoC芯片进行数据加密传输的示例图;Fig. 3 is the example figure that this application is applicable to SoC chip to carry out data encryption transmission;

图4-图6分别为本申请实施例一提供一种数据加密传输的处理方法的另一流程图;Figures 4-6 are respectively another flow chart of a processing method for encrypted data transmission provided by Embodiment 1 of the present application;

图7为本申请实施例一提供一种数据加密传输的处理方法的部分流程图;FIG. 7 is a partial flowchart of a processing method for encrypted data transmission provided by Embodiment 1 of the present application;

图8为本申请实施例中地址预测方式的切换示意图;FIG. 8 is a schematic diagram of switching the address prediction mode in the embodiment of the present application;

图9为本申请实施例一提供一种数据加密传输的处理方法的另一流程图;FIG. 9 is another flow chart of a method for processing encrypted data transmission according to Embodiment 1 of the present application;

图10为本申请实施例二提供的一种数据加密传输的处理装置的结构示意图;FIG. 10 is a schematic structural diagram of a data encryption transmission processing device provided in Embodiment 2 of the present application;

图11-图13分别为本申请实施例二提供的一种数据加密传输的处理装置的另一结构示意图;11-13 are schematic diagrams of another structure of a data encryption transmission processing device provided in Embodiment 2 of the present application;

图14为本申请实施例三提供的一种芯片的结构示意图;FIG. 14 is a schematic structural diagram of a chip provided in Embodiment 3 of the present application;

图15为本申请适用于SoC芯片实现数据加密传输时的数据加密流水线示意图;Fig. 15 is a schematic diagram of the data encryption pipeline when the application is applicable to the SoC chip to realize data encryption transmission;

图16为本申请适用于SoC芯片实现数据加密传输时的分支预测器的状态转换示意图;FIG. 16 is a schematic diagram of the state transition of the branch predictor when the application is applicable to the SoC chip to realize encrypted data transmission;

图17为本申请适用于SoC芯片实现数据加密传输时的总线架构示意图;FIG. 17 is a schematic diagram of the bus architecture when the application is applicable to SoC chips for encrypted data transmission;

图18为本申请适用于SoC芯片实现数据加密传输时总线写传输的算法流程示意图。FIG. 18 is a schematic flow diagram of an algorithm for bus write transmission when the SoC chip implements encrypted data transmission in this application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

参考图1,为本申请实施例一提供的一种数据加密传输的处理方法的实现流程图,该方法可以适用于需要进行探针攻击防护的芯片中,如SoC芯片等,以实现对芯片上的数据保护。Referring to FIG. 1 , it is a flow chart of implementing a data encryption transmission processing method provided in Embodiment 1 of the present application. This method can be applied to chips that require probe attack protection, such as SoC chips, etc., to realize on-chip data protection.

具体的,本实施例中的方法可以包含以下步骤:Specifically, the method in this embodiment may include the following steps:

步骤101:接收芯片对应的第一模块传输来的第一数据。Step 101: Receive first data transmitted from a first module corresponding to the chip.

在一种可能的情况下,第一模块可以为芯片中用于实现相应功能的模块,如SoC芯片中的中央处理器CPU(central processing unit)模块、直接存储器访问DMA(DirectMemory Access)模块、静态随机存取存储器SRAM(Static Random-Access Memory)模块或Eflash(embedded Flash)模块等,如图2中所示;In a possible situation, the first module may be a module used to implement corresponding functions in the chip, such as a central processing unit CPU (central processing unit) module in an SoC chip, a direct memory access DMA (DirectMemory Access) module, a static Random access memory SRAM (Static Random-Access Memory) module or Eflash (embedded Flash) module, etc., as shown in Figure 2;

在另一种可能的情况下,第一模块可以为芯片所连接的模块,能够实现相应的功能,如与SoC芯片相连接的外部设备或片外存储等模块,如图2中所示。In another possible situation, the first module may be a module connected to the chip, capable of realizing corresponding functions, such as an external device or an off-chip storage module connected to the SoC chip, as shown in FIG. 2 .

其中,第一数据可以为第一模块待传输的数据,可以用Ψ表示,如CPU模块中需要写入到SRAM模块的数据,再如,SRAM模块中需要传输给外部设备的数据,再如,片外存储中需要传输给CPU模块的数据,等等。Wherein, the first data can be the data to be transmitted by the first module, which can be represented by Ψ, such as the data that needs to be written into the SRAM module in the CPU module, and another example, the data that needs to be transmitted to the external device in the SRAM module, and for another example, Data that needs to be transmitted to the CPU module in the off-chip storage, and so on.

具体实现中,步骤101中是在第一模块需要传输第一数据时,对从第一模块传输出来的第一数据进行接收。In a specific implementation, step 101 is to receive the first data transmitted from the first module when the first module needs to transmit the first data.

步骤102:对第一数据进行加密处理,以得到加密的第一数据。Step 102: Encrypt the first data to obtain encrypted first data.

具体的,本实施例中可以采用所配置的加密算法对第一数据进行加密处理,以得到加密的第一数据。Specifically, in this embodiment, the configured encryption algorithm may be used to encrypt the first data, so as to obtain encrypted first data.

其中,这里的加密算法可以为序列密码算法、分组密码算法或公钥密码算法等。基于此,可以得到被加密的第一数据,可以用D表示。Wherein, the encryption algorithm here may be a sequence cipher algorithm, a block cipher algorithm, or a public key cryptography algorithm. Based on this, the encrypted first data can be obtained, which can be represented by D.

步骤103:将加密的第一数据输入芯片中的总线,以使得第一数据在总线中进行传输。Step 103: Input the encrypted first data into the bus in the chip, so that the first data is transmitted on the bus.

其中,本实施例中将加密的第一数据在总线的输入端输入,这里的输入端可以为总线连接第一模块的一端,如图3中所示。Wherein, in this embodiment, the encrypted first data is input at the input end of the bus, where the input end may be the end of the bus connected to the first module, as shown in FIG. 3 .

步骤104:在有第二数据从总线输出的情况下,对第二数据进行解密处理,以得到解密的第二数据。Step 104: When there is second data output from the bus, decrypt the second data to obtain decrypted second data.

其中,从总线输出的第二数据可以为加密的第一数据本身,或者从总线输出的第二数据可以为在加密的第一数据之前或之后被传输在总线上的数据。Wherein, the second data output from the bus may be the encrypted first data itself, or the second data output from the bus may be data transmitted on the bus before or after the encrypted first data.

在一种情况下,从总线输出的第二数据可以为被加密后传输到总线上的数据,基于此,本实施例中在有第二数据从总线输出的情况下,对第二数据解密,具体的,可以采用第二数据被加密时的加密算法对应的解密算法对第二数据进行解密,由此得到解密的第二数据,可以以Γ表示。In one case, the second data output from the bus may be encrypted and then transmitted to the bus. Based on this, in this embodiment, when the second data is output from the bus, the second data is decrypted, Specifically, the decryption algorithm corresponding to the encryption algorithm when the second data is encrypted may be used to decrypt the second data, thereby obtaining decrypted second data, which may be represented by Γ.

步骤105:将解密的第二数据传输给芯片对应的第二模块。Step 105: Transmitting the decrypted second data to a second module corresponding to the chip.

在一种可能的情况下,第二模块可以为芯片中用于实现相应功能的模块。如SoC芯片中的CPU模块、DMA模块、SRAM模块或Eflash模块等;In a possible situation, the second module may be a module in the chip for realizing corresponding functions. Such as CPU module, DMA module, SRAM module or Eflash module in SoC chip;

在另一种可能的情况下,第二模块可以为芯片所连接的模块,能够实现相应的功能,如与SoC芯片相连接的外部设备或片外存储等模块。In another possible situation, the second module may be a module connected to the chip and capable of realizing corresponding functions, such as modules such as external devices or off-chip storage connected to the SoC chip.

其中,第二数据为第二模块需要接收的数据,如SRAM模块需要接收的CPU模块传输的数据,再如外部设备需要接收的SRAM模块所传输的数据,再如CPU模块需要接收的片外存储所传输的数据,等等。Among them, the second data is the data that the second module needs to receive, such as the data transmitted by the CPU module that the SRAM module needs to receive, the data transmitted by the SRAM module that the external device needs to receive, and the off-chip storage that the CPU module needs to receive the transmitted data, etc.

另外,本实施例中接收第二数据是在总线的输出端实现,这里的输出端可以为总线连接第二模块的一端,如图3中所示,由此从总线接收到输出的第二数据经过解密之后可以直接传输给第二模块,可见,在总线上传输的数据为经过加密的数据,不易被攻击。In addition, in this embodiment, receiving the second data is realized at the output end of the bus, where the output end can be one end of the bus connected to the second module, as shown in Figure 3, thus receiving the output second data from the bus After being decrypted, it can be directly transmitted to the second module. It can be seen that the data transmitted on the bus is encrypted data, which is not easy to be attacked.

从上述技术方案可以看出,本申请实施例一提供的一种数据加密传输的处理方法中,在接收到芯片中的第一模块传输来的第一数据时,对第一数据进行加密处理,再将加密的第一数据传输到芯片中的总线,而有第二数据从总线输出时,对第二数据进行解密处理,进而将解密的第二数据传输给芯片中的第二模块。可见,由于芯片中所有模块之间的数据传输与存储都必须依托于总线才能完成,本实施例中通过对传输在总线上的数据进行加密,由此攻击者通过探针探测芯片中的数据时所得到的数据均为经过加密后的数据,而无法获取到任何敏感数据,由此实现对芯片中各个模块传输和存储的数据的保护,同时,无需针对不同模块设计独立的加密方案,从而降低数据加密传输的复杂度,由此在实现芯片中数据加密传输的同时,提高数据加密传输的性能。It can be seen from the above technical solution that in the method for processing encrypted data transmission provided by Embodiment 1 of the present application, when the first data transmitted by the first module in the chip is received, the first data is encrypted, The encrypted first data is then transmitted to the bus in the chip, and when the second data is output from the bus, the second data is decrypted, and then the decrypted second data is transmitted to the second module in the chip. It can be seen that since the data transmission and storage between all modules in the chip must rely on the bus to complete, in this embodiment, by encrypting the data transmitted on the bus, the attacker detects the data in the chip through the probe. The obtained data is all encrypted data, and any sensitive data cannot be obtained, thereby realizing the protection of the data transmitted and stored by each module in the chip, and at the same time, there is no need to design independent encryption schemes for different modules, thereby reducing The complexity of encrypted data transmission improves the performance of encrypted data transmission while realizing encrypted data transmission in the chip.

需要说明的是,本实施例中可以按照不同的时隙依次对总线上需要传输的多个数据通过以上加密和解密的处理方式进行处理,从而通过数据加密流水线进一步提高数据加密传输的处理效率。It should be noted that in this embodiment, multiple data to be transmitted on the bus can be processed sequentially according to different time slots through the above encryption and decryption processing methods, so as to further improve the processing efficiency of data encryption transmission through the data encryption pipeline.

基于以上实现方案,为了进一步加快数据加密传输的处理效率,本实施例中通过改进加密和解密的算法来实现。具体的,步骤102中在对第一数据进行加密处理时,具体可以通过以下步骤实现,如图4中所示:Based on the above implementation solutions, in order to further speed up the processing efficiency of encrypted data transmission, this embodiment implements by improving encryption and decryption algorithms. Specifically, in step 102, when encrypting the first data, it may specifically be implemented through the following steps, as shown in FIG. 4:

步骤121:利用第一数据对应的目标数值对第一数据进行异或处理,以得到加密的第一数据。Step 121: Execute XOR processing on the first data by using the target value corresponding to the first data to obtain encrypted first data.

其中,第一数据对应的目标数值可以基于第一数据对应的目的地址进行处理所得到的目标数值,基于此,第一数据的目标数值是能够通过对第一数据进行处理所得到的,而无需在芯片中进行存储,也能够实现对加密的第一数据从总线被输出时的解密处理。同时,利用目标数值对第一数据进行异或处理实现第一数据加密的处理复杂度明显较低,能够加快数据加密的处理效率。Wherein, the target value corresponding to the first data can be obtained based on the target value obtained by processing the destination address corresponding to the first data. Based on this, the target value of the first data can be obtained by processing the first data without Storing in the chip can also realize the decryption process when the encrypted first data is output from the bus. At the same time, the processing complexity of performing XOR processing on the first data by using the target value to realize the encryption of the first data is obviously lower, and the processing efficiency of data encryption can be accelerated.

在此基础上,步骤104中在对第二数据进行解密处理时,可以通过以下步骤实现:On this basis, when decrypting the second data in step 104, it can be realized through the following steps:

步骤141:利用第二数据对应的目标数值对第二数据进行异或处理,以得到解密的第二数据。Step 141: Execute XOR processing on the second data by using the target value corresponding to the second data to obtain decrypted second data.

其中,第二数据对应的目标数值可以基于第二数据对应的目的地址进行处理所得到的目标数值,基于此,第二数据的目标数值可以在接收到第二数据之前或者接收到第二数据之后通过对第二数据进行处理所得到,而无需预先在芯片中存储该第二数据对应的目标数值,也能够实现对第二数据的解密。同时,利用目标数值对第二数据进行异或处理实现第二数据的解密的处理复杂度明显较低,能够加快数据解密的处理效率。Wherein, the target value corresponding to the second data may be based on the target value obtained by processing the destination address corresponding to the second data. Based on this, the target value of the second data may be obtained before receiving the second data or after receiving the second data Decryption of the second data can also be achieved by processing the second data without storing the target value corresponding to the second data in the chip in advance. At the same time, the processing complexity of performing XOR processing on the second data by using the target value to realize the decryption of the second data is obviously lower, and the processing efficiency of data decryption can be accelerated.

基于以上实现方案,第一数据对应的目标数值可以在接收到第一数据之前获得,从而进一步节省数据加密处理所消耗的时长,从而提高处理效率。具体的,在步骤101之前,本实施例中的方法还可以包含以下步骤,如图5中所述:Based on the above implementation solution, the target value corresponding to the first data can be obtained before receiving the first data, thereby further saving the time consumed by data encryption processing, thereby improving processing efficiency. Specifically, before step 101, the method in this embodiment may also include the following steps, as shown in FIG. 5:

步骤106:获得第一数据对应的预测目的地址。Step 106: Obtain a predicted destination address corresponding to the first data.

其中,第一数据对应的预测目的地址是指在接收到第一数据之前所预测的即将到来的第一数据的目的地址,如对CPU模块传输给SRAM模块的第一数据的目的地址进行预测,得到第一数据对应的预测目的地址,可以以R表示。Wherein, the predicted destination address corresponding to the first data refers to the destination address of the upcoming first data predicted before receiving the first data, such as predicting the destination address of the first data transmitted from the CPU module to the SRAM module, A predicted destination address corresponding to the first data is obtained, which may be represented by R.

步骤107:根据预测目的地址,获得第一数据对应的目标数值。Step 107: Obtain the target value corresponding to the first data according to the predicted destination address.

具体的,本实施例中可以使用预设的密钥输入,如密钥K等,对预测目的地址进行加密处理,从而得到第一数据对应的目标数值,可以以EK(R)表示。Specifically, in this embodiment, a preset key input, such as key K, can be used to encrypt the predicted destination address, so as to obtain the target value corresponding to the first data, which can be represented by E K (R).

基于此,在步骤101中接收到第一数据之后,就可以直接使用第一数据对应的目标数值对第一数据进行异或处理,从而得到加密的第一数据,而无需等待第一数据被接收到之后,再根据第一数据对应的目的地址获得第一数据对应的目标数值,由此节省加密处理时长,提高处理效率。Based on this, after the first data is received in step 101, the target value corresponding to the first data can be directly used to perform XOR processing on the first data, so as to obtain the encrypted first data without waiting for the first data to be received After that, the target value corresponding to the first data is obtained according to the destination address corresponding to the first data, thereby saving the encryption processing time and improving processing efficiency.

同理,在步骤141中对第二数据进行异或处理,以得到解密的第二数据时,可以在第二数据从总线传输出来之前,就先获得第二数据对应的目标数值,具体有以下步骤:Similarly, when XOR processing is performed on the second data in step 141 to obtain the decrypted second data, the target value corresponding to the second data can be obtained before the second data is transmitted from the bus, specifically as follows step:

步骤108:获得第二数据对应的预测目的地址,根据第二数据对应的预测目的地址获得第二数据对应的目标数值。Step 108: Obtain the predicted destination address corresponding to the second data, and obtain the target value corresponding to the second data according to the predicted destination address corresponding to the second data.

基于此,在等到第二数据从总线输出之后,就可以直接使用第二数据对应的目标数值对第二数据进行异或处理,从而得到解密的第二数据,而无需等待第二数据从总线输出之后再去获得第二数据对应的目标数值,从而节省解密处理时长,提高处理效率。Based on this, after the second data is output from the bus, the target value corresponding to the second data can be directly used to perform XOR processing on the second data, so as to obtain the decrypted second data without waiting for the second data to be output from the bus Afterwards, the target value corresponding to the second data is obtained, thereby saving the decryption processing time and improving processing efficiency.

基于此,为了提高数据加密传输的准确性,本实施例中需要在对第一数据进行加密之前对第一数据对应的预测目的地址是否准确进行判断,也需要在对第二数据进行解密之前对第二数据对应的预测目的地址是否准确进行判断。基于此,本实施例中在步骤101之后,在步骤121之前,还可以执行以下步骤,如图6中所示:Based on this, in order to improve the accuracy of data encrypted transmission, in this embodiment, it is necessary to judge whether the predicted destination address corresponding to the first data is accurate before encrypting the first data, and it is also necessary to determine whether the predicted destination address corresponding to the first data is accurate before decrypting the second data. Whether the predicted destination address corresponding to the second data is accurate is judged. Based on this, in this embodiment, after step 101 and before step 121, the following steps may also be performed, as shown in FIG. 6:

步骤109:判断第一数据对应的预测目的地址是否与第一数据对应的实际目的地址相一致,如果一致,执行步骤121,如果不一致,执行步骤110。Step 109: Determine whether the predicted destination address corresponding to the first data is consistent with the actual destination address corresponding to the first data, if they are consistent, perform step 121, if not, perform step 110.

其中,第一数据对应的实际目的地址为准确的目的地址,具体可以在接收到第一数据之后,在第一数据中读取到第一数据对应的实际目的地址,可以以A表示。Wherein, the actual destination address corresponding to the first data is an accurate destination address. Specifically, after receiving the first data, the actual destination address corresponding to the first data can be read from the first data, which can be represented by A.

基于此,在执行步骤121之前,先将第一数据对应的预测目的地址与第一数据对应的实际目的地址进行比对,以判断两者是否相一致,如果一致,说明第一数据对应的预测目的地址是准确的,此时,直接执行步骤121,直接使用第一数据对应的目标数值对第一数据进行异或处理,从而得到加密的第一数据,且是加密准确的第一数据,如果不一致,则说明第一数据对应的预测目的地址是不准确的,此时执行步骤110。Based on this, before executing step 121, compare the predicted destination address corresponding to the first data with the actual destination address corresponding to the first data to determine whether the two are consistent. If they are consistent, it indicates that the predicted destination address corresponding to the first data The destination address is accurate. At this time, step 121 is directly executed, and the first data is XORed directly using the target value corresponding to the first data, so as to obtain the encrypted first data, which is the encrypted first data accurately. If If not, it means that the predicted destination address corresponding to the first data is inaccurate, and step 110 is performed at this time.

步骤110:根据第一数据对应的实际目的地址,重新获得第一数据对应的目标数值,再执行步骤121。Step 110: According to the actual destination address corresponding to the first data, reacquire the target value corresponding to the first data, and then perform step 121.

也就是说,在第一数据对应的预测目的地址不准确的情况下,需要使用准确的实际目的地址重新获得准确的目标数值。具体的,本实施例中可以使用预设的密钥输入,如密钥K等,对实际目的地址进行加密处理,从而得到第一数据对应的目标数值,可以以EK(A)表示。之后,再执行步骤121,由此使用重新获取的准确的目标数值对第一数据进行异或处理,从而得到加密的第一数据,且是加密准确的第一数据。That is to say, when the predicted destination address corresponding to the first data is inaccurate, it is necessary to use an accurate actual destination address to obtain an accurate target value again. Specifically, in this embodiment, a preset key input, such as key K, can be used to encrypt the actual destination address, so as to obtain the target value corresponding to the first data, which can be represented by E K (A). Afterwards, step 121 is executed again, whereby the reacquired accurate target value is used to perform XOR processing on the first data, so as to obtain encrypted first data, and the encrypted first data is accurate.

同理,在步骤141中对第二数据进行异或处理以得到解密的第二数据之前,还可以执行以下步骤:Similarly, before performing XOR processing on the second data in step 141 to obtain the decrypted second data, the following steps may also be performed:

步骤111:判断第二数据对应的预测目的地址是否第二数据对应的实际目的地址相一致,如果一致,执行步骤141,如果不一致,执行步骤112。Step 111: Determine whether the predicted destination address corresponding to the second data is consistent with the actual destination address corresponding to the second data, if they are consistent, perform step 141, and if not, perform step 112.

其中,第二数据对应的实际目的地址为准确的目的地址,具体可以在第二数据从总线输出后,在第二数据中读取到第二数据对应的实际目的地址。Wherein, the actual destination address corresponding to the second data is an accurate destination address, specifically, the actual destination address corresponding to the second data may be read from the second data after the second data is output from the bus.

基于此,在执行步骤141之前,先将第二数据对应的预测目的地址与第二数据对应的实际目的地址进行比对,以判断两者是否一致,如果一致,说明第二数据对应的预测目的地址是准确的,此时,直接执行步骤141,直接使用第二数据对应的目标数值对第二数据进行异或处理,从而得到解密的第二数据,且是解密准确的第二数据,如果不一致,则说明第二数据对应的预测目的地址是不准确的,此时执行步骤112。Based on this, before executing step 141, compare the predicted destination address corresponding to the second data with the actual destination address corresponding to the second data to determine whether the two are consistent. If they are consistent, it indicates the predicted destination corresponding to the second data. The address is accurate, at this time, directly execute step 141, directly use the target value corresponding to the second data to perform XOR processing on the second data, so as to obtain the decrypted second data, and the decrypted accurate second data, if inconsistent , it means that the predicted destination address corresponding to the second data is inaccurate, and step 112 is executed at this time.

步骤112:根据第二数据对应的实际目的地址,重新获得第二数据对应的目标数值,再执行步骤141。Step 112: According to the actual destination address corresponding to the second data, reacquire the target value corresponding to the second data, and then perform step 141.

也就是说,在第二数据对应的预测目的地址不准确的情况下,需要使用准确的实际目的地址重新获得准确的目标数值。具体的,本实施例中可以使用预设的密钥输入,如密钥K等,对实际目的地址进行加密处理,从而得到第二数据对应的目标数值。之后,再执行步骤141,由此使用重新获取的准确的目标数值对第二数据进行异或处理,从而得到解密的第二数据,且是解密准确的第二数据。That is to say, if the predicted destination address corresponding to the second data is inaccurate, it is necessary to use an accurate actual destination address to obtain an accurate target value again. Specifically, in this embodiment, a preset key input, such as key K, may be used to encrypt the actual destination address, so as to obtain the target value corresponding to the second data. Afterwards, step 141 is executed again, whereby the reacquired accurate target value is used to perform XOR processing on the second data, so as to obtain the decrypted second data, which is the decrypted accurate second data.

在具体的实现方案中,预测目的地址可以在历史目的地址的基础上进行预测。第一数据对应的预测目的地址与第二数据对应的预测目的地址的预测方案类似,此处以第一数据对应的预测目的地址为例,对预测目的地址的获取方案进行详细说明:In a specific implementation solution, the predicted destination address may be predicted on the basis of historical destination addresses. The predicted destination address corresponding to the first data is similar to the predicted destination address corresponding to the second data. Here, the predicted destination address corresponding to the first data is taken as an example to describe the method of obtaining the predicted destination address in detail:

具体的,步骤106在获得第一数据对应的预测目的地址时,具体可以通过以下方式实现,如图7中所示:Specifically, when obtaining the predicted destination address corresponding to the first data in step 106, it may be implemented in the following manner, as shown in FIG. 7:

步骤161:获得总线最近一次所传输的历史数据的历史目的地址。Step 161: Obtain the historical destination address of the latest historical data transmitted by the bus.

其中,历史目的地址为历史数据的实际目的地址,具体可以从历史数据中读取到。Wherein, the historical destination address is the actual destination address of the historical data, which can be read specifically from the historical data.

步骤162:按照第一预测方式,对历史目的地址进行处理,以得到第一数据对应的预测目的地址。Step 162: According to the first prediction method, process the historical destination address to obtain the predicted destination address corresponding to the first data.

其中,第一预测方式至少基于历史数据的历史目的地址与历史数据的预测目的地址之间的对应关系、第二预测方式以及芯片中的中断请求的类型来确定,这里的第二预测方式为第一预测方式被切换之前的预测方式。Wherein, the first prediction method is determined based at least on the correspondence between the historical destination address of the historical data and the predicted destination address of the historical data, the second prediction method, and the type of the interrupt request in the chip, where the second prediction method is the first A prediction mode before it was switched.

其中,历史数据的预测目的地址为使用第二预测方式进行预测所得到的目的地址。也就是说,本实施例中基于历史数据的历史目的地址与历史数据的预测目的地址之间的对应关系以及中断请求的类型对预测方式进行切换,再按照切换后的预测方式即第一预测方式对历史目的地址进行处理,就可以预测出第一数据对应的预测目的地址。Wherein, the predicted destination address of the historical data is the destination address predicted by using the second prediction method. That is to say, in this embodiment, the prediction mode is switched based on the corresponding relationship between the historical destination address of the historical data and the predicted destination address of the historical data and the type of the interrupt request, and then the prediction mode after switching is the first prediction mode By processing the historical destination addresses, the predicted destination address corresponding to the first data can be predicted.

需要说明的是,不同的预测方式对历史目的地址进行处理的方式也不同,相应所得到的第一数据对应的预测目的地址与历史数据对应的历史目的地址之间的对应关系也不同,其中可以包含有递增、跳转以及保持等多种不同的对应关系。It should be noted that different prediction methods process historical destination addresses in different ways, and correspondingly, the corresponding relationship between the predicted destination address corresponding to the obtained first data and the historical destination address corresponding to the historical data is also different. Contains a variety of different correspondences such as increment, jump, and hold.

基于此,第二预测方式可以为定态递增预测方式、暂态递增预测方式、定态跳转预测方式、暂态跳转预测方式、定态保持预测方式或暂态保持预测方式;第二预测方式被切换为第一预测方式之后,第一预测方式可以与第二预测方式相同,也可以不同,由此,第一测方式可以为定态递增预测方式、暂态递增预测方式、定态跳转预测方式、暂态跳转预测方式、定态保持预测方式或暂态保持预测方式。Based on this, the second prediction method can be a steady state incremental prediction method, a transient incremental prediction method, a steady state jump prediction method, a transient state jump prediction method, a steady state maintenance prediction method or a transient state maintenance prediction method; the second prediction After the method is switched to the first prediction method, the first prediction method can be the same as the second prediction method, or it can be different. Therefore, the first measurement method can be a steady state incremental prediction method, a transient state incremental prediction method, a steady state jump transfer prediction mode, transient jump prediction mode, steady state hold prediction mode or transient state hold prediction mode.

需要说明的是,以上本实施例中所描述的多种预测方式也可以理解为对目的地址进行预测的预测状态,在不同的预测状态下,以相应的预测方式对历史目的地址进行预测。It should be noted that the various prediction methods described in this embodiment above can also be understood as prediction states for predicting destination addresses. In different prediction states, historical destination addresses are predicted in corresponding prediction methods.

其中,定态递增预测方式、暂态递增预测方式、定态跳转预测方式和暂态跳转预测方式中分别以地址递增的方式在历史目的地址的基础上获得预测地址,也就是说,在定态递增预测方式、暂态递增预测方式、定态跳转预测方式和暂态跳转预测方式这四个预测方式中,通过对历史数据的历史目的地址进行单位地址的递增处理,就可以得到第一数据对应的预测目的地址。Among them, in the steady state incremental prediction method, the transient state incremental prediction method, the steady state jump prediction method and the transient state jump prediction method, the predicted address is obtained on the basis of the historical destination address in the manner of address increment respectively, that is to say, in In the four prediction methods of steady-state incremental prediction, transient incremental prediction, steady-state jump prediction and transient jump prediction, by incrementally processing the historical destination address of historical data, we can get The predicted destination address corresponding to the first data.

而定态保持预测方式和暂态保持预测方式中以保持地址的方式在历史目的地址的基础上获得预测地址。也就是说,在定态保持预测方式和暂态保持预测方式这两个预测方式中,通过对历史数据的历史目的地址进行保持不变的处理,就可以得到第一数据对应的预测目的地址。In the steady state hold prediction mode and the transient state hold prediction mode, the predicted address is obtained on the basis of the historical destination address by means of holding the address. That is to say, in the two forecasting modes of the steady-state keeping prediction mode and the transient-state keeping prediction mode, the predicted destination address corresponding to the first data can be obtained by keeping the historical destination address of the historical data unchanged.

以下对第二预测方式被切换第一预测方式的几种情况进行举例说明,如图8中所示:The following examples illustrate several situations in which the second prediction method is switched to the first prediction method, as shown in Figure 8:

在第二预测方式为定态递增预测方式的情况下,如果历史数据的历史目的地址与历史数据的预测目的地址相一致,说明预测正确,此时第一预测方式与第二预测方式保持一致;如果历史数据的历史目的地址与历史数据的预测目的地址不一致,说明预测错误,此时第二预测方式被切换为第一预测方式且第一预测方式为暂态递增预测方式;In the case that the second prediction method is a steady-state incremental prediction method, if the historical destination address of the historical data is consistent with the predicted destination address of the historical data, it means that the prediction is correct, and at this time the first prediction method is consistent with the second prediction method; If the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, it means that the prediction is wrong. At this time, the second prediction method is switched to the first prediction method and the first prediction method is the transient incremental prediction method;

此时的暂态递增预测方式中,仍然以地址递增的处理方式进行目的地址的预测;In the transient increment prediction method at this time, the destination address is still predicted by the address increment processing method;

而在第二预测方式为暂态递增预测方式的情况下,如果历史数据的历史目的地址与历史数据的预测目的地址不一致且中断请求为第一中断类型,说明因为第一中断类型的中断请求出现导致预测错误,此时第二预测方式被切换为第一预测方式且第一预测方式为暂态跳转预测方式;如果历史数据的历史目的地址与历史数据的预测目的地址不一致且中断请求为第二中断类型,说明因为第二中断类型的中断请求出现导致预测错误,此时第二预测方式被切换为第一预测方式且第一预测方式为暂态保持预测方式;如果历史数据的历史目的地址与历史数据的预测目的地址相一致,说明预测正确,此时,第二预测方式被切换为第一预测方式且第一预测方式为定态递增预测方式;In the case where the second prediction method is the transient incremental prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data and the interrupt request is the first interrupt type, it means that the interrupt request of the first interrupt type occurs lead to prediction errors, at this time the second prediction method is switched to the first prediction method and the first prediction method is a transient jump prediction method; if the historical destination address of historical data is inconsistent with the predicted destination address of historical data and the interrupt request is the first Two interrupt types, indicating that the prediction error is caused by the occurrence of the interrupt request of the second interrupt type. At this time, the second prediction method is switched to the first prediction method and the first prediction method is the transient hold prediction method; if the historical destination address of the historical data It is consistent with the prediction destination address of historical data, indicating that the prediction is correct. At this time, the second prediction method is switched to the first prediction method and the first prediction method is the steady-state incremental prediction method;

其中,在暂态跳转预测方式中,以地址递增的处理方式进行目的地址的预测,而在暂态保持预测方式中,以地址保持的处理方式进行目的地址的预测。Wherein, in the transient jump prediction mode, the destination address is predicted by address incrementing, and in the transient hold prediction mode, the destination address is predicted by address holding.

在第二预测方式为暂态跳转预测方式的情况下,如果历史数据的预测目的地址与历史数据之前传输在总线上的数据的预测目的地址相一致,说明预测正确,此时,第二预测方式被切换为第一预测方式且第一预测方式为定态跳转预测方式;如果历史数据的历史目的地址与历史数据的预测目的地址不一致且历史数据的预测目的地址与历史数据之前传输在总线上的数据的预测目的地址为地址递增的关系,那么说明预测错误且地址为递增的状态,此时,第二预测方式被切换为第一预测方式且第一预测方式为暂态递增预测方式;而如果历史数据的历史目的地址与历史数据的预测目的地址不一致且历史数据的历史目的地址与前一历史数据的历史目的地址之间为地址保持的关系,那么说明预测错误且地址为保持的状态,此时,第二预测方式被切换为第一预测方式且第一预测方式为暂态保持预测方式;In the case where the second prediction method is the transient jump prediction method, if the prediction destination address of the historical data is consistent with the prediction destination address of the data transmitted on the bus before the historical data, it means that the prediction is correct. At this time, the second prediction The mode is switched to the first prediction mode and the first prediction mode is the steady-state jump prediction mode; if the historical destination address of the historical data is inconsistent with the historical data’s predicted destination address and the historical data’s predicted destination address and historical data are transmitted on the bus before The predicted destination address of the data above is the relationship that the address is incremented, then it means that the prediction is wrong and the address is incremented. At this time, the second prediction method is switched to the first prediction method and the first prediction method is a transient incremental prediction method; However, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, and the historical destination address of the historical data and the historical destination address of the previous historical data are in an address-holding relationship, it means that the prediction is wrong and the address is held , at this time, the second prediction method is switched to the first prediction method and the first prediction method is the transient state-holding prediction method;

其中,在定态跳转预测方式中,以地址递增的处理方式进行目的地址的预测。Among them, in the steady state jump prediction method, the destination address is predicted by address increment processing.

在第二预测方式为定态跳转预测方式的情况下,如果历史数据的历史目的地址与所述历史数据的预测目的地址不一致,表明第一中断类型的中断请求处理完成,此时第二预测方式被切换为第一预测方式且第一预测方式为暂态跳转预测方式;In the case where the second prediction method is a steady-state jump prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, it indicates that the processing of the interrupt request of the first interrupt type is completed, and at this time the second prediction The method is switched to the first prediction method and the first prediction method is a transient jump prediction method;

在第二方式为暂态保持预测方式的情况下,如果历史数据的预测目的地址与历史数据之前传输在总线上的数据的预测目的地址为地址保持的关系,说明预测正确,此时第二预测方式被切换为第一预测方式且第一预测方式为定态保持预测方式;如果历史数据的历史目的地址与历史数据的预测目的地址不一致且没有新的中断请求,第二预测方式被切换为第一预测方式且第一预测方式为暂态递增预测方式;如果历史数据的历史目的地址与历史数据的预测目的地址不一致且有新的中断请求,此时执行新的中断处理,此时第二预测方式被切换为第一预测方式且第一预测方式为暂态跳转预测方式;In the case where the second mode is the transient hold prediction mode, if the predicted destination address of the historical data and the predicted destination address of the data transmitted on the bus before the historical data are address-holding relationships, it means that the prediction is correct, and at this time the second prediction The mode is switched to the first prediction mode and the first prediction mode is the steady-state hold prediction mode; if the historical destination address of the historical data is inconsistent with the historical data prediction destination address and there is no new interrupt request, the second prediction mode is switched to the first A prediction method and the first prediction method is a transient incremental prediction method; if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data and there is a new interrupt request, a new interrupt process is executed at this time, and the second prediction The method is switched to the first prediction method and the first prediction method is a transient jump prediction method;

其中,在定态保持预测方式中,以地址保持的处理方式进行目的地址的预测。Among them, in the steady-state hold prediction method, the destination address is predicted in the address hold processing method.

在第二预测方式为定态保持预测方式的情况下,如果历史数据的历史目的地址与所述历史数据的预测目的地址不一致,表明第二中断类型的中断请求处理完成,此时,第二预测方式被切换为第一预测方式且第一预测方式为暂态保持预测方式。In the case that the second prediction method is the steady-state hold prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, it indicates that the interrupt request processing of the second interrupt type is completed. At this time, the second prediction The mode is switched to the first prediction mode and the first prediction mode is the transient hold prediction mode.

由此,按照以上预测方式的切换原则,对本实施例中所采用的预测方式进行切换,通过三级动态的分支预测,覆盖芯片中的所有数据传输的情况,从而提高目的地址预测的准确性。Therefore, according to the switching principle of the above prediction method, the prediction method adopted in this embodiment is switched, and the three-level dynamic branch prediction covers all data transmission situations in the chip, thereby improving the accuracy of destination address prediction.

基于以上实现方案,为了实现可配置的数据加密传输的处理,本实施例中可以通过设置配置接口以及配置界面,由用户预先设置配置参数,以确定是否需要进行数据加密传输。例如,在配置界面中为用户提供配置控件,有用户对配置控件进行选择,如果用户选择需要进行加密传输的控件,则生成表征需要进行数据加密的第一配置参数以及表征需要进行数据解密的第二配置参数,如果用户选择不需要进行加密传输的控件,则生成表征不需要进行数据加密的第一配置参数和表征不需要进行数据解密的第二配置参数。Based on the above implementation scheme, in order to realize configurable encrypted data transmission processing, in this embodiment, the configuration interface and the configuration interface can be set by the user to pre-set configuration parameters to determine whether encrypted data transmission is required. For example, in the configuration interface, the configuration control is provided for the user, and the user selects the configuration control. If the user selects the control that needs to be encrypted and transmitted, the first configuration parameter representing the need for data encryption and the first configuration parameter representing the need for data decryption will be generated. Two configuration parameters, if the user selects a control that does not require encrypted transmission, generate a first configuration parameter that indicates that data encryption is not required and a second configuration parameter that indicates that data decryption is not required.

基于此,本实施例中在步骤102之前,先执行以下步骤,如图9中所示:Based on this, before step 102 in the present embodiment, first perform the following steps, as shown in Figure 9:

步骤113:读取预设的第一配置参数。Step 113: Read a preset first configuration parameter.

其中,第一配置参数可以在芯片中存储配置参数的位置进行读取。Wherein, the first configuration parameter can be read from the location where the configuration parameter is stored in the chip.

步骤114:判断第一配置参数是否表征需要进行数据加密,在第一配置参数表征需要进行数据加密的情况下,执行步骤102,再执行步骤103;在第一配置参数表征不需要进行数据加密的情况下,不再执行步骤102,而是直接执行步骤103,也就是直接将第一模块中待传输的第一数据传输到总线中。Step 114: Determine whether the first configuration parameter indicates that data encryption is required, and if the first configuration parameter indicates that data encryption is required, perform step 102, and then perform step 103; if the first configuration parameter indicates that data encryption is not required In this case, step 102 is not performed, but step 103 is directly performed, that is, the first data to be transmitted in the first module is directly transmitted to the bus.

同理,本实施例中在步骤104中对第二数据进行解密处理之前,先执行以下步骤:Similarly, in this embodiment, before decrypting the second data in step 104, the following steps are first performed:

步骤115:读取预设的第二配置参数。Step 115: Read preset second configuration parameters.

其中,第二配置参数可以在芯片中存储配置参数的位置进行读取。Wherein, the second configuration parameter can be read from the location where the configuration parameter is stored in the chip.

步骤116:判断第二配置参数是否表征需要进行数据解密,在第二配置参数表征需要进行数据解密的情况下,执行步骤104,以对第二数据进行解密处理,得到解密的第二数据,再执行步骤105;而在第二配置参数表征不需要进行数据加密的情况下,不再执行步骤104中对第二数据的解密处理,而是直接执行步骤105,也就是直接将总线传输出来的第二数据传输给第二模块。Step 116: Determine whether the second configuration parameter indicates that data decryption is required, and if the second configuration parameter indicates that data decryption is required, perform step 104 to decrypt the second data to obtain decrypted second data, and then Execute step 105; and in the case that the second configuration parameter representation does not require data encryption, no longer perform the decryption process on the second data in step 104, but directly execute step 105, that is, directly transmit the first data from the bus The second data is transmitted to the second module.

由此,通过提供配置接口和配置界面实现数据加密传输的可配置性,为用户提供便利。Therefore, by providing a configuration interface and realizing the configurability of encrypted data transmission through the configuration interface, convenience is provided for users.

参考图10,为本申请实施例二提供的一种数据加密传输的处理装置的结构示意图,该装置可以配置在需要进行探针攻击防护的芯片中,如SoC芯片等,以实现对芯片上的数据保护。Referring to FIG. 10 , it is a schematic structural diagram of a processing device for encrypted data transmission provided in Embodiment 2 of the present application. The device can be configured in a chip that needs to be protected against probe attacks, such as a SoC chip, etc., to realize on-chip data protection.

具体的,本实施例中的装置可以包含如下单元:Specifically, the device in this embodiment may include the following units:

加密单元1001,用于在接收到芯片对应的第一模块传输来的第一数据的情况下,对所述第一数据进行加密处理,以得到加密的第一数据,并将所述加密的第一数据输入所述芯片中的总线;The encryption unit 1001 is configured to, in the case of receiving the first data transmitted by the first module corresponding to the chip, encrypt the first data to obtain encrypted first data, and convert the encrypted first data to a data input bus in the chip;

解密单元1002,用于在有第二数据从所述总线输出的情况下,对所述第二数据进行解密处理,以得到解密的第二数据,并将所述解密的第二数据传输给所述芯片对应的第二模块;Decryption unit 1002, configured to decrypt the second data when the second data is output from the bus to obtain decrypted second data, and transmit the decrypted second data to the The second module corresponding to the chip;

其中,所述第一模块和所述第二模块分别为用于实现相应功能的模块。Wherein, the first module and the second module are respectively modules for realizing corresponding functions.

从上述技术方案可以看出,本申请实施例二提供的一种数据加密传输的处理装置中,在接收到芯片中的第一模块传输来的第一数据时,对第一数据进行加密处理,再将加密的第一数据传输到芯片中的总线,而有第二数据从总线输出时,对第二数据进行解密处理,进而将解密的第二数据传输给芯片中的第二模块。可见,由于芯片中所有模块之间的数据传输与存储都必须依托于总线才能完成,本实施例中通过对传输在总线上的数据进行加密,由此攻击者通过探针探测芯片中的数据时所得到的数据均为经过加密后的数据,而无法获取到任何敏感数据,由此实现对芯片中各个模块传输和存储的数据的保护,同时,无需针对不同模块设计独立的加密方案,从而降低数据加密传输的复杂度,由此在实现芯片中数据加密传输的同时,提高数据加密传输的性能。It can be seen from the above technical solution that in the processing device for encrypted data transmission provided in Embodiment 2 of the present application, when the first data transmitted by the first module in the chip is received, the first data is encrypted, The encrypted first data is then transmitted to the bus in the chip, and when the second data is output from the bus, the second data is decrypted, and then the decrypted second data is transmitted to the second module in the chip. It can be seen that since the data transmission and storage between all modules in the chip must rely on the bus to complete, in this embodiment, by encrypting the data transmitted on the bus, the attacker detects the data in the chip through the probe. The obtained data is all encrypted data, and any sensitive data cannot be obtained, thereby realizing the protection of the data transmitted and stored by each module in the chip, and at the same time, there is no need to design independent encryption schemes for different modules, thereby reducing The complexity of encrypted data transmission improves the performance of encrypted data transmission while realizing encrypted data transmission in the chip.

在一种实现方式中,加密单元1001具体用于:利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据;In an implementation manner, the encryption unit 1001 is specifically configured to: use the target value corresponding to the first data to perform XOR processing on the first data to obtain encrypted first data;

其中,解密单元1002具体用于:利用所述第二数据对应的目标数值对所述第二数据进行异或处理,以得到解密的第二数据。Wherein, the decryption unit 1002 is specifically configured to: use the target value corresponding to the second data to perform XOR processing on the second data to obtain decrypted second data.

基于此,本实施例中的装置还可以包含以下单元,如图11中所示:Based on this, the device in this embodiment may also include the following units, as shown in Figure 11:

地址处理单元1003,用于在加密单元1001接收到芯片中的第一模块传输来的第一数据之前,获得所述第一数据对应的预测目的地址;根据所述预测目的地址,获得所述第一数据对应的目标数值。The address processing unit 1003 is configured to obtain the predicted destination address corresponding to the first data before the encryption unit 1001 receives the first data transmitted by the first module in the chip; according to the predicted destination address, obtain the first data A target value corresponding to data.

进一步的,本实施例中的装置还可以包含如下单元,如图12中所示:Further, the device in this embodiment may also include the following units, as shown in Figure 12:

地址仲裁单元1004,用于在加密单元1001接收到芯片对应的第一模块传输来的第一数据之后,在加密单元1001利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据之前,判断所述第一数据对应的预测目的地址是否与所述第一数据对应的实际目的地址是否相一致;如果一致,触发加密单元1001利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据;如果不一致,触发地址处理单元1003根据所述第一数据对应的实际目的地址,重新获得所述第一数据对应的目标数值,再触发加密单元1001利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据。The address arbitration unit 1004 is configured to, after the encryption unit 1001 receives the first data transmitted from the first module corresponding to the chip, use the target value corresponding to the first data to XOR the first data in the encryption unit 1001 Before processing to obtain the encrypted first data, it is judged whether the predicted destination address corresponding to the first data is consistent with the actual destination address corresponding to the first data; if they are consistent, the encryption unit 1001 is triggered to use the first The target value corresponding to the data performs XOR processing on the first data to obtain the encrypted first data; if they are inconsistent, the trigger address processing unit 1003 reacquires the first data according to the actual destination address corresponding to the first data. The target value corresponding to the data, and then trigger the encryption unit 1001 to perform XOR processing on the first data by using the target value corresponding to the first data, so as to obtain encrypted first data.

具体的,地址处理单元1003获得所述第一数据对应的预测目的地址时,具体用于:获得所述总线最近一次所传输的历史数据的历史目的地址;按照第一预测方式,对所述历史目的地址进行处理,以得到所述第一数据对应的预测目的地址;Specifically, when the address processing unit 1003 obtains the predicted destination address corresponding to the first data, it is specifically used to: obtain the historical destination address of the historical data transmitted by the bus last time; The destination address is processed to obtain the predicted destination address corresponding to the first data;

其中,所述第一预测方式至少基于所述历史数据的历史目的地址与所述历史数据的预测目的地址之间的对应关系、第二预测方式和所述芯片中的中断请求的类型确定,所述第二预测方式为所述第一预测方式被切换之间的预测方式。Wherein, the first prediction method is determined based at least on the correspondence between the historical destination address of the historical data and the predicted destination address of the historical data, the second prediction method, and the type of the interrupt request in the chip, so The second prediction method is a prediction method between which the first prediction method is switched.

具体实现中,所述第二预测方式为:定态递增预测方式、暂态递增预测方式、定态跳转预测方式、暂态跳转预测方式、定态保持预测方式或暂态保持预测方式;In a specific implementation, the second prediction method is: a steady state incremental prediction method, a transient state incremental prediction method, a steady state jump prediction method, a transient state jump prediction method, a steady state maintenance prediction method or a transient state maintenance prediction method;

其中,所述定态递增预测方式、所述暂态递增预测方式、所述定态跳转预测方式和所述暂态跳转预测方式中分别以地址递增的方式在所述历史目的地址的基础上获得预测地址,所述定态保持预测方式和所述暂态保持预测方式中以保持地址的方式在所述历史目的地址的基础上获得预测地址。Wherein, in the steady-state incremental prediction method, the transient incremental prediction method, the steady-state jump prediction method, and the transient jump prediction method, the addresses are incremented on the basis of the historical destination address. The prediction address is obtained on the basis of the historical destination address in the manner of maintaining the address in the steady-state maintaining prediction mode and the transient state maintaining prediction mode.

基于此,在所述第二预测方式为所述定态递增预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址相一致,所述第一预测方式与所述第二预测方式保持一致;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;Based on this, when the second prediction method is the steady-state incremental prediction method, if the historical destination address of the historical data is consistent with the predicted destination address of the historical data, the first prediction method and The second prediction method remains consistent; if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the first prediction method and the first prediction The method is the transient incremental prediction method;

在所述第二预测方式为所述暂态递增预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且所述中断请求为第一中断类型,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且所述中断请求为第二中断类型,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址相一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态递增预测方式;When the second prediction method is the transient increment prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data and the interrupt request is of the first interrupt type, the The second prediction method is switched to the first prediction method and the first prediction method is the transient jump prediction method; if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data And the interrupt request is the second interrupt type, the second prediction method is switched to the first prediction method and the first prediction method is the transient state hold prediction method; if the historical purpose of the historical data The address is consistent with the prediction destination address of the historical data, the second prediction method is switched to the first prediction method and the first prediction method is the steady-state incremental prediction method;

在所述第二预测方式为所述暂态跳转预测方式的情况下,如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址相一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态跳转预测方式;如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址递增的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址保持的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;In the case where the second prediction method is the transient jump prediction method, if the predicted destination address of the historical data is consistent with the predicted destination address of the data transmitted on the bus before the historical data, The second prediction method is switched to the first prediction method and the first prediction method is the static jump prediction method; if the prediction destination address of the historical data and the historical data are transmitted before the The prediction destination address of the data on the bus is the relationship of address increment, the second prediction mode is switched to the first prediction mode and the first prediction mode is the transient increment prediction mode; if the history The predicted destination address of the data and the predicted destination address of the data transmitted on the bus before the historical data is an address hold relationship, the second prediction method is switched to the first prediction method and the first prediction The method is the transient state maintenance prediction method;

在所述第二预测方式为所述定态跳转预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;In the case where the second prediction method is the steady-state jump prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the The first prediction method and the first prediction method is the transient jump prediction method;

在所述第二预测方式为所述暂态保持预测方式的情况下,如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址保持的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态保持预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且没有新的中断请求,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且有新的中断请求,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;In the case where the second prediction mode is the transient hold prediction mode, if the predicted destination address of the historical data and the predicted destination address of the data transmitted on the bus before the historical data are of address hold Relationship, the second prediction method is switched to the first prediction method and the first prediction method is the steady-state maintenance prediction method; if the historical destination address of the historical data and the prediction purpose of the historical data The address is inconsistent and there is no new interrupt request, the second prediction method is switched to the first prediction method and the first prediction method is the transient increment prediction method; if the historical destination address of the historical data is the same as The prediction destination address of the historical data is inconsistent and there is a new interrupt request, the second prediction method is switched to the first prediction method and the first prediction method is the transient jump prediction method;

在所述第二预测方式为所述定态保持预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式。In the case where the second prediction method is the steady-state maintenance prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the A first prediction method and the first prediction method is the transient state-holding prediction method.

在一种实现方式中,本实施例中的装置还可以包含如下单元,如图13中所示:In an implementation manner, the device in this embodiment may further include the following units, as shown in Figure 13:

加密判断单元1005,用于在加密单元1001对所述第一数据进行加密处理,以得到加密的第一数据之前,读取预设的第一配置参数;在所述第一配置参数表征需要进行数据加密的情况下,触发加密单元1001对所述第一数据进行加密处理,以得到加密的第一数据;在所述第一配置参数表征不需要进行数据加密的情况下,触发加密单元1001将所述第一数据输入所述总线;The encryption judging unit 1005 is configured to read the preset first configuration parameter before the encryption unit 1001 encrypts the first data to obtain the encrypted first data; In the case of data encryption, the trigger encryption unit 1001 encrypts the first data to obtain encrypted first data; when the first configuration parameter indicates that data encryption is not required, the trigger encryption unit 1001 will the first data is input to the bus;

解密判断单元1006,用于在解密单元1002对所述第二数据进行解密处理,以得到解密的第二数据之前,读取预设的第二配置参数;在所述第二配置参数表征需要进行数据解密的情况下,触发解密单元1002对所述第二数据进行解密处理,以得到解密的第二数据;在所述第二配置参数表征不需要进行数据解密的情况下,触发解密单元1002将所述第二数据传输给所述芯片对应的第二模块。The decryption judging unit 1006 is configured to read a preset second configuration parameter before the decryption unit 1002 decrypts the second data to obtain the decrypted second data; In the case of data decryption, trigger the decryption unit 1002 to decrypt the second data to obtain decrypted second data; The second data is transmitted to a second module corresponding to the chip.

需要说明的是,本实施例中各单元的具体实现可以参考前文中的相应内容,此处不再详述。It should be noted that, for the specific implementation of each unit in this embodiment, reference may be made to the corresponding contents above, and details are not described here again.

参考图14,为本申请实施例三提供的一种芯片的结构示意图,该芯片可以为需要进行探针攻击防护的芯片,如SoC芯片等,以实现对芯片上的数据保护。Referring to FIG. 14 , it is a schematic structural diagram of a chip provided by Embodiment 3 of the present application. The chip may be a chip that needs to be protected against probe attacks, such as a SoC chip, to realize data protection on the chip.

具体的,本实施例中的芯片可以包含如下模块:Specifically, the chip in this embodiment may include the following modules:

总线1401,用于实现芯片对应的各个模块之间的数据传输,这里的模块可以为芯片中所包含的功能模块,如CPU模块或DMA模块等;或者,这里的模块也可以为芯片所连接的外部模块,如外接设备或片外存储等。The bus 1401 is used to implement data transmission between the modules corresponding to the chip. The modules here can be functional modules included in the chip, such as CPU modules or DMA modules, etc.; or, the modules here can also be connected to the chip. External modules, such as external devices or off-chip storage, etc.

处理模块1402,用于:在接收到所述芯片对应的第一模块1403传输来的第一数据的情况下,对所述第一数据进行加密处理,以得到加密的第一数据,并将所述加密的第一数据输入所述总线1401;The processing module 1402 is configured to: in the case of receiving the first data transmitted by the first module 1403 corresponding to the chip, encrypt the first data to obtain encrypted first data, and convert the inputting the encrypted first data into the bus 1401;

所述处理模块1402,还用于:在有第二数据从所述总线1401输出的情况下,对所述第二数据进行解密处理,以得到解密的第二数据,并将所述解密的第二数据传输给所述芯片对应的第二模块1404;The processing module 1402 is further configured to: when there is second data output from the bus 1401, decrypt the second data to obtain decrypted second data, and convert the decrypted first The second data is transmitted to the second module 1404 corresponding to the chip;

其中,所述第一模块1403和所述第二模块1404分别为用于实现相应功能的模块。Wherein, the first module 1403 and the second module 1404 are respectively modules for realizing corresponding functions.

从上述技术方案可以看出,本申请实施例三提供的一种芯片中,在接收到芯片中的第一模块传输来的第一数据时,对第一数据进行加密处理,再将加密的第一数据传输到芯片中的总线,而有第二数据从总线输出时,对第二数据进行解密处理,进而将解密的第二数据传输给芯片中的第二模块。可见,由于芯片中所有模块之间的数据传输与存储都必须依托于总线才能完成,本实施例中通过对传输在总线上的数据进行加密,由此攻击者通过探针探测芯片中的数据时所得到的数据均为经过加密后的数据,而无法获取到任何敏感数据,由此实现对芯片中各个模块传输和存储的数据的保护,同时,无需针对不同模块设计独立的加密方案,从而降低数据加密传输的复杂度,由此在实现芯片中数据加密传输的同时,提高数据加密传输的性能。It can be seen from the above technical solution that in the chip provided by Embodiment 3 of the present application, when the first data transmitted by the first module in the chip is received, the first data is encrypted, and then the encrypted second data is encrypted. One piece of data is transmitted to the bus in the chip, and when the second data is output from the bus, the second data is decrypted, and then the decrypted second data is transmitted to the second module in the chip. It can be seen that since the data transmission and storage between all modules in the chip must rely on the bus to complete, in this embodiment, by encrypting the data transmitted on the bus, the attacker detects the data in the chip through the probe. The obtained data is all encrypted data, and any sensitive data cannot be obtained, thereby realizing the protection of the data transmitted and stored by each module in the chip, and at the same time, there is no need to design independent encryption schemes for different modules, thereby reducing The complexity of encrypted data transmission improves the performance of encrypted data transmission while realizing encrypted data transmission in the chip.

具体实现中,处理模块1402中可以通过配置加密单元、解密单元、地址仲裁单元等功能单元实现相应的功能。In a specific implementation, the processing module 1402 may implement corresponding functions by configuring functional units such as an encryption unit, a decryption unit, and an address arbitration unit.

需要说明的是,本实施例中处理模块1402的具体实现可以参考前文中的相应内容,此处不再详述。It should be noted that, for the specific implementation of the processing module 1402 in this embodiment, reference may be made to the corresponding contents above, and details are not described here again.

以芯片为SoC芯片为例,为了实现SoC芯片的探针攻击防护,本实施例中对SoC芯片中进行数据加密传输的处理方案进行改进,以下对改进过程以及改进的技术方案进行详细说明:Taking the chip as an SoC chip as an example, in order to realize the probe attack protection of the SoC chip, in this embodiment, the processing scheme for data encryption transmission in the SoC chip is improved. The improvement process and the improved technical solution are described in detail below:

本申请的发明人在对探针攻击进行研究的过程中发现:探针攻击的重点目标主要有四个部分:片上数据传输、片上数据存储、对外接口通信和片外数据存储。由于不同功能模块的数据传输协议和电路结构不同,如果对每个目标的数据进行单独的加密保护,每个模块都必须设计独立的数据加密模块。这种数据保护方式一方面实现过程复杂,另一方面也必然造成很大的硬件面积开销。The inventors of this application found in the process of researching the probe attack that the key targets of the probe attack mainly include four parts: on-chip data transmission, on-chip data storage, external interface communication and off-chip data storage. Due to the different data transmission protocols and circuit structures of different functional modules, if the data of each target is individually encrypted and protected, an independent data encryption module must be designed for each module. On the one hand, the implementation process of this data protection method is complicated, and on the other hand, it will inevitably cause a large hardware area overhead.

有鉴于此,本申请的发明人经过进一步研究,提出通过总线数据加密的技术方案。其中,系统总线作为SoC芯片中各功能模块连接和通信的“桥梁”,所有功能模块之间的数据传输和存储都必须依托于系统总线才能完成。因此,通过对系统总线上传输的数据进行加密,即可实现对各模块传输和存储数据的加密保护,攻击者通过探针探测以上四个重点目标,得到的都是经过加密以后的乱数,而无法获取到任何的有效信息。因此,本申请所提出的总线数据加密能够保护各功能模块之间数据传输和存储的安全性。In view of this, the inventor of the present application proposes a technical solution for encrypting data through the bus after further research. Among them, the system bus is used as a "bridge" for the connection and communication of various functional modules in the SoC chip, and the data transmission and storage between all functional modules must rely on the system bus to complete. Therefore, by encrypting the data transmitted on the system bus, the encrypted protection of the data transmitted and stored by each module can be realized. The attacker detects the above four key targets through the probe, and all the encrypted random numbers are obtained. Unable to obtain any valid information. Therefore, the bus data encryption proposed in this application can protect the security of data transmission and storage between functional modules.

同时,由于总线数据加密必然造成一定的总线数据传输性能损耗,因此,本申请的发明人进一步研究如何在保证数据加密安全性的同时,尽可能地减小总线数据传输性能损耗,从而确保整个SoC芯片整体运算性能。At the same time, because bus data encryption will inevitably cause a certain bus data transmission performance loss, therefore, the inventors of the present application further study how to reduce the bus data transmission performance loss as much as possible while ensuring the security of data encryption, so as to ensure that the entire SoC The overall computing performance of the chip.

有鉴于此,本申请的发明人针对总线数据传输受到实际用户应用程序的影响具有较大的不确定性的现状,提出使用分组密码算法实现对总线数据的加密传输。其中,分组密码算法能够实现加密安全性、硬件开销和加密性能的平衡,且不存在密钥流同步问题,能够适用于总线数据加密。而分组密码算法进行数据加密的模式有很多种,其中包含有计数器模式。其中计数器模式中提前利用加密算法对计数器的计数值进行加密,得到一组乱数,并与当前数据进行异或操作得到密文。对于计数器模式来说,可提前完成大部分加密操作,涉及当前数据的操作仅有异或运算,是所有加密模式中加密速度最快的模式。本申请中采用分组密码算法中的计数器加密的处理方式能够提高数据加密的效率。In view of this, the inventor of the present application proposes to use a block cipher algorithm to realize the encrypted transmission of bus data in view of the current situation that bus data transmission is affected by actual user application programs and has great uncertainty. Among them, the block cipher algorithm can achieve the balance of encryption security, hardware overhead and encryption performance, and there is no key stream synchronization problem, and can be applied to bus data encryption. There are many modes for block cipher algorithm to encrypt data, including counter mode. In the counter mode, the encryption algorithm is used to encrypt the count value of the counter in advance to obtain a set of random numbers, and XOR operation with the current data to obtain the ciphertext. For the counter mode, most of the encryption operations can be completed in advance, and the operation involving the current data is only the XOR operation, which is the fastest encryption mode among all encryption modes. In this application, the processing method of using the counter encryption in the block cipher algorithm can improve the efficiency of data encryption.

但是,在SoC芯片中,在使用计数器加密的处理方式进行总线数据的加密操作时,需要提前存储计数器的计数值,在解密时,需要利用当前加密的计数值进行解密。如果SoC芯片的敏感数据较多,加密任务量较大的时候,需要存储的计数器值的空间巨大,给SoC芯片带来巨大的负担。However, in the SoC chip, when using the counter encryption processing method to encrypt bus data, the count value of the counter needs to be stored in advance, and when decrypting, the current encrypted count value needs to be used for decryption. If the SoC chip has a lot of sensitive data and the encryption task is large, the counter value needs to be stored in a huge space, which brings a huge burden to the SoC chip.

有鉴于此,本申请的发明人经过进一步研究,提出在总线数据加密传输的过程中使用数据地址来代替计数值,从而无需存储大量计数值,由此节省空间占用,降低SoC芯片的负担。具体的,在总线数据传输过程中,数据与地址一一对应,利用数据的地址来替代计数器的计数值,降低对片内存储资源的需求。可见,本申请中利用计数器加密的处理方式进行数据加密,提前对总线地址进行加密得到一组乱数,数据与乱数进行异或操作得到密文并传输,传输的密文能够有效保证数据的安全性,同时基于数据地址的计数值替代方案可有效解决密钥流同步问题,减轻芯片负担。In view of this, the inventor of the present application has made further research and proposed to use the data address instead of the count value in the process of bus data encrypted transmission, so that there is no need to store a large number of count values, thereby saving space and reducing the burden on the SoC chip. Specifically, in the bus data transmission process, the data corresponds to the address one by one, and the counting value of the counter is replaced by the address of the data, thereby reducing the demand for on-chip storage resources. It can be seen that in this application, the processing method of counter encryption is used to encrypt data, and the bus address is encrypted in advance to obtain a set of random numbers, and the data and random numbers are XORed to obtain ciphertext and transmit it. The transmitted ciphertext can effectively ensure the security of data , and the counter value alternative based on the data address can effectively solve the key stream synchronization problem and reduce the burden on the chip.

综上,本申请提出了一种抗探针攻击的可配置高效总线数据加密方法,其核心主要包含以下三个方面:总线数据加密流水线、三级动态分支预测器和安全系统总线架构。这三者相互配合,能够在对总线上传输的敏感数据进行加密保护的前提下,有效解决密钥流同步问题,最大限度降低数据加密造成的总线数据传输性能损耗。具体如下:To sum up, this application proposes a configurable and efficient bus data encryption method against probe attacks. Its core mainly includes the following three aspects: bus data encryption pipeline, three-level dynamic branch predictor and secure system bus architecture. These three cooperate with each other to effectively solve the problem of key stream synchronization and minimize the performance loss of bus data transmission caused by data encryption under the premise of encrypting and protecting sensitive data transmitted on the bus. details as follows:

1、总线数据加密流水线1. Bus data encryption pipeline

本申请提出了一种数据加密流水线,通过增加预加密过程来降低耗时,达到提高效率的目的。This application proposes a data encryption pipeline, which reduces time consumption and improves efficiency by adding a pre-encryption process.

整个数据加密流水线的运行过程如图15所示,主要由地址预取AF(AddressFetching)、地址预加密APE(Address Pre-Encryption)、预测地址仲裁PAA(PredictedAddress Arbitration)和数据加密DE(Data Encryption)四个阶段组成。基于此,每个数据包均经历以上四个阶段的处理,且相邻的数据包依次在相邻的时隙上进行处理,实现数据加密流水线,如图15中所示,时隙T1到时隙T7分别处理一个数据包,每个时隙处理一个阶段。以一个数据包的处理为例,具体如下:The operation process of the entire data encryption pipeline is shown in Figure 15. It mainly consists of address pre-fetching AF (Address Fetching), address pre-encryption APE (Address Pre-Encryption), predicted address arbitration PAA (Predicted Address Arbitration) and data encryption DE (Data Encryption) It consists of four stages. Based on this, each data packet undergoes the above four stages of processing, and adjacent data packets are sequentially processed on adjacent time slots to realize the data encryption pipeline, as shown in Figure 15, when time slot T1 expires Slot T7 handles one data packet respectively, and each slot handles one stage. Take the processing of a data packet as an example, as follows:

AF获取敏感数据的预测地址R,这里的敏感数据可以理解为前文中所提到的第一数据,即需要进行传输的数据,这里的预测地址R即为前文中的第一数据对应的预测目的地址,而APE使用密钥K加密R。密钥K加密R所得到的密文P可表示为式(1)。AF obtains the predicted address R of sensitive data. The sensitive data here can be understood as the first data mentioned above, that is, the data that needs to be transmitted. The predicted address R here is the prediction purpose corresponding to the first data mentioned above. address, while APE encrypts R with key K. The ciphertext P obtained by encrypting R with the key K can be expressed as formula (1).

Figure BDA0003031474760000251
Figure BDA0003031474760000251

而PAA验证预测地址R是否与实际地址A相等,这里的实际地址即为前文中的第一数据对应的实际目的地址,如式(2)所示,如果R与A相等,则DE在密文P和Ψ之间执行异或运算,得到加密的敏感数据D。如果R与A不相等,APE加密实际地址A,再用Ψ和加密A所得到的密文执行异或运算。PAA verifies whether the predicted address R is equal to the actual address A, where the actual address is the actual destination address corresponding to the first data in the previous text, as shown in formula (2), if R is equal to A, then DE is in the ciphertext Execute XOR operation between P and Ψ to get encrypted sensitive data D. If R is not equal to A, APE encrypts the actual address A, and then uses Ψ and the ciphertext obtained by encrypting A to perform XOR operation.

Figure BDA0003031474760000252
Figure BDA0003031474760000252

其中,AF和APE的操作与数据传输是独立完成的,因而应当在数据传输之前执行,以提高数据加密效率。Among them, the operation and data transmission of AF and APE are completed independently, so they should be executed before data transmission to improve data encryption efficiency.

2、三级动态分支预测器2. Three-level dynamic branch predictor

在SoC芯片中,总线数据传输按照地址特点进行区分可以分为三种:地址不变、地址递增和地址跳转。本实施例中为了覆盖SoC芯片中的数据传输情况,提出了一种三级动态分支预测器,其状态转移图如图16所示。其中,100和101分别表示定态预测递增地址的预测方式和暂态预测递增地址的预测方式,即前文中的定态递增预测方式和暂态递增预测方式;010和011分别表示定态预测跳转地址的预测方式和暂态预测跳转地址的预测方式,即前文中的定态跳转预测方式和暂态跳转预测方式;000和001分别表示定态预测当前地址的预测方式和暂态预测当前地址的预测方式,即前文中的定态保持预测方式和暂态保持预测方式。In the SoC chip, the bus data transmission can be divided into three types according to the characteristics of the address: the address does not change, the address increases and the address jumps. In this embodiment, in order to cover the data transmission situation in the SoC chip, a three-level dynamic branch predictor is proposed, and its state transition diagram is shown in FIG. 16 . Among them, 100 and 101 respectively represent the prediction method of the steady-state prediction increment address and the prediction method of the transient state prediction increment address, that is, the steady-state increment prediction method and the transient state increment prediction method in the above text; 010 and 011 respectively represent the steady-state prediction jump The prediction method of the jump address and the prediction method of the jump address in the transient state, that is, the steady state jump prediction method and the transient state jump prediction method in the previous article; 000 and 001 respectively represent the prediction method and transient state of the current address in the steady state prediction The prediction method of predicting the current address, that is, the steady-state hold prediction method and the transient state hold prediction method mentioned above.

其中,以CPU连续向SRAM空间内写入数据为例,介绍三级动态分支预测器的状态转移过程,即预测方式的切换过程。Among them, taking the CPU continuously writing data into the SRAM space as an example, the state transfer process of the three-level dynamic branch predictor, that is, the switching process of the prediction mode is introduced.

首先,在分支预测器处于定态预测递增地址的状态,即当前状态为100,当接口、定时器或者程序异常等因素产生中断请求时,CPU暂停向SRAM写入数据操作,跳转到中断处理程序并执行中断操作,总线数据传输地址发生改变,分支预测器检测到总线实际传输地址与预测地址不一致,分支预测器的状态跳转到101,进入暂态预测递增地址的状态,执行一次递增预测操作,当预测的地址与实际传输地址一致时,则预测正确,分支预测器的状态跳转到100。First of all, when the branch predictor is in the state of steady-state prediction increment address, that is, the current state is 100, when the interface, timer or program abnormality and other factors generate an interrupt request, the CPU suspends the operation of writing data to the SRAM and jumps to the interrupt processing The program executes the interrupt operation, the data transmission address of the bus changes, the branch predictor detects that the actual transmission address of the bus is inconsistent with the predicted address, the state of the branch predictor jumps to 101, enters the state of transient prediction increment address, and performs an increment prediction Operation, when the predicted address is consistent with the actual transfer address, the prediction is correct, and the state of the branch predictor jumps to 100.

在分支预测器处于暂态预测递增地址的状态时,如果存在更高权限的中断请求时,CPU执行更高级别的中断请求,预测的地址预实际传输地址不一致,则预测发生错误,分支预测器的状态跳转到011,进入暂态预测跳转地址的状态,执行一次递增预测操作。当下一次的预测地址与当前地址一致,状态跳转到010,进入定态预测跳转地址的状态,执行预测地址递增操作,直到高级别中断执行完毕,预测器的预测地址发生错误,分支预测器的状态跳转到011。When the branch predictor is in the state of transiently predicting the increment address, if there is a higher-level interrupt request, the CPU executes a higher-level interrupt request, and the predicted address is inconsistent with the actual transfer address, the prediction error occurs, and the branch predictor The state jumps to 011, enters the state of the transient prediction jump address, and performs an incremental prediction operation. When the next predicted address is consistent with the current address, the state jumps to 010, enters the state of steady-state predicted jump address, and executes the predicted address increment operation until the execution of the high-level interrupt is completed, the predicted address of the predictor is wrong, and the branch predictor The status jumps to 011.

在分支预测器处于暂态预测跳转地址的状态时,如果下一次的预测地址与当前地址不一致且下一次的预测地址与上一次的实际地址保持不变,此时分支预测器的状态跳转到001,进入暂态预测当前地址的状态,而如果下一次的预测地址与当前地址不一致且下一次的预测地址与上一次的实际地址是递增的关系,那么分支预测器的状态跳转到101,进入暂态预测递增地址的状态。When the branch predictor is in the state of transiently predicting the jump address, if the next predicted address is inconsistent with the current address and the next predicted address remains unchanged from the previous actual address, the state of the branch predictor will jump To 001, enter the state of transiently predicting the current address, and if the next predicted address is inconsistent with the current address and the relationship between the next predicted address and the last actual address is incremental, then the state of the branch predictor jumps to 101 , enter the state where the transient prediction increments the address.

在分支预测器处于暂态预测递增地址的状态时,如果低级别中断需要对接口进行读写操作,分支预测器的状态由101跳转到001,进入暂态预测当前地址的状态,执行一次当前预测操作。当下一次的地址预测地址与当前地址一致时,分支预测器的状态跳转到000,进入连续预测当前地址的状态。当数据读写操作完成后,处理器执行中断前操作,即SRAM写操作,分支预测器预测的地址与实际地址不一致,分支预测器的状态跳转到001,进入暂态预测当前地址的状态,执行一次当前预测操作。分支预测器预测的地址与中断前执行地址不一致,如果没有中断请求,分支预测器状态跳转到101,否则,跳转到011。When the branch predictor is in the state of transiently predicting the increment address, if the low-level interrupt needs to read and write the interface, the state of the branch predictor jumps from 101 to 001, enters the state of transiently predicting the current address, and executes the current Forecast operations. When the next address prediction address is consistent with the current address, the state of the branch predictor jumps to 000 and enters the state of continuously predicting the current address. When the data read and write operation is completed, the processor performs the pre-interrupt operation, that is, the SRAM write operation, the address predicted by the branch predictor is inconsistent with the actual address, the state of the branch predictor jumps to 001, and enters the state of transiently predicting the current address. Executes the current forecast operation once. The address predicted by the branch predictor is inconsistent with the execution address before the interrupt. If there is no interrupt request, the branch predictor state jumps to 101, otherwise, jumps to 011.

3、安全系统总线架构3. Security system bus architecture

基于以上提出的可配置总线数据加密方案,本申请中提出一套安全系统总线架构,配置在SoC芯片中,如图17中所示。整个可配置安全系统总线架构主要由可配置加密管理模块CEMM(Configurable Encryption Management Module)、地址加密引擎AEE(AddressEncryption Engine)、分支预测器BP(Branch Predictor)、数据加密控制器DEC(DataEncryption Controller)、地址仲裁器AA(Address Arbiter,)、数据加密单元DEE(DataEncryption Engine,)和数据解密单元DDE(Data Decryption Engine)组成。Based on the configurable bus data encryption scheme proposed above, this application proposes a set of secure system bus architecture, which is configured in the SoC chip, as shown in FIG. 17 . The entire configurable security system bus architecture is mainly composed of configurable encryption management module CEMM (Configurable Encryption Management Module), address encryption engine AEE (Address Encryption Engine), branch predictor BP (Branch Predictor), data encryption controller DEC (DataEncryption Controller), It is composed of address arbitrator AA (Address Arbiter,), data encryption unit DEE (Data Encryption Engine,) and data decryption unit DDE (Data Decryption Engine).

以数据写过程为例。用户将加/解密参数γ={γWS,γWM,γRS,γRM}写入CEMM,以控制数据加/解密流。其中,γWS和γWM为Master对Slave进行写操作时敏感数据从Master通过总线向Slave传输时的配置参数,γRS和γRM为Master对Slave进行读操作时敏感数据从Slave通过总线向Master传输时的配置参数。其中,γWS和γRM为1时,表征需要进行数据解密,γWM和γRS为1时,表征需要进行数据加密。Take the data writing process as an example. The user writes encryption/decryption parameters γ={γ WS , γ WM , γ RS , γ RM } into the CEMM to control data encryption/decryption flow. Among them, γ WS and γ WM are the configuration parameters when the sensitive data is transmitted from the Master to the Slave through the bus when the Master writes to the Slave, and γ RS and γ RM are the sensitive data when the Master performs a read operation on the Slave from the Slave to the Master through the bus Configuration parameters at transfer time. Wherein, when γ WS and γ RM are 1, data decryption is required for characterization, and when γ WM and γ RS are 1, data encryption is required for characterization.

其中,在数据写过程中,BP预测数据传输的下一个地址并发送给AEE,AEE对BP预测的地址R进行加密。DEC根据CEMM给出的配置参数选择DEE是否执行加密操作以及DDE是否执行解密操作。这里的加密操作和解密操作均为是将预测的地址R加密后得到的乱数P与敏感数据Ψ进行异或运算。Among them, in the process of data writing, BP predicts the next address of data transmission and sends it to AEE, and AEE encrypts the address R predicted by BP. DEC selects whether DEE performs encryption operation and whether DDE performs decryption operation according to the configuration parameters given by CEMM. Both the encryption operation and the decryption operation here are XOR operations on the random number P obtained after encrypting the predicted address R and the sensitive data Ψ.

具体的,AA判断预测地址R是否与实际地址A一致。如果R与A一致,则在执行DEE之后,得到经过加密的写数据D,之后,经过加密的写数据D被传输到总线;否则,可以确定R预测错误,此时,由AEE对实际地址A用K进行加密得到P,再由DEE使用P对敏感数据Ψ进行异或运算,得到经过加密的写数据D,之后,经过加密的写数据D被传输到总线。Specifically, AA judges whether the predicted address R is consistent with the actual address A. If R is consistent with A, then after executing DEE, the encrypted write data D is obtained, and then the encrypted write data D is transmitted to the bus; otherwise, it can be determined that R is wrongly predicted, and at this time, the actual address A is determined by AEE Encrypt with K to get P, and then DEE uses P to perform XOR operation on the sensitive data Ψ to get encrypted write data D, and then the encrypted write data D is transmitted to the bus.

在总线将D传输到Slave时,先通过AA判断预测地址R是否与实际地址A一致,如果一致,则由DDE对D使用P进行异或运算,得到解密的数据Γ,如果不一致,则由AEE对实际地址A用K进行加密得到P,再由DDE使用P对D进行异或运算,得到解密的数据Γ。When the bus transfers D to Slave, first use AA to judge whether the predicted address R is consistent with the actual address A. If they are consistent, DDE will use P to perform an XOR operation on D to obtain the decrypted data Γ. If they are inconsistent, AEE will The actual address A is encrypted with K to obtain P, and then DDE uses P to perform XOR operation on D to obtain the decrypted data Γ.

对于在数据读过程的过程类似,BP预测数据传输的下一个地址并发送给AEE,AEE对BP预测的地址R`进行加密。DEC根据CEMM给出的配置参数选择DEE是否执行加密操作以及DDE是否执行解密操作。这里的加密操作和解密操作均为是将预测的地址R`加密后得到的乱数P`与敏感数据Ψ`进行异或运算。Similar to the process in the data reading process, BP predicts the next address of data transmission and sends it to AEE, and AEE encrypts the address R` predicted by BP. DEC selects whether DEE performs encryption operation and whether DDE performs decryption operation according to the configuration parameters given by CEMM. The encryption operation and decryption operation here are XOR operation of the random number P` obtained after encrypting the predicted address R` and the sensitive data Ψ`.

具体的,AA判断预测地址R`是否与实际地址A`一致。如果R`与A`一致,则在执行DEE之后,得到经过加密的读数据D`,之后,经过加密的读数据D`被传输到总线;否则,可以确定R`预测错误,此时,由AEE对实际地址A`用K进行加密得到P`,再由DEE使用P`对敏感数据Ψ`进行异或运算,得到经过加密的读数据D`,之后,经过加密的读数据D`被传输到总线。Specifically, the AA judges whether the predicted address R' is consistent with the actual address A'. If R` is consistent with A`, after executing DEE, the encrypted read data D` is obtained, and then the encrypted read data D` is transmitted to the bus; otherwise, it can be determined that R` is wrong in prediction, at this time, by AEE encrypts the actual address A` with K to obtain P`, and then DEE uses P` to perform XOR operation on the sensitive data Ψ` to obtain encrypted read data D`, and then the encrypted read data D` is transmitted to the bus.

在总线将D`传输到Master时,先通过AA判断预测地址R`是否与实际地址A`一致,如果一致,则由DDE对D`使用P`进行异或运算,得到解密的数据Γ`,如果不一致,则由AEE对实际地址A`用K进行加密得到P`,再由DDE使用P`对D`进行异或运算,得到解密的数据Γ`。When the bus transmits D` to the Master, first judge whether the predicted address R` is consistent with the actual address A` through AA, and if they are consistent, DDE will use P` to perform an XOR operation on D` to obtain the decrypted data Γ`, If not, AEE encrypts the actual address A` with K to obtain P`, and then DDE uses P` to perform XOR operation on D` to obtain the decrypted data Γ`.

基于以上安全系统总线架构,本申请中提出如图18中算法1所示的系统总线写传输算法:Based on the above security system bus architecture, this application proposes a system bus write transmission algorithm as shown in Algorithm 1 in Figure 18:

其中,配置参数γ={γWS,γWM,γRS,γRM}由用户写入,参数值为1表示数据加/解密,参数为0表示不进行数据加/解密。Among them, the configuration parameter γ={γ WS , γ WM , γ RS , γ RM } is written by the user, the value of the parameter is 1, which means data encryption/decryption, and the parameter value is 0, which means no data encryption/decryption.

当主机需要进行写数据传输时,首先判断γWM是否为“1”。若γWM为1,则表示主机发出的数据Ψ需要进行加密后写入系统总线。此时,若预测地址R和实际地址A相等,则表示预测正确,系统总线上传输的实际内容D为预测地址加密后的乱数EK(R)与明文数据Ψ的异或结果;When the host needs to write data transmission, it first judges whether γ WM is "1". If γ WM is 1, it means that the data Ψ sent by the host needs to be encrypted and then written to the system bus. At this time, if the predicted address R is equal to the actual address A, it means that the prediction is correct, and the actual content D transmitted on the system bus is the XOR result of the encrypted random number E K (R) of the predicted address and the plaintext data Ψ;

反之,则说明预测错误,需要首先将实际地址A进行加密后得到乱数EK(A),再将乱数EK(A)与明文数据Ψ进行异或得到系统总线传输内容D。若γWM≠1,则总线上传输的内容D无需进行加密,直接就是主机发出的明文数据Ψ。On the contrary, it means that the prediction is wrong. It is necessary to first encrypt the actual address A to obtain the random number E K (A), and then XOR the random number E K (A) with the plaintext data Ψ to obtain the transmission content D of the system bus. If γ WM ≠1, the content D transmitted on the bus does not need to be encrypted, and is directly the plaintext data Ψ sent by the host.

当从机进行数据接收时,首先判断γWS是否为“1”。若γWS为1,则表示从机需要首先将数据进行解密后接收。此时,若预测地址R和实际地址A相等(从机侧的地址就是总线地址,即主机发出的地址),则表示预测正确,从机受到的实际内容Γ为预测地址加密后的乱数EK(R)与总线数据D的异或结果;When the slave receives data, it first judges whether γ WS is "1". If γ WS is 1, it means that the slave needs to decrypt the data before receiving it. At this time, if the predicted address R is equal to the actual address A (the address on the slave side is the bus address, that is, the address sent by the master), it means that the prediction is correct, and the actual content Γ received by the slave is the random number E K encrypted by the predicted address (R) XOR result with bus data D;

反之,则说明预测错误,需要首先将实际地址A进行加密后得到乱数EK(A),再将乱数EK(A)与总线数据D进行异或得到从机接收内容Γ。若γWS不为1,则从机接收的内容Γ无需进行解密,直接就是总线数据D。On the contrary, it means that the prediction is wrong. It is necessary to first encrypt the actual address A to obtain the random number E K (A), and then XOR the random number E K (A) with the bus data D to obtain the content Γ received by the slave. If γ WS is not 1, the content Γ received by the slave does not need to be decrypted, and it is the bus data D directly.

同理,数据的读传输过程与以上写过程类似,在此不再赘述。Similarly, the data read and transfer process is similar to the above write process, and will not be repeated here.

综上,本申请针对探针攻击造成敏感信息泄露的问题,提出可配置的总线数据加/解密方法,依据配置信息对数据自适应加密或解密,减少了总线数据加密的工作量和等待延迟,设计了总线数据加密流水和三级动态分支预测器来预取数据传输地址,提升了总线传输数据的加/解密执行效率,保证了SoC芯片数据传输效率和和整体运算性能,最终形成可配置高效总线数据加密模型,实现了SoC芯片中数据传输/存储的加密保护,有效提升了SoC芯片的抗探针攻击能力。To sum up, this application proposes a configurable bus data encryption/decryption method for the problem of sensitive information leakage caused by probe attacks, and adaptively encrypts or decrypts data based on configuration information, reducing the workload and waiting delay of bus data encryption. The bus data encryption pipeline and three-level dynamic branch predictor are designed to prefetch the data transmission address, which improves the encryption/decryption execution efficiency of the bus transmission data, ensures the data transmission efficiency of the SoC chip and the overall computing performance, and finally forms a configurable and efficient The bus data encryption model realizes the encryption protection of data transmission/storage in the SoC chip, and effectively improves the anti-probe attack capability of the SoC chip.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for relevant details, please refer to the description of the method part.

专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Professionals can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the possible For interchangeability, in the above description, the composition and steps of each example have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.

结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be directly implemented by hardware, software modules executed by a processor, or a combination of both. Software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other Any other known storage medium.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the application. Therefore, the present application will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1.一种数据加密传输的处理方法,其特征在于,所述方法包括:1. A processing method for encrypted data transmission, characterized in that the method comprises: 在接收到芯片对应的第一模块传输来的第一数据的情况下,对所述第一数据进行加密处理,以得到加密的第一数据,并将所述加密的第一数据输入所述芯片中的总线;In the case of receiving the first data transmitted from the first module corresponding to the chip, encrypting the first data to obtain encrypted first data, and inputting the encrypted first data into the chip in the bus; 在有第二数据从所述总线输出的情况下,对所述第二数据进行解密处理,以得到解密的第二数据,并将所述解密的第二数据传输给所述芯片对应的第二模块;When there is second data output from the bus, decrypt the second data to obtain decrypted second data, and transmit the decrypted second data to the corresponding second chip of the chip. module; 所述对所述第一数据进行加密处理,以得到加密的第一数据,包括:The encrypting the first data to obtain the encrypted first data includes: 利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据;performing XOR processing on the first data by using the target value corresponding to the first data to obtain encrypted first data; 在所述接收到芯片中的第一模块传输来的第一数据之前,所述方法还包括:Before receiving the first data transmitted by the first module in the chip, the method further includes: 获得所述第一数据对应的预测目的地址;Obtain a predicted destination address corresponding to the first data; 根据所述预测目的地址,获得所述第一数据对应的目标数值;Obtaining a target value corresponding to the first data according to the predicted destination address; 其中,所述获得所述第一数据对应的预测目的地址,包括:Wherein, the obtaining the predicted destination address corresponding to the first data includes: 获得所述总线最近一次所传输的历史数据的历史目的地址;Obtain the historical destination address of the historical data transmitted by the bus last time; 按照第一预测方式,对所述历史目的地址进行处理,以得到所述第一数据对应的预测目的地址;Processing the historical destination address according to the first prediction mode to obtain the predicted destination address corresponding to the first data; 其中,所述第一预测方式至少基于所述历史数据的历史目的地址与所述历史数据的预测目的地址之间的对应关系、第二预测方式和所述芯片中的中断请求的类型确定,所述第二预测方式为所述第一预测方式被切换之前的预测方式,所述第二预测方式为:定态递增预测方式、暂态递增预测方式、定态跳转预测方式、暂态跳转预测方式、定态保持预测方式或暂态保持预测方式;Wherein, the first prediction method is determined based at least on the correspondence between the historical destination address of the historical data and the predicted destination address of the historical data, the second prediction method, and the type of the interrupt request in the chip, so The second prediction method is the prediction method before the first prediction method is switched, and the second prediction method is: a steady state incremental prediction method, a transient incremental prediction method, a steady state jump prediction method, and a transient state jump prediction method. Prediction mode, steady state maintenance prediction mode or transient state maintenance prediction mode; 其中,所述定态递增预测方式、所述暂态递增预测方式、所述定态跳转预测方式和所述暂态跳转预测方式中分别以地址递增的方式在所述历史目的地址的基础上获得预测地址,所述定态保持预测方式和所述暂态保持预测方式中以保持地址的方式在所述历史目的地址的基础上获得预测地址;Wherein, in the steady-state incremental prediction method, the transient incremental prediction method, the steady-state jump prediction method, and the transient jump prediction method, the addresses are incremented on the basis of the historical destination address. Obtain the predicted address on the basis of the historical destination address in the manner of maintaining the address in the steady-state maintenance prediction mode and the transient-state maintenance prediction mode; 在所述第二预测方式为所述定态递增预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址相一致,所述第一预测方式与所述第二预测方式保持一致;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;In the case where the second prediction method is the steady-state incremental prediction method, if the historical destination address of the historical data is consistent with the predicted destination address of the historical data, the first prediction method is the same as the second prediction method. The two prediction methods are consistent; if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the first prediction method and the first prediction method is the Describe the transient incremental prediction method; 在所述第二预测方式为所述暂态递增预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且所述中断请求为第一中断类型,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且所述中断请求为第二中断类型,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址相一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态递增预测方式;When the second prediction method is the transient increment prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data and the interrupt request is of the first interrupt type, the The second prediction method is switched to the first prediction method and the first prediction method is the transient jump prediction method; if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data And the interrupt request is the second interrupt type, the second prediction method is switched to the first prediction method and the first prediction method is the transient state hold prediction method; if the historical purpose of the historical data The address is consistent with the prediction destination address of the historical data, the second prediction method is switched to the first prediction method and the first prediction method is the steady-state incremental prediction method; 在所述第二预测方式为所述暂态跳转预测方式的情况下,如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址相一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态跳转预测方式;如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址递增的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址保持的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;In the case where the second prediction method is the transient jump prediction method, if the predicted destination address of the historical data is consistent with the predicted destination address of the data transmitted on the bus before the historical data, The second prediction method is switched to the first prediction method and the first prediction method is the static jump prediction method; if the prediction destination address of the historical data and the historical data are transmitted before the The prediction destination address of the data on the bus is the relationship of address increment, the second prediction mode is switched to the first prediction mode and the first prediction mode is the transient increment prediction mode; if the history The predicted destination address of the data and the predicted destination address of the data transmitted on the bus before the historical data is an address hold relationship, the second prediction method is switched to the first prediction method and the first prediction The method is the transient state maintenance prediction method; 在所述第二预测方式为所述定态跳转预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;In the case where the second prediction method is the steady-state jump prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the The first prediction method and the first prediction method is the transient jump prediction method; 在所述第二预测方式为所述暂态保持预测方式的情况下,如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址保持的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态保持预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且没有新的中断请求,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且有新的中断请求,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;In the case where the second prediction mode is the transient hold prediction mode, if the predicted destination address of the historical data and the predicted destination address of the data transmitted on the bus before the historical data are of address hold Relationship, the second prediction method is switched to the first prediction method and the first prediction method is the steady-state maintenance prediction method; if the historical destination address of the historical data and the prediction purpose of the historical data The address is inconsistent and there is no new interrupt request, the second prediction method is switched to the first prediction method and the first prediction method is the transient increment prediction method; if the historical destination address of the historical data is the same as The prediction destination address of the historical data is inconsistent and there is a new interrupt request, the second prediction method is switched to the first prediction method and the first prediction method is the transient jump prediction method; 在所述第二预测方式为所述定态保持预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;In the case where the second prediction method is the steady-state maintenance prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the a first prediction method and the first prediction method is the transient hold prediction method; 其中,所述第一模块和所述第二模块分别为用于实现相应功能的模块。Wherein, the first module and the second module are respectively modules for realizing corresponding functions. 2.根据权利要求1所述的方法,其特征在于,对所述第二数据进行解密处理,以得到解密的第二数据,包括:2. The method according to claim 1, wherein the decryption process is performed on the second data to obtain the decrypted second data, comprising: 利用所述第二数据对应的目标数值对所述第二数据进行异或处理,以得到解密的第二数据。Exclusive OR processing is performed on the second data by using the target value corresponding to the second data to obtain decrypted second data. 3.根据权利要求1所述的方法,其特征在于,在接收到芯片对应的第一模块传输来的第一数据之后,在利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据之前,所述方法还包括:3. The method according to claim 1, characterized in that, after receiving the first data transmitted by the first module corresponding to the chip, the first data is processed using the target value corresponding to the first data Before the XOR processing to obtain the encrypted first data, the method further includes: 判断所述第一数据对应的预测目的地址与所述第一数据对应的实际目的地址是否相一致;judging whether the predicted destination address corresponding to the first data is consistent with the actual destination address corresponding to the first data; 如果一致,执行所述步骤:利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据;If they are consistent, perform the step of: using the target value corresponding to the first data to perform XOR processing on the first data to obtain encrypted first data; 如果不一致,根据所述第一数据对应的实际目的地址,重新获得所述第一数据对应的目标数值,执行所述步骤:利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据。If not, according to the actual destination address corresponding to the first data, reacquire the target value corresponding to the first data, and perform the step of: using the target value corresponding to the first data to perform an exclusive operation on the first data Or process to get encrypted first data. 4.根据权利要求1或2所述的方法,其特征在于,在对所述第一数据进行加密处理,以得到加密的第一数据之前,所述方法还包括:4. The method according to claim 1 or 2, wherein, before encrypting the first data to obtain the encrypted first data, the method further comprises: 读取预设的第一配置参数;Read the preset first configuration parameter; 在所述第一配置参数表征需要进行数据加密的情况下,执行所述步骤:对所述第一数据进行加密处理,以得到加密的第一数据;In the case where the first configuration parameter indicates that data encryption is required, the step is performed: encrypting the first data to obtain encrypted first data; 在所述第一配置参数表征不需要进行数据加密的情况下,将所述第一数据输入所述总线;In the case that the first configuration parameter indicates that data encryption is not required, input the first data into the bus; 其中,在对所述第二数据进行解密处理,以得到解密的第二数据之前,所述方法还包括:Wherein, before decrypting the second data to obtain the decrypted second data, the method further includes: 读取预设的第二配置参数;Read the preset second configuration parameter; 在所述第二配置参数表征需要进行数据解密的情况下,执行所述步骤:对所述第二数据进行解密处理,以得到解密的第二数据;In the case where the second configuration parameter indicates that data decryption is required, perform the step of: decrypting the second data to obtain decrypted second data; 在所述第二配置参数表征不需要进行数据解密的情况下,将所述第二数据传输给所述芯片对应的第二模块。In a case where the second configuration parameter indicates that data decryption is not required, the second data is transmitted to a second module corresponding to the chip. 5.一种数据加密传输的处理装置,其特征在于,至少包括:5. A processing device for encrypted data transmission, characterized in that it at least includes: 加密单元,用于在接收到芯片对应的第一模块传输来的第一数据的情况下,对所述第一数据进行加密处理,以得到加密的第一数据,并将所述加密的第一数据输入所述芯片中的总线;The encryption unit is configured to, in the case of receiving the first data transmitted from the first module corresponding to the chip, perform encryption processing on the first data to obtain encrypted first data, and convert the encrypted first data into data input to the bus in the chip; 解密单元,用于在有第二数据从所述总线输出的情况下,对所述第二数据进行解密处理,以得到解密的第二数据,并将所述解密的第二数据传输给所述芯片对应的第二模块;a decryption unit, configured to decrypt the second data when there is second data output from the bus to obtain decrypted second data, and transmit the decrypted second data to the The second module corresponding to the chip; 所述加密单元,具体用于利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据;The encryption unit is specifically configured to use the target value corresponding to the first data to perform XOR processing on the first data to obtain encrypted first data; 所述处理装置还包括:The processing device also includes: 地址处理单元,用于在加密单元接收到芯片中的第一模块传输来的第一数据之前,获得所述第一数据对应的预测目的地址;根据所述预测目的地址,获得所述第一数据对应的目标数值;An address processing unit, configured to obtain a predicted destination address corresponding to the first data before the encryption unit receives the first data transmitted by the first module in the chip; obtain the first data according to the predicted destination address The corresponding target value; 所述地址处理单元获得所述第一数据对应的预测目的地址时,具体用于:获得所述总线最近一次所传输的历史数据的历史目的地址;按照第一预测方式,对所述历史目的地址进行处理,以得到所述第一数据对应的预测目的地址;When the address processing unit obtains the predicted destination address corresponding to the first data, it is specifically used to: obtain the historical destination address of the historical data transmitted by the bus last time; performing processing to obtain a predicted destination address corresponding to the first data; 其中,所述第一预测方式至少基于所述历史数据的历史目的地址与所述历史数据的预测目的地址之间的对应关系、第二预测方式和所述芯片中的中断请求的类型确定,所述第二预测方式为所述第一预测方式被切换之前的预测方式,所述第二预测方式为:定态递增预测方式、暂态递增预测方式、定态跳转预测方式、暂态跳转预测方式、定态保持预测方式或暂态保持预测方式;Wherein, the first prediction method is determined based at least on the correspondence between the historical destination address of the historical data and the predicted destination address of the historical data, the second prediction method, and the type of the interrupt request in the chip, so The second prediction method is the prediction method before the first prediction method is switched, and the second prediction method is: a steady state incremental prediction method, a transient incremental prediction method, a steady state jump prediction method, and a transient state jump prediction method. Prediction mode, steady state maintenance prediction mode or transient state maintenance prediction mode; 其中,所述定态递增预测方式、所述暂态递增预测方式、所述定态跳转预测方式和所述暂态跳转预测方式中分别以地址递增的方式在所述历史目的地址的基础上获得预测地址,所述定态保持预测方式和所述暂态保持预测方式中以保持地址的方式在所述历史目的地址的基础上获得预测地址;Wherein, in the steady-state incremental prediction method, the transient incremental prediction method, the steady-state jump prediction method, and the transient jump prediction method, the addresses are incremented on the basis of the historical destination address. Obtain the predicted address on the basis of the historical destination address in the manner of maintaining the address in the steady-state maintenance prediction mode and the transient-state maintenance prediction mode; 在所述第二预测方式为所述定态递增预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址相一致,所述第一预测方式与所述第二预测方式保持一致;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;In the case where the second prediction method is the steady-state incremental prediction method, if the historical destination address of the historical data is consistent with the predicted destination address of the historical data, the first prediction method is the same as the second prediction method. The two prediction methods are consistent; if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the first prediction method and the first prediction method is the Describe the transient incremental prediction method; 在所述第二预测方式为所述暂态递增预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且所述中断请求为第一中断类型,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且所述中断请求为第二中断类型,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址相一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态递增预测方式;When the second prediction method is the transient increment prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data and the interrupt request is of the first interrupt type, the The second prediction method is switched to the first prediction method and the first prediction method is the transient jump prediction method; if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data And the interrupt request is the second interrupt type, the second prediction method is switched to the first prediction method and the first prediction method is the transient state hold prediction method; if the historical purpose of the historical data The address is consistent with the prediction destination address of the historical data, the second prediction method is switched to the first prediction method and the first prediction method is the steady-state incremental prediction method; 在所述第二预测方式为所述暂态跳转预测方式的情况下,如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址相一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态跳转预测方式;如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址递增的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址保持的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;In the case where the second prediction method is the transient jump prediction method, if the predicted destination address of the historical data is consistent with the predicted destination address of the data transmitted on the bus before the historical data, The second prediction method is switched to the first prediction method and the first prediction method is the static jump prediction method; if the prediction destination address of the historical data and the historical data are transmitted before the The prediction destination address of the data on the bus is the relationship of address increment, the second prediction mode is switched to the first prediction mode and the first prediction mode is the transient increment prediction mode; if the history The predicted destination address of the data and the predicted destination address of the data transmitted on the bus before the historical data is an address hold relationship, the second prediction method is switched to the first prediction method and the first prediction The method is the transient state maintenance prediction method; 在所述第二预测方式为所述定态跳转预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;In the case where the second prediction method is the steady-state jump prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the The first prediction method and the first prediction method is the transient jump prediction method; 在所述第二预测方式为所述暂态保持预测方式的情况下,如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址保持的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态保持预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且没有新的中断请求,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且有新的中断请求,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;In the case where the second prediction mode is the transient hold prediction mode, if the predicted destination address of the historical data and the predicted destination address of the data transmitted on the bus before the historical data are of address hold relationship, the second prediction method is switched to the first prediction method and the first prediction method is the steady-state maintenance prediction method; if the historical destination address of the historical data and the prediction purpose of the historical data The address is inconsistent and there is no new interrupt request, the second prediction method is switched to the first prediction method and the first prediction method is the transient increment prediction method; if the historical destination address of the historical data is the same as The prediction destination address of the historical data is inconsistent and there is a new interrupt request, the second prediction method is switched to the first prediction method and the first prediction method is the transient jump prediction method; 在所述第二预测方式为所述定态保持预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;In the case where the second prediction method is the steady-state maintenance prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the a first prediction method and the first prediction method is the transient hold prediction method; 其中,所述第一模块和所述第二模块分别为用于实现相应功能的模块。Wherein, the first module and the second module are respectively modules for realizing corresponding functions. 6.一种芯片,其特征在于,包括:6. A chip, characterized in that, comprising: 总线;bus; 处理模块,用于:在接收到所述芯片对应的第一模块传输来的第一数据的情况下,对所述第一数据进行加密处理,以得到加密的第一数据,并将所述加密的第一数据输入所述总线;The processing module is configured to: in the case of receiving the first data transmitted by the first module corresponding to the chip, encrypt the first data to obtain encrypted first data, and convert the encrypted the first data input to the bus; 所述处理模块,还用于:在有第二数据从所述总线输出的情况下,对所述第二数据进行解密处理,以得到解密的第二数据,并将所述解密的第二数据传输给所述芯片对应的第二模块;The processing module is further configured to: when there is second data output from the bus, decrypt the second data to obtain decrypted second data, and convert the decrypted second data transmit to the second module corresponding to the chip; 所述处理模块对所述第一数据进行加密处理时,具体用于:利用所述第一数据对应的目标数值对所述第一数据进行异或处理,以得到加密的第一数据;When the processing module encrypts the first data, it is specifically configured to: use the target value corresponding to the first data to perform XOR processing on the first data to obtain encrypted first data; 所述处理模块,还用于:在加密单元接收到芯片中的第一模块传输来的第一数据之前,获得所述第一数据对应的预测目的地址;根据所述预测目的地址,获得所述第一数据对应的目标数值;The processing module is further configured to: before the encryption unit receives the first data transmitted by the first module in the chip, obtain a predicted destination address corresponding to the first data; according to the predicted destination address, obtain the The target value corresponding to the first data; 所述处理模块获得所述第一数据对应的预测目的地址时,具体用于:获得所述总线最近一次所传输的历史数据的历史目的地址;按照第一预测方式,对所述历史目的地址进行处理,以得到所述第一数据对应的预测目的地址;When the processing module obtains the predicted destination address corresponding to the first data, it is specifically used to: obtain the historical destination address of the historical data transmitted by the bus last time; processing to obtain a predicted destination address corresponding to the first data; 其中,所述第一预测方式至少基于所述历史数据的历史目的地址与所述历史数据的预测目的地址之间的对应关系、第二预测方式和所述芯片中的中断请求的类型确定,所述第二预测方式为所述第一预测方式被切换之前的预测方式,所述第二预测方式为:定态递增预测方式、暂态递增预测方式、定态跳转预测方式、暂态跳转预测方式、定态保持预测方式或暂态保持预测方式;Wherein, the first prediction method is determined based at least on the correspondence between the historical destination address of the historical data and the predicted destination address of the historical data, the second prediction method, and the type of the interrupt request in the chip, so The second prediction method is the prediction method before the first prediction method is switched, and the second prediction method is: a steady state incremental prediction method, a transient incremental prediction method, a steady state jump prediction method, and a transient state jump prediction method. Prediction mode, steady state maintenance prediction mode or transient state maintenance prediction mode; 其中,所述定态递增预测方式、所述暂态递增预测方式、所述定态跳转预测方式和所述暂态跳转预测方式中分别以地址递增的方式在所述历史目的地址的基础上获得预测地址,所述定态保持预测方式和所述暂态保持预测方式中以保持地址的方式在所述历史目的地址的基础上获得预测地址;Wherein, in the steady-state incremental prediction method, the transient incremental prediction method, the steady-state jump prediction method, and the transient jump prediction method, the addresses are incremented on the basis of the historical destination address. Obtain the predicted address on the basis of the historical destination address in the manner of maintaining the address in the steady-state maintenance prediction mode and the transient-state maintenance prediction mode; 在所述第二预测方式为所述定态递增预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址相一致,所述第一预测方式与所述第二预测方式保持一致;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;In the case where the second prediction method is the steady-state incremental prediction method, if the historical destination address of the historical data is consistent with the predicted destination address of the historical data, the first prediction method is the same as the second prediction method. The two prediction methods are consistent; if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the first prediction method and the first prediction method is the Describe the transient incremental prediction method; 在所述第二预测方式为所述暂态递增预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且所述中断请求为第一中断类型,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且所述中断请求为第二中断类型,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址相一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态递增预测方式;When the second prediction method is the transient increment prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data and the interrupt request is of the first interrupt type, the The second prediction method is switched to the first prediction method and the first prediction method is the transient jump prediction method; if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data And the interrupt request is the second interrupt type, the second prediction method is switched to the first prediction method and the first prediction method is the transient state hold prediction method; if the historical purpose of the historical data The address is consistent with the prediction destination address of the historical data, the second prediction method is switched to the first prediction method and the first prediction method is the steady-state incremental prediction method; 在所述第二预测方式为所述暂态跳转预测方式的情况下,如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址相一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态跳转预测方式;如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址递增的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址保持的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;In the case where the second prediction method is the transient jump prediction method, if the predicted destination address of the historical data is consistent with the predicted destination address of the data transmitted on the bus before the historical data, The second prediction method is switched to the first prediction method and the first prediction method is the static jump prediction method; if the prediction destination address of the historical data and the historical data are transmitted before the The prediction destination address of the data on the bus is the relationship of address increment, the second prediction mode is switched to the first prediction mode and the first prediction mode is the transient increment prediction mode; if the history The predicted destination address of the data and the predicted destination address of the data transmitted on the bus before the historical data is an address hold relationship, the second prediction method is switched to the first prediction method and the first prediction The method is the transient state maintenance prediction method; 在所述第二预测方式为所述定态跳转预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;In the case where the second prediction method is the steady-state jump prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the The first prediction method and the first prediction method is the transient jump prediction method; 在所述第二预测方式为所述暂态保持预测方式的情况下,如果所述历史数据的预测目的地址与所述历史数据之前传输在所述总线上的数据的预测目的地址为地址保持的关系,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述定态保持预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且没有新的中断请求,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态递增预测方式;如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致且有新的中断请求,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态跳转预测方式;In the case where the second prediction mode is the transient hold prediction mode, if the predicted destination address of the historical data and the predicted destination address of the data transmitted on the bus before the historical data are of address hold Relationship, the second prediction method is switched to the first prediction method and the first prediction method is the steady-state maintenance prediction method; if the historical destination address of the historical data and the prediction purpose of the historical data The address is inconsistent and there is no new interrupt request, the second prediction method is switched to the first prediction method and the first prediction method is the transient increment prediction method; if the historical destination address of the historical data is the same as The prediction destination address of the historical data is inconsistent and there is a new interrupt request, the second prediction method is switched to the first prediction method and the first prediction method is the transient jump prediction method; 在所述第二预测方式为所述定态保持预测方式的情况下,如果所述历史数据的历史目的地址与所述历史数据的预测目的地址不一致,所述第二预测方式被切换为所述第一预测方式且所述第一预测方式为所述暂态保持预测方式;In the case where the second prediction method is the steady-state maintenance prediction method, if the historical destination address of the historical data is inconsistent with the predicted destination address of the historical data, the second prediction method is switched to the a first prediction method and the first prediction method is the transient hold prediction method; 其中,所述第一模块和所述第二模块分别为用于实现相应功能的模块。Wherein, the first module and the second module are respectively modules for realizing corresponding functions.
CN202110431379.1A 2021-04-21 2021-04-21 Processing method, device and chip for data encryption transmission Expired - Fee Related CN113127901B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110431379.1A CN113127901B (en) 2021-04-21 2021-04-21 Processing method, device and chip for data encryption transmission

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110431379.1A CN113127901B (en) 2021-04-21 2021-04-21 Processing method, device and chip for data encryption transmission

Publications (2)

Publication Number Publication Date
CN113127901A CN113127901A (en) 2021-07-16
CN113127901B true CN113127901B (en) 2023-05-16

Family

ID=76778661

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110431379.1A Expired - Fee Related CN113127901B (en) 2021-04-21 2021-04-21 Processing method, device and chip for data encryption transmission

Country Status (1)

Country Link
CN (1) CN113127901B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106549940A (en) * 2016-10-13 2017-03-29 北京奇虎科技有限公司 Vehicle data transmission method and system
CN106599735A (en) * 2017-02-13 2017-04-26 珠海格力电器股份有限公司 Data protection device and method and storage controller
CN110611561A (en) * 2018-06-15 2019-12-24 意法半导体股份有限公司 Cryptographic method and circuit, corresponding device
CN111814212A (en) * 2020-09-07 2020-10-23 南京芯驰半导体科技有限公司 Bus data protection method, device, storage medium and chip
CN112583795A (en) * 2020-11-24 2021-03-30 北京智芯微电子科技有限公司 Safety protection method and safety protection device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8719589B2 (en) * 2010-05-25 2014-05-06 Via Technologies, Inc. Microprocessor that facilitates task switching between multiple encrypted programs having different associated decryption key values
IL234956A (en) * 2014-10-02 2017-10-31 Kaluzhny Uri Bus protection with improved key entropy
US9954681B2 (en) * 2015-06-10 2018-04-24 Nxp Usa, Inc. Systems and methods for data encryption

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106549940A (en) * 2016-10-13 2017-03-29 北京奇虎科技有限公司 Vehicle data transmission method and system
CN106599735A (en) * 2017-02-13 2017-04-26 珠海格力电器股份有限公司 Data protection device and method and storage controller
CN110611561A (en) * 2018-06-15 2019-12-24 意法半导体股份有限公司 Cryptographic method and circuit, corresponding device
CN111814212A (en) * 2020-09-07 2020-10-23 南京芯驰半导体科技有限公司 Bus data protection method, device, storage medium and chip
CN112583795A (en) * 2020-11-24 2021-03-30 北京智芯微电子科技有限公司 Safety protection method and safety protection device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于类型预测的甚块预测器;苟鹏飞等;《计算机学报》;20120715(第07期);全文 *

Also Published As

Publication number Publication date
CN113127901A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
US11169935B2 (en) Technologies for low-latency cryptography for processor-accelerator communication
JP3789454B2 (en) Stream processor with cryptographic coprocessor
CN113711194B (en) Highly efficient side-channel attack resistant memory cryptography based on key update
WO2021014125A1 (en) Cryptographic architecture for cryptographic permutation
CN109479003B (en) Processor, system, method and apparatus for secure elliptic curve cryptographic instructions
CN107408192A (en) Protect memory
WO2024114264A1 (en) Encryption and decryption architecture, method, processor, and server
KR20110129932A (en) Key Recovery Mechanisms for Cryptographic Systems
CN105320895B (en) High-performance autonomous hardware engine for in-line cryptographic processing
CN106533652A (en) XTS-SM4-based storage encryption and decryption method and device
CN101268650A (en) Method and apparatus for data security processing in a microcontroller
EP2822213A1 (en) Information processing device, information processing method, and programme
CN116204911B (en) Encryption and decryption system, encryption and decryption control method, computer device and storage medium
US20240146514A1 (en) Method of encryption and decryption initialization configuration, edge port, encryption and decryption platform and security system
WO2024255452A1 (en) Data encryption and decryption method, data encryption and decryption apparatus, device, and medium
CN107078897A (en) Cipher Processing for the presumption of out-of-sequence data
CN112035866B (en) Data encryption method, device, equipment and computer readable storage medium
CN113127901B (en) Processing method, device and chip for data encryption transmission
CN117492515A (en) Clock frequency detection unit, method, processing unit and computing system
Saarinen Simple AEAD hardware interface (SÆHI) in a SoC: Implementing an on-chip Keyak/WhirlBob coprocessor
Homsirikamol et al. A universal hardware API for authenticated ciphers
TW202301159A (en) Information security protection system and information security protection method
Xie et al. Customizing trusted ai accelerators for efficient privacy-preserving machine learning
CN115577397B (en) Data processing method, device, equipment and storage medium
US20240413986A1 (en) Ratchet-based key management

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 450000 Science Avenue 62, Zhengzhou High-tech Zone, Henan Province

Patentee after: Information Engineering University of the Chinese People's Liberation Army Cyberspace Force

Country or region after: China

Address before: No. 62 Science Avenue, High tech Zone, Zhengzhou City, Henan Province

Patentee before: Information Engineering University of Strategic Support Force,PLA

Country or region before: China

CP03 Change of name, title or address
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20230516

CF01 Termination of patent right due to non-payment of annual fee