1. Field of the Invention
The present invention generally refers to an encryption/decryption scheme, as may exemplarily be applied for protecting memory contents against unauthorized readout.
2. Description of Related Art
When storing data in a way protected against unauthorized spying-out, the data to be stored are not stored in clear text, i.e. in an unencrypted form, but in an encrypted form, as a so-called cipher text. When the data are to be read at a later point in time, they must consequently be decrypted again before they can be processed. Examples of applications where this complexity when storing pays off are varied and exemplarily include chip cards, smart cards or magnetic cards where information to be protected, such as, for example, amounts of money, keys, account numbers, etc., are to be protected against unauthorized access.
It is of disadvantage in the procedure described referring to
The present invention provides an encryption/decryption scheme which is more effective than conventional schemes.
In accordance with a first aspect, the present invention provides a device for encrypting a data block to be encrypted to an encrypted data block and for decrypting a data block to be decrypted to a decrypted data block. The device has an encrypter having an encryption input and an encryption output for mapping a data block at the encryption input to an encryption result data block at the encryption output according to an encryption mapping; a decrypter having a decryption input and a decryption output for mapping a data block at the decryption input to a decryption result data block at the decryption output according to a decryption mapping which is inverse to the encryption mapping; an encryption combiner for mapping the encryption result data block to a mapped encryption result data block according to an encryption combining mapping and supplying the mapped encryption result data block to the decryption input of the decrypter; a decryption combiner for mapping the encryption result data block to an inversely mapped encryption result data block according to a decryption combining mapping to which the encryption combining mapping is which is inverse and supplying the inversely mapped encryption result data block to the decryption input of the decrypter; and a controller formed to cause the data block to be encrypted to pass the sequence of encrypter, encryption combiner and decrypter at least once to obtain the encrypted data block and the data block to be decrypted to pass the sequence of encrypter, decryption combiner and decrypter at least once to obtain the decrypted data block.
In accordance with a second aspect, the present invention provides a device for encrypting a data block to be encrypted to an encrypted data block. The device has an encrypter having an encryption input and an encryption output for mapping a data block at the encryption input to an encryption result data block at the encryption output according to an encryption mapping; a decrypter having a decryption input and a decryption output for mapping a data block at the decryption input to a decryption result data block at the decryption output according to a decryption mapping which is inverse to the encryption mapping; an encryption combiner for mapping the encryption result data block to a mapped encryption result data block according to an encryption combining mapping and supplying the mapped encryption result data block to the decryption input of the decrypter; and a controller formed to cause the data block to be encrypted to pass the sequence of encrypter, encryption combiner and decrypter at least once to obtain the encrypted data block.
In accordance with a third aspect, the present invention provides a device for decrypting a data block to be decrypted to a decrypted data block. The device has an encrypter having an encryption input and an encryption output for mapping a data block at the encryption input to an encryption result data block at the encryption output according to an encryption mapping; a decrypter having a decryption input and a decryption output for mapping a data block at the decryption output to a decryption result data block at the decryption output according to a decryption mapping which is inverse to the encryption mapping; a decryption combiner for mapping the encryption result data block to an inversely mapped encryption result data block according to a decryption combining mapping to which the encryption combining mapping is inverse, and supplying the inversely mapped encryption result data block to the decryption input of the decrypter; and a controller formed to cause the data block to be decrypted to pass the sequence of encrypter, decryption combiner and decrypter at least once to obtain the decrypted data block.
In accordance with a fourth aspect, the present invention provides a method for encrypting a data block to be encrypted to an encrypted data block by means of an encrypter having an encryption input and an encryption output for mapping a data block at the encryption input to an encryption result data block at the encryption output according to an encryption mapping, and a decrypter having a decryption input and a decryption output for mapping a data block at the decryption input to a decryption result data block at the decryption output according to a decryption mapping which is inverse to the encryption mapping. The method includes the step of causing the data block to be encrypted to pass the sequence of encrypter and decrypter at least once to obtain the encrypted data block, by mapping the encryption result data block to a mapped encryption result data block according to an encryption combining mapping and supplying the mapped encryption result data block to the decryption input of the decrypter.
In accordance with a fifth aspect, the present invention provides a method for decrypting a data block to be decrypted to a decrypted data block by means of an encrypter having an encryption input and an encryption output for mapping a data block at the encryption input to an encryption result data block at the encryption output according to an encryption mapping, and a decrypter having a decryption input and a decryption output for mapping a data block at the decryption input to a decryption result data block at the decryption output of a decryption mapping which is inverse to the encryption mapping. The method includes the step of causing the data block to be decrypted to pass the sequence of encrypter and decrypter at least once to obtain the decrypted data block, by mapping the encryption result data block to an inversely mapped encryption result data block according to a decryption combining mapping to which the encryption combining mapping is inverse, and supplying the inversely mapped encryption result data block to the decryption input of the decrypter.
In accordance with a sixth aspect, the present invention provides a computer program having a program code for performing one of the above-mentioned methods when the computer program runs on a computer.
The finding of the present invention is that the encryption unit and the decryption unit present in an encryption/decryption device may both be used both when encrypting and decrypting, without their effects canceling each other out when, between the decryption input of the decryption means and the encryption output of the encryption means, encryption combining means is provided which maps the encryption result data block at the encryption output to a mapped encryption result data block according to an encryption combining map and is exemplarily used when encrypting, and further decryption-combining means which maps the encryption result data block at the encryption output to an inversely mapped encryption result data block according to a decryption combining map, which is inverse to the encryption combining map, and is exemplarily used when decrypting.
The setup complexity need thus not be increased enormously since the actual encryption or decryption is performed with a correspondingly high non-linearity of the underlying maps by both means, namely the encryption and the decryption means. The encryption combining and decryption combining maps only serve to ensure that the effects of the encryption map and the decryption map, as are implemented by the encryption and decryption means, do not cancel each other out. Encryption may be effected by a data block to be encrypted to pass at least the sequence of encryption means, encryption combining means and decryption means at least once and to be processed serially by these means. The decryption may then be performed based on the same encryption and decryption means by a data block to be decrypted to pass at least a sequence of encryption means, decryption combining means and decryption means.
Consequently, both means, encryption and decryption means, are used both when encrypting and decrypting, whereas, in the prior art, one of the two means was exclusively responsible for encrypting and the other one exclusively for decrypting. In addition, two different encryption and decryption processes are effectively performed serially, which had conventionally to be achieved by two rounds of the encryption and decryption means.
A special form of the encryption and decryption combining mapping according to an embodiment of the present invention is, for example, an implementation of these mappings in the form of suitably guided conductive tracks such that they perform a permutation of the bits of the encryption result data block from the encryption output to the decryption input or a re-permutation or inverse permutation. Such an implementation hardly consumes any chip area.
Preferred embodiments of the present invention will be detailed subsequently referring to the appended drawings, in which:
a is a schematic illustration of an encryption process according to another embodiment of the present invention;
b is a schematic illustration of a decryption process for decrypting a cipher text encrypted according to the encryption of
Before the present invention will be explained in greater detail in embodiments referring to the figures, it is to be mentioned that same elements or similar elements in these figures are provided with the same reference numerals or similar reference numerals, a repeated description of these elements being omitted.
For this, the encryption/decryption device 10 comprises encryption means 12, decryption means 14, permutation means 16, inverse permutation means 18 and control means 20. Furthermore, the encryption/decryption device includes a data input 22 for the data blocks to be encrypted, a data input 24 for the data blocks to be decrypted, a data output 26 for the data blocks to be encrypted and a data output 28 for the data blocks to be decrypted.
In
After having roughly described the setup of the device 10, the mode of functioning thereof will now be described in greater detail. The encryption means 12 is formed to map data block at its encryption input block by block to encryption result data blocks according to an encryption mapping and to output the latter at its encryption output. The encryption mapping preferably is a non-linear mapping, mapping n-bit data blocks to m-bit data blocks, n and m being integers, i.e. m,nε|N. In the present embodiment, n=m, wherein m>n might also apply when special further conditions are made to the clear text blocks and the mapping E. As will become evident in the embodiments of
The decryption means 14 is formed to map data blocks at its decryption input to decryption result data blocks block by block according to a decryption mapping and to output the latter at its decryption output, the decryption mapping being inverse to the encryption mapping. The decryption means 14 consequently implements a mapping D (D for decryption) for which it applies that it is true for each possible unencrypted n-bit data block B that D(E(B))=B, i.e. that the decryption means 14 would always map an original data block at its decryption input E(B) to a data block B at its decryption output, which is mapped by the encryption means 12 to the original data block E(B). This at the same time means that E(D(E(B)))=E(B) has to be true for any B. With m>n, the decryption mapping would thus be a mapping D mapping m-bit data blocks to n-bit data blocks, and would only be defined for E(B) blocks. With a series connection of the mappings, it would have to be ensured that the mapping D only acts on E(B), i.e. on the image quantity of the mapping E. For m=n, as is presently the case, E(D(B))=B is true for any n-bit blocks since the image quantity of E equals the definition quantity of D. Of course, E should preferably be different from D, i.e. E should not be self-inverting.
If the encryption result data blocks at the encryption output of the encryption means 12 were directly fed to the decryption means 14 or its decryption input, their effects would cancel each other out, i.e. a data block at the encryption input of the encryption means 12 would be output unchanged at the decryption output of the decryption means 14. This is, as will be described below, prevented by the permutation means 16 and 18. The decryption means 14 may, like the encryption means 12, also be realized by one or several S-boxes, namely by S-boxes inverse to those forming the encryption means 12.
The permutation means 16 includes an n-bit permutation input and an n-bit permutation output. The permutation means 16 is provided to permute, i.e. re-order, the bits of an n-bit data block at the permutation input and to output the permuted n-bit data block at the permutation output. Put differently, the n-bit data block at the permutation input consists of a sequence of n bits, wherein the order thereof is changed by the permutation by the permutation means 16. The permutation means 18 also comprises a permutation input and a permutation output. It is provided to permute the n bits of an n-bit data block at the permutation input precisely inversely to the permutation of the permutation means 16. This means that, if an n-bit data block having the order of bits was applied to the permutation input of the inverse permutation means 18, as resulted after the permutation by the permutation means 16, the result at the permutation output of the inverse permutation means 18 would again be the n-bit data block having the bit order as was present at the permutation input of the permutation means 16.
Both the permutation means 16 and the inverse permutation means 18 may be implemented as conductive tracks which may connect the individual n bit inputs at the permutation input to different ones of the n bit outputs at the permutation output.
The control means 20 is able to guide data blocks to be encrypted at the input 22 and data blocks 24 to be decrypted through the means 12, 14, 16 and 18 in different ways. According to the embodiment of
A data block having an order of bits changed compared to the encryption result data block C results at the permutation output, i.e. C′=P(C). With this changed order, the data block C′ is applied to the decryption input of the decryption means 14. As has been mentioned, without the permutation, the decryption means 14 would map the block to B. However, it maps the data block C′ according to the decryption mapping D to a decryption result data block which at the same time represents the final result of the encryption according to the present embodiment and is indicated here by Cresult. Cresult=D(C′) is true here or, expressed for the entire sequence of mappings passed, Cresult=D(P(E(B))).
The control means 20 provides for data blocks to be encrypted at the input 24 to pass a different sequence of means, namely the sequence of encryption means 12, inverse permutation means 18 and decryption means 14. It is exemplarily assumed that the data block to be decrypted is the encrypted data block Cresult just received. This data block Cresult is fed from the input 24 to the encryption input of the encryption means 12. This applies the encryption mapping E to the data block. The result at the encryption output of the encryption means 12 is an encryption result data block Cresult′=E(Cresult)=E(D(P(E(B))))=P(E(B))=C′. The mapping by the encryption means 12 exactly reverses the decryption mapping having been performed at the end of the encryption. The result at the output of the encryption means 12 is an encryption result data block C′ as would also be obtained by sequentially applying the encryption mapping E and the permutation P to the original encrypted data block.
The result encryption data block C′ at the output of the encryption means 12 is then supplied to the permutation input of the inverse permutation means 18. This process changes the order of the n bits of the n-bit encryption result data block in a manner which is inverse to that applied for obtaining the encryption intermediate result C′ when encrypting. The result at the permutation output 18 is Cresult″=P−1(P (E (B)))=E(B)=C. The encryption result data block C′ is consequently, when decrypting, not applied to the decryption input of the decryption means 14 in the order of bits as is present at the encryption output, but in an order changed by the inverse permutation means 18, i.e. as Cresult″=C. The decryption means 14 maps this data block C at its decryption input to D(E(B))=B according to the decryption mapping D, i.e. again the data block in clear text.
Consequently, the device 10 of
Referring to the description of
It is noted with reference to
Subsequently, it will be assumed that n=m. It is possible in this case that the control means 20 has the data blocks to be encrypted pass the sequence of encryption means 12, permutation means 16 and decryption means 14 more than only once and correspondingly also has the data blocks to be decrypted pass the sequence of encryption means 12, inverse permutation means 18 and decryption means 14 several times. The multiple passing can increase the safety of the encrypted data stored.
The upper line of
The decryption in
It becomes obvious from
The embodiment of
In the above embodiments of
a shows an encryption according to an embodiment of the present invention. Like in the embodiment of
According to the encryption example of
Expressed in greater detail, according to the embodiment of
After that, the bits are supplied to the S-box inputs of the S-boxes S1-S8, i.e. the four most significant bits 31-28 of the S-box S1, the next less significant bits 27-24 of the S-box S2, etc. The S-boxes S1-S8 map the 4-bit words at their S-box inputs to mapped 4-bit words according to a mapping rule associated thereto, which is preferably non-linear and different for all S-boxes. The four bits at the S-box outputs of the S-boxes S1-S8 are then supplied as a 32-bit data block to a 32-bit data input of the linear transforming means 40, i.e. in turn the four bits of the S-box S1 as the four most significant bits 31-28, the four bits output of the S-box S2 as the next less significant bits 27-24, . . . and the bits of the S-box S8 as bits 3-0.
The linear transforming means 40 maps the data block at its data input to another 32-bit data block by a linear mapping. In the present embodiment, the linear mapping L is even self-inverting so that the double execution of L at a data block one after the other would again result in the data block, i.e. L(L(B))=B. The resulting data block at the data output of the linear transforming means 40 is passed on to the rotating means 44 which shifts the bits of the data block at its data input by a number of bits depending on the rotation R to the right or the left and attaches the bits shifted out again at the bit positions released. The data block at the output of the rotation means 44 thus represents the result of the first sub-round 52a.
This 32-bit data block is then again subjected to an XOR combination 50 with one round key K2, wherein again those bit positions where the round key K2 has a logical one invert. Four respective subsequent bits of the resulting data block are then supplied to the inverse S-boxes S1−1-S8−1 at their S-box inputs which then perform inverse mappings at the supplied 4-bit words, i.e. the S-box S1−1 a mapping inverse to the mapping of the S-box S1, the S-box S2−1 a mapping inverse to the mapping of the S-box S2, etc. The 4-bit words at the S-box outputs of the S-boxes S1−1-S8−1 in turn form a 32-bit data block which is applied to the linear transforming means 42 which executes the same linear transformation as the linear transforming means 40. The result of the linear mapping is a 32-bit data block supplied to the input of the rotation means 46 which rotates this data block by the same number of bits in the same direction as the rotation means 44. The resulting 32-bit data block is the cipher text C or the cipher data block C.
Like in the embodiment of
Referring to
b shows a decryption round for decrypting a cipher text data block C as is obtained by an encryption round 52 of
During a decryption round 60, a cipher text data block C passes two inverse rotation means 66, 68, two linear transforming means 70 and 72 and two XOR combining means 74 and 76.
When decrypting, the mappings are performed on the cipher text data block as they are also performed on the clear text data block in the case of encryption, but in an inverse order, and inverted. This means that, corresponding to the rotation 46 of
Referring to
The encryption/decryption device of
In
The encryption switch output of the switch 108 is connected to an input of the rotation means 44. An output of the rotations means 44 is connected to a data input of the encryption means 50 containing the round key K2 at its 32-bit key input, whereas the round key K1 is at the key input of the key means 48. The output of the XOR combining means 50 is connected to an input of S1−1-S8−1. The outputs of the latter are connected to a 32-bit switch input of the switch 110 which, as do the switches 106 and 108, obtains the control signal c0 from the control means 114 at a control input thereof and connects, depending thereon, the 32-bit control input to either a 32-bit encryption switch output or a 32-bit decryption switch output. The encryption switch output of the switch 110 is connected to an input of the linear transforming means 42, the output of which in turn is connected to a 32-bit switch input of the switch 102. This switch 102 also obtains, at a control input thereof, the control signal c0 from the control unit 114 and correspondingly switches the switch input to either a 32-bit encryption control output or a 32-bit decryption switch output. The 32-bit encryption switch output of the switch 102 is connected to an input of the rotating means 46, the output of which in turn is connected to a 32-bit switch input of the switch 104. This switch 104 obtains, at a control input thereof, a control signal b0 from the control unit 114 and comprises a 32-bit round terminating switch output and a 32-bit round continuation switch output. Depending on the signal b0, the switch 104 connects the switch input to either the round terminating switch output or the round continuation switch output. The round continuation switch output is connected to the input of the XOR combining means 48, whereas the round terminating switch output is connected to the output 120 of the means 100.
With regard to decryption, the input 118 is connected to an input of the inverse rotating means 66. Its output in turn is connected to the input of the linear transforming means 42. The decryption switch output of the switch 102 is connected to the input of the S-boxes S1-S8. The decryption switch output of the switch 106 is connected to a data input of the XOR combining means 74 which obtains the round key K2 at its key input and is connected with its data output to an input of the inverse rotating means 68. The output of the inverse rotating means 68 is connected to the input of the linear transforming means 40. The decryption switch output of the switch 108 is connected to the input of the inverse S-boxes S1−1-S8−1. The decryption key output of the switch 110 is connected to the data input of the XOR combining means 76 which obtains the round key K1 at its key input and which is connected with its data output to a switch input of the switch 112. The switch 112 obtains at a control input thereof the control signal b0 from the control unit 114 and correspondingly connects the switch input to either a decryption round terminating switch output or a decryption round continuation switch output. The decryption round continuation switch output of the switch 112 is connected to the input of the inverse rotating means 66, whereas the decryption round terminating switch output is connected to the output 122 of the device 100.
After having described above the setup of the device of
It is assumed for illustration purposes that the encryption/decryption device 100 of
An encryption will be considered first. A data block to be encrypted is at the data input 116. Then, the control unit 114 drives all the switches 102, 106, 108 and 110 by the signal c0 such that they connect their respective control input to the encryption control output. This simply means that the order of means the data block to be encrypted at the input 116 passes is determined up to the switch 104, namely the order of XOR combining means 48, S-boxes 12′, linear transforming means 40, rotating means 44, XOR combining means 50, inverse S-boxes 14′, linear transforming means 42, rotating means 46, as has already been described referring to
The control unit 114 does not have to change the signal c0 while the data block passes this sequence. Generally, the control unit 114 does not change the signal c0 for the entire encryption process, i.e. not even for the subsequent rounds. The control signal c0 remains the same for the entire encryption process such that only a little amount of control for control unit 114 results. The control unit 114 provides for, by means of the control signal b0, the switch 104 to connect, after the first round pass, i.e. after processing by the rotating means 46, its switch input to the encryption round continuation switch output such that the intermediate result or data block the rotating means 46 outputs is again applied to the XOR combining means 48 which forms the beginning of the encryption round determined by the switches 106, 108, 110 and 102.
After the second pass or the second processing by the rotating means 46, the control unit 114 provides for the switch 104 to switch the switch output to the encryption round terminating switch output (switch position indicated in broken lines) such that the cipher text or cipher text data block is output at the data output 120, as results after a double round pass 52, as is illustrated in
When decryption is to be performed, the control unit 114 provides for, by the control signal c0, the switches 102, 106, 108 and 110 to connect their control input to the decryption control output (in
The previous embodiments are suitable for being used as an encryption of memory contents as a protection against unauthorized readout of these memory contents. However, the embodiments may also be used for an online or bus encryption in other applications when, for example, the encryption hardware behind it is to be kept small.
The previous embodiments of
In all previous embodiments, the area required for the implementation has been kept small although both encryption and decryption were equally performed. This has been achieved in the embodiments of
In the embodiments of
In the embodiments of
The S-boxes of the embodiments 3a-4 cause confusion, the linear transformations cause diffusion of the clear text bits. By introducing a corresponding number of multiplexers or switches, one and the same module was able to also perform decryption by a control unit providing for, by these switches or multiplexers, the means to be coupled in accordance with a corresponding sequence of means. In contrast to the embodiment of
In the end, this means for each embodiment described before that the same piece of hardware is used both for encryption and for decryption.
With regard to the above description, it is also pointed out that, although it has been described above that in the encryption mappings the length of the original data blocks is smaller than or equal to that of the data block resulting from the encryption mapping S (i.e. n≦m), it is also possible to equally select n>m like in the DES algorithm, such as, for example, several 6×4 S-boxes when, for example, expansion of the data block providing redundancy is performed before the encryption S or compression after the decryption S−1.
In contrast to Feistel ciphers and the implementing encryption/decryption devices thereof, the embodiments of the present invention have the advantages that no high round number is required to obtain the same safety level, which in turn increases the performance or effectiveness compared to these Feistel cipher encryption/decryption devices.
The above embodiments have only required a minimum of elementary elements, namely exemplarily in the embodiments of
With regard to the above description, it is noted that the number of rounds, i.e. the number of double rounds, is not determined to be one or two, but may take any other value. The encryption rounds of
The encryption means may neutrally be considered as a first mapping means with a first mapping and the decryption means as a second mapping means with a corresponding mapping inverse to the first one.
It is particularly noted that, depending on the circumstances, the inventive scheme for encryption/decryption may also be implemented in software. The implementation may be on a digital storage medium, in particular on a disc or a CD having control signals which may be read out electronically, which can cooperate with a programmable computer system such that the corresponding method will be executed. In general, the invention also is in a computer program product having a program code stored on a machine-readable carrier for performing the inventive method when the computer program product runs on a computer. Put differently, the invention may thus be realized as a computer program having a program code for performing the method when the computer program runs on a computer.
While this invention has been described in terms of several preferred embodiments, there are alterations, permutations, and equivalents which fall within the scope of this invention. It should also be noted that there are many alternative ways of implementing the methods and compositions of the present invention. It is therefore intended that the following appended claims be interpreted as including all such alterations, permutations, and equivalents as fall within the true spirit and scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
DE103 45 378.4-11 | Sep 2003 | DE | national |
This application is a continuation of copending International Application No. PCT/EP2004/008534, filed Jul. 29, 2004, which designated the United States and was not published in English, and is incorporated herein by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/EP04/08534 | Jul 2004 | US |
Child | 11396189 | Mar 2006 | US |