Summary of the invention
Encryption method and the device of one of purpose of the present invention for a kind of character library is provided is in order to have promoted the confidentiality of character library.
The present invention proposes a kind of encryption method of character library, and described character library comprises internal code information and lattice information, and the encryption method of described character library comprises step:
Disperse computing to generate secondary key with first key to internal code information;
With described secondary key lattice information is encrypted generation dot array data cipher-text information;
With the combined ciphering generation identifying code of second key to described dot array data cipher-text information or described internal code information and described dot array data cipher-text information.
Preferably, said method also comprises the step of storing described identifying code.
Preferably, above-mentioned second key comprises the described secondary key that disperses computing to generate to internal code information.
Preferably, said method also comprises the step that described identifying code is tested.
Preferably, the above-mentioned step that described identifying code is tested specifically comprises step:
With the combined ciphering computing generation check code of described second key to described dot array data cipher-text information or described internal code information and described dot array data cipher-text information;
More described check code and identifying code;
Described check code is that identical then the continuation carried out subsequent operation with the comparative result of identifying code, otherwise returns mistake.
The present invention proposes a kind of encryption device of character library, and described character library comprises internal code information and lattice information, and the encryption device of described character library comprises:
The secondary key generation module is used for disperseing computing to generate secondary key to internal code information first key;
The lattice information encrypting module is used for described secondary key is encrypted generation dot array data cipher-text information to lattice information;
The identifying code generation module is used for the combined ciphering generation identifying code of second key to described dot array data cipher-text information or described internal code information and described dot array data cipher-text information.
Preferably, said apparatus also comprises the identifying code memory module, is used to store described identifying code.
Preferably, above-mentioned second key comprises the described secondary key that disperses computing to generate to internal code information.
Preferably, said apparatus also comprises the identifying code inspection module, is used for described identifying code is tested.
Preferably, above-mentioned identifying code inspection module specifically comprises:
Check code cryptographic calculation unit is used for the combined ciphering computing generation check code of described second key to described dot array data cipher-text information or described internal code information and described dot array data cipher-text information;
Comparing unit is used for more described check code and identifying code;
The assay processing unit is used for handling subsequent operation according to the comparative result of described check code and identifying code, and described check code is that identical then the continuation carried out subsequent operation with the comparative result of identifying code, otherwise returns mistake.
From the above, the embodiment of the invention disperses computing to generate secondary key by providing with first key to internal code information; With described secondary key lattice information is encrypted generation dot array data cipher-text information; With second key combined ciphering of described dot array data cipher-text information or described internal code information and described dot array data cipher-text information is generated the character library encryption method and the device of identifying code, thereby further promote the confidentiality of character library, reach anti-tamper purpose.
Embodiment
With reference to Fig. 1, the present invention proposes the encryption method of the character library of an embodiment, and described character library comprises internal code information and lattice information, and the encryption method of described character library comprises step:
S11 disperses computing to generate secondary key with first key to internal code information;
S12 encrypts generation dot array data cipher-text information with described secondary key to lattice information;
S13 is with the combined ciphering generation identifying code of second key to described dot array data cipher-text information or described internal code information and described dot array data cipher-text information.
As described in step S11, available first key disperses computing to generate secondary key to each internal code information one by one, and described secondary key can be a kind of MAC sign indicating number (Message Authentication Code, a message authentication code).Above-mentioned first key can be kept in the memory block of device interior, can be the random key that generates in process of production, also can be the key that solidifies in process of production.Above-mentioned internal code information has write down the pairing binary code of character.Above-mentioned dispersion computing realizes by decentralized algorithm.Described decentralized algorithm can be a cryptographic algorithm, can not be cryptographic algorithm also, as the hmac algorithm based on cryptographic Hash algorithm construction message authentication code.Above-mentioned decentralized algorithm can be DeriveKey=AlgDerive (Key; Info), be example with this algorithm, the Key in the above-mentioned algorithm can be first key, Info can be an internal code information, generates secondary key through after the above-mentioned algorithm computing.
As described in step S12, can be one by one corresponding lattice information be with it encrypted and generated the dot array data cipher-text information with described secondary key.Described information recording lattice character in each corresponding point of display device shown color and brightness, the lattice information of each character and internal code information are corresponding one by one.Described dot array data cipher-text information is that lattice information is encrypted a kind of ciphertext that the back generates.All be inequality owing to the pairing secondary key of each internal code information as mentioned above, thereby each internal code information lattice data corresponding cipher-text information is also all inequality, and the dot array data cipher-text information is associated with ISN.Above-mentioned encryption realizes that by cryptographic algorithm described cryptographic algorithm can be a symmetry algorithm, and above-mentioned cryptographic algorithm can be EncData=AlgEnc (Key; Data).Wherein, the Key in the above-mentioned cryptographic algorithm can be second key, and Data can be a lattice information, through generating the dot array data cipher-text information after the above-mentioned algorithm computing.
As described in step S13, available second key is encrypted described dot array data cipher-text information and is generated identifying code, and also available second key generates identifying code to the combined ciphering of described internal code information and described dot array data cipher-text information.Described identifying code also can be a kind of MAC sign indicating number.Described second key can be same key with described first key, also can be different.Described second key can also be the described secondary key that disperses computing to generate to internal code information.With the combined ciphering generation identifying code of second key to described dot array data cipher-text information or described internal code information and described dot array data cipher-text information, encryption herein realizes that by the identifying code generating algorithm described identifying code generating algorithm can generate the raw data of random length the authorization information of regular length; And any bit (Byte) of raw data is modified, and authorization information will be different.The identifying code generating algorithm can be MACData=AlgMAC (Key; Data), wherein the Key in this identifying code generating algorithm can be second key, and Data can be the dot array data cipher-text information, through generating check code after the computing of above-mentioned identifying code generating algorithm; Key in the above-mentioned identifying code generating algorithm can also be second key, and Data can be the combination of described internal code information and described dot array data cipher-text information, through generating check code after the computing of above-mentioned identifying code generating algorithm.
The embodiment of the invention generates secondary key by with first key internal code information being carried out cryptographic calculation, with described secondary key lattice information is encrypted generation dot array data cipher-text information, the combined ciphering of described dot array data cipher-text information or described internal code information and described dot array data cipher-text information is generated the method for identifying code with second key, can prevent the illegal users from replacing character library, thereby effectively promote the confidentiality of character library.
With reference to Fig. 2, one embodiment of the invention is based on the encryption method of the character library of the foregoing description, and than said method, this method further comprises step:
S14 stores described identifying code.
As described in step S14, whether the identifying code that storage generates is used to check the internal code information of character library and lattice information to be distorted in the storer of device interior.
Be that the secondary key that described internal code information was generated is an example with second key below, details are as follows to present embodiment:
Disperse computing to generate secondary key with first key to each internal code information in the character library; Use the secondary key that generated pair to encrypt successively and generate the dot array data cipher-text information with the pairing lattice information of described internal code information; Carry out cryptographic calculation with described secondary key pair and described secondary key lattice data corresponding cipher-text information respectively and generate identifying code; Store described identifying code successively.
Following is that same key is an example with second key and first key then, and details are as follows to present embodiment:
Disperse computing to generate secondary key with first key to each internal code information in the character library; Pair encrypt with secondary key that internal code information generated successively and generate the dot array data cipher-text information with the pairing lattice information of internal code information; With first key cryptographic calculation is carried out in the combination of all described internal code informations and described dot array data cipher-text information and generate identifying code; Store described identifying code.
With reference to Fig. 3, one embodiment of the invention is based on the encryption method of the character library of the foregoing description, and than said method, this method further comprises step:
S15 tests to described identifying code.
With reference to Fig. 4, as one embodiment of the present of invention, step S15 can further comprise step:
S151 carries out cryptographic calculation with second key to the combination of described dot array data cipher-text information or described internal code information and described dot array data cipher-text information and generates check code;
S152, more described check code and identifying code;
S153, described check code is that identical then the continuation carried out subsequent operation with the comparative result of identifying code, otherwise returns mistake.
As described in step S15, with the combined ciphering generation check code of described second key to described dot array data cipher-text information or described internal code information and described dot array data cipher-text information, described check code also can be a kind of MAC sign indicating number.Encryption herein realizes by above-mentioned identifying code generating algorithm.Generate check code after the above-mentioned identifying code generating algorithm of the combination process computing of described second key and described dot array data cipher-text information or described internal code information and described dot array data cipher-text information, more described check code and above-mentioned identifying code, continue to carry out subsequent operation if the result is identical, otherwise return mistake.
The embodiment of the invention is by disperseing computing to generate secondary key with first key to internal code information, with described secondary key lattice information is encrypted generation dot array data cipher-text information, with the combined ciphering generation identifying code of second key to described dot array data cipher-text information or described internal code information and described dot array data cipher-text information; To the character library encryption method that described identifying code is tested, can after the illegal users from replacing character library, remind the user, thereby further promote the confidentiality of character library, reach anti-tamper purpose.
Following is that the secondary key that described internal code information was generated is an example with second key still, and details are as follows to present embodiment:
Disperse computing to generate secondary key with first key to each internal code information in the character library; Use the secondary key that generated pair to encrypt successively and generate the dot array data cipher-text information with the pairing lattice information of internal code information; Carry out cryptographic calculation with described secondary key pair and the pairing data cipher-text information of described secondary key respectively and generate identifying code; Store described identifying code successively.Enable character library, carry out cryptographic calculation with described secondary key pair and the pairing data cipher-text information of described secondary key respectively and generate check code; The identifying code that more described successively check code is corresponding with described check code; Described check code is that identical then the continuation carried out subsequent operation with the comparative result of its corresponding identifying code, otherwise returns mistake.
Following is that same key is an example with second key and first key then, and details are as follows to present embodiment:
Disperse computing to generate secondary key with first key to each internal code information in the character library; Pair encrypt with secondary key that internal code information generated successively and generate the dot array data cipher-text information with the pairing lattice information of internal code information; With first key cryptographic calculation is carried out in the combination of all described internal code informations and all described dot array data cipher-text information and generate identifying code; Store described identifying code.Enable character library, with first key cryptographic calculation is carried out in the combination of all described internal code informations and all described dot array data cipher-text information and generate check code; More described check code and described identifying code; Described check code is that identical then the continuation carried out subsequent operation with the comparative result of described identifying code, otherwise returns mistake.
With reference to Fig. 5, the present invention proposes the encryption device 10 of the character library of another embodiment, and described character library comprises internal code information and lattice information, and described character library encryption device comprises:
Secondary key generation module 11 is used for disperseing computing to generate secondary key to internal code information first key;
Lattice information encrypting module 12 is used for described secondary key is encrypted generation dot array data cipher-text information to lattice information;
Identifying code generation module 13 is used for the combined ciphering generation identifying code of second key to described dot array data cipher-text information or described dot array data cipher-text information and described internal code information.
Described secondary key generation module 11 can be used for disperseing computing to generate secondary key to each internal code information one by one first key, and described secondary key can be a kind of MAC sign indicating number (Message Authentication Code, a message authentication code).Above-mentioned first key can be kept in the memory block of device interior, can be the random key that generates in process of production, also can be the key that solidifies in process of production.Above-mentioned internal code information has write down the pairing binary code of character.Above-mentioned dispersion computing realizes by decentralized algorithm.Described decentralized algorithm can be a cryptographic algorithm, can not be cryptographic algorithm also, as the hmac algorithm based on cryptographic Hash algorithm construction message authentication code.Above-mentioned decentralized algorithm can be DeriveKey=AlgDerive (Key; Info), be example with this algorithm, the Key in the above-mentioned algorithm can be first key, Info can be an internal code information, generates secondary key through after the above-mentioned algorithm computing.
Described lattice information encrypting module 12 can be seriatim encrypted described secondary key and is generated the dot array data cipher-text information to corresponding lattice information with it.Described information recording lattice character in each corresponding point of display device shown color and brightness, the lattice information of each character and internal code information are corresponding one by one.Described dot array data cipher-text information is that lattice information is encrypted a kind of ciphertext that the back generates.All be inequality owing to the pairing secondary key of each internal code information as mentioned above, thereby each internal code information lattice data corresponding cipher-text information is also all inequality, and the dot array data cipher-text information is associated with ISN.Above-mentioned encryption realizes that by cryptographic algorithm described cryptographic algorithm can be a symmetry algorithm.Above-mentioned cryptographic algorithm can be EncData=AlgEnc (Key; Data).With this algorithm is example, and the Key in the above-mentioned algorithm can be second key, and Data can be a lattice information, through generating the dot array data cipher-text information after the above-mentioned algorithm computing.
Described identifying code generation module 13 can be encrypted second key and generate identifying code to described dot array data cipher-text information, also can be with the combined ciphering generation identifying code of second key to described internal code information and described dot array data cipher-text information.Described identifying code also can be a kind of MAC sign indicating number.Described second key can be same key with described first key, also can be different.Described second key can also be the described secondary key that disperses computing to generate to internal code information.With the combined ciphering generation identifying code of second key to described dot array data cipher-text information or described internal code information and described dot array data cipher-text information, encryption herein realizes that by the identifying code generating algorithm described identifying code generating algorithm can generate the raw data of random length the authorization information of regular length; And any bit of raw data is modified, and authorization information will be different.The identifying code generating algorithm can be MACData=AlgMAC (Key; Data), be example with this algorithm, the Key in the above-mentioned identifying code generating algorithm can be second key, Data can be the dot array data cipher-text information, through generating check code after the computing of above-mentioned identifying code generating algorithm; Key in the above-mentioned identifying code generating algorithm can also be second key, and Data can be the combination of described internal code information and described dot array data cipher-text information, through generating check code after the computing of above-mentioned identifying code generating algorithm.
From the above, the embodiment of the invention effectively improves the confidentiality of character library by a kind of encryption device of character library is provided.
With reference to Fig. 6, another embodiment of the present invention, the encryption device 10 based on the foregoing description character library further comprises:
Identifying code memory module 14 is stored described identifying code;
Whether the identifying code that described identifying code memory module 14 storages generate is used to check the internal code information of character library and lattice information to be distorted in the storer of device interior.
With second key is that the secondary key that described internal code information was generated is an example, and details are as follows to present embodiment:
Secondary key generation module 11 is used for that first key is carried out cryptographic calculation to each internal code information of character library and generates secondary key; Lattice information encrypting module 12 is used for successively the secondary key that will be generated and pair encrypts with the pairing lattice information of internal code information and to generate the dot array data cipher-text information; Identifying code generation module 13 carries out cryptographic calculation with described secondary key pair and the pairing data cipher-text information of described secondary key respectively and generates identifying code; Identifying code memory module 14 is stored described identifying code successively.
Following is that same key is an example with second key and first key then, and details are as follows to present embodiment:
Secondary key generation module 11 disperses computing to generate secondary key to each internal code information in the character library first key; Lattice information encrypting module 12 is used the secondary key that generated pair to encrypt with the pairing lattice information of internal code information successively and is generated the dot array data cipher-text information; Identifying code generation module 13 carries out cryptographic calculation generation identifying code with first key to all described internal code informations and dot array data cipher-text information; Identifying code memory module 14 is stored described identifying code.
With reference to Fig. 7, another embodiment of the present invention also comprises identifying code inspection module 15 based on the foregoing description on the basis of the foregoing description, be used for described identifying code is tested.
With reference to Fig. 8, as one embodiment of the present of invention, described identifying code inspection module 15 comprises:
Check code cryptographic calculation unit 151 is used for the combined ciphering generation cryptographic calculation generation check code of described second key to described dot array data cipher-text information or described dot array data cipher-text information and described internal code information;
Comparing unit 152 is used for more described check code and identifying code;
Assay processing unit 153 is used for handling subsequent operation according to the comparative result of described check code and identifying code, and described check code is that identical then the continuation carried out subsequent operation with the comparative result of identifying code, otherwise returns mistake.
Described inspection module 15 is used for the combined ciphering generation check code of described second key to described dot array data cipher-text information or described internal code information and described dot array data cipher-text information, and described check code also can be a kind of MAC sign indicating number.Encryption herein realizes by above-mentioned identifying code generating algorithm.As one embodiment of the present of invention, after generating check code after the above-mentioned identifying code generating algorithm of the combination process computing of check code cryptographic calculation unit 151 with described second key and described dot array data cipher-text information or described internal code information and described dot array data cipher-text information, comparing unit 152 more described check codes and above-mentioned identifying code, continue to carry out subsequent operation if the result is identical assay processing unit 153, otherwise return mistake.
Following is that the secondary key that described internal code information was generated is an example with second key still, and details are as follows to present embodiment:
Secondary key generation module 11 is used for disperseing computing to generate secondary key to each internal code information of character library first key; Lattice information encrypting module 12 pair is encrypted the secondary key that generated successively and is generated the dot array data cipher-text information with the pairing lattice information of internal code information; Identifying code generation module 13 is used for that respectively described secondary key pair is carried out cryptographic calculation with the pairing data cipher-text information of described secondary key and generates identifying code; Identifying code memory module 14 is stored described identifying code successively.Enable character library, check code cryptographic calculation unit 151 is used for that respectively described secondary key pair is carried out cryptographic calculation with the pairing data cipher-text information of described secondary key and generates check code; Comparing unit 152 is used for the more described successively check code identifying code corresponding with described check code; Assay processing unit 153 is used for handling subsequent operation according to the comparative result of described check code and identifying code, and described check code is that identical then the continuation carried out subsequent operation with the comparative result of identifying code, otherwise returns mistake.
Following is that same key is an example with second key and first key then, and details are as follows to present embodiment:
Secondary key generation module 11 is used for that first key is carried out cryptographic calculation to each internal code information of character library and disperses computing to generate secondary key; Lattice information encrypting module 12 pair is encrypted the secondary key that generated successively and is generated the dot array data cipher-text information with the pairing lattice information of internal code information; Identifying code generation module 13 is used for first key is carried out cryptographic calculation generation identifying code to all described internal code informations and all described dot array data cipher-text information; Identifying code storage unit 14 is stored described identifying code.Enable character library, check code cryptographic calculation unit 151 is used for first key is carried out cryptographic calculation generation check code to all described internal code informations and all described dot array data cipher-text information; Comparing unit 152 is used for more described check code and described identifying code; Assay processing unit 153 is used for handling subsequent operation according to the comparative result of described check code and identifying code, and described check code is that identical then the continuation carried out subsequent operation with the comparative result of identifying code, otherwise returns mistake.
By above-mentioned passable, the embodiment of the invention by a kind of encryption verification device of character library is provided, can be reminded the user, thereby further promote the confidentiality of character library after the illegal users from replacing character library, reach anti-tamper purpose.
The above only is the preferred embodiments of the present invention; be not so limit claim of the present invention; every equivalent structure or equivalent flow process conversion that utilizes instructions of the present invention and accompanying drawing content to be done; or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.