CN107425963A - A kind of construction method and system of password wall - Google Patents

A kind of construction method and system of password wall Download PDF

Info

Publication number
CN107425963A
CN107425963A CN201710319769.3A CN201710319769A CN107425963A CN 107425963 A CN107425963 A CN 107425963A CN 201710319769 A CN201710319769 A CN 201710319769A CN 107425963 A CN107425963 A CN 107425963A
Authority
CN
China
Prior art keywords
password
information
brick
wall
parameter
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.)
Pending
Application number
CN201710319769.3A
Other languages
Chinese (zh)
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.)
Shanghai Peoplenet Security Technology Co Ltd
Original Assignee
Shanghai Peoplenet Security Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Peoplenet Security Technology Co Ltd filed Critical Shanghai Peoplenet Security Technology Co Ltd
Priority to CN201710319769.3A priority Critical patent/CN107425963A/en
Priority to PCT/CN2017/100288 priority patent/WO2018205469A1/en
Publication of CN107425963A publication Critical patent/CN107425963A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0838Key agreement, i.e. key establishment technique in which a shared key is derived by parties as a function of information contributed by, or associated with, each of these
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords

Abstract

The invention discloses a kind of construction method of password wall, including:Step S100 gets parms configuration information according to the key information of user terminal;Step S200 distributes the parameter configuration of acquisition into the corresponding parameter part of the password wall;Relevant parameter part includes password brick, data backflow, interlaced plies in the password wall;The parameter configuration that step S300 configures according to relevant parameter part in the password wall, builds the password wall.Uniform, the nonlinear unidirectional transform expansion according to user key information design of its purpose, ensure that by the irreversibility of configuration data to user key.

Description

