CN103345609A - Method and device for text encryption and decryption - Google Patents

Method and device for text encryption and decryption Download PDF

Info

Publication number
CN103345609A
CN103345609A CN2013102233641A CN201310223364A CN103345609A CN 103345609 A CN103345609 A CN 103345609A CN 2013102233641 A CN2013102233641 A CN 2013102233641A CN 201310223364 A CN201310223364 A CN 201310223364A CN 103345609 A CN103345609 A CN 103345609A
Authority
CN
China
Prior art keywords
section
data segment
key
subdata
subdata section
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
CN2013102233641A
Other languages
Chinese (zh)
Other versions
CN103345609B (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.)
SHENZHEN DACHENGTIANXIA INFORMATION TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN DACHENGTIANXIA INFORMATION 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 SHENZHEN DACHENGTIANXIA INFORMATION TECHNOLOGY Co Ltd filed Critical SHENZHEN DACHENGTIANXIA INFORMATION TECHNOLOGY Co Ltd
Priority to CN201310223364.1A priority Critical patent/CN103345609B/en
Publication of CN103345609A publication Critical patent/CN103345609A/en
Application granted granted Critical
Publication of CN103345609B publication Critical patent/CN103345609B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method for encryption of a data segment. The method for encryption of the data segment comprises the steps of (1) dividing the data segment into a plurality of sub-data segments which correspond to the length of a secret key according to the length of the secret key used for encryption of the data segment, (2) as for each sub-data segment in the sub-data segments, carrying out encryption processing on each sub-data segment by using a reversible fixed length encryption algorithm according to the secret key so as to obtain an encrypted sub-data segment, and (3) combining the encrypted sub-data segments to obtain an encrypted data segment. The invention further discloses a corresponding method for decryption and a corresponding device for encryption and decryption.

Description

A kind of text encipher-decipher method and encryption and decryption equipment
Technical field
The present invention relates to the encryption and decryption field, relate in particular to the data encrypting and deciphering field that data are encrypted and decipher.
Background technology
Along with constantly popularizing of technology such as computing machine and network, information security becomes the problem that becomes more and more important.In order to guarantee the data security such as file, need carry out encryption and decryption to data usually and handle.For example in data transmission and memory period data are encrypted, and only when using data, data are decrypted.
Occurred at present various for data being carried out the technology that encryption and decryption is handled.For example a kind of encryption and decryption technology commonly used adopts the following step to carry out the file encryption processing, at first file is divided into from the beginning to the end some data segments not of uniform size; Begin to encrypt from the initial data section with encryption key subsequently, the data segment recombinant that several group encryptions can be crossed in the encrypted process is encrypted the data segment of perhaps encrypting and the Hybrid Encryption of unencrypted data segment again.Encrypted combination mode in the ciphering process is controlled by privately owned algorithm.And the process of deciphering is the inverse process of encrypting.Utilize this mode, Cipher Strength that can be enough is to file encryption.
But there is following deficiency in existing cipher mode: at first, because the algorithm complexity, again via the Multiple Combination encryption and decryption, the efficient of encryption and decryption is very low.If the file that encryption and decryption is handled is more big, encryption/decryption speed is more slow like this; In addition in the process of deciphering, even deciphering a certain section content also needs whole encrypted section are decrypted, needing to cause certain fraction file content even Here it is, also need file is carried out the full text deciphering, and deciphering can produce temporary file in full, some rogue programs can be walked around whole encryption and decryption by the content of obtaining temporary file and handle, and make existing encryption and decryption handle and lose efficient, and increase the risk that file is divulged a secret.
Therefore, need a kind ofly can to improve encryption/decryption speed, can only be decrypted the technology of processing simultaneously to the arbitrary portion of encrypt file, can avoid like this when deciphering, producing whole declassified document and the file that the causes risk of divulging a secret.
Summary of the invention
For this reason, the invention provides a kind of new data encryption/decryption method and encryption and decryption equipment to try hard to solve or alleviate at least the problem that exists above.
According to an aspect of the present invention, provide a kind of data segment encryption method, comprised step: according to being used for data segment encrypted secret key length, data segment has been divided into the multistage subdata section corresponding with key length; For the every cross-talk data segment in the above-mentioned multistage subdata section, according to described key, utilize reversible fixed length cryptographic algorithm to come this cross-talk data segment is encrypted processing, to obtain the encryption subdata section after encrypting; And make up every section and encrypt the subdata section, to obtain the data encrypted section.
According to another aspect of the present invention, a kind of method that target data segment in the enciphered data section is decrypted is provided, wherein said enciphered data section is encrypted the data segment that obtains for utilizing according to encryption method of the present invention, and this decryption method comprises step: obtain the position of target data segment in the enciphered data section that will decipher; According to key length, target data segment length and the position of target data segment in the enciphered data section, determine one or more encryption subdata section that described target data segment is related; Obtain determined one or more and encrypt the subdata section, for each the subdata section in described one or more encryption subdata section, according to above-mentioned key, the utilization decipherment algorithm corresponding with described reversible fixed length cryptographic algorithm described subdata section is decrypted processing, to obtain the subdata section after the deciphering; And according to the position of target data segment in the enciphered data section, the combination subdata section after from described one or more deciphering, to obtain the target data segment after the deciphering.
According to aspect in addition of the present invention, a kind of data segment encryption device is provided, comprise data segment division module, be suitable for according to being used for data segment encrypted secret key length data segment being divided into the multistage subdata section corresponding with key length; Encrypting module, be suitable for receiving the multistage subdata section that data segment is divided Module Division, and for the every cross-talk data segment in the above-mentioned multistage subdata section, according to described key, utilize reversible fixed length cryptographic algorithm to come this cross-talk data segment is encrypted processing, to obtain the encryption subdata section after encrypting; And composite module, be suitable for receiving each section encryption subdata section after encrypting module is encrypted, and make up every section and encrypt the subdata section, to obtain the data encrypted section.
According to aspect in addition of the present invention, a kind of decryption device that the target data segment in the enciphered data section is decrypted of being suitable for is provided, wherein said enciphered data section is to utilize data segment encryption device of the present invention to encrypt the data segment that obtains, this decryption device comprises: position determination module is suitable for the definite position of target data segment in the enciphered data section that will decipher; Subdata section determination module is suitable for according to key length, data segment, length and the target data segment position in the enciphered data section, determines one or more encryption subdata section that described target data segment is related; Deciphering module, be suitable for receiving one or more encryption subdata section that subdata section determination module is determined, according to above-mentioned key, the utilization decipherment algorithm corresponding with described reversible fixed length cryptographic algorithm described subdata section is decrypted processing, to obtain the subdata section after the deciphering; And composite module, the target data segment after being suitable for obtaining deciphering according to the position of target data segment in the enciphered data section, from one or more subdata section after the described deciphering module deciphering.
According to data segment encryption and decryption mode of the present invention, owing to adopt key and the fixed length encryption and decryption mode of regular length, make in the time need needing the read-write operation of deciphering to the file that comprises enciphered data, do not need whole file is carried out the encryption and decryption operation, but need read-write any partly content, just decipher the content of this part, thereby improved the efficient of decryption processing.In addition, owing in decrypting process, do not need whole file is decrypted, therefore do not need extra storage space, and reduced the possibility of leakage of data.
According to data segment encryption and decryption mode of the present invention, because only some partial document of file being carried out encryption and decryption as required handles, therefore can solve the problem that in file encryption-decryption is handled, must carry out encryption and decryption in the present technology to the total data of file, improve encryption/decryption speed, particularly for the situation of the read-only data that take a morsel in the big file, can significantly reduce the read-write operation to disk, reduce CPU usage, thereby improve encryption and decryption efficient.
Description of drawings
In order to realize above-mentioned and relevant purpose; this paper describes some illustrative aspect in conjunction with following description and accompanying drawing; the variety of way that can put into practice principle disclosed herein has been indicated in these aspects, and all aspects and equivalent aspect thereof are intended to fall in the scope of theme required for protection.Read following detailed in conjunction with the drawings, above-mentioned and other purpose, feature and advantage of the present disclosure will become more obvious.Spread all over the disclosure, identical Reference numeral is often referred to identical parts or element of generation.
Fig. 1 shows the process flow diagram of data segment encryption method according to an embodiment of the invention;
Fig. 2 shows the process flow diagram of data segment decryption method in accordance with another embodiment of the present invention;
Fig. 3 shows the schematic block diagram of encryption device in accordance with another embodiment of the present invention; And
Fig. 4 shows the schematic block diagram of decryption device in accordance with another embodiment of the present invention.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Though shown exemplary embodiment of the present disclosure in the accompanying drawing, yet should be appreciated that and to realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order to understand the disclosure more thoroughly that these embodiment are provided, and can with the scope of the present disclosure complete convey to those skilled in the art.
Fig. 1 shows the process flow diagram of data segment encryption method 100 according to an embodiment of the invention.Method 100 starts from step S110, wherein receives and wants the ciphered data section.In this application, data segment refers to a string data, and it can be text data, also can be some binary data.The present invention is not subject to the concrete form of data segment, and any type of data segment is all within protection scope of the present invention.For the ease of understanding purport of the present invention, in the application hereinafter, will be that example illustrates data segment with the file.
Subsequently, in step S120, according to the length of the key that is used for data segment is encrypted, will receive at step S110, want the enciphered data section to be divided into the multistage subdata section corresponding with key length.In this application, adopt reversible permanent cryptographic algorithm to come data segment is encrypted, the key that adopts when therefore encrypting is generally one or more predetermined key of regular length.Permanent cryptographic algorithm requires key and wants the length between the ciphered data to be consistent, and for example the two length is identical, and the length of perhaps wanting enciphered data is the integral multiple of key length etc.The present invention is all example mutually with key length and enciphered data length and describes, but should be appreciated that the present invention is not subject to this.
According to an example, the file that encrypt is the file A.doc that the Word word of Microsoft's exploitation can handle, its file size 10MB.The encryption key length that is used for this document encryption is 256, therefore, in step S120, A.doc need be divided into from the beginning to the end by 256 every section that (10 * 1024KB/MB * 1024B/KB * 8/B)/256=327680 cross-talk data segment are in order to can carry out subsequent treatment to each subdata section subsequently.
Alternatively, because file size to be processed and key length can not be in full accord, therefore, when file is divided, final stage length can appear less than the residue subdata section of key length.The present invention can take other encryption to residue subdata section.
After step S120 carries out the data segment segmentation, in step S130, for every cross-talk data segment, according to predetermined key, utilize reversible fixed length cryptographic algorithm to come this cross-talk data segment is encrypted processing, to obtain the encryption subdata section after encrypting.
Be example with top example A.doc, the reversible fixed length cryptographic algorithm that adopts is XOR algorithm by turn, then for every cross-talk data segment, can be with first of every section of first correspondence of key, and it is corresponding successively in order, each carries out XOR to using the XOR algorithm, thus the subdata section after obtaining to encrypt.
Though should be noted in the discussion above that top is that example is come reversible permanent cryptographic algorithm is described with XOR algorithm by turn, the present invention is not subject to this, and all other reversible permanent cryptographic algorithm is all within protection scope of the present invention.
Be also noted that, being all example with the length of every cross-talk data segment mutually with key length above is described, should be noted that, the length of subdata section can be the integral multiple of key length, like this, can be by a secret key bits corresponding to the corresponding positions in a plurality of subdata sections and carry out bitwise encryption and realize piecemeal the operation of encrypting equally.
Alternatively, at described in step S120, length is less than the residue subdata section of key length, can adopt at least a processing the in the following multiple mode.
For example, according to an embodiment of the invention, can after residue subdata section, fill predetermined character so that identical with key length through the residue subdata section of filling, so just can utilize above-described mode, namely utilize the fixed length cryptographic algorithm and be encrypted residue subdata section after obtaining to encrypt according to predetermined key.
According to another implementation of the invention, if the reversible permanent cryptographic algorithm of taking is XOR algorithm by turn, then can adopt the part key to come residue subdata section is encrypted gets final product, therefore can begin to intercept the key part with residue subdata section equal length from the key reference position, and utilize the fixed length cryptographic algorithm and be encrypted residue subdata section after obtaining to encrypt according to the key that intercepts.
In step S130, to each subdata section and optionally remain after the subdata section all carried out encrypting, subsequently, in step S140, the subdata section of each encryption is made up, thereby obtained the data encrypted section.
Provide the example process that said method according to the present invention is encrypted below, the given ciphered data section of wanting is 0E 1F BA 0E 00 B4 09 CD 21 B8 01 4C CD 21, and its length is 14 bytes.Encrypting encryption key 2E 74 65 78(that adopt 32 is 00101110011101000110010101111000).When being encrypted according to top encryption method 100, can the ciphered data section be divided into 3 subdata section " 0E 1F BA 0E ", " 00 B4,09 CD " and " 21 B8,01 4C " with the key equal length, and a remaining data section " CD 21 ".
The cryptographic algorithm of supposing employing is step-by-step XOR algorithm, and is then as follows to the processing that 3 sub-data segments are encrypted:
0E?1F?BA?0E^2E?74?65?78->20?6B?DF?76
00?B4?09?CD^2E?74?65?78->2E?C0?6C?B5
21?B8?01?4C^2E?74?65?78->0F?CC?64?34
For residue subdata section, can consider to skip the redundance in the key, therefore, as follows to the encryption of this part:
CD?21^2E?74->E3?55
Subsequently, the subdata section of each encryption makes up, thereby obtains data encrypted: 20 6B DF76 2E C0 6C B5 0F CC, 64 34 E3 55.
Utilize this data segment encryption method, owing to adopted the reversible permanent cryptographic algorithm of encrypting piecemeal, consistent with encryption data segment, length afterwards before encrypting, therefore when the data encrypted section is decrypted, can be only wherein a part be decrypted, and need whole ciphered data section is decrypted.
Fig. 2 shows the process flow diagram of data segment decryption method 200 in accordance with another embodiment of the present invention, this method is suitable for being particularly suitable for certain target data segment in such ciphered data section is decrypted to being decrypted according to encryption method 100 ciphered data sections.
Method 200 is suitable for step S210, in step S210, obtains the information of relevant target data segment, comprises the length of target data segment and target data segment position in the enciphered data section etc.The position of target data segment in the enciphered data section can refer to the reference position in the enciphered data section of target data.
Subsequently, in step S220, according to length and the position of target data segment in the enciphered data section of decruption key length, target data segment, determine one or more encryption subdata section that target data segment is related.As mentioned above, the enciphered data section is to carry out segmentation according to the length of encryption key to encrypt in ciphering process, therefore when target data segment is decrypted, needs to determine the related subdata section of target data segment.By these subdata sections are decrypted, can obtain the decrypted result of target data segment.Because encryption key is identical with decruption key, therefore, based on length and the position (for example, reference position) of target data segment in the enciphered data section of decruption key length, target data segment, can determine the encryption subdata section that relates to fully.For example, be example with above A.doc, if the length of target data segment is 2KB, reference position is the beginning 500bit(position apart from the enciphered data section), 2-65 data segment of the encryption subdata Duan Weicong enciphered data section beginning beginning that then relates to.
After step S220 has determined each related encryption subdata section, in step S230, obtain determined one or more and encrypt subdata section.For each the subdata section in these encryption subdata sections, according to decruption key, utilize the corresponding decipherment algorithm of reversible fixed length cryptographic algorithm that adopts when this enciphered data section is encrypted that encryption subdata section is decrypted processing, to obtain the subdata section after the deciphering.
Because target data segment can cross over a plurality of subdata sections, therefore, some subdata section is included in the target data segment fully, and some subdata section only has wherein a part in target data segment.For the subdata section that is included in fully in the target data segment, the subdata section after can deciphering fully to obtain to decipher according to the decipherment algorithm of decruption key and correspondence.
Subdata section for partly being included in the target data segment can adopt multiple mode to be decrypted.Alternatively, can at first be decrypted whole subdata section, then the intercepting part corresponding with target data segment.In addition, according to an embodiment of the invention, can intercept the part key, utilize the key that intercepts that the part in the corresponding subdata section is decrypted processing then, concrete steps are as follows, at first according to target data segment and this subdata section position in the enciphered data section, determine the part of the subdata section corresponding with target data segment, intercept part key corresponding with this part of this subdata section in the decruption key subsequently, and according to the part key that intercepts, utilizing decipherment algorithm that this part is decrypted handles and acquisition needed data decryption in this subdata section.Utilize this mode, can the antithetical phrase data segment in unwanted part be decrypted, thereby further reduced the possibility that data are revealed.
After corresponding subdata section is decrypted to each, in step S240, make up each decryption portion at step S230, thereby generate the decryption content of target data segment, thereby finish decrypting process.
According to method 200 described decryption processing, when ciphered data is decrypted, only need the specific part that will decipher is decrypted, and need not whole contents is decrypted, thereby not only can improve deciphering efficient, can also reduce the possibility that the total data that causes owing to decryption processing is divulged a secret.
Provide the example process that is decrypted according to top method below, same data instance to provide above, the data of having encrypted are 20 6B DF, 76 2E C0 6C B5 0F CC, 64 34 E3 55, encrypting decruption key 2E 74 65 78(that adopt 32 is 00101110011101000110010101111000), and the decipherment algorithm that adopts is step-by-step XOR algorithm.At this moment, be to target data segment, 3-9 byte (totally 7 bytes), namely DF 76 2E C0 6C B5 0F are decrypted processing.Because decruption key is 4 bytes (32), therefore, subdata Duan Weidi 1-3 the sub-data segment that target data segment is related.According to an embodiment of the invention, can be decrypted processing by the part of intercepting key, therefore, for target data segment DF 76 2E C0 6C B5 0F, need carry out following three parts deciphering:
## ## DF 76^## ## 65 78-〉the BA 0E(part of ## for skipping according to segment displacement alignment wherein);
2E C0 6C B5^2E 74 65 78-〉00 B4,09 CD; And
0F ## ## ##^2E ## ## ##-〉21(wherein ## be lack of foundation part that section length skips)
Data after the combination deciphering, thus the data decryption corresponding with target data segment obtained: BA 0E 00 B4 09 CD 21.
Fig. 3 shows the schematic block diagram of encryption device 300 in accordance with another embodiment of the present invention.Encryption device 300 is suitable for carrying out encryption method shown in Figure 1 100.As shown in Figure 3, data segment encryption device 300 comprises data segment division module 310.This division module 310 receives to be wanted the ciphered data section and according to the length for the key that data segment is encrypted, the enciphered data section of wanting that receives is divided into the multistage subdata section corresponding with key length.In this application, data segment refers to a string data, and it can be text data, also can be some binary data.The present invention is not subject to the concrete form of data segment, and any type of data segment is all within protection scope of the present invention.In this application, adopt reversible permanent cryptographic algorithm to come data segment is encrypted, the key that adopts when therefore encrypting is generally one or more predetermined key of regular length.Permanent cryptographic algorithm requires key and wants the length between the ciphered data to be consistent, and for example the two length is identical, and the length of perhaps wanting enciphered data is the integral multiple of key length etc.The present invention is all example mutually with key length and enciphered data length and describes, but should be appreciated that the present invention is not subject to this.
Alternatively, because file size to be processed and key length can not be in full accord, therefore, when file is divided, final stage length can appear less than the residue subdata section of key length.The present invention can take other encryption to residue subdata section.
Encryption device 300 also comprises encrypting module 320, it is couple to data segment and divides module 310, receive the multistage subdata section that this module 310 is divided, and for the every cross-talk data segment in the above-mentioned multistage subdata section, according to predetermined encryption key, utilize reversible fixed length cryptographic algorithm to come this cross-talk data segment is encrypted processing, to obtain the encryption subdata section after encrypting.
Be example with top example A.doc, the reversible fixed length cryptographic algorithm that adopts is XOR algorithm by turn, then for every cross-talk data segment, can be with first of every section of first correspondence of key, and it is corresponding successively in order, each carries out XOR to using the XOR algorithm, thus the subdata section after obtaining to encrypt.
Though should be noted in the discussion above that top is that example is come reversible permanent cryptographic algorithm is described with XOR algorithm by turn, the present invention is not subject to this, and all other reversible permanent cryptographic algorithm is all within protection scope of the present invention.
Be also noted that, being all example with the length of every cross-talk data segment mutually with key length above is described, should be noted that, the length of subdata section can be the integral multiple of key length, like this, can be by a secret key bits corresponding to the corresponding positions in a plurality of subdata sections and carry out bitwise encryption and realize piecemeal the operation of encrypting equally.
Alternatively, in data segment is divided module 310, divide, length is less than the residue subdata section of key length, encrypting module 320 can adopt at least a processing the in the following multiple mode.
For example, according to an embodiment of the invention, can after residue subdata section, fill predetermined character so that identical with key length through the residue subdata section of filling, so just can utilize above-described mode, namely utilize the fixed length cryptographic algorithm and be encrypted residue subdata section after obtaining to encrypt according to predetermined key.
According to another implementation of the invention, if the reversible permanent cryptographic algorithm of taking is XOR algorithm by turn, then can adopt the part key to come residue subdata section is encrypted gets final product, therefore can begin to intercept the key part with residue subdata section equal length from the key reference position, and utilize the fixed length cryptographic algorithm and be encrypted residue subdata section after obtaining to encrypt according to the key that intercepts.
Encryption device 300 also comprises composite module 330, and it is couple to encrypting module 320, is suitable for receiving each section encryption subdata section after encrypting module is encrypted, and makes up every section and encrypt the subdata section, obtaining the data encrypted section, and output ciphered data section.
Fig. 4 shows the schematic block diagram of decryption device 400 in accordance with another embodiment of the present invention, decryption device 400 is suitable for carrying out top decryption method 200, and be suitable for being particularly suitable for certain target data segment in such ciphered data section is decrypted to being decrypted according to decryption device 300 ciphered data sections.As shown in Figure 4, decryption device 400 comprises position determination module 410, and this position determination module 410 is obtained the information of relevant target data segment, and this information comprises the length of target data segment and target data segment position in the enciphered data section etc.
Subdata section determination module 420 is couple to position determination module 410, is suitable for length and the position of target data segment in the enciphered data section of decruption key length, target data segment, determines one or more encryption subdata section that target data segment is related.As mentioned above, the enciphered data section is to carry out segmentation according to the length of encryption key to encrypt in ciphering process, therefore when target data segment is decrypted, needs to determine the related subdata section of target data segment.By these subdata sections are decrypted, can obtain the decrypted result of target data segment.Because encryption key is identical with decruption key, therefore, based on length and the position (for example, reference position) of target data segment in the enciphered data section of decruption key length, target data segment, can determine the encryption subdata section that relates to fully.For example, be example with above A.doc, if the length of target data segment is 2KB, reference position is the beginning 500bit(position apart from the enciphered data section), 2-65 data segment of the encryption subdata Duan Weicong enciphered data section beginning beginning that then relates to.
Deciphering module 430 is couple to subdata section determination module 420, is suitable for receiving one or more encryption subdata section that subdata section determination module 420 is determined.For each the subdata section in these encryption subdata sections, deciphering module 430 according to decruption key, utilize the corresponding decipherment algorithm of reversible fixed length cryptographic algorithm that adopts when this enciphered data section is encrypted that encryption subdata section is decrypted processing, to obtain the subdata section after the deciphering.
Because target data segment can cross over a plurality of subdata sections, therefore, some subdata section is included in the target data segment fully, and some subdata section only has wherein a part in target data segment.For the subdata section that is included in fully in the target data segment, the subdata section after deciphering module 430 can be deciphered fully to obtain to decipher according to the decipherment algorithm of decruption key and correspondence.
Subdata section for partly being included in the target data segment can adopt multiple mode to be decrypted.Alternatively, can at first be decrypted whole subdata section, then the intercepting part corresponding with target data segment.In addition, according to an embodiment of the invention, deciphering module 430 can intercept the part key, utilize the key that intercepts that the part in the corresponding subdata section is decrypted processing then, concrete steps are as follows, at first according to target data segment and this subdata section position in the enciphered data section, determine the part of the subdata section corresponding with target data segment, intercept part key corresponding with this part of this subdata section in the decruption key subsequently, and according to the part key that intercepts, utilizing decipherment algorithm that this part is decrypted handles and acquisition needed data decryption in this subdata section.Utilize this mode, can the antithetical phrase data segment in unwanted part be decrypted, thereby further reduced the possibility that data are revealed.
Decryption device 400 also comprises composite module 440, is couple to deciphering module 430, and one or more subdata section after 430 deciphering of receiving and deciphering module also makes up, thereby obtains the target data segment after the deciphering.
Utilize decryption device 400, when ciphered data is decrypted, only needs the specific part that will decipher is decrypted, and need not whole contents is decrypted, thereby not only can improve deciphering efficient, can also reduce the possibility that the total data that causes owing to decryption processing is divulged a secret.
In the instructions that provides herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can be put into practice under the situation of these details not having.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the description to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes in the above.Yet, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection require than in each claim the feature clearly put down in writing more many feature.Or rather, as following claims reflected, inventive aspect was to be less than all features of the disclosed single embodiment in front.Therefore, follow claims of embodiment and incorporate this embodiment thus clearly into, wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are to be understood that the module of the equipment in example disclosed herein or unit or assembly can be arranged in as in the equipment described in this embodiment, perhaps replacedly can be positioned in one or more equipment different with the equipment in this example.Module in the aforementioned exemplary can be combined as a module or can be divided into a plurality of submodules in addition.
Those skilled in the art are appreciated that and can adaptively change and they are arranged in one or more equipment different with this embodiment the module in the equipment among the embodiment.Can become a module or unit or assembly to the module among the embodiment or unit or combination of components, and can be divided into a plurality of submodules or subelement or sub-component to them in addition.In such feature and/or process or unit at least some are mutually repelling, and can adopt any combination to disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and so all processes or the unit of disclosed any method or equipment make up.Unless clearly statement in addition, disclosed each feature can be by providing identical, being equal to or the alternative features of similar purpose replaces in this instructions (comprising claim, summary and the accompanying drawing followed).
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included among other embodiment, the combination of features of different embodiment means and is within the scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
In addition, some among the described embodiment are described as the method that can implement by the processor of computer system or by other device of carrying out described function or the combination of method element at this.Therefore, has the device that is formed for implementing this method or method element for the processor of necessity instruction of implementing described method or method element.In addition, the element described herein of device embodiment is example as lower device: this device is used for enforcement by the performed function of element for the purpose of implementing this invention.
As used in this, unless make separate stipulations, use ordinal number " first ", " second ", " 3rd " etc. to describe the different instances that common object only represents to relate to similar object, and be not intended to hint the object that is described like this must have the time go up, on the space, ordering aspect or with the definite sequence of giving of any alternate manner.
In claims below and the instructions herein, term " comprises ", the one of any of " containing ", " comprising " is open term, and it means and comprise the described element/feature in back at least, and does not get rid of other.Should not be interpreted into when therefore, term " comprises " in being used in these claims and be limited to listed thereafter device, element or step.For example, the scope of wording " device that comprises A and B " should not be limited to the device that only is made of elements A and B.Term used herein " comprises ", the one of any of " including " or " comprising " also is open term, and it also means and comprise described element/feature at least thereafter, and does not get rid of other.Therefore, comprise it being the synonym that comprises, and mean and comprise.
Similarly, should be noted that term as used herein " coupling " should not be interpreted into only limits to direct connection.Can use term " coupling " and " connection " and their derivative words.Can understand, these terms are not intended to conduct synonym each other.Therefore, the scope that wording " is coupled to the device A of device B " should not be restricted to following device or system, and the output of wherein installing A is connected directly the input of auto levelizer B.This means that have the path between the input of the output of A and B, this path can be the path that comprises miscellaneous equipment or device." coupling " can refer to two or more element direct physical contacts or electrically contact that perhaps two or more elements directly do not contact with each other, but still cooperation or interaction each other.
Although the embodiment according to limited quantity has described the present invention, benefit from top description, those skilled in the art understand, in the scope of describing thus of the present invention, it is contemplated that other embodiment.In addition, should be noted that the language that uses in this instructions mainly selects for purpose readable and instruction, rather than select in order to explain or to limit theme of the present invention.Therefore, under the situation of the scope and spirit that do not depart from appended claims, many modifications and changes all are apparent for those skilled in the art.For scope of the present invention, be illustrative to disclosing of doing of the present invention, and nonrestrictive, scope of the present invention is limited by appended claims.

