CN101576948A - Allowed method for guarding singlechip programmer - Google Patents

Allowed method for guarding singlechip programmer Download PDF

Info

Publication number
CN101576948A
CN101576948A CNA2009101473092A CN200910147309A CN101576948A CN 101576948 A CN101576948 A CN 101576948A CN A2009101473092 A CNA2009101473092 A CN A2009101473092A CN 200910147309 A CN200910147309 A CN 200910147309A CN 101576948 A CN101576948 A CN 101576948A
Authority
CN
China
Prior art keywords
data
authorization message
permission
information
carrier store
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.)
Granted
Application number
CNA2009101473092A
Other languages
Chinese (zh)
Other versions
CN101576948B (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.)
Aerospace Science and Industry Shenzhen Group Co Ltd
Original Assignee
Aerospace Science and Industry Shenzhen Group Co Ltd
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 Aerospace Science and Industry Shenzhen Group Co Ltd filed Critical Aerospace Science and Industry Shenzhen Group Co Ltd
Priority to CN2009101473092A priority Critical patent/CN101576948B/en
Publication of CN101576948A publication Critical patent/CN101576948A/en
Application granted granted Critical
Publication of CN101576948B publication Critical patent/CN101576948B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

The invention relates to an allowed method for guarding a singlechip programmer, wherein a CPU generates authentication authentication codes according to received programming license files; data binding is carried out on the CPU and a data memory; license information in the received programming license files is encrypted and locked; the authentication codes and encrypted and locked license information form authorization messages which are stored in an information memory of the CPU and the data memory; every time when the programmer is electrified to execute programming, a central controller verifies authorization messages in the information memory and the data memory; when the authorization messages are right; the programmer enters the programming process and updates the authentication codes and the license information to generate new authorization messages which are stored in the information memory and the data memory; the authorization messages are removed when the messages are not correct. The method of the invention can guard a programming license and prevent a programmer software from being copied.

Description

The permission guard method of single-chip programmer
Technical field
The present invention relates to the singlechip technology field, more particularly, relate to a kind of permission guard method of single-chip programmer.
Background technology
Single-chip microcomputer often provides singlechip chip in the loose mail mode to the user in using, and for user's production associated electrical voluntarily product, therefore, need control user's production quantity by the mode of scm software mandate.This authorization is divided into two kinds: the first before user's singlechip chip is provided in advance with software download in chip; It two is that the singlechip chip that does not carry software directly is provided, by the user voluntarily by the single-chip programmer downloaded software.Because first kind of mode need be destroyed the packing of singlechip chip, can cause the chip pin oxidation, therefore, often adopts the second way.
In the second way, single-chip programmer is to be used for instrument with software code write store chip or single-chip microcomputer inside.Existing single-chip programmer mostly is common platform; the user is not carried out permission control; therefore; can't carry out limiting protecting to the download permission of single-chip programmer; make other people be easy to steal or propagation software; even in the part programming device download time is limited, but its protection is abundant inadequately, is easy to be cracked.So just can not control the quantity that the user produces complete machine well, thereby cause economic loss.
Summary of the invention
The technical problem to be solved in the present invention is; at the above-mentioned defective that prior art exists, can protect, prevent that other people from stealing or propagation software is effectively controlled the permission guard method that the user produces the single-chip programmer of complete machine quantity to the programming permission of single-chip programmer thereby provide a kind of.
The technical solution adopted for the present invention to solve the technical problems is: a kind of permission guard method of single-chip programmer is provided, this single-chip programmer comprises central processing unit and data-carrier store, wherein, be provided with information-storing device in the described central processing unit, described central processing unit and described data-carrier store carry out data access by universal serial bus, described central processing unit generates authentication code so that this central processing unit and described data-carrier store are carried out data binding according to the programming license file that is received, and the License Info in the programming license file that is received encrypted and be locked, License Info after described authentication code and encryption and the locking forms authorization message, deposits in described information-storing device and the described data-carrier store; At every turn power on programme when permission described central controller of described programmable device is all verified the authorization message in described information-storing device and the described data-carrier store, when described authorization message is correct, enter programming process and upgrade described authentication code and described License Info to generate new authorization message, deposit in described information-storing device and the described data-carrier store; When described authorization message is incorrect, remove this authorization message.
Described programming license file also comprises register information, and this register information comprises user ID, product information and sequence number.
As operational factor, the random number computing that is produced with this central processing unit generates described authentication code to described central processing unit with the fixed data in the programming license file that is received.
Described central processing unit forms authorization code with described register information scrambler coding inner with it, and this authorization code is encrypted described License Info as master key.
Described License Info is encrypted the back and is added CRC check sign indicating number and the locking of non-standard CRC-A check code by standard C RC algorithm and non-standard CRC-A algorithm.
Described central controller comprised the following steps: the checking of the authorization message in described information-storing device and the described data-carrier store when described programmable device powered at every turn
(1) described central processing unit authenticates described data-carrier store, and whether the data-carrier store of determining to be connected to described central processing unit is the data processor with this central processing unit data binding, if, then carry out subsequent step, otherwise, the programming permission finished;
(2) described central processing unit is verified the authorization message in the described information-storing device, determines whether it is correct;
(3) described central processing unit is verified the authorization message in the described data-carrier store, determines whether it is correct.
Central processing unit comprises the authentication of described data-carrier store described in the described step (1):
Read the authorization message in the described information-storing device, this authorization message after the CPC computing, is judged whether it is legal;
Read the authorization message in the described data-carrier store, this authorization message after the CPC computing, is judged whether it is legal;
Calculate the scrambler in the described authorization message, and judge whether it is legal;
Authorization message in authorization message in the described information-storing device and the described data-carrier store is carried out cross validation: by described central processing unit verify in the authorization message in the described data-carrier store authentication code whether in the correct and described information-storing device authentication code of corresponding binding data form whether correct.
Also comprise between described step (1) and the described step (2):
Described central processing unit judges whether it exists permission;
If there is permission, then calculate and generate new License Info, and judge whether contained permission programming number of times is zero in the described License Info, if this permission programming number of times is non-vanishing, then carries out described step (2) and described permission programming number of times is subtracted 1; If permission programming number of times is zero, then the prompting permission uses up;
If there is not permission, then judge whether to receive the programming license file through communication interface, when receiving the programming license file, described central processing unit generates authentication code so that this central processing unit and described data-carrier store are carried out data binding according to this programming license file, and according to the license file encrypted permission information that is received and be locked, License Info after described authentication code and encryption and the locking forms authorization message, deposit in described information-storing device and the described data-carrier store, carry out described step (3) subsequently.
Described step (2) comprising:
Read the authorization message in the described information-storing device, decipher this authorization message, obtain License Info, judge whether this License Info is legal;
If described License Info is legal, then calculate the CRC check sign indicating number of described authorization message, judge whether this CRC check sign indicating number is 0;
If described CRC check sign indicating number is 0, then calculates first scrambler and second scrambler of described authorization message successively and judge whether it is legal;
If described first scrambler and second scrambler are all legal, then upgrade its information-storing device according to the new License Info that is generated, and generate new authentication code, this new authentication code is kept in the described information-storing device to upgrade the data binding between described central processing unit and the described data-carrier store.
Described step (3) comprising:
Read the authorization message in the described data-carrier store,, judge whether it is legal through the CRC computing;
From described authorization message, obtain register information and judge whether it is legal;
Authorization code in the decrypt authorized information enters programming process, and generates new authorization message according to new authentication code and new License Info, deposits in described information-storing device and described data-carrier store for the use that powers on next time.
The present invention is by being stored in the information-storing device and data-carrier store of central controller after License Info is encrypted and locked, it is errorless to carry out multiple authentication after single-chip programmer powers at every turn, just allow to enter programming process, so can prevent effectively that other people from distorting License Info, and when finding that License Info is distorted, central processing unit can be removed permission immediately, and the locking user right to use prevents that so more effectively the user from distorting License Info and programming.
Simultaneously, single-chip programmer powers at every turn, all License Info is upgraded, and all lockings again after each the renewal, come the download permission of single-chip programmer is effectively protected, prevent that other people from stealing or propagation software.Further, the present invention encodes the register information in the programming license file with its scrambler, form authorization code, as master key, License Info is encrypted, again License Info is locked by standard C RC algorithm and non-standard CRC-A algorithm, all lockings again after License Info powers at every turn and upgrades, and scrambler can upgrade at any time according to pseudo random number, so just effectively prevents that other people from stealing or propagation software.
In addition, the present invention carries out data binding with central processing unit and data processor, at every turn powering on of programmable device all can be carried out the verification authentication to the data processor, and upgrades described binding relationship, thereby prevents that effectively the user from adopting the mode method of removing the memory copy permission to secure permission.
Therefore, the present invention can prevent very effectively that other people from stealing or propagation software, thereby avoid the user to purchase device production voluntarily, produce complete machine quantity with the control user, simultaneously also can avoid the single-chip microcomputer object code directly to be exposed to the user, prevent that effectively the user from adopting the decompiling means to obtain source code, avoid stealing or propagation software produces economic loss owing to other people.
The invention will be further described below in conjunction with drawings and Examples.
Description of drawings
Fig. 1 is the present invention carries out authorization to single-chip programmer a process flow diagram.
Fig. 2 is the process flow diagram that single-chip programmer powers on and programmes and permit among the present invention.
Fig. 3 is the detail flowchart that single-chip programmer powers on and authenticates among the present invention among Fig. 2.
Fig. 4 is the detail flowchart of information-storing device data verification among the present invention among Fig. 2.
Fig. 5 is the detail flowchart of data-carrier store data verification among the present invention among Fig. 2.
Embodiment
In the permission guard method of single-chip programmer of the present invention; single-chip programmer comprises central processing unit (Central processing unit; be called for short CPU) and data-carrier store (EEPROM (Electrically Erasable Programmable Read Only Memo) (Electrically Erasable Programmable Read-Only Memory; be called for short EEPROM)); wherein be provided with information-storing device (the Flash storer is called for short flash memory) and program storage in the CPU.Can pass through I between CPU and the data-carrier store 2C (Inter-Integrated Circuit) twin wire universal serial bus carries out data access.
The permission guard method of single-chip programmer of the present invention when this single-chip programmer being used for for the first time the singlechip chip programming, is at first carried out authorization to single-chip programmer.As shown in Figure 1, obtain the programming license file by this programmable device by communication interface (for example RS232 interface), include register information, License Info etc. in this programming license file, step S100, wherein register information comprises user ID, product information, sequence number fixed datas such as (ID numbers).
Programmable device at step S101, carries out data binding with CPU and data-carrier store after obtaining the programming license file.CPU deposits a fixed data in the programming license file that is obtained in its information-storing device in, as the computing radix, the random number computing that is produced with this CPU produces authentication code, and deposit this authentication code in data-carrier store, part as its authorization message, and deposit the CPU information-storing device in the form of binding data, as the part of its authorization message.In the present embodiment, select for use user ID as fixed data, the compute mode of authentication code then can adopt the following mode that exemplifies:
CPU, obtains 6 byte result datas by the computing with its random number and stores in the data-carrier store, wherein as computing radix (8 bytes) with user ID: result data 1=computing radix 1+ computing radix 8+ random number 1; Result data 2=computing radix 2+ computing radix 7+ random number 2; Result data 3=computing radix 3+ computing radix 6+ random number 1; Result data 4=computing radix 4+ computing radix 5+ random number 2; Result data 5=CRC16 (computing radix 1~result data 4) low byte; Result data 6=CRC16 (computing radix 1~result data 4) high byte.First byte of result data 1 ecbatic data, other and the like; CRC16 is 16 cyclic redundancy check (CRC) (Cyclic RedundancyCheck).The result data that obtains thus is authentication code.
Can certainly adopt other modes to calculate authentication code, make the binding of this authentication code and random number.
Afterwards, at every turn powering on of programmable device all can authenticate the data storer by authentication code, and upgrades random number and binding relationship, and this point is described in detail hereinafter.
Subsequently, CPU encrypts and is locked the License Info in the programming license file, generates authorization message with authentication code, and this authorization message is kept in the information-storing device and data-carrier store of CPU, step S102.Specifically, the register information (as user ID, product information, sequence number etc.) that CPU will programme in the license file deposits in the data-carrier store together with CPU inside scrambler and License Info etc., and user ID, product information, sequence number and the inner scrambler of CPU of register information in the programming license file encoded, form authorization code, utilize this authorization code as the master key of encrypting, License Info is encrypted.Afterwards, by standard C RC algorithm and non-standard CRC-A algorithm License Info is locked, just License Info is added standard C RC check code and non-standard CRC-A check code, wherein, standard C RC algorithm is reversible, and its algorithm polynomial expression can be: Y (X)=X16+X15+X13+1; Non-standard CRC-A algorithm is irreversible, and its algorithm polynomial expression can be: Y (X)=X16+X12+X10+X8+X4+1.Thus, can form authorization message, this authorization message is kept in CPU information-storing device and the data-carrier store.
In one embodiment, it is listed that the data structure of the authorization message of being preserved in the data-carrier store can be exemplified below table:
Sequence number The address Form Quantity (BYTE) Explanation
1 10H ASCII 8 User ID
2 18H ASCII 8 Product information
3 20H BCD 8 The programmable device sequence number
4 28H HEX 8 First scrambler, internal calculation is used
5 30H HEX 2 License Info 1
6 32H HEX 2 License Info 2
7 34H HEX 2 Non-standard CRC-A check code
8 36H HEX 2 Standard C RC check code
9 38H HEX 8 Second scrambler, internal calculation is used
10 40H ASCII 8 Sequence number
11 48H HEX 2 Standard C RC check code
12 4AH HEX 6 The data-carrier store authentication code
In the above-described embodiments, License Info is stored in two position 30H and 32H respectively in the mode of pseudo-code, respectively takies two bytes, and address 34H preserves the non-standard CRC-A check code of 1 four bytes of License Info, and address 36H preserves preceding 6 byte standard C RC check codes.Particularly, License Info can 16 signless integer forms exist, and this means that its maximal value can be 65535; At first with 5 of License Info ring shift lefts, high byte is as a result subtracted 5AH during storage, low byte adds " License Info 1 " that is saved in 30H behind the 5AH, and high byte is as a result subtracted 85H, and low byte adds " License Info 2 " that is saved in 32H behind the 58H; Obtain check code by non-standard CRC-A algorithm computation then, be stored in " non-standard CRC-A check code ", obtain check code, be stored in " standard C RC check code " by standard C RC algorithm computation.First scrambler then can be by 8 the bytes correspondences addition with product information, programmable device sequence number and License Info 1 start address, after drawing 8 byte results, by the circulative accumulation additive process (for example, be designated data 1, data 2, data 3 and data 4 for four data, the 1=data 1 * 2 as a result, 2=1+ data 2 * 2 as a result as a result ..., n=result (n-1)+data n * 2 as a result) obtain.Second scrambler then can be by with 8 the byte corresponding additions of first scrambler with License Info 1 start address, then with after ID number the reversed order more in proper order with the results added of front, obtain obtaining by above-mentioned circulative accumulation additive process after 8 bytes.The standard C RC check code that deposit at 48H place, address can be by obtaining all bytes from " being used for sign " to " ID number " through standard C RC algorithm computation.
Certainly, this authorization message also can adopt other forms of data structure, is not limited to the structure that the foregoing description is given an example, and wherein the account form of scrambler etc. also can be carried out conversion.
In the permission guard method of single-chip programmer of the present invention, when powering at every turn, the single-chip microcomputer scrambler desires to encode when permission, as shown in Figure 2; at first; at step S200, by CPU the data storer is authenticated in the power up, confirm whether this data-carrier store is legal.Confirm whether whether data-carrier store legal just correct by the authentication code in the CPU checking data storer, and whether the authentication code of corresponding binding data form is correct in the checking CPU internal information storer, judge thus whether this data-carrier store is what to authenticate, promptly, secure permission by the mode of removing the data-carrier store copy permission effectively to prevent the user with the data-carrier store of cpu data binding.The concrete steps of this authentication that powers on as shown in Figure 3.
In Fig. 3, CPU at first reads authorization message wherein from its information-storing device, and this authorization message after the CPC computing, is judged whether it is legal; From data-carrier store, read authorization message wherein again, this authorization message after the CPC computing, is judged whether it is legal; Then, according to the scrambler in the scrambler computing method calculating authorization message, and judge whether it is correct; At last, carry out cross validation for authorization message in the information-storing device and the authorization message in the data-carrier store, comprise in this process whether correct in authentication code in the CPU verification msg storer authorization message and the checking CPU information-storing device whether corresponding binding data is correct, if authentication code is correct and information-storing device in binding data correct, what determine promptly that this data-carrier store is that CPU authenticated is the data-carrier store of data binding.In the above-mentioned steps, no matter which step is judged information or data are illegal or incorrect, all carries out bomp and removes authorization message, finishes the permission programming process; Only under the situation that information in each step or data are legal or correct, just carry out next procedure.Under the correct situation of final cross validation, enter step S201 shown in Figure 2.
At step S201, the single-chip microcomputer scrambler judges whether it exists permission, if there is permission, then enters step S202, and CPU calculates and generates new License Info.At this moment, carry out the judgement of contained permission programming number of times in the License Info, step S203, to determine that whether permission programming number of times serves as zero, if permission programming number of times is non-vanishing, then enters step S204, by CPU its information-storing device is carried out data verification, and will permit the programming number of times to subtract 1; If permission programming number of times is zero, then the prompting permission uses up.
The information-storing device data verification of step S204, whether the authorization message that is used for the authorization information storer is correct, if authorization message is correctly then upgraded License Info and authentication code, and enters step S206.Further as shown in Figure 4, at first, from its information-storing device, read authorization message, decipher this authorization message, obtain License Info, judge whether this License Info is legal, under legal situation, calculate the CRC check sign indicating number, judge whether this CRC check sign indicating number is 0 by CPU.If the CRC check sign indicating number is 0 to be that data are correct, then calculate first scrambler and second scrambler successively and judge whether it is legal, if it is all legal, then the new License Info that obtains in step S202 according to CPU upgrades its information-storing device, and recomputate generation and preserve authentication code, to upgrade the binding relationship between CPU and the data-carrier store.This mode that recomputates authentication code can be as follows:
Result data 1=computing radix 1+ computing radix 8+CRC 1+BCH; Result data 2=computing radix 2+ computing radix 7+CRC 2+CBH; Result data 3=computing radix 3+ computing radix 6+CRC1+93H; Result data 4=computing radix 4+ computing radix 5+CRC 2+39H; Computing radix 1=computing radix 1+ computing radix 8+ result data 1+BCH; Computing radix 2=computing radix 2+ computing radix 7+ result data 2+CBH; Computing radix 3=computing radix 3+ computing radix 6+ result data 3+93H; Computing radix 4=computing radix 4+ computing radix 5+ result data 4+39H; Computing radix 5=result data 1+BCH; Computing radix 6=result data 2+CBH; Computing radix 7=result data 3+93H; Computing radix 8=result data 4+39H; Result data 5=CRC16 (computing radix 1~result data 4) low byte; Result data 6=CRC16 (computing radix 1~result data 4) high byte.The result data that obtains thus is new authentication code.
Can certainly adopt other modes to upgrade authentication code, thereby upgrade the binding relationship between CPU and the data-carrier store,, prevent that data-carrier store is stolen with the locking data storer.
In the above-mentioned information-storing device data authentication process,, then remove the former License Info in the information-storing device, and skip the CRC check yardage and calculate and deterministic process, enter the process of removing first scrambler if the License Info that reduction obtains is illegal.The result is non-vanishing if the CRC check yardage is calculated, and promptly data are wrong, then remove the computation process data, also enters the process of removing first scrambler.If first scrambler is illegal, directly enter the process of removing first scrambler.After entering the process of removing first scrambler, judge whether former authorization message is destroyed,, then carry out data and recover that the permission programming process finishes if destroyed; Otherwise, remove second scrambler.Certainly, if second scrambler is illegal, also directly enter the process of removing second scrambler, the permission programming process finishes.
Thus, can finish the information-storing device data verification.If the information-storing device data verification is errorless, then enters step S206 subsequently, carries out data-carrier store data verification and processing procedure.
If the single-chip microcomputer scrambler judges that there is not permission in it among the step S201, then enter step S205, CPU judges whether to receive the programming license file through communication interface (for example RS232 interface), under the situation of receiving the programming license file, carry out the authorization step, be execution in step S101-S102, the information of obtaining the authorization.Enter step S206 subsequently, carry out the data-carrier store data handling procedure.Otherwise,, then finish whole permission programming process if do not receive the programming license file.
The data-carrier store data verification process of step S206 as shown in Figure 5, is verified the authorization message in the data storer once more.At first, CPU reads authorization message from data-carrier store, through the CRC computing, judges whether it is legal, if illegal, then returns error code, and removes authorization message, finishes the permission programming process; If legal, then from authorization message, obtain register information and judge whether it is legal, if register information is legal, the authorization code in the decrypt authorized information then, thus allow to programme, promptly enter programming process (software download process).If register information is illegal, then return error code, and remove authorization message, finish the permission programming process.
After programming process is finished, CPU generates new authorization message according to new License Info of being stored in its information-storing device and new authentication code, it is kept in CPU information-storing device and the data-carrier store, at this moment, data-carrier store and CPU data binding once more, the use so that single-chip programmer powers on next time.
The present invention is by being stored in the information-storing device and data-carrier store of central controller after License Info is encrypted and locked, it is errorless to carry out multiple authentication after single-chip programmer powers at every turn, just allow to enter programming process, so can prevent effectively that other people from distorting License Info, even find that License Info is distorted, central processing unit also can be removed permission immediately, and the locking user right to use prevents that so more effectively the user from distorting License Info and programming.
Simultaneously, single-chip programmer powers at every turn, all License Info is upgraded, and all encrypts again and lock after each the renewal, comes the download permission of single-chip programmer is effectively protected, and prevents that other people from stealing or propagation software.Further, the present invention encodes the register information in the programming license file with its scrambler, form authorization code, as master key, License Info is encrypted, again License Info is locked by standard C RC algorithm and non-standard CRC-A algorithm, all lockings again after License Info powers at every turn and upgrades, and scrambler can upgrade at any time according to pseudo random number, so just effectively prevents that other people from stealing or propagation software.
In addition, the present invention carries out data binding with central processing unit and data processor, at every turn powering on of programmable device all can be carried out the verification authentication to the data processor, and upgrades binding relationship, thereby prevents that effectively the user from adopting the mode method of removing the memory copy permission to secure permission.
Therefore, the present invention can prevent very effectively that other people from stealing or propagation software, thereby avoid the user to purchase device production voluntarily, produce complete machine quantity with the control user, simultaneously also can avoid the single-chip microcomputer object code directly to be exposed to the user, prevent that effectively the user from adopting the decompiling means to obtain source code, avoid stealing or propagation software produces economic loss owing to other people.

