Summary of the invention
Therefore, one of the present invention purpose be to provide a kind of must additional circuit and low cost, the data encryption method of convenient management.
One embodiment of the invention have disclosed a kind of data encryption method, and it uses on an electronic installation.This data encryption method comprises: (a) produce one first password and one second password; (b) give this electronic installation one electronic installation sequence number; (c) produce one first gold medal key according to this first password and this electronic installation sequence number; (d) produce one second gold medal key according to this second password and this electronic installation sequence number, and use this second gold medal key to encrypt at least one part data of this electronic installation to produce enciphered data; And (e) when this electronic installation running, use this first password to decipher this first gold medal key to produce a restoring data, when the electronic installation sequence number information that comprises in this restoring data during, decipher this enciphered data according to this second gold medal key corresponding to this electronic installation existing sequence.
Another embodiment of the present invention has disclosed a kind of electronic installation with data confidentiality mechanism, comprises: a processor; And a storage device, store one first password, one second password and an electronic installation sequence number; Wherein one first gold medal key is produced according to this first password and this electronic installation sequence number, and one second gold medal key produces according to this second password and this electronic installation sequence number, and data based this second gold medal key of at least one part of this electronic installation is encrypted and produce enciphered data; When this electronic installation running, this processor uses this first password to decipher this first gold medal key to produce a restoring data, and when this restoring data corresponded to this first password, this processor was deciphered this enciphered data according to this second gold medal key.
See through previous embodiment, can under the situation that does not increase additional circuit, carry out strong data confidentiality.And owing to not being about to the IC classification earlier, only when shipment, the data input is got final product, therefore can save in the IC manufacturing and managerial cost.
Embodiment
In the middle of instructions and follow-up claim, used some vocabulary to censure specific element.The person with usual knowledge in their respective areas should understand, and same element may be called with different nouns by hardware manufacturer.This instructions and follow-up claim are not used as distinguishing the mode of element with the difference of title, but the criterion that is used as distinguishing with the difference of element on function.Be an open term mentioned " comprising " in the middle of instructions and the follow-up request item in the whole text, so should be construed to " comprise but be not limited to ".In addition, " coupling " speech is to comprise any indirect means that are electrically connected that directly reach at this.Therefore, be coupled to one second device, then represent this first device can directly be electrically connected in this second device, or be electrically connected to this second device indirectly through other devices or connection means if describe one first device in the literary composition.
Please refer to Fig. 1 and Fig. 3, it has illustrated the data encryption method according to preferred embodiment of the present invention.Wherein Fig. 1 has illustrated the step before IC (Integration Circuit) starts, and Fig. 3 has illustrated the verification step after IC starts.It is noted that these steps in order to for example, are not in order to limit the present invention only.
Please consult Fig. 1 and Fig. 2 jointly and more understand technical spirit of the present invention.In one embodiment, thestep 101 of the following stated can be undertaken by manufacturer (for example, chip design company) tostep 107, just when making IC,step 101 put into IC to the software ofstep 107 and element in the middle of.A startup storer 205 is placed by manufacturer duringstep 101 in IC 200.Manufacturer puts into IC 200 (at the embodiment of Fig. 2, being to be positioned in the storage device 207) with one first password S_KEY_1 and one second password S_KEY_2 during step 103.Step 105, manufacturer puts into an enciphering/deciphering program (also being placed in the storage device 207 in this embodiment) in IC.Perhaps, enciphering/deciphering element 209 that can be shown in Figure 2 replaces.Instep 107, manufacturer puts into an IC device sequence number (at the embodiment of Fig. 2, being to be positioned in the storage device 207) in IC.
And client is returned to manufacturer's execution instep 111 with IC device sequence number and produces the first gold medal key C_KEY_1 and the second gold medal key C_KEY_2 after receiving IC and obtaining IC device sequence number (step 109).Client can be given with the first gold medal key C_KEY_1 and the second gold medal key C_KEY_2 by manufacturer.And client is being received just execution instep 113 of the first gold medal key C_KEY_1 and the second gold medal key C_KEY_2, and the second gold medal key C_KEY_2 that maintains secrecy.
In addition, the first gold medal key C_KEY_1 in thestep 111 and the second gold medal key C_KEY_2 also can produce with reference to other parameters except producing according to IC device sequence number, please refer to formula () and (two))
C_KEY_1=AES_128_Encrypt(S_KEY_1,Serial_ID|Mask_Bits|RN|Customer_ID)
Formula (one)
C_KEY_2=AES_128_Decrypt(S_KEY_2,Serial_ID|Mask_Bits|RN|Customer_ID)
Formula (two)
Formula (one) and (two) the expression first gold medal key C_KEY_1 and the second gold medal key C_KEY_2 can by IC device sequence number Serial_ID, quantity parameter Mask Bits, at random mess code RN and customer number Customer_ID wherein one or more forms.Wherein how many IC quantity parameter Mask Bits representative has use the same group first gold medal key C_KEY_1 and the second gold medal key C_KEY_2, and customer number Customer_ID then is a numbering (predetermined number just) that gives different clients.Formula () and (two) though in used all parameters, do not represent that scope of the present invention is defined in to use all parameters.
It is noted that, for example illustrate with the first password S_KEY_1 and the second password S_KEY_2 difference in this embodiment, but in fact the first password S_KEY_1 and the second password S_KEY_2 can be identical passwords.
Fig. 2 has illustrated the calcspar that uses the IC 200 of aforementioned data time slot scrambling, and it understands structure and the manner of execution of the IC that uses the aforementioned data time slot scrambling in more detail.As shown in Figure 2, IC 200 has comprised a processor 201, a memory cache 203, starts storer 205, a storage device 207 and an enciphering/deciphering element 209.Processor 201 produces the second gold medal key C_KEY_2 in order to the action of control IC 200 and in order to control enciphering/deciphering element 209 according to the second password S_KEY_2, memory cache 203 in order to store the first gold medal key C_KEY_1, by the second gold medal key C_KEY_2 ciphered data and other unencrypted data, storage device 207 is in order to store the first password S_KEY_1, the second password S_KEY_2 and an electronic installation sequence number Serial_ID.Enciphering/deciphering element 209 is in order to carry out the action of encrypting, and enciphering/deciphering element 209 herein can be carried out with the hardware mode, and also the available software mode is carried out.Note that memory cache 203 and storage device 207 are not limited to two storage devices independently, also can be same storage device.
As previously mentioned, after client obtains IC 200, can obtain the first password S_KEY_1, the second password S_KEY_2 and send manufacturer to by self-storing mechanism 207 in one embodiment.Manufacturer can utilize the first password S_KEY_1, the second password S_KEY_2 produce the first gold medal key C_KEY_1, by the second gold medal key C_KEY_2 and give client.Yet the first gold medal key C_KEY_1 can be stored in memory cache 203, and uses the second gold medal key C_KEY_2 to encrypt data in thememory cache 403.
After IC 200 starts, start storer 205 and can go to confirm whether the first gold medal key C_KEY_1 in the memory cache 203 is correct, if correctly then processor 201 just can utilize the second password S_KEY_2 to produce the second gold medal key C_KEY_2, and utilizes the second gold medal key C_KEY_2 to come the enciphered data in the memory cache 203 is decrypted.The step that IC starts can be shown in the process flow diagram of Fig. 3.
Fig. 3 has illustrated the verification step after the IC startup.Fig. 3 has comprised the following step:
Step 301
IC 200 starts.
Step 303
Use the enciphering/deciphering program and the first password S_KEY_1 of IC 200 inside to decipher the first gold medal key C_KEY_1.Various parameters that solve such as IC device sequence number Serial_ID and quantity parameter Mask Bits will be in order to compare the relevant bits of IC device sequence number.If contrast is correct, then the expression checking is passed through, and just can carry outstep 305, then can not arrivestep 304 IC 200 lockings if having.
Step 304
Locking IC 200.
Step 305
The second password S_KEY_2 that use is left among the IC 200 produces the second gold medal key C_KEY_2 (that is producing a recasting second gold medal key C_KEY_2).
Step 307
Use the second gold medal key C_KEY_2 that the enciphered data in the memory cache is decrypted.
Step 309
Carry out the procedure code of having deciphered.If the second gold medal key C_KEY_2 is correct, then procedure code can correctly be deciphered, thus can arrive step 311-IC normal operation, otherwise can arrive the mistake that step 313-generation can not be expected.
Step 311
IC 200 normal operations.
Step 313
The mistake that generation can not be expected.
Except aforesaid IC 200, aforesaid data guard method more can use on other device, and therefore aforesaid data guard method can be simplified to the process flow diagram among Fig. 4.Fig. 4 has comprised following step:
Step 401
Produce one first password S_KEY_1 and one second password S_KEY_2.
Step 403
Give electronic installation one electronic installation sequence number Serial_ID.
Step 405
Produce one first gold medal key C_KEY_1 according to the first password S_KEY_1 and electronic installation sequence number Serial_ID.
Step 407
Produce one second gold medal key C_KEY_2 according to the second password S_KEY_2 and electronic installation sequence number Serial_ID.
Step 409
When electronic installation operates, use the first password S_KEY_1 to decipher the first gold medal key C_KEY_1 to produce a restoring data, when restoring data corresponds to first password when coincideing (that is the parameter that solves), come decrypt encrypted data according to this second gold medal key with the parameter in first password.
Other detailed step can be pushed away easily by the step among earlier figures 1 and Fig. 3, does not repeat them here.
See through previous embodiment, can under the situation that does not increase additional circuit, carry out strong data confidentiality.And owing to not being about to the IC classification earlier, only when shipment, the data input is got final product, therefore can save in the IC manufacturing and managerial cost.
The above only is preferred embodiment of the present invention, and all equalizations of being done according to claim scope of the present invention change and modify, and all should belong to covering scope of the present invention.