Pseudo-noise code generator and method for generation thereof based on broad sense information field
Technical field
The present invention relates to field of cryptography, be specifically related to pseudo-noise code generator and method for generation thereof based on broad sense information field.
Background technology
In recent years, computer network has obtained development rapidly, is widely used in every field such as politics, military affairs, economy and science, and increasing information has obtained effective transmission and storage.Because the opening of computer network makes information possible stolen in transmission and storing process, the confidentiality of information, integrality, availability and non-repudiation all need to adopt cryptographic technique to realize.Information transmitted can be analyzed and intercept and capture to the computer of modern high performance automatically, and per second can be searched for hundreds of ins and outs, thereby information security is constituted serious threat.Message area wishes to have safer, convenient, effective information protection means in a hurry.
Cause people's very big concern as the cryptography of one of network security basic theory, attracted increasing researcher to put in the middle of the research in password field; Owing to the development and change of real-life actual needs and computing technique, many new problems, new direction have all appearred in cryptographic each research field simultaneously.For example, the AES Collection Activities make international cryptography rise the climax of a block cipher research.Simultaneously, in the public key cryptography field, advantage has caused people's common concern to ECC because it is safe, computational speed is fast etc.
Encryption technology mainly is divided into symmetric cryptography and asymmetric cryptography, and wherein symmetric cryptography is divided into stream cipher and block cipher again.The representative of stream cipher is the RC4 algorithm, and the representative of block cipher is DES and AES.The conversion that the legacy packets password is determined usually, the system that makes has some specific character, and its result makes system be vulnerable to the attack of cryptanalysis methods such as linear analysis, difference analysis, algebraically attack to a certain extent, thereby influences its fail safe.Usually guarantee the safety of system by the key that produces safe enough, sufficient length.Symmetric cryptosystem all relates to the key problem, uses pseudo noise code as key usually.
There is following problem in traditional cryptographic algorithm:
(1) traditional cryptographic algorithm, as AES etc., the generation of its key (being pseudo noise code) can be represented with two tuples
K=(m,IV)
Wherein, K is a key; M is that key produces algorithm, is difficult to usually maintain secrecy; IV is an initial value, i.e. the seed of algorithm requirement is maintained secrecy; M, IV are directly related with key, and key produces the mode that algorithm generally adopts iteration, begin iteration from initial value IV and produce key; The conventional cryptography algorithm has definite scramble and diffusion conversion, and enciphered message relies on key, and on the other hand, key need be encrypted keeping/encryption transmission/hidden passageway and transmit; Therefore, the key of the safety issue of traditional algorithm is key;
(2) decruption key needs to pass to deciphering side by cipher mode or hidden passageway ciphertext is decrypted, in transmission course, ciphertext and decruption key all may be intercepted and captured, so just might be by only ciphertext only attack or cryptanalysis crack ciphertext, thereby the information that makes transmits and has lost safety guarantee, and this also increases the complexity of key management greatly;
(3) the conventional cryptography algorithm is owing to the each side reason, and key key in actual use often is repeated repeatedly to use, and exists the safety issue that produces owing to repeatedly reusing.
Summary of the invention
Primary and foremost purpose of the present invention is to overcome the shortcoming and defect of above-mentioned prior art, a kind of pseudo-noise code generator based on broad sense information field is provided, the present invention breaks through the binary limit that traditional secrete key produces, introduce the notion of broad sense information field, it is expanded to the tlv triple structure, realize of the transfer of key safety problem to the broad sense information field safety issue, improve anti-cryptanalytic intensity, and then raising information privacy, ternary character helps to set up a new cryptography system, makes to realize that a realizing one secrete key for one file becomes possibility; On the other hand, can produce the pseudo-random code sequence of any number, random length apace based on the pseudo-noise code generator of broad sense information field, can strengthen key space during as the key of symmetrical system, increase the exhaustive difficulty in computation that cracks, specific key can be provided according to different purposes.The pseudo noise code that pseudo-noise code generator produced that the present invention is based on broad sense information field has initial value sensitiveness and good randomness, can be by FIPS (Federal Information Processing Standards Publications) the 140-1 randomness test of American National technical standard office (NIST).
The present invention also aims to provide the method for generation of realizing pseudo noise code based on the pseudo-noise code generator of broad sense information field by above-mentioned.
The object of the invention is achieved through the following technical solutions: the pseudo-noise code generator based on broad sense information field comprises that initial address message (IV) generation module, IV normalization module, the key that connect successively produce algorithm (m) module, about fasciculation processing module, key length judge module, described m module also is connected with the activity context generation module simultaneously, and described activity context generation module is mainly connected to form by physics reconstructed module, logical reconstruction module.
Can be expressed as binary-coded data arbitrarily in the computer, be referred to as broad sense information field (IF).
Utilize the above-mentioned pseudo noise code method for generation of realizing based on the pseudo-random generator of broad sense information field, comprise the steps:
(1) the activity context generation module becomes activity context to this subspace logical reconstruction then by the physics reconstruct of selected IF being obtained certain sub spaces of IF;
(2) the IV generation module produces initial address message (IV), and the IV normalization module becomes the binary address string of determining length to IV compression or stretching, and it is divided into the n piece:
As the dimension of the n in activity context logical address;
(3) the m module is carried out the space tracking conversion to dimension logical bit address of the n in the activity context and physical space, and in each address transfer, separates out the long bit string in k position and incorporate in the key sequence from activity context.In order to obtain migration address, the about fasciculation of difference of the frequency of the maximum of k position bit string value and minimum value is handled before about fasciculation processing module basis, obtains a correction value.By the m module correction value is incorporated into address sequence then, obtain new n dimension migration address through translation;
(4) the key length judge module judges according to default parameter whether the length of key is enough, if not enough, then repeats step (3) operation, if enough, then exporting key is pseudo noise code.
In the said method, the described IV of step (2) is by one in system random number (SR), internal system time (ST), the given content (SC) or any multinomial composition, wherein SR, ST obtain by call function, realize randomness and the uniqueness of IV, given content is by the personalization of the given realization of user IV.
In the said method, the effect of the described physics reconstruct of step (1) is that selected broad sense information field (IF) is constructed with certain dispersion, visible physically subspace; Logical reconstruction then is that a spatial mappings that is obtained by physics reconstruct is the logical space of n dimension, has discreteness and randomness; Normalization IV is certain any address in this higher-dimension logical space, the initial address that carries out the space tracking conversion after also being.
In the said method, the described IF of step (1) can be the data of any type, is to be Binary Zero, 1 bit string of any length of unit with the byte in essence, has certain randomness and can think that it is end to end.IF can be produced by algorithm, generates as chaos/mixed chaos system, also one section code of image, text or internal memory etc.Can be to its label, so that use.When experiment, consider to use image, text as broad sense information field, or utilize the mixed chaos system, thereby produce different broad sense information fields according to given different initial value.
In the said method, the structure of the described activity context of step (1) under selected generalized information neck has as giving a definition:
ABG-code |
IF-code |
[S
1/L
1][,S
2/L
2]…[Si/Li]…
|
D
1,D
2,D
3[,D
4[,…]]
|
Wherein:
ABG-code: activity context number, be convenient to quote by code name;
IF-code: broad sense information field number;
[S1/L1] [, S2/L2] ... [Si/Li] ...: the physics reconstruction parameter, can select arbitrarily, consequently produce the activity context of determining.Wherein Si is skew, and Li is a length, decimally expression.Unit during physics reconstruct is a byte;
D1, D2, D3[Di[... ]]: the logical reconstruction parameter, Di is a dimension definition, and decimal representation provides this and ties up maximum subscript value, can choose wantonly in the bracket, and its unit is the position during logical reconstruction.
In the said method, the described physics reconstructed module of step (1) is carried out physics reconstruct to this selected IF, and its concrete operations are as follows:
If the physics reconstruction parameter is empty, then activity context and selected information field equivalence; If physics reconstruction parameter non-NULL, then choose one group of physics reconstruction parameter [Si/Li] successively, be that 0,1 string of Li byte long is as effective information from the Si byte intercepted length of broad sense information field or intermediate object program.Physics reconstruct can be extended to the information of a broad sense information field physical message piece of a plurality of different activity contexts;
In physics reconstruct, introduce one group of discretization rule, algorithm, reach unidirectional and calculate, the target of high degree of isolation and discretization, therefore,, make physics reconstruct have following characteristics by definition rule:
A, a reconstruct might make certain byte value produce multiple variation, satisfy unidirectional computability;
B, reconstruct keep stochastic behaviour, the ratio as 0,1;
The physical structure that c, reconstruct produce intermediate object program or activity context satisfies unidirectional calculating, but does not have inverse function, can't reversely obtain the result on upper strata, has high degree of isolation.
In the said method, the described logical reconstruction module of step (1) is carried out logical reconstruction to the IF through physics reconstruct and is obtained activity context, and its concrete operations are as follows:
Is the linear space conversion of the byte of one dimension the position logical space of any multidimensional, the one-dimensional data that obtains by physics reconstruct be reconstructed into D1 * D2 * ... the block of information of * Dn, each corresponding address then, and each address all available (y1, y2, yn) expression, and D1, D2,, Dn is each maximum subscript value of tieing up of appointing in advance.
In the said method, the m ternary of step (1), (2), (3) described IF, IV, m module coordinates to be implemented in the migration of spatial context track, separates out k position key in transition process, revises traveling locus simultaneously, till the length that generates meets the demands.
The pseudo-noise code generator that the present invention is based on broad sense information field has the following advantages with respect to prior art:
(1) pseudo noise code that the present invention is based on the pseudo-noise code generator of broad sense information field is produced by key that algorithm (m), initial address message (IV), broad sense information field (IF) are collaborative to be produced, but arbitrary unit is all not directly related with pseudo noise code, even obtain wherein two yuan, also can't produce pseudo noise code; IF is that the encryption and decryption both sides appoint in advance, does not participate in transmitting; M and IF use under encapsulation state, can be by adjusting the characteristic that the polyalgorithm parameter obtains special applications; If can guarantee IF safety, even part algorithm among the m and IV are open, system also is safe, and this moment, the algorithm security problem was transferred on the broad sense information field safety by secret key safety;
(2) pseudo-noise code generator that the present invention is based on broad sense information field can generate any number, long pseudo noise code arbitrarily fast, can be according to different application scenarios, and provide specific pseudo noise code as key;
(3) the ternary character that the present invention is based on the pseudo-noise code generator of broad sense information field helps to set up a new cryptography system, makes to realize that a realizing one secrete key for one file becomes possibility.
Description of drawings
Fig. 1 is the structural representation that the present invention is based on the pseudo-noise code generator of broad sense information field;
Fig. 2 is the workflow diagram that the present invention is based on the pseudo-noise code generator generation pseudo noise code of broad sense information field.
Embodiment
Below in conjunction with embodiment and accompanying drawing, the present invention is described in further detail, but embodiments of the present invention are not limited thereto.
Embodiment
Figure 1 shows that the concrete structure of the pseudo-noise code generator that the present invention is based on broad sense information field, the pseudo-noise code generator that the present invention is based on broad sense information field comprises IV generation module, IV normalization module, m module, about fasciculation processing module, the key length judge module that connects successively, described m module also is connected with the activity context generation module simultaneously, and described activity context generation module is mainly connected to form by physics reconstructed module, logical reconstruction module.
Utilization the present invention is based on the pseudo noise code method for generation of the pseudo-noise code generator realization of broad sense information field, as shown in Figure 2, specifically comprises the steps:
(1) the activity context generation module becomes activity context to this subspace logical reconstruction then by the physics reconstruct of selected IF being obtained certain sub spaces of IF;
(2) the IV generation module produces IV, and the IV normalization module becomes the binary address string of determining length to IV compression or stretching, and it is divided into the n piece:
As the dimension of the n in activity context logical address;
(3) the m module is carried out the space tracking conversion to dimension logical bit address of the n in the activity context and physical space, and in each address transfer, separates out the long bit string in k position and incorporate in the key sequence from activity context.In order to obtain migration address, the about fasciculation of difference of the frequency of the maximum of k position bit string value and minimum value is handled before about fasciculation processing module basis, obtains a correction value.By the m module correction value is incorporated into address sequence then, obtain new n dimension migration address through translation;
(4) the key length judge module judges according to default parameter whether the length of key is enough, if not enough, then repeats step (3) operation, if enough, then exporting key is pseudo noise code.
In the said method, the described IV of step (2) is by one among SR, ST, the SC or any multinomial composition, wherein SR, ST obtain by call function, realize randomness and the uniqueness of IV, given content is given by the user, realizes the personalization of IV, as: " hello; I am * * ", IV does not use as the initial value of algorithm, and what comprise is the information of initial address in activity context.
In the said method, the effect of (1) described physics reconstruct is that selected IF is constructed with certain dispersion, visible physically subspace; Logical reconstruction then is that a spatial mappings that is obtained by physics reconstruct is the logical space of n dimension, has discreteness and randomness; Normalization IV is certain any address in this higher-dimension logical space, the initial address that carries out the space tracking conversion after also being.
In the said method, the described IF of step (1) can be the data of any type, is to be Binary Zero, 1 bit string of any length of unit with the byte in essence, has certain randomness and can think that it is end to end.IF can be produced by algorithm, generates as chaos/mixed chaos system, also one section code of image, text or internal memory etc.Can be to its label, so that use.When experiment, consider to use image, text as broad sense information field, or utilize the mixed chaos system, thereby produce different broad sense information fields according to given different initial value.
In the said method, the structure of the described activity context of step (1) under selected generalized information neck has as giving a definition:
ABG-code |
IF-code |
[S
1/L
1][,S
2/L
2]…[Si/Li]…
|
D
1,D
2,D
3[,D
4[,…]]
|
Wherein:
ABG-code: activity context number, be convenient to quote by code name;
IF-code: broad sense information field number;
[S1/L1] [, S2/L2] ... [Si/Li] ...: the physics reconstruction parameter, can select arbitrarily, consequently produce the activity context of determining.Wherein Si is skew, and Li is a length, decimal representation.Unit during physics reconstruct is a byte;
D1, D2, D3[Di[... ]]: the logical reconstruction parameter, Di is a dimension definition, and decimal representation provides this and ties up maximum subscript value, can choose wantonly in the bracket, and its unit is the position during logical reconstruction.
In the said method, the described physics reconstructed module of step (1) is carried out physics reconstruct to this selected IF, and its concrete operations are as follows:
If the physics reconstruction parameter is empty, then activity context and selected information field equivalence; If physics reconstruction parameter non-NULL, then choose one group of physics reconstruction parameter [Si/Li] successively, be that 0,1 string of Li byte long is as effective information from the Si byte intercepted length of broad sense information field or intermediate object program.Physics reconstruct can be extended to the information of a broad sense information field physical message piece of a plurality of different activity contexts;
In physics reconstruct, introduce one group of discretization rule, algorithm, reach unidirectional and calculate, the target of high degree of isolation and discretization, therefore,, make physics reconstruct have following characteristics by definition rule:
A, a reconstruct might make certain byte value produce multiple variation, satisfy unidirectional computability;
B, reconstruct keep stochastic behaviour, the ratio as 0,1;
The physical structure that c, reconstruct produce intermediate object program or activity context satisfies unidirectional calculating, but does not have inverse function, can't reversely obtain the result on upper strata, has high degree of isolation.
In the said method, the described logical reconstruction module of step (1) is carried out logical reconstruction to the IF through physics reconstruct and is obtained activity context, and its concrete operations are as follows:
Is the linear space conversion of the byte of one dimension the position logical space of any multidimensional, the one-dimensional data that obtains by physics reconstruct be reconstructed into D1 * D2 * ... the block of information of * Dn, each corresponding address then, and each address all available (y1, y2, yn) expression, and D1, D2,, Dn is the maximum subscript value of appointing in advance of every dimension.
For example definition:
4 |
Sample.txt |
[34/256],[568/512] |
456,355,756 |
It is 4 activity context that code name is chosen in expression.Obtain this activity context, need carry out physics and logical reconstruction then with the file of file Sample.txt by name as broad sense information field.Physics reconstruction parameter [34/256], [568/512] are represented to choose the binary string of 256 and 512 byte longs respectively from the 34th byte and the 568th byte, and be merged into one long be 768 bytes (6144 s') binary string.Logical reconstruction is mapped to 3 spaces of tieing up to these 6144 long binary strings, and the maximum subscript value of every dimension is respectively 456,355 and 756.
In the said method, the m ternary of step (1), (2), (3) described IF, IV, m module coordinates to be implemented in the migration of spatial context track, separates out k position key in transition process, revises traveling locus simultaneously, till the length that generates meets the demands.
The foregoing description is a preferred implementation of the present invention; but embodiments of the present invention are not restricted to the described embodiments; other any do not deviate from change, the modification done under spirit of the present invention and the principle, substitutes, combination, simplify; all should be the substitute mode of equivalence, be included within protection scope of the present invention.