Claims (10)

1. data segment encryption method comprises step:
According to being used for data segment encrypted secret key length, data segment is divided into the multistage subdata section corresponding with key length;
For the every cross-talk data segment in the above-mentioned multistage subdata section, according to described key, utilize reversible fixed length cryptographic algorithm to come this cross-talk data segment is encrypted processing, to obtain the encryption subdata section after encrypting; And
Make up every section and encrypt the subdata section, to obtain the data encrypted section.
2. the method for claim 1, wherein
Described data segment is divided into comprises with the corresponding multistage subdata section of key length described data segment is divided into remaining in the multistage identical with the key length first subdata section and the data segment, length less than the second subdata section of key length; And
Describedly utilize key that every cross-talk data segment is encrypted to handle to comprise:
For every section first subdata section, utilize the fixed length cryptographic algorithm and carry out the fixed length encryption according to described key, the first subdata section after encrypting with acquisition; And
For the described second subdata section, the second subdata section after obtaining to encrypt by one of following manner at least:
After the second subdata section, fill predetermined character so that identical with key length through the second subdata section of filling, and utilize described fixed length cryptographic algorithm and be encrypted the second subdata section after obtaining to encrypt according to described key; And
Begin to intercept the described key part with the second subdata section equal length from described key reference position, and utilize described fixed length cryptographic algorithm and be encrypted the second subdata section after obtaining to encrypt according to the key that intercepts.
3. as claim 1 or 2 described methods, wherein said reversible fixed length cryptographic algorithm is step-by-step XOR algorithm.
4. method that the target data segment in the enciphered data section is decrypted, wherein said enciphered data section for utilize as among the claim 1-3 any described encryption method encrypt the data segment of acquisition, this decryption method comprises step:
Obtain the position of target data segment in the enciphered data section that to decipher;
According to key length, target data segment length and the position of target data segment in the enciphered data section, determine one or more encryption subdata section that described target data segment is related;
Obtain determined one or more and encrypt the subdata section, for each the subdata section in described one or more encryption subdata section, according to above-mentioned key, the utilization decipherment algorithm corresponding with described reversible fixed length cryptographic algorithm described subdata section is decrypted processing, to obtain the subdata section after the deciphering; And
According to the position of target data segment in the enciphered data section, the combination subdata section after from described one or more deciphering, to obtain the target data segment after the deciphering.
5. method as claimed in claim 4 wherein saidly comprises the step that described subdata section is decrypted processing according to key, the utilization decipherment algorithm corresponding with described reversible fixed length cryptographic algorithm:
The first of the subdata section corresponding with target data segment is determined in the position in the enciphered data section according to target data segment and described subdata section;
The part key corresponding with the first of this subdata section in the intercepting key;
According to the part key that intercepts, the utilization decipherment algorithm corresponding with described reversible fixed length cryptographic algorithm the first of described subdata section is decrypted processing.
6. a data segment encryption device comprises
Data segment is divided module, is suitable for according to being used for data segment encrypted secret key length data segment being divided into the multistage subdata section corresponding with key length;
Encrypting module, be suitable for receiving the multistage subdata section that data segment is divided Module Division, and for the every cross-talk data segment in the above-mentioned multistage subdata section, according to described key, utilize reversible fixed length cryptographic algorithm to come this cross-talk data segment is encrypted processing, to obtain the encryption subdata section after encrypting; And
Composite module is suitable for receiving each section encryption subdata section after encrypting module is encrypted, and makes up every section and encrypt the subdata section, to obtain the data encrypted section.
7. data segment encryption device as claimed in claim 6, wherein
Described data segment is divided module and is suitable for described data segment is divided into remaining in the multistage identical with the key length first subdata section and the text, length less than the second subdata section of key length;
Described encrypting module is suitable for utilizing the fixed length cryptographic algorithm and according to described key the above-mentioned first subdata section is carried out fixed length and encrypt, the first subdata section after encrypting with acquisition; And
Described encrypted template is suitable for by one of following manner the second subdata section being encrypted at least:
After the second subdata section, fill predetermined character so that identical with key length through the second subdata section after filling, and utilize described fixed length cryptographic algorithm and be encrypted the second subdata section after obtaining to encrypt according to described key; And
Intercept in the described key part with the second subdata section equal length, and utilize described fixed length cryptographic algorithm and be encrypted the second subdata section after obtaining to encrypt according to the key that intercepts.
8. as claim 6 or 7 described data segment encryption devices, wherein said reversible fixed length cryptographic algorithm is step-by-step XOR algorithm.
9. one kind is suitable for decryption device that the target data segment in the enciphered data section is decrypted, wherein said enciphered data section for utilize as among the claim 6-8 any described data segment encryption device encrypt the data segment of acquisition, this decryption device comprises:
Position determination module is suitable for the definite position of target data segment in the enciphered data section that will decipher;
Subdata section determination module is suitable for according to key length, data segment, length and the target data segment position in the enciphered data section, determines one or more encryption subdata section that described target data segment is related;
Deciphering module, be suitable for receiving one or more encryption subdata section that subdata section determination module is determined, according to above-mentioned key, the utilization decipherment algorithm corresponding with described reversible fixed length cryptographic algorithm described subdata section is decrypted processing, to obtain the subdata section after the deciphering; And
Composite module, the target data segment after being suitable for obtaining deciphering according to the position of target data segment in the enciphered data section, from one or more subdata section after the described deciphering module deciphering.
10. decryption device as claimed in claim 9, wherein said deciphering module is suitable for:
The first of the subdata section corresponding with target data segment is determined in the position in the enciphered data section according to target data segment and described subdata section;
The part key corresponding with the first of this subdata section in the intercepting key;
According to the part key that intercepts, the utilization decipherment algorithm corresponding with described reversible fixed length cryptographic algorithm the first of described subdata section is decrypted processing.
CN201310223364.1A 2013-06-06 2013-06-06 A kind of text encipher-decipher method and encryption and decryption equipment Active CN103345609B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310223364.1A CN103345609B (en) 2013-06-06 2013-06-06 A kind of text encipher-decipher method and encryption and decryption equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310223364.1A CN103345609B (en) 2013-06-06 2013-06-06 A kind of text encipher-decipher method and encryption and decryption equipment

