CN102185692B - Multimode reconfigurable encryption method based on advanced encryption standard (AES) encryption algorithm - Google Patents

Multimode reconfigurable encryption method based on advanced encryption standard (AES) encryption algorithm Download PDF

Info

Publication number
CN102185692B
CN102185692B CN2011101038252A CN201110103825A CN102185692B CN 102185692 B CN102185692 B CN 102185692B CN 2011101038252 A CN2011101038252 A CN 2011101038252A CN 201110103825 A CN201110103825 A CN 201110103825A CN 102185692 B CN102185692 B CN 102185692B
Authority
CN
China
Prior art keywords
encryption
box
aes
random
user
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.)
Expired - Fee Related
Application number
CN2011101038252A
Other languages
Chinese (zh)
Other versions
CN102185692A (en
Inventor
郑志明
王钊
张筱
邱望洁
张尧
宋倩倩
刘昭
赵罡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN2011101038252A priority Critical patent/CN102185692B/en
Publication of CN102185692A publication Critical patent/CN102185692A/en
Application granted granted Critical
Publication of CN102185692B publication Critical patent/CN102185692B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

The invention discloses a multimode reconfigurable encryption method based on an advanced encryption standard (AES) encryption algorithm. In the method, five operating modes are provided for a user to select, and an all-random S box generation way and a biased random S box generation way are provided. The method comprises the following steps of: judging whether the operating mode and an S box selected by the user are rational or not; if the selected operating mode and the selected S box are irrational, prompting the user to perform reselection; if the selected operating mode and the selected S box are rational, further calculating the smallest encryption round number according to the differential uniformity and nonlinearity of the generated S box, and determining a final encryption round number according to the requirements of the user; selecting a source file for an encryption or decryption operation; and finally storing the encrypted or decrypted data file, and providing the encrypted or decrypted data file for the user to view. By the method, side channel attacks possibly on encryption realized by adopting hardware are effectively avoided, and an operating way of the reconfigurable encryption method is optimized; the method is applied to the configuration of a set of reconfigurable software encryption system, and the reconfiguration and integration of block ciphers into the same software system; and convenience is brought to operations and management.

Description

Multi-mode restructural encryption method based on the AES AES
Technical field
The invention belongs to field of information security technology, be specifically related to a multi-mode restructural encryption method based on the AES AES.
Background technology
Cryptographic algorithm is the important foundation that realizes information security, and a kind of AES can provide the Confidentiality protection of data content in certain environment, realizes the authentication of data integrity protection and informed source.
Last century Mo; The Rijndael algorithm that Belgium Joan Daeman and Vincent Rijmen submit to is proposed as AES (Advanced Encryption Standard; Advanced Encryption Standard) final algorithm, this algorithm become the new data encryption standard of the U.S. and are widely used in the every field.Although people also have different views to AES, on the whole, AES has converged strong security, high-performance, high efficiency, advantage such as easy-to-use and flexible as the data encryption standard of a new generation.AES is designed with three key lengths: 128,192,256, comparatively speaking, 128 keys of AES are stronger 1021 times than 56 keys of DES (data encryption standard).From AES should be used for see; The AES AES is mainly used in the various information security technologies and safety product based on private key data AES (symmetric key encryption algorithm) at present; AES is considered to the substituent of DES usually, and using for original data encryption provides stronger data security guarantee.Before the AES standard is announced; In IPSec (Internet protocol safety) agreement the used DEA of ESP (ESP) mainly usefulness be DES; Announcement along with the AES standard; The IPSec working group of IETF (the Internet engineering duty group) next step just make AES become the default encryption algorithm that ESP uses, and requiring all IPSec to realize must compatible AES AES.Great majority provide the company of VPN (Virtual Private Network) equipment and solution all to use the AES AES to replace the des encryption algorithm now, and as the important counterweight of propagating enterprise product.
The AES AES mainly comprises three aspects: wheel variation, the number of turns and cipher key spreading.Each has four steps in taking turns the AES AES: be respectively byte substitution (SubBytes), the conversion (ShiftRows) of dividing a word with a hyphen at the end of a line, mix row conversions (MixColumns), take turns close addition (AddRoundKey).Each byte in the AddRoundKey-----matrix is all taken turns sub-key (round key) with this and is done XOR (XOR) computing; Each sub-key is produced by key generation scheme.SubBytes------is through a nonlinear replacement function, replaces to the byte of correspondence to each byte with the mode of look-up table, and the used look-up table of described byte substitution is also referred to as the S box usually.ShiftRows-----carries out circulating displacement with each line in the matrix.MixColumns-----is to use linear transformation to mix every four inline bytes for the operation of each craspedodrome in the abundant hybrid matrix.
The traditional data encryption method has two kinds: a kind of is software cryptography; Another kind is a hardware encipher.Two kinds of data ciphering methods respectively have characteristics, though software cryptography is flexible, enciphering rate is slow, and is changed by the people easily; Though hardware encipher speed is fast, algorithm is single, and immobilizes, and if things go on like this, always has one day that cracks.In order to solve the shortcoming of above-mentioned two kinds of encryption methods, utilization restructural art designs goes out the crypto chip that can realize multiple cryptographic algorithm, makes and can realize multiple different ciphers algorithm flexibly, apace, can avoid the hidden danger on the above-mentioned safety again.
What is called restructural encryption method/system is actually its internal algorithm program structure and function can be by the Cipher Processing system of flexible change; It realizes multiple different encrypted, decryption oprerations under can and driving in the control of primary processor flexibly, apace, so that adapt to the demand of different cryptographic algorithms and mode of operation.Encryption method/system based on reconfigurable structures has flexible, quick, safe characteristics, in fields such as secure communication and network security, has a good application prospect.
The restructural computing technique had obtained greatly developing in the last few years, had done comparatively further investigation like the National University of Defense technology in restructural Cipher Processing structure aspects, proposed and designed restructural level interconnection Cipher Processing structure (RHCA).University of Science & Technology, Beijing has developed the RELOG_DIGG system, but implementation part block cipher and stream cipher algorithm.Yet use at present the most widely restructurable computing system be to be the system hardware architecture of representative with FPGA (Field-Programmable Gate Array, field programmable gate array).Though the hardware of cryptographic algorithm realizes possessing higher efficient, hardware realizes such as EMP attack N, the resistivity of side-channel attacks such as differential power attack a little less than.In addition, in restructural Cipher Processing structural design, lack the method for designing of system and the model with versatility, the structural design otherness is very big, and this just gives using of restructural cryptographic system and manages and bring a lot of troubles.
Summary of the invention
The present invention is directed to the side-channel attack that the realization technology of Current Password algorithm faces, and the bigger problem of restructural Cipher Processing structural design otherness, a kind of multi-mode restructural encryption method based on the AES AES is proposed.The inventive method changes the S box generating mode among the existing AES, has rationally adjusted the active wheel number according to user's request, realized simultaneously block cipher five kinds of main mode of operations.Multi-mode restructural encryption method based on the AES AES specifically may further comprise the steps:
Step 1, user select mode of operation and key length as required;
Step 2, user select S box random fashion and S box size; Described S box random fashion has two kinds: S box and S box partially at random at random entirely;
Whether the S box size that step 3, judges are selected is reasonable, if rationally, generate corresponding S box, if unreasonable, the prompting user error changes step 2 and carries out;
Step 4, according to user's speed requirement and demand for security, confirm the encryption round number; Described speed requirement comprises two kinds: require at a high speed and do not have a rate request; Described demand for security comprises two kinds: high safety requirements and no safety requirements; The user can not only select high speed but also select high safety;
Step 5, indicate source file to be encrypted and deposit the file destination of ciphertext, source file is encrypted or decryption oprerations;
Step 6, will encrypt or the decrypted data result preserves, and be shown to the user and check.
Mode of operation described in the step 1 has 5 kinds: this (Electronic Code Book of electronic code; Abbreviation ECB) pattern, cipher block chaining (Cipher Block Chaining; Abbreviation CBC) pattern, cipher feedback (Cipher FeedBack Mode; Abbreviation CFB) pattern, output feedback (Output FeedBack is called for short OFB) pattern sum counter pattern (CTR).
The box of S partially at random described in the step 2 is of a size of 8 * 8; S box size has 3 kinds at random entirely: 12 * 8,10 * 8 and 8 * 8.
Whether the S box size that the judges described in the step 3 is selected is reasonably according to being: if the mode of operation of selecting in the step 1 is ecb mode, CBC pattern or CFB pattern; And the user needs to encrypt; Also need deciphering, then the S box size of this moment can only be 8 * 8, otherwise S box size Selection is unreasonable.
The full generation method of S box at random described in the step 3 is: at first, utilize the generating mode of random number to generate one by 0-(2 k-1) form totally 2 kThe random permutation square formation A of number, the k value is 12,10 or 8, the first digit of the S box size of selecting according to the user is confirmed; Spread function among the byte utilization DES under then 4 16 systems of initial input being represented is extended to 48; 4 byte substitution random permutation square formation A after will expanding at last draw the byte that same length is the k position, and each byte is removed last 4, exports 4 bytes of 8.
The generation method of S box partially at random described in the step 3 is: at first, and according to the finite field gf (2 of user's selection 8), each byte is inverted, obtain this byte at finite field gf (2 8) in multiplicative inverse, then, the multiplicative inverse that obtains is done affine transformation through following formula:
Y=AX+B
Wherein, Y representes the output row after the affine transformation, and X representes that the multiplicative inverse of importing is listed as, and A is 8 * 8 the matrix at random of affine transformation, and B is the constant row; The generation method of described matrix A is: produce the eight line number groups of row by 0,1 composition at first at random, the generating mode by circular matrix produces residue 7 row successively then, finally obtains the matrix of a 8*8; Said constant row B is the row by 0,1 composition that generate at random.
Definite method of the encryption round number described in the step 4 is: according to the difference uniformity δ (S) and the minimum encryption round number of nonlinearity NF (S) estimation of S box, described nonlinearity NF (S) is:
NF ( S ) = 2 n - 1 - 1 2 max | Σ i = 1 n ( - 1 ) v * S ( x ) + u * x | ≤ 2 n - 1 - 2 n 2 - 1 , u , v , x ∈ Z 2 n
Wherein, u, v are intermediate parameters, and x, S (x) they are respectively the input and the output of S box, the bit number of n representative input,
Figure BDA0000057180050000033
What represent is finite field gf (2 n);
Described difference uniformity δ (S) is:
δ ( S ) = max { | x ∈ GF ( 2 n ) | S ( x ) ⊕ S ( x ⊕ α ) = β , α ∈ GF ( 2 n ) , β ∈ GF ( 2 n ) }
S (x) expression is from the output of S box, and x is input, and α and β are intermediate parameters, and GF (2 n) be finite field;
At last, confirm the encryption round number according to the demand that the user selects: if the user is a high speed to the requirement of speed, then the encryption round number is minimum encryption round number, if the user to the speed no requirement (NR), then the encryption round number is 10 to take turns; If the user is high safety to the requirement of fail safe, then the encryption round number is 14, if the user to the fail safe no requirement (NR), then the encryption round number is 10 to take turns.
Advantage of the present invention and good effect are: (1) the inventive method realizes the software that the restructural technology is applied to cryptographic algorithm, has effectively avoided hardware to realize the side-channel attack that possibly face; (2) the inventive method parameter that the reconstruct of most of block cipher is required has converted user oriented demand to, has optimized the mode of operation of restructural cryptographic methods; (3) the inventive method is applicable to the reconfigurable software encryption system of structure one cover, and the reconstruct of block cipher is integrated in the same encryption system, helps the management of system.
Description of drawings
Fig. 1 is the flow chart of steps of encryption method of the present invention;
Fig. 2 is the schematic flow sheet of reconstruct S box in the step 3 in the encryption method of the present invention;
Fig. 3 is the schematic flow sheet of encrypting or deciphering in the step 4 in the encryption method of the present invention.
Embodiment
To combine accompanying drawing and embodiment that the present invention is done further detailed description below.
The reconfigurability of the inventive method is mainly reflected in the reconstruct to the S box, on the adjustment of wheel number and the implementation of mode of operation.Specifically the present invention is based on the multi-mode restructural encryption method of AES AES, as shown in Figure 1, comprise following 6 steps.
Step 1: the user selects mode of operation and key length as required.
Be provided with five kinds of mode of operations commonly used in the inventive method: ecb mode, CBC pattern, CFB pattern, OFB pattern and CTR pattern let the user that the more space of more options is arranged.Ecb mode, CBC pattern and CFB pattern belong to this mode: clear-text message is more much longer than specific grouping size usually, and uses different encryption technologies or cryptographic operation mode.Ecb mode uses same key simply each Plaintext block to be encrypted one by one; The CBC pattern is that each Plaintext block is carried out nonequivalence operation with last ciphertext blocks earlier before encryption, thereby has increased complexity, and some attack more is difficult to carry out.The OFB mode class is like the CBC pattern, but the amount of carrying out distance is independent the generation.The CTR pattern is passed through counter sequence T1 ... Tm calls block encryption algorithm and obtains key stream, obtains ciphertext with the plaintext XOR then.Requirement to the counter sequence is different in twos, is not only in the operation of a message, in all operations of same key, all requires all counter sequences different in twos.
The user can select one of above-mentioned mode of operation according to the needs of oneself.
Key length has 3 kinds of selection: 128bits, 192bits, 256bits.Bits representation unit bit.
Step 2: the user selects S box random fashion and S box size.S box random fashion has two kinds: S box and S box at random partially at random entirely.The full size of S box at random has 3 kinds: 12 * 8,10 * 8,8 * 8.The size of S box has a kind at random partially: 8 * 8.The unit of S box size is the position.The user then also need select to calculate the needed finite field gf (2 of S box if select S box partially at random 8).Described finite field is irreducible function just, and one to have 30 irreducible functions available: 11B, 11D, 12B, 12D, 139,13F, 14D; 15F, 163,165,169,171,177,17B, 187; 18B, 18D, 19F, 1A3,1A9,1B1,1BD, 1C3; 1CF, 1D7,1DD, 1E7,1F3,1F5,1F9.
Step 3: whether the S box size that judges is selected is reasonable, if rationally, generate corresponding S box, continues next step, if unreasonable, the prompting user error changes step 2, reselects the S box.
In order to satisfy the reversible demand of AES; There is following getting in touch in the selection of the selection of mode of operation and S box size: ecb mode, CBC pattern and CFB pattern promptly need encryption method; Also need decryption method, can only select 8 * 8 S box this time, otherwise decryption method does not exist; If only need cryptographic operation with ecb mode, CBC pattern and CFB pattern, then three kinds of S box sizes can be selected.OFB pattern and CTR pattern only need encryption method, and 12 * 8 and 10 * 8,8 * 8 S box can both use.In the first step, need judge, remind some selection of user whether reasonable the parameter of user's selection.
The present invention produces two kinds of S boxes at random according to different generating modes, is respectively S box and S box at random partially at random entirely.
The full core concept of S box method of formation at random is directly to replace the S box in the existing aes algorithm with a random permutation.But 8 * 8 random permutation character possibly it would be better original S box, so change the input size of S box, generates 12 * 8 or 10 * 8 or 8 * 8 S box.As shown in Figure 2, illustrate the S box at random entirely that how to produce 12 * 8 below.
At first utilize the generating mode of random number to generate one by 0-(2 12-1) this 2 12The random permutation square formation C that number is formed.Byte under 4 16 systems of initial input are represented owing to be the byte under 16 systems, therefore can be expressed as 4 bit stream: b1 successively ... B8; B9 ... B16; B17 ... ... b24; B25 ... B32.Utilization is extended to 48 bits suc as formula the spread function among the DES shown in (1):
32 1 2 3 4 5 4 5 6 7 8 9 8 9 10 11 12 13 12 13 14 15 16 17 16 17 18 19 20 21 20 21 22 23 24 25 24 25 26 27 28 29 28 29 30 31 32 1 - - - ( 1 )
The practical significance of formula (1) expands to 48 bit digital with 32-bit number exactly.With four bytes expand successively be 12 after, substitution square formation A both can draw same length and be 12 byte.Remove last 4, at this moment become 8 outputs.Initial input is 32, is divided into four bytes, 8 of each bytes, and through obtaining 48 after the expansion, each byte partly becomes 12, then is input among the square formation C, has exported 12, obtains 8 outputs thereby remove next four at last.Thereby partly be to become 12 by 8 for each byte, finally export 8.
Passed through after the aforesaid operations, with 12 * 8 existing 8 * 8 the S box in the existing aes algorithm of S box replacement at random entirely that generates.S box for 10 * 8 and 8 * 8, the same random number that generates is earlier carried out corresponding figure place again and is expanded, and several of the intercepting back at last, guarantees that 8 outputs get final product.
The generation method of S box is that the structure of change finite field and the constant in the affine transformation are realized partially at random.Specifically as shown in Figure 2.
At first, the finite field gf of selecting according to the user (2 8), a byte is inverted, obtain this byte for finite field gf (2 8) in multiplicative inverse.
Be at mould irreducible function (x in the SubBytes first step 8+ x 4+ x 3+ x+1) invert under the meaning, in cryptography, claim in the 11B of territory, to invert.For GF (2 8), for the user provides following 30 irreducible functions available, under different finite fields, invert, can obtain different results.
Then, through type (2) is done affine transformation to the multiplicative inverse that obtains:
Y=AX+B (2)
Wherein, Y representes the output row after the affine transformation, and X representes that the multiplicative inverse of importing is listed as, and A is 8 * 8 the matrix at random of affine transformation, and B is the constant row.An object lesson of formula (2) is shown in following formula (3).
b 0 * b 1 * b 2 * b 3 * b 4 * b 5 * b 6 * b 7 * = 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 b 0 b 1 b 2 b 3 b 4 b 5 b 6 b 7 + 1 1 0 0 0 1 1 0 - - - ( 3 )
8 * 8 the specifically generation method of matrix A at random of affine transformation is: produce the eight line number groups of row by 0,1 composition at first at random, the generating mode of pressing circular matrix then produces other row, finally obtains the matrix of a 8*8.
Constant row B is listed as forming by 0,1 of generating at random.
Through the reconstruct in above two steps, just can obtain S box partially at random.
Step 4:, confirm the encryption round number according to user's speed requirement and demand for security.The user requires perhaps not have rate request to the demand of speed for high speed, and demand for security is high safety requirements or does not have safety requirements.But requirement and high safety requirements can not all satisfy simultaneously at a high speed, so the user can not select simultaneously.
The encryption round number is turned to adjustable, let the user on rate request and security performance, find balance.Can know that by the cryptography relevant knowledge aes algorithm only needs the four-wheel operation, just can resist linear differential and attack.Along with the lifting of wheel number, the fail safe of system also can be more and more stronger, but also can bring the increase of encryption time simultaneously.Demand in the face of the user is provided with the variable of encryption round number, thereby adapts to user's needs.The method of concrete definite encryption round number is following:
1, produce after the S box, calculate the difference uniformity and the nonlinearity of S box, the computing formula of difference uniformity δ (S) and nonlinearity NF (S) is followed successively by:
NF ( S ) = 2 n - 1 - 1 2 max | Σ i = 1 n ( - 1 ) v * S ( x ) + u * x | ≤ 2 n - 1 - 2 n 2 - 1 , u , v , x ∈ Z 2 n
Wherein, u, v are intermediate parameters, and x, S (x) they are respectively the input and the output of S box, the bit number of n representative input, and the bit number of importing in the inventive method is 8, What represent is finite field gf (2 n).
δ ( S ) = max { | x ∈ GF ( 2 n ) | S ( x ) ⊕ S ( x ⊕ α ) = β , α ∈ GF ( 2 n ) , β ∈ GF ( 2 n ) }
Wherein, S (x) expression is from the output of S box, and x is input, and α and β are intermediate parameters, and GF (2 n) be finite field.
2, estimate reconstruct sexual assault of algorithm burden and the required minimum number of taking turns of differential attack afterwards.Through calculating; When input x is 8, the NF (f)=120 of complete nonlinear function (being the best function of nonlinearity), and the nonlinearity value of the S box of the inventive method is 112; So the nonlinearity of S box used in the present invention is quite high, has the ability of stronger burden sexual assault.The value of the δ (S) of the S box of the present invention that calculates is 4, and then the difference uniformity is 2 -6If four-wheel AES cryptographic operation then obtains the result and is: 2 -6*52=2 -150≤2 -128, in the reply differential attack, 4 take turns cryptographic operation maximum difference to propagate probability be 2 -150, less than 2 -128Therefore, 4 take turns cryptographic operation and be enough to carry resisting differential and attack.So the minimum number of taking turns can confirm as 4.
If 3 users are " at a high speed " to the demand of speed, then with minimum take turns several as the encryption round number.If there is not rate request, the initial encryption wheel number that then keeps AES is constant.Described initial encryption wheel number is 10 to take turns.
If 4 users are " high safety " to the demand of fail safe, then the encryption round number is set to 14, otherwise initial encryption wheel number is constant.
Step 5, indicate source file to be encrypted and deposit the file destination of ciphertext, source file is encrypted or decryption oprerations.The operation of encrypting in the inventive method or deciphering is based on existing aes algorithm, and close addition of each wheel of taking turns and mixed row conversion employing have the method in the aes algorithm now.
The concrete encryption or decryption oprerations, specifically as shown in Figure 3.
At first, from the source file reading of data, divide into groups with per 128, if last group is then supplied with 0 not enough 128; Judge then and decipher or cryptographic operation.
Carry out cryptographic operation; Expanded keys at first; Then take turns close addition; And then repeat wheel according to the encryption round number of confirming in the step 4 and encrypt, each is taken turns and comprises byte substitution, the conversion of dividing a word with a hyphen at the end of a line, mixes the row conversion and take turns four steps of close addition, and last takes turns to encrypt has only byte substitution, divides a word with a hyphen at the end of a line and change and take turns three steps of close addition.Use the S box that generates in the step 3 in the byte substitution, will replace to corresponding byte to each byte.Be written to the mode of data encrypted in the file destination at last with byte stream.
Carry out decryption oprerations; Expanded keys at first; Then take turns close addition; And then the encryption round number when encrypting according to this source file of preserving repeats the wheel deciphering, and each is taken turns and comprising and divide a word with a hyphen at the end of a line that conversion is inverted, byte substitution is inverted, take turns close addition and mix row conversion four steps of inverting, and last is taken turns deciphering and only divides a word with a hyphen at the end of a line that conversion is inverted, byte substitution is inverted and take turns three step decryption rounds of close addition number equates with the encryption round number.The data that obtain processing at last write in the file destination with the form of byte stream.
Step 6, will encrypt or decrypted data is preserved, and be shown to the user and check.After source file is encrypted, preserve the encrypt data that obtains, and user selected parameter, so that the later stage deciphering.
In the embodiment of the invention, the user selects ecb mode, selects key length 128 bits; Selected S box partially at random, the S box is of a size of 8 * 8, and employed finite field is 11B; The user adopts the acquiescence mode to the demand of speed and safety, and just the encryption round number is 10, and source file is carried out cryptographic operation.
Under finite field 11B, finite field gf (2 8) the contrary result of calculation of each element, the multiplicative inverse that promptly obtains is shown in following table 1:
The multiplicative inverse that table 1 obtains under finite field 11B
It is following that affine transformation generates the result:
b 0 * b 1 * b 2 * b 3 * b 4 * b 5 * b 6 * b 7 * = 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 1 b 0 b 1 b 2 b 3 b 4 b 5 b 6 b 7 + 1 1 0 0 0 1 1 0
The number of blocks Nb=4 that divides into groups in the ciphering process, round key columns Nk=4, wherein initial round key is shown in the following table 1:
Table 1: initial round key
00 1B 23 6A
3C A6 B7 34
12 A8 F3 E2
63 2A 3C 67
Need ciphered data in the source file shown in following table 2:
Table 2: need ciphered data
02 3B AD 65
45 47 89 9A
A7 F6 AC CB
78 56 37 34
Follow the tracks of 02 in the enciphered data, use S box partially at random in the byte substitution, at first in the 11B of territory, invert, the result is: 8D, then carry out affine transformation, and obtain: 50.Divide a word with a hyphen at the end of a line and change the back invariant position.Then through after mixing the row conversion, 00 in the last and initial key done XOR and got final product.So just, accomplished a wheel operation, such operation is carried out 10 altogether and is taken turns.

Claims (8)

1. multi-mode restructural encryption method based on Advanced Encryption Standard (AES) AES is characterized in that said method specifically may further comprise the steps:
Step 1: the user selects mode of operation and key length as required;
Step 2: the user selects S box random fashion and S box size; Described S box random fashion has two kinds: S box and S box partially at random at random entirely;
Step 3: whether the S box size that judges is selected is reasonable, if rationally, generates accordingly S box or S box at random partially at random entirely, if unreasonable, the prompting user error changes step 2 and carries out;
Step 4: the user selects speed requirement and demand for security, and described speed requirement comprises two kinds: at a high speed with no rate request; Described demand for security comprises two kinds: high safety and no safety requirements, and the user can not select at a high speed and high safety definite then encryption round number simultaneously; The method of concrete definite encryption round number is: at first, setting minimum encryption round number is 4; Then, confirm the encryption round number according to the demand that the user selects: if the user is a high speed to the requirement of speed, then the encryption round number is minimum encryption round number, if the user to the speed no requirement (NR), then the encryption round number is 10 to take turns; If the user is high safety to the requirement of fail safe, then the encryption round number is 14, if the user to the fail safe no requirement (NR), then the encryption round number is 10 to take turns; Step 5: indicate source file to be encrypted and the file destination of depositing ciphertext, source file is encrypted or decryption oprerations;
Step 6: the result data that will encrypt or decipher is preserved, and is shown to the user and checks.
2. the multi-mode restructural encryption method based on the AES AES according to claim 1; It is characterized in that the mode of operation described in the step 1 comprises 5 kinds: this pattern of electronic code, cipher block chaining pattern, cipher feedback pattern, output feedback mode sum counter pattern.
3. the multi-mode restructural encryption method based on the AES AES according to claim 1 is characterized in that, described in the step 2 entirely at random S box size have 3 kinds: 12 * 8,10 * 8 and 8 * 8; The S box is of a size of 8 * 8 partially at random.
4. according to claim 1 or 2 or 3 described multi-mode restructural encryption methods based on the AES AES; It is characterized in that; Whether reasonable method is the S box size of judging described in the step 3: if the mode of operation of selecting in the step 1 is this pattern of electronic code, cipher block chaining pattern or cipher feedback pattern, and the user needs to encrypt, and also needs deciphering; Then the S box size of this moment can only be 8 * 8, otherwise S box size Selection is unreasonable.
5. the multi-mode restructural encryption method based on the AES AES according to claim 1 is characterized in that, the full generation method of S box at random described in the step 3 is: at first, utilize the generating mode of random number to generate one by 0-(2 k-1) form totally 2 kThe random permutation square formation C of number, the k value is 12,10 or 8, the first digit of the S box size of selecting according to the user is confirmed; Spread function in the byte maintenance data encryption standard (DES) under then 4 16 systems of initial input being represented is extended to 48; 4 byte substitution random permutation square formation C after will expanding at last draw the byte that same length is the k position, and each byte is removed last 4, exports 4 bytes of 8.
6. the multi-mode restructural encryption method based on the AES AES according to claim 1 is characterized in that, the generation method of S box partially at random described in the step 3 is: at first, and according to the finite field gf (2 of user's selection 8), each byte is inverted, obtain this byte at finite field gf (2 8) in multiplicative inverse, then, the multiplicative inverse that obtains is done affine transformation through following formula:
Y=AX+B
Wherein, Y representes the output row after the affine transformation, and X representes that the multiplicative inverse of importing is listed as, and A is 8 * 8 the matrix at random of affine transformation, and B is the constant row; The generation method of described matrix A is: produce the eight line number groups of row by 0,1 composition at first at random, the generating mode by circular matrix produces residue 7 row successively then, finally obtains one 8 * 8 matrix; Said constant row B is the row by 0,1 composition that generate at random.
7. the multi-mode restructural encryption method based on the AES AES according to claim 6 is characterized in that described finite field gf (2 8) have 30 irreducible functions selective, 30 irreducible functions are: 11B, 11D, 12B, 12D, 139,13F, 14D, 15F, 163,165; 169,171,177,17B, 187,18B, 18D, 19F, 1A3,1A9; 1B1,1BD, 1C3,1CF, 1D7,1DD, 1E7,1F3,1F5,1F9.
8. the multi-mode restructural encryption method based on the AES AES according to claim 1 is characterized in that the cryptographic operation described in the step 5; Be from the source file reading of data, divide into groups with per 128 that if last group is not enough 128; Then supply, carry out cryptographic operation then with 0: expanded keys at first, then take turns close addition; And then repeat wheel according to the encryption round number of confirming in the step 4 and encrypt; Each is taken turns and comprises byte substitution, the conversion of dividing a word with a hyphen at the end of a line, mixes the row conversion and take turns four steps of close addition, last take turns encrypt have only byte substitution, the conversion and take turns three steps of close addition of dividing a word with a hyphen at the end of a line, use the S box that generates in the step 3 in the byte substitution; Replace to the pairing byte of S box to each byte, be written to the mode of data encrypted in the file destination at last with byte stream.
CN2011101038252A 2011-04-25 2011-04-25 Multimode reconfigurable encryption method based on advanced encryption standard (AES) encryption algorithm Expired - Fee Related CN102185692B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011101038252A CN102185692B (en) 2011-04-25 2011-04-25 Multimode reconfigurable encryption method based on advanced encryption standard (AES) encryption algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011101038252A CN102185692B (en) 2011-04-25 2011-04-25 Multimode reconfigurable encryption method based on advanced encryption standard (AES) encryption algorithm

Publications (2)

Publication Number Publication Date
CN102185692A CN102185692A (en) 2011-09-14
CN102185692B true CN102185692B (en) 2012-07-04

Family

ID=44571766

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011101038252A Expired - Fee Related CN102185692B (en) 2011-04-25 2011-04-25 Multimode reconfigurable encryption method based on advanced encryption standard (AES) encryption algorithm

Country Status (1)

Country Link
CN (1) CN102185692B (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297223B (en) * 2013-05-07 2017-06-06 北京航空航天大学 The fault-tolerant AES devices of self- recoverage and its encryption method based on dynamic reconfigurable
CN104753662B (en) * 2013-12-27 2019-09-20 锐迪科(重庆)微电子科技有限公司 Encryption key stream generation method based on aes algorithm
CN104052595B (en) * 2014-05-23 2017-02-08 戴葵 Cryptographic algorithm customizing method
US9621354B2 (en) * 2014-07-17 2017-04-11 Cisco Systems, Inc. Reconstructable content objects
US9819486B2 (en) * 2014-12-19 2017-11-14 Nxp B.V. S-box in cryptographic implementation
CN106034021B (en) * 2015-03-12 2020-04-10 中国科学院上海高等研究院 Lightweight dual-mode compatible AES encryption and decryption module and method thereof
CN105007154B (en) * 2015-07-23 2018-07-31 深圳市紫光同创电子有限公司 A kind of encrypting and decrypting device based on aes algorithm
CN105049204A (en) * 2015-07-30 2015-11-11 苏州中科启慧软件技术有限公司 Lightweight stream cipher technology VHC based on CTR mode and block cipher VH
CN105162580A (en) * 2015-07-30 2015-12-16 苏州中科启慧软件技术有限公司 Lightweight stream cipher technology VHO based on OFB mode and block cipher VH
CN105187199A (en) * 2015-09-09 2015-12-23 浪潮集团有限公司 Data optimization method in AES encryption
KR101914453B1 (en) * 2015-10-29 2018-11-02 삼성에스디에스 주식회사 Apparatus and method for encryption
CN108270544A (en) * 2016-12-30 2018-07-10 广东精点数据科技股份有限公司 A kind of ciphertext image reversible information hidden method and device based on urDEED algorithms
CN106992852B (en) * 2017-05-08 2023-09-15 芜湖职业技术学院 Reconfigurable S-box circuit structure applied to AES and Camellia cryptographic algorithm
CN107425963A (en) * 2017-05-09 2017-12-01 上海众人网络安全技术有限公司 A kind of construction method and system of password wall
CN106972920A (en) * 2017-06-06 2017-07-21 黑龙江大学 Smart mobile phone message encryption method and system
EP3704831A4 (en) * 2017-10-30 2021-06-02 Stc.Unm System and methods directed to side-channel power resistance for encryption algorithms using dynamic partial reconfiguration
US11863304B2 (en) 2017-10-31 2024-01-02 Unm Rainforest Innovations System and methods directed to side-channel power resistance for encryption algorithms using dynamic partial reconfiguration
CN108848073B (en) * 2018-05-31 2021-04-13 唐山智能电子有限公司 Method and system for encrypting and decrypting data of real-time data acquisition system
CN109951456A (en) * 2019-02-28 2019-06-28 成都卫士通信息产业股份有限公司 Message encipher-decipher method, device, electronic equipment and computer readable storage medium
TWI731770B (en) * 2019-08-16 2021-06-21 熵碼科技股份有限公司 Computer system
CN112134686A (en) * 2020-09-10 2020-12-25 南京大学 AES hardware implementation method based on reconfigurable computing, computer equipment and readable storage medium for operating AES hardware implementation method
CN113328859B (en) * 2021-04-21 2022-02-22 北京连山科技股份有限公司 Information dispersion processing method
CN113744437A (en) * 2021-09-15 2021-12-03 南京润海科星物联网智能科技有限公司 Intelligent house renting management method and system
CN114124389B (en) * 2021-11-09 2023-08-11 国网山东省电力公司电力科学研究院 Reconfigurable computing-based FPGA (field programmable Gate array) deployment method and system
CN118074890B (en) * 2024-04-18 2024-06-18 湖南一特医疗股份有限公司 Sharing management method and system for oxygenerator

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1921382A (en) * 2006-09-06 2007-02-28 华为技术有限公司 Encrypting-decrypting method based on AES algorithm and encrypting-decrypting device
CN101009554A (en) * 2007-01-17 2007-08-01 华中科技大学 A byte replacement circuit for power consumption attack prevention
JP2008040244A (en) * 2006-08-08 2008-02-21 Mitsubishi Electric Corp Aes encryption circuit
CN101409616A (en) * 2007-10-10 2009-04-15 佳能株式会社 AES encryption/decryption circuit
CN101764686A (en) * 2010-01-11 2010-06-30 石家庄开发区冀科双实科技有限公司 Encryption method for network and information security
CN102025484A (en) * 2010-12-17 2011-04-20 北京航空航天大学 Block cipher encryption and decryption method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040202318A1 (en) * 2001-10-04 2004-10-14 Chih-Chung Lu Apparatus for supporting advanced encryption standard encryption and decryption
US7421076B2 (en) * 2003-09-17 2008-09-02 Analog Devices, Inc. Advanced encryption standard (AES) engine with real time S-box generation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008040244A (en) * 2006-08-08 2008-02-21 Mitsubishi Electric Corp Aes encryption circuit
CN1921382A (en) * 2006-09-06 2007-02-28 华为技术有限公司 Encrypting-decrypting method based on AES algorithm and encrypting-decrypting device
CN101009554A (en) * 2007-01-17 2007-08-01 华中科技大学 A byte replacement circuit for power consumption attack prevention
CN101409616A (en) * 2007-10-10 2009-04-15 佳能株式会社 AES encryption/decryption circuit
CN101764686A (en) * 2010-01-11 2010-06-30 石家庄开发区冀科双实科技有限公司 Encryption method for network and information security
CN102025484A (en) * 2010-12-17 2011-04-20 北京航空航天大学 Block cipher encryption and decryption method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
武君胜.高级数据加密标准AES算法的原理及分析.<微处理机>.2008,83-85,88.
薛茹
薛茹;武君胜.高级数据加密标准AES算法的原理及分析.<微处理机>.2008,83-85,88. *

Also Published As

Publication number Publication date
CN102185692A (en) 2011-09-14

Similar Documents

Publication Publication Date Title
CN102185692B (en) Multimode reconfigurable encryption method based on advanced encryption standard (AES) encryption algorithm
Almuhammadi et al. A comparative analysis of AES common modes of operation
CN101262341A (en) A mixed encryption method in session system
CN102025505A (en) Advanced encryption standard (AES) algorithm-based encryption/decryption method and device
CN102035641A (en) Device and method for implementing AES encryption and decryption
KR101095386B1 (en) A Cryptosystem with a Discretized Chaotic Map
Prajwal et al. User defined encryption procedure for IDEA algorithm
CN101826959B (en) Byte-oriented key stream generation method and encryption method
JunLi et al. Email encryption system based on hybrid AES and ECC
CN101867471A (en) Irrational number based DES authentication encryption algorithm
Hayouni et al. A novel energy-efficient encryption algorithm for secure data in WSNs
Zhao DES-Co-RSA: a hybrid encryption algorithm based on DES and RSA
CN107147626B (en) Encrypted file transmission method combining AES algorithm and ElGamal algorithm
Akram et al. Triple Key Security Algorithm Against Single Key Attack on Multiple Rounds.
Yang et al. Cryptanalysis of a chaos block cipher for wireless sensor network
CN104320420A (en) SCADA file encryption method based on AES algorithm
CN107896149A (en) 128 symmetric encryption methods based on three group operationes
Yang et al. A novel chaotic block cryptosystem based on iterating map with output-feedback
Gaur et al. A comparative study and analysis of cryptographic algorithms: RSA, DES, AES, BLOWFISH, 3-DES, and TWOFISH
CN106973061B (en) AES outgoing file encryption method based on reversible logic circuit
CN106921486A (en) The method and apparatus of data encryption
Sreehari et al. Implementation of hybrid cryptosystem using DES and MD5
CN114257402A (en) Encryption algorithm determination method and device, computer equipment and storage medium
Jharbade et al. Network based Security model using Symmetric Key Cryptography (AES 256–Rijndael Algorithm) with Public Key Exchange Protocol (Diffie-Hellman Key Exchange Protocol)
Kumari et al. An RTL Implementation of the Data Encryption Standard (DES)

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120704

Termination date: 20160425