The present invention is based upon and claims the benefit of the priority of Japanese patent application No. 2011-087088, filed on Apr. 11, 2011, the disclosure of which is incorporated herein in its entirety by reference thereto.
The present invention relates to a cryptographic method, a cryptographic device, and a cryptographic program. In particular, it relates to a cryptographic method, a cryptographic device, and a cryptographic program for performing encryption per block by using a common key (secret key).
Common key block cipher (which will simply be referred to as “block cipher”) is known as a technique for keeping communication data or accumulated data secret. “Feistel structure” is one of the basic structures of such block cipher.
In addition, Non Patent Literature (NPL) 1 discloses a Generalized Feistel structure (which is referred to as “Feistel Type Transformation” in NPL 1). With this structure, the division number of the Feistel structure is extended to 2 or more.
While NPL 1 proposes three types (Type-1 to Type-3) of structures, the present description will be made based on Type-2 (hereinafter, the phrase “Generalized Feistel structure” signifies Type-2, unless otherwise noted).
Processing performed by a non-linear conversion unit 20 and processing performed by a permutation processing unit 21 in one round of the Generalized Feistel structure will be examined separately. Of the inputted k-sequence data, the non-linear conversion unit 20 directly outputs data Xi (i is an odd number of k or less). In addition, the non-linear conversion unit 20 randomizes the data Xi and key data Kj (j=(i+1)/2) with a function F and performs exclusive OR on the obtained data and data Xi+1. Next, the non-linear conversion unit 20 outputs the resultant data. The permutation processing unit 21 performs permutation processing to cyclically shift the sequence data in the left direction by one sequence.
Y. Zheng, T. Matsumoto, H. Imai, “On the Construction of Block Ciphers Provably Secure and Not Relying on Any Unproved Hypotheses,” CRYPTO 1989, LNCS vol. 435, pp. 461-480, Springer-Verlag, 1998.
The disclosure of the above NPL is incorporated herein by reference thereto. The following analysis has been given by the present inventor. In block cipher, each bit data of the input data (plaintext) needs to influence all the bits of the output data (ciphertext), and it is desirable that an encryption algorithm efficiently diffuse the bit data.
However, as illustrated in
In addition, in block cipher having the Generalized Feistel structure, if the division number k is increased, the functions F can be minimized, counted as an advantageous effect. However, the number of rounds to be applied to an impossible differential attack and a saturation attack is increased. Thus, as a measure, the number of rounds needs to be increased. Consequently, the processing speed is reduced, counted as a problem.
It is an object of the present invention to provide a cryptographic method, a cryptographic device, and a cryptographic program that can achieve excellent diffusion properties and a smaller round number.
According to a first aspect of the present invention, there is provided a cryptographic method, performing k-sequence-data randomizing processing a predetermined number of times. One round of the processing includes steps of: performing conversion processing on k pieces (k is an even number of 6 or more) of n-bit sequence data obtained by dividing nxk bit block data so that i-th sequence data and (i+1)th sequence data (i=1, 2, . . . , k−1) interacts with each other and outputting k pieces of data W1, W2, . . . , Wk; and permutating the data W1, W2, . . . , Wk based on a predetermined rule. This method is associated with a certain machine, that is, with a cryptographic device that performs cryptographic processing for keeping data secret when the data is communicated or accumulated.
According to a second aspect of the present invention, there is provided a cryptographic device, comprising: a predetermined number of rounds of k-sequence-data randomizing means. One round of the means includes: a conversion means for performing conversion processing on k pieces (k is an even number of 6 or more) of n-bit data obtained by dividing n×k bit block data so that i-th sequence data and (i+1)th sequence data (i=1, 2, . . . , k−1) interacts with each other and outputting k pieces of data W1, W2, . . . , Wk; and a permutation means for permutating the data W1, W2, . . . , Wk based on a predetermined rule.
According to a third aspect of the present invention, there is provided a cryptographic program, causing a computer, to which k pieces (k is an even number of 6 or more) of n-bit data obtained by dividing nxk bit block data is inputted, to perform k-sequence-data randomizing processing for a predetermined number of rounds. One round of the processing includes processes of: performing conversion processing so that i-th sequence data and (i+1)th sequence data (i=1, 2, . . . , k−1) interacts with each other and outputting k pieces of data W1, W2, . . . , Wk; and permutating the data W1, W2, . . . , Wk based on a predetermined rule. This program can be recorded in a computer-readable (non-transient) storage medium. Namely, the present invention can be embodied as a computer program product.
According to the present invention, it is possible to obtain a configuration that ensures resistance to an impossible differential attack and a saturation attack with a smaller round number.
First, an outline of the present invention will be described with reference to the drawings. In the following outline, various components are denoted by reference characters for the sake of convenience. Namely, the following reference characters are merely used as examples to facilitate understanding of the present invention. Thus, the present invention is not limited to the illustrated modes.
As illustrated in
Specifically, k-sequence-data randomizing processing is performed a predetermined number of times. One round of the processing includes steps of: performing conversion processing on the k pieces of n-bit sequence data B1 to Bk so that the i-th sequence data Bi and the (i+1)th sequence data Bi+1 interacts with each other and outputting k data W1, W2, . . . , Wk; and permutating the data W1, W2, . . . , Wk based on a predetermined rule (permutation processing is not performed in the final round).
The non-linear conversion means 11 in
Alternatively, as illustrated in
In addition, by combining the above bi-directional non-linear conversion processing with permutation processing determined in advance based on the number of sequences not with cyclic shifting, diffusion properties can be improved further.
According to the present invention, since the above permutation processing only exchange-replaces (i.e. permutates) the bit data, irrespective of whether hardware implementation method or software implementation method is used, the implementation cost is not increased by any change in permutation pattern, counted as an advantageous effect.
Next, a first exemplary embodiment of the present invention will be described in detail with reference to the drawings.
When transmitting data, such communication apparatus 10 causes the data compression means 100 to compress the data, the encryption means 71 to encrypt the data, and the encoding means 102 to perform error correcting encoding. In this way, the communication apparatus 10 transmits encrypted transmitted data.
In addition, when receiving data, the communication apparatus 10 causes the encoding means 102 to perform error correction, the decryption means 72 to decrypt the data, and the data decompression means 104 to decompress the data to obtain decompressed data.
Specific examples of the above communication apparatus 10 include various devices that need to keep communication data secret, such as voice communication terminals and data communication devices. In addition, in
The encryption means 71 includes a predetermined round number R of k-sequence-data randomizing means 710 (k is an even number of 6 or more). The encryption means 71 outputs one block of ciphertext data C with respect to input of one block of plaintext data P and the expanded keys K1, K2, . . . , KR. More specifically, first, the encryption means 71 divides kn bit plaintext data P into k pieces of n-bit data and inputs the data and key data K1 to a k-sequence-data randomizing means 710 to randomize the data. Subsequently, the k-sequence-data randomizing means 710 in an r-th round (2≦r≦R) receives the output from the k-sequence-data randomizing means 710 in an (r−1)th round and key data Kr. In this way, the data and the expanded keys are repeatedly randomized. Finally, kn bit data in which the k pieces of outputs are combined are outputted as ciphertext data C from the k-sequence-data randomizing means 710 in an R-th round.
The decryption means 72 includes a predetermined round number of k-sequence-data randomizing means 720. The decryption means 72 outputs one block of plaintext data P with respect to input of one block of ciphertext data C and the expanded keys K1, K2, . . . , KR. As is the case with the encryption means 71, first, the decryption means 72 divides kn bit ciphertext data P into k pieces of n-bit data and inputs the data and key data K1 to a k-sequence-data randomizing means 710 to randomize the data. Subsequently, the k-sequence-data randomizing means 720 in a r-th round (2≦r≦R) receives the output from the k-sequence-data randomizing means 720 in an (r−1)th round and key data Kr. In this way, the data and the expanded keys are repeatedly randomized. Finally, kn bit data in which the k pieces of outputs are combined are outputted as the plaintext data P from the k-sequence-data randomizing means 720 in an R-th round. In the decryption means 72, the expanded keys are used in an order opposite to that of the expanded keys used in the encryption means 71 (see the indexes attached to the respective key data in
In the non-linear conversion means 711, k/2 configurations are arranged in parallel, each of which corresponds to that as illustrated in one of
Depending on the sequence number k, the permutation processing means 712 permutates k pieces of intermediate data in accordance with a predetermined permutation pattern.
Next, permutation patterns will be described in detail. A permutation from data Wi to Wj[i] will be expressed as {j[1],j[2], . . . ,j[k]}. The following permutation patterns can be used as the permutation patterns for respective sequence numbers k.
When six sequences are used (k=6),
{4,1,2,5,6,3};
When eight sequences are used (k=8),
{,1,8,3,4,7,2,5}
{4,1,8,5,6,7,2,3};
When 10 sequences are used (k=10),
{4,1,8,3,10,5,6,9,2,7}
{4,1,6,3,10,7,2,9,8,5}
{4,1,6,3,10,7,8,9,2,5}
{6,1,8,3,4,7,2,9,10,5}
{6,1,8,3,10,7,2,9,4,5}
{6,1,8,3,10,7,4,9,2,5}
{4,1,8,5,2,3,6,9,10,7}
{4,1,8,5,2,7,6,9,10,3}
{4,1,8,5,10,7,6,9,2,3};
When 12 sequences are used (k=12),
{8,1,10,3,12,5,4,9,6,11,2,7}
{6,1,10,3,12,7,2,5,8,11,4,9}
{6,1,10,3,12,7,4,5,8,11,2,9}
{6,1,8,3,4,7,12,9,10,11,2,5}
{6,1,10,3,4,7,12,9,2,11,8,5}
{6,1,10,3,12,7,2,9,8,11,4,5}
{6,1,10,3,12,7,4,9,8,11,2,5}
{4,1,8,5,2,3,12,9,6,11,10,7}
{4,1,8,5,2,3,12,9,10,11,6,7}
{4,1,12,5,10,7,6,9,8,11,2,3}
{6,3,10,1,4,7,12,5,8,11,2,9}
{6,3,10,1,12,7,4,5,8,11,2,9}
{6,3,10,1,12,7,2,9,8,11,4,5}
{6,3,10,1,12,7,4,9,8,11,2,5}
{6,3,2,5,8,1,12,9,4,11,10,7};
When 14 sequences are used (k=14),
{4,1,10,5,14,7,6,3,2,11,12,13,8,9}
{4,1,10,5,6,7,2,9,14,11,8,13,12,3};
When 16 sequences are used (k=16),
{10,1,14,3,12,7,16,5,8,11,4,13,6,15,2,9}
{6,1,8,3,12,7,16,9,2,5,4,13,10,15,14,11}
{6,1,12,3,16,7,4,9,2,5,10,13,8,15,14,11}
{6,1,12,3,16,7,14,9,2,5,10,13,8,15,4,11}
{6,1,8,3,12,7,16,9,14,11,4,13,10,15,2,5}
{6,1,10,3,14,7,4,9,16,11,8,13,12,15,2,5}
{6,1,10,3,14,7,12,9,16,11,8,13,4,15,2,5}
{8,1,10,5,14,3,6,9,16,11,12,13,4,15,2,7}
{8,1,10,5,16,3,6,9,14,11,12,13,4,15,2,7}
{8,1,10,5,16,3,14,9,6,11,12,13,4,15,2,7}
{4,1,10,5,16,7,6,3,14,11,12,13,8,15,2,9}
{10,1,2,5,12,7,6,3,8,11,16,13,14,15,4,9}
{4,1,10,5,16,7,6,9,14,11,12,13,8,15,2,3}.
As is the case with the encryption means 71, in the non-linear conversion means 711, k/2 configurations are arranged in parallel. In each of the configurations, data is operated bi-directionally as illustrated in
The inverse permutation processing means 713 performs permutation opposite to that performed by a permutation processing means 712 in the encryption means 71. For example, if a permutation processing means 712 in the encryption means 71 performs a permutation from data in sequence i to sequence j, an inverse permutation processing means 713 performs a permutation from data sequence j to sequence i.
The expanded-key generation means 70, the encryption means 71, the decryption means 72, and the processing means inside the respective means illustrated in
As described, by performing conversion processing so that the i-th and (i+1)th sequence data interacts each other and by permutating data W1, W2, . . . , Wk, cryptographic/decryptographic means achieving excellent diffusion properties with less rounds as illustrated in
Finally, preferable modes of the present invention will be summarized.
(See the cryptographic method according to the above first aspect)
In the conversion processing of the cryptographic method in the first mode, one of the i-th sequence data and the (i+1)th sequence data is inputted to a non-linear function, and exclusive OR is performed on the data obtained by the non-linear function and on the other data. The data obtained by the exclusive OR is used as data W. Exclusive OR is performed on the data W, and the one data, and the obtained data is used as data Wi+1.
In the cryptographic method in the second mode, before exclusive OR is performed on the data Wi and the one data, the data Wi is inputted to a non-linear function and exclusive OR is performed on an output from this non-linear function and the one data. The data obtained by the exclusive OR is used as data Wi+1.
In the conversion processing of the cryptographic method in the first mode, exclusive OR is performed on the i-th sequence data and the (i+1)th sequence data, and the data obtained by the exclusive OR is inputted to a non-linear function. Exclusive OR is performed on the data obtained by the non-linear function and the one data, and the data obtained by the exclusive OR is used as Wi+1. Exclusive OR is performed on the data outputted from the non-linear function and the other data. The data obtained by the exclusive OR is used as data Wi.
In the cryptographic method in any one of the first to fourth modes, if a permutation for replacing the data W1, W2, . . . , Wk (k≦16) with data Wj[1], Wj[2], . . . , Wj[k] is expressed as {j[1], j[2], . . . , j[k]}, when k=6, a permutation expressed as {4,1,2,5,6,3} is performed.
In the cryptographic method in any one of the first to fifth modes, if a permutation for replacing the data W1, W2, . . . , Wk (k≦16) with data Wj[1], Wj[2], . . . , Wj[k] is expressed as {j[1], j[2], . . . , j[k]}, when k=8, a permutation expressed as {6,1,8,3,4,7,2,5} or {4,1,8,5,6,7,2,3} is performed.
In the cryptographic method in the any one of the first to sixth modes, if a permutation for replacing the data W1, W2, . . . , Wk (k≦16) with data Wj[1], Wj[2], . . . , Wj[k] is expressed as {j[1], j[2], . . . , j[k]}, when k=10, a permutation expressed as any one of the following expressions (1) is performed:
{4,1,8,3,10,5,6,9,2,7}
{4,1,6,3,10,7,2,9,8,5}
{4,1,6,3,10,7,8,9,2,5}
{6,1,8,3,4,7,2,9,10,5}
{6,1,8,3,10,7,2,9,4,5}
{6,1,8,3,10,7,4,9,2,5}
{4,1,8,5,2,3,6,9,10,7}
{4,1,8,5,2,7,6,9,10,3}
{4,1,8,5,10,7,6,9,2,3} (1).
In the cryptographic method in any one of the first to seventh modes, if a permutation for replacing the data W1, W2, . . . , Wk (k≦16) with data Wj[1i], Wj[2], . . . , Wj[k] is expressed as {j[1], j[2], . . . , j[k]}, when k=12, a permutation expressed as any one of the following expressions (2) is performed:
{8,1,10,3,12,5,4,9,6,11,2,7}
{6,1,10,3,12,7,2,5,8,11,4,9}
{6,1,10,3,12,7,4,5,8,11,2,9}
{6,1,8,3,4,7,12,9,10,11,2,5}
{6,1,10,3,4,7,12,9,2,11,8,5}
{6,1,10,3,12,7,2,9,8,11,4,5}
{6,1,10,3,12,7,4,9,8,11,2,5}
{4,1,8,5,2,3,12,9,6,11,10,7}
{4,1,8,5,2,3,12,9,10,11,6,7}
{4,1,12,5,10,7,6,9,8,11,2,3}
{6,3,10,1,4,7,12,5,8,11,2,9}
{6,3,10,1,12,7,4,5,8,11,2,9}
{6,3,10,1,12,7,2,9,8,11,4,5}
{6,3,10,1,12,7,4,9,811,2,5}
{6,3,2,5,8,1,12,9,4,11,10,7} (2).
In the cryptographic method in any on firs to eighth modes, if a permutation for replacing the data W1, W2, . . . , Wk (k≦16) with data Wj[1], W[2], . . . , Wj[k] is expressed as {j[1], j[2], . . . , j[k]}, when k=14, a permutation expressed as {4,1,10,5,14,7,6,3,2,11,12,13,8,9} or {4,1,10,5,6,7,2,9,14,11,8,13,12,3} is performed.
In the cryptographic method in any one of the first to ninth modes, if a Permutation for replacing the data W1, W2, . . . , Wk (k≦16) with data Wj[1], W[2], . . . , Wj[k] is expressed as {j[1], j[2], . . . , j[k]}, when k=16, a permutation expressed any one of the following expressions (3) is performed:
{10,1,14,3,12,7,16,5,8,11,4,13,6,15,2,9}
{6,1,8,3,12,7,16,9,2,5,4,13,10,15,14,11}
{6,1,12,3,16,7,4,9,2,5,10,13,8,15,14,11}
{6,1,12,3,16,7,14,9,2,5,10,13,8,15,4,11}
{6,1,8,3,12,7,16,9,14,11,4,13,10,15,2,5}
{6,1,10,3,14,7,4,9,16,11,8,13,12,15,2,5}
{6,1,10,3,14,7,12,9,16,11,8,13,4,15,2,5}
{8,1,10,5,14,3,6,9,16,11,12,13,4,15,2,7}
{8,1,10,5,16,3,6,9,14,11,12,13,4,15,2,7}
{8,1,10,5,16,3,14,9,6,11,12,13,4,15,2,7}
{4,1,10,5,16,7,6,3,14,11,12,13,8,15,2,9}
{10,1,2,5,12,7,6,3,8,11,16,13,14,15,4,9}
{4,1,10,5,16,7,6,9,14,11,12,13,8,15,2,3} (3).
In the cryptographic method in any one of the first to tenth modes, if a permutation for replacing the data W1, W2, . . . , Wk (k≦16) with data Wj[1], Wj[2], . . . , Wj[k] is expressed as {j[1], j[2], . . . , j[k]}, depending on the number k of sequences, a permutation expressed as any one of the following expressions (4) is performed:
When k=6,
{4,1,2,5,6,3}
When k=8,
{6,1,8,3,4,7,2,5}
{4,1,8,5,6,7,2,3}
When k=10,
{4,1,8,3,10,5,6,9,2,7}
{4,1,6,3,10,7,2,9,8,5}
{4,1,6,3,10,7,8,9,2,5}
{6,1,8,3,4,7,2,9,10,5}
{6,1,8,3,10,7,2,9,4,5}
{6,1,8,3,10,7,4,9,2,5}
{4,1,8,5,2,3,6,9,10,7}
{4,1,8,5,2,7,6,9,10,3}
{4,1,8,5,10,7,6,9,2,3}
When k=12,
{8,1,10,3,12,5,4,9,6,11,2,7}
{6,1,10,3,12,7,2,5,8,11,4,9}
{6,1,10,3,12,7,4,5,8,11,2,9}
{6,1,8,3,4,7,12,9,10,11,2,5}
{6,1,10,3,4,7,12,9,2,11,8,5}
{6,1,10,3,12,7,2,9,8,11,4,5}
{6,1,10,3,12,7,4,9,8,11,2,5}
{4,1,8,5,2,3,12,9,6,11,10,7}
{4,1,8,5,2,3,12,9,10,11,6,7}
{4,1,12,5,10,7,6,9,8,11,2,3}
{6,3,10,1,4,7,12,5,8,11,2,9}
{6,3,10,1,12,7,4,5,8,11,2,9}
{6,3,10,1,12,7,2,9,8,11,4,5}
{6,3,10,1,12,7,4,9,8,11,2,5}
{6,3,2,5,8,1,12,9,4,11,10,7}
When k=14,
{4,1,10,5,14,7,6,3,2,11,12,13,8,9}
{4,1,10,5,6,7,2,9,14,11,8,13,12,3}
When k=16,
{10,1,14,3,12,7,16,5,8,11,4,13,6,15,2,9}
{6,1,8,3,12,7,16,9,2,5,4,13,10,15,14,11}
{6,1,12,3,16,7,4,9,2,5,10,13,8,15,14,11}
{6,1,12,3,16,7,14,9,2,5,10,13,8,15,4,11}
{6,1,8,3,12,7,16,9,14,11,4,13,10,15,2,5}
{6,1,10,3,14,7,4,9,16,11,8,13,12,15,2,5}
{6,1,10,3,14,7,12,9,16,11,8,13,4,15,2,5}
{8,1,10,5,14,3,6,9,16,11,12,13,4,15,2,7}
{8,1,10,5,16,3,6,9,14,11,12,13,4,15,2,7}
{8,1,10,5,16,3,14,9,6,11,12,13,4,15,2,7}
{4,1,10,5,16,7,6,3,14,11,12,13,8,15,2,9}
{10,1,2,5,12,7,6,3,8,11,16,13,14,15,4,9}
{4,1,10,5,16,7,6,9,14,11,12,13,8,15,2,3} (4).
(See the cryptographic device according to the above second aspect)
(See the program according to the above third aspect)
As is the case with the above first mode, the twelfth and thirteenth modes can be extended to the second to eleventh modes.
While a preferable exemplary embodiment of the present invention has thus been described, the present invention is not limited thereto. Further modifications, substitutions, or adjustments can be made without departing from the basic technical concept of the present invention. For example, in the above exemplary embodiment, a data diffusion state when the sequence number k=8 is illustrated in
In addition, for example, the number of rounds of the processing to be performed, the data division number, the functions F, and the non-linear conversion method can be changed based on various elements, such as based on performance of a device to which the present invention is applied and security strength required of encryption.
The disclosure of the above NPL is incorporated herein by reference thereto. Modifications and adjustments of the exemplary embodiments and examples are possible within the scope of the overall disclosure (including the claims and the drawings) of the present invention and based on the basic technical concept of the present invention. Various combinations and selections of various disclosed elements (including the elements in each of the claims, examples, drawings, etc.) are possible within the scope of the claims and the drwawings of the present invention. That is, the present invention of course includes various variations and modifications that could be made by those skilled in the art according to the overall disclosure including the claims and the technical concept.
10 communication apparatus
11 non-linear conversion means
12 permutation processing means
13 k-sequence-data randomizing means
20 non-linear conversion unit
21 permutation processing unit
70 expanded key generation means
71 encryption means
72 decryption means
100 data compression means
102 encoding means
104 data decompression means
710, 720 k-sequence-data randomizing means
711 non-linear conversion means
712 permutation processing means
713 inverse permutation processing means
Number | Date | Country | Kind |
---|---|---|---|
2011-087088 | Apr 2011 | JP | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP2012/059853 | 4/11/2012 | WO | 00 | 10/10/2013 |