Claims (10)

1, a kind of permission guard method of single-chip programmer, this single-chip programmer comprises central processing unit and data-carrier store, wherein, be provided with information-storing device in the described central processing unit, described central processing unit and described data-carrier store carry out data access by universal serial bus, it is characterized in that, described central processing unit generates authentication code so that this central processing unit and described data-carrier store are carried out data binding according to the programming license file that is received, and the License Info in the programming license file that is received encrypted and be locked, License Info after described authentication code and encryption and the locking forms authorization message, deposits in described information-storing device and the described data-carrier store; At every turn power on programme when permission described central controller of described programmable device is all verified the authorization message in described information-storing device and the described data-carrier store, when described authorization message is correct, enter programming process and upgrade described authentication code and described License Info to generate new authorization message, deposit in described information-storing device and the described data-carrier store; When described authorization message is incorrect, remove this authorization message.
2, the permission guard method of single-chip programmer according to claim 1 is characterized in that, described programming license file also comprises register information, and this register information comprises user ID, product information and sequence number.
3, the permission guard method of single-chip programmer according to claim 1 and 2; it is characterized in that; as operational factor, the random number computing that is produced with this central processing unit generates described authentication code to described central processing unit with the fixed data in the programming license file that is received.
4, the permission guard method of single-chip programmer according to claim 2 is characterized in that, described central processing unit forms authorization code with described register information scrambler coding inner with it, and this authorization code is encrypted described License Info as master key.
According to the permission guard method of claim 1,2 or 4 described single-chip programmers, it is characterized in that 5, described License Info is encrypted the back and added CRC check sign indicating number and the locking of non-standard CRC-A check code by standard C RC algorithm and non-standard CRC-A algorithm.
6, the permission guard method of single-chip programmer according to claim 2 is characterized in that, described central controller comprised the following steps: the checking of the authorization message in described information-storing device and the described data-carrier store when described programmable device powered at every turn
(1) described central processing unit authenticates described data-carrier store, and whether the data-carrier store of determining to be connected to described central processing unit is the data processor with this central processing unit data binding, if, then carry out subsequent step, otherwise, the programming permission finished;
(2) described central processing unit is verified the authorization message in the described information-storing device, determines whether it is correct;
(3) described central processing unit is verified the authorization message in the described data-carrier store, determines whether it is correct.
7, the permission guard method of single-chip programmer according to claim 6 is characterized in that, central processing unit comprises the authentication of described data-carrier store described in the described step (1):
Read the authorization message in the described information-storing device, this authorization message after the CPC computing, is judged whether it is legal;
Read the authorization message in the described data-carrier store, this authorization message after the CPC computing, is judged whether it is legal;
Calculate the scrambler in the described authorization message, and judge whether it is legal;
Authorization message in authorization message in the described information-storing device and the described data-carrier store is carried out cross validation: by described central processing unit verify in the authorization message in the described data-carrier store authentication code whether in the correct and described information-storing device authentication code of corresponding binding data form whether correct.
8, according to the permission guard method of claim 6 or 7 described single-chip programmers, it is characterized in that, also comprise between described step (1) and the described step (2):
Described central processing unit judges whether it exists permission;
If there is permission, then calculate and generate new License Info, and judge whether contained permission programming number of times is zero in the described License Info, if this permission programming number of times is non-vanishing, then carries out described step (2) and described permission programming number of times is subtracted 1; If permission programming number of times is zero, then the prompting permission uses up;
If there is not permission, then judge whether to receive the programming license file through communication interface, when receiving the programming license file, described central processing unit generates authentication code so that this central processing unit and described data-carrier store are carried out data binding according to this programming license file, and according to the license file encrypted permission information that is received and be locked, License Info after described authentication code and encryption and the locking forms authorization message, deposit in described information-storing device and the described data-carrier store, carry out described step (3) subsequently.
9, the permission guard method of single-chip programmer according to claim 8 is characterized in that, described step (2) comprising:
Read the authorization message in the described information-storing device, decipher this authorization message, obtain License Info, judge whether this License Info is legal;
If described License Info is legal, then calculate the CRC check sign indicating number of described authorization message, judge whether this CRC check sign indicating number is 0;
If described CRC check sign indicating number is 0, then calculates first scrambler and second scrambler of described authorization message successively and judge whether it is legal;
If described first scrambler and second scrambler are all legal, then upgrade its information-storing device according to the new License Info that is generated, and generate new authentication code, this new authentication code is kept in the described information-storing device to upgrade the data binding between described central processing unit and the described data-carrier store.
10, the permission guard method of single-chip programmer according to claim 9 is characterized in that, described step (3) comprising:
Read the authorization message in the described data-carrier store,, judge whether it is legal through the CRC computing;
From described authorization message, obtain register information and judge whether it is legal;
Authorization code in the decrypt authorized information enters programming process, and generates new authorization message according to new authentication code and new License Info, deposits in described information-storing device and described data-carrier store for the use that powers on next time.
CN2009101473092A 2009-06-09 2009-06-09 Allowed method for guarding singlechip programmer Expired - Fee Related CN101576948B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101473092A CN101576948B (en) 2009-06-09 2009-06-09 Allowed method for guarding singlechip programmer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101473092A CN101576948B (en) 2009-06-09 2009-06-09 Allowed method for guarding singlechip programmer

Publications (2)

Publication Number Publication Date
CN101576948A true CN101576948A (en) 2009-11-11
CN101576948B CN101576948B (en) 2011-12-21

Family

ID=41271882

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101473092A Expired - Fee Related CN101576948B (en) 2009-06-09 2009-06-09 Allowed method for guarding singlechip programmer

Country Status (1)

Country Link
CN (1) CN101576948B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156828A (en) * 2011-01-25 2011-08-17 北京握奇数据系统有限公司 Check method in process of data access of smart card and smart card
CN102291613A (en) * 2011-08-31 2011-12-21 广州杰赛科技股份有限公司 Authorizing method and device of set top box
CN102636244A (en) * 2012-03-30 2012-08-15 福州科迪电子技术有限公司 Weighing method of electronic scale
CN103645882A (en) * 2013-12-09 2014-03-19 中颖电子股份有限公司 Batch out-of-order random number generation method based on single-chip microcomputer
CN108154039A (en) * 2017-12-22 2018-06-12 中国电子科技集团公司第四十七研究所 Microcontroller internal storage encryption method
CN109240179A (en) * 2018-11-12 2019-01-18 魏松涛 Distributed sand table model control system
CN110321672A (en) * 2019-06-28 2019-10-11 兆讯恒达微电子技术(北京)有限公司 A method of generating data field scrambling code

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100982513B1 (en) * 2003-11-12 2010-09-16 삼성전자주식회사 Method and Apparatus for restricting storage medium use using user key
CN100586065C (en) * 2006-04-24 2010-01-27 北京易恒信认证科技有限公司 CPK credibility authorization system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156828A (en) * 2011-01-25 2011-08-17 北京握奇数据系统有限公司 Check method in process of data access of smart card and smart card
CN102291613A (en) * 2011-08-31 2011-12-21 广州杰赛科技股份有限公司 Authorizing method and device of set top box
CN102291613B (en) * 2011-08-31 2013-07-31 广州杰赛科技股份有限公司 Authorizing method and device of set top box
CN102636244A (en) * 2012-03-30 2012-08-15 福州科迪电子技术有限公司 Weighing method of electronic scale
CN103645882A (en) * 2013-12-09 2014-03-19 中颖电子股份有限公司 Batch out-of-order random number generation method based on single-chip microcomputer
CN108154039A (en) * 2017-12-22 2018-06-12 中国电子科技集团公司第四十七研究所 Microcontroller internal storage encryption method
CN109240179A (en) * 2018-11-12 2019-01-18 魏松涛 Distributed sand table model control system
CN110321672A (en) * 2019-06-28 2019-10-11 兆讯恒达微电子技术(北京)有限公司 A method of generating data field scrambling code
CN110321672B (en) * 2019-06-28 2021-04-09 兆讯恒达科技股份有限公司 Method for generating data area scrambling code

