This application is a U.S. National Stage Application of International Patent Application No. PCT/RU2016/050024, filed Jul. 26, 2016, which claims priority to Russian Patent Application No. 2015131963, filed Jul. 31, 2015, each of which is expressly incorporated by reference herein in its entirety.
The invention relates to the field of computer engineering and cryptography and, in particular, to the use of shift registers for implementing high-dimensional linear transformations to be used subsequently in devices for cryptographic protection of data.
A variety of methods for performing linear transformations are used for cryptographic protection of data.
A conventional method that improves both software and hardware implementation of a fixed linear transformation of the AES cipher is based on, the use of a specific form of a linear transformation matrix. The known method relates to cryptography and can be also used for software or hardware implementations in information security systems [1].
Other methods of linear transformations are also known in the art [2-4].
However, the known methods suffer from disadvantages in that they can not be used for performing arbitrary linear transformations, including high-dimensional ones, and that they inefficiently use resources in some computing platforms.
The use of linear feedback shift registers (LFSR) shows potential for implementing linear transformations [5]. Such registers, carried out by software or hardware and capable of operating in both the forward and reverse directions, can be implemented in a variety of computing platforms (
A great number of scientific works were published, which proposed implementation of linear transformations based on various LFSRs, including LFSRs of the Galois and Fibonacci type.
But such linear transformations are typically low-dimensional. When building a diffusion layer of a cryptographic transformation, e.g. a block cipher or a hash function, they do not allow to process the entire block of high dimension and require an additional linear transformation to enhance the security level, for example, in the AES standard this is the ShiftRows ( ) function, in the block cipher LED—the ShiftCells ( ) function, in the hash function of GOST R 34.11-2012—the byte permutation function. Generally, the use of low-dimensional linear transformations is compensated for by increasing the number of cryptographic transformation rounds to achieve higher strength, which leads to lower performance.
The method according to [2] that allows to efficiently implement a LFSR is the most relevant, in the technical sense, to the present invention, said method performing a linear operation and being applicable for linear transformation. The method is based on using separable tables and provided for implementing LFSRs only in a binary field.
This method is regarded as the closest prior art.
Another known method according to [3] allows to implement a high dimensional LFSR and requires little memory, but is slow, while the method according to [4] is fast, but requires too much memory.
The disadvantage of the closest prior art and the known techniques listed above is the impossibility to select parameters of a computing system for efficient use of its resources, and this fact does not allow to reduce the number of required operating cycles to be used in a processor system to compute the transformation result.
The technical result refers to enabling to select inter-related parameters (performance and required amount of memory) for a particular computing system when implementing a high-dimensional linear transformation.
To this end, a method is provided that enables to perform a linear transformation of an original message using a Galois-type LFSR (
Furthermore, knowing a processor word size and an amount of memory allocated for performing the method, it can be determined in advance how many LFSR cycles are required to compute the linear transformation of the original message.
An embodiment of the method involves generating a Galois-type LFSR and a linear transformation of a message S represented in a binary form, the method comprising:
According to another embodiment, the method involves generating a Fibonacci-type LFSR and a linear transformation of a message S represented in a binary form, the method comprising:
where N∈0, 1, 2, . . . ,
an internal primitive polynomial
an external polynomial
is a number of stages in the LFSR,
an output state of the stages of the LFSR, q′i, for one operating cycle, forms a vector
Y=(q′m−1,q′m−2, . . . ,q′2,q′1,q′0),
To implement the present method using a Galois-type LFSR, the LFSR is modified.
The principal distinction of the modified Galois LFSR is in the way of computing a feedback function value. In the modified Galois LFSR, feedback function values of the register are computed from tables, depending on values of bits of the high stage of the register.
An initial linear transformation is L:VsVs. The transformation L is set based on the Galois LFSR over a composite field GF((2n)m), where s=m×n, using the internal primitive polynomial
f(x)=xn⊕Σi=0n−1aixi,
where ai∈GF(2),
and the external irreducible polynomial
h(y)=ym⊕Σi=0m−1hiyi,
where hi∈GF(2n) and h0=1.
The initial state of the stages of the Galois LFSR, qi, forms a data vector
X=(qm−1,qm−2, . . . ,q2,q1,q0),
Elements of the composite field GF((2n)m) are also computed using the following linear feedback shift register (hereinafter LFSR) of the Galois configuration based on the polynomials f(x) and h(y) [4].
The linear transformation L of the original data vector X=(qm−1, qm−2, . . . , q2, q1, q0) refers herein to the result of m in cycles of the LFSR.
The output state of the stages of the Galois LFSR, q′i, for one operating cycle, forms the vector
Y=(q′m−1,q′m−2, . . . ,q′2,q′1,q′0),
where q′i∈GF(2n), 0≤i≤m−1,
and each value q′i is computed by the formula
q′i=hi·qm−1⊕qi−1
for each i=m−1, . . . , 1 and q′0=h0·qm−1.
The operations of adding and multiplying two n-bit numbers in the Galois LFSR are performed in the field GF(2n). The linear transformation of the original data vector is performed in m cycles of the Galois-type LFSR.
The transformation results in a new state of the register at the m-th cycle. A reverse linear transformation L−1 is performed in m cycles of the LFSR in the reverse direction.
Let p0, p1, . . . , pd are all divisors of the number m, while p0<p1< . . . pd. Let us denote values
where W is the word size of the processor which performs the initial linear transformation, pi is selected based on the amount of available memory M.
Let the initial state of the stages of the modified Galois LFSR form the vector
X′=(QR−1, . . . ,Q1,Q0),
where Qr is equal to the content of stages qkr+k−1∥ . . . ∥qkr,
The output state of the stages of the modified Galois LFSR Q′i, for one operating cycle, forms the vector Y′=(Q′R−1, . . . , Q′1, Q′0), and each value Q′i for each r=R−1, . . . , 1 is computed by the formula
Q′r=f(Hr)⊕Qr−1
while Q′0=f(H0),
and the function is defined as:
j=0, 1, . . . , W−1 are bits of stage QR−1 of the modified Galois LFSR.
If the state at the m-th cycle is the result of the linear transformation L according to the Galois LFSR configuration (
“true-false” check operations for all bits of the stage QR−1. The number of modulo-2 additions of W-bit numbers for each computation of the value f(Hr) from each table is equal to W−1. Therefore, each operating cycle of the modified Galois LFSR requires the following number of additions:
As a result, the required number of modulo-2 additions of W-bit numbers for R cycles of the modified Galois LFSR is equal to
The required memory amount is
to store R tables Hr=15, . . . , 0.
For proper functioning of the configuration of
The sequence of calculation of R tables Hr, r=(R−1), . . . , 0 is based on the principle of superposition of linear transformations. Input data of the algorithm is a linear transformation over the specified composite field GF((2n)m), and p is any one of divisors of the number m. Output data is R required tables Hr, r=(R−1), . . . , 0.
Every step of the algorithm (
Step 1 [Block 2]: Assigning values
and t=0;
Step 2 [Item A—Block 3]: Checking the condition j≤m−1
Step 3 [Item B—Block 5] Checking the condition l<n
The order of computing the required tables for the reverse linear transformation L−1 is the same. But in this case the resulting modified Galois-type LFSR will operate in the reverse direction with the “true-false” check for all bits of the stage Q0 instead of QR−1.
If the linear transformation L:VsVs is set based on the Fibonacci LFSR over the composite field GF((2n)m), where s=m×n, using the internal primitive polynomial
f(x)=xn⊕Σi=0n−1aixi,
where ai∈GF(2),
and the external irreducible polynomial
h(y)=ym⊕Σi=0m−1hiyi,
where hi∈GF(2n) and h0=1,
then it can be implemented according to the modified Fibonacci LFSR configuration.
The initial state of the stages of the Fibonacci LFSR, qi, forms the data vector
X=(qm−1,qm−2, . . . ,q2,q1,q0),
where qi∈GF(2n), 0≤i≤m−1
The output state of the stages of the Fibonacci LFSR, q′i, for one operating cycle, forms the vector
Y=(q′m−1,q′m−2, . . . ,q′2,q′1,q′0),
where q′i∈GF(2n), 0≤i≤m−1
and each value q′i is computed by the formula
q′i=qi+1
for each i=0, . . . , m−2 and
The operations of adding and multiplying two n-bit numbers in the Fibonacci LFSR are performed in the field GF(2n). The linear transformation of the original data vector takes in cycles of the Fibonacci LFSR (
In this case, the modified Fibonacci LFSR has a general configuration shown in
Let the initial state of the stages of the modified Fibonacci LFSR form the vector
X′=(QR−1, . . . ,Q1,Q0),
where Qr=qkr+k−1∥ . . . ∥qkr, 0≤r≤R−1
The output state of the stages Q′i for one operating cycle forms the vector
Y′=(Q′R−1, . . . ,Q′1,Q′0),
and each value Q′i is computed by the formula Q′r=Qr+1 for each r=0, . . . , R=2 and
j=0, 1, . . . , W−1-bits of stage Qr of the modified Fibonacci LFSR.
If the state at the m-th cycle is the result of the linear mapping L according to the Fibonacci LFSR configuration in
“true-false” check operations. The number of modulo-2 additions of W-bit numbers for computing each value f(Hr) from each table is equal to W−1. Therefore, each cycle of the modified Fibonacci LFSR requires
operations of modulo-2 addition of W-bit numbers. As a result, the number of modulo-2 additions of W-bit numbers for R cycles of the register is
The required memory amount is
for storing R tables Hr, r=15, . . . , 0.
For correct operation of the modified configuration it is, necessary to determine R tables Hr, r=(R−1), . . . , 0.
The algorithm for computing R tables Hr, r=(R−1), . . . , 0 is also based on the principle of superposition of linear transformations. Input data of the algorithm is a linear transformation over the specified composite field GF((2n)m) that is provided according to the Fibonacci LFSR, and p is any one of divisors of the number m. Output data is R required tables Hr, r=(R−1), . . . , 0.
Every step of the algorithm is considered hereinbelow.
Step 1 [Block 2]; Assigning values
Step 2 [Item A—Block 3]: Checking the condition r<R
Step 3 [Item B—Block 5] Check condition j<k
Step 4 [Item B—Block 7] Checking the condition l<n
The order of computing the required tables for the inverse linear mapping L−1 is the same. But in such a case it would be necessary to use the Fibonacci LFSR configuration (
An exemplary implementation of the present method using a modified Galois-type LFSR will be described hereinbelow.
The present method can be implemented in an application for a computing system, and a computer with one processor that has the word size of 8-bit and higher and operates under control of an operating system (for example, Microsoft Windows 7) can serve as such a computing system.
The application for implementing operation of a Galois (or Fibonacci)-type LFSR can be developed by an artisan skilled in the field of programming based on the knowledge of conventional principles and structures of a LFSR of an appropriate type and the steps of the method provided hereby.
For the sake of convenience in analysis and synthesis, the description of the invention considers a linear transformation L with specific parameters typical to a large class of cryptographic algorithms:
where
(h15, h14, . . . , h0)=(148, 32, 133, 16, 194, 192, 1, 251, 1, 192, 194, 16, 133, 32, 148, 1) hiεGF(28)
A useful property for a linear transformation has been recently discovered in cryptography: if any sequence of symbols is recorded into stages of a LFSR and the register is “shifted” left 16 times, then check code symbols with the maximum distance will remain in the register (MDS-code): C(32, 16, 17) [6]. The minimum distance between any code words of this code is 17. If such a code is taken as a linear transformation of a block cipher, then it will have the maximum dispersion property (d=17).
The operating sequence for one cycle of the LFSR is the following:
while q0=h0·q15
The linear transformation L of the original data vector
X=(q15,q14, . . . ,q2,q1,q0)
will refer herein to 16 operating cycles of the LFSR.
The transformation results in a new state of the register at the m-th cycle, which can be written down as
Y=(q′15,q′14, . . . ,q′2,q′1,q′0),
where q′i∈GF(28), 0≤i≤15 are values of stages of the LFSR.
The reverse transformation L−1 takes 16 operating cycles of the LFSR in the reverse direction.
Let us denote some divisor of the number m=16 as k (the selection thereof is defined by the available processor word W and available amount of memory M).
The essence of the present way of implementing on an appropriate platform depends on the value k and is based on applying the superposition principle when considering the effect of each bit of the current state of the LFSR on the subsequent state, in accordance with the fact that for each k there is a way to implement the transformation L at an (nk)-bit processor.
The following cases will be discussed hereinbelow.
Computation case 1: k=1. This case considers the way of implementing the transformation L at 8-bit processors (n·k=8·1=8). For this case the following steps are performed:
for all q15=2l, l=0, . . . , 7, i.e. the effect of each bit of the number q15 on the state of the LFSR (
This means that if the u-th bit of the stage Q15 equals unity, then the respective row Hj,u participates in the process of deriving the feedback function value.
“true-false” check operations for all bits of the stage Q15 and
modulo-2 addition operations for two n×k-bit numbers and Ql and Hl,j, where l=0, 1, . . . , r−1 and j=0, 1, . . . , nk.
The required amount of memory is
bits=128 bytes for storing 16 tables Hj, j=15, . . . , 0.
The order of implementing the reverse linear transformation L−1 at 8-bit processors is performed similarly, using the LFSR (
Computation case 2: k=2. In this case a method of implementing the transformation L at 16-bit processors is considered. The method comprises the following steps:
This means that, if the ii-th bit of the stage Q15 equals unity, then the respective row Hj,u participates in the process of deriving the feedback function value.
The forward linear transformation L comprises r=8 operating cycles of the extended LFSR, where the 8 operating cycles of the extended LFSR require
“true-false” check operations
and
modulo-2 addition operations of two 16-bit numbers.
The required amount of memory is
bits=256 bytes for storing 8 tables Hj, j=7, . . . , 0.
The order of implementing the reverse linear transformation L−1 at 16-bit processors is performed similarly with the use of the LFSR (
Similarly, at k=4 and k=8, the forward linear transformation L and the one reverse thereto can be implemented at 32 and 64-bit processors (
Table 3 shows the results of calculations of numerical values typical to preforming the present method using the Galois-type LFSR.
Comparative analysis of values presented in Table 3 shows that the present method makes it possible to select inter-related parameters of the computing system.
For example, if a 8-bit processor is available, then implementation of the specified linear transformation will require the minimum memory amount of 128 bytes and 16 shift operations for sixteen bytes.
If a more powerful 64-bit processor is available, then implementation of the specified linear transformation will require 1024 bytes of memory and only 2 shift operations for two 64-bit words.
As a result, the use of the present method also offers additional opportunities to developers in designing an application program or a hardware unit of a computing system that implements the linear transformation, and taking into account the requirements emerging in practice.
Number | Date | Country | Kind |
---|---|---|---|
2015131963 | Jul 2015 | RU | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/RU2016/050024 | 7/26/2016 | WO | 00 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2017/023195 | 2/9/2017 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
5946473 | Lotspiech et al. | Aug 1999 | A |
6925563 | Jennings | Aug 2005 | B1 |
20020051534 | Matchett | May 2002 | A1 |
20080240426 | Gueron | Oct 2008 | A1 |
20100058477 | Ciet | Mar 2010 | A1 |
20100278338 | Chang | Nov 2010 | A1 |
20140079215 | Wei et al. | Mar 2014 | A1 |
Number | Date | Country |
---|---|---|
1514174 | Nov 2005 | EP |
2296427 | Mar 2007 | RU |
WO 9945670 | Sep 1999 | WO |
WO 2010132895 | Nov 2010 | WO |
Entry |
---|
Examination Report dated Jul. 31, 2015, issued by the Russian Patent Office (in Russian language) for Russian Patent Application RU2015131963; 2 pages. |
Borisenko, Nicolay et al., “Developing algorithm for software and hardware implementation of large size linear mapping”, 2nd Workshop on Current Trends in Cryptology (CTCrypt 2013), Jun. 23-25, 2013, Ekaterinburg, Russia, Pre-proceedings, pp. 192-205. |
Borodin, Mikhail et al., “High-Speed Software Implementation of the Prospective 128-bit Block Cipher and Streebog Hash-Function”, 3rd Workshop on Current Trends in Cryptology (CTCrypt 2014), Jun. 5-6, 2014, Moscow, Russia, Pre-proceedings, pp. 189-197. |
Kuzmin, A. S. et al, “Linear recurring sequences over Galois rings”, Algebra and Logic, 3:2 (1995), pp. 169-189. |
Couselo, E. et al., “A. Recursive MDS-codes and recursively differentiable quasigroups. Discrete Mathematics”, vol. 10, Issue 2, 1998, pp. 3-29. |
International Search Report and Written Opinion, issued by the Russian Patent Office (in Russian language), dated Dec. 8, 2016, for International Application No. PCT/RU2016/050024; 6 pages. |
English translation of the International Search Report, issued by the Russian Patent Office, dated Dec. 8, 2016, for International Application No. PCT/RU2016/050024; 1 page. |
Kuzmin, A.S., et al., “Linear Recurring Sequences Over Galois Rings,” Algebra and Logic, vol. 34, No. 2, 1995. |
Couselo, E., et al., “Recursive MDS-codes and recursive differentiable quasigroups,” Discrete Math. Appl, vol. 8, No. 3, pp. 217-245 (1998). |
Number | Date | Country | |
---|---|---|---|
20170295011 A1 | Oct 2017 | US |