A kind of construction method and system of password wall
Technical field
The present invention relates to field of information interaction, more particularly to a kind of construction method and system of password wall.
Background technology
With the rapid development in mobile Internet epoch, the importance of authentication is also outstanding day by day, but conventional security Limitation be present in means:Static password is most easy identification authentication mode, however be also risk highest mode, easily by Phishing, Brute Force, hit the attack such as storehouse.Short message verification code mode is most widely used at present, acceptance highest movement branch Authentication mode is paid, but its safe class is low, transaction risk is higher, becomes the main target of attack of criminal.Hardware is pacified Full product, USBKey, dynamic cipher device etc., it is all inevasible in the presence of carrying that form and communication modes are converted anyway The problem of inconvenience, complex operation, consumers' acceptable degree is very low.Although the soft token of mobile phone solves hardware carrying to a certain extent Problem, but due to using conventional cipher algorithm, for private key for user in the case where no safety chip is protected, its security will be big It is big to reduce, regulatory requirements can not be met.
Therefore market in urgent need one kind improves authentication security, sensitive information on the premise of the convenient experience of user is not changed The technology of storage security.SOTP cryptographic algorithm systems be towards mobile interchange demand for security, be hand-held under mobile environment Authentication and the session key agreement of terminal device and design.
The content of the invention
The present invention's provides a kind of construction method and system of password wall, and its purpose is according to user key information design Uniformly, nonlinear unidirectional transform expansion, ensure that by the irreversibility of configuration data to user key.
Technical scheme provided by the invention is as follows:
A kind of construction method of password wall, including:Step S100 gets parms with confidence according to the key information of user terminal Breath;Step S200 distributes the parameter configuration of acquisition into the corresponding parameter part of the password wall;The password Relevant parameter part includes password brick, data backflow, interlaced plies in wall;Step S300 is according to relevant parameter portion in the password wall The parameter configuration of part configuration, builds the password wall.
In the present invention, data backflow realizes the variable of algorithm structure, significantly strengthens the complexity of algorithm, improves close The security intensity of code;Interlaced plies can equably, rapidly, non-linearly intertexture arrives miscellaneous part by the information of each part, by Chaotic effect is also played in changeable parameters and for nonlinear operation simultaneously;Devised based on above user key uniform, non-thread The unidirectional transform expansion of property, ensure that by the irreversibility of configuration data to user key.
Preferably, the step S100 includes:Step S110 is according to the key information obtained from user terminal, to institute State key information and carry out packet setting;Step S120 is carried out the key information being grouped after setting according to the first preset algorithm More wheel conversions, and generate initial parameter configuration information;Step S130 generates polynary S boxes according to the initial parameter configuration information; Step S140 carries out S-transformation according to polynary S boxes and the initial parameter configuration information, generates the parameter configuration.
In the present invention, the password wall of generation, namely generating algorithm, then it is in line with fully merging key with AES Purpose and design, require that each algorithm parameter (including S boxes) meets random distribution in principle, user is different and algorithm is different;It is real Show first, no key information leakage, even if attacker has obtained user cipher algorithm, can not therefrom reduce to obtain user close Key;Second, be at a distance sufficiently large between algorithm examples, even if user key relatively when, the difference between algorithm is also sufficiently large.
Preferably, the step S200 includes:Step S210 matches somebody with somebody according to obtained from the parameter configuration first Parameter is put, the size of the password brick and the number of the password brick are set;Step S220 joins according to from the described first configuration The second configuration parameter obtained in number, the data message of the data backflow is set to flow direction, and in the password wall Positional information;Step S230 sets the interlaced plies according to the 3rd configuration parameter obtained from the parameter configuration Interleave parameter.
Preferably, the size and number for setting in the password wall wherein one layer password brick include:Step S211 roots Packet setting is carried out to first configuration parameter according to default amount of bytes, and forms multigroup first configuration parameter sub-information;Step First configuration parameter sub-information is carried out height byte align by rapid S212;Step S213 is after the step S212 presses byte align The first configuration parameter sub-information in choose corresponding predetermined number high low byte parameter information, and according to the second preset algorithm Calculated;Step S214 confirms the length of password brick according to the result of calculation of the step S213;Step S215 is according to First configuration parameter described in the length of password brick described in step S214 and the first configuration parameter sub-information length computation The residue length of information parameter;The residue length of step S216 first configuration parameter sub-informations according to the step S215 With the change default amount of bytes, the length of calculating password brick;Repeat step S215 and step S216;Determine respective layer The password turn size and the password turn number.
Preferably, the data backflow for setting the password to turn:Step S221 is selected in the first configuration parameter sub-information Take the configuration parameter sub-information of preset byte amount;The configuration parameter sub-information chosen in the step S221 is divided into by step S222 Low byte position and high byte position;Low byte position after in the step S222 points is arranged to the number of the password turn by step S223 According to outflow direction position, the high byte position is arranged to the data inflow direction position that the password turns.
Preferably, setting the interleave parameter of the interlaced plies includes:Step 231 is according to default amount of bytes to the described 3rd Configuration parameter carries out packet setting, and forms multigroup 3rd configuration parameter sub-information;Wherein, the step 231 is according to default Amount of bytes is with the step S211 according to default amount of bytes correspondent equal;Step 232 is according to the 3rd preset algorithm to described Three configuration parameter sub-informations are calculated;Step 233 is carried out according to the step S232 to the 3rd configuration parameter sub-information The result of calculating, determine the interleave parameter of the interlaced plies.
Preferably, the S-transformation includes at least one layer:The mathematical modeling of individual layer S-transformation is:X→S[X±Cmod2n];Its In, S--S boxes, n--S boxes preset size, and C is the parameter of the S boxes randomly selected according to the key information of user terminal;
The mathematical modeling of multilayer S-transformation is:
Wherein,
S--S is converted, and n--S conversion pre-set dimensions, C is the S-transformation parameter randomly selected according to the key information of user terminal; X, Y are respectively the input high byte of multilayer S-transformation, low byte;The output high byte of X ', Y ' respectively multilayer S-transformation, low word Section.
Preferably, the password wall of the user terminal includes at least one layer of structure generation;Wherein, every layer of the password wall it is suitable Sequence is followed successively by the password brick, the interlaced plies;The password brick is of different sizes in each layer, and the number of the password brick is not Together.
In the present invention, data backflow changes the hierarchical structure of algorithm, makes two password transforms into compound function relation, Algorithm complex can be significantly increased, while increase the security intensity of algorithm;Among the one layer of password wall, existing small size Password brick, also have large-sized password brick so that layer of structure is in picturesque disorder, changeful;The variable quantity of password brick is huge, Therefore the encryption for information is more safe and reliable.
A kind of detection method of the construction method of password wall, including:Step S100 according to default detected rule to generation after The password wall detect;Step S200 judges whether the password wall meets default detected rule, when being unsatisfactory for, Regenerate password wall.
Preferably, the default detected rule described in the step S100 includes:Whether the S boxes conversion of the AES It is straight-through;And/or, if there is the S-transformation that multilayer password brick all have chosen same default size in same layer.
In the present invention, by the detection to password wall construction method, the algorithm parameter of generation is detected, in engineering Side generation can be surveyed in implementation process with frontier inspection, if the algorithm of detection generation is unsatisfactory for rule set in advance, regenerates use Family key and generation user's algorithm.Make information more safe and reliable.
A kind of encryption method of password wall, including:Step S100 obtains confidential information to be added from user terminal;Step S200 will The confidential information to be added is inputted into the password brick of the equivalent layer in the password wall;Step S300 is in the step S200 Each password brick carries out S-transformation, sets the direction of the data backflow of each password brick;Step S400 is by the step The result that each password transform of respective layer changes in S300 is inputted into the interlaced plies of respective layer, is interleaved change Change;Step S500 judges whether the confidential information to be added has traveled through each layer of the password wall, when it is completed, by the interlaced plies The result of calculating exports as encryption information;Otherwise, the result that the interlaced plies calculate is inputted next into the password wall Wheel, and return and perform step S200.
A kind of decryption method of the construction method of password wall, including:Step S100 obtains information to be decrypted from server; Step S200 inputs the information to be decrypted into the interlaced plies of the equivalent layer in the password wall;Step S300 is to the step The interlaced plies of the equivalent layer in rapid S200 carry out inverse interleaved transforms, set each password brick of the interlaced plies respective layer The direction of data backflow;The result of inverse interleaved transforms in the step S300 is inputted each password brick of password brick layer by step S400 In, carry out inverse S-transformation;Step S500 judges whether the information to be decrypted has traveled through each layer of the password wall, when it is completed, The password brick is exported against the result that S-transformation calculates as solution confidential information;Otherwise, the result by the password brick against S-transformation Input next layer into the password wall, and return and perform step S200.
A kind of constructing system of password wall, including:Data obtaining module, server obtain according to the key information of user terminal Parameter configuration;Information assigning module, electrically connected with described information acquisition module, server is by the parameter configuration of acquisition Information is distributed into the corresponding parameter part of the password wall;Relevant parameter part includes password brick, data in the password wall Backflow, interlaced plies;Password wall construction module, with described information distribute module, server is according to relevant parameter in the password wall The parameter configuration of part configuration, builds the password wall.
Preferably, described information acquisition module includes:Packet sets submodule, is entered according to the key information of the user terminal Row packet is set;Initial information generates submodule, sets submodule to electrically connect with the packet, will be divided according to the first preset algorithm The key information of the user terminal after group setting carries out more wheel conversions, and generates initial parameter configuration information;Initial information becomes Submodule is changed, is electrically connected with described information generation submodule, polynary S boxes is generated according to the initial parameter configuration information;Information Submodule is generated, is electrically connected with the initial information transformation submodule, according to polynary S boxes and the initial parameter configuration information S-transformation is carried out, generates the parameter configuration.
Preferably, described information distribute module includes:Password brick parameter configuration submodule, believe according to from the parameter configuration The first configuration parameter obtained in breath, the size of the password brick and the number of the password brick are set;Data backflow parameter Submodule is configured, according to the second configuration parameter obtained from first configuration parameter, the data of the data backflow are set Information flow direction, and the positional information in the password wall;Interleave parameter configures submodule, matches somebody with somebody according to from the parameter The 3rd configuration parameter obtained in confidence breath, the interleave parameter of the interlaced plies is set.
In the present invention, the technical method of " counting to displacement at random " is devised, and the displacement operate less, generated is random, it is not easy to Decoded by disabled user, therefore securely and reliably;Among the one layer of password wall, the password brick of existing small size, also there is big chi Very little password brick so that layer of structure is in picturesque disorder, changeful;The variable quantity of password brick is huge, therefore adding for information It is close more safe and reliable.
A kind of detecting system of password wall construction system includes:Detection module, according to default detected rule to generation after The password wall detect;Judge module is detected, is electrically connected with the detection module, judges whether the password wall meets Default detected rule;When being unsatisfactory for, password wall is regenerated;Wherein, described default detected rule includes:The encryption is calculated Whether the S boxes conversion of method leads directly to;And/or, if there is multilayer password brick all to have chosen the S of same default size in same layer and become Change.
A kind of encryption system of password wall, including:Data obtaining module to be encrypted, secret letter to be added is obtained from user terminal Breath;MIM message input module to be encrypted, electrically connected with the data obtaining module to be encrypted, the confidential information to be added is inputted to institute In the password brick for stating the equivalent layer in password wall;Data backflow direction setup module, with the MIM message input module electricity to be encrypted Connection, S-transformation is carried out to each password brick in the MIM message input module to be encrypted, each password brick is set The direction of data backflow;Interleaved transforms module, electrically connected with data backflow direction setup module, by the data backflow side The result that each password transform of respective layer changes into setup module is inputted into the interlaced plies of respective layer, is handed over Knit conversion;Message processing module to be encrypted, electrically connected with the interleaved transforms module, judge whether the confidential information to be added travels through Each layer of the complete password wall, when it is completed, exported the result that the interlaced plies calculate as encryption information;Otherwise, by institute The result for stating interlaced plies calculating inputs next layer into the password wall, and controls the MIM message input module to be encrypted, and holds It is about to the confidential information to be added to input into each password brick of the equivalent layer in the password wall.
A kind of decryption system of password wall, including:Data obtaining module to be decrypted, letter to be decrypted is obtained from server Breath;MIM message input module to be decrypted, electrically connected with the data obtaining module to be decrypted, the information to be decrypted is inputted to institute In the interlaced plies for stating the equivalent layer in password wall;Data backflow direction setup module, with the MIM message input module electricity to be decrypted Connection, inverse interleaved transforms are carried out to the interlaced plies of the equivalent layer in the MIM message input module to be decrypted, the friendship is set The direction of the data backflow of each password brick of tissue layer respective layer;Inverse S-transformation module, with data backflow direction setup module Electrical connection, the result of inverse interleaved transforms in the setup module of the data backflow direction is inputted in each password brick of password brick layer, Carry out inverse S-transformation;Message processing module to be decrypted, electrically connected with the interleaved transforms against module, judge the information to be decrypted Whether traveled through each layer of the password wall, when it is completed, using the password brick against the result that S-transformation calculates as solution confidential information Output;Otherwise, the password brick is inputted into next layer into the password wall against the result of S-transformation, and controlled described to be decrypted MIM message input module, and perform and input the information to be decrypted into the interlaced plies of the equivalent layer in the password wall.
In the present invention, a variety of basic components, sizes specification, a variety of hierarchical structures, a variety of data flows are employed. Figuratively, built just as lid building with the password brick of different size, different levels structure, different operating parameter into a floor, then It is used alternatingly with different configuration of interlaced plies, erects the mansion of cryptographic algorithm in layer;Encryption when data from top to bottom Transmitted successively and computing, but the situation to flow back backward in some places be present, upset data flow and the sequential of computing, Equivalent to the hierarchical structure of the algorithm of change.
Compared with prior art, the present invention provides a kind of construction method and system of password wall, at least brings following one kind Technique effect:
1st, in the present invention, user key is through uniform, non-linear unidirectional transform expansion generation configuration data, its user generation Password wall in key even only differ a bit, its corresponding configuration data difference half or so.So ensure different use Effective and safe interval between the key of family.
2nd, in the present invention, due to realizing the irreversibility of user key, even if attacker is from an algorithm examples point The Unified Algorithm framework of SOTP algorithms and corresponding configuration data are separated out, due to the one-way from user key to configuration data, Also it is difficult to obtain user key.
Brief description of the drawings
Below by a manner of clearly understandable, preferred embodiment is described with reference to the drawings, to a kind of structure side of password wall Method and system performance, technical characteristic, advantage and its implementation are further described.
Fig. 1 is a kind of flow chart of construction method one embodiment of password wall of the present invention;
Fig. 2 is a kind of flow chart of another embodiment of the construction method of password wall of the present invention;
Fig. 3 is a kind of flow chart of another embodiment of the construction method of password wall of the present invention;
Fig. 4 is a kind of flow chart of another embodiment of the construction method of password wall of the present invention;
Fig. 5 is a kind of flow chart of another embodiment of the construction method of password wall of the present invention;
Fig. 6 is a kind of flow chart of another embodiment of the construction method of password wall of the present invention;
Fig. 7 is one embodiment structure chart that the present invention sets data backflow direction;
Fig. 8 is password wall construction of the present invention;
Fig. 9 is the flow chart of detection method one embodiment of the construction method of password wall of the present invention;
Figure 10 is a kind of flow chart of encryption method one embodiment of password wall of the present invention;
Figure 11 is a kind of flow chart of another embodiment of the decryption method of password wall of the present invention;
Figure 12 is a kind of structure chart of constructing system one embodiment of password wall of the present invention;
Figure 13 is a kind of structure chart of encryption system one embodiment of password wall of the present invention;
Figure 14 is a kind of structure chart of decryption system one embodiment of password wall of the present invention.
Embodiment
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, control is illustrated below The embodiment of the present invention.It should be evident that drawings in the following description are only some embodiments of the present invention, for For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings Accompanying drawing, and obtain other embodiments.
To make simplified form, part related to the present invention is only schematically show in each figure, they are not represented Its practical structures as product.In addition, so that simplified form readily appreciates, there is identical structure or function in some figures Part, one of those is only symbolically depicted, or only marked one of those.Herein, "one" is not only represented " only this ", the situation of " more than one " can also be represented.
The present invention provides a kind of one embodiment of the construction method of password wall, with reference to shown in figure 1, including:Step S100 Got parms configuration information according to the key information of user terminal;Step S200 distributes the parameter configuration of acquisition to institute State in the corresponding parameter part of password wall;Relevant parameter part includes password brick, data backflow, interlaced plies in the password wall; The parameter configuration that step S300 configures according to relevant parameter part in the password wall, builds the password wall.
Specifically, in the present embodiment, with reference to shown in figure 1;By the way that 1024 bit User keys uniformly, are non-linearly expanded Open up the algorithm parameter configuration data no less than 3856 bits, then the isolation technology by configuration data generating algorithm example.So that Algorithm examples are sparsely distributed in 23856In the space that individual configuration data is formed, average every 22832Individual configuration data is only corresponding one Algorithm examples.Password brick realizes that the S boxes (alternately rolling) generated with user key and initial-configuration data is bases by S-transformation Plinth, pass through the nested compound S-transformation for realizing sizes.Because its size is different, the nested number of plies and selected parameter are not yet It is identical, algorithm structure is also changed to a certain degree while changing operational parameter, improves the safety between algorithms of different example Interval.Data backflow refer to data from the output of some part of current layer to return to this layer another part input work as In;The size turned according to password, and the number that password turns in each layer, the data backflow direction of setting, and interlaced plies Parameter, it is built into a password wall so that user key and algorithm depth integration, the corresponding difference of different user keys add Decrypt grouping algorithm, namely password wall.This distinguishes the method for encryption and decryption function with traditional block cipher by encryption and decryption key It is different.User key has merged with algorithm in the application, and algorithm is used in authentication and consulting session key, will not be as passing Continuous transposition encryption key is needed during system block cipher use, thus does not have key schedule.Different keys correspond to different calculations Method, for cryptographic attack person, the difficulty that existing attack technology is attacked it is significantly enhanced, in the more of the application key Sample determines the diversity of password wall, the corresponding enciphering and deciphering algorithm cluster of multiple password walls.
In the present invention, data backflow realizes the variable of algorithm structure, significantly strengthens the complexity of algorithm, improves close The security intensity of code;Interlaced plies can equably, rapidly, non-linearly intertexture arrives miscellaneous part by the information of each part, by Chaotic effect is also played in changeable parameters and for nonlinear operation simultaneously;Devised based on above user key uniform, non-thread The unidirectional transform expansion of property, ensure that by the irreversibility of configuration data to user key.
Preferably, the step S100 includes:Step S110 is according to the key information obtained from user terminal, to institute State key information and carry out packet setting;Step S120 is carried out the key information being grouped after setting according to the first preset algorithm More wheel conversions, and generate initial parameter configuration information;Step S130 generates polynary S boxes according to the initial parameter configuration information; Step S140 carries out S-transformation according to polynary S boxes and the initial parameter configuration information, generates the parameter configuration.
Specifically, another embodiment is provided on the basis of above example, with reference to shown in figure 2;According to the user The key information at end carries out packet setting;The key information for the user terminal being grouped after setting is entered according to the first preset algorithm The more wheel conversions of row, and generate initial parameter configuration information;S boxes are generated according to the initial parameter configuration information of generation;According to Above the result of 3 steps further calculates the generation parameter configuration, and carries out each wheel password brick, data backflow, interlaced plies The selection of scheduling algorithm parameter;The acquisition of parameter configuration, the first step, based on user key, produce initial-configuration data.Assuming that The key word joint number of user is 1024bit, as K0,…K15, K is divided into naturally from low to high 16 64bit numbers, is designated as respectively K;Defined function:M (x)=x mod4, n (x)=x mod16,A is remembered againi(i=0,1,2, 3) it is 64bit numbers, initial value is preset as 0X5555555555555555;(i=0,1 ..., 15) it is 6bit numbers, it is followed successively by 17,27,37,47,17,27,37,47,17,27,37,47,17,27,37,47。Di(i=0,1 ... ..., 15) is 64bit numbers, Successively:
e7587fb070245d81,59377783eda99126,785ff6d8a555b001,
8f58e8945cf65ca9,f46c818ff7c470fb,a5855ee2a3e52db9,c55c32da2a35f5d0, e84d05e769aeab45,ddd7b6484638b3eb,1ec6846a2e738656,c969ef9ea9d44575, 062df4a6915aa787,6b5a4a15153b0894,96568dcbc697e2a5,9c822a1b405de76c, Cefc0f5d02035730, then when generating initial-configuration data, it is necessary to a0,a1,a2,a324 conversion are carried out, are often carried out 16 times Conversion, then the i-th jth time transform definition is as follows:Namely first preset algorithm;
Wherein Δi=7i be i-th offset, i=0,1 ..., 23, j=0,1 ..., 15;16 since the i-th=8 A is exported after the completion of secondary calculating0,a1,a2,a3Value, often export 256bit, export 16 altogether, generate 4096bit initial-configuration datas.
Second step, 16 yuan of S boxes s are generated using initial-configuration data.Initial-configuration data totally 512 byte, is designated as { tiI= 0,1,2 ..., 511, then by tiHigh 4 be designated as respectively with low 4S boxes first are preset into unit to replace, in exchange s Location isContent i=256,257 ..., 511, i.e.,256 exchanges are carried out altogether, and the s after exchange, which is used as, to be added 16 yuan of S boxes in close algorithm.
3rd step, 256 yuan of S boxes S are generated using s and initial-configuration data.First, the preset S box SS of s are utilized:Generated again by feeding back carry addition Exchange starting point:U256,V256:Make U0=0, V0=0, calculate (i=0,1 ..., 255), Ui+1=((Ui+ti> > 8)+(Ui+ ti))&0xff;Vi+1=((Vi+ti+256> > 8)+(Vi+ti+256))&0xff;Then, 256 exchanges are carried out to SS, exchange SS Middle address is the i-th+U256Mod 256, ti+ 256, the content of unit, i=0,1 ..., 255;Finally, S=SS is made, S is carried out 256 exchanges, it is the i-th+V to exchange address in S256mod 256、tiThe content of unit, i=0,1 ..., 255.Thus generate The 256 yuan of S box S used in AES, while obtain the S boxes SS used in a generating process.
4th step, on the basis of above, parameter configuration data is generated, and carry out each password brick, data backflow, interlaced plies The selection of scheduling algorithm parameter.Take the computational methods of the 1st step, a0,a1,a2,a3It is still to retain the number calculated in the 1st step when completing According to the i.e. last 256bit of initial-configuration data;32 64bit numbers are divided into being one group by 8 units instead of table SS, are designated as SSi, i=0,1 ..., 31;Calculate again:
Wherein, Δi=7i be i-th offset, i=0,1 ..., 15, j=0,1 ..., 15.From every wheel all 16 A is exported after the completion of secondary calculating0,a1,a2,a3Value, often export 256bit, export 16 altogether, generate 4096bit parameter configuration datas That is parameter configuration.
In the present invention, the password wall of generation, namely generating algorithm, then it is in line with fully merging key with AES Purpose and design, require that each algorithm parameter (including S boxes) meets random distribution in principle, user is different and algorithm is different;It is real Show first, no key information leakage, even if attacker has obtained user cipher algorithm, can not therefrom reduce to obtain user close Key;Second, be at a distance sufficiently large between algorithm examples, even if user key relatively when, the difference between algorithm is also sufficiently large.
Preferably, the step S200 includes:Step S210 matches somebody with somebody according to obtained from the parameter configuration first Parameter is put, the size of the password brick and the number of the password brick are set;Step S220 joins according to from the described first configuration The second configuration parameter obtained in number, the data message of the data backflow is set to flow direction, and in the password wall Positional information;Step S230 sets the interlaced plies according to the 3rd configuration parameter obtained from the parameter configuration Interleave parameter.
Preferably, the size and number for setting in the password wall wherein one layer password brick include:Step S211 roots Packet setting is carried out to first configuration parameter according to default amount of bytes, and forms multigroup first configuration parameter sub-information;Step First configuration parameter sub-information is carried out height byte align by rapid S212;Step S213 is after the step S212 presses byte align The first configuration parameter sub-information in choose corresponding predetermined number high low byte parameter information, and according to the second preset algorithm Calculated;Step S214 confirms the length of password brick according to the result of calculation of the step S213;Step S215 is according to First configuration parameter described in the length of password brick described in step S214 and the first configuration parameter sub-information length computation The residue length of information parameter;The residue length of step S216 first configuration parameter sub-informations according to the step S215 With the change default amount of bytes, the length of calculating password brick;Repeat step S215 and step S216;Determine respective layer The password turn size and the password turn number.
Preferably, the data backflow for setting the password to turn:Step S221 is selected in the first configuration parameter sub-information Take the configuration parameter sub-information of preset byte amount;The configuration parameter sub-information chosen in the step S221 is divided into by step S222 Low byte position and high byte position;Low byte position after in the step S222 points is arranged to the number of the password turn by step S223 According to outflow direction position, the high byte position is arranged to the data inflow direction position that the password turns.
Preferably, setting the interleave parameter of the interlaced plies includes:Step 231 is according to default amount of bytes to the described 3rd Configuration parameter carries out packet setting, and forms multigroup 3rd configuration parameter sub-information;Wherein, the step 231 is according to default Amount of bytes is with the step S211 according to default amount of bytes correspondent equal;Step 232 is according to the 3rd preset algorithm to described Three configuration parameter sub-informations are calculated;Step 233 is carried out according to the step S232 to the 3rd configuration parameter sub-information The result of calculating, determine the interleave parameter of the interlaced plies.
Preferably, the S-transformation includes at least one layer:The mathematical modeling of individual layer S-transformation is:X→S[X±Cmod2n];Its In, S--S boxes, n--S boxes preset size, and C is the parameter of the S boxes randomly selected according to the key information of user terminal;
The mathematical modeling of multilayer S-transformation is:
Wherein,
S--S is converted, and n--S conversion pre-set dimensions, C is the S-transformation parameter randomly selected according to the key information of user terminal; X, Y are respectively the input high byte of multilayer S-transformation, low byte;The output high byte of X ', Y ' respectively multilayer S-transformation, low word Section.
Preferably, the password wall of the user terminal includes at least one layer of structure generation;Wherein, every layer of the password wall it is suitable Sequence is followed successively by the password brick, the interlaced plies;The password brick is of different sizes in each layer, and the number of the password brick is not Together.
Specifically, another embodiment is provided on the basis of above example;With reference to shown in figure 3,4,5,6,7;Will be The 4096bit parameter configuration datas i.e. parameter configuration generated in the embodiment of the above one is allocated, each in password wall Parameter part carries out not decile, it is assumed that it is 3072bit, as the first configuration parameter to distribute to password brick;From password brick 3072bit It is 1024bit, as the second configuration parameter distributing to data backflow;It is 1024bit to distribute to interlaced plies, and the as the 3rd configures Parameter;Specifically distribute to obtain parameter configuration to methods, and the mathematical model being related to is including following:In 4096bit Size of the spatial content of parameters part namely oneself number etc. in password wall is determined in parameter configuration data:
Firstth, password brick number and size are determined.Determine that password brick number and size are to carry out calculating generation based on S-transformation 's;Including individual layer and multilayer;Individual layer S-transformation:Assuming that when password brick n size is 4bit or 8bit, S-transformation directly invokes S Box, note X input for n-bit, then are specially:
Wherein, n-bit parameter C is generated at random by generating algorithm, and is randomly selected using addition or subtraction, according to size N determinations use 16 yuan of S boxes s or 256 yuan of S box S, and they are generated at random according to user key by generating algorithm.
Multilayer S-transformation:Assuming that when password brick n size is 16bit or 32bit, S-transformation is respectively by 8bit and 16bit S-transformation nesting allocation be combined;Also include G simultaneously to convert, G conversion:
Wherein C is the parameter randomly selected;The input of S-transformation It is divided into left and right two parts, is designated as X, Y respectively;Equally, output is designated as X', Y';In order to distinguish, nbit S-transformation is designated as Sn:(X, Y)→Sn(X, Y)=(X', Y'), then have:
S-transformation, the parameter of G conversion are all randomly selected by generating algorithm, not identical.Can be with from mathematical modeling Find out, 16bit S-transformation converts two layers of generation by 8bit S-transformation with G, and layer of structure can be considered two layers;32bit S-transformation Two layers of generation is converted by 16bit S-transformation and G, is just 4 layers when summing up in the point that 8bit S-transformation generates with G conversion.
Further determine that the parameter information of password wall all parts is specific as follows;
Firstth, the size that password turns is determined;
For the more vivid materialization of the present embodiment, it is assumed that 4096bit parameter configuration datas are divided into 16 256bit numbers, It is designated as Ti(i=0,1 ..., 15), then to i-th of 256bit numbers Ti, t is designated as in units of 64 bitsi,j(j=0,1 ..., 3), Tt is designated as in units of 16 bitsi,j(j=0,1 ..., 16).
First, 64bit numbers are calculatedThen password brick number and each brick size are determined using u, had Body is as follows:
1st, 2bit is taken from low to high successively to u, when the value of this 2bit number:When for 0 when, it is 4bit to take password brick length;For 1 When, it is 8bit to take password brick length;For 2 when, it is 16bit to take password brick length;For 3 when, it is 32bit to take password brick length.Press The method, select password brick backward successively, and constantly subtract the length for having chosen password brick successively from original length 64bit, until Residue length is less than or equal to stop when 0.When residue length is equal to 0, algorithm terminates;During less than 0, the password brick finally selected is given up Abandon, and recalculate residue length.
If the 2nd, residue length be not less than 16, be further continued for taking 4bit from u, its value as address from array 4,8,4,4, 4,4,8,8,8,8,16,16,16,16,16,16 } length of password is selected in, calculates residue length, if not less than 16, after Continue this process, otherwise, turn in next step.In addition, the actual probabilities for choosing 4,8,16 are respectively 5/16,5/16,6/16, close at random Choose probability 1/3.The probability that the purpose so designed is chosen also for the 16bit bricks for making complexity stronger is more bigger, increases The complexity of strong algorithms.
The 3rd, if residue length is not less than 8, it is further continued for taking 1bit from u, if it is 0, selects 4bit password bricks;If 1, then Select 8bit password bricks.Residue length is calculated, if not less than 8, continues this process, otherwise, is turned in next step.
The 4th, if residue length is equal to 4, the size for selecting last password brick is 4bit.
The selection of password brick is thus completed based on more than.
Secondth, data backflow is determined;With reference to shown in figure 7;Because data flow into, when can be with one with the password brick of layer simultaneously Calculated in sequence, then exported simultaneously again, this seems " parallel connection " of password brick;And data backflow refers to one in same layer The output of password brick is re-entered into another password brick again, is calculated before and after can only dividing in different sequential, this is good Seem " series connection " of password brick.Data backflow changes the hierarchical structure of algorithm.Remember password brick A and password brick B respectively same On i-th, j (i < j) position of layer, its corresponding S-transformation is designated as converting S respectivelyi,Sj, input and be designated as a, b respectively, then:Right backflow Conversion:
Left backflow conversion:
Every layer of at most one data backflow of setting is provided on password wall, when generating establishment, it is necessary to generate every layer data The position (i, j) of the password brick of backflow and the password brick of flow direction.Due to every layer of most 16 password brick, because then often needing generation 2 Individual 4bit numbers make position i, the j of password brick, are led directly to if two numbers are identical;, then will be logical if i, j are more than actual password brick number M Modular arithmetic is crossed to be transformed within M:I mod M → i, j mod M → j.If password brick size is unequal, low level pair It is neat to carry out xor operation, then retain the result after XOR by inflow side's password brick size.Data backflow changes the level of algorithm Structure, two password transforms algorithm complex can be significantly increased, while the safety for increasing algorithm is strong into compound function relation Degree.
Further embodiment is that u highest 16bit (i.e. 48-63 positions) is divided into high and low byte, takes low byte Positions of the low 4bit as password brick in the side's of outflow in data backflow, take positions of the low 4bit of high byte as inflow side's password brick Put.
3rd, the operational parameter of password brick is determined.Because the algorithm parameter that password brick enters line translation is all 16bit times Number, arranges to choose since the brick of data backflow, from tti,j, (j=0,1 ..., 16) successively on demand choose use, until password Untill the parameter of brick has all been selected.
4th, intertexture layer parameter is determined.Calculate 64bit numbersThen the ginseng of intertexture is determined using v Number a, b, then making a take, v's is high 32, and b takes low 32, and forces ' 1 ' by minimum 1 of a ' 1 ', b of minimum 2 pressures.Interweave Layer is different from purely linear interlaced plies, and it not only acts as interleaving effect, also chaotic effect, is the application cryptographic algorithm security Basis.64bit is inputted, left and right two parts L, R, are 32bit respectively, according to interleave parameter a, b respectively;Then interleaved transforms are determined Justice is:
P is interleaved transforms;Wherein a, b are two 32bit parameters, and a meets that minimum two are ' 1 ', and b is odd number;P is byte For the linear transformation of unit, for inputting 32bit integers, the vector for being considered as 4 bytes carries out linear transformation;
Shown in the structure framework reference chart of password wall;The structure of more vivid displaying password wall;Password brick and interlaced plies It is to correspond, while each layer of password brick is of different sizes, causes the number of its every layer of password brick;Data simultaneously Outflow and inflow direction be also not quite similar.Data backflow is randomly provided in password brick layer, in fig. 8 only last One layer is indicated, the flow direction specifically set, to be deferred to and be set algorithm and draw.
In the present invention, among the one layer of password wall, the password brick of existing small size, also there is large-sized password Brick so that layer of structure is in picturesque disorder, changeful;The variable quantity of password brick is huge, therefore the encryption for information is more pacified It is complete reliable.
The present invention also provides a kind of embodiment of the detection method of the construction method of password wall, with reference to shown in figure 9;Including: Step S100 is according to default detected rule detecting to the password wall after generation;Step S200 judges the password wall Whether satisfaction presets detected rule, when being unsatisfactory for, regenerates password wall.
Preferably, the default detected rule described in the step S100 includes:Whether the S boxes conversion of the AES It is straight-through;And/or, if there is the S-transformation that multilayer password brick all have chosen same default size in same layer.
Specifically, with reference to shown in figure 9, in addition to whether the password brick layer chooses same default first S boxes in same layer Conversion;Wherein, when the password brick layer exceedes the default number of plies.The another implementation provided by the invention on the basis of above example Example, in usual cases, it may not be necessary to detect, directly use;In the case of security requirement is higher, such as mobile payment environment In, it should detect:1) whether S boxes lead directly to, and give up if all leading directly to, 16 yuan of probability given up with 256 yuan of S boxes are about 2-44×2-1684 =2-1728;2) 16 yuan of S-transformations are chosen entirely within one layer with the presence or absence of the password brick layer more than 4 layers, its probability is aboutGive up if in the presence of such situation.In view of the number of users of actual use, giving up situation " almost " will not Occur.Inspection rule:
Whether S boxes lead directly to, and give up if all leading directly to;16 yuan of S boxes s, s [i] are equal to i, i=0,1 ... 15, then abandon;256 First S boxes S, S [i] are equal to i, i=0,1 ... 255 are abandoned.The rule of detection is entered according to the security requirement of field of employment scape Row is preset.
In the present invention, by the detection to password wall construction method, the algorithm parameter of generation is detected, in engineering Side generation can be surveyed in implementation process with frontier inspection, if the algorithm of detection generation is unsatisfactory for rule set in advance, regenerates use Family key and generation user's algorithm.Make information more safe and reliable.
The present invention also provides a kind of embodiment of the encryption method of password wall, with reference to shown in figure 10, including:Step S100 from Confidential information to be added is obtained in user terminal;Step S200 inputs the confidential information to be added close to the equivalent layer in the password wall In stacking bricks;Step S300 carries out S-transformation to each password brick in the step S200, sets each password brick The direction of data backflow;Step S400 by the result that each password transform of respective layer in the step S300 changes input to In the interlaced plies of respective layer, conversion is interleaved;It is described close that step S500 judges whether the confidential information to be added has traveled through Each layer of code wall, when it is completed, exported the result that the interlaced plies calculate as encryption information;Otherwise, by the interlaced plies The result of calculating inputs the next round into the password wall, and returns and perform step S200.
Specifically, the realization of the description before root above example, data backflow and interlaced plies is clear, do not repeat now. Assuming that using 64bit plaintexts as the input data of the AES of a user, by the processing layer by layer of AES, output 64bit ciphertext data.Since the first of AES:1) input data is correspondingly input to this password brick layer, Mei Gemi Stack bricks and each carry out S-transformation calculating;If the password brick is related to data backflow, the meter of the password brick of outflow side is first handled Calculate, after the side's of outflow result of calculation and the input data of inflow side's password brick are carried out into XOR, be re-used as new input and carry out inflow side The calculating of password brick;2) after this password brick layer is fully completed calculating, the result of calculation of password brick layer is input to this interlaced plies, entered Row interleaved transforms;If 3) completed the calculating of all 16 wheels, exported the result of calculation of interlaced plies as ciphertext;Otherwise, will The result of calculation of interlaced plies turns 1) to continue next calculating as next input data.
The present invention also provides a kind of embodiment of the decryption method of the construction method of password wall, with reference to shown in figure 11, including: Step S100 obtains information to be decrypted from server;Step S200 inputs the information to be decrypted into the password wall In the interlaced plies of equivalent layer;Step S300 carries out inverse interleaved transforms to the interlaced plies of the equivalent layer in the step S200, The direction of the data backflow of each password brick of the interlaced plies respective layer is set;Step S400 hands over inverse in the step S300 In the result input each password brick of password brick layer for knitting conversion, inverse S-transformation is carried out;Step S500 judges that the information to be decrypted is The no each layer for having traveled through the password wall, it is when it is completed, the password brick is defeated as solution confidential information against the result that S-transformation calculates Go out;Otherwise, the password brick is inputted into next layer into the password wall against the result of S-transformation, and returns and perform step S200.
A kind of embodiment of the decryption method of the construction method of password wall is provided in the present embodiment, and decryption flow is to add The inverse process of close flow, is slightly different with encryption flow.Different, decryption is mainly manifested in password brick and interlaced plies processing mode When using S-transformation and interleaved transforms inverse transformation.In addition, data backflow, similarly needs against original direction flowing.Specifically , equally using 64bit ciphertexts as input data exemplified by, since the first of decipherment algorithm successively handle it is as follows:1) will be originally defeated Enter data input to this interlaced plies, carry out inverse interleaved transforms;2) result of calculation by the inverse transformation of this interlaced plies is input to this password Brick layer, each password brick each carry out the calculating of inverse S-transformation;If password brick is related to data backflow, by former outflow side Input data XOR is in the inverse S-transformation calculation result data of inflow side's password brick, the last output as inflow side's password brick As a result;If 3) complete 16 all to calculate, exported the result of calculation of this password brick layer as plaintext;Otherwise, by this password brick The result of calculation of layer turns 1) to continue the calculating of next round as next input data.
The present invention also provides a kind of embodiment of the constructing system of password wall, with reference to shown in figure 12;Including:Acquisition of information mould Block 100, server get parms configuration information according to the key information of user terminal;Information assigning module 200, is obtained with described information Modulus block 100 electrically connects, and server distributes the parameter configuration of acquisition to the corresponding parameter part of the password wall In;Relevant parameter part includes password brick, data backflow, interlaced plies in the password wall;Password wall construction module 300, with institute State information assigning module 200, the parameter configuration that server configures according to relevant parameter part in the password wall, structure Build the password wall.
Preferably, described information acquisition module 100 includes:Packet sets submodule 110, according to the key of the user terminal Information carries out packet setting;Initial information generates submodule 120, sets submodule 110 to electrically connect with the packet, according to first The key information for the user terminal being grouped after setting is carried out more wheel conversions by preset algorithm, and is generated initial parameter and matched somebody with somebody confidence Breath;Initial information transformation submodule 130, electrically connected with described information generation submodule 120, confidence is matched somebody with somebody according to the initial parameter Breath generates polynary S boxes;Information generates submodule 140, is electrically connected with the initial information transformation submodule 130, according to polynary S boxes And the initial parameter configuration information carries out S-transformation, generates the parameter configuration.
Preferably, described information distribute module 200 includes:Password brick parameter configuration submodule 210, according to from the parameter The first configuration parameter obtained in configuration information, the size of the password brick and the number of the password brick are set;Data are returned Parameter configuration submodule 220 is flowed, according to the second configuration parameter obtained from first configuration parameter, sets the data to return The data message flowing direction of stream, and the positional information in the password wall;Interleave parameter configures submodule 230, according to The 3rd configuration parameter obtained from the parameter configuration, the interleave parameter of the interlaced plies is set.
Specifically, in the present embodiment and it should be noted that information exchange in the system between each module, performed The contents such as journey are based on same design with above method embodiment, are converted in embodiments herein using S boxes, have property can Control, enormous amount, the distinguishing feature such as convenient is realized, widely used in block cipher design.In the design of the application password wall, The application has also selected basis of the S boxes as S-transformation, and using S-transformation as being formed important crypto module.But with general packet Unlike password design, the application employs variable S boxes, and variable range is not confined in the range of " optimal " S boxes, and It is in the range of symmetric group-i.e. all N members displacements.It is not difficult matter that variable S boxes are generated in optimized scope, because the application examines The starting point of worry problem is not some algorithm examples " indivedual " security, but the security of whole system.Pursuit system Safety, is that scope is the bigger the better naturally, no obvious characteristic, can not identify preferably.Generate S boxes at random in the range of symmetric group, User key information can be carried to greatest extent.Another consideration with variable S boxes is its irreversibility, i.e., if attacker Obtain the S boxes of some algorithm examples, it is also difficult to which backstepping obtains its generation step and then reduces configuration data, and this is also " whitepack " One principle of password design.The generation of S boxes and the fusion type recursion method of user key nonlinear extensions are devised, ensure that use Family key is effectively diffused into S boxes and configuration data;Devise based on 16 yuan of displacements and 256 yuan of displacements, be multiplexed by nesting The method for realizing 65536,4294967296 yuan of displacements.
In the present invention, the technical method of " counting to displacement at random " is devised, and the displacement operate less, generated is random, it is not easy to Decoded by disabled user, therefore securely and reliably.
Configured by the algorithm parameter uniformly, non-linearly expanded to 1024 bit User keys no less than 3856 bits Data, then the isolation technology by configuration data generating algorithm example.So that algorithm examples are sparsely distributed in 23856Individual configuration number According in the space of composition, average every 22832Individual configuration data only corresponds to an algorithm examples.Password brick realized by S-transformation, with Based on user key and the S boxes of initial-configuration data generation (alternately rolling), become by the nested compound S for realizing sizes Change.Because its size is different, the nested number of plies also differs with selected parameter, while changing operational parameter also to a certain degree Algorithm structure is changed, improves the personal distance between algorithms of different example.Data backflow refer to data from current layer certain The output of individual part will be returned among another part input of this layer;It is close according to the size of password turn, and in each layer The number that code turns, the data backflow direction of setting, and the parameter of interlaced plies, are built into a password wall so that user key With algorithm depth integration, the corresponding different encryption and decryption grouping algorithm of different user keys, namely password wall.This with it is traditional The method that block cipher distinguishes encryption and decryption function by encryption and decryption key is different.User key has merged with algorithm in the application, , will not be as needing continuous transposition encryption close during legacy packets password use and algorithm is used in authentication and consulting session key Key, thus there is no key schedule.Different keys correspond to algorithms of different, for cryptographic attack person, significantly enhance existing The difficulty that attack technology is attacked it, the diversity of password wall, multiple password walls are determined in the diversity of the application key A corresponding enciphering and deciphering algorithm cluster.
Packet setting is carried out according to the key information of the user terminal;The institute that will be grouped according to the first preset algorithm after setting The key information for stating user terminal carries out more wheel conversions, and generates initial parameter configuration information;According to the initial parameter of generation Configuration information generates S boxes;The generation parameter configuration is further calculated according to the result of above 3 steps, and it is close to carry out each wheel Stack bricks, the selection of data backflow, interlaced plies scheduling algorithm parameter;The acquisition of parameter configuration, the first step, based on user key, Produce initial-configuration data.Assuming that the key word joint number of user is 1024bit, as K0,…K15, K is divided naturally from low to high Into 16 64bit numbers, K is designated as respectively;Defined function:M (x)=x mod 4, n (x)=x mod 16,A is remembered againi(i=0,1,2,3) is 64bit numbers, and initial value is preset as 0X5555555555555555;(i=0,1 ..., 15) it is 6bit numbers, 17,27,37,47,17,27,37,47 are followed successively by, 17,27,37,47,17,27,37,47。Di(i=0,1 ..., 15) it is 64bit numbers, successively:
e7587fb070245d81,59377783eda99126,785ff6d8a555b001,
8f58e8945cf65ca9,f46c818ff7c470fb,a5855ee2a3e52db9,c55c32da2a35f5d0, e84d05e769aeab45,ddd7b6484638b3eb,1ec6846a2e738656,c969ef9ea9d44575, 062df4a6915aa787,6b5a4a15153b0894,96568dcbc697e2a5,9c822a1b405de76c, Cefc0f5d02035730, then when generating initial-configuration data, it is necessary to a0,a1,a2,a324 conversion are carried out, are often carried out 16 times Conversion, then the i-th jth time transform definition is as follows:Namely first preset algorithm;
Wherein Δi=7i be i-th offset, i=0,1 ..., 23, j=0,1 ..., 15;16 since the i-th=8 A is exported after the completion of secondary calculating0,a1,a2,a3Value, often export 256bit, export 16 altogether, generate 4096bit initial-configuration datas.
Second step, 16 yuan of S boxes s are generated using initial-configuration data.Initial-configuration data totally 512 byte, is designated as { tiI= 0,1,2 ..., 511, then by tiHigh 4 be designated as respectively with low 4S boxes are first preset into unit displacement, exchanged in s Address isContent i=256,257 ..., 511, i.e.,256 exchanges are carried out altogether, and the s after exchange makees For 16 yuan of S boxes in AES.
3rd step, 256 yuan of S boxes S are generated using s and initial-configuration data.First, the preset S box SS of s are utilized:Generated again by feeding back carry addition Exchange starting point:U256,V256:Make U0=0, V0=0, calculate (i=0,1,1,255), Ui+1=((Ui+ti> > 8)+(Ui+ti))& 0xff;Vi+1=((Vi+ti+256> > 8)+(Vi+ti+256))&0xff;Then, 256 exchanges are carried out to SS, exchange address in SS For the i-th+U256Mod 256, ti+ 256, the content of unit, i=0,1,1,255;Finally, make S=SS, to S carry out 256 times it is right Change, it is the i-th+V to exchange address in S256mod 256、tiThe content of unit, i=0,1 ..., 255.Encryption is thus generated to calculate The 256 yuan of S box S used in method, while obtain the S boxes SS used in a generating process.
4th step, on the basis of above, parameter configuration data is generated, and carry out each password brick, data backflow, interlaced plies The selection of scheduling algorithm parameter.Take the computational methods of the 1st step, a0,a1,a2,a3It is still to retain the number calculated in the 1st step when completing According to the i.e. last 256bit of initial-configuration data;32 64bit numbers are divided into being one group by 8 units instead of table SS, are designated as SSi, i=0,1 ..., 31;Calculate again
Wherein, Δi=7i be i-th offset, i=0,1 ..., 15, j=0,1 ..., 15.From every wheel all 16 A is exported after the completion of secondary calculating0,a1,a2,a3Value, often export 256bit, export 16 altogether, generate 4096bit parameter configuration datas That is parameter configuration.
In the present invention, the password wall of generation, namely generating algorithm, then it is in line with fully merging key with AES Purpose and design, require that each algorithm parameter (including S boxes) meets random distribution in principle, user is different and algorithm is different;It is real Show first, no key information leakage, even if attacker has obtained user cipher algorithm, can not therefrom reduce to obtain user close Key;Second, be at a distance sufficiently large between algorithm examples, even if user key relatively when, the difference between algorithm is also sufficiently large.
Preferably, the S-transformation includes at least one layer:The mathematical modeling of individual layer S-transformation is:X→S[X±Cmod2n];Its In, S--S boxes, n--S boxes preset size, and C is the parameter of the S boxes randomly selected according to the key information of user terminal;
The mathematical modeling of multilayer S-transformation is:
Wherein,
S--S is converted, and n--S conversion pre-set dimensions, C is the S-transformation parameter randomly selected according to the key information of user terminal; X, Y are respectively the input high byte of multilayer S-transformation, low byte;The output high byte of X ', Y ' respectively multilayer S-transformation, low word Section.
The 4096bit parameter configuration datas i.e. parameter configuration generated in an embodiment more than is allocated, it is close Each parameter part in code wall carries out not decile, it is assumed that it is 3072bit, as the first configuration parameter to distribute to password brick;From Password brick 3072bit is 1024bit, as the second configuration parameter distributing to data backflow;Distributing to interlaced plies is 1024bit, as the 3rd configuration parameter;Specifically distribute to obtain parameter configuration to methods, and the mould that counts being related to Type includes following:In 4096bit parameter configuration datas determine password wall in parameters part spatial content namely oneself Several size etc.:
Firstth, password brick number and size are determined.Determine that password brick number and size are to carry out calculating generation based on S-transformation 's;Including individual layer and multilayer;Individual layer S-transformation:Assuming that when password brick n size is 4bit or 8bit, S-transformation directly invokes S Box, note X input for n-bit, then are specially:
Wherein, n-bit parameter C is generated at random by generating algorithm, and is randomly selected using addition or subtraction, according to size N determinations use 16 yuan of S boxes s or 256 yuan of S box S, and they are generated at random according to user key by generating algorithm.
Multilayer S-transformation:Assuming that when password brick n size is 16bit or 32bit, S-transformation is respectively by 8bit and 16bit S-transformation nesting allocation be combined;Also include G simultaneously to convert, G conversion:
Wherein C is the parameter randomly selected;The input of S-transformation It is divided into left and right two parts, is designated as X, Y respectively;Equally, output is designated as X', Y';In order to distinguish, nbit S-transformation is designated as Sn:(X, Y)→Sn(X, Y)=(X', Y'), then have:
S-transformation, the parameter of G conversion are all randomly selected by generating algorithm, not identical.Can be with from mathematical modeling Find out, 16bit S-transformation converts two layers of generation by 8bit S-transformation with G, and layer of structure can be considered two layers;32bit S-transformation Two layers of generation is converted by 16bit S-transformation and G, is just 4 layers when summing up in the point that 8bit S-transformation generates with G conversion.
Further determine that the parameter information of password wall all parts is specific as follows;
Firstth, the size that password turns is determined;
For the more vivid materialization of the present embodiment, it is assumed that 4096bit parameter configuration datas are divided into 16 256bit numbers, It is designated as Ti(i=0,1 ..., 15), then to i-th of 256bit numbers Ti, t is designated as in units of 64 bitsi,j(j=0,1 ..., 3), Tt is designated as in units of 16 bitsi,j(j=0,1 ..., 16).
First, 64bit numbers are calculatedThen password brick number and each brick size are determined using u, had Body is as follows:
1st, 2bit is taken from low to high successively to u, when the value of this 2bit number:When for 0 when, it is 4bit to take password brick length;For 1 When, it is 8bit to take password brick length;For 2 when, it is 16bit to take password brick length;For 3 when, it is 32bit to take password brick length.Press The method, select password brick backward successively, and constantly subtract the length for having chosen password brick successively from original length 64bit, until Residue length is less than or equal to stop when 0.When residue length is equal to 0, algorithm terminates;During less than 0, the password brick finally selected is given up Abandon, and recalculate residue length.
If the 2nd, residue length be not less than 16, be further continued for taking 4bit from u, its value as address from array 4,8,4,4, 4,4,8,8,8,8,16,16,16,16,16,16 } length of password is selected in, calculates residue length, if not less than 16, after Continue this process, otherwise, turn in next step.In addition, the actual probabilities for choosing 4,8,16 are respectively 5/16,5/16,6/16, close at random Choose probability 1/3.The probability that the purpose so designed is chosen also for the 16bit bricks for making complexity stronger is more bigger, increases The complexity of strong algorithms.
The 3rd, if residue length is not less than 8, it is further continued for taking 1bit from u, if it is 0, selects 4bit password bricks;If 1, then Select 8bit password bricks.Residue length is calculated, if not less than 8, continues this process, otherwise, is turned in next step.
The 4th, if residue length is equal to 4, the size for selecting last password brick is 4bit.
The selection of password brick is thus completed based on more than.
Secondth, data backflow is determined;With reference to shown in figure 7;Because data flow into, when can be with one with the password brick of layer simultaneously Calculated in sequence, then exported simultaneously again, this seems " parallel connection " of password brick;And data backflow refers to one in same layer The output of password brick is re-entered into another password brick again, is calculated before and after can only dividing in different sequential, this is good Seem " series connection " of password brick.Data backflow changes the hierarchical structure of algorithm.Remember password brick A and password brick B respectively same On i-th, j (i < j) position of layer, its corresponding S-transformation is designated as converting S respectivelyi,Sj, input and be designated as a, b respectively, then:Right backflow Conversion:
Left backflow conversion:
Every layer of at most one data backflow of setting is provided on password wall, when generating establishment, it is necessary to generate every layer data The position (i, j) of the password brick of backflow and the password brick of flow direction.Due to every layer of most 16 password brick, because then often needing generation 2 Individual 4bit numbers make position i, the j of password brick, are led directly to if two numbers are identical;, then will be logical if i, j are more than actual password brick number M Modular arithmetic is crossed to be transformed within M:I mod M → i, j mod M → j.If password brick size is unequal, low level pair It is neat to carry out xor operation, then retain the result after XOR by inflow side's password brick size.Data backflow changes the level of algorithm Structure, two password transforms algorithm complex can be significantly increased, while the safety for increasing algorithm is strong into compound function relation Degree.
Further embodiment is that u highest 16bit (i.e. 48-63 positions) is divided into high and low byte, takes low byte Positions of the low 4bit as password brick in the side's of outflow in data backflow, take positions of the low 4bit of high byte as inflow side's password brick Put.
3rd, the operational parameter of password brick is determined.Because the algorithm parameter that password brick enters line translation is all 16bit times Number, arranges to choose since the brick of data backflow, from tti,j, (j=0,1 ..., 16) successively on demand choose use, until password Untill the parameter of brick has all been selected.
4th, intertexture layer parameter is determined.Calculate 64bit numbersThen the ginseng of intertexture is determined using v Number a, b, then making a take, v's is high 32, and b takes low 32, and forces ' 1 ' by minimum 1 of a ' 1 ', b of minimum 2 pressures.Interweave Layer is different from purely linear interlaced plies, and it not only acts as interleaving effect, also chaotic effect, is the application cryptographic algorithm security Basis.64bit is inputted, left and right two parts L, R, are 32bit respectively, according to interleave parameter a, b respectively;Then interleaved transforms are determined Justice is:
P is interleaved transforms;Wherein a, b are two 32bit parameters, and a meets that minimum two are ' 1 ', and b is odd number;P is byte For the linear transformation of unit, for inputting 32bit integers, the vector for being considered as 4 bytes carries out linear transformation;
Shown in the structure framework reference chart of password wall;The structure of more vivid displaying password wall;Password brick and interlaced plies It is to correspond, while each layer of password brick is of different sizes, causes the number of its every layer of password brick;Data simultaneously Outflow and inflow direction be also not quite similar.Data backflow is randomly provided in password brick layer, in fig. 8 only last One layer is indicated, the flow direction specifically set, to be deferred to and be set algorithm and draw.
In the present invention, among the one layer of password wall, the password brick of existing small size, also there is large-sized password Brick so that layer of structure is in picturesque disorder, changeful;The variable quantity of password brick is huge, therefore the encryption for information is more pacified It is complete reliable.
The present invention also provides a kind of embodiment of the detecting system of password wall construction system, including:Detection module 100, root According to default detected rule detecting to the password wall after generation;Judge module 200 is detected, with the detection module 100 electrical connections, judge whether the password wall meets default detected rule;When being unsatisfactory for, password wall is regenerated;Wherein, Described default detected rule includes:Whether the S boxes conversion of the AES leads directly to;And/or, if there is multilayer password brick to exist Same layer all have chosen the S-transformation of same default size.
The present invention also provides a kind of embodiment of the encryption system of password wall, with reference to shown in figure 13, including:Confidential information to be added Acquisition module 100, confidential information to be added is obtained from user terminal;MIM message input module 200 to be encrypted, obtained with the confidential information to be added Modulus block 100 is electrically connected, and the confidential information to be added is inputted into the password brick of the equivalent layer in the password wall;Data backflow Direction setup module 300, electrically connected with the MIM message input module 200 to be encrypted, to the MIM message input module 200 to be encrypted In each password brick carry out S-transformation, the direction of the data backflow of each password brick is set;Interleaved transforms module 400, electrically connected with data backflow direction setup module 300, by respective layer in data backflow direction setup module 300 The result changed of each password transform input into the interlaced plies of respective layer, be interleaved conversion;Confidential information to be added Processing module 500, electrically connected with the interleaved transforms module 400, judge whether the confidential information to be added has traveled through the password Each layer of wall, when it is completed, exported the result that the interlaced plies calculate as encryption information;Otherwise, by the interlaced plies meter The result of calculation inputs next layer into the password wall, and controls the MIM message input module to be encrypted 200, and performs by described in Confidential information to be added is inputted into each password brick of the equivalent layer in the password wall.
The present invention also provides a kind of embodiment of the decryption system of password wall, with reference to shown in figure 14, including:Information to be decrypted Acquisition module 100, information to be decrypted is obtained from server;MIM message input module 200 to be decrypted, obtained with the information to be decrypted Modulus block 100 is electrically connected, and the information to be decrypted is inputted into the interlaced plies of the equivalent layer in the password wall;Data backflow Direction setup module 300, electrically connected with the MIM message input module 200 to be decrypted, to the MIM message input module 200 to be decrypted In the interlaced plies of the equivalent layer carry out inverse interleaved transforms, set the data of each password brick of the interlaced plies respective layer to return The direction of stream;Inverse S-transformation module 400, is electrically connected with data backflow direction setup module 300, by the data backflow side Into setup module 300 in the result input each password brick of password brick layer of inverse interleaved transforms, inverse S-transformation is carried out;Letter to be decrypted Processing module 500 is ceased, is electrically connected with the interleaved transforms against module 400, it is described to judge whether the information to be decrypted has traveled through Each layer of password wall, when it is completed, the password brick is exported against the result that S-transformation calculates as solution confidential information;Otherwise, by institute State password brick and input next layer into the password wall against the result of S-transformation, and control the MIM message input module to be decrypted 200, and perform and input the information to be decrypted into the interlaced plies of the equivalent layer in the password wall.
It should be noted that in the encryption system of the password wall of the application and the decryption system of password wall between each module The contents such as information exchange, implementation procedure and above method embodiment are based on same design, and particular content can be found in the inventive method Narration in embodiment, here is omitted.
One specific embodiment, the specific implementation for password brick S-transformation are also provided in this application:X is remembered for input, Y is output.To transmit and choosing conveniently, the parameter of password brick is all in units of 16bit.
1st, when password brick size is 4bit, it is necessary to 5bit algorithm parameters, it is actual pass 16bit data (c15, C14 ... c2, c1, c0), if c8=0, calculate y=s [x+c3c2c1c0mod 16];Otherwise, during c8=1, then y is calculated =s [x-c3c2c1c0 mod 16];
2nd, when password brick size is 8bit, it is necessary to 9bit algorithm parameters, it is actual pass 16bit data (c15, C14 ... c2, c1, c0), if c8=0, calculate
Y=S [x+c7c6c5c4c3c2c1c0 mod 256];Otherwise, if during c8=1, calculate
Y=S [x-c7c6c5c4c3c2c1c0 mod 256];
3rd, when password brick size is 16bit, it is necessary to 32bit algorithm parameters, it is actual pass 2 16bit parameters C=(c15, C14 ... c2, c1, c0), D=(d15, d14......d2, d1, d0).The 16bit x of input are divided into two by byte Height two parts a, b, then 4 steps are divided to complete S-transformation:
If 1) c8=0, b1=S [b+c7c6c5c4c3c2c1c0 mod 256] is calculated;Otherwise, during c8=1, then calculate B1=S [b-c7c6c5c4c3c2c1c0 mod 256];
2) calculate
Wherein, c15 c14 c13 c12 c11 c10 c9 1 refer to that the last 1bit of this 8bit number is forced to 1;
If 3) d8=0, a2=S [a1+d7d6d5d4d3d2d1d0 mod 256] is calculated;Otherwise, during d8=1, then count Calculate a2=S [a1-d7d6d5d4d3d2d1d0 mod 256];
4) calculate
Wherein d15 d14 d13 d12 d11 d10 d9 1 are forced to 1 equivalent to the last 1bit of this 8bit number;Then S-transformation Result y=a2 < < 8 | b2, i.e. a2,b2Respectively transformation results y high by 8, low 8bit.
4th, when password brick size is 32bit, it is necessary to 6 16bit algorithm parameters C0,C1,C2,C3,C4,C5, by input 32bit, it is divided into height two 16bit number A, B, then calculates
1) using password brick size be 16bit when transform method, using B as input, C0,C1For algorithm parameter, calculate 16bit S-transformation, its 16bit transformation results are designated as B1;
2) calculateWherein C2 | 1 expression C2 last 1bit is forced to 1;
3) 16bit transform method is utilized, using A1 as input, C3,C4For algorithm parameter, 16bit S-transformation is calculated, its 16bit transformation results are designated as A2;
4) calculateWherein C5 | 1 expression C5 last 1bit is forced to 1;Then S The result y=A2 < < 16 of conversion | B2, i.e. A2, B2 are respectively transformation results y high by 16, low 16bit.
In the present invention, it is generating algorithm that the structure of password wall, which includes two parts one, is each user according to user key Generate enciphering and deciphering algorithm;Second, block encryption algorithm, different and different with user, it can broadly regard class SP structures as.Add Close algorithm is by being randomly provided to generate to password brick, interlaced plies and data backflow.
In the present invention, a variety of basic components, sizes specification, a variety of hierarchical structures, a variety of data flows are employed. Figuratively, built just as lid building with the password brick of different size, different levels structure, different operating parameter into a floor, then It is used alternatingly with different configuration of interlaced plies, erects the mansion of cryptographic algorithm in layer;Encryption when data from top to bottom Transmitted successively and computing, but the situation to flow back backward in some places be present, upset data flow and the sequential of computing, Equivalent to the hierarchical structure of the algorithm of change.
In this application, SOTP cryptographic algorithms namely the method for building scrambler, use password brick, interlaced plies, data Three new ideas such as backflow, other predicate uses meet usual arthmetic statement custom, are briefly described below:
1st, password brick.Password brick is password primary clustering, using the S boxes generated at random, by directly or nested raw by it Into S-transformation complete operation, including replace, the computing such as addition and subtraction, XOR in integer item.
Password brick part mainly provides necessary non-linear, has the function that internal " confusion ".Due to larger-size close Stack bricks and can be regarded as being formed by MULTILAYER COMPOSITE conversion by the less password brick of size, therefore, password brick can also produce logic The effect of layer of structure " confusion ".
When generating enciphering and deciphering algorithm for each user, the random operating parameter for generating password brick.
2nd, data backflow.Data backflow refers to the normal data flow direction for changing password brick, by the computing knot of a password brick Fruit is input in this layer another password brick and goes to be handled again, including the situation such as straight-through, left backflow, right backflow.Data backflow The logical construction hierarchical relationship of algorithm can be changed, significantly strengthen the complexity of algorithm, improve the security intensity of password.Participate in number Randomly selected according to the associated cryptographic brick of backflow when generating user's enciphering and deciphering algorithm.
3rd, interlaced plies.Interlaced plies can by the computing output information of each password brick as homogeneously as possible, rapidly, it is even non- Linearly interweave and arrive other positions.Interlaced plies main function is " intertexture ", is only risen with the interlaced plies in traditional SP cryptographic algorithms Linear interleaving effect is different, and it plays a part of non-linear " confusion " simultaneously, is the important foundation for security of SOTP algorithms.
4th, symbol and abbreviation.
K:For 1024bit, for generating the user key of enciphering and deciphering algorithm, user's difference key is also different;
s:4bit replaces table, i.e., 16 yuan of S boxes;
S:8bit replaces table, i.e., 256 yuan of S boxes;
G is converted:The conversion carried out using ring Z2n and domain F2 coalgebras computing;
S-transformation:The nonlinear transformation formed using S boxes directly or by nested extension;
P:Byte is the linear transformation of unit;
⊕:XOR;
+:Arithmetic adds;
-:Arithmetic subtracts;
<<<:Ring shift left;
The application in arthmetic statement, using it is random generate or randomly select wait term, only indicate that it meets and divide at random Cloth, rather than truly random, accurately expression, which should be, is generated in a manner of meeting random distribution or chosen etc, so abbreviation, is only Style of writing is convenient.
It should be noted that above-described embodiment can independent assortment as needed.Described above is only the preferred of the present invention Embodiment, it is noted that for those skilled in the art, do not departing from the premise of the principle of the invention Under, some improvements and modifications can also be made, these improvements and modifications also should be regarded as protection scope of the present invention.

Claims (18)

  1. A kind of 1. construction method of password wall, it is characterised in that including:
    Step S100 gets parms configuration information according to the key information of user terminal;
    Step S200 distributes the parameter configuration of acquisition into the corresponding parameter part of the password wall;The password Relevant parameter part includes password brick, data backflow, interlaced plies in wall;
    The parameter configuration that step S300 configures according to relevant parameter part in the password wall, builds the password Wall.
  2. 2. the construction method of password wall according to claim 1, it is characterised in that the step S100 includes:
    Step S110 carries out packet setting according to the key information obtained from user terminal to the key information;
    The key information being grouped after setting is carried out more wheel conversions by step S120 according to the first preset algorithm, and is generated initial Parameter configuration;
    Step S130 generates polynary S boxes according to the initial parameter configuration information;
    Step S140 carries out S-transformation according to polynary S boxes and the initial parameter configuration information, generates the parameter configuration letter Breath.
  3. 3. the construction method of password wall according to claim 1, it is characterised in that the step S200 includes:
    Step S210 according to the first configuration parameter obtained from the parameter configuration, set the size of the password brick with And the number of the password brick;
    Step S220 sets the data of the data backflow according to the second configuration parameter obtained from first configuration parameter Information flow direction, and the positional information in the password wall;
    Step S230 sets the intertexture of the interlaced plies to join according to the 3rd configuration parameter obtained from the parameter configuration Number.
  4. 4. the construction method of password wall according to claim 3, it is characterised in that wherein one layer of institute in the password wall is set The size and number for stating password brick include:
    Step S211 carries out packet setting according to default amount of bytes to first configuration parameter, and forms multigroup first configuration Parameter sub-information;
    First configuration parameter sub-information is carried out height byte align by step S212;
    Step S213 chooses corresponding predetermined number in the first configuration parameter sub-information after the step S212 presses byte align High low byte parameter information, and calculated according to the second preset algorithm;
    Step S214 confirms the length of password brick according to the result of calculation of the step S213;
    Step S215 length of password brick according to the step S214 and the first configuration parameter sub-information length gauge Calculate the residue length of the first configuration parameter sub-information parameter;
    Step S216 residue lengths of the first configuration parameter sub-information according to the step S215 and change are described default Amount of bytes, calculate password brick length;Repeat step S215 and step S216;Determine the password turn of respective layer The number that size and the password turn.
  5. 5. the construction method of password wall according to claim 4, it is characterised in that the data backflow for setting the password to turn:
    Step S221 chooses the configuration parameter sub-information of preset byte amount in the first configuration parameter sub-information;
    The configuration parameter sub-information chosen in the step S221 is divided into low byte position and high byte position by step S222;
    Low byte position after in the step S222 points is arranged to the data flow outgoing direction position of the password turn by step S223, The high byte position is arranged to the data inflow direction position that the password turns.
  6. 6. the construction method of password wall according to claim 4, it is characterised in that the interleave parameter bag of the interlaced plies is set Include:
    Step 231 carries out packet setting according to default amount of bytes to the 3rd configuration parameter, and forms multigroup 3rd configuration Parameter sub-information;Wherein, the step 231 is corresponding according to default amount of bytes with the step S211 according to default amount of bytes It is equal;
    Step 232 is calculated the 3rd configuration parameter sub-information according to the 3rd preset algorithm;
    The result that step 233 is calculated the 3rd configuration parameter sub-information according to the step S232, determines the friendship The interleave parameter of tissue layer.
  7. 7. the construction method of password wall according to claim 2, it is characterised in that the S-transformation includes at least one layer:
    The mathematical modeling of individual layer S-transformation is:X→S[X±Cmod2n];
    Wherein, S--S boxes, n--S boxes preset size, and C is the parameter of the S boxes randomly selected according to the key information of user terminal;
    The mathematical modeling of multilayer S-transformation is:
    <mrow> <mfenced open = "{" close = ""> <mtable> <mtr> <mtd> <msup> <mi>X</mi> <mo>&amp;prime;</mo> </msup> <mo>=</mo> <msub> <mi>S</mi> <mrow> <mi>n</mi> <mo>/</mo> <mn>2</mn> </mrow> </msub> <mo>(</mo> <mi>G</mi> <mrow> <mo>(</mo> <mrow> <mi>X</mi> <mo>,</mo> <msub> <mi>S</mi> <mrow> <mi>n</mi> <mo>/</mo> <mn>2</mn> </mrow> </msub> <mrow> <mo>(</mo> <mi>Y</mi> <mo>)</mo> </mrow> </mrow> <mo>)</mo> </mrow> <mo>)</mo> </mtd> </mtr> <mtr> <mtd> <msup> <mi>Y</mi> <mo>&amp;prime;</mo> </msup> <mo>=</mo> <mi>G</mi> <mo>(</mo> <msub> <mi>S</mi> <mrow> <mi>n</mi> <mo>/</mo> <mn>2</mn> </mrow> </msub> <mrow> <mo>(</mo> <mi>Y</mi> <mo>)</mo> </mrow> <mo>,</mo> <msup> <mi>X</mi> <mo>&amp;prime;</mo> </msup> <mo>)</mo> </mtd> </mtr> </mtable> </mfenced> <mo>;</mo> </mrow>
    Wherein,
    S--S is converted, and n--S conversion pre-set dimensions, C is the S-transformation parameter randomly selected according to the key information of user terminal;X,Y The respectively input high byte of multilayer S-transformation, low byte;The output high byte of X ', Y ' respectively multilayer S-transformation, low byte.
  8. 8. the construction method of password wall according to claim 3, it is characterised in that the password wall of the user terminal includes At least one layer structure generation;
    Wherein, every layer of order of the password wall is followed successively by the password brick, the interlaced plies;
    The password brick is of different sizes in each layer, and the number of the password brick is different.
  9. A kind of 9. detection method of the executable construction method of password wall as described in claim 1-8 is any, it is characterised in that bag Include:
    Step S100 is according to default detected rule detecting to the password wall after generation;
    Step S200 judges whether the password wall meets default detected rule, when being unsatisfactory for, regenerates password wall.
  10. 10. the detection method of password wall construction method according to claim 9, it is characterised in that in the step S100 Described default detected rule includes:
    Whether the S boxes conversion of the AES leads directly to;And/or
    Whether S-transformation that multilayer password brick in same layer all have chosen same default size is had.
  11. 11. a kind of encryption method of password wall, include the construction method of the executable password wall as described in claim 1-8 is any, It is characterised in that it includes:
    Step S100 obtains confidential information to be added from user terminal;
    Step S200 inputs the confidential information to be added into the password brick of the equivalent layer in the password wall;
    Step S300 carries out S-transformation to each password brick in the step S200, sets the number of each password brick According to the direction of backflow;
    Step S400 inputs the result that each password transform of respective layer in the step S300 changes to the institute of respective layer State in interlaced plies, be interleaved conversion;
    Step S500 judges whether the confidential information to be added has traveled through each layer of the password wall, when it is completed, by the intertexture The result that layer calculates exports as encryption information;Otherwise, under the result that the interlaced plies calculate is inputted into the password wall One wheel, and return and perform step S200.
  12. 12. a kind of decryption method of password wall, include the construction method of the executable password wall as described in claim 1-8 is any, It is characterised in that it includes:
    Step S100 obtains information to be decrypted from server;
    Step S200 inputs the information to be decrypted into the interlaced plies of the equivalent layer in the password wall;
    Step S300 carries out inverse interleaved transforms to the interlaced plies of the equivalent layer in the step S200, sets the interlaced plies The direction of the data backflow of each password brick of respective layer;
    Step S400 carries out inverse S by the result input each password brick of password brick layer of inverse interleaved transforms in the step S300 Conversion;
    Step S500 judges whether the information to be decrypted has traveled through each layer of the password wall, when it is completed, by the password Brick is against the result that S-transformation calculates as solution confidential information output;Otherwise, the password brick is inputted to described against the result of S-transformation Next layer in password wall, and return and perform step S200.
  13. A kind of 13. constructing system of the executable construction method of password wall as described in claim 1-8 is any, it is characterised in that Including:
    Data obtaining module, server get parms configuration information according to the key information of user terminal;
    Information assigning module, electrically connected with described information acquisition module, server distributes the parameter configuration of acquisition Into the corresponding parameter part of the password wall;Relevant parameter part includes password brick, data backflow, intertexture in the password wall Layer;
    Password wall construction module, with described information distribute module, server configures according to relevant parameter part in the password wall The parameter configuration, build the password wall.
  14. 14. the constructing system of password wall according to claim 13, it is characterised in that described information acquisition module includes:
    Packet sets submodule, and packet setting is carried out according to the key information of the user terminal;
    Initial information generates submodule, sets submodule to electrically connect with the packet, will be grouped and set according to the first preset algorithm The key information of the user terminal afterwards carries out more wheel conversions, and generates initial parameter configuration information;
    Initial information transformation submodule, electrically connect with described information generation submodule, given birth to according to the initial parameter configuration information Into polynary S boxes;
    Information generates submodule, is electrically connected with the initial information transformation submodule, according to polynary S boxes and the initial parameter Configuration information carries out S-transformation, generates the parameter configuration.
  15. 15. the constructing system of password wall according to claim 13, it is characterised in that described information distribute module includes:
    Password brick parameter configuration submodule, according to the first configuration parameter obtained from the parameter configuration, described in setting The number of the size of password brick and the password brick;
    Data backflow parameter configuration submodule, according to the second configuration parameter obtained from first configuration parameter, institute is set State the data message flowing direction of data backflow, and the positional information in the password wall;
    Interleave parameter configures submodule, according to the 3rd configuration parameter obtained from the parameter configuration, sets the friendship The interleave parameter of tissue layer.
  16. A kind of 16. detecting system of password wall construction system, it is characterised in that including:
    Detection module, according to default detected rule detecting to the password wall after generation;
    Judge module is detected, is electrically connected with the detection module, judges whether the password wall meets default detected rule;
    When being unsatisfactory for, password wall is regenerated;
    Wherein, described default detected rule includes:
    Whether the S boxes conversion of the AES leads directly to;And/or
    Whether S-transformation that multilayer password brick in same layer all have chosen same default size is had.
  17. 17. a kind of encryption system of password wall, include the encryption method of the executable password wall of kind as claimed in claim 11, it is special Sign is, including:
    Data obtaining module to be encrypted, confidential information to be added is obtained from user terminal;
    MIM message input module to be encrypted, electrically connected with the data obtaining module to be encrypted, by the confidential information to be added input to In the password brick of equivalent layer in the password wall;
    Data backflow direction setup module, electrically connected with the MIM message input module to be encrypted, the confidential information to be added is inputted Each password brick in module carries out S-transformation, sets the direction of the data backflow of each password brick;;
    Interleaved transforms module, electrically connected with data backflow direction setup module, by data backflow direction setup module The result that each password transform of middle respective layer changes is inputted into the interlaced plies of respective layer, is interleaved conversion;
    Message processing module to be encrypted, electrically connected with the interleaved transforms module, judge whether the confidential information to be added has traveled through Each layer of the password wall, when it is completed, exported the result that the interlaced plies calculate as encryption information;Otherwise, by described in The result that interlaced plies calculate inputs next layer into the password wall, and controls the MIM message input module to be encrypted, and performs The confidential information to be added is inputted into each password brick of the equivalent layer in the password wall.
  18. 18. a kind of decryption system of password wall, include the encryption method of the executable password wall of kind as claimed in claim 12, it is special Sign is, including:
    Data obtaining module to be decrypted, information to be decrypted is obtained from server;
    MIM message input module to be decrypted, electrically connected with the data obtaining module to be decrypted, by the information to be decrypted input to In the interlaced plies of equivalent layer in the password wall;
    Data backflow direction setup module, electrically connected with the MIM message input module to be decrypted, the information to be decrypted is inputted The interlaced plies of the equivalent layer in module carry out inverse interleaved transforms, set the number of each password brick of the interlaced plies respective layer According to the direction of backflow;
    Inverse S-transformation module, is electrically connected with data backflow direction setup module, by the setup module of the data backflow direction In the result input each password brick of password brick layer of inverse interleaved transforms, inverse S-transformation is carried out;
    Message processing module to be decrypted, electrically connected with the interleaved transforms against module, judge whether the information to be decrypted travels through Each layer of the complete password wall, when it is completed, the password brick is exported against the result that S-transformation calculates as solution confidential information;It is no Then, the password brick is inputted into next layer into the password wall against the result of S-transformation, and controls the information input to be decrypted Module, and perform and input the information to be decrypted into the interlaced plies of the equivalent layer in the password wall.
CN201710319769.3A 2017-05-09 2017-05-09 A kind of construction method and system of password wall Pending CN107425963A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710319769.3A CN107425963A (en) 2017-05-09 2017-05-09 A kind of construction method and system of password wall
PCT/CN2017/100288 WO2018205469A1 (en) 2017-05-09 2017-09-01 Method for constructing password wall and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710319769.3A CN107425963A (en) 2017-05-09 2017-05-09 A kind of construction method and system of password wall

Publications (1)

Publication Number Publication Date
CN107425963A true CN107425963A (en) 2017-12-01

Family

ID=60425926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710319769.3A Pending CN107425963A (en) 2017-05-09 2017-05-09 A kind of construction method and system of password wall

Country Status (2)

Country Link
CN (1) CN107425963A (en)
WO (1) WO2018205469A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115883065A (en) * 2022-11-26 2023-03-31 郑州信大华芯信息科技有限公司 Method, device, chip and storage medium for quickly realizing software encryption and decryption based on variable S box

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025484A (en) * 2010-12-17 2011-04-20 北京航空航天大学 Block cipher encryption and decryption method
CN102594546A (en) * 2006-09-01 2012-07-18 索尼株式会社 Message processing module
US8452006B2 (en) * 2010-03-18 2013-05-28 Lsi Corporation Cryptographic processing using a processor
CN104137467A (en) * 2012-03-02 2014-11-05 索尼公司 Information processing device, information processing method, and programme
CN104751065A (en) * 2015-03-09 2015-07-01 哈尔滨工程大学 Encryption method for geographic information product file

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101764686B (en) * 2010-01-11 2013-01-02 石家庄开发区冀科双实科技有限公司 Encryption method for network and information security
CN102185692B (en) * 2011-04-25 2012-07-04 北京航空航天大学 Multimode reconfigurable encryption method based on advanced encryption standard (AES) encryption algorithm
CN104052595B (en) * 2014-05-23 2017-02-08 戴葵 Cryptographic algorithm customizing method
CN105681026B (en) * 2016-03-10 2019-06-18 中国科学院计算技术研究所 Dynamic S-box building method and system suitable for lightweight encryption algorithm

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102594546A (en) * 2006-09-01 2012-07-18 索尼株式会社 Message processing module
US8452006B2 (en) * 2010-03-18 2013-05-28 Lsi Corporation Cryptographic processing using a processor
CN102025484A (en) * 2010-12-17 2011-04-20 北京航空航天大学 Block cipher encryption and decryption method
CN104137467A (en) * 2012-03-02 2014-11-05 索尼公司 Information processing device, information processing method, and programme
CN104751065A (en) * 2015-03-09 2015-07-01 哈尔滨工程大学 Encryption method for geographic information product file

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115883065A (en) * 2022-11-26 2023-03-31 郑州信大华芯信息科技有限公司 Method, device, chip and storage medium for quickly realizing software encryption and decryption based on variable S box
CN115883065B (en) * 2022-11-26 2024-02-20 郑州信大华芯信息科技有限公司 Method, device, chip and storage medium for quickly realizing software encryption and decryption based on variable S box

Also Published As

Publication number Publication date
WO2018205469A1 (en) 2018-11-15

Similar Documents

Publication Publication Date Title
Lipmaa Verifiable homomorphic oblivious transfer and private equality test
CN103259643B (en) A kind of full homomorphic cryptography method of matrix
CN101374043B (en) Cipher key negotiating method, enciphering/deciphering method and signature/verification method
CN107070630B (en) A kind of fast and safely hardware configuration of aes algorithm
CN107147484A (en) A kind of full homomorphic cryptography method of floating number towards secret protection
Lee et al. Potential weaknesses of the commutator key agreement protocol based on braid groups
CN110971390A (en) Fully homomorphic encryption method for intelligent contract privacy protection
CN101431414A (en) Authentication group key management method based on identity
CN112202568A (en) Software and hardware collaborative design SM9 digital signature communication method and system
CN103444128B (en) Key PV signs
CN110474761A (en) One kind 16 takes turns SM4-256 whitepack password implementation method
CN109450640A (en) Two side&#39;s endorsement methods and system based on SM2
KR20030062401A (en) Apparatus and method for generating and verifying id-based blind signature by using bilinear parings
CN104917608A (en) Key anti-power attack method
CN109889320A (en) A kind of full homomorphic cryptography method of efficient BGV type multi-key cipher
US6111952A (en) Asymmetrical cryptographic communication method and portable object therefore
CN101841415A (en) Word-oriented key stream generating method and encrypting method
JunLi et al. Email encryption system based on hybrid AES and ECC
CN101826959B (en) Byte-oriented key stream generation method and encryption method
CN113468562B (en) Image block encryption and decryption method based on fusion of hyperchaotic system and neural network mechanism
WO2005048525A1 (en) A digital signature method based on braid groups conjugacy and verify method thereof
CN107425963A (en) A kind of construction method and system of password wall
CN104125059A (en) Compound time varying password and time varying type data encryption method
CN107465508A (en) A kind of method, system and the equipment of software and hardware combining construction true random number
CN101582170A (en) Remote sensing image encryption method based on elliptic curve cryptosystem

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination