FPGA-based on-chip encrypted circuit power consumption detection system and control method

By designing an encryption circuit power consumption detection system on the FPGA chip and using the Arm processor for data preprocessing and analysis, the problem of real-time performance and low efficiency in remote power consumption analysis attacks in cloud FPGA is solved, and efficient power consumption information transmission is achieved. .

CN118733392AActive Publication Date: 2024-10-01SUN YAT SEN UNIV

Patent Information

Application Number
CN202410915095.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-10-01
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

In a cloud FPGA environment, remote power analysis attacks require transmitting and processing a large amount of power consumption data, resulting in low real-time performance and low efficiency of the system, making it impossible to extract secret information quickly and effectively.

Method used

A power consumption detection system based on FPGA on-chip encryption circuit is designed, including FPGA chip, Arm processor and DDR controller. The Arm processor performs data preprocessing and analysis to reduce data transmission bandwidth and improve the transmission efficiency of power consumption information.

Benefits of technology

It realizes real-time monitoring of the instantaneous power consumption of encryption circuits, reduces the high bandwidth and resources required to transmit and process a large amount of real-time power consumption data, and improves the system's power consumption information transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733392A_ABST
    Figure CN118733392A_ABST
Patent Text Reader

Abstract

The invention discloses an FPGA-based on-chip encrypted circuit power consumption detection system and a control method. The encrypted circuit power consumption detection system comprises an FPGA chip, an Arm processor, a DDR controller and a peripheral interface. The control method comprises the steps of obtaining power consumption data information; performing configuration preprocessing on the FPGA chip to obtain a configured FPGA chip; performing data acquisition and conversion processing through the configured FPGA chip to obtain converted binary sequence power consumption data information; obtaining the converted binary sequence power consumption data information and carrying out data preprocessing to obtain a power consumption data information analysis result; and the power consumption data information analysis result is transmitted to the upper computer through the peripheral interface for visual display. According to the embodiment of the invention, the instantaneous power consumption of the encryption circuit can be monitored in real time, the high bandwidth and resources required for transmitting and processing a large amount of real-time power consumption data are reduced, and the transmission efficiency of the power consumption information of the system is improved. The method can be widely applied to the technical field of encrypted circuit power consumption data analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of encryption circuit power consumption data analysis, and in particular to a power consumption detection system and control method for encryption circuits on a FPGA chip. Background Art

[0002] Field Programmable Gate Arrays (FPGAs) deployed on commercial cloud services are becoming increasingly popular due to the cost and computing advantages they offer. On cloud FPGAs, multi-tenant scenarios where multiple users share a single FPGA physical chip may pose security threats. Attackers can infer secret information about encrypted circuits on remote FPGAs by deploying on-chip sensors on the FPGA logic structure. This attack is called Remote Power Analysis (RPA) attack. Power consumption variations are mainly caused by voltage fluctuations within the FPGA chip.

[0003] The advanced sensor used to measure voltage fluctuations in FPGAs is the time-to-digital converter (TDC). TDC allows the detection of voltage fluctuations in the order of a few nanoseconds. Its key building block is the delay line, which is usually implemented on FPGAs using carry logic and multiplexer chains. The time-to-digital converter detects voltage changes in the cloud FPGA by detecting the delay changes in the propagation signal of the buffer chain; the information captured by the on-chip sensor is transmitted from the cloud FPGA chip for analysis, but the relevant on-chip sensors require a large amount of bandwidth to transmit the collected data due to the wide output bit width. This not only increases the complexity of data transmission, but also limits the real-time performance and efficiency of the system. In addition, remote power analysis requires the encryption circuit to run under different plaintext information and collect a large amount of power consumption traces in order to achieve the purpose of extracting secret information in the circuit. This places high demands on the system's data processing and storage capabilities, and becomes one of the bottlenecks of power analysis attacks. Due to the high bandwidth and resources required to transmit and process large amounts of data, the relevant technologies have low real-time performance and efficiency when performing remote power analysis, and cannot quickly and effectively extract the required secret information.

[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention

[0005] The main purpose of the embodiments of the present application is to propose a power consumption detection system and control method based on an encryption circuit on an FPGA chip, which can monitor the instantaneous power consumption of the encryption circuit in real time, reduce the high bandwidth and resources required for transmitting and processing a large amount of real-time power consumption data, and improve the transmission efficiency of the system's power consumption information.

[0006] To achieve the above-mentioned purpose, one aspect of an embodiment of the present application proposes a power consumption detection system for an encryption circuit on an FPGA chip, wherein the encryption circuit power consumption detection system comprises an FPGA chip, an Arm processor, a DDR controller and a peripheral interface, wherein the FPGA chip is the PL end of the encryption circuit power consumption detection system, and the Arm processor is the PS end of the encryption circuit power consumption detection system. The first output end of the FPGA chip is connected to the first input end of the Arm processor, the second output end of the FPGA chip is connected to the input end of the DDR controller, the first output end of the Arm processor is connected to the input end of the FPGA chip, the second output end of the Arm processor is connected to the input end of the peripheral interface, and the output end of the DDR controller is connected to the second input end of the Arm processor, wherein:

[0007] The FPGA chip is used to obtain power consumption data information of the encryption circuit;

[0008] The Arm processor is used to perform configuration preprocessing on the FPGA chip and to perform calculation analysis on the power consumption data information to obtain power consumption data information analysis results;

[0009] The DDR controller is used to control data transmission between the FPGA chip and the Arm processor;

[0010] The peripheral interface is used to transmit the power consumption data information analysis result to the host computer.

[0011] In some embodiments, the FPGA chip includes a power consumption collection module, a Hamming weight calculation module, a FIFO cache module, an AXIDatamover IP module, a control module, an encryption circuit and a hybrid clock manager module, wherein the output end of the hybrid clock manager module is connected to the first input end of the encryption circuit, the output end of the encryption circuit is connected to the input end of the control module, the first output end of the control module is connected to the second input end of the encryption circuit, the second output end of the control module is connected to the input end of the power consumption collection module, the third output end of the control module is connected to the first input end of the Hamming weight calculation module, the fourth output end of the control module is connected to the first input end of the FIFO cache module, the fifth output end of the control module is connected to the first input end of the AXIDatamover IP module, the output end of the power consumption collection module is connected to the second input end of the Hamming weight calculation module, the output end of the Hamming weight calculation module is connected to the second input end of the FIFO cache module, and the output end of the FIFO cache module is connected to the second input end of the AXIDatamover IP module, wherein:

[0012] The power consumption acquisition module is used to acquire the power consumption data information of the encryption circuit and perform conversion processing to output a binary sequence of the power consumption data information;

[0013] The Hamming weight calculation module is used to convert the preset number of bits of the binary sequence of the power consumption data information to obtain the converted binary sequence power consumption data information;

[0014] The FIFO buffer module is used to temporarily store the converted binary sequence power consumption data information;

[0015] The AXIDatamover IP module is used to read the converted binary sequence power consumption data information and write it into the DDR controller;

[0016] The control module is used to control the operation of the encryption circuit, the power consumption acquisition module, the Hamming weight calculation module, the FIFO buffer module and the AXIDatamover IP module;

[0017] The encryption circuit is used to generate an encryption work trigger signal, and the encryption work trigger signal includes an encryption work start trigger signal and an encryption work end trigger signal;

[0018] The hybrid clock manager module is used to obtain configuration information of the Arm processor and generate a clock frequency signal and transmit it to the encryption circuit.

[0019] In some embodiments, the power consumption acquisition module includes a plurality of on-chip voltage sensors with a time-to-digital converter as the core. The power consumption acquisition module specifies the number of the time-to-digital converters during compilation and outputs a binary sequence of a plurality of power consumption data information.

[0020] In some embodiments, the Arm processor includes an Arm processing end module, a UART controller and an SD card controller, a first output end of the Arm processing end module is connected to an input end of the UART controller, and a second output end of the Arm processing end module is connected to an input end of the SD card controller, wherein:

[0021] The Arm processing end module is used to perform configuration preprocessing on the FPGA chip and obtain the converted binary sequence power consumption data information;

[0022] The UART controller and the SD card controller are used to transmit the power consumption data information to the peripheral interface.

[0023] In some embodiments, the Arm processing end module includes a data processing and analysis module, an interrupt service module and an encryption circuit configuration module, wherein:

[0024] The data processing and analysis module is used to perform data preprocessing on the converted binary sequence power consumption data information to obtain preprocessed binary sequence power consumption data information;

[0025] The interrupt service module is used to read the transmission data of the DDR controller;

[0026] The encryption circuit configuration module is used to perform data configuration on the encryption circuit.

[0027] In some embodiments, the peripheral interface includes a UART interface and an SD card module, wherein the UART interface and the SD card module are used to transmit the power consumption data information analysis result to a host computer.

[0028] To achieve the above purpose, another aspect of the embodiment of the present application provides a control method based on an FPGA on-chip encryption circuit power consumption detection system, the control method comprising:

[0029] Get power consumption data information;

[0030] Based on the PS end of the encryption circuit power consumption detection system, the FPGA chip is configured and pre-processed to obtain the configured FPGA chip;

[0031] Based on the PL end of the encryption circuit power consumption detection system, data collection and conversion processing are performed through the configured FPGA chip to obtain converted binary sequence power consumption data information;

[0032] Based on the PS end of the encryption circuit power consumption detection system, the power consumption data information of the converted binary sequence is obtained and data preprocessing is performed to obtain the power consumption data information analysis result;

[0033] The power consumption data information analysis result is transmitted to the host computer through the peripheral interface for visual display.

[0034] In some embodiments, the PS end based on the encryption circuit power consumption detection system performs configuration preprocessing on the FPGA chip to obtain the configured FPGA chip, including:

[0035] PS end based on encryption circuit power consumption detection system;

[0036] Generate configuration information and transmit it to the hybrid clock manager module of the FPGA chip, dynamically adjust the clock frequency of the encryption circuit of the FPGA chip to obtain an adjusted encryption circuit;

[0037] The plain text to be encrypted is obtained and transmitted to the adjusted encryption circuit for encryption processing, and an encryption work start trigger signal and an encryption work end trigger signal are output.

[0038] In some embodiments, the PL end of the encryption circuit power consumption detection system performs data acquisition and conversion processing through the configured FPGA chip to obtain converted binary sequence power consumption data information, including:

[0039] PL end based on encryption circuit power consumption detection system;

[0040] According to the encryption work start trigger signal, the power consumption data information of the adjusted encryption circuit is obtained through the power consumption acquisition module;

[0041] The power consumption data information is numerically converted to obtain preliminary converted binary sequence power consumption data information and written into the FIFO buffer module;

[0042] According to the encryption work end trigger signal, the AXIDatamover IP module is configured to write the starting address and data length information of the DDR controller, and the data in the FIFO cache module is spliced ​​into a data stream according to the data packet format, and the converted binary sequence power consumption data information is output.

[0043] In some embodiments, the PS end based on the encryption circuit power consumption detection system obtains the converted binary sequence power consumption data information and performs data preprocessing to obtain the power consumption data information analysis result, including:

[0044] PS end based on encryption circuit power consumption detection system;

[0045] Execute an interrupt service program to read the converted binary sequence power consumption data information;

[0046] Executing a data processing program to perform averaging and filtering on the converted binary sequence power consumption data information to obtain filtered binary sequence power consumption data information;

[0047] A data analysis program is executed to perform fast Fourier transform processing on the filtered binary sequence power consumption data information to obtain the power consumption data information analysis result.

[0048] The embodiments of the present application include at least the following beneficial effects: The present application provides an encryption circuit power consumption detection system and control method based on an FPGA chip. The scheme sets the FPGA chip as the PL end of the encryption circuit power consumption detection system and is close to the measurement source. Compared with the off-chip power supply voltage measurement, the scheme has higher measurement accuracy and frequency, and can more accurately reflect voltage fluctuations. The Arm processor is set as the PS end of the encryption circuit power consumption detection system, and the Arm core is used to complete data preprocessing and analysis without transmitting it to the host computer for analysis, thereby reducing the bandwidth of data transmission to the PS end. It can monitor the instantaneous power consumption of the encryption circuit in real time, reduce the high bandwidth and resources required for transmitting and processing a large amount of real-time power consumption data, and improve the transmission efficiency of the system's power consumption information. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a schematic diagram of the structural principle of a power consumption detection system based on an encryption circuit on a FPGA chip provided in an embodiment of the present application;

[0050] Figure 2 It is a schematic diagram of the steps of a control method of an on-chip encryption circuit power consumption detection system based on FPGA provided in an embodiment of the present application;

[0051] Figure 3 It is a schematic diagram of a data packet format when the power consumption acquisition module is configured as four time digital sensors provided in an embodiment of the present application;

[0052] Figure 4 It is a schematic diagram of a data packet format when the power consumption acquisition module is configured as three time digital sensors provided in an embodiment of the present application;

[0053] Figure 5 It is a schematic diagram of a data packet format when the power consumption acquisition module is configured as two time digital sensors provided in an embodiment of the present application;

[0054] Figure 6 It is a schematic diagram of the data packet format when the power consumption acquisition module is configured as a time digital sensor provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of systems and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0056] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0057] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0059] Reference Figure 1 , Figure 1 The structural principle diagram of a power consumption detection system based on an FPGA on-chip encryption circuit provided by the embodiment of the present invention is shown in FIG. Figure 1 The encryption circuit power consumption detection system includes an FPGA chip, an Arm processor, a DDR controller and a peripheral interface. The FPGA chip is the PL end of the encryption circuit power consumption detection system, the Arm processor is the PS end of the encryption circuit power consumption detection system, the first output end of the FPGA chip is connected to the first input end of the Arm processor, the second output end of the FPGA chip is connected to the input end of the DDR controller, the first output end of the Arm processor is connected to the input end of the FPGA chip, the second output end of the Arm processor is connected to the input end of the peripheral interface, and the output end of the DDR controller is connected to the second input end of the Arm processor, wherein:

[0060] First of all, it should be noted that the FPGA-based on-chip instantaneous power consumption analysis system is deployed on the Xilinx ZYNQ chip. The ZYNQ chip includes a PL end and a PS end, where the PL end is an FPGA chip and the PS end is an Arm processor system. The PL end of the encryption circuit power consumption detection system is used to implement the encryption circuit and collect and transmit the power consumption of the encryption circuit.

[0061] The FPGA chip is used to obtain power consumption data information of the encryption circuit;

[0062] In this embodiment, the FPGA chip includes a power consumption collection module, a Hamming weight calculation module, a FIFO cache module, an AXIDatamover IP module, a control module, an encryption circuit and a hybrid clock manager module. The output end of the hybrid clock manager module is connected to the first input end of the encryption circuit, the output end of the encryption circuit is connected to the input end of the control module, the first output end of the control module is connected to the second input end of the encryption circuit, the second output end of the control module is connected to the input end of the power consumption collection module, the third output end of the control module is connected to the first input end of the Hamming weight calculation module, the fourth output end of the control module is connected to the first input end of the FIFO cache module, the fifth output end of the control module is connected to the first input end of the AXIDatamover IP module, the output end of the power consumption collection module is connected to the second input end of the Hamming weight calculation module, the output end of the Hamming weight calculation module is connected to the second input end of the FIFO cache module, and the output end of the FIFO cache module is connected to the AXIDatamover IP module. The second input end of the IP module is connected, wherein the power consumption acquisition module is used to collect the power consumption data information of the encryption circuit and convert it, and output the binary sequence of the power consumption data information; the Hamming weight calculation module is used to convert the preset number of bits of the binary sequence of the power consumption data information to obtain the converted binary sequence power consumption data information; the FIFO cache module is used to temporarily store the converted binary sequence power consumption data information; the AXIDatamover IP module is used to read the converted binary sequence power consumption data information and write it to the DDR controller; the control module is used to control the work of the encryption circuit, the power consumption acquisition module, the Hamming weight calculation module, the FIFO cache module and the AXIDatamover IP module; the encryption circuit is used to generate an encryption work trigger signal, and the encryption work trigger signal includes an encryption work start trigger signal and an encryption work end trigger signal; the hybrid clock manager module is used to obtain the configuration information of the Arm processor and generate a clock frequency signal and transmit it to the encryption circuit.

[0063] Among them, the power consumption acquisition module includes a number of on-chip voltage sensors with a time digital converter as the core. The power consumption acquisition module specifies the number of time digital converters during compilation and outputs a binary sequence of power consumption data information. That is, the power consumption acquisition module includes a plurality of on-chip voltage sensors with a time digital converter as the core. The number N of time digital converters can be specified during compilation, and the range of N is 1-4.

[0064] Specifically, the power consumption acquisition module is implemented using a time-to-digital converter, which is formed by cascading the CARRY4 units on the FPGA chip. The clock frequency of the power consumption acquisition module is 200MHz, which can meet the high sampling rate of instantaneous power consumption. The number of time-to-digital converters used by the power consumption acquisition module can be configured during compilation.

[0065] The Hamming weight calculation module calculates the number of bits "1" in multiple binary sequences and outputs the converted data to the FIFO buffer for temporary storage.

[0066] Specifically, the binary sequence data obtained by the power consumption acquisition module is converted into numerical values ​​through the Hamming weight calculation module and temporarily stored in the FIFO cache on the FPGA chip.

[0067] The FIFO buffer is used to temporarily store the collected power consumption data. Its width is one byte, and its depth can be configured at compile time according to the length of the collection time. The AXIDatamover IP module is used to implement direct memory access and complete the transmission of a large amount of power consumption data. After an instantaneous power consumption collection is completed, the AXIDatamover IP writes the data in the FIFO buffer to the PS end DDR through the GP port.

[0068] Specifically, the FI FO buffer is connected to the AXIDatamover IP, and the AXIDatamover IP is connected to the PS through the GP port. After the instantaneous power consumption is collected, the power consumption data of the FI FO buffer is transmitted to the PS end DDR through the AXIDatamover IP.

[0069] The control module is used to control the start / end of the power consumption acquisition module, the writing and reading of the FIFO buffer, and the configuration of the AXIDatamover IP to write the starting address, data length information and data block content of the DDR, and trigger the interruption of the PS end after the acquisition is completed.

[0070] Specifically, the control module transmits the configurations such as the first address and power consumption data length information stored in the DDR to the AXIDatamover IP core. After the PL-side AXIDatamover IP core completes the transmission, it notifies the PS through an interrupt that the instantaneous power consumption data collection is complete.

[0071] The encryption circuit is an encryption circuit running on the FPGA chip. The encryption circuit provides the control module with trigger signals for the start and end of encryption. At the same time, the control module provides the encryption circuit with the plaintext to be encrypted. The hybrid clock manager module is used to receive the configuration information of the PS-side Arm processor and dynamically modify the clock frequency provided to the encryption circuit during runtime.

[0072] The Arm processor is used to perform configuration preprocessing on the FPGA chip and to perform calculation analysis on the power consumption data information to obtain the power consumption data information analysis results;

[0073] First of all, it should be noted that the PS side of the encryption circuit power consumption detection system is used to perform complex processing and analysis on the collected power consumption data, execute specific algorithms to obtain the required results, and configure the encryption circuit on the PL side.

[0074] The PS side reads the DDR memory, and the Arm core completes the processing and analysis of the real-time power consumption data, such as filtering, fast Fourier transform, etc. The data processing and analysis algorithms are implemented by programming. The PS side also implements the UART controller and SD card controller. The results of data processing and analysis can be further transmitted to the host computer through the UART serial port or SD card. The PS side can configure the operating clock frequency and plain text input of the encryption circuit through the HP port. The encryption circuit can be a dedicated hardware accelerator for the encryption algorithm, or a soft-core processor that runs the encryption algorithm, and is located on the same FPGA chip as the power consumption measurement module.

[0075] In this embodiment, the Arm processor includes an Arm processing end module, a UART controller and an SD card controller. The first output end of the Arm processing end module is connected to the input end of the UART controller, and the second output end of the Arm processing end module is connected to the input end of the SD card controller. The Arm processing end module is used to perform configuration preprocessing on the FPGA chip and obtain the converted binary sequence power consumption data information; the UART controller and the SD card controller are used to transmit the power consumption data information to the peripheral interface.

[0076] It should be noted that the UART controller is used to control the serial port of the peripheral device and output information such as the progress of power consumption data collection, power consumption analysis status, and encryption circuit operation status to the host computer. The SD card controller is used to manage the reading and writing of data of the peripheral device's SD card and write the collected power consumption data to the SD card for the host computer to read.

[0077] Among them, the Arm processing end module includes a data processing and analysis module, an interrupt service module and an encryption circuit configuration module. The data processing and analysis module is used to preprocess the converted binary sequence power consumption data information to obtain the preprocessed binary sequence power consumption data information; the interrupt service module is used to read the transmission data of the DDR controller; the encryption circuit configuration module is used to configure the encryption circuit data.

[0078] Specifically, the Arm processor contains three main programs. The first is the interrupt handling function, which reads the data in DDR after receiving the interrupt. The data packet in DDR is in words, and each word contains 4 bytes. The second is the data processing and analysis algorithm, which is used for preprocessing, analysis and transmission of power consumption data. The preprocessing is to average and filter the power consumption data, and the analysis is to perform fast Fourier transform on the power consumption data. The third is the encryption circuit configuration program, which is used to configure the number of power consumption trace collections, the plaintext to be encrypted by the encryption circuit, the clock frequency of the encryption circuit, and the transmission method of the power consumption data (UART serial port or SD card) during operation.

[0079] The DDR controller is used to control data transmission between the FPGA chip and the Arm processor;

[0080] In this embodiment, the DDR controller provides data storage and access functions for large-scale power consumption data transmission between the PL and the PS.

[0081] The peripheral interface is used to transmit the power consumption data information analysis results to the host computer.

[0082] In this embodiment, the peripheral interface includes a UART interface and an SD card module, wherein the UART interface and the SD card module are used to transmit the power consumption data information analysis result to the host computer.

[0083] Specifically, the peripheral interface, including the UART interface and the SD card, is used for communication and data transmission between the ZYNQ chip and the host computer, and is connected to the host computer during operation.

[0084] See also Figure 2 The embodiment of the present application also provides a control method based on the FPGA on-chip encryption circuit power consumption detection system, which can implement the above-mentioned FPGA on-chip encryption circuit power consumption detection system. The control method includes the following steps:

[0085] S100, obtaining power consumption data information;

[0086] S200, based on the PS end of the encryption circuit power consumption detection system, perform configuration preprocessing on the FPGA chip to obtain a configured FPGA chip;

[0087] It should be noted that, in some embodiments, step S200 may include: S210, based on the PS end of the encryption circuit power consumption detection system; S220, generating configuration information and transmitting it to the hybrid clock manager module of the FPGA chip, dynamically adjusting the clock frequency of the encryption circuit of the FPGA chip to obtain an adjusted encryption circuit; S230, obtaining the plaintext to be encrypted and transmitting it to the adjusted encryption circuit for encryption processing, and outputting an encryption work start trigger signal and an encryption work end trigger signal.

[0088] S300, based on the PL end of the encryption circuit power consumption detection system, data acquisition and conversion processing are performed through the configured FPGA chip to obtain converted binary sequence power consumption data information;

[0089] It should be noted that, in some embodiments, step S300 may include: S310, based on the PL end of the encryption circuit power consumption detection system; S320, according to the encryption work start trigger signal, obtaining the adjusted encryption circuit power consumption data information through the power consumption acquisition module; S330, performing numerical conversion processing on the power consumption data information to obtain preliminary converted binary sequence power consumption data information and write it to the FIFO cache module; S340, according to the encryption work end trigger signal, configuring the AXIDatamover IP module to write the starting address and data length information of the DDR controller, and splicing the data in the FIFO cache module into a data stream according to the data packet format, and outputting the converted binary sequence power consumption data information.

[0090] S400, based on the PS end of the encryption circuit power consumption detection system, obtaining the converted binary sequence power consumption data information and performing data preprocessing to obtain the power consumption data information analysis result;

[0091] It should be noted that, in some embodiments, step S400 may include: S410, based on the PS end of the encryption circuit power consumption detection system; S420, executing the interrupt service program to read the converted binary sequence power consumption data information; S430, executing the data processing program to average and filter the converted binary sequence power consumption data information to obtain the filtered binary sequence power consumption data information; S440, executing the data analysis program to perform fast Fourier transform processing on the filtered binary sequence power consumption data information to obtain the power consumption data information analysis results.

[0092] S500, transmitting the power consumption data information analysis result to the host computer through the peripheral interface for visual display.

[0093] In summary, in a specific embodiment of the present invention, the encryption circuit to be tested is connected to the power consumption collection and analysis system;

[0094] The PS-side Arm processor configures the plaintext to be encrypted of the encryption circuit and the mixed-mode clock management module; the control module receives the trigger signal for the encryption circuit to start encryption, and sends a control signal to the power consumption acquisition module to collect the instantaneous power consumption when the encryption circuit is running. The instantaneous power consumption data is converted into a numerical value by the Hamming weight calculation module and then temporarily stored in the FIFO cache; the control module receives the trigger signal for the encryption circuit to end encryption, configures the AXIDatamover module to write the starting address and data length information of the DDR, and reads the data in the FIFO cache, and splices the data in the FIFO cache into a data stream according to the data packet format for the AXIDatamover IP to transmit to the PS-side DDR. After the AXIDatamover IP transmission is completed, the control module triggers an interrupt signal to the PS side; after receiving the interrupt, the PS side enters the interrupt service program to read the power consumption data in the DDR; the PS side performs power consumption data preprocessing, analysis or storage according to the host computer command, and transmits the progress of the current power consumption data collection, the collection status and the plaintext to be encrypted by the encryption module to the host computer.

[0095] In addition, it should be noted that 1-4 TDCs, or time digital converters, can be configured. For different numbers of TDCs, the data packet format is: power consumption data length, power consumption data, end flag. For different numbers of time digital converters, the format of the power consumption data in the data packet is different. In one acquisition, there are t sampling points for the power consumption data, corresponding to t words of power consumption data in the data packet. The output of the nth time digital converter corresponds to the nth byte of the word in the data packet. For the case where the power consumption module is configured with 4 time digital converters, the data packet format is as follows: Figure 3 As shown. The 0th word in the data packet is fixed as the power consumption data length, the 1st to tth words are the power consumption data, and the values ​​of the four time-to-digital converters (serial numbers 0, 1, 2, and 3) correspond to the 0th, 1st, 2nd, and 3rd bytes of each word respectively. The t+1th word of the data packet is fixed as the terminator, and its value is 0xdeadbeef. When the power consumption module is configured with three time-to-digital converters (serial numbers 0, 1, and 2), the contents of the 0th and t+1th words of the data packet remain unchanged, and the power consumption data corresponding to the 1st to tth words always have the 3rd byte of 0x00, as shown. Figure 4 By analogy, when the power module is configured with 2 or 1 time-to-digital converters, the data packet format is as follows: Figure 5 , Figure 6 shown.

[0096] Therefore, the embodiments of the present invention have the following technical effects:

[0097] 1) The CARRY4 logic on the FPGA chip is used to build a time-to-digital converter (TDC), which has higher measurement accuracy and frequency (200MHz) than off-chip power supply voltage measurement, and can more accurately reflect voltage fluctuations. In addition, the on-chip sensor can be instantiated anywhere in the FPGA layout, and multiple TDCs can be configured to be close to the measurement source, thereby achieving more accurate power consumption monitoring.

[0098] 2) Since the Hamming distance calculation circuit is used on the PL side, the bandwidth of data transmission to the PS side is reduced. Furthermore, the PS side can use the Arm core to complete data preprocessing and analysis without transmitting it to the host computer for analysis, which brings the advantage of real-time power consumption analysis.

[0099] 3) Since the UART and SD card controller are configured on the PS side, the method of transmitting data to the host computer can be flexibly selected according to the amount of power consumption data. This configuration not only improves the flexibility and adaptability of data transmission, but also optimizes the data transmission path according to specific needs, further improving the overall performance of the system.

[0100] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0101] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A power consumption detection system based on an on-chip encryption circuit of FPGA, characterized in that: The encryption circuit power consumption detection system includes an FPGA chip, an Arm processor, a DDR controller and a peripheral interface, wherein the FPGA chip is the PL end of the encryption circuit power consumption detection system, the Arm processor is the PS end of the encryption circuit power consumption detection system, the first output end of the FPGA chip is connected to the first input end of the Arm processor, the second output end of the FPGA chip is connected to the input end of the DDR controller, the first output end of the Arm processor is connected to the input end of the FPGA chip, the second output end of the Arm processor is connected to the input end of the peripheral interface, and the output end of the DDR controller is connected to the second input end of the Arm processor, wherein: The FPGA chip is used to obtain power consumption data information of the encryption circuit; The Arm processor is used to perform configuration preprocessing on the FPGA chip and to perform calculation analysis on the power consumption data information to obtain power consumption data information analysis results; The DDR controller is used to control data transmission between the FPGA chip and the Arm processor; The peripheral interface is used to transmit the power consumption data information analysis result to the host computer.

2. The encryption circuit power consumption detection system according to claim 1, characterized in that: The FPGA chip includes a power consumption acquisition module, a Hamming weight calculation module, a FIFO cache module, an AXIDatamover IP module, a control module, an encryption circuit and a hybrid clock manager module, wherein the output end of the hybrid clock manager module is connected to the first input end of the encryption circuit, the output end of the encryption circuit is connected to the input end of the control module, the first output end of the control module is connected to the second input end of the encryption circuit, the second output end of the control module is connected to the input end of the power consumption acquisition module, the third output end of the control module is connected to the first input end of the Hamming weight calculation module, the fourth output end of the control module is connected to the first input end of the FIFO cache module, the fifth output end of the control module is connected to the first input end of the AXIDatamover IP module, the output end of the power consumption acquisition module is connected to the second input end of the Hamming weight calculation module, the output end of the Hamming weight calculation module is connected to the second input end of the FIFO cache module, and the output end of the FIFO cache module is connected to the second input end of the AXIDatamover IP module, wherein: The power consumption acquisition module is used to acquire the power consumption data information of the encryption circuit and perform conversion processing to output a binary sequence of the power consumption data information; The Hamming weight calculation module is used to convert the preset number of bits of the binary sequence of the power consumption data information to obtain the converted binary sequence power consumption data information; The FIFO buffer module is used to temporarily store the converted binary sequence power consumption data information; The AXIDatamover IP module is used to read the converted binary sequence power consumption data information and write it into the DDR controller; The control module is used to control the operation of the encryption circuit, the power consumption acquisition module, the Hamming weight calculation module, the FIFO buffer module and the AXIDatamover IP module; The encryption circuit is used to generate an encryption work trigger signal, and the encryption work trigger signal includes an encryption work start trigger signal and an encryption work end trigger signal; The hybrid clock manager module is used to obtain configuration information of the Arm processor and generate a clock frequency signal and transmit it to the encryption circuit.

3. The encryption circuit power consumption detection system according to claim 2, characterized in that: The power consumption acquisition module includes a plurality of on-chip voltage sensors with a time-to-digital converter as the core. The power consumption acquisition module specifies the number of the time-to-digital converters during compilation and outputs a binary sequence of a plurality of power consumption data information.

4. The encryption circuit power consumption detection system according to claim 2, characterized in that: The Arm processor includes an Arm processing end module, a UART controller and an SD card controller, wherein a first output end of the Arm processing end module is connected to an input end of the UART controller, and a second output end of the Arm processing end module is connected to an input end of the SD card controller, wherein: The Arm processing end module is used to perform configuration preprocessing on the FPGA chip and obtain the converted binary sequence power consumption data information; The UART controller and the SD card controller are used to transmit the power consumption data information to the peripheral interface.

5. The encryption circuit power consumption detection system according to claim 4, characterized in that: The Arm processing end module includes a data processing and analysis module, an interrupt service module and an encryption circuit configuration module, wherein: The data processing and analysis module is used to perform data preprocessing on the converted binary sequence power consumption data information to obtain preprocessed binary sequence power consumption data information; The interrupt service module is used to read the transmission data of the DDR controller; The encryption circuit configuration module is used to perform data configuration on the encryption circuit.

6. The encryption circuit power consumption detection system according to claim 1, characterized in that: The peripheral interface includes a UART interface and an SD card module, wherein the UART interface and the SD card module are used to transmit the power consumption data information analysis result to a host computer.

7. A control method for a power consumption detection system based on an encryption circuit on an FPGA chip, characterized in that: The control method comprises the following steps: Get power consumption data information; Based on the PS end of the encryption circuit power consumption detection system, the FPGA chip is configured and pre-processed to obtain the configured FPGA chip; Based on the PL end of the encryption circuit power consumption detection system, data collection and conversion processing are performed through the configured FPGA chip to obtain converted binary sequence power consumption data information; Based on the PS end of the encryption circuit power consumption detection system, the power consumption data information of the converted binary sequence is obtained and data preprocessing is performed to obtain the power consumption data information analysis result; The power consumption data information analysis result is transmitted to the host computer through the peripheral interface for visual display.

8. The method according to claim 7, characterized in that The PS end based on the encryption circuit power consumption detection system performs configuration preprocessing on the FPGA chip to obtain the configured FPGA chip, including: PS end based on encryption circuit power consumption detection system; Generate configuration information and transmit it to the hybrid clock manager module of the FPGA chip, dynamically adjust the clock frequency of the encryption circuit of the FPGA chip to obtain an adjusted encryption circuit; The plain text to be encrypted is obtained and transmitted to the adjusted encryption circuit for encryption processing, and an encryption work start trigger signal and an encryption work end trigger signal are output.

9. The method according to claim 7, characterized in that: The PL end of the encryption circuit power consumption detection system performs data acquisition and conversion processing through the configured FPGA chip to obtain converted binary sequence power consumption data information, including: PL end based on encryption circuit power consumption detection system; According to the encryption work start trigger signal, the power consumption data information of the adjusted encryption circuit is obtained through the power consumption acquisition module; The power consumption data information is numerically converted to obtain preliminary converted binary sequence power consumption data information and written into the FIFO buffer module; According to the encryption work end trigger signal, the AXIDatamover IP module is configured to write the starting address and data length information of the DDR controller, and the data in the FIFO cache module is spliced ​​into a data stream according to the data packet format, and the converted binary sequence power consumption data information is output.

10. The method according to claim 7, characterized in that The PS end based on the encryption circuit power consumption detection system obtains the converted binary sequence power consumption data information and performs data preprocessing to obtain the power consumption data information analysis result, including: PS end based on encryption circuit power consumption detection system; Execute an interrupt service program to read the converted binary sequence power consumption data information; Executing a data processing program to perform averaging and filtering on the converted binary sequence power consumption data information to obtain filtered binary sequence power consumption data information; A data analysis program is executed to perform fast Fourier transform processing on the filtered binary sequence power consumption data information to obtain the power consumption data information analysis result.

Citation Information

Patent Citations

  • ZedBoard-based method for remote monitoring of circuit operation in FPGA

    CN104866405A

  • Ultra-high-speed data acquisition device and method based on ZYNQ series FPGA

    CN110069442A

  • Method for dynamically detecting voltage drop in FPGA chip and FPGA chip

    CN112100960A

  • 128-channel transient electromagnetic logging data acquisition system based on FPGA

    CN115128980A

Cited By

  • Multifunctional side channel analyzer for collecting power consumption information of cryptographic chip

    CN119561672A