CN110474876A - A kind of data encoding coding/decoding method, device, equipment and storage medium - Google Patents
A kind of data encoding coding/decoding method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN110474876A CN110474876A CN201910637078.7A CN201910637078A CN110474876A CN 110474876 A CN110474876 A CN 110474876A CN 201910637078 A CN201910637078 A CN 201910637078A CN 110474876 A CN110474876 A CN 110474876A
- Authority
- CN
- China
- Prior art keywords
- ciphertext
- plaintext
- key
- symbol
- probability
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
The invention discloses a kind of data encoding coding/decoding method, device, equipment and storage mediums.Data-encoding scheme includes: to pre-process first to plaintext to be encoded, secondly generates key according to the pseudo random parameters in plaintext to be encoded, then carries out Entropy Encoding and Encryption, and last assembly user password generates formal ciphertext.Data decoding method includes: that formal ciphertext is decomposed into user password segmentation and the segmentation of pre- ciphertext, is decoded first to user password segmentation;Secondly it obtains key and parses pseudo random parameters, progress entropy decoding is segmented to pre- ciphertext by pseudo random parameters and obtains pre- plaintext, is finally reduced into pre- plaintext in plain text.Data encoding coding method provided by the invention improves the safety and application range of formal ciphertext, and so that formal ciphertext is had compressed capability while improving the safety of formal ciphertext.
Description
Technical field
The present invention relates to data communication technology field, in particular to a kind of data encoding coding/decoding method, device, equipment and
Storage medium.
Background technique
With universal and Internet of Things the large-scale application of mobile Internet, e-commerce has been come into huge numbers of families, though
Right e-commerce is that public life is provided convenience, but e-commerce also faces communication data safety, individual privacy
The safety problem urgently to be resolved such as protection and safety of payment guarantee.Especially current encryption and decryption technology also faces easy quilt
Crack and do not have the problem of compressed capability.
Summary of the invention
It is an object of the invention at least solve one of the technical problems existing in the prior art, a kind of data volume is provided
Code coding/decoding method, device, equipment and storage medium, improve the safety and application range of ciphertext, while also making close
Stationery has compressed capability.
The first aspect of the present invention provides a kind of data-encoding scheme, comprising the following steps:
Plaintext to be encoded is obtained, increasing at least behind 1 bit symbol in the plaintext to be encoded per continuous S
10 bit symbol, obtains pre- plaintext, and the S is positive integer;
The probability P 0 of the 0 bit symbol in the plaintext to be encoded and the probability P 1 of 1 bit symbol are obtained, according to described
P0, P1 and S calculate code coefficient W, and a random coefficient W1 is chosen in the section less than the W and greater than 0;
Key K is generated according to described P0, P1, S and W1;
Entropy coding is carried out to the pre- plaintext and the key K, obtains pre- ciphertext;
The pre- ciphertext and encrypted user password are subjected to assembly, obtain formal ciphertext, coding is completed.
A kind of data-encoding scheme according to a first aspect of the present invention, it is described to obtain in the plaintext to be encoded
The probability P 0 of 0 bit symbol and the probability P 1 of 1 bit symbol include: to set 0 bit symbol at random in the section greater than 0 less than 1
Probability P 0, while the sum of the probability P 0 of the bit of probability P 1 and 0 symbol of 1 bit symbol is 1.
A kind of data-encoding scheme according to a first aspect of the present invention, it is described to be calculated according to described P0, P1 and S
Code coefficient W is specifically satisfied the following conditional expression:
W(P0)+W2(P0)(P1)+…+WS(P0)(P1)(S-1)+W(S+1)(P0)(P1)s≤ 1.
A kind of data-encoding scheme, the encrypted user password specifically wrap according to a first aspect of the present invention
It includes: md5 coding is carried out to the user password.
A kind of data-encoding scheme, the entropy coding specifically include adaptive section according to a first aspect of the present invention
Coding and static Interval Coding, the key K matches with the entropy coding to be specifically included: if only including in the key K
When S and W1, then adaptive Interval Coding is carried out to the pre- plaintext and the key K;If including in the key K
When described P0, P1, S and W1, then static Interval Coding is carried out to the pre- plaintext and the key K.
The second aspect of the present invention provides a kind of data decoding method, comprising the following steps:
Formal ciphertext is decomposed into user password segmentation and the segmentation of pre- ciphertext;
User password segmentation is decoded;
Key K is obtained, and parses probability P 0, the probability P 1 of 1 bit symbol, continuous 1 of 0 bit symbol from the key K
The maximum quantity S and random coefficient W1 of bit symbol;
Entropy decoding is carried out to the pre- ciphertext segmentation according to described P0, P1, S and W1, obtains pre- plaintext;
Increased 0 bit symbol behind every continuous S 1 bits symbol is deleted, obtains in plain text, decoding and completing.
The third aspect of the present invention provides a kind of data coding device, comprising: pretreatment unit, Key generating unit,
Entropy code unit and assembled rigid unit;
Per continuous S 1 ratio of the pretreatment unit for obtaining plaintext to be encoded, in the plaintext to be encoded
Increase by 0 bit of at least one symbol behind spy's symbol, obtain pre- plaintext, the S is positive integer;
The Key generating unit is used to obtain the probability P 0 and 1 bit of the 0 bit symbol in the plaintext to be encoded
The probability P 1 of symbol calculates code coefficient W according to described P0, P1 and S, be less than in W and section greater than 0 choose one with
Machine coefficient W1;
The Key generating unit is also used to generate key K according to described P0, P1, S and W1;
The entropy code unit is used to carry out entropy coding to the pre- plaintext and the key K, obtains pre- ciphertext;
The assembled rigid unit is used to the pre- ciphertext and encrypted user password carrying out assembly, obtains formal ciphertext.
The fourth aspect of the present invention provides a kind of data deciphering device, comprising: the first resolution unit, the second parsing are single
Member, entropy decoding unit and third resolution unit;
First resolution unit is used to for formal ciphertext to be decomposed into user password segmentation and pre- ciphertext is segmented;
Second resolution unit is used to be decoded user password segmentation;
Second resolution unit is also used to obtain key K, and parse from the key K 0 bit symbol probability P 0,
The maximum quantity S and random coefficient W1 that the probability P 1 of 1 bit symbol, continuous 1 bit accord with;
The entropy decoding unit is used to carry out entropy decoding to the pre- ciphertext segmentation according to described P0, P1, S and W1, obtains
To pre- plaintext;
The third resolution unit is accorded with for deleting increased 0 bit behind every continuous S 1 bits symbol, is obtained in plain text,
Decoding is completed.
The fifth aspect of the present invention, provides a kind of data encoding decoding device, including at least one control processor and
Memory for being communicated to connect at least one described control processor;The memory be stored with can by it is described at least one
The instruction that control processor executes, described instruction are executed by least one described control processor, so that at least one described control
Processor processed is able to carry out a kind of data-encoding scheme as described in the first aspect of the invention and/or executes such as second party of the present invention
A kind of data decoding method described in face,
The sixth aspect of the present invention provides a kind of computer readable storage medium, the computer readable storage medium
Computer executable instructions are stored with, the computer executable instructions are for executing computer such as first aspect present invention institute
A kind of data-encoding scheme stated and/or execute a kind of data decoding method as described in respect of the second aspect of the invention.
The present invention provides a kind of data encoding coding/decoding method, device, equipment and storage mediums, and at least have has as follows
Beneficial effect:
(1) the key K in method is accorded with maximum by continuous 1 bit in 0 bit symbol probability P 0,1 bit symbol probability P 1, pre- plaintext
Four pseudo random parameters such as quantity S and the random coefficient W1 in 0 to the section code coefficient W generate, safety with higher
Property;
(2) entropy coding is carried out to pretreated plaintext and key K, so that pre- ciphertext has compressed capability;While by
There is dependence in entropy coding itself, so that pre- ciphertext can not be cracked by force by segmentation, improve the security performance of pre- ciphertext;
(3) pre- ciphertext and encrypted user password are subjected to assembly, realize dual key mechanism, improves formal ciphertext
Safety also improves the application range of formal ciphertext simultaneously.
In conclusion the random preprocess method of probability interference coefficient combined data for 0, the 1 bit symbol that the present invention uses is raw
It is assembled in conjunction with entropy coding and dual key at key K, have the formal ciphertext generated also while there is safety encryption
There is compressed capability.
Detailed description of the invention
The present invention is further explained with reference to the accompanying drawings and examples;
Fig. 1 is a kind of flow diagram for data-encoding scheme that first embodiment of the invention provides;
Fig. 2 is a kind of flow diagram for data decoding method that second embodiment of the invention provides;
Fig. 3 is a kind of structural schematic diagram for data coding device that third embodiment of the invention provides;
Fig. 4 is a kind of structural schematic diagram for data deciphering device that fourth embodiment of the invention provides;
Fig. 5 is a kind of structural schematic diagram for data encoding decoding device that fifth embodiment of the invention provides.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not
For limiting the present invention.
It should be noted that each feature in the embodiment of the present invention can be combined with each other, in this hair if do not conflicted
Within bright protection scope.In addition, though having carried out functional module division in schematic device, shows patrol in flow charts
Sequence is collected, but in some cases, it can be shown in the sequence execution in the module division being different from device or flow chart
The step of out or describing.
Referring to Fig.1, the first embodiment of the present invention provides a kind of data-encoding scheme, comprising the following steps:
S101, plaintext to be encoded is obtained, increases by 1 behind 1 bit symbol per continuous S in plaintext to be encoded
0 bit symbol, obtains pre- plaintext;
S102, the probability P 1 for obtaining probability P 0 and 1 bit symbol that 0 bit in plaintext to be encoded accords with, according to P0, P1
And S calculates code coefficient W, and a random coefficient W1 is chosen in the section less than W and greater than 0;
S103, key K is generated according to P0, P1, S and W1;
S104, entropy coding is carried out to pre- plaintext and key K, obtains pre- ciphertext;
S105, the segmentation of pre- ciphertext and the segmentation of user password md5 value are subjected to assembly, obtain formal ciphertext, coding is completed.
In the present embodiment, plaintext to be encoded, pre- plaintext, pre- ciphertext and formal ciphertext are string of binary characters;
In step s101, plaintext to be encoded is string of binary characters in the art, is first located in advance to plaintext to be encoded
Reason increases by 10 bit symbol per continuous S in plaintext to be encoded behind 1 bit symbol, S is integer value and integer value
Greater than 1.It is such to be advantageous in that, upon decoding, when there is maximum continuous 1 bit symbol not equal to S, code error.Certain
2 can also be increased behind 1 bit symbol per continuous S in plaintext to be encoded with last 0 bit symbol, preferably increase by 1
It is a.
In step S102 and S103, there is two kinds of situations, the first situation: 0 in plaintext to be encoded first at this time
Bit symbol and 1 bit symbol can count, therefore 0 bit symbol probability P 0 and 1 bit symbol probability P 1 are also it can be calculated that secondly
Code coefficient W is calculated according to P0, P1, S, specific formula for calculation is as follows:
W(P0)+W2(P0)(P1)+…+WS(P0)(P1)(S-1)+W(S+1)(P0)(P1)s≤ 1
Acquire the max-thresholds W of code coefficient Wmax, then (0, Wmax) section in obtain a random coefficient W1, most
Key K is generated according to P0, P1, S and W1 afterwards;There are in key K two pseudo random parameters of S and W1 at this time, can be improved volume
The safety of code.Second situation, setting P0 and P1 value meets simultaneously so that P0 meets in the section of (0,1) at random first
Secondly P1+P0=1 calculates code coefficient W according to P0, P1, S, according to the following formula
W(P0)+W2(P0)(P1)+…+WS(P0)(P1)(S-1)+W(S+1)(P0)(P1)s≤ 1
Acquire the max-thresholds W of code coefficient Wmax, then (0, Wmax) section in obtain a random coefficient W1, most
Key K is generated according to P0, P1, S and W1 afterwards;There are in key K tetra- pseudo random parameters of P0, P1, S and W1 at this time, it can
Improve the safety of coding.The difficulty that cracks of the preferred second situation of the present embodiment, four pseudo random parameters is much larger than two puppets
Random parameter cracks difficulty, it is to be understood that P0 is in section (0,1) inner take at random a floating-point values, and W1 is also
In section (0, Wmax) inner take at random floating-point values.
In step S104, in order to make ciphertext that there is compressed capability, entropy coding is carried out to pre- plaintext and key K, at this
In field, entropy coding includes Shannon coding, Huffman encoding and Interval Coding, and entropy coding is the section used in the present embodiment
Coding, to obtain pre- ciphertext;
In step s105, in order to improve the security capabilities of coding, by the segmentation of pre- ciphertext and user password md5 value be segmented into
Row is assembled, obtains formal ciphertext, and coding is completed.In the present embodiment, being added to the segmentation of user password md5 value can be improved encryption
Safety, of course, assembled process, there are two types of mode, first way is pre- ciphertext segmentation in preceding, user password md5 value
It is segmented posterior erection method, the second way is pre- ciphertext segmentation rear, and encrypted user password md5 value segmentation is preceding
Erection method, the preferred first way of the present embodiment.
The present embodiment can obtain following the utility model has the advantages that (1) key K accords with probability P 0 by 0 bit, 1 bit accords with probability P 1, pre-
Continuous four pseudorandom ginsengs of 1 bit symbol maximum quantity S and the random coefficient W1 in 0 to the section code coefficient W etc. in plaintext
Number generates, safety with higher;(2) entropy coding is carried out to pretreated plaintext and key K, so that pre- ciphertext has
Compressed capability;Simultaneously because entropy coding itself has dependence, so that pre- ciphertext can not be cracked by force by segmentation, improve pre-
The security performance of ciphertext;(3) segmentation of pre- ciphertext and the segmentation of user password md5 value are subjected to assembly, realize double key encryption mechanism,
It improves the safety of formal ciphertext while also improving the application range of formal ciphertext.
Further, in the present embodiment, what the probability P 0 and 1 bit for obtaining the 0 bit symbol in plaintext to be encoded accorded with
Probability P 1 include: less than 1 with greater than 0 section in set at random 0 bit symbol probability P 0, while 1 bit symbol probability P 1
The sum of probability P 0 accorded with 0 bit is 1.There are in key K four pseudo random parameters such as P0, P1, S and W1 at this time, increase broken
The difficulty of solution, to improve the safety of coding.
Further, in the present embodiment, code coefficient W is calculated according to P0, P1 and S and specifically meets following formula:
W(P0)+W2(P0)(P1)+…+WS(P0)(P1)(S-1)+W(S+1)(P0)(P1)s≤ 1
Further, in the present embodiment, encrypted user password specifically includes: carrying out md5 coding to user password.When
Right, other algorithm for encryption, such as RSA Algorithm etc. can be used in user password, and the present invention preferably carries out md5 volume to user password
Code, when being decoded to the formal ciphertext being assembled into, it is necessary to using the password set certainly to key K and user, greatly
Improve and crack difficulty.
Further, in the present embodiment, entropy coding specifically includes adaptive Interval Coding and static Interval Coding, key
K matches with entropy coding to be specifically included: if in key K only include S and W1, being carried out to pre- plaintext and key K adaptive
Answer Interval Coding;If include P0, P1, S and W1 in key K, static Interval Coding is carried out to pre- plaintext and key K.
Referring to Fig. 2, the second embodiment of the present invention provides a kind of data decoding method, comprising the following steps:
S201, formal ciphertext is decomposed into the segmentation of user password md5 value and the segmentation of pre- ciphertext;
S202, clear crytpographic key is obtained, calculates clear crytpographic key md5 value, clear crytpographic key md5 value and the user after decomposing is close
Code md5 value segmentation is matched, if successful match, goes to step S203;If matching is unsuccessful, failure is decoded;
S203, key K is obtained, and parses P0, P1, S and W1 from key K;
S204, progress entropy decoding is segmented to pre- ciphertext according to P0, P1, S and W1, obtains pre- plaintext;
S205, increased 0 bit symbol behind every continuous S 1 bits symbol is deleted, obtains in plain text, decoding and completing.
Wherein, it is to connect in pre- plaintext that P0, which is probability, S that probability, the P1 of the 1 bit symbol in plaintext are 0 bit symbol in plaintext,
Maximum quantity, the W1 of continuous 1 bit symbol are the random coefficient chosen in the section less than code coefficient W and greater than 0, code coefficient
W is generated by P0, P1 and S.In the present embodiment, since in decoding, the segmentation of user password md5 value and the segmentation of pre- ciphertext are equal
It needs to be decoded, therefore, in step S202 in the present embodiment, first the segmentation of user password md5 value is decoded, first
The clear crytpographic key of user's input is obtained, next calculates clear crytpographic key md5 value, then will calculate clear crytpographic key md5 value and divide
User password md5 value segmentation after solution is matched, and is finally obtained matching result, if successful match, is gone to step S203;If
Match it is unsuccessful, then prompt decoding fail;In step S203, key K is obtained, the key K of the present embodiment can be with third party's canal
Road obtains, consistent with cataloged procedure, it is to be understood that since the present embodiment and the first embodiment of the present invention match, solution
Code process is also the inverse process of cataloged procedure, therefore the beneficial effect of the present embodiment acquirement is also to match with first embodiment
, therefore be not described further in detail.
Referring to Fig. 3, the third embodiment of the present invention provides a kind of data coding device, comprising: pretreatment unit 101,
Key generating unit 102, entropy code unit 103 and assembled rigid unit 104;
Per continuous S 1 bit symbol of the pretreatment unit 101 for obtaining plaintext to be encoded, in plaintext to be encoded
Behind increase by 0 bit of at least one symbol, obtain pre- plaintext, S is positive integer;
Probability P 0 and 1 bit of the Key generating unit 102 for obtaining the symbol of 0 bit in plaintext to be encoded accord with general
Rate P1 calculates code coefficient W according to P0, P1 and S, and a random coefficient W1 is chosen in the section less than W and greater than 0;
Key generating unit 102 is also used to generate key K according to P0, P1, S and W1;
Entropy code unit 103 is used to carry out entropy coding to pre- plaintext and key K, obtains pre- ciphertext;
Assembled rigid unit 104 is used to pre- ciphertext and encrypted user password carrying out assembly, obtains formal ciphertext.
Referring to Fig. 4, the fourth embodiment of the present invention provides a kind of data deciphering device, comprising: the first resolution unit
201, the second resolution unit 202, entropy decoding unit 203 and third resolution unit 204;
First resolution unit 201 is used to for formal ciphertext to be decomposed into user password segmentation and pre- ciphertext is segmented;
Second resolution unit 202 is used to be decoded user password segmentation;
Second resolution unit 202 is also used to obtain key K, and probability P 0,1 bit of 0 bit symbol are parsed from key K
The maximum quantity S and random coefficient W1 of the probability P 1 of symbol, continuous 1 bit symbol;
Entropy decoding unit 203, which is used to be segmented pre- ciphertext according to P0, P1, S and W1, carries out entropy decoding, obtains pre- plaintext;
Third resolution unit 204 is accorded with for deleting increased 0 bit behind every continuous S 1 bits symbol, is obtained in plain text,
Decoding is completed.
Referring to Fig. 5, the fifth embodiment of the present invention provides a kind of data encoding decoding device, including at least one control
Processor processed and memory for being communicated to connect at least one control processor;Memory, which is stored with, to be controlled by least one
The instruction that processor processed executes, instruction is executed by least one control processor, so that at least one control processor can be held
A kind of row such as data-encoding scheme of first embodiment of the invention and/or execute a kind of data solution such as second embodiment of the invention
Code method, for example, executing the method and step S101 to S105 in Fig. 1 described above, the method and step S201 in Fig. 2 is extremely
S205。
Further, the sixth embodiment of the present invention provides a kind of computer readable storage medium, computer-readable storage
Media storage has computer executable instructions, and computer executable instructions are for making computer execute such as first embodiment of the invention
A kind of data-encoding scheme and/or execute a kind of data decoding method such as second embodiment of the invention, for example, more than executing
Method and step S201 to S205 in method and step S101 to S105 in Fig. 1 of description, Fig. 2.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can borrow
Help software that the mode of general hardware platform is added to realize.It will be appreciated by those skilled in the art that realizing in above-described embodiment method
All or part of the process is relevant hardware can be instructed to complete by computer program, program can be stored in a calculating
In machine read/write memory medium, the program is when being executed, it may include such as the process of the embodiment of the above method.Wherein, storage
Medium can be magnetic disk, CD, read-only memory (Read Only Memory, ROM) or random access memory (Random
Access Memory, RAM) etc..
It is to be illustrated to preferable implementation of the invention, but the invention is not limited to above-mentioned embodiment party above
Formula, those skilled in the art can also make various equivalent variations on the premise of without prejudice to spirit of the invention or replace
It changes, these equivalent deformations or replacement are all included in the scope defined by the claims of the present application.
Claims (10)
1. a kind of data-encoding scheme, which comprises the following steps:
Plaintext to be encoded is obtained, increases at least one 0 behind 1 bit symbol per continuous S in the plaintext to be encoded
Bit symbol, obtains pre- plaintext, and the S is positive integer;
The probability P 0 of the 0 bit symbol in the plaintext to be encoded and the probability P 1 of 1 bit symbol are obtained, according to described P0, P1
And S calculates code coefficient W, and a random coefficient W1 is chosen in the section less than the W and greater than 0;
Key K is generated according to described P0, P1, S and W1;
Entropy coding is carried out to the pre- plaintext and the key K, obtains pre- ciphertext;
The pre- ciphertext and encrypted user password are subjected to assembly, obtain formal ciphertext, coding is completed.
2. a kind of data-encoding scheme according to claim 1, which is characterized in that described to obtain the plaintext to be encoded
In 0 bit symbol probability P 0 and 1 bit symbol probability P 1 include: less than 1 with greater than 0 section in setting 0 ratio at random
The probability P 0 of spy's symbol, while the sum of the probability P 0 of the bit of probability P 1 and 0 symbol of 1 bit symbol is 1.
3. a kind of data-encoding scheme according to claim 1, it is characterised in that: described to be counted according to described P0, P1 and S
Code coefficient W is calculated specifically to satisfy the following conditional expression:
W(P0)+W2(P0)(P1)+…+WS(P0)(P1)(S-1)+W(S+1)(P0)(P1)s≤ 1.
4. a kind of data-encoding scheme according to claim 1, which is characterized in that the encrypted user password is specific
It include: that md5 coding is carried out to user password.
5. a kind of data-encoding scheme according to claim 1, which is characterized in that the entropy coding specifically includes adaptively
Interval Coding and static Interval Coding, the key K matches with the entropy coding to be specifically included: if in the key K only
When comprising S and W1, then adaptive Interval Coding is carried out to the pre- plaintext and the key K;If in the key K
When including described P0, P1, S and W1, then static Interval Coding is carried out to the pre- plaintext and the key K.
6. a kind of data decoding method, which comprises the following steps:
Formal ciphertext is decomposed into user password segmentation and the segmentation of pre- ciphertext;
User password segmentation is decoded;
Key K is obtained, and parses the probability P 0 of 0 bit symbol, the probability P 1 of 1 bit symbol, continuous 1 bit from the key K
The maximum quantity S and random coefficient W1 of symbol;
Entropy decoding is carried out to the pre- ciphertext segmentation according to described P0, P1, S and W1, obtains pre- plaintext;
Increased 0 bit symbol behind every continuous S 1 bits symbol is deleted, obtains in plain text, decoding and completing.
7. a kind of data coding device characterized by comprising pretreatment unit, Key generating unit, entropy code unit and
Assembled rigid unit;
Per continuous S 1 bit symbol of the pretreatment unit for obtaining plaintext to be encoded, in the plaintext to be encoded
Behind increase by 0 bit of at least one symbol, obtain pre- plaintext, the S is positive integer;
Probability P 0 and 1 bit of the Key generating unit for obtaining the symbol of 0 bit in the plaintext to be encoded accord with
Probability P 1 calculates code coefficient W according to described P0, P1 and S, and a random system is chosen in the section less than W and greater than 0
Number W1;
The Key generating unit is also used to generate key K according to described P0, P1, S and W1;
The entropy code unit is used to carry out entropy coding to the pre- plaintext and the key K, obtains pre- ciphertext;
The assembled rigid unit is used to the pre- ciphertext and encrypted user password carrying out assembly, obtains formal ciphertext.
8. a kind of data deciphering device characterized by comprising the first resolution unit, the second resolution unit, entropy decoding unit with
And third resolution unit;
First resolution unit is used to for formal ciphertext to be decomposed into user password segmentation and pre- ciphertext is segmented;
Second resolution unit is used to be decoded user password segmentation;
Second resolution unit is also used to obtain key K, and the ratio of probability P 0,1 of 0 bit symbol is parsed from the key K
The maximum quantity S and random coefficient W1 that the probability P 1 of spy's symbol, continuous 1 bit accord with;
The entropy decoding unit is used to carry out entropy decoding to the pre- ciphertext segmentation according to described P0, P1, S and W1, obtains pre-
In plain text;
The third resolution unit obtains in plain text, decoding for deleting increased 0 bit symbol behind every continuous S 1 bits symbol
It completes.
9. a kind of data encoding decoding device, it is characterised in that: including at least one control processor and for it is described at least
The memory of one control processor communication connection;The memory, which is stored with, to be executed by least one described control processor
Instruction, described instruction is executed by least one described control processor, so that at least one described control processor can be held
A kind of row data-encoding scheme as described in any one in claim 1-5 and/or a kind of data decoding side as claimed in claim 6
Method.
10. a kind of computer readable storage medium, it is characterised in that: the computer-readable recording medium storage has computer can
It executes instruction, the computer executable instructions are for making computer execute a kind of number as described in any one in claim 1-5
According to coding method and/or a kind of data decoding method as claimed in claim 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910637078.7A CN110474876B (en) | 2019-07-15 | 2019-07-15 | Data encoding and decoding method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910637078.7A CN110474876B (en) | 2019-07-15 | 2019-07-15 | Data encoding and decoding method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110474876A true CN110474876A (en) | 2019-11-19 |
CN110474876B CN110474876B (en) | 2020-10-16 |
Family
ID=68508617
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910637078.7A Active CN110474876B (en) | 2019-07-15 | 2019-07-15 | Data encoding and decoding method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110474876B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111327641A (en) * | 2020-03-24 | 2020-06-23 | 湖南瑞利德信息科技有限公司 | Linear segmented symmetric encryption coding and decoding method |
WO2021164064A1 (en) * | 2020-02-20 | 2021-08-26 | 湖南遥昇通信技术有限公司 | Method and device for channel coding and error correction decoding, and storage medium |
CN114938271A (en) * | 2022-04-29 | 2022-08-23 | 浙江工业大学 | One-time pad method based on state machine |
CN118574116A (en) * | 2024-07-30 | 2024-08-30 | 深圳中网讯通技术有限公司 | Short message encryption processing method and system based on information security |
CN114938271B (en) * | 2022-04-29 | 2024-10-25 | 浙江工业大学 | One-time pad method based on state machine |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101895389A (en) * | 2010-07-16 | 2010-11-24 | 黑龙江大学 | Methods for encrypting and decrypting combined coding based file by adopting proportion calculation |
CN102904717A (en) * | 2012-10-13 | 2013-01-30 | 华南理工大学 | Chaos synchronization encrypting/decrypting method and device using data compression encoding |
CN103428502A (en) * | 2013-09-08 | 2013-12-04 | 上海高清数字科技产业有限公司 | Decoding method and decoding system |
CN103746770A (en) * | 2013-12-20 | 2014-04-23 | 浙江工业大学 | Message authentication code and probability secret key distribution mechanism-based anti-pollution network coding method |
CN103797803A (en) * | 2011-06-28 | 2014-05-14 | 三星电子株式会社 | Method and apparatus for entropy encoding/decoding |
CN107113445A (en) * | 2014-11-04 | 2017-08-29 | 三星电子株式会社 | Probability updating method for binary arithmetic coding/decoding and the entropy coding/decoding device using this method |
US20170272100A1 (en) * | 2016-03-15 | 2017-09-21 | Cloud Crowding Corp. | Distributed Storage System Data Management And Security |
US20190034085A1 (en) * | 2010-08-02 | 2019-01-31 | International Business Machines Corporation | Determining whether to compress a data segment in a dispersed storage network |
CN109450596A (en) * | 2018-11-12 | 2019-03-08 | 湖南瑞利德信息科技有限公司 | Coding method, coding/decoding method, encoding device, decoding device, storage medium and terminal |
CN109474281A (en) * | 2018-09-30 | 2019-03-15 | 湖南瑞利德信息科技有限公司 | Data encoding, coding/decoding method and device |
US20190191230A1 (en) * | 2012-06-26 | 2019-06-20 | BTS Software Solutions, LLC | Realtime telemetry data compression system |
-
2019
- 2019-07-15 CN CN201910637078.7A patent/CN110474876B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101895389A (en) * | 2010-07-16 | 2010-11-24 | 黑龙江大学 | Methods for encrypting and decrypting combined coding based file by adopting proportion calculation |
US20190034085A1 (en) * | 2010-08-02 | 2019-01-31 | International Business Machines Corporation | Determining whether to compress a data segment in a dispersed storage network |
CN103797803A (en) * | 2011-06-28 | 2014-05-14 | 三星电子株式会社 | Method and apparatus for entropy encoding/decoding |
US20190191230A1 (en) * | 2012-06-26 | 2019-06-20 | BTS Software Solutions, LLC | Realtime telemetry data compression system |
CN102904717A (en) * | 2012-10-13 | 2013-01-30 | 华南理工大学 | Chaos synchronization encrypting/decrypting method and device using data compression encoding |
CN103428502A (en) * | 2013-09-08 | 2013-12-04 | 上海高清数字科技产业有限公司 | Decoding method and decoding system |
CN103746770A (en) * | 2013-12-20 | 2014-04-23 | 浙江工业大学 | Message authentication code and probability secret key distribution mechanism-based anti-pollution network coding method |
CN107113445A (en) * | 2014-11-04 | 2017-08-29 | 三星电子株式会社 | Probability updating method for binary arithmetic coding/decoding and the entropy coding/decoding device using this method |
US20170272100A1 (en) * | 2016-03-15 | 2017-09-21 | Cloud Crowding Corp. | Distributed Storage System Data Management And Security |
CN109474281A (en) * | 2018-09-30 | 2019-03-15 | 湖南瑞利德信息科技有限公司 | Data encoding, coding/decoding method and device |
CN109450596A (en) * | 2018-11-12 | 2019-03-08 | 湖南瑞利德信息科技有限公司 | Coding method, coding/decoding method, encoding device, decoding device, storage medium and terminal |
Non-Patent Citations (1)
Title |
---|
徐士麟,喻莉 等: "基于概率更新机制的自适应混合熵编码", 《通信学报》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021164064A1 (en) * | 2020-02-20 | 2021-08-26 | 湖南遥昇通信技术有限公司 | Method and device for channel coding and error correction decoding, and storage medium |
CN111327641A (en) * | 2020-03-24 | 2020-06-23 | 湖南瑞利德信息科技有限公司 | Linear segmented symmetric encryption coding and decoding method |
CN114938271A (en) * | 2022-04-29 | 2022-08-23 | 浙江工业大学 | One-time pad method based on state machine |
CN114938271B (en) * | 2022-04-29 | 2024-10-25 | 浙江工业大学 | One-time pad method based on state machine |
CN118574116A (en) * | 2024-07-30 | 2024-08-30 | 深圳中网讯通技术有限公司 | Short message encryption processing method and system based on information security |
Also Published As
Publication number | Publication date |
---|---|
CN110474876B (en) | 2020-10-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019153867A1 (en) | Two-dimensional code generation and identification | |
CN110474876A (en) | A kind of data encoding coding/decoding method, device, equipment and storage medium | |
US9425952B2 (en) | Algebraic manipulation detection codes from algebraic curves | |
Yan et al. | Robust secret image sharing resistant to noise in shares | |
CN111147245A (en) | Algorithm for encrypting by using national password in block chain | |
JP5395051B2 (en) | A low complexity encryption method for content encoded by rateless codes | |
CN113922968A (en) | Access token generation and verification method and device, electronic equipment and storage medium | |
US20190036543A1 (en) | A Method of Protecting Data Using Compression Algorithms | |
Malik et al. | A high capacity text steganography scheme based on huffman compression and color coding | |
CN113806775B (en) | Block chain message processing method and device based on convolution optimization | |
US20200287722A1 (en) | Electronic device capable of data communication through electronic signatures based on syndrome and operating method thereof | |
CN105049176B (en) | Decryption method for view data safe transmission | |
CN116664123A (en) | Digital wallet design method based on blockchain technology | |
CN116405201A (en) | Electrocardiosignal dynamic steganography method and system based on CEEMD and convolution error correction code | |
KR102024379B1 (en) | Data transmission apparatus capable of digital signature based on biometric information and operating method thereof | |
CN103595523A (en) | A file encryption method | |
Ji et al. | Proofs of retrievability with tag outsourcing based on Goppa codes | |
CN109902528B (en) | Encoding and decoding method of two-dimension code | |
CN112613054A (en) | Electronic archive verification method and device based on GRS code and electronic equipment | |
Kong et al. | A fine-grained reversible data hiding in encrypted domain based on the cipher-text redundancy of encryption process | |
CN112613844A (en) | Personnel contract electronic signature method | |
CN111859408A (en) | File encryption and decryption method and device, electronic equipment and readable storage medium | |
CN113761561B (en) | SHA1 encryption method and device based on convolution optimization | |
Luo et al. | Robust secret image sharing scheme with improved anti-noise capability | |
Xu et al. | Attacking the Niederreiter-type cryptosystem based on rank metric |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB03 | Change of inventor or designer information | ||
CB03 | Change of inventor or designer information |
Inventor after: Wang Jielin Inventor after: Cao Yuqin Inventor after: Xu Feng Inventor before: Wang Jielin Inventor before: Cao Yuqin Inventor before: Xu Feng Inventor before: Wang Yong Inventor before: He Ting |
|
GR01 | Patent grant | ||
GR01 | Patent grant |