CN103455445A - Method of intelligent card system for resisting to fault attack - Google Patents
Method of intelligent card system for resisting to fault attack Download PDFInfo
- Publication number
- CN103455445A CN103455445A CN201210175194XA CN201210175194A CN103455445A CN 103455445 A CN103455445 A CN 103455445A CN 201210175194X A CN201210175194X A CN 201210175194XA CN 201210175194 A CN201210175194 A CN 201210175194A CN 103455445 A CN103455445 A CN 103455445A
- Authority
- CN
- China
- Prior art keywords
- function
- finished
- intelligent card
- smart card
- card system
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 19
- 230000006870 function Effects 0.000 claims abstract description 53
- 230000004044 response Effects 0.000 claims abstract description 8
- 230000005856 abnormality Effects 0.000 claims description 8
- 230000002159 abnormal effect Effects 0.000 abstract description 6
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 description 3
- 229910052710 silicon Inorganic materials 0.000 description 3
- 239000010703 silicon Substances 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000007613 environmental effect Effects 0.000 description 2
- 230000004888 barrier function Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000005672 electromagnetic field Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
Images
Landscapes
- Storage Device Security (AREA)
Abstract
The invention discloses a method of an intelligent card system for resisting to fault attack. The method comprises the steps of: step 1, opening up a memory region in the intelligent card to be used for storing executing state information of functions; step 2, setting the function executing state in a state of being unexecuted completely at the initial position of each function; step 3, setting the function executing state in a state of being executed completely at an exiting position of each function; step 4, detecting whether all the functions are executed before the intelligent card turns back a response; if any function is not executed completely, carrying out exception handling. The method of the intelligent card system for resisting to the fault attack can prevent abnormal problem of the program process efficiently, so that leakage of sensitive information can be prevented.
Description
Technical field
The present invention relates to a kind of method of smart card system opposing fault attacks.
Background technology
Intelligent card chip adopts silicon chip to make usually.The electrical property of silicon chip can change along with different environmental parameters.For example, the electrical property of silicon chip will change along with the variation of different voltage, temperature, light, ionising radiation and peripheral electromagnetic field.The assailant will attempt to introduce some wrong behaviors by changing these environmental parameters, comprise the program flow of chip is introduced to fault.Usually, the assailant can force chip to make the decision made mistake, and allows the private data in reference-to storage.This behavior is unallowed under normal circumstances.
Shown in Figure 1, the program flow of chip is by by the COS(chip operating system) complete.At first COS will receive instruction, receives after instruction to resolve this instruction and will complete which kind of function, then according to the functional requirement operational hardware parsed, completes corresponding operation, finally returns to the response for this instruction.
When COS just is introduced in run time fault, make the program flow of chip change, current function is undesired to be exited.Program execution flow may be jumped out set operation, and removes the code of execution error, and the errored response of returning wherein may comprise responsive or secret information.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of method of smart card system opposing fault attacks, can effectively take precautions against the program circuit abnormal problem, thereby prevent sensitive information leakage.
For solving the problems of the technologies described above, the method for smart card system opposing fault attacks of the present invention, comprise the steps:
Step 1 is opened up a region of memory and is used for the execution state information of storage function in smart card;
Step 2, be set to not be finished in the reference position function executing state of each function;
Step 3, in the position function executing state that exits of each function, to be set to executed complete;
Whether step 4, detect all functions and all be finished before smart card returns to response, if there is any function not to be finished, can carry out abnormality processing.
The COS of smartcard internal lacks security protection at present, easily is subject to fault attacks.Whether whether the present invention removes identification information by the position of adding identification information in the inner starting position of function and exit at it, and detect identification information and all be eliminated, come discriminant function extremely to exit.Thereby effectively resist barrier for some reason in the COS aspect and attack the program operation exception problem caused, prevent the leakage of abnormal sensitive information; Can provide reliable security protection for chip.
Adopt method of the present invention only the function in program circuit just can complete the operation that execution state information is set, the impact on execution speed with respect to whole COS is very little.And its size of code to account for total code amount ratio quite little, can not affect the use on the chip very large to the internal memory restriction.
The accompanying drawing explanation
Below in conjunction with accompanying drawing and embodiment, the present invention is further detailed explanation:
Fig. 1 is COS control flow schematic diagram;
Fig. 2 is the method control flow schematic diagram of smart card system opposing fault attacks.
Embodiment
Shown in Fig. 2, the method for described smart card system opposing fault attacks, comprise the steps:
Step 1 is opened up a region of memory and is used for the execution state information of storage function in smart card.Described region of memory can be the RAM(random access memory), the EEPROM(EEPROM (Electrically Erasable Programmable Read Only Memo)) or the Flash(flash memory) etc. storer.The execution state information of described function refers to the numerical value whether function is finished.
Step 2, be set to not be finished in the reference position function executing state of each function.The reference position of described function refers to the address at the first Codabar code of this function program place.
Step 3, in the position function executing state that exits of each function, to be set to executed complete.Described function exit the address that position refers to Codabar code place, this function program end.
Whether step 4, detect all functions and all be finished before smart card returns to response, if there is any function not to be finished, can carry out abnormality processing.Described abnormality processing can be that the modes such as warning message are returned in shielding return data, response, rather than returns to wrong data, thereby prevents that sensitive information from being revealed.
Be below one embodiment of the present of invention, use in this embodiment 32 c language program under system to do explanation, idiographic flow is as follows:
The first step, define the global variable g_flag of an int type, has been equivalent to open up the memory headroom of 4 bytes.Set the function of each sign of g_flag.The value of identification information all is set as 1, and is initialized as non-1.
Second step, the executing state of each function is set to not be finished in reference position, and by each function, the flag of corresponding global variable g_flag writes 1.
The 3rd step, to be set to executed complete exiting position for the executing state of each function, the flag clear 0 of corresponding global variable g_flag by function.
The 4th step, whether the executing state that detects each function before returning to response is all the state of being finished, whether g_flag is 0.If be not 0 to show at least to exist a function abnormal ending, carry out abnormality processing.
In sum, the present invention can effectively prevent the importing hindered for some reason and the program flow caused is abnormal.Its committed step is: by the executing state of setting and detection function, carry out abnormality detection; Can under the prerequisite that does not affect the COS execution efficiency, prevent that program flow from occurring abnormal by this method, avoid responsive information leakage.
The quality of COS affects the safety of chip, and a good COS can prevent from being attacked by more effective protection chip.The invention enables COS to there is stronger robustness, can effectively resist fault attacks.When fault is imported into, thus COS can note abnormalities can take the reply measure.
The present invention is not limited to embodiment discussed above.The above description to embodiment is intended in order to describe and illustrate the technical scheme the present invention relates to.Apparent conversion based on the present invention enlightenment or substitute and also should be considered to fall into protection scope of the present invention.Above embodiment is used for disclosing best implementation method of the present invention, so that those of ordinary skill in the art can apply numerous embodiments of the present invention and multiple alternative reaches purpose of the present invention.
Claims (6)
1. the method for a smart card system opposing fault attacks, is characterized in that, comprises the steps:
Step 1 is opened up a region of memory and is used for the execution state information of storage function in smart card;
Step 2, be set to not be finished in the reference position function executing state of each function;
Step 3, in the position function executing state that exits of each function, to be set to executed complete;
Whether step 4, detect all functions and all be finished before smart card returns to response, if there is any function not to be finished, carries out abnormality processing.
2. the method for claim 1, it is characterized in that: the described region of memory of step 1 comprises RAM, EEPROM, flash memory Flash storer.
3. method as claimed in claim 1 or 2, it is characterized in that: the execution state information of the described function of step 1 refers to the numerical value whether function is finished.
4. the method for claim 1 is characterized in that: the reference position of the described function of step 2 refers to the address at the first Codabar code of this function program place.
5. the method for claim 1 is characterized in that: the described function of step 3 exit the address that position refers to this Codabar code place, function program end.
6. the method for claim 1 is characterized in that: the described abnormality processing of step 4 can be the shielding return data or return to warning message.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210175194XA CN103455445A (en) | 2012-05-31 | 2012-05-31 | Method of intelligent card system for resisting to fault attack |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210175194XA CN103455445A (en) | 2012-05-31 | 2012-05-31 | Method of intelligent card system for resisting to fault attack |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN103455445A true CN103455445A (en) | 2013-12-18 |
Family
ID=49737837
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201210175194XA Pending CN103455445A (en) | 2012-05-31 | 2012-05-31 | Method of intelligent card system for resisting to fault attack |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN103455445A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105656629A (en) * | 2014-11-25 | 2016-06-08 | 上海华虹集成电路有限责任公司 | Secure non-adjacent form realization method in chip |
| CN106874987A (en) * | 2017-03-22 | 2017-06-20 | 成都芯昊芯科技有限公司 | A kind of passive tag chip mode of operation collocation method |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1350675A (en) * | 1999-03-09 | 2002-05-22 | 格姆普拉斯公司 | Method for monitoring a programme flow |
| CN1519702A (en) * | 2003-01-20 | 2004-08-11 | 上海华虹集成电路有限责任公司 | Method for preventing incorrect manipulating on information recording carrier when jumping crror happended in program in IC card |
| US20070174909A1 (en) * | 2005-02-18 | 2007-07-26 | Credant Technologies, Inc. | System and method for intelligence based security |
| CN101068416A (en) * | 2007-06-08 | 2007-11-07 | 北京恒宝信息技术有限公司 | Method and device used for multi-mode smart card operating system |
| CN102053927A (en) * | 2010-12-29 | 2011-05-11 | 北京握奇数据系统有限公司 | Attack monitoring method and device with attack monitoring function |
| CN102063387A (en) * | 2010-12-27 | 2011-05-18 | 北京握奇数据系统有限公司 | Method for detecting attack and device with attack detecting function |
-
2012
- 2012-05-31 CN CN201210175194XA patent/CN103455445A/en active Pending
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1350675A (en) * | 1999-03-09 | 2002-05-22 | 格姆普拉斯公司 | Method for monitoring a programme flow |
| US7168065B1 (en) * | 1999-03-09 | 2007-01-23 | Gemplus | Method for monitoring program flow to verify execution of proper instructions by a processor |
| CN1519702A (en) * | 2003-01-20 | 2004-08-11 | 上海华虹集成电路有限责任公司 | Method for preventing incorrect manipulating on information recording carrier when jumping crror happended in program in IC card |
| US20070174909A1 (en) * | 2005-02-18 | 2007-07-26 | Credant Technologies, Inc. | System and method for intelligence based security |
| CN101068416A (en) * | 2007-06-08 | 2007-11-07 | 北京恒宝信息技术有限公司 | Method and device used for multi-mode smart card operating system |
| CN102063387A (en) * | 2010-12-27 | 2011-05-18 | 北京握奇数据系统有限公司 | Method for detecting attack and device with attack detecting function |
| CN102053927A (en) * | 2010-12-29 | 2011-05-11 | 北京握奇数据系统有限公司 | Attack monitoring method and device with attack monitoring function |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105656629A (en) * | 2014-11-25 | 2016-06-08 | 上海华虹集成电路有限责任公司 | Secure non-adjacent form realization method in chip |
| CN105656629B (en) * | 2014-11-25 | 2018-12-11 | 上海华虹集成电路有限责任公司 | Safe non-adjacent expression type implementation method in chip |
| CN106874987A (en) * | 2017-03-22 | 2017-06-20 | 成都芯昊芯科技有限公司 | A kind of passive tag chip mode of operation collocation method |
| CN106874987B (en) * | 2017-03-22 | 2019-06-14 | 成都芯昊芯科技有限公司 | A kind of passive tag chip operating mode configuration method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7797682B2 (en) | Controlled execution of a program used for a virtual machine on a portable data carrier | |
| US20050229164A1 (en) | Method to secure the execution of a program against attacks by radiation or other | |
| CN106991328A (en) | A kind of vulnerability exploit detection recognition method based on Dram fingerprint anomaly analysis | |
| EP2629447A1 (en) | Method and device for protecting an electronic device against fault attack(s) | |
| US7516902B2 (en) | Protection of a microcontroller | |
| US10148671B2 (en) | Method for protecting a chip card against a physical attack intended to modify the logical behaviour of a functional program | |
| CN103455445A (en) | Method of intelligent card system for resisting to fault attack | |
| RU2469384C2 (en) | Method of masking end-of-life transition of electronic device, and device including corresponding control module | |
| US20110252222A1 (en) | Event counter in a system adapted to the javacard language | |
| EP4213443A1 (en) | Method for detecting a fault injection in a data processing system | |
| CN112149065B (en) | Software defense fault injection method | |
| JP6340935B2 (en) | IC chip, abnormality detection processing method, and program | |
| US20140289874A1 (en) | Integrated circuit (ic) chip and method of verifying data thereof | |
| JP6769265B2 (en) | Electronic information storage medium, IC card, data abnormality confirmation method, and data abnormality confirmation program | |
| CN107145805A (en) | A kind of anti-error erasable implementation method of FLASH/MTP internal datas | |
| JP6119345B2 (en) | IC chip, IC card, verification processing method, and verification processing program | |
| US7806319B2 (en) | System and method for protection of data contained in an integrated circuit | |
| CN108256356B (en) | Method for resisting fault injection of chip register | |
| JP6424633B2 (en) | Electronic information storage medium, abnormality detection method, and program | |
| US20090095955A1 (en) | Semiconductor integrated circuit and testing method thereof | |
| US9372791B2 (en) | Method for masking the end-of-life transition of an electronic device and device comprising a corresponding control module | |
| CN113434247A (en) | Safety protection method for JAVA card virtual machine | |
| EP2877957B2 (en) | Method and device for protecting against fault attack(s) in an electronic device using a cache memory | |
| JP6424473B2 (en) | Arithmetic device, arithmetic method, and arithmetic processing program | |
| HK1234854A1 (en) | Secure chip, and nonvolatile storage control device and method for same |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20131218 |
|
| WD01 | Invention patent application deemed withdrawn after publication |