CN101609492A - The encipher-decipher method of embedded device and system - Google Patents

The encipher-decipher method of embedded device and system Download PDF

Info

Publication number
CN101609492A
CN101609492A CNA2009101514815A CN200910151481A CN101609492A CN 101609492 A CN101609492 A CN 101609492A CN A2009101514815 A CNA2009101514815 A CN A2009101514815A CN 200910151481 A CN200910151481 A CN 200910151481A CN 101609492 A CN101609492 A CN 101609492A
Authority
CN
China
Prior art keywords
bad
storage medium
block message
bad block
piece
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
CNA2009101514815A
Other languages
Chinese (zh)
Other versions
CN101609492B (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.)
BEIJING SUNPLUS-EHUE TECHNOLOGY CO., LTD.
Sunplus Technology Co Ltd
Original Assignee
BEIJING BEIYANG ELECTRONIC TECHNOLOGY Co Ltd
Sunplus Technology 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 BEIJING BEIYANG ELECTRONIC TECHNOLOGY Co Ltd, Sunplus Technology Co Ltd filed Critical BEIJING BEIYANG ELECTRONIC TECHNOLOGY Co Ltd
Priority to CN2009101514815A priority Critical patent/CN101609492B/en
Publication of CN101609492A publication Critical patent/CN101609492A/en
Application granted granted Critical
Publication of CN101609492B publication Critical patent/CN101609492B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a kind of encipher-decipher method and system of embedded device.Said method comprising the steps of: during encryption, the bad piece in the statistics embedded device in the storage medium generates bad block message, and described bad block message is saved in assigned address; During deciphering, obtain bad block message from described assigned address, whether the actual bad piece on the checking storage medium mates described bad block message; If coupling, successful decryption then, otherwise, the deciphering failure.Use the present invention can be distinctive by storage medium itself, and the information of transreplication is not encrypted, to improve the protection dynamics of embedded device.

Description