Also Published As

Publication number Publication date
CN101576948B (en) 2011-12-21

Similar Documents

Publication Publication Date Title
CN101576948B (en) Allowed method for guarding singlechip programmer
EP2965254B1 (en) Systems and methods for maintaining integrity and secrecy in untrusted computing platforms
US8844049B2 (en) Method for generating a cryptographic key for a protected digital data object on the basis of current components of a computer
US20180204004A1 (en) Authentication method and apparatus for reinforced software
CN110688660B (en) Method and device for safely starting terminal and storage medium
CN107466455B (en) POS machine security verification method and device
CN104463026B (en) A kind of system and method for the anti-flight of hardware
CN102262599A (en) Trusted root-based portable hard disk fingerprint identification method
CN111177693B (en) Method, device, equipment and medium for verifying terminal root certificate
CN108229144B (en) Verification method of application program, terminal equipment and storage medium
CN105893837B (en) Application program installation method, security encryption chip and terminal
CN111382397B (en) Configuration method of upgrade software package, software upgrade method, equipment and storage device
CN111162911B (en) PLC firmware upgrading system and method
CN104331646A (en) Embedded system encryption method
CN109446757B (en) Method for protecting general MCU program
CN105279441A (en) Methods and architecture for encrypting and decrypting data
CN111160879A (en) Hardware wallet and security improving method and device thereof
CN105678162A (en) TPM-based control method for safe startup of operating system
CN111814132A (en) Security authentication method and device, security authentication chip and storage medium
CN107784226A (en) The method and system that code is maliciously tampered are prevented using rivest, shamir, adelman
CN109508529B (en) Method for realizing safety starting verification of payment terminal
CN107133499B (en) Software copyright protection method, client, server and system
CN101119255A (en) Dotnet LAN software encrypting service terminal activation method
CN103455358A (en) Upgrading method of electric energy meter program
CN112861137A (en) Secure firmware

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20111221

Termination date: 20200609