Cryptographic encoding process5398284Abstract The digital information is encrypted by first performing a preselected number of CRC iterations or partial convolutions by multiplication with a mask in the Galois Field. Before the CRC operation is completed, the intermediate resultant is subjected to an Integer Ring operation, such as addition, which injects a nonlinearity over the Galois Field due to possible arithmetic carry operations. After the Integer Ring operation, the Galois Field CRC process is continued to completion. The result is an encrypted value which is not readily decrypted by Galois Field techniques. Claims What is claimed is: Description BACKGROUND AND SUMMARY OF THE INVENTION
TABLE I
__________________________________________________________________________
00000001
00000011
00000101
00000111
00001001
00001011
00001101
10001010
10001011
10001000
10001001
10001110
10001111
10001100
01000101
11001111
01000100
11001110
01000111
11001101
01000110
10101000
11101101
00100010
01100111
10101001
11101100
00100011
01010100
11111100
00010001
10111001
11011110
01110110
10011011
00101010
01111110
10000010
11010110
01101111
00111011
11000111
00010101
00111111
01000001
01101011
10111101
10010111
11101001
10000000
10010101
10101010
10111111
11010100
11000001
11111110
01000000
11000000
01010101
11010101
01101010
11101010
01111111
00100000
01100000
10100000
11100000
00110101
01110101
10110101
00010000
00110000
01010000
01110000
10010000
10110000
11010000
00001000
00011000
00101000
00111000
01001000
01011000
01101000
00000100
00001100
00010100
00011100
00100100
00101100
00110100
00000010
00000110
00001010
00001110
00010010
00010110
00011010
00001111
00010011
00010111
00011001
00011011
00011101
00100111
10001101
10000011
10000001
10000110
10000111
10000100
10011001
11001100
11001011
11001010
01000011
11001001
01000010
11000110
01100110
11101111
01100101
10101011
11101110
00100001
01100011
00110011
11111101
10111000
11011111
01110111
10011010
10111011
10010011
11110100
01011100
11100101
10110001
01001101
11010111
11000011
01111010
00101110
11111000
11010010
10101100
11100001
11101011
00111101 01111100
01101001
01010110
11111010
11111111
10010100 00111110
10111110
00101011
01111101
11110101
01001010 00011111
01011111
10011111
10110100
11110000
00100101 10000101
10100101
11000101
01011010
01111000
10011000 11001000
11011000
11101000
00101101
00111100
01001100 01100100
01101100
01110100
10011100
00011110
00100110 00110010
00110110
00111010
01001110
00101001
00101111
00111001
01010001
01010011
01011011
10011110
10011101
10010110
10100010
10100011
10100111
01001111
11000100
01001011 11011011
11011001
10101101
01100010
10101111 11100111
11100110
11011100
00110001
11011101 11111001
01110011
01101110
10010010
11100100 11110110
10110011
00110111
01001001
01110010 01111011
11010011
10010001
10101110 10110111
11100011
11000010
01010111 11010001
11111011
01100001
10100001 11100010
11110111
10111010
11011010 01110001
11110001
01011101
01101101 10110010
11110010
10100100
10111100 01011001
01111001
01010010
01011110 10100110
10110110
__________________________________________________________________________
The bitwise shifting and exclusive OR operations provided by the CRC process can be viewed as a multiplication operation between the register and mask in the Galois Field GF(2.sup.n). This operation is, in effect, a convolution operation in which the register bit pattern representing the digital information to be encrypted is convolved with or folded into the bit pattern of the mask. Rather than performing the shifting and exclusive OR operations through a full cycle, as demonstrated by Table I, the present invention suspends or temporarily. halts the convolution operation after a predetermined number of multiplications or iterations. The number of iterations performed before the CRC convolution process is suspended can be treated as a secret number or key to be used in later decrypting the resultant. In FIG. 2 the CRC convolution process is illustrated diagrammatically by circle 18. For illustration purposes, one complete cycle of n iterations (n being the number of bits in the register in this example is diagrammatically depicted by a full rotation of 360.degree. within circle 18. Thus during a first portion of the convolution process depicted by arc A the CRC process proceeds from its starting point at the twelve o'clock position to the suspension point (in this case at the five o'clock position). The point at which suspension occurs is arbitrary, since suspension can occur at any selected point within the full convolution cycle. While the convolution process is occurring, as depicted by circle 18, the operations can be considered as taking place in or being represented in the Galois Field, designated generally by region 20. However, when the suspension point is reached, as at 22, the Galois Field processes are suspended and further processing occurs in the Integer Ring 24. While in the Integer Ring the intermediate resultant of previous Galois Field operations (multiplications) are operated on by a Real Field or Integer Ring process. In FIG. 2, the intermediate resultant value is depicted generally by bit pattern 26. In the presently preferred embodiment bit pattern 26 is arithmetically added with a predetermined number or bit pattern 28, with the resulting sum depicted at 30. One characteristic of the Integer Ring operation is that a carry operation may or may not occur, depending on the value of the digits being added. That is, if digits 0+0 are added, no carry occurs, whereas if digits 1+1 are added, a carry is generated. Any carry from the most significant digit is ignored, as illustrated at 32. After the Integer Ring operation has completed, the resultant sum is transferred back to the Galois Field as indicated by arrow C, whereupon the remainder of the CRC operation is carried out as indicated by arc D. It will be appreciated that the options for altering the simple CRC process are numerous. The precise point at which the CRC process is suspended and the resultant transferred to the Integer Ring can be after any preselected number of iterations (the preselected number being optionally a secret number or key). In addition, the number or bit pattern 28 added while in the Real Field or Integer Ring can also be any secret number, serving as an additional key. Because carries may occur between bits of the intermediate value during the addition step in the Integer Ring, the process is nonlinear with respect to the Galois Field over which the CRC process is being performed. It will be seen that the process thus described is extremely inexpensive to implement, since it only requires one or a few additional program instructions to accomplish and may be effected in as short as a single clock cycle. The improved encryption resulting from the above-described process may be used as a new fundamental cryptographic building block which can be combined to form a part of a more complex encryption/decryption process. For example, more than one Integer Ring operation could be performed during the CRC process to further complicate any decryption analysis. Similarly, any single or combination of information-preserving, reversible operations over the Integer Ring (e.g. addition, subtraction) can be used during the CRC. The key to effectiveness is that the Integer Ring operation must produce the possibility of inter-bit arithmetic carries, which are inherently poorly expressed by Galois Field analysis. Similarly any combination of two or more information-preserving, reversible operations over different mathematical structures, such as Groups, Rings or Fields, can be used. The key to effectiveness is that the operation in one mathemtaical structure is inherently poorly represented in one or more of the other structures. The invention may be implemented in software. In this regard, a C code listing for both the CRC and the reverse CRC (decoding) process is attached in the Appendix. In the code set forth in the Appendix the offset integer (value 28 in FIG. 2) is referred to as the "twiddle factor." By way of further explanation of the principles of the invention, the following analysis may be helpful. The CRC of p(x) of order n using polynomial g(x) is equivalent to taking the remainder of x.sup.n p(x) divided by g(x) where all the polynomial coefficients are zero or one, binary addition is an XOR operation, and binary multiplication is an AND operation. This is denoted R.sub.g(x) [x.sup.n p(x)] (1) where all operations are understood to be performed over the Galois Field GF(2). The binary representation of the CRC process after the k.sup.th step will be called a, where ##EQU1## and each of the a.sub.i are zero or one. Adding a binary number (the twiddle factor), b, to a over the integers gives c ##EQU2## where, in general, c.sub.i .noteq.a.sub.i +b.sub.i due to carries from lower-order bits. The effect of adding a twiddle factor may be assessed by determining the Galois Field operation equivalent to the integer operation. That is, determine the polynomial q(x) must be added to p(x) such that ##EQU3## where the operations are performed over GF(2). Even if the twiddle factor b is a constant, the resulting bit pattern c is dependent on the values of a and k see Equation (3). Since there are no carries in Galois Field arithmetic, the equivalent polynomial q(x) is also dependent on the values of a and k, i.e., it is not a constant. The polynomial q(x) is a nonlinear encoding of p(x). It appears, in effect, to be another pseudo-random number and further increases the security of the CRC process. From the foregoing it will be understood that the invention provides a easily implemented, but highly effective technique for encrypting digital information so that conventional Galois Field analysis cannot be readily used to decrypt the information. While the invention has been described in its presently preferred form, it will be understood that the invention is capable of modification without departing from the spirit of the invention as set forth in the appended claims.
APPENDIX
______________________________________
void CRC(BYTE *val, BYTE *feed. BYTE twiddle)
{short i,j,flag; int cy;
. . .
/* Perform iterations of a CRC process */
for (j = 0: j CRC.sub.-- BITS; j++)
{/* Shift right & feedback. Note that feedback term MUST
* have the bit after the top bit set -- this gives a
* rotate function even though the field isn't an even-
* byte length. (because the top feedback bit will
* always be XORed into a 0-bit value, that top bit having
* just been vacated by the preceedign ROR.sub.-- C) */
flag = val[0] & 1; cy = 0;
for (i = (CRC.sub.-- BYTES) - 1; i = 0; i--)
{ROR.sub.-- C(val[i], cy);
if (flag) val[i]= val[i] .LAMBDA. feed[i];
if (i == TWIDDLE.sub.-- ITER)
{/* Add in twiddle factor byte-wise (easy-to express in C) /*
/* Could also do it as a large add-with-carry across all bytes /*
for (i=(CRC.sub.-- BYTES)-2: i = 0; i--) val[i]=val[i]+twiddle[i];
}
}
. . .
}
void reverse.sub.-- CRC(BYTE *val, BYTE *feed, BYTE twiddle)
{short i,j,flag; int cy;
. . .
/* Perform iterations of a reverse CRC process */
for (j = 0; j CRC.sub.-- BITS ; j++)
{/* compute cy-in bit from current highest bit */
flag = cy = val[CRC.sub.-- BYTES-1] & CRC.sub.-- TOP.sub.-- BIT;
/* Shift left & feedback. Note that this is the same
* feedback value as the forward CRC process, but the
* opposite shifting direction (the alternative is to use
* the inverse polynomial and shift the same way -- but
* that would complicate downloading the feedback terms
* from the transmitter to the receiver). */
if (j == (CRC.sub.-- BITS-TWIDDLE.sub.-- ITER-1) )
{/* subtract out twiddle factor byte-wise */
for (i = 0; i CRC.sub.-- BYTES-1; i++) val[i] = val[i] - twiddle[i];
}
for (i = 0; i CRC.sub.-- BYTES; i++)
{if (flag) val[i] = val[i] .LAMBDA. feed[i];
ROL.sub.-- C(val[i], cy);
}
}
. . .
}
______________________________________
|
Same subclass Same class Consider this |
||||||||||