Publications (2)

Publication Number Publication Date
CN103345609A true CN103345609A (en) 2013-10-09
CN103345609B CN103345609B (en) 2016-08-10

Family

ID=49280404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310223364.1A Active CN103345609B (en) 2013-06-06 2013-06-06 A kind of text encipher-decipher method and encryption and decryption equipment

Country Status (1)

Country Link
CN (1) CN103345609B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038828A (en) * 2014-05-26 2014-09-10 四川长虹电器股份有限公司 RSA hash signature content protection optimizing method based on AES encryption
CN104767610A (en) * 2015-04-23 2015-07-08 数据堂(北京)科技股份有限公司 Data encryption method and system
CN105184181A (en) * 2015-06-15 2015-12-23 北京天诚同创电气有限公司 File encryption method, file decryption method and file encryption device
CN105763315A (en) * 2014-12-16 2016-07-13 展讯通信(深圳)有限公司 Data encryption and decryption method and apparatus thereof, and communication system
CN105791243A (en) * 2014-12-24 2016-07-20 北京奇虎科技有限公司 Encryption transmission method and device and decryption playing method and device of multimedia file
CN106339638A (en) * 2016-08-22 2017-01-18 北京北信源软件股份有限公司 Encryption and decryption method in file storage and access processes
CN107609418A (en) * 2017-08-31 2018-01-19 深圳市牛鼎丰科技有限公司 Desensitization method, device, storage device and the computer equipment of text data
CN109101826A (en) * 2018-08-08 2018-12-28 君泰创新(北京)科技有限公司 A kind of process data guard method of photovoltaic apparatus and device
CN109995774A (en) * 2019-03-22 2019-07-09 泰康保险集团股份有限公司 Cipher key authentication method, system, equipment and storage medium based on part decryption
CN112182512A (en) * 2020-09-01 2021-01-05 北京幻想纵横网络技术有限公司 Information processing method, device and storage medium
CN113225297A (en) * 2020-01-21 2021-08-06 北京国双科技有限公司 Data hybrid encryption method, device and equipment
CN114338217A (en) * 2022-01-04 2022-04-12 南阳理工学院 Data encryption transmission method
CN114978573A (en) * 2022-03-30 2022-08-30 潍柴动力股份有限公司 OTA data encryption method, device and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6023506A (en) * 1995-10-26 2000-02-08 Hitachi, Ltd. Data encryption control apparatus and method
CN102402670A (en) * 2011-08-03 2012-04-04 广东欧珀移动通信有限公司 File encryption and decryption method
CN102404111A (en) * 2011-12-28 2012-04-04 王勇 Method for encrypting in sections by using uncertain encryption algorithm

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6023506A (en) * 1995-10-26 2000-02-08 Hitachi, Ltd. Data encryption control apparatus and method
CN102402670A (en) * 2011-08-03 2012-04-04 广东欧珀移动通信有限公司 File encryption and decryption method
CN102404111A (en) * 2011-12-28 2012-04-04 王勇 Method for encrypting in sections by using uncertain encryption algorithm

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038828B (en) * 2014-05-26 2017-02-15 四川长虹电器股份有限公司 RSA hash signature content protection optimizing method based on AES encryption
CN104038828A (en) * 2014-05-26 2014-09-10 四川长虹电器股份有限公司 RSA hash signature content protection optimizing method based on AES encryption
CN105763315A (en) * 2014-12-16 2016-07-13 展讯通信(深圳)有限公司 Data encryption and decryption method and apparatus thereof, and communication system
CN105791243A (en) * 2014-12-24 2016-07-20 北京奇虎科技有限公司 Encryption transmission method and device and decryption playing method and device of multimedia file
CN104767610A (en) * 2015-04-23 2015-07-08 数据堂(北京)科技股份有限公司 Data encryption method and system
CN104767610B (en) * 2015-04-23 2018-11-20 数据堂(北京)科技股份有限公司 A kind of data ciphering method and system
CN105184181A (en) * 2015-06-15 2015-12-23 北京天诚同创电气有限公司 File encryption method, file decryption method and file encryption device
CN105184181B (en) * 2015-06-15 2018-11-13 北京天诚同创电气有限公司 File encryption method, file decryption method and file encryption device
CN106339638A (en) * 2016-08-22 2017-01-18 北京北信源软件股份有限公司 Encryption and decryption method in file storage and access processes
CN107609418B (en) * 2017-08-31 2019-12-10 深圳市牛鼎丰科技有限公司 Desensitization method and device of text data, storage device and computer device
CN107609418A (en) * 2017-08-31 2018-01-19 深圳市牛鼎丰科技有限公司 Desensitization method, device, storage device and the computer equipment of text data
CN109101826A (en) * 2018-08-08 2018-12-28 君泰创新(北京)科技有限公司 A kind of process data guard method of photovoltaic apparatus and device
CN109995774A (en) * 2019-03-22 2019-07-09 泰康保险集团股份有限公司 Cipher key authentication method, system, equipment and storage medium based on part decryption
CN109995774B (en) * 2019-03-22 2021-10-08 泰康保险集团股份有限公司 Key authentication method, system, device and storage medium based on partial decryption
CN113225297A (en) * 2020-01-21 2021-08-06 北京国双科技有限公司 Data hybrid encryption method, device and equipment
CN112182512A (en) * 2020-09-01 2021-01-05 北京幻想纵横网络技术有限公司 Information processing method, device and storage medium
CN114338217A (en) * 2022-01-04 2022-04-12 南阳理工学院 Data encryption transmission method
CN114338217B (en) * 2022-01-04 2023-10-10 南阳理工学院 Data encryption transmission method
CN114978573A (en) * 2022-03-30 2022-08-30 潍柴动力股份有限公司 OTA data encryption method, device and system
CN114978573B (en) * 2022-03-30 2024-02-20 潍柴动力股份有限公司 Encryption method, device and system of OTA data

Also Published As

Publication number Publication date
CN103345609B (en) 2016-08-10

Similar Documents

Publication Publication Date Title
CN103345609A (en) Method and device for text encryption and decryption
CN110650010B (en) Method, device and equipment for generating and using private key in asymmetric key
CN108449172B (en) Encryption/decryption method and integrated circuit of computing device
CN105099652B (en) Data encryption, decryption method and device
CN103455446B (en) For implementing the equipment of encryption method and to this operation method
US20120269340A1 (en) Hierarchical encryption/decryption device and method thereof
CN101401105A (en) Encryption apparatus and method for providing an encrypted file system
US11308241B2 (en) Security data generation based upon software unreadable registers
CN103368975B (en) A kind of method and system of batch data safe transmission
CN101311942A (en) Software encryption and decryption method and encryption and decryption device
CN111310222B (en) File encryption method
CN110312054B (en) Image encryption and decryption method, related device and storage medium
CN110505054B (en) Data processing method, device and equipment based on dynamic white box
CN106598882A (en) Secure memory data protection method and device
CN111010266B (en) Message encryption and decryption, reading and writing method and device, computer equipment and storage medium
CN104063672A (en) Data security storage method
EP2960891B1 (en) Method for introducing dependence of white-box implementationon a set of strings
CN104023009A (en) Web system license verification mechansim
CN102480353A (en) Method of password authentication and secret key protection
US20200235922A1 (en) Encryption method
CN103501220A (en) Encryption method and device
CN109995508B (en) Encryption and decryption device and method for FPGA code stream
CN111984985A (en) HDL source code encryption method based on FPGA hardware system
CN109698812A (en) Information ciphering method and device, information decryption method and device and security system
KR20180059217A (en) Apparatus and method for secure processing of memory data

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