CN105099652B - Data encryption, decryption method and device - Google Patents

Data encryption, decryption method and device Download PDF

Info

Publication number
CN105099652B
CN105099652B CN201410185427.3A CN201410185427A CN105099652B CN 105099652 B CN105099652 B CN 105099652B CN 201410185427 A CN201410185427 A CN 201410185427A CN 105099652 B CN105099652 B CN 105099652B
Authority
CN
China
Prior art keywords
numerical value
character
default system
value
default
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.)
Active
Application number
CN201410185427.3A
Other languages
Chinese (zh)
Other versions
CN105099652A (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.)
Burson Marsteller Network Game Development (shenzhen) Co Ltd
Original Assignee
Burson Marsteller Network Game Development (shenzhen) 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 Burson Marsteller Network Game Development (shenzhen) Co Ltd filed Critical Burson Marsteller Network Game Development (shenzhen) Co Ltd
Priority to CN201410185427.3A priority Critical patent/CN105099652B/en
Publication of CN105099652A publication Critical patent/CN105099652A/en
Application granted granted Critical
Publication of CN105099652B publication Critical patent/CN105099652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

The invention provides a kind of data ciphering method, methods described includes:According to the mapping relations of character and numerical value in preset characters storehouse, character to be encrypted is mapped as the first the first numerical value for presetting system in units of byte;First numerical value is converted into the second value of the 3rd default system using first numerical value as the numerical value of the second default system, obtains encryption data;Wherein, between the radix of the 3rd default system described in cardinal sum of the radix of the described second default system between the described first default system.Data ciphering method provided by the invention, dexterously carries out system conversion using the inclusion relation of the mathematic sign between different systems, is encrypted so as to efficiently realize and treat encrypted characters, and saves memory space.Present invention also offers a kind of data decryption method, data encryption device and data decryption apparatus.

Description

