CN201489524U - Code integrity check circuit - Google Patents
Code integrity check circuit Download PDFInfo
- Publication number
- CN201489524U CN201489524U CN2009201342852U CN200920134285U CN201489524U CN 201489524 U CN201489524 U CN 201489524U CN 2009201342852 U CN2009201342852 U CN 2009201342852U CN 200920134285 U CN200920134285 U CN 200920134285U CN 201489524 U CN201489524 U CN 201489524U
- Authority
- CN
- China
- Prior art keywords
- module
- dma
- time
- dma controller
- cpu
- 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 - Lifetime
Links
Images
Landscapes
- Storage Device Security (AREA)
Abstract
The utility model discloses a code integrity check circuit which comprises a system bus, a flash memory, a real-time integrity checking unit, an one-time programmable memory, a DMA controller and a CPU, wherein the lash memory, the real-time integrity checking unit, the one-time programmable memory, the DMA controller and the CPU are all connected on the system bus; and the integrity checking unit is connected with the DMA controller. The code integrity check circuit has the advantage of high safety.
Description
Technical field
The utility model relates to field of information security technology, is specifically related to a kind of code integrity checking circuit.
Background technology
General data integrity verifying method mainly is the dynamic data of verification, for example, 1. some message transmit mechanism in the communication process, before the message that will send, add a bit preamble, or add a CRC16 effect value in the message back, send together with message, receiver makes message synchronization according to bit preamble, judges according to CRC effect value whether the message of sending out makes a mistake; 2. adopt password or non-cryptographic methods to make message related, can verify the source of the whether complete and message of message by this information with a segment information.But the integrality of protection static data is important too, such as the program and the data that are stored in the FLASH flash memory, is the economic interests of protection company, and any illegal distorting all should be under an embargo.
The chip code completeness protection method of prior art, its implementation procedure is mostly as follows:
1. chip internal is all integrated two processors that priority level is arranged, the work that comes dispatch processor by arbitration modules.For example, the chip MCIMX31RM of Freescale Semiconductor Co., Ltd independent research just contains two kinds of processors of CPU and DMA.DMA generally contains a plurality of passages, and each passage can both carry out the transportation processing of data, wherein, is responsible for that passage of code integrity protection, such as passage 0, and CPU can not visit its control, and controls it by special code integrity holding circuit.Passage 0 has the highest priority, and when each passage of CPU and DMA during simultaneously to moderator application system bus, passage 0 can be taken bus control right earlier.
2. to needing the code section of effect, calculate summary with certain HASH algorithm, for example (,) the SHA1 algorithm, then summary being stored in the chip internal place of safety, the CPU visit must be forbidden in this place of safety.
3. use a timer to regulate the ratio that DMA and CPU take system bus.
Yet, in the prior art, only support the SHA1 algorithm, cause security not high.
The utility model content
The purpose of this utility model is to provide a kind of safe code integrity holding circuit.
The utility model provides a kind of code integrity checking circuit, it comprises system bus, flash memory, real-time completeness check unit, disposable programmable memory, dma controller and CPU, described flash memory, real-time completeness check unit, disposable programmable memory, dma controller and CPU are connected on the described system bus, and described realization completeness check unit is connected with described dma controller.
More excellent, described realization completeness check unit comprises the algorithm controls module, algoritic module, time-sequence control module, DMA configuration module and house dog, described algorithm controls module is connected to described algorithm stores module, time-sequence control module, DMA configuration module and house dog respectively, and described DMA configuration module is connected to described dma controller.。
More excellent, described algoritic module comprises SHA1 and two kinds of HASH algorithms of SHA256.
Compared with prior art, the utility model has increased the SHA256 algorithm in algoritic module, has higher security; The RTIC designated lane is carried out individual processing, completely cut off the visit of CPU fully the RTIC designated lane; Result register provides with register and pointer mode, uses more flexible; Dma operation is packaged into instruction type, and is integrated convenient.
Description of drawings
Fig. 1 is the system chart of code integrity holding circuit.
Fig. 2 is the workflow diagram of the real-time completeness check unit among Fig. 1.
Embodiment
As shown in Figure 1, code integrity checking circuit of the present utility model system comprises system bus and is connected to flash memory (Flash Memory) on the system bus, completeness check unit (Real Time Integrate Check in real time, RTIC), disposable programmable memory (One Time Programmable, OTP), dma controller, CPU.Flash memory is deposited protected content (instruction and data that CPU carries out), and dma controller is system's general purpose controller.OTP is the permanent storage of a writable disposable in the sheet, is used for depositing critical datas such as key, generally configures when dispatching from the factory, and the user can not change.The RTIC unit is used to check whether the content in the flash memory is distorted by unauthorized user.
The RTIC unit comprises the algorithm controls module, algoritic module, time-sequence control module, DMA configuration module and house dog.The algorithm controls module is connected to algorithm stores module, time-sequence control module, DMA configuration module and house dog respectively.Each functions of modules is described below:
The algorithm controls module is a RTIC unit controls part, has the result relatively, error handling processing, the functions such as issue of dma controller operational order, it comprises following 11 kinds of instructions altogether: treat the effect content be transported to SHA1256 message registration device, to algoritic module put initial value, obtain the algoritic module initial value, give algoritic module result register initialize, starting algorithm module begin computing, evaluation algorithm module whether computing finish, construct that message fills that content obtains that final digest, DMA remove that locking, chained list control to bus transferred, empty transmission, end chained list; The DMA configuration module is connected to dma controller, and the enforcement of control dma controller operational order, when program run, at set intervals, the RTIC designated lane that the DMA configuration module can be controlled dma controller is carried part and is treated the effect content from MEMORY, carry out a HASH computing; Algoritic module can be carried out SHA1 and two kinds of HASH algorithms of SHA256; Time schedule controller is used to regulate the time scale that DMA and CPU take bus; Whether house dog is used to monitor the dma controller operational order and finishes at the appointed time.
As shown in Figure 2, the workflow of RTIC unit is as follows:
In step 100, system power-on reset, dma controller locking bus, through a series of initialization procedures, chained list is transferred the dynamic link table of RTIC unit to, ensuing process is guided by the dynamic link table, the RTIC unit is totally two kinds of working methods, is respectively HASHONCE pattern and RUNTIME pattern, and the HASHONCE pattern is monopolized bus, major function is to check in the vectoring phase whether the content in the storer is modified, and the RUNTIME pattern is DMA and CPU time-division operation.
If what select in step 110 is the RUNTIME pattern, then execution in step 120, and DMA discharges the operation 120 to lock bus, if do not select the then direct execution in step 130 of RUNTIME pattern; In step 130, calculate the HASH value for the treatment of the effect content; In the step 140, relatively whether whether illegally changed by the consistent MEMORY of judgement content with actual value for theoretical value, if treat that the effect content is distorted, then execution in step 150, the generation erroneous resets signal total system that resets; If effect is correct, then execution in step 160, judge whether present mode concludes whether need to continue effect for the RUNTIME pattern; If present mode is the RUNTIME pattern, then get back to step 130, if not RUNTIME pattern, mean that then HASHONCE pattern effect finishes, execution in step 170 checks whether following chained list address register is NULL, if not NULL, execution in step 180 is transferred down the chained list control to the address of opening in the chained list address register; If NULL illustrates that current circuit has only carried out the effect of HASHONCE pattern, and effect finishes, and then execution in step 190, removes the locking of DMA to bus, and finishes chained list.
Safety analysis of the present utility model is as follows:
1. when the disabled user is very difficult can be that DMA is working according to outside Memory IO pin difference, when is that CPU is working, and disabled user's plug-in Memory can't avoid the detection of RTIC unit.
2. the disabled user is difficult to make and carries out single-step debug in any way, has monitored the time that the DMA instruction is transmitted because of the built-in house dog in RTIC unit, and the single-step debug meeting causes that house dog is overflowed and forced system resets again.
3.RTIC use an independent DMA designated lane, other passage of DMA and CPU can not visit it, so the disabled user can't be with the work of CPU or other passage interference of DMA RTIC designated lane.
4. expected result can not be changed after the product issue if be stored among the interior OTP of sheet, and the disabled user can not revise expected result allows the MEMORY of oneself work; Expected result also can be encrypted and be stored among the outside FLASH, but key is stored in the safety disc among the OTP, and the disabled user does not know key, can not be according to own demand change preset value.
Compared with prior art, the utility model has increased the SHA256 algorithm in algoritic module, has higher security; The RTIC designated lane is carried out separately processing, completely cut off the access of CPU to the RTIC designated lane fully; Result register provides with register and pointer mode, uses more flexible; Dma operation is packaged into instruction type, and is integrated convenient.
Claims (4)
1. code integrity checking circuit, it is characterized in that comprising system bus, flash memory, real-time completeness check unit, disposable programmable memory, dma controller and CPU, described flash memory, real-time completeness check unit, disposable programmable memory, dma controller and CPU are connected on the described system bus, and described realization completeness check unit is connected with described dma controller.
2. code integrity checking circuit as claimed in claim 1, it is characterized in that, described realization completeness check unit comprises the algorithm controls module, algoritic module, time-sequence control module, DMA configuration module and house dog, described algorithm controls module is connected to described algorithm stores module, time-sequence control module, DMA configuration module and house dog respectively.
3. code integrity checking circuit as claimed in claim 2 is characterized in that, described DMA configuration module is connected to described dma controller.
4. code integrity checking circuit as claimed in claim 2 is characterized in that, described algoritic module comprises SHA1 and two kinds of HASH algorithms of SHA256.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009201342852U CN201489524U (en) | 2009-07-29 | 2009-07-29 | Code integrity check circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009201342852U CN201489524U (en) | 2009-07-29 | 2009-07-29 | Code integrity check circuit |
Publications (1)
Publication Number | Publication Date |
---|---|
CN201489524U true CN201489524U (en) | 2010-05-26 |
Family
ID=42428394
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009201342852U Expired - Lifetime CN201489524U (en) | 2009-07-29 | 2009-07-29 | Code integrity check circuit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN201489524U (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103034599A (en) * | 2012-12-12 | 2013-04-10 | 深圳国微技术有限公司 | Security DMA (Direct Memory Access) controller, SOC (System-on-a-Chip) system and data transportation method of SOC system |
CN105335670A (en) * | 2015-10-29 | 2016-02-17 | 深圳国微技术有限公司 | Real-time integrity checking method and checking circuit as well as security chip |
CN109902035A (en) * | 2019-02-03 | 2019-06-18 | 成都皮兆永存科技有限公司 | Composite memory |
-
2009
- 2009-07-29 CN CN2009201342852U patent/CN201489524U/en not_active Expired - Lifetime
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103034599A (en) * | 2012-12-12 | 2013-04-10 | 深圳国微技术有限公司 | Security DMA (Direct Memory Access) controller, SOC (System-on-a-Chip) system and data transportation method of SOC system |
CN103034599B (en) * | 2012-12-12 | 2015-07-22 | 深圳国微技术有限公司 | Security DMA (Direct Memory Access) controller, SOC (System-on-a-Chip) system and data transportation method of SOC system |
CN105335670A (en) * | 2015-10-29 | 2016-02-17 | 深圳国微技术有限公司 | Real-time integrity checking method and checking circuit as well as security chip |
CN109902035A (en) * | 2019-02-03 | 2019-06-18 | 成都皮兆永存科技有限公司 | Composite memory |
CN109902035B (en) * | 2019-02-03 | 2023-10-31 | 成都皮兆永存科技有限公司 | composite memory |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106775716B (en) | Trusted PLC (programmable logic controller) starting method based on measurement mechanism | |
US6839849B1 (en) | Smart integrated circuit | |
CN105095772B (en) | Method and apparatus for safely saving and restoring computing platform state | |
CN100489805C (en) | Autonomous memory checker for runtime security assurance and method therefore | |
CN204990315U (en) | Circuit and smart phone | |
JP4364292B2 (en) | Game machine control chip and game machine control method | |
CN103164643B (en) | A kind of method and apparatus that anti-debug is carried out by hardware | |
CN109582354A (en) | Security engine method, internet of things equipment, non-transitory computer-readable storage media | |
CN109564606A (en) | Method and apparatus for security coprocessor to be used for firmware protection | |
CN102591824B (en) | DMA (direct memory access) controller for controlling security data transfer in SOC (system on a chip) chip system | |
US20050251708A1 (en) | Microprocessor comprising error detection means protected against an attack by error injection | |
CN101124768A (en) | System and method of using a protected non-volatile memory | |
US20210081546A1 (en) | System and method for the cryptographically protected monitoring of at least one component of a device or an apparatus | |
CN109977702B (en) | FPGA equipment encryption authentication system based on DS2432 chip | |
CN109753391A (en) | The systems, devices and methods of the functional test of one or more structures of processor | |
CN201489524U (en) | Code integrity check circuit | |
US10382417B2 (en) | Secure protocol for chip authentication | |
CN101021885B (en) | Method for protecting chip internal information security based on JTAG port control | |
CN103186729B (en) | The method utilizing encryption lock to protect software and encryption lock | |
CN105868657B (en) | Device and method for safely operating the device | |
JPH08508352A (en) | Safe critical processor and processing method for data processing system | |
CN111597560B (en) | Safe and reliable module starting method and system | |
US20200184068A1 (en) | Device such as a connected object provided with means for checking the execution of a program executed by the device | |
JP4226845B2 (en) | Game machine control chip and game machine control method | |
CN100474322C (en) | Protective system of program of complicated programmable logic module and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CX01 | Expiry of patent term |
Granted publication date: 20100526 |
|
CX01 | Expiry of patent term |