The encipher-decipher method of embedded device and system
Technical field
The present invention relates to the data encrypting and deciphering technology, be specifically related to the encryption method and the system of embedded device.
Background technology
Embedded device is realized its function by the operation embedded software.The infringer can realize duplicating of embedded device by duplicating embedded software, in case the embedded device volume production of duplicating will be brought serious economy loss to its original development person.
At present, by embedded device is encrypted, can prevent duplicating to embedded device.
Existing embedded device encryption method mainly is to increase encryption chip to be achieved in embedded device.Concrete grammar is: at first password (key) is burnt in the encryption chip, revises embedded software then, thereby increase described password (key) and comparison process in embedded software; After embedded software started, this embedded software read password and compares with self password from encryption chip, have only comparison consistent, determines that just successful decryption, this moment continue to move embedded software; If deciphering is failed then do not allowed to move embedded software, embedded device can't be worked.This encryption and decryption mode need increase encryption chip in embedded device, thereby increased hardware cost, and the more important thing is, the password ratio that is burnt in the encryption chip is easier to duplicate, once the infringer has duplicated password and embedded software then can be realized duplicating of embedded device at an easy rate.As seen, existing embedded device encipherment scheme can not provide strong protection dynamics to embedded device.
Summary of the invention
In view of this, the invention provides a kind of encipher-decipher method of embedded device, can be distinctive by storage medium in the embedded device itself, and the information of transreplication is not carried out encryption and decryption, to improve the protection dynamics of embedded device.
This method comprises:
When A, encryption, the bad piece in the statistics embedded device in the storage medium generates bad block message; Described bad block message is saved in assigned address;
When B, deciphering, obtain bad block message from described assigned address, whether the actual bad piece on the checking storage medium mates described bad block message; If coupling, successful decryption then, otherwise, the deciphering failure.
Wherein, described bad block message comprises:
The positional information of all bad pieces in the described storage medium,
And/or, the quantity information of all bad pieces in the described storage medium,
And/or at least one comprises the bad piece positional information in the selected address space of bad piece in the described storage medium,
And/or at least one comprises the bad number of blocks information in the selected address space of bad piece in the described storage medium,
And/or at least one comprises the spatial positional information of the selected address space of bad piece in the described storage medium.
Wherein, the bad piece in the described statistics embedded device in the storage medium generates bad block message and is: read the address of all bad pieces in the storage medium, generate the bad block message that comprises each defect block addresses;
Then, whether the actual bad piece on the described checking storage medium mates described bad block message is: whether the block of judging each defect block addresses indication in the bad block message is actual bad piece, if, then be judged to be coupling, do not match otherwise be judged to be.
Perhaps, bad piece in the described statistics embedded device in the storage medium, generating bad block message is: selected n address space that comprises bad piece, n is a positive integer, add up bad piece number at each selected address space, be designated as the statistics number, generate position that comprises each address space and the bad block message of adding up number;
Then, whether actual bad piece mates described bad block message and be on the described checking storage medium: the quantity that judges whether actual bad piece in all selected address spaces is all greater than the statistics number of self correspondence; If, then be judged to be coupling, otherwise, be judged to be and do not match.
Perhaps, the bad piece in the described statistics embedded device in the storage medium generates bad block message and is: selected n address space that comprises bad piece generates the bad block message that comprises the address space position;
Then, whether actual bad piece mates described bad block message and is on the described checking storage medium: judge whether all to have bad piece in all selected address spaces; If, then be judged to be coupling, do not match otherwise be judged to be.
Wherein, describedly described bad block message be saved in assigned address be:
Described bad block message is saved in the assigned address of embedded software;
Perhaps, described bad block message is downloaded to the assigned address of described storage medium;
Perhaps, described bad block message is downloaded to the assigned address of described embedded device.
Preferably, this method further comprises: bad block message is saved in before the assigned address, bad block message is encrypted;
Carry out before the described verification operation, the bad block message that obtains from assigned address is decrypted.
Wherein, during deciphering, the information of the actual bad piece on the described storage medium is to obtain by the bad block identification that reads in the storage medium; Perhaps, storage medium is carried out the test of bad piece, will write the inconsistent block of data and reading of data and be defined as actual bad piece by the mode that reads and writes data.
Preferably, when the storage medium of embedded device is downloaded embedded software, carry out described steps A;
When embedded device starts embedded software in the storage medium, carry out described step B, if successful decryption then continues to start flow process, if the startup flow process is then withdrawed from the deciphering failure.
Preferably, this method is applicable to the generative process of embedded device;
Described steps A comprises: in the production run of embedded device, read the bad block message of storage medium in the embedded device by JTAG hardware; The bad block message that reads is write the assigned address of embedded software, in embedded software, increase the proof procedure code, amended embedded software is downloaded in the described storage medium by JTAG hardware;
Described step B comprises: when embedded device starts in the storage medium embedded software, carry out proof procedure by moving described proof procedure code, in this proof procedure, read the bad block message on the assigned address described in the embedded software, whether the actual bad piece on the checking storage medium mates described bad block message; If coupling then continues to start flow process, otherwise, the startup flow process withdrawed from.
The present invention also provides a kind of encrypting and deciphering system of embedded device, can be distinctive by storage medium in the embedded device itself, and the information of transreplication is not encrypted, to improve the protection dynamics of embedded device.
This encrypting and deciphering system comprises ciphering unit and decryption unit;
Described ciphering unit is used for when encrypting, and the bad piece in the statistics embedded device in the storage medium generates bad block message; Described bad block message is saved in assigned address;
Described decryption unit is used for obtaining bad block message from described assigned address when deciphering, and whether the actual bad piece on the checking storage medium mates described bad block message; If coupling, successful decryption then, otherwise, the deciphering failure.
Wherein, the bad block message that described ciphering unit generates comprises: the positional information of all bad pieces in the described storage medium, and/or the quantity information of all bad pieces in the described storage medium, and/or at least one comprises the bad piece positional information in the selected address space of bad piece in the described storage medium, and/or at least one comprises the bad number of blocks information in the selected address space of bad piece in the described storage medium, and/or at least one comprises the spatial positional information of the selected address space of bad piece in the described storage medium.
Wherein, when described ciphering unit is saved in assigned address with described bad block message, described bad block message is saved in the assigned address of embedded software; Perhaps, described bad block message is downloaded to the assigned address of described storage medium; Perhaps, described bad block message is downloaded to the assigned address of described embedded device.
Wherein, described decryption unit is perhaps carried out the test of bad piece by the mode that reads and writes data to storage medium by reading the information that bad block identification in the storage medium obtains actual bad piece, will write the inconsistent block of data and reading of data and be defined as actual bad piece.
Preferably, described ciphering unit is arranged in the embedded software burning device, when this embedded software burning device when the storage medium of embedded device is downloaded embedded software, ciphering unit is carried out himself operation;
Described decryption unit is arranged in the embedded device, and when the embedded software in this embedded device startup storage medium, decryption unit is carried out himself operation, if successful decryption then continues to start flow process, if decipher failure, then withdraws from the startup flow process.
Preferably, described ciphering unit is arranged in the embedded software burning device;
In the production run of embedded device, when the storage medium of described embedded software burning device in embedded device downloaded embedded software, described ciphering unit organized JTAG hardware to read the bad block message of described storage medium by the joint test behavior; The bad block message that reads is write the assigned address of embedded software, in embedded software, increase the proof procedure code, amended embedded software is downloaded in the described storage medium by JTAG hardware;
Described decryption unit is arranged in the embedded device, when described embedded device starts in its storage medium embedded software, described decryption unit by the proof procedure code of operation in the described embedded software to carry out proof procedure, in this proof procedure, read the bad block message on the assigned address described in the described embedded software, whether the actual bad piece on the checking storage medium mates described bad block message; If coupling then continues to start flow process, otherwise, the startup flow process withdrawed from.
According to above technical scheme as seen, the present invention adopts that the bad block message in the storage medium during deciphering, has only the actual bad piece situation in the storage medium to mate bad block message as enciphered message in the embedded device, just successful decryption.Because the bad block message of each sheet storage medium is all inequality, and has randomness, and the capacity of storage medium is very big, therefore the repetition rate of bad block message is very low.
If the infringer wants to duplicate bad block message, a kind of mode is to destroy by the good piece of physics mode with ad-hoc location, but this copy mode one is that difficulty is big, the 2nd, the stability of the badly damaged embedded device of meeting, therefore adopt the possibility of the copying encrypted information of physical damage mode very low, make the embedded device that adopts encryption method of the present invention to obtain also just be difficult to be replicated, and then be difficult to carry out volume production, thereby prevent from effectively to duplicate, improved the protection dynamics of embedded device.
Description of drawings
Fig. 1 is the exemplary process diagram of the encipher-decipher method of embedded device of the present invention.
Fig. 2 is the process flow diagram of the encipher-decipher method of embedded device in the embodiment of the invention.
Fig. 3 is the application synoptic diagram of the encrypting and deciphering system of embedded device in the embodiment of the invention.
Embodiment
Below in conjunction with the accompanying drawing embodiment that develops simultaneously, describe the present invention.
The present invention is a kind of encryption and decryption scheme of embedded device, and its basic thought is: the bad block message in the employing embedded device in the storage medium is as enciphered message.During deciphering, whether the actual bad piece situation in the checking embedded device on the storage medium mates the bad block message as enciphered message, only under the situation of coupling, just determines successful decryption, can continue to move embedded software.
Bad block message is the distinctive information of storage medium, because there is randomness in the bad piece of each sheet storage medium, therefore the bad piece position and the quantity of different storage mediums are all inequality, and the memory capacity of storage medium is very big, makes that the repetition probability of bad block message is very low.
Storage medium in use, bad piece only can increase gradually, therefore existing bad piece can not improve, and adopts bad block message can realize encryption and decryption to embedded device simply, effectively as enciphered message.
And bad block message is difficult to duplicate.If the infringer wants to duplicate bad block message, a kind of mode is to destroy by the good piece of physics mode with ad-hoc location, but this copy mode one is that difficulty is big, the 2nd, the stability of the badly damaged embedded device of meeting, therefore adopt the possibility of the copying encrypted information of physical damage mode very low, make the embedded device that adopts encryption method of the present invention to obtain also just be difficult to be replicated, and then be difficult to carry out volume production, thereby prevent from effectively to duplicate, improved the protection dynamics of embedded device.If artificially bad piece is used as good piece, also can cause the stability of whole embedded device to be protected.
Fig. 1 shows the exemplary process diagram based on the encipher-decipher method of the embedded device of above basic thought, and as shown in Figure 1, this method may further comprise the steps:
Step 101: during encryption, the bad piece in the statistics embedded device in the storage medium generates bad block message.
Step 102: the bad block message that will generate is saved in assigned address.
Step 103: during deciphering, obtain bad block message from assigned address, whether the actual bad piece in the checking embedded device on the storage medium mates described bad block message; If coupling, successful decryption then, otherwise, the deciphering failure.
Here, positional information and/or the quantity information that bad block message can bad piece.Bad block message can comprise in embodiments of the present invention:
1) positional information of all bad pieces in the storage medium;
2) quantity information of all bad pieces in the storage medium;
3) at least one comprises the bad piece positional information in the selected address space of bad piece in the storage medium;
4) at least one comprises the bad number of blocks information in the selected address space of bad piece in the storage medium;
5) at least one comprises the spatial positional information of the selected address space of bad piece in the storage medium.
When checking, can adopt a kind of or combination in any in the above-mentioned bad block message.Authorization information is many more, and the encryption reliability is high more.
When bad block message is 1) in the storage medium during positional information of all bad pieces, described step 101 is specially: read the address of all bad pieces in the storage medium, generate the bad block message that comprises each defect block addresses; The matching operation of described step 103 is specially: whether the block of judging in the bad block message each defect block addresses indication is actual bad piece, if, then be judged to be coupling, otherwise, not bad piece as long as the block of a defect block addresses indication is arranged, then be judged to be and do not match.
When bad block message is 2) in the storage medium during quantity information of all bad pieces, described step 101 is specially: obtain the quantity X of all bad pieces in the storage medium, generate the bad block message of the quantity that comprises all bad pieces; The matching operation of described step 103 is specially: whether the quantity of judging actual bad piece in the storage medium more than or equal to X, if, then be judged to be coupling, otherwise, be judged to be and do not match.
When bad block message is 3) when at least one comprises bad piece positional information in the selected address space of bad piece in the storage medium, described step 101 is specifically as follows: selected n address space that comprises bad piece, n is a positive integer, read the address of bad piece in each selected address space, generation comprises the position of each address space and the bad block message of defect block addresses; The matching operation of described step 103 is specially: at each selected address space i, whether the block of judging each defect block addresses indication of this address space i correspondence in the described bad block message is actual bad piece, if, then determine this address space i Satisfying Matching Conditions, have only all address space Satisfying Matching Conditions just to be judged to be coupling, otherwise, be judged to be and do not match.
When bad block message is 4) when at least one comprises bad number of blocks information in the selected address space of bad piece in the storage medium, described step 101 is specially: selected n address space that comprises bad piece, n is a positive integer, add up bad piece number at each selected address space, be designated as the statistics number, generate position that comprises each address space and the bad block message of adding up number; The matching operation of described step 103 is specially: the quantity that judges whether actual bad piece in all selected address spaces is all greater than the statistics number of self correspondence; If, then be judged to be coupling, otherwise, be judged to be and do not match.Specifically, at each selected address space i, judge the statistics number of the quantity of actual bad piece among this address space i greater than this address space i correspondence of bad block message record, if then determine this address space i Satisfying Matching Conditions, have only all selected address spaces all Satisfying Matching Conditions just be judged to be coupling, otherwise, be judged to be and do not match.
When bad block message is 5) when at least one comprised the spatial positional information of selected address space of bad piece in the storage medium, described step 101 is specially: selected n address space that comprises bad piece generated the bad block message that comprises the address space position; The matching operation of described step 103 is specially: judge whether all to have bad piece in all selected address spaces; If, then be judged to be coupling, do not match otherwise be judged to be.
The embodiment of the invention can be applied to the production run of embedded device preferably, that is to say, when the storage medium in embedded device is downloaded embedded software, carries out above-mentioned steps 101 and 102; When the embedded software in the embedded device startup storage medium, carry out above-mentioned steps 103, if successful decryption then continues to start flow process,, then withdraw from the startup flow process if deciphering is failed.
Except top application, in another embodiment, can also carry out above-mentioned steps 101 and 102 to the equipment that embedded software has been housed, when embedded device starts embedded software, carry out above-mentioned steps 103.
Be that the positional information of all bad pieces in the storage medium is an example with bad block message below, the embodiment that this encryption and decryption scheme is used with the production run of embedded device is described in detail.In the present embodiment, storage medium adopts flash memory (Flash) chip.
Fig. 2 is the process flow diagram of the encipher-decipher method of embedded device in the embodiment of the invention.This method may further comprise the steps 201 to step 205, and wherein, step 201 to step 203 is the process to storage medium burning embedded software, and step 204 is to 205 being the process that the embedded software on the storage medium starts.As shown in Figure 2, each step is specific as follows:
Step 201: read the bad block message of Flash chip by JTAG (Joint Test Action Group, joint test behavior tissue) hardware, present embodiment is the address of all bad pieces in the flash chip.
Wherein, the Flash chip carries out bad piece by manufacturer and detects when dispatching from the factory, and for bad piece, in the position of this bad piece correspondence bad block identification is set, and whether be used to identify block is bad piece.The correspondence position that bad block identification is set can be the free area of first interior page of bad piece or second page or leaf the inside.Therefore, this step can be obtained bad block message by reading bad block identification.By reading the positional information that bad block identification not only can obtain bad piece, can also obtain the quantity information of bad piece.
Step 202: the bad block message that will read writes the assigned address of embedded software, increases the proof procedure code in embedded software.
In practice, embedded software adopts the file of .bin form usually, image.bin for example, and this paper is called the BIN file with the embedded software of .bin form.
Present embodiment is that the assigned address at the BIN file writes bad block message, for example can stay data space at the beginning and end place of BIN file, uses for preserving bad block message.In practice, the bad block message that reads can also be downloaded to the assigned address of Flash chip, perhaps the bad block message that will read downloads to the assigned address of embedded device, for example downloads in the encryption chip that is arranged on embedded device.
Before the bad block message that will read writes assigned address, can also adopt the cryptographic algorithm of making an appointment that bad block message is encrypted, thereby improve the privacy degrees of bad block message, and then strengthen the non-reproduction of embedded device.
Step 203: amended BIN file is downloaded in the Flash chip by JTAG hardware, finish the burning process.
In other embodiments, if embedded software has downloaded in the embedded device, then directly bad block message is downloaded to the assigned address of embedded software in the embedded device, or download to the assigned address except that the embedded software memory location in the Flash chip, or download to the assigned address except that the Flash chip in the embedded device.
Step 204: when embedded device started in the storage medium BIN file, the proof procedure code in the operation BIN file was to carry out proof procedure.In proof procedure, read the bad block message on the BIN file assigned address.If the bad block message that reads is encrypted, then adopt the decipherment algorithm of agreement that bad block message is decrypted.
Step 205: according to the bad block message that step 204 obtains, verify whether all block positions of bad block message indication are actual bad piece really, if then checking is passed through, and continues operating software, otherwise, authentication failed, out of service.
This step can judge whether this block is bad piece by reading bad block identification when judging that whether certain block is actual bad piece.In practice,, and attempt to be set to bad piece, then may realize duplicating of bad block message by the specific artificially good piece of disk management software if the infringer obtains bad block message by some channel.In order to prevent the generation of this situation, preferably, present embodiment carries out the test of bad piece by the mode that reads and writes data to storage medium, be that same block is carried out the operation that data write and read specifically, if it is consistent with reading of data to write data, determine that then this block for good fast, if inconsistent, then is defined as bad piece.
So far, this flow process finishes.
In order to realize the encipher-decipher method of above-mentioned embedded device, the embodiment of the invention also provides a kind of encrypting and deciphering system.This encrypting and deciphering system comprises ciphering unit and decryption unit.Wherein,
Ciphering unit is used for when encrypting, and the bad piece in the statistics embedded device in the storage medium generates bad block message; Described bad block message is saved in assigned address.
Wherein, the bad block message that this ciphering unit generates comprises: the positional information of all bad pieces in the storage medium, and/or the quantity information of all bad pieces in the storage medium, and/or at least one comprises the bad piece positional information in the selected address space of bad piece in the storage medium, and/or at least one comprises the bad number of blocks information in the selected address space of bad piece in the storage medium, and/or at least one comprises the spatial positional information of the selected address space of bad piece in the storage medium.
When this ciphering unit is saved in assigned address with bad block message, bad block message can be saved in the assigned address of embedded software; Perhaps, bad block message is downloaded to the assigned address of storage medium; Perhaps, bad block message is downloaded to the assigned address of embedded device, for example download in the encryption chip that is arranged in the embedded device.
Decryption unit is used for obtaining bad block message from described assigned address when deciphering, and whether the actual bad piece on the checking storage medium mates described bad block message; If coupling, successful decryption then, otherwise, the deciphering failure.
At different bad block message contents, verification operation is slightly different.Concrete verification operation is described in detail in preceding method embodiment, omits here.
This decryption unit is when obtaining actual bad block message, can be by reading the information that bad block identification in the storage medium obtains actual bad piece, perhaps storage medium is carried out the test of bad piece, will write the inconsistent block of data and reading of data and be defined as actual bad piece by the mode that reads and writes data.
As previously mentioned, this encrypting and deciphering system can be applied to the production run of embedded device preferably.Briefly, in this case, ciphering unit is arranged in the embedded software burning device, when this embedded software burning device when the storage medium of embedded device is downloaded embedded software, ciphering unit is carried out himself operation.
Decryption unit is arranged in the embedded device, and when the embedded software in the embedded device startup storage medium, decryption unit is carried out himself operation, if successful decryption then continues to start flow process, if decipher failure, then withdraws from the startup flow process.
Fig. 3 shows the synoptic diagram that encrypting and deciphering system is applied to the embedded device production run.As shown in Figure 3, the embedded software burning device links to each other with storage medium by JTAG hardware usually.After burning was finished, the annexation of cancellation storage medium and embedded software burning device was connected to storage medium in the embedded device.Single arrow heavy line among Fig. 3 is represented the variation of storage medium link position.
As shown in Figure 3, ciphering unit 31 is arranged in the embedded software burning device.In the production run of embedded device, when the storage medium of embedded software burning device in embedded device downloaded the BIN file, ciphering unit 31 read the bad block message of storage medium by JTAG hardware; The bad block message that reads is write the assigned address of BIN file, in the BIN file, increase the proof procedure code, then amended BIN file is downloaded to storage medium by JTAG hardware.
Decryption unit 32 is arranged in the embedded device.When embedded device starts in its storage medium the BIN file, decryption unit 32 by the proof procedure code in the operation BIN file to carry out proof procedure, in this proof procedure, read the bad block message on the BIN document allocation, whether the actual bad piece on the checking storage medium mates the bad block message that reads; If coupling then continues to start flow process, otherwise, the startup flow process withdrawed from.
In sum, more than be preferred embodiment of the present invention only, be not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (16)

1, a kind of encipher-decipher method of embedded device is characterized in that, this method comprises:
When A, encryption, the bad piece in the statistics embedded device in the storage medium generates bad block message; Described bad block message is saved in assigned address;
When B, deciphering, obtain bad block message from described assigned address, whether the actual bad piece on the checking storage medium mates described bad block message; If coupling, successful decryption then, otherwise, the deciphering failure.
2, the method for claim 1 is characterized in that, described bad block message comprises:
The positional information of all bad pieces in the described storage medium,
And/or, the quantity information of all bad pieces in the described storage medium,
And/or at least one comprises the bad piece positional information in the selected address space of bad piece in the described storage medium,
And/or at least one comprises the bad number of blocks information in the selected address space of bad piece in the described storage medium,
And/or at least one comprises the spatial positional information of the selected address space of bad piece in the described storage medium.
3, the method for claim 1 is characterized in that, the bad piece in the described statistics embedded device in the storage medium generates bad block message and is: read the address of all bad pieces in the storage medium, generate the bad block message that comprises each defect block addresses;
Whether the actual bad piece on the described checking storage medium mates described bad block message: whether the block of judging each defect block addresses indication in the bad block message is actual bad piece, if, then be judged to be coupling, do not match otherwise be judged to be.
4, the method for claim 1, it is characterized in that, bad piece in the described statistics embedded device in the storage medium, generating bad block message is: selected n address space that comprises bad piece, n is a positive integer, add up bad piece number at each selected address space, be designated as the statistics number, generate position that comprises each address space and the bad block message of adding up number;
Whether actual bad piece mates described bad block message and be on the described checking storage medium: the quantity that judges whether actual bad piece in all selected address spaces is all greater than the statistics number of self correspondence; If, then be judged to be coupling, otherwise, be judged to be and do not match.
5, the method for claim 1 is characterized in that, the bad piece in the described statistics embedded device in the storage medium generates bad block message and is: selected n address space that comprises bad piece generates the bad block message that comprises the address space position;
Whether actual bad piece mates described bad block message and is on the described checking storage medium: judge whether all to have bad piece in all selected address spaces; If, then be judged to be coupling, do not match otherwise be judged to be.
6, as any described method of claim 1 to 5, it is characterized in that, describedly described bad block message is saved in assigned address is:
Described bad block message is saved in the assigned address of embedded software;
Perhaps, described bad block message is downloaded to the assigned address of described storage medium;
Perhaps, described bad block message is downloaded to the assigned address of described embedded device.
7, as any described method of claim 1 to 5, it is characterized in that this method further comprises: bad block message is saved in before the assigned address, bad block message is encrypted;
Carry out before the described verification operation, the bad block message that obtains from assigned address is decrypted.
As any described method of claim 1 to 5, it is characterized in that 8, during deciphering, the information of the actual bad piece on the described storage medium is to obtain by the bad block identification that reads in the storage medium; Perhaps, storage medium is carried out the test of bad piece, will write the inconsistent block of data and reading of data and be defined as actual bad piece by the mode that reads and writes data.
9, as any described method of claim 1 to 5, it is characterized in that, when the storage medium of embedded device is downloaded embedded software, carry out described steps A;
When embedded device starts embedded software in the storage medium, carry out described step B, if successful decryption then continues to start flow process, if the startup flow process is then withdrawed from the deciphering failure.
10, method as claimed in claim 1 or 2 is characterized in that, this method is applicable to the generative process of embedded device;
Described steps A comprises: in the production run of embedded device, read the bad block message of storage medium in the embedded device by JTAG hardware; The bad block message that reads is write the assigned address of embedded software, in embedded software, increase the proof procedure code, amended embedded software is downloaded in the described storage medium by JTAG hardware;
Described step B comprises: when embedded device starts in the storage medium embedded software, carry out proof procedure by moving described proof procedure code, in this proof procedure, read the bad block message on the assigned address described in the embedded software, whether the actual bad piece on the checking storage medium mates described bad block message; If coupling then continues to start flow process, otherwise, the startup flow process withdrawed from.
11, a kind of encrypting and deciphering system of embedded device is characterized in that, this encrypting and deciphering system comprises ciphering unit and decryption unit;
Described ciphering unit is used for when encrypting, and the bad piece in the statistics embedded device in the storage medium generates bad block message; Described bad block message is saved in assigned address;
Described decryption unit is used for obtaining bad block message from described assigned address when deciphering, and whether the actual bad piece on the checking storage medium mates described bad block message; If coupling, successful decryption then, otherwise, the deciphering failure.
12, encrypting and deciphering system as claimed in claim 11, it is characterized in that, the bad block message that described ciphering unit generates comprises: the positional information of all bad pieces in the described storage medium, and/or the quantity information of all bad pieces in the described storage medium, and/or at least one comprises the bad piece positional information in the selected address space of bad piece in the described storage medium, and/or at least one comprises the bad number of blocks information in the selected address space of bad piece in the described storage medium, and/or at least one comprises the spatial positional information of the selected address space of bad piece in the described storage medium.
13, encrypting and deciphering system as claimed in claim 11 is characterized in that, when described ciphering unit is saved in assigned address with described bad block message, described bad block message is saved in the assigned address of embedded software; Perhaps, described bad block message is downloaded to the assigned address of described storage medium; Perhaps, described bad block message is downloaded to the assigned address of described embedded device.
14, encrypting and deciphering system as claimed in claim 11, it is characterized in that, described decryption unit is by reading the information that bad block identification in the storage medium obtains actual bad piece, perhaps storage medium is carried out the test of bad piece, will write the inconsistent block of data and reading of data and be defined as actual bad piece by the mode that reads and writes data.
15, as any described encrypting and deciphering system of claim 11 to 14, it is characterized in that, described ciphering unit is arranged in the embedded software burning device, when this embedded software burning device when the storage medium of embedded device is downloaded embedded software, ciphering unit is carried out himself operation;
Described decryption unit is arranged in the embedded device, and when the embedded software in this embedded device startup storage medium, decryption unit is carried out himself operation, if successful decryption then continues to start flow process, if decipher failure, then withdraws from the startup flow process.
As claim 11 or 12 described encrypting and deciphering systems, it is characterized in that 16, described ciphering unit is arranged in the embedded software burning device;
In the production run of embedded device, when the storage medium of described embedded software burning device in embedded device downloaded embedded software, described ciphering unit organized JTAG hardware to read the bad block message of described storage medium by the joint test behavior; The bad block message that reads is write the assigned address of embedded software, in embedded software, increase the proof procedure code, amended embedded software is downloaded in the described storage medium by JTAG hardware;
Described decryption unit is arranged in the embedded device, when described embedded device starts in its storage medium embedded software, described decryption unit by the proof procedure code of operation in the described embedded software to carry out proof procedure, in this proof procedure, read the bad block message on the assigned address described in the described embedded software, whether the actual bad piece on the checking storage medium mates described bad block message; If coupling then continues to start flow process, otherwise, the startup flow process withdrawed from.
CN2009101514815A 2009-07-23 2009-07-23 Method and system for encrypting/decrypting embedded device Expired - Fee Related CN101609492B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101514815A CN101609492B (en) 2009-07-23 2009-07-23 Method and system for encrypting/decrypting embedded device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101514815A CN101609492B (en) 2009-07-23 2009-07-23 Method and system for encrypting/decrypting embedded device

Publications (2)

Publication Number Publication Date
CN101609492A true CN101609492A (en) 2009-12-23
CN101609492B CN101609492B (en) 2012-03-21

Family

ID=41483244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101514815A Expired - Fee Related CN101609492B (en) 2009-07-23 2009-07-23 Method and system for encrypting/decrypting embedded device

Country Status (1)

Country Link
CN (1) CN101609492B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102111753A (en) * 2010-12-07 2011-06-29 深圳市闪电通讯技术有限公司 Mobile phone software encryption method
CN104794052A (en) * 2015-04-01 2015-07-22 努比亚技术有限公司 Encryption display testing method and device
CN106648942A (en) * 2016-09-06 2017-05-10 深圳忆数存储技术有限公司 Data switching method and device based on flash storage medium
CN111007989A (en) * 2019-12-06 2020-04-14 中国空空导弹研究院 Storage and use method of missile-borne FLASH chip bad block information

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080088911A (en) * 2007-03-30 2008-10-06 슬림디스크 주식회사 New data storage card, interface device and method by memory's bad pattern
CN101452731A (en) * 2007-12-07 2009-06-10 合智电子股份有限公司 Memory card capable of preventing recording by theft
CN201266495Y (en) * 2008-09-22 2009-07-01 深圳桑达电子集团有限公司 Mobile memory with encipher function

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102111753A (en) * 2010-12-07 2011-06-29 深圳市闪电通讯技术有限公司 Mobile phone software encryption method
CN104794052A (en) * 2015-04-01 2015-07-22 努比亚技术有限公司 Encryption display testing method and device
CN104794052B (en) * 2015-04-01 2018-01-19 努比亚技术有限公司 The method and device of encryption display test
CN106648942A (en) * 2016-09-06 2017-05-10 深圳忆数存储技术有限公司 Data switching method and device based on flash storage medium
CN111007989A (en) * 2019-12-06 2020-04-14 中国空空导弹研究院 Storage and use method of missile-borne FLASH chip bad block information

Also Published As

Publication number Publication date
CN101609492B (en) 2012-03-21

Similar Documents

Publication Publication Date Title
JP3774260B2 (en) Memory card security system device and memory card thereof
CN101971186B (en) Information leak prevention device, and method and program thereof
CN100449561C (en) Divulging secrets prevention system of USB storage device date based on certificate and transparent encryption technology
JP5839659B2 (en) Semiconductor device
WO2010134192A1 (en) Electronic device, key generation program, recording medium, and key generation method
CN101437067B (en) Mobile terminal and method for implementing network and card locking
US20030188162A1 (en) Locking a hard drive to a host
US11409872B2 (en) Confirming a version of firmware loaded to a processor-based device
CN101388053A (en) Method, system, and apparatus for encrypting, integrity, and anti-replay protecting data
KR20130129431A (en) Authenticator, authenticatee and authentication method
CN101102574A (en) Terminal verification method and device
US20140047240A1 (en) Data recording device, and method of processing data recording device
CN104765987A (en) System and method for embedded device software encryption
CN103326866A (en) Authentication method and system based on equipment MAC address
WO2012144095A1 (en) Authenticator, authenticatee and authentication method
EP2700190A1 (en) Authenticator, authenticatee and authentication method
CN101609492B (en) Method and system for encrypting/decrypting embedded device
CN102196317A (en) Set-top box protection method and set-top box
US9471413B2 (en) Memory device with secure test mode
CN101502038B (en) Method of verifying the integrity of an encryption key obtained by combining key parts
CN111539042B (en) Safe operation method based on trusted storage of core data files
JP2010165206A (en) Memory controller and nonvolatile storage device
CN112069515B (en) Safe EFUSE burning method and system
CN101127013A (en) Enciphered mobile storage apparatus and its data access method
EP2700192B1 (en) Authenticator, authenticatee and authentication method

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
ASS Succession or assignment of patent right

Owner name: BEIJING SUNPLUS EHUE TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: BEIJING BEIYANG ELECTRONIC TECHNOLOGY CO., LTD.

Effective date: 20140306

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20140306

Address after: Science and Industry Park, Taiwan, Hsinchu, China, No. 19

Patentee after: Lingyang Science and Technology Co., Ltd.

Patentee after: BEIJING SUNPLUS-EHUE TECHNOLOGY CO., LTD.

Address before: Science and Industry Park, Taiwan, Hsinchu, China, No. 19

Patentee before: Lingyang Science and Technology Co., Ltd.

Patentee before: Beijing Beiyang Electronic Technology Co., Ltd.

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: 20120321

Termination date: 20170723