Data encryption, decryption method and device
Technical field
The present invention relates to field of information security technology, more particularly to a kind of data encryption, decryption method and device.
Background technology
It is the safe effective technology means of protection information that data, which are encrypted, and existing a variety of data add in conventional art Decryption method, such as MD5 (Message Digest Algorithm 5, Message Digest Algorithm 5), PHP (Hypertext Preprocessor, HyperText Preprocessor) in Mcrypt (a kind of Cryptographic Extensions storehouse) etc., but MD5 is One-Way Encryption, no Reduction can be decrypted, and can not directly display out after the Mcrypt encryptions in PHP or show mess code, inconvenience is checked and typing, And configuration is cumbersome etc., traditional data ciphering method has been difficult to the demand for security for meeting fast-developing information technology.
The content of the invention
Based on this, it is necessary in view of the above-mentioned problems, providing a kind of data encryption that can efficiently decrypt reduction, decryption method And device.
A kind of data ciphering method, methods described include:
According to the mapping relations of character and numerical value in preset characters storehouse, character to be encrypted is mapped as in units of byte First numerical value of one default system;Described first presets into being made as binary system;
Obtain and the isometric key binary string of first numerical value;
XOR result value is obtained after first numerical value and the key binary string are carried out into XOR;
Using the XOR result value as the numerical value of the second default system and by the XOR result value The second value of the 3rd default system is converted into, obtains encryption data;
Wherein, described in cardinal sum of the radix of the described second default system between the described first default system the 3rd preset into Between the radix of system.
A kind of data encryption device, described device include:
Mapping block, will be to be added in units of byte for according to the mapping relations of character and numerical value in preset characters storehouse Close character is mapped as the first numerical value of the first default system;Described first presets into being made as binary system;
Encrypting module, for converting first numerical value using first numerical value as the numerical value of the second default system For the second value of the 3rd default system, encryption data is obtained;
Wherein, described in cardinal sum of the radix of the described second default system between the described first default system the 3rd preset into Between the radix of system;
The encrypting module includes:
Key binary string acquisition module, for obtaining and the isometric key binary string of first numerical value;
XOR module, for first numerical value is different with being obtained after key binary string progress XOR Or operation result numerical value;
Encrypt execution module, for using the XOR result value as the numerical value of the second default system and incite somebody to action described in XOR result value is converted into the second value of the 3rd default system, obtains encryption data.
Above-mentioned data ciphering method and device, character to be encrypted is first mapped as to the first numerical value of the first default system, and Because the radix of the second default system is more than the radix of the first default system, so it is used for representing the numerical value of the first default system Mathematic sign can necessarily be used for representing the component values of the second default system, thus can using the first numerical value as second preset into The numerical value of system and the second value that the first numerical value is converted into the 3rd default system, dexterously utilize the mathematics between different systems The inclusion relation of symbol carries out system conversion, is encrypted so as to efficiently realize and treat encrypted characters.And due to second The radix of default system is less than the radix of the 3rd default system, then the encryption data finally obtained is to enter tabulation with higher radix Show, memory space can be saved.
A kind of data decryption method, for being solved to the encryption data obtained according to above-mentioned data ciphering method Close, the data decryption method includes:
The encryption data of the 3rd default system is divided into one or more first intermediate values in units of presetting digit capacity; The presetting digit capacity is converted into the 3rd for the numerical value of the first of a byte the default system to be preset to the numerical value of system as second The digit of the numerical value of system;Described first presets into being made as binary system;
First intermediate value is converted into the second intermediate value of the second default system;
Obtain and the isometric key binary string of second intermediate value;
Using second intermediate value as the numerical value of the first default system XOR fortune is carried out with the key binary string Calculate, obtain operation result numerical value;
According to the mapping relations of character and numerical value in preset characters storehouse, the operation result numerical value is mapped as character, obtained The character that must be decrypted;
Wherein, described in cardinal sum of the radix of the described second default system between the described first default system the 3rd preset into Between the radix of system.
A kind of data decryption apparatus, for being solved to the encryption data obtained according to above-mentioned data encryption device Close, the data decryption apparatus includes:Encryption data division module, the first intermediate value conversion module and deciphering module;
The encryption data division module, for being divided the encryption data of the 3rd default system in units of presetting digit capacity For one or more first intermediate values;The presetting digit capacity is that the numerical value of the first of a byte the default system is pre- as second If the numerical value of system and be converted into the digit of ternary numerical value;Described first presets into being made as binary system;
The first intermediate value conversion module, for first intermediate value to be converted into the of the second default system Two intermediate values;
The deciphering module, after using second intermediate value as the numerical value of the first default system, according to default Second intermediate value is mapped as character by the mapping relations of numerical value and character in character library, obtains the character of decryption;
Wherein, described in cardinal sum of the radix of the described second default system between the described first default system the 3rd preset into Between the radix of system;
The deciphering module includes:
Acquisition module, for obtaining and the isometric key binary string of second intermediate value;
Computing module, for using second intermediate value as the first numerical value for presetting system and the key binary system String carries out XOR, obtains operation result numerical value;
Execution module is decrypted, for according to the mapping relations of character and numerical value in preset characters storehouse, by the operation result Numerical value is mapped as character, obtains the character of decryption.
Above-mentioned data decryption method and device, because the radix of the second default system is less than the radix of the 3rd default system, So shared memory space is few in itself for encryption data.And will in units of presetting digit capacity by the encryption data of the 3rd default system The encryption data of 3rd default system is divided into one or more first intermediate values, then the first intermediate value is converted into second Second intermediate value of default system, then using second intermediate value as being mapped as word after the numerical value of the first default system Symbol, system conversion dexterously is carried out using the inclusion relation of the mathematic sign between different systems, it is achieved thereby that efficiently right The encryption data obtained using above-mentioned data ciphering method is decrypted so that encryption data can reduce.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of data ciphering method in one embodiment;
Fig. 2 is the schematic flow sheet of data ciphering method in a specific embodiment;
Fig. 3 is the schematic flow sheet of data ciphering method in another specific embodiment;
Fig. 4 is the schematic flow sheet of data decryption method in one embodiment;
Fig. 5 is the schematic flow sheet of data decryption method in a specific embodiment;
Fig. 6 is the schematic flow sheet of data decryption method in another specific embodiment;
Fig. 7 is the structured flowchart of data encryption device in one embodiment;
Fig. 8 is the structured flowchart of one embodiment of the encrypting module in Fig. 7;
Fig. 9 is the structured flowchart of data decryption apparatus in one embodiment;
Figure 10 is the structured flowchart of one embodiment of the deciphering module in Fig. 7.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
The description of specific distinct unless the context otherwise, the present invention in element and component, quantity both can be with single shape Formula is present, and form that can also be multiple is present, and the present invention is defined not to this.Although the step in the present invention is entered with label Arrangement is gone, but is not used to limit the precedence of step, unless expressly stated the order of step or holding for certain step Based on row needs other steps, otherwise the relative rank of step is adjustable.It is it is appreciated that used herein Term "and/or" is related to and covers one of associated Listed Items or one or more of any and all possible group Close.
As shown in figure 1, in one embodiment, there is provided a kind of data ciphering method, this method comprise the following steps:
Step 102, according to the mapping relations of character and numerical value in preset characters storehouse, by character to be encrypted in units of byte It is mapped as the first numerical value of the first default system.
Pre-set the mapping relations of character and numerical value in preset characters storehouse, it is default in preset characters storehouse to be mapped as Numerical value can be the numerical value of the first default system, and character to be encrypted directly can be so mapped as to the first number of the first default system Value.In preset characters storehouse the default numerical value being mapped as can also right and wrong first preset system other arbitrary carry systems numerical value, So after character to be encrypted is mapped as into the first numerical value of other systems, system conversion can be carried out to it again and to obtain first pre- If the first numerical value of system.
First, second, third description is used to distinguish different elements or concept in text.Preset characters storehouse can be ASCII (American Standard Code for Information Interchange, ASCII American Standard Code for Information Interchange generation Code) coding schedule, extension ASCII coding schedules, a kind of Unicode (Unicode, being character code used on computers) codings Table or UTF-8 (8-bit Unicode Transformation Format, are a kind of variable-lengths for Unicode Character code, also known as Unicode) coding schedule etc..Which kind of preset characters storehouse user's needs and/or number to be encrypted may depend on using According to the species of middle character.The species of character is such as English character or chinese character etc..
In one embodiment, step 102 includes:According to the mapping relations of character and numerical value in preset characters storehouse, if treating The more than one byte of numerical value that encrypted characters map in preset characters storehouse, then split the numerical value of mapping by byte, with Obtain the first numerical value of the first default system.
It by byte is unit that computer storage information, which is, and a byte is equal to 8 bits.In UTF-8 coding schedules, For example English character as a~z, A~Z is a byte, and Chinese character is then three bytes.If character to be encrypted is in predetermined word The more than one byte of numerical value mapped in Fu Ku, then need to be split the numerical value of mapping by byte, default to obtain first First numerical value of system.The first numeric data structure being achieved in that is unified, is easy to calculate, and realizes the branch to Chinese character encryption Hold.
For example preset into when being made as binary system when first, can will according to ASCII coding schedules if character to be encrypted is " a " It is " 01100001 " that character " a ", which is mapped as binary first numerical value,;If character to be encrypted is Chinese character " Chinese ", can be according to UTF- Character " Chinese " is mapped as binary first numerical value by 8 coding schedules:" 11100110 ", " 10110001 " and " 10001001 ".
Step 104, using the first numerical value as the numerical value of the second default system and by the first numerical value be converted into the 3rd preset into The second value of system, obtain encryption data;Wherein, cardinal sum threeth of the radix of the second default system between the first default system Between the radix of default system.
In particular it is required that first numerical value is subjected to system and turned using the first numerical value as the numerical value of the second default system Change, to be converted into the third value of the 3rd default system, so as to obtain encryption data.It is being converted into the 3rd of the 3rd default system Multiple system conversion can be carried out during numerical value, is eventually converted into the third value of the 3rd default system.
The radix of second default system refers between the cardinal sum the 3rd of the first default system presets the radix of system The radix of second default system is more than the radix of the first default system, and the radix of the second default system is less than the 3rd default system Radix.The radix of one of system refers to for representing the mathematic sign that the system is used for representing all inequalities of numerical value Number.For example binary system is represented with " 0 " and " 1 ", then binary radix is 2;Hexadecimal numeral 0 to 9, character a to f tables Show, then hexadecimal radix is 16, and represents that the set of the mathematic sign of the numerical value of the first default system is contained in expression The set of the mathematic sign of second default system.Second default system is preferably ternary, quinary, septenary or novenary Deng these systems are not conventional systems, can reduce the probability being cracked.
For example if character to be encrypted is " a ", first presets into being made as binary system, second presets into being made as ternary, the 3rd Preset into hexadecimal is made as, then the first numerical value is " 01100001 ", is regarded as ternary numerical value, then will be ternary It is " 03cd " that " 01100001 ", which is converted into hexadecimal,.It is appreciated that binary numerical value is regarded into ternary numerical value, Its actual numerical value represented has occurred and that change.
Character to be encrypted, is first mapped as the first numerical value of the first default system by above-mentioned data ciphering method, and due to the The radix of two default systems is more than the radix of the first default system, is so used for representing the mathematics symbol of the numerical value of the first default system Can number necessarily be used for representing the component values of the second default system, thus can be using the first numerical value as the second default system number Value and the second value that the first numerical value is converted into the 3rd default system, dexterously utilize the mathematic sign between different systems Inclusion relation carries out system conversion, is encrypted so as to efficiently realize and treat encrypted characters.And due to second preset into The radix of system is less than the radix of the 3rd default system, then the encryption data finally obtained is represented with the system of higher radix, Memory space can be saved.
In one embodiment, first preset into being made as binary system;Then step 104 includes step 11)~step 13):
Step 11), obtain and the isometric key binary string of the first numerical value.
First numerical value is binary number, and key binary string refers to be converted into after key is split according to byte binary Numerical value.Key binary string and the first numerical value are isometric, refer in the first numerical value in the number of mathematic sign and key binary string The number of mathematic sign is equal so that both can do XOR.If being " 01100001 " than the first numerical value, then key two System string can be " 01100010 ".Wherein key be set in advance be used for the first numerical value carry out XOR character or Character string.
In one embodiment, step 11) includes:Obtain key, judge byte shared by key whether with character to be encrypted Byte shared by the character string to be encrypted of composition is equal, if then splitting and being converted into binary key two to enter by byte by key System string;If otherwise by key intercept or circulate compensation be with character string to be encrypted shared by byte it is equal after, by key by byte point Cut and be converted into binary key binary string.
In the present embodiment, byte shared by key should be equal with byte shared by character string to be encrypted, so just can guarantee that and treats Encrypted characters are split by byte and obtain the first numerical value, and key is split by byte and is converted into binary key two to enter After system string, each first numerical value can carry out XOR with corresponding isometric key binary string, it is therefore desirable to first judge close Byte shared by key whether with character to be encrypted composition character string to be encrypted shared by byte it is equal.
Specifically, can be directly by key by byte point if byte shared by character string to be encrypted is equal to byte shared by key Cut and be converted into binary key binary string.If byte shared by character string to be encrypted is more than byte shared by key, can lead to The mode for crossing circulation compensation changes key so that byte shared by character string to be encrypted is equal to byte shared by key;Wherein circulation is mended Repay and refer to repeat a part for key itself or itself in the front portion of key or rear portion.If byte shared by character string to be encrypted is small , then can be according to the partial character or character string of the length interception key of encrypted characters string as newly close in byte shared by key Key.
For example, if character string to be encrypted is " abcde ", key is " fg ", now byte shared by character string to be encrypted More than byte shared by key, then it is " fgfgf " that can obtain new key by way of circulating and compensating.If character string to be encrypted is " abc ", key are " defg ", then it is " def " that new key can be obtained by way of interception.If character string to be encrypted is " Chinese ", key are " abcde ", and Chinese character needs to take three bytes, then new key can be obtained by way of interception is “cde”。
Step 12), XOR result value is obtained after the first numerical value and key binary string are carried out into XOR.
XOR (xor) is a mathematical operator.It is applied to logical operation.The mathematic sign of XOR is " ⊕ ", is calculated Machine symbol is " xor ".Its algorithm is:The false result of true XOR is true, and the false genuine result of XOR is also true, and true XOR is genuine Result is false, and the false result of false XOR is false.That is two values differ, then XOR result is true.Conversely, it is false.It is different It is all mutually 0 for 1.According to principles above, we can draw encrypting and decrypting formula:
Plaintext binary string ⊕ keys binary string=ciphertext binary string;
Ciphertext binary string ⊕ keys binary string=plaintext binary string.
Therefore, it is reversible using XOR encryption.
In one embodiment, after step 12), the new key binary string isometric with the first numerical value can be obtained again, The iteration of step 11)~step 12) progress preset times is substituted into using acquired XOR result value as the first numerical value, Each iteration uses different key binary strings, so as to obtain final XOR result value.So cause encryption more To be reliable.Need to obtain key binary string according to the opposite order of the order with obtaining key binary string during encryption during decryption Successively decrypted.
Step 13), using XOR result value as the numerical value of the second default system and by XOR result value The second value of the 3rd default system is converted into, obtains encryption data.
After obtaining XOR result, XOR is transported using XOR result value as the numerical value of the second default system The second value that result value is converted into the 3rd default system is calculated, so by between XOR encryption technology and the different systems of utilization The encryption technology that the inclusion relation of mathematic sign carries out system conversion is combined so that encryption is more reliable.
For example, as illustrated in fig. 2, it is assumed that character to be encrypted is " a ", first presets into binary system is made as, and second is default Enter and be made as ternary, the 3rd presets into hexadecimal is made as, and dotted arrow represents equivalent step in Fig. 2.Then specifically include:First It is " 01100001 " to need character to be encrypted " a " being mapped as binary first numerical value, by binary first numerical value " 01100001 " as after ternary numerical value, ternary " 01100001 " is converted into hexadecimal second value is " 03cd ", then encryption data is " 03cd ".
Wherein, character to be encrypted " a " is mapped as into binary first numerical value to be specifically equivalent to for " 01100001 ":Take and treat The decimal system ASCII character of encrypted characters " a " is 97, and it is " 01100001 " to be translated into binary number and obtain the first numerical value.
It is " 03cd " that ternary " 01100001 " is converted into hexadecimal second value, then encryption data is " 03cd " is specifically equivalent to:It is " 973 " that ternary " 01100001 " is converted into the decimal system, and being then converted to binary system is " 1111001101 ", because the digit of " 1111001101 " is not the integral multiple of byte, then need its left side zero padding filling 16 Position is " 0000001111001101 "." 0000001111001101 " is divided into first eight bits " 00000011 " and latter eight It is " 03 " and " cd " that hexadecimal is separately converted to after " 11001101 ", then the hexadecimal values converted respectively are merged and obtained Hexadecimal second value is " 03cd ".
For another example, as shown in Figure 3, it is assumed that character to be encrypted is Chinese character " Chinese ", and first presets into binary system is made as, and second is pre- Ternary is made as if entering, the 3rd presets into hexadecimal is made as, and key is " ab ".Then specifically include following steps:
Its decimal system ASCII character is taken to be respectively successively three bytes of character to be encrypted " Chinese ":" 230 ", " 177 " and " 137 ", then it is " 11100110 " " 10110001 " and " 10001001 " to be separately converted to binary first numerical value.
Because byte shared by key " ab " is that two bytes are different from byte shared by " Chinese ", it is therefore desirable to which key " ab " is entered It is " aba " that row circulation compensation, which obtains new key,.Then key " aba " is divided into " a " " b " " a " by byte and takes ten respectively System ASCII character is " 97 " " 98 " " 97 ", then it is " 01100001 " to be separately converted to binary system to obtain key binary string " 01100010 " and " 01100001 ".
First numerical value and corresponding key binary string are carried out into XOR acquisition XOR result value is " 10000111 " " 11010011 " and " 11101000 ", it is converted into 16 using XOR result as ternary numerical value and enters " 0898 " " 0bb9 " and " 0c72 " are made as, it is " 08980bb90c72 " that encryption data is obtained after combination
As shown in figure 4, in one embodiment, there is provided a kind of data decryption method, for using above-mentioned each reality The encryption data for applying the data ciphering method acquisition of example is decrypted, and specifically includes following steps:
Step 402, the encryption data of the 3rd default system is divided into one or more first in units of presetting digit capacity Intermediate value;Presetting digit capacity is converted into for the numerical value of the first of a byte the default system to be preset to the numerical value of system as second The digit of ternary numerical value.
Here the encryption data that encryption data is obtained for the data ciphering method of the above-mentioned each embodiment of use.This reality Applying first, second, third default system in example is respectively and first in the data ciphering method of above-mentioned each embodiment, the 2nd, the 3rd default system is corresponding.
Needed when being encrypted, therefore decrypted in units of byte due to being encrypted character during encryption with presetting digit capacity Encryption data is divided into one or more first intermediate values for unit.Here encrypted character corresponds to above-mentioned each implementation Character to be encrypted in the data ciphering method of example.Caused numerical value in the pilot process of intermediate value expression decryption.If by The character of encryption only accounts for a byte, then corresponding first intermediate value is one.Here presetting digit capacity is by any one word After the numerical value of the default system of the first of section is as the numerical value of the second default system, the numerical value is converted into ternary numerical value Digit.For example after binary " 11111111 " are as ternary, it is " 0cd0 " to be converted into hexadecimal, then now presetting digit capacity For 4.And because the numerical value of a byte is converted into as ternary first of four of hexadecimal numerical value always " 0 ", Therefore presetting digit capacity can be three, in advance agreement.
Step 404, the first intermediate value is converted into the second intermediate value of the second default system.
First intermediate value of the 3rd default system can be converted into the second intermediate value of the second default system, First the first intermediate value of the 3rd default system can be converted into after the numerical value of other arbitrary carry systems and be then converted to second and preset Second intermediate value of system.
Step 406, after second intermediate value being preset into the numerical value of system as first, according to numerical value and word in default character library Second intermediate value is mapped as character by the mapping relations of symbol, obtains the character of decryption.Wherein, the radix of the second default system is situated between Between the radix of the default system of cardinal sum the 3rd of the first default system.
Pre-set the mapping relations of numerical value and character in preset characters storehouse, it is default in preset characters storehouse to be mapped Numerical value can be the numerical value of the first default system, so the second intermediate value of the first default system directly can be mapped as into word Symbol.In preset characters storehouse the default numerical value being mapped can also right and wrong first preset system other arbitrary carry systems numerical value, So the second intermediate value of the first default system first can be converted into entering for the default numerical value being mapped in preset characters storehouse After system, character is mapped as further according to the mapping relations of numerical value and character in preset characters storehouse.
Preset characters storehouse can be that ASCII coding schedules, extension ASCII coding schedules, Unicode coding schedules or UTF-8 are compiled Code table etc..The preset characters storehouse used in the present embodiment and the predetermined word used in the data ciphering method of above-mentioned each embodiment Fu Ku is identical.
The radix of second default system refers between the cardinal sum the 3rd of the first default system presets the radix of system The radix of second default system is more than the radix of the first default system, and the radix of the second default system is less than the 3rd default system Radix.The radix of one of system refers to for representing the mathematic sign that the system is used for representing all inequalities of numerical value Number.Second default system is preferably ternary, quinary, septenary or novenary etc., and these systems are not conventional systems, can To reduce the probability being cracked.
In one embodiment, after second intermediate value being preset into the numerical value of system as first, according in default character library Second intermediate value is mapped as character by the mapping relations of numerical value and character, the step of obtaining the character of decryption, including:If added Close character only takes up a byte, then according to the mapping relations of numerical value and character in default character library, will directly be preset as first Second intermediate value of system is mapped as character;If being encrypted character takes multiple bytes, can be taken according to encrypted character The number of byte will be made after continuous multiple second intermediate values combinations according to the mapping relations of numerical value and character in default character library Combinatorial mapping for multiple second intermediate values of the first default system is character, obtains the character of decryption.
Above-mentioned data decryption method, because the radix of the second default system is less than the radix of the 3rd default system, so add Shared memory space is few in itself for ciphertext data.And by the encryption data of the 3rd default system in units of presetting digit capacity it is pre- by the 3rd If the encryption data of system is divided into one or more first intermediate values, then by the first intermediate value be converted into second preset into Second intermediate value of system, it is ingenious then using second intermediate value as being mapped as character after the numerical value of the first default system Ground carries out system conversion using the inclusion relation of the mathematic sign between different systems, it is achieved thereby that efficiently to using above-mentioned The encryption data that data ciphering method obtains is decrypted so that encryption data can reduce.
In one embodiment, first preset into being made as binary system;Then using the second intermediate value as the first default system Numerical value after, the second intermediate value is mapped as character according to the mapping relations of numerical value and character in default character library, decrypted Character the step of, specifically include step 21)~step 23):
Step 21), obtain and the isometric key binary string of the second intermediate value.
Second intermediate value is binary number, and key binary string refers to that being converted into two after key is split according to byte enters The numerical value of system.Key binary string and the second intermediate value are isometric, refer in the second intermediate value the number of mathematic sign and close The number of mathematic sign is equal in key binary string so that both can do XOR.If it is than the second intermediate value " 01100001 ", then key binary string can be " 01100010 ".Wherein key be set in advance be used for second among Numerical value carries out the character or character string of XOR, and key adds with data of the key binary string respectively with above-mentioned each embodiment Key in decryption method is consistent with key binary string.
In one embodiment, step 21) includes:Key is obtained, judges the length of encryption data and the business of presetting digit capacity Whether with key shared by byte number it is equal, if then key is split by byte and is converted into binary key binary system String;If otherwise being intercepted key or circulation being compensated after being equal with above-mentioned business, key is split by byte and is converted into binary system Key binary string.
In the present embodiment, byte shared by key should be equal with byte shared by encrypted character string, so just can guarantee that Two intermediate values, and after being split by byte by key and be converted into binary key binary string, each second mediant Value can carry out XOR with corresponding isometric key binary string, it is therefore desirable to first judge the length and in advance of encryption data If the business of digit whether with key shared by byte number it is equal.
Specifically, can be direct if the business of the length of encryption data and presetting digit capacity is equal to the number of byte shared by key Key is split by byte and is converted into binary key binary string.If the length of encryption data and the business of presetting digit capacity are big In the number of byte shared by key, then key can be changed by way of circulating and compensating so that be encrypted byte shared by character string Equal to byte shared by key;Wherein circulation compensation refers to repeat one of key itself or itself in the front portion of key or rear portion Point.If the length of encryption data and the business of presetting digit capacity are less than the number of byte shared by key, can be according to encrypted characters string The partial character or character string of length interception key are as new key.
Step 22), XOR fortune is carried out with key binary string using the second intermediate value as the numerical value of the first default system Calculate, obtain operation result numerical value.
After using the second intermediate value as the numerical value of the first default system, using as the second mediant of the first default system Value carries out XOR with key binary string, so as to obtain operation result numerical value.
In one embodiment, can be opposite according to the order with obtaining key binary string during encryption after step 22) After order obtains key binary string one by one, step 21) is substituted into using acquired operation result numerical value as the second intermediate value ~step 22) carries out the iteration of preset times, so as to obtain final operation result numerical value.
Step 23), according to the mapping relations of character and numerical value in preset characters storehouse, operation result numerical value is mapped as word Symbol, obtain the character of decryption.
After obtaining operation result numerical value, according to the mapping relations of numerical value and character in preset characters storehouse, by operation result number Value is mapped as character, the final character for obtaining decryption.
For example, as shown in fig. 5, it is assumed that encryption data is " 03cd ", first presets into binary system is made as, and second is default Enter and be made as ternary, the 3rd presets into hexadecimal is made as, and dotted arrow represents equivalent step.Then specifically comprise the following steps:
Because the numerical value of a byte is converted into as ternary hexadecimal numerical value as four, and it is hexadecimal plus Ciphertext data " 03cd " totally four, therefore it is " 03cd " that encryption data " 03cd " can be divided into first intermediate value, then It is " 01100001 " that hexadecimal first intermediate value " 03cd " is converted into ternary second intermediate value.By in second Between numerical value " 01100001 " be used as binary number, and according to the mapping relations of numerical value and character in preset characters storehouse, two will be used as The second intermediate value " 01100001 " of system is mapped as character " a ", so as to obtain the character of decryption.
Wherein, hexadecimal first intermediate value " 03cd " is converted into ternary second intermediate value is " 01100001 " is specially:First intermediate value " 03cd " is divided into and is separately converted to binary system after " 03 " and " cd " and is " 00000011 " and " 11001101 ", decimal number will be converted into as 973 after the binary number converted respectively combination, then by its turn It is " 01100001 " to turn to ternary and obtain the second intermediate value.
According to the mapping relations of numerical value and character in preset characters storehouse, the second intermediate value " 01100001 " is mapped as word According with " a " is specially:It is " 97 " that the decimal system, which will be converted into, as binary second intermediate value " 01100001 ", is compiled from ASCII It is " a " that character corresponding with decimal number " 97 " is obtained in code table, so as to obtain the character of decryption.
For another example, as shown in Figure 6, it is assumed that encryption data is " 08980bb90c72 ", key ab, and first presets into being made as Binary system, second presets into ternary is made as, and the 3rd presets into hexadecimal is made as, and dotted arrow represents equivalent step.Then have Body comprises the following steps:
, then can be in units of presetting digit capacity by hexadecimal encryption data because presetting digit capacity is 4 " 08980bb90c72 " is divided into three the first intermediate values:" 0898 ", " 0bb9 " and " 0c72 ".By hexadecimal first Intermediate value is converted into ternary the second intermediate value of acquisition:" 10000111 " " 11010011 " and " 11101000 ".
It is " ab " to obtain key, because the length of encryption data and the business of presetting digit capacity are 3, with the length of key not phase Deng carrying out circulation compensation to key, it is " aba " to obtain new key.Secret splitting is taken for " a " " b " " a " and respectively by byte Decimal system ASCII character is " 97 " " 98 " " 97 ", then it is " 01100001 " to be separately converted to binary system to obtain key binary string " 01100010 " and " 01100001 ".
Second intermediate value and corresponding key binary string are carried out into XOR acquisition operation result numerical value is " 11100110 ", " 10110001 " and " 10001001 ", are combined after operation result numerical value is converted into the decimal system, according to predetermined word It is " Chinese " that Fu Ku, which is obtained and combined mapped character with this, so as to obtain the character of decryption.
As shown in fig. 7, providing a kind of data encryption device in one embodiment, the device includes mapping block 702 With encrypting module 704.
Mapping block 702, for according to the mapping relations of character and numerical value in preset characters storehouse, will be treated in units of byte Encrypted characters are mapped as the first numerical value of the first default system.
Pre-set the mapping relations of character and numerical value in preset characters storehouse, it is default in preset characters storehouse to be mapped as Numerical value can be the numerical value of the first default system, and such mapping block 702 can be used for character to be encrypted directly is mapped as into first First numerical value of default system.In preset characters storehouse the default numerical value being mapped as can also right and wrong first preset the other of system The numerical value of arbitrary carry system, such mapping block 702 can be used for after character to be encrypted is mapped as into the first numerical value of other systems, System conversion can be carried out to it again and obtain the first numerical value of the first default system.
Preset characters storehouse can be that ASCII coding schedules, extension ASCII coding schedules, Unicode coding schedules or UTF-8 are compiled Code table etc..It which kind of preset characters storehouse may depend on the species of character in user's needs and/or be-encrypted data using.
In one embodiment, mapping block 702 is additionally operable to according to the mapping relations of character and numerical value in preset characters storehouse, If the more than one byte of numerical value that character to be encrypted maps in preset characters storehouse, the numerical value of mapping is divided by byte Cut, to obtain the first numerical value of the first default system.
It by byte is unit that computer storage information, which is, and a byte is equal to 8 bits.In UTF-8 coding schedules, For example English character as a~z, A~Z is a byte, and Chinese character is then three bytes.If character to be encrypted is in predetermined word The more than one byte of numerical value mapped in Fu Ku, then mapping block 702 is for the numerical value of mapping to be split by byte, to obtain Obtain the first numerical value of the first default system.The first numeric data structure being achieved in that is unified, is easy to calculate, realizes to Chinese character The support of encryption.
Encrypting module 704, for the first numerical value to be converted into the using the first numerical value as the numerical value of the second default system The second value of three default systems, obtains encryption data;Wherein, base of the radix of the second default system between the first default system Between the radix of number and the 3rd default system.
Specifically, encrypting module 704 is used for the first numerical value as the numerical value of the second default system and by first numerical value System conversion is carried out, to be converted into the third value of the 3rd default system, so as to obtain encryption data.Encrypting module 704 can be used In multiple system conversion can be carried out during the third value for being converted into the 3rd default system, it is pre- to be eventually converted into the 3rd If the third value of system.
The radix of second default system refers between the cardinal sum the 3rd of the first default system presets the radix of system The radix of second default system is more than the radix of the first default system, and the radix of the second default system is less than the 3rd default system Radix.The radix of one of system refers to for representing the mathematic sign that the system is used for representing all inequalities of numerical value Number, and represent that the set of the mathematic sign of the numerical value of the first default system is contained in the mathematic sign for representing the second default system Set.Second default system is preferably ternary, quinary, septenary or novenary etc., and these systems are not conventional to enter System, can reduce the probability being cracked.
In one embodiment, mapping block 702 is additionally operable to according to the mapping relations of character and numerical value in preset characters storehouse, If the more than one byte of numerical value that character to be encrypted maps in preset characters storehouse, the numerical value of mapping is divided by byte Cut, to obtain the first numerical value of the first default system.
Character to be encrypted, is first mapped as the first numerical value of the first default system by above-mentioned data encryption device, and due to the The radix of two default systems is more than the radix of the first default system, is so used for representing the mathematics symbol of the numerical value of the first default system Can number necessarily be used for representing the component values of the second default system, thus can be using the first numerical value as the second default system number Value and the second value that the first numerical value is converted into the 3rd default system, dexterously utilize the mathematic sign between different systems Inclusion relation carries out system conversion, is encrypted so as to efficiently realize and treat encrypted characters.And due to second preset into The radix of system is less than the radix of the 3rd default system, then the encryption data finally obtained is represented with the system of higher radix, Memory space can be saved.
As shown in figure 8, in one embodiment, first presets into being made as binary system;Then encrypting module 704 includes:Key Binary string acquisition module 704a, XOR module 704b and encryption execution module 704c.
Key binary string acquisition module 704a, for obtaining and the isometric key binary string of the first numerical value.
First numerical value is binary number, and key binary string refers to be converted into after key is split according to byte binary Numerical value.Key binary string and the first numerical value are isometric, refer in the first numerical value in the number of mathematic sign and key binary string The number of mathematic sign is equal so that both can do XOR.Wherein key be set in advance be used for and the first numerical value Carry out the character or character string of XOR.
In one embodiment, key binary string acquisition module 704a is used to obtain key, judges byte shared by key Whether with character to be encrypted composition character string to be encrypted shared by byte it is equal, if then key is split and is converted into by byte Binary key binary string;If otherwise by key intercept or circulate compensation be with character string to be encrypted shared by byte it is equal Afterwards, key is split by byte and is converted into binary key binary string.
In the present embodiment, byte shared by key should be equal with byte shared by character string to be encrypted, so just can guarantee that and treats Encrypted characters are split by byte and obtain the first numerical value, and key is split by byte and is converted into binary key two to enter After system string, each first numerical value can carry out XOR, therefore key binary string with corresponding isometric key binary string Acquisition module 704a be used for first judge byte shared by key whether with character to be encrypted form character string to be encrypted shared by byte It is equal.
Specifically, if byte shared by character string to be encrypted is equal to byte shared by key, key binary string acquisition module 704a can be used for directly splitting key by byte and being converted into binary key binary string.If shared by character string to be encrypted Byte is more than byte shared by key, then key binary string acquisition module 704a is close available for being changed by way of circulating and compensating Key so that byte shared by character string to be encrypted is equal to byte shared by key;Wherein circulation compensation refer to key front portion or after Portion repeats a part for key itself or itself.If byte shared by character string to be encrypted is less than byte, key shared by key Binary string acquisition module 704a can be used for partial character or the character string conduct that key is intercepted according to the length of encrypted characters string New key.
XOR module 704b, for obtaining XOR fortune after the first numerical value and key binary string are carried out into XOR Calculate result value.
In one embodiment, key binary string acquisition module 704a is used to obtaining new isometric with the first numerical value close Key binary string, it is used for acquired XOR result value as the first numerical value, XOR module 704b by first Numerical value obtains XOR result value, key binary string acquisition module 704a after carrying out XOR with key binary string It is used for alternating action with XOR module 704b, to carry out the iteration of preset times, so as to obtain final XOR knot Fruit numerical value.So make it that encryption is more reliable.Needed during decryption opposite according to the order with obtaining key binary string during encryption Order obtain key binary string successively decrypted.
Encrypt execution module 704c, for using XOR result value as the numerical value of the second default system and by XOR Operation result numerical value is converted into the second value of the 3rd default system, obtains encryption data.
After obtaining XOR result, encryption execution module 704c is used to preset XOR result value as second The numerical value of system and the second value that XOR result value is converted into the 3rd default system, so by XOR encryption technology It is combined with the encryption technology that system conversion is carried out using the inclusion relation of the mathematic sign between different systems so that encryption is more To be reliable.
As shown in figure 9, in one embodiment, there is provided a kind of data decryption apparatus, for according to above-mentioned any real Apply the encryption data that the data encryption device in example is obtained to be decrypted, the data decryption apparatus includes:Encryption data divides Module 902, the first intermediate value conversion module 904 and deciphering module 906.
Encryption data division module 902, for being divided the encryption data of the 3rd default system in units of presetting digit capacity For one or more first intermediate values;Presetting digit capacity be by the numerical value of the first of a byte the default system as second preset into The numerical value of system and be converted into the digit of ternary numerical value.
Here the encryption data that encryption data is obtained for the data encryption device in above-mentioned any embodiment.This First, second, third default system in embodiment be respectively with first in the data ciphering method of above-mentioned each embodiment, Second, third default system is corresponding.
Needed when being encrypted, therefore decrypted in units of byte due to being encrypted character during encryption with presetting digit capacity Encryption data is divided into one or more first intermediate values for unit.If encrypted character only accounts for a byte, phase The first intermediate value answered is one.Here presetting digit capacity is as the by the numerical value of the first of any one byte the default system After the numerical value of two default systems, the numerical value is converted into the digit of ternary numerical value.
First intermediate value conversion module 904, for the first intermediate value to be converted into the second of the second default system Between numerical value.
First intermediate value conversion module 904 can be used for the first intermediate value of the 3rd default system being converted into the Second intermediate value of two default systems, first the first intermediate value of the 3rd default system can also be converted into other arbitrarily to enter The second intermediate value of the second default system is then converted to after the numerical value of system.
Deciphering module 906, after using the second intermediate value as the numerical value of the first default system, according in default character library Second intermediate value is mapped as character by the mapping relations of numerical value and character, obtains the character of decryption;Wherein, the second default system Radix between the cardinal sum the 3rd of the first default system presets the radix of system.
Pre-set the mapping relations of numerical value and character in preset characters storehouse, it is default in preset characters storehouse to be mapped Numerical value can be the numerical value of the first default system, and such deciphering module 906 can be used for the mediant of the first default system directly Value is mapped as character.In preset characters storehouse the default numerical value being mapped can also right and wrong first preset the other of system and arbitrarily enter The numerical value of system, such deciphering module 906 can be used for first being converted into the intermediate value of the first default system in preset characters storehouse in advance If the numerical value being mapped system after, be mapped as character further according to the mapping relations of numerical value and character in preset characters storehouse.
Preset characters storehouse can be that ASCII coding schedules, extension ASCII coding schedules, Unicode coding schedules or UTF-8 are compiled Code table etc..The preset characters storehouse used in the present embodiment and the predetermined word used in the data ciphering method of above-mentioned each embodiment Fu Ku is identical.
The radix of second default system refers between the cardinal sum the 3rd of the first default system presets the radix of system The radix of second default system is more than the radix of the first default system, and the radix of the second default system is less than the 3rd default system Radix.The radix of one of system refers to for representing the mathematic sign that the system is used for representing all inequalities of numerical value Number.Second default system is preferably ternary, quinary, septenary or novenary etc., and these systems are not conventional systems, can To reduce the probability being cracked.
In one embodiment, if deciphering module 906 is additionally operable to encrypted character and only takes up a byte, according to default The mapping relations of numerical value and character in character library, the second intermediate value as the first default system is directly mapped as character;If It is encrypted character and takes multiple bytes, then the number that byte can be taken according to encrypted character will continuous multiple second intermediate value After combination, according to the mapping relations of numerical value and character in default character library using as multiple second intermediate values of the first default system Combinatorial mapping be character, obtain the character of decryption.
Above-mentioned data decryption apparatus, because the radix of the second default system is less than the radix of the 3rd default system, so add Shared memory space is few in itself for ciphertext data.And by the encryption data of the 3rd default system in units of presetting digit capacity it is pre- by the 3rd If the encryption data of system is divided into one or more first intermediate values, then by the first intermediate value be converted into second preset into Second intermediate value of system, it is ingenious then using second intermediate value as being mapped as character after the numerical value of the first default system Ground carries out system conversion using the inclusion relation of the mathematic sign between different systems, it is achieved thereby that efficiently to using above-mentioned The encryption data that data ciphering method obtains is decrypted so that encryption data can reduce.
As shown in Figure 10, in one embodiment, first preset into being made as binary system;Then deciphering module 906 includes:Obtain Module 906a, computing module 906b and decryption execution module 906c.
Acquisition module 906a, for obtaining and the isometric key binary string of the second intermediate value.
Second intermediate value is binary number, and key binary string refers to that being converted into two after key is split according to byte enters The numerical value of system.Key binary string and the second intermediate value are isometric, refer in the second intermediate value the number of mathematic sign and close The number of mathematic sign is equal in key binary string so that both can do XOR.Wherein key is the use set in advance In character or character string that XOR is carried out with the second intermediate value, key and key binary string respectively with above-mentioned each reality The key applied in the data ciphering method of example is consistent with key binary string.
In one embodiment, acquisition module 906a is additionally operable to obtain key, judges the length of encryption data and default position Several business whether with key shared by byte number it is equal, if then key is split by byte and is converted into binary key Binary string;If otherwise being intercepted key or circulation being compensated after being equal with above-mentioned business, key is split and is converted into by byte Binary key binary string.
In the present embodiment, byte shared by key should be equal with byte shared by encrypted character string, so just can guarantee that Two intermediate values, and after being split by byte by key and be converted into binary key binary string, each second mediant Value can carry out XOR with corresponding isometric key binary string, therefore acquisition module 906a is used to first judge encryption number According to length and presetting digit capacity business whether with key shared by byte number it is equal.
Specifically, if the business of the length of encryption data and presetting digit capacity is equal to the number of byte shared by key, mould is obtained Block 906a can be used for directly splitting key by byte and being converted into binary key binary string.If the length of encryption data It is more than the number of byte shared by key with the business of presetting digit capacity, then acquisition module 906a can be used for by way of circulating and compensating repairing Change key so that byte shared by being encrypted character string is equal to byte shared by key;Wherein circulation compensation refers in the front portion of key Or rear portion repeats a part for key itself or itself.If the length of encryption data and the business of presetting digit capacity are less than shared by key The number of byte, then acquisition module 906a can be used for according to encrypted characters string length intercept key partial character or character string As new key.
Computing module 906b, for entering the second intermediate value as the numerical value of the first default system with key binary string Row XOR, obtain operation result numerical value.
Computing module 906b is used for after second intermediate value is preset into the numerical value of system as first, will be preset as first Second intermediate value of system carries out XOR with key binary string, so as to obtain operation result numerical value.
In one embodiment, acquisition module 906a is additionally operable to according to the order phase with obtaining key binary string during encryption Anti- order obtains key binary string one by one, and computing module 906b is used for using acquired operation result numerical value as in second Between after numerical value, carry out XOR with key binary string using the second intermediate value as the numerical value of the first default system, obtain Operation result numerical value.So acquisition module 906a and computing module 906b alternating actions, to carry out the iteration of preset times, so as to Obtain final operation result numerical value.
Execution module 906c is decrypted, for according to the mapping relations of character and numerical value in preset characters storehouse, by operation result Numerical value is mapped as character, obtains the character of decryption.
After obtaining operation result numerical value, decryption execution module 906c is used for reflecting according to numerical value in preset characters storehouse and character Relation is penetrated, operation result numerical value is mapped as character, the final character for obtaining decryption.
Embodiment described above only expresses the several embodiments of the present invention, and its description is more specific and detailed, but simultaneously Therefore the limitation to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for one of ordinary skill in the art For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the guarantor of the present invention Protect scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (6)

1. a kind of data ciphering method, methods described include:
According to the mapping relations of character and numerical value in preset characters storehouse, it is pre- in units of byte character to be encrypted to be mapped as into first If the first numerical value of system;Described first presets into being made as binary system;
Obtain and the isometric key binary string of first numerical value;
XOR result value is obtained after first numerical value and the key binary string are carried out into XOR;
The XOR result value is converted using the XOR result value as the numerical value of the second default system For the second value of the 3rd default system, encryption data is obtained;
Wherein, the 3rd default system described in cardinal sum of the radix of the described second default system between the described first default system Between radix.
2. according to the method for claim 1, it is characterised in that the mapping of character and numerical value in the storehouse according to preset characters Relation, character to be encrypted is mapped as to the first numerical value of the first default system in units of byte, including:
According to the mapping relations of character and numerical value in preset characters storehouse, if the character to be encrypted reflects in the preset characters storehouse The more than one byte of numerical value penetrated, then the numerical value by the mapping split by byte, to obtain the of the first default system One numerical value.
A kind of 3. data decryption method, for the encryption number obtained to data ciphering method according to claim 1 or 2 According to being decrypted, the data decryption method includes:
The encryption data of the 3rd default system is divided into one or more first intermediate values in units of presetting digit capacity;It is described Presetting digit capacity is converted into ternary for the numerical value of the first of a byte the default system to be preset to the numerical value of system as second Numerical value digit;Described first presets into being made as binary system;
First intermediate value is converted into the second intermediate value of the second default system;
Obtain and the isometric key binary string of second intermediate value;
XOR is carried out with the key binary string using second intermediate value as the numerical value of the first default system, is obtained Obtain operation result numerical value;
According to the mapping relations of character and numerical value in preset characters storehouse, the operation result numerical value is mapped as character, solved Close character;
Wherein, the 3rd default system described in cardinal sum of the radix of the described second default system between the described first default system Between radix.
4. a kind of data encryption device, it is characterised in that described device includes mapping block and encrypting module;
The mapping block, will be to be added in units of byte for according to the mapping relations of character and numerical value in preset characters storehouse Close character is mapped as the first numerical value of the first default system;Described first presets into being made as binary system;
The encrypting module, for converting first numerical value using first numerical value as the numerical value of the second default system For the second value of the 3rd default system, encryption data is obtained;
Wherein, the 3rd default system described in cardinal sum of the radix of the described second default system between the described first default system Between radix;
The encrypting module includes:
Key binary string acquisition module, for obtaining and the isometric key binary string of first numerical value;
XOR module, for obtaining XOR fortune after first numerical value and the key binary string are carried out into XOR Calculate result value;
Encrypt execution module, for using the XOR result value as the numerical value of the second default system and by the XOR Operation result numerical value is converted into the second value of the 3rd default system, obtains encryption data.
5. device according to claim 4, it is characterised in that the mapping block is additionally operable to according to word in preset characters storehouse The mapping relations of symbol and numerical value, if the more than one byte of numerical value that the character to be encrypted maps in the preset characters storehouse, Then the numerical value by the mapping is split by byte, to obtain the first numerical value of the first default system.
A kind of 6. data decryption apparatus, for the encryption number obtained to the data encryption device according to claim 4 or 5 According to being decrypted, the data decryption apparatus includes:Encryption data division module, the first intermediate value conversion module and decryption mould Block;
The encryption data division module, for the encryption data of the 3rd default system to be divided into one in units of presetting digit capacity Individual or multiple first intermediate values;The presetting digit capacity be by the numerical value of the first of a byte the default system as second preset into The numerical value of system and be converted into the digit of ternary numerical value;Described first presets into being made as binary system;
The first intermediate value conversion module, for first intermediate value to be converted into the second of the second default system Between numerical value;
The deciphering module, after using second intermediate value as the numerical value of the first default system, according to default character library Second intermediate value is mapped as character by the mapping relations of middle numerical value and character, obtains the character of decryption;
Wherein, the 3rd default system described in cardinal sum of the radix of the described second default system between the described first default system Between radix;
The deciphering module includes:
Acquisition module, for obtaining and the isometric key binary string of second intermediate value;
Computing module, for entering second intermediate value as the numerical value of the first default system with the key binary string Row XOR, obtain operation result numerical value;
Execution module is decrypted, for according to the mapping relations of character and numerical value in preset characters storehouse, by the operation result numerical value Character is mapped as, obtains the character of decryption.
CN201410185427.3A 2014-05-04 2014-05-04 Data encryption, decryption method and device Active CN105099652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410185427.3A CN105099652B (en) 2014-05-04 2014-05-04 Data encryption, decryption method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410185427.3A CN105099652B (en) 2014-05-04 2014-05-04 Data encryption, decryption method and device

Publications (2)

Publication Number Publication Date
CN105099652A CN105099652A (en) 2015-11-25
CN105099652B true CN105099652B (en) 2018-01-16

Family

ID=54579298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410185427.3A Active CN105099652B (en) 2014-05-04 2014-05-04 Data encryption, decryption method and device

Country Status (1)

Country Link
CN (1) CN105099652B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105406960B (en) * 2015-12-20 2019-02-22 河南思维自动化设备股份有限公司 A kind of method of information encryption and decryption
CN108155985A (en) * 2017-06-29 2018-06-12 广东网金云计算有限公司 A kind of encipher-decipher method, device and user terminal
CN107832623B (en) * 2017-10-13 2020-05-08 微梦创科网络科技(中国)有限公司 Method and system for encrypting and decrypting coordinate track
CN109308420B (en) * 2018-08-22 2023-04-07 平安科技(深圳)有限公司 Data encryption method, terminal equipment and computer readable storage medium
CN110138750A (en) * 2019-04-23 2019-08-16 上海数据交易中心有限公司 Encryption method, apparatus and system, storage medium, the terminal of configuration file
CN113569534A (en) * 2020-04-29 2021-10-29 杭州海康威视数字技术股份有限公司 Method and device for detecting messy codes in document
CN111797416B (en) * 2020-07-02 2023-08-18 中国工商银行股份有限公司 Method and device for processing encrypted data
CN111740830B (en) * 2020-08-12 2020-12-11 科大讯飞(苏州)科技有限公司 Information encryption and decryption method and device, information processing equipment and storage medium
CN113076554B (en) * 2021-03-12 2022-10-11 广西东信易联科技有限公司 Physical examination data safe storage method based on block chain
CN113660253A (en) * 2021-08-12 2021-11-16 上海酷栈科技有限公司 Terminal controller, method and system based on remote desktop protocol
CN115795520B (en) * 2023-02-07 2023-04-21 济南霍兹信息科技有限公司 Data management method for computer system
CN118133323A (en) * 2024-05-06 2024-06-04 成都赛力斯科技有限公司 Data processing method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1301002A (en) * 2000-12-12 2001-06-27 尹国兴 Encoding of natural things, conversion between any two digital systems, and their application
CN1786900A (en) * 2005-10-28 2006-06-14 清华大学 Multiplier based on improved Montgomey's algorithm
CN101996298A (en) * 2009-08-14 2011-03-30 鸿富锦精密工业(深圳)有限公司 Encrypting method and decrypting method corresponding to same
CN103684760A (en) * 2012-09-24 2014-03-26 腾讯科技(深圳)有限公司 Method, device and system for encryption and decryption of communication

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060177065A1 (en) * 2005-02-09 2006-08-10 Wal-Mart Stores, Inc. System and methods for encrypting data utilizing one-time pad key

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1301002A (en) * 2000-12-12 2001-06-27 尹国兴 Encoding of natural things, conversion between any two digital systems, and their application
CN1786900A (en) * 2005-10-28 2006-06-14 清华大学 Multiplier based on improved Montgomey's algorithm
CN101996298A (en) * 2009-08-14 2011-03-30 鸿富锦精密工业(深圳)有限公司 Encrypting method and decrypting method corresponding to same
CN103684760A (en) * 2012-09-24 2014-03-26 腾讯科技(深圳)有限公司 Method, device and system for encryption and decryption of communication

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《加密式单项数据压缩发》;戴振喜;《大众科技》;20101104(第4期);全文 *

Also Published As

Publication number Publication date
CN105099652A (en) 2015-11-25

Similar Documents

Publication Publication Date Title
CN105099652B (en) Data encryption, decryption method and device
CN107609418A (en) Desensitization method, device, storage device and the computer equipment of text data
US8345876B1 (en) Encryption/decryption system and method
CN103345609B (en) A kind of text encipher-decipher method and encryption and decryption equipment
US20080165965A1 (en) Method of two strings private key (symmetric) encryption and decryption algorithm
CN102546181A (en) Cloud storage encrypting and deciphering method based on secret key pool
CN106599723A (en) File encryption method and device, and file decryption method and device
CN110505054B (en) Data processing method, device and equipment based on dynamic white box
CN107491317A (en) A kind of symmetrical encryption and decryption method and systems of AES for accelerating platform based on isomery
CN110312054B (en) Image encryption and decryption method, related device and storage medium
CN109861810A (en) A kind of data ciphering method and decryption method based on chaos Tuber yield
CN104732159A (en) File processing method and file processing device
CN106131049A (en) A kind of method of data transmission encryption and decryption
CN102456108B (en) Encryption method for ibus pinyin code table
CN103942500B (en) Hash ciphertext re-encryption method based on noise and decryption method after re-encryption
CN105184181A (en) File encryption method, file decryption method and file encryption device
CN110704854A (en) Stream type encryption method aiming at text data reserved format
CN104518865A (en) Data encryption method based on password book
CN105281898A (en) Apparatus and method for generating key
CN106357608A (en) Method for encrypting and decrypting private data for personal healthcare data
CN102222188A (en) Information system user password generation method
CN103326851B (en) SCM Based a kind of compass encrypting and decrypting method
Haryannto et al. Implementation of nihilist cipher algorithm in securing text data with Md5 verification
Veeraragavan et al. Enhanced encryption algorithm (EEA) for protecting users' credentials in public cloud
Torvi et al. An unique data security using text steganography

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant