Construction of Cryptosystem on the Basis of Triangular Codes

In this article the triangular codes found dependence of the power of these codes on the length of codewords in them. The methods of construction codes and some triangular propose an effective general method for constructing such codes based on monotone Boolean functions. Designed with correcting codes cryptosystem on the basis of such a code, which allows one to correct the error. The advantage of this cryptosystem is the speed of coding and decoding, and the ability to quickly change the code without changing tables, coding and decoding. Change the code is implemented using the substitution, and the choice of codes is very large. The number of possible codes is 20! (approximately equal to 2.4*10 18 ) has at length codeword of 20.


Introduction
In the process of transmitting information in cryptosystems over telecommunications networks raises the problem of error correction. Control of data integrity and error correction -important tasks at many levels of work with information. One means of solving these problems is the use of the noiseproof codes that underlie the encoding-decoding systems.
Different noiseproof codes for cryptosystems, differing from each other by the basis, distance, redundancy, structure, a functional purpose, correlation properties, algorithms of coding and decoding, a form of a frequency range ([1] - [4]) are so far developed many. On the basis of the maximum types of monotonous Boolean functions (MBF) [5] it is constructed cryptosystems [6], allowing correction of mistakes.
However algorithm of decoding that is used in [6] it is rather difficult, and change of a code demands creation of four new arrays with use of a set of additional operations.
The aim of this work is to develop a code that corrects single errors in the transmission of information in cryptosystems at the expense of no more than 5 readings from the decoding table. To change this code requires only one substitution.

Results
In this article as codewords we will consider vectors lengths n ( ) ,..., ,..., 1 0 a a a a n i = −  , which components accept values from a set { } 0,1 , and the number of identity components in a vector is equal to 3. Such codewords have Hamming weight equal to 3. Hamming distance between two codewords a  and b  is called ( ) For research of such codes it is possible to use the theory of graphs. In this case bits of codewords correspond to tops of the graph, and codewords correspond to triangles in this graph(edges in a triangle connect tops which correspond to unit bits in codewords). Thus, since ( ) , that no 2 triangles in the constructed graph have the general edges, i.e. they or have one general top or are not crossed. The number of such triangles being crossed in top i let's denote through t i . Proof. Granting that these triangles cannot have general edges, the sum 1 n t i i= ∑ of cannot be greater than the number of edges. Therefore, the ratio is fair ( ) It is obvious that the number of triangles will be in 3 times less number of edges, i.e. Let's call uninvolved edges in the constructed graph all edges, supplementing this graph to the stout graph.

Lemma 2.
If n even, number of uninvolved edges, incidental to any top of the graph, is odd. If n odd, number of uninvolved edges, incidental to any top of the graph, is the even.
Proof. From each top of the constructed graph come 2t i even numbers of edges. To in total top of the stout graph with n tops incidental to n -1 edges. Therefore, for the odd there is an even number of uninvolved edges and on the contrary, for even n there is an odd number of uninvolved edges. The proof of a lemma is ended.
Concerning power of considered codes it is possible to prove the following statements.
In this case we have the block design from 8 elements placed on 8 blocks, in each block on 3 elements. In top of a star corresponding to the center less triangles are crossed on unit 4 2 n − .
It is easy to see that in this case there are no uninvolved edges. All edges are involved. The theorem is proved.
If instead of tops of triangles to consider points on a straight line, in this case we have 2 2 2 1 7 + + = points and 7 straight lines which contain on 3 points and this set satisfies to axioms of the projective plane [7,9].
Through two different points of P and Q of the plane there passes a straight line, and only one.
Any two straight lines have the general point.
There are three points which are not lying on one straight line.
Each straight line contains not less than three points Therefore we have the projective plane of the 2nd order or Fano's plane. In this case we have the affine plane of the 3rd order. 2 3 9 = points, 2 3 3 12 + = straight lines which satisfy to axioms [7,9].
1. For any two different points there is only one straight line containing these points. 2. Crossing of two different straight lines contains exactly one point. 3. There is a set from four points, any three of which do not belong to one straight line.
The affine plane of the third order can be received from the projective plane of the third order, deletion of one straight line and the 4th points lying on it. The theorem is proved. In case codes from the theorem 4 uninvolved edges with new top and two uninvolved beams of a star form a quadrangle since in this case on a lemma 2 top leaves even number of uninvolved edges. Uninvolved edges: (6,10) (6,9) (8,9) (8,10). A quadrangle from them:  (1,2,9), (1,4,10), (1,6,7), (1,5,8), (2,4,8), (2,3,10), (2,5,6), (3,5,9), (3,4,6), (3,7,8), (4,7,9), (5,7,10). Proof. Let there is a code with words of code length k . Let's put in compliance to everyone i-th to bit from a codeword of this code the following couple of bits: ( ) , i i k + . Let's define that these bits in uninvolved pairs in a code which existence we prove. Let's take from an existing code any codeword of length k . Let unit bits in this codeword have numbers , , i j t . Let's compare to each of these bits of pair: ( ) Let's construct of these pairs 4 triangles with tops: 1) ( ) , , Having done such operation for any codeword, we will receive 4m codewords of length 2 n k = . At such construction no 2 triangles have 304 Construction of Cryptosystem on the Basis of Triangular Codes the general edges. It is obvious that the constructed 4 triangles, from unit bits , , i j t codeword have no general edges. Let's say that the general edge with a triangle which turns out from unit bits has 4 triangles any of these , , 1 1 1 i j t codeword. From here, considering that in an initial codeword we add length of this codeword to word bits, i.e. we shift the bits corresponding to top of a triangle, on distance equal to length of a codeword, follows that triangles from an initial code with length of a codeword k also should have the general edges. Really, let 2 triangles have the general edge And it means that triangles from an initial code with length of a codeword k have the general edges that contradicts code definition. The theorem is proved.
CONSEQUENCE. Serially application of theorems 5 and 3 to a triangular code with codewords of odd length of n unequal 5 on the module 6 leads to infinite sequence of codes with the infinitely increasing n , in which codes with odd and even alternate n . In this sequence triangular codes with the odd n have no uninvolved edges. EXAMPLE 7. A triangular code with 3 n = has power 1 m = . Applying the theorem 5, we will receive a code with 5 n = and 4 m = . Applying the theorem 3, we will receive a code with 7 n = and 7 m = . Repeated applications of these theorems leads to sequence of codes with lengths of codewords equal 3, 6, 7, 14, 15, 30, 31, 62, 63, 126, 127, 254, 255, 510, 511, 1022. capacities of these codes by theorems 3 and 5 are equal 1, 4, 7, 28, 35, 140, 155, 620, 651, 2604, 2667, 10668, 10795, 43180, 43435, 173740 respectively. Table 3 shows the dependence of the triangular code m of codeword length n with 6 ≤ n≤ 20.
Let's prove theorems which allow to find recurrently triangular codes with any length of a codeword Theorem 6. Let there are Steiner triple systems of orders v 1 and v 2 : S 1 (v 1 ,b 1 ,r 1 , 3) and S 2 (v 2 ,b 2 ,r 2 , 3). Then there is Steiner system ( ) Proof. We form of elements S 1 and S 2 1 2 v v pairs. Of these pairs we will construction Steiner triple systems S. At the first stage we take any element a i from S 1 and any block We show that this Steiner system. Since no two triples of the 6 have no common pairs. Since no two of Steiner triple system S 1 (or S 2 ) have no common pairs, the common pairs will not have the triple constructed of pairs of elements of these systems.
On The theorem is proved.  In some cases and power it is convenient to apply Moore's theorem which proof is provided in [7] to recursive creation of triangular codes of bigger length.
As the Hemming distance between any codewords not less than 4, such triangular code can correct one symbol of a transferred codeword. Codewords in the table of coding are ordered on increase.
Decoding is carried out by means of the table (the two-dimensional array) where in headings of rows and columns numbers of unit bits, and in the table of number of codewords will be written down. We determine the transferred information message by numbers of two bits of a codeword. Thus numbers of columns correspond to LSB and numbers of rows to the MSB of the transferred message.  (table 5) for definition of the devoted message corresponding to the first codeword. Number of unit LSB of the transferred word is equal 0, and number of the MSB 4. On crossing of the corresponding row and a column costs 2. It means that the message 2 is transferred. The error of transfer for the 1st codeword is corrected.
Let's consider, how there is a decoding in case instead of triple unit bits 4 unit bits, on an example of the second codeword were accepted. It is possible to form 6 pairs of unit bits of the 2nd codeword: (0; 1), (0; 2), (1; 2), (0; 7), (1; 7), (2; 7). To these pairs in the table of decoding there correspond the transferred messages: 1, 1, 1, 6, 0, 17 (0 designates that to this pair there does not correspond any message). Rub from found in the table messages are identical and equal 1. It means that 3 first couples of bits form the second codeword, i.e. the codeword 000000000111 has been transferred. The error of transfer for the 2nd codeword is corrected. It is possible to show that in case of reception of 4 bits instead of triple it is enough to find in tables for the received pairs two conterminous messages, i.e. in the given example instead of 6 pairs was to check only pairs (0 enough; 1) and (0; 2). In the worst case it is enough to check the 5 pairs that requires 5 readings from table 4.
The power of this code can be increased twice if to codewords of this triangular code to add codewords in which zero and on the contrary are written down instead of units. If to 20 codewords to add 20 more codewords, in which instead of units zero and on the contrary, for 12 n = let's receive 40 codewords. Then by means of this code it is possible to code not 20, but 40 messages.    Let's consider a triangular code with 32 n = . The power of this code by the theorem 1 is equal 160. If we double power of this code as it is described above, we can code 320 messages. It is enough of it to code all possible binary bytes.
It is possible to show that if in all codewords of a triangular code to rearrange bits by means of the same substitution, the received codewords also form a triangular code. For some codes any such substitution leads to a new code. Such code exists, for example, at n=20. In this case by means of substitutions it is possible to form 20! =2 432 902 008 176 640000 codes that is approximately equal 2.4*10 18 .
Applying substitution at a parcel of codewords to the canal cryptosystem and return substitution at their reception, it is easy to change a transferred code. Thus tables of coding and decoding do not change.

Conclusions
The main result of article is the universal method of creation of triangular codes on the basis of monotonous Boolean function. In literature triangular codes were not investigated, in the work a number of properties of these Computer Science and Information Technology 2(7): 300-307, 2014 307 codes is proved. Additional important property of triangular codes is possibility of correction of a single mistake in the accepted codeword. On the basis of triangular codes it is easy to construct cryptosystem with a simple rule of coding, algorithm of decoding and possibility of change of a code one substitution. Owing to possibility of fast change of a code, it can be changed often during transfer. Thus as a key it can be transferred either substitution, or the law of change of substitutions.