RU2811065C1 - Method for byte-by-byte transmission of information using stream encryption - Google Patents

Method for byte-by-byte transmission of information using stream encryption Download PDF

Info

Publication number
RU2811065C1
RU2811065C1 RU2023103229A RU2023103229A RU2811065C1 RU 2811065 C1 RU2811065 C1 RU 2811065C1 RU 2023103229 A RU2023103229 A RU 2023103229A RU 2023103229 A RU2023103229 A RU 2023103229A RU 2811065 C1 RU2811065 C1 RU 2811065C1
Authority
RU
Russia
Prior art keywords
matrix
sql
byte
character
characters
Prior art date
Application number
RU2023103229A
Other languages
Russian (ru)
Inventor
Олег Петрович Дедов
Original Assignee
Олег Петрович Дедов
Filing date
Publication date
Application filed by Олег Петрович Дедов filed Critical Олег Петрович Дедов
Application granted granted Critical
Publication of RU2811065C1 publication Critical patent/RU2811065C1/en

Links

Images

Abstract

FIELD: data encryption.
SUBSTANCE: SQ state matrix is created by writing numbers in order from 0 to 255. The option of constructing a KQ auxiliary key matrix is selected. The KQ auxiliary key matrix is calculated. The resulting SQL state matrix is calculated using the formula: SQL = SQ ⊕ KQ mod 256. The numeric values of the SQL matrix elements acre converted into the binary number system corresponding to the ASCII character table. Plaintext characters are written using the ASCII character table yielding the value of character Xi corresponding to the plaintext character, written in the binary system. One byte of ASCII characters, and one byte of an SQL matrix element, and one byte of Xi characters are summed by modulo two to obtain the encrypted message Yi. The encrypted message Yi is transmitted.
EFFECT: reduced time of encryption and decryption of text.
2 cl, 2 dwg 1 tbl

Description

Изобретение относится к криптографии, в частности к способам поточного шифрования, в которых используется побайтная передача информации на основе таблицы кодирования символов ASCII.The invention relates to cryptography, in particular to stream encryption methods that use byte-by-byte information transfer based on the ASCII character encoding table.

В описании использованы следующие термины.The following terms are used in the description.

ASCII – (англ. American standard code for information interchange) - название таблицы (кодировки, набора), в которой некоторым распространённым печатным и непечатным символам сопоставлены числовые коды.ASCII – (English: American standard code for information interchange) - the name of a table (encoding, set) in which numeric codes are associated with some common printed and non-printable characters.

Алгоритмы шифрования делятся на две группы: алгоритмы симметричного шифрования и алгоритмы ассиметричного шифрования. В алгоритмах симметричного шифрования, которые также делятся на две большие группы: поточные и блочные, отправитель информации и получатель информации имеют одинаковые ключи, а в алгоритмах ассиметричного шифрования отправитель информации и получатель информации имеют по два ключа каждый – открытый и закрытый.Encryption algorithms are divided into two groups: symmetric encryption algorithms and asymmetric encryption algorithms. In symmetric encryption algorithms, which are also divided into two large groups: stream and block, the sender of information and the recipient of information have the same keys, and in asymmetric encryption algorithms the sender of information and the recipient of information have two keys each - public and private.

В алгоритмах симметричного шифрования передача ключей шифрования является слабым местом. Например, если фирма состоит из t филиалов, включая головной офис, то для обеспечения обмена информацией между всеми филиалами необходимо t·(t-1)/2, но время от времени старые ключи необходимо менять на новые ключи, что усложняет работу. In symmetric encryption algorithms, the transmission of encryption keys is a weak point. For example, if a company consists of t branches, including the head office, then t·(t-1)/2 is required to ensure the exchange of information between all branches, but from time to time old keys must be replaced with new keys, which complicates the work.

В настоящее время для шифрования открытого текста широкое применение нашли алгоритмы поточного шифрования, которые в отличие от блочного шифрования выполняют преобразование информации, поступающей от источника сообщений как по одному биту, так по 1 байту (8 бит). Таким образом, алгоритм поточного шифрования может преобразовывать поступающую информацию в момент её получения.Currently, stream encryption algorithms are widely used for plaintext encryption, which, unlike block encryption, transform information coming from the message source either one bit at a time or one byte (8 bits). Thus, the stream encryption algorithm can transform incoming information at the moment it is received.

Недостатком поточного шифрования, как было отмечено ранее, является необходимость получения нового ключа (гаммы) для шифрования, поступающей информации. Возможно вместо передачи нового ключа произвести его вычисление, как на стороне отправителя, так и получателя информации по одинаковому алгоритму путем матричных преобразований на основе передаваемых коэффициентов. The disadvantage of stream encryption, as noted earlier, is the need to obtain a new key (gamma) to encrypt incoming information. It is possible, instead of transmitting a new key, to calculate it, both on the side of the sender and the recipient of information using the same algorithm by means of matrix transformations based on the transmitted coefficients.

То есть вместо передачи ключа произвести обмен коэффициентами между отправителем и получателем информации и на их основе c помощью матричных преобразований вычислять ключи.That is, instead of transmitting the key, exchange coefficients between the sender and recipient of information and, based on them, using matrix transformations, calculate the keys.

Известны алгоритм шифрования RC-4 – класс алгоритмов, определяемых размером его блока или слова – параметром n. В том случае, когда n = 8 бит или 1 байт, то тогда внутреннее состояние RC-4(S-бокс) состоит из массива размером 28 слов, то есть внутреннее состояние включает 256 элементов (0,1,2,….255). The RC-4 encryption algorithm is known - a class of algorithms determined by the size of its block or word - the parameter n. In the case when n = 8 bits or 1 byte, then the internal state of RC-4 (S-box) consists of an array of 2 8 words in size, that is, the internal state includes 256 elements (0,1,2,….255 ).

Наиболее близким аналогом к заявляемому изобретению является способ шифрование, известный из патента RU 2783406, в котором рассматривается побитовое поточное шифрование с использованием матричных преобразований.The closest analogue to the claimed invention is the encryption method known from patent RU 2783406, which considers bit-stream encryption using matrix transformations.

Однако при использование данного технического решения каждый символ открытого текста нужно переводить в набор нулей и единиц в соответствии с используемым алфавитом и складывать по модулю два с набором нулей и единиц матрицы SQL и отправлять получателю данную информацию. However, when using this technical solution, each plaintext character must be translated into a set of zeros and ones in accordance with the alphabet used and added modulo two with the set of zeros and ones of the SQL matrix and sent this information to the recipient.

Преимуществом заявляемого изобретения является использование стандартной таблицы кодирования символов ASCII при поточном шифровании.The advantage of the claimed invention is the use of a standard ASCII character encoding table for stream encryption.

Техническим результатом изобретения является упрощение процесса шифрования и расшифрования текста, сокращение временных и вычислительных затрат.The technical result of the invention is to simplify the process of encrypting and decrypting text, reducing time and computational costs.

В предлагаемой заявке нет необходимости каждый символ открытого текста переводить в набор нулей и единиц – каждому символу соответствует своё число в двоичной системе счисления, которое будет суммироваться по модулю два с элементом результирующей матрицы SQL, также представленным в соответствующей форме и отправляться получателю информации. In the proposed application, there is no need to convert each plaintext character into a set of zeros and ones - each character corresponds to its own number in the binary number system, which will be summed modulo two with an element of the resulting SQL matrix, also presented in the appropriate form and sent to the recipient of the information.

Сущность заявляемого изобретения заключается в том, что в способе побайтной передачи информации с помощью поточного шифрования создают матрицу состояния SQ, записывая числа по порядку от 0 до 255; выбирают вариант построения вспомогательной матрицы-ключа KQ; производят вычисление вспомогательной матрицы-ключа KQ; производят вычисление результирующей матрицы SQL по формуле: SQL = SQ ⊕ KQ mod 256. Элементы результирующей матрицы SQL(sqlij) и будут являться гаммой(ключом) используемыми при сложении с символами открытого текста. Полученные числовые значения элементов матрицы SQL переводят в двоичную систему счисления, соответствующую таблице символов ASCII, символы открытого текста записывают с помощью таблицы символов ASCII, получая значение символа Xi, соответствующее символу открытого текста, записанное в двоичной системе счисления и далее суммируют по модулю два один байт символов ASCII, соответствующий символу открытого текста Xi с элементом матрицы sqlij, получая зашифрованное сообщение Yi, передают зашифрованное сообщение Yi.The essence of the claimed invention lies in the fact that in the method of byte-by-byte information transfer using stream encryption, a state matrix SQ is created, writing numbers in order from 0 to 255; select the option of constructing an auxiliary key matrix KQ; calculating the auxiliary key matrix KQ; calculate the resulting matrix SQL using the formula: SQL = SQ ⊕ KQ mod 256. Elements of the resulting matrix SQL(sqlij) and will be the gamma (key) used when adding with plaintext characters. The resulting numeric values of the SQL matrix elements are converted to the binary number system corresponding to the ASCII character table, the plaintext characters are written using the ASCII character table, obtaining the value of the character Xi, corresponding to the plaintext character, written in binary number system and then sum modulo two one byte of ASCII characters corresponding to the plaintext character Xi with sql matrix elementij, receiving encrypted message Yi, transmit an encrypted message Yi.

Применение n = 8 даёт возможность использовать таблицу символов, например, ASCII, в которой символы – буквы алфавита, цифры, арифметические операции, и другие знаки также представлены в виде 8 битовых значений, например символ A – 01000001, символ B – 01000010, символ C – 01000011 и так далее.The use of n = 8 makes it possible to use a character table, for example, ASCII, in which characters - letters of the alphabet, numbers, arithmetic operations, and other characters are also represented as 8 bit values, for example character A - 01000001, character B - 01000010, character C – 01000011 and so on.

С другой стороны, с помощью подхода, основанного на матричных преобразованиях [Дедов О.П. Применение матричного подхода к поточному шифрованию. Электронный научный журнал «E-Scio.ru», 2021.-5с, далее – Источник 1] возможно сформировать результирующую матрицу, элементы которой являются гаммой (ключом), также состоящую из 256 чисел, записанных в виде 8 битовых значений символов: 0 – 00000000, 1 – 00000001, 2 – 00000010 и т.д., и суммируя символы открытого текста и вычисленные с помощью матричных преобразований элементы результирующей матрицы (гаммы), по модулю два производить побайтовое шифрование открытого текста.On the other hand, using an approach based on matrix transformations [Dedov O.P. Application of the matrix approach to stream encryption. Electronic scientific journal “E-Scio.ru”, 2021.-5с, hereinafter referred to as Source 1] it is possible to form a resulting matrix, the elements of which are a gamma (key), also consisting of 256 numbers written as 8 bit character values: 0 – 00000000, 1 – 00000001, 2 – 00000010, etc., and summing the plaintext characters and the elements of the resulting matrix (gamma) calculated using matrix transformations, modulo two to produce byte-by-byte encryption of the plaintext.

Заявляемое изобретение поясняется фигурами 1-2, на которых показаны:The claimed invention is illustrated in figures 1-2, which show:

- фиг. 1 – схема алгоритма поточного шифрования;- fig. 1 – diagram of the stream encryption algorithm;

- фиг. 2 – блок-схема предлагаемого алгоритма поточного шифрования.- fig. 2 – block diagram of the proposed stream encryption algorithm.

На фигуре 1 Xi i-ый байт открытого текста и sqlij элемент матрицы SQL, записанный в виде одного байта, находящийся в ячейке – Ki, где 0 ≤ i<≤255.On the figure 1 Xii-th byte of plaintext and sqlij SQL matrix element, written as a single byte, located in cell – Ki, where 0 ≤ i<≤255.

SQL – результирующая матрица, элементы которой sqlij [Источник 1, С.А.Белецкий, О.П.Дедов, С.И.Журавлёв. Построение многослойной и бесконечной гаммы для поточного шифрования. Промышленные АСУ и Контроллеры. DOI: 10.25791/ asu.10.2022.1392 стр.39-43 – далее Источник 2] вычисляются по формулеSQL is the resulting matrix, the elements of which are sql ij [Source 1, S.A. Beletsky, O.P. Dedov, S.I. Zhuravlev. Construction of multi-layer and infinite scale for stream encryption. Industrial automated control systems and controllers. DOI: 10.25791/ asu.10.2022.1392 pp. 39-43 – further Source 2] are calculated using the formula

SQL= SQ + KQ mod 2n, (1)SQL= SQ + KQ mod 2 n , (1)

где SQ – матрица состояния;where SQ is the state matrix;

КQ – матрица-ключа; KQ – key matrix;

SQL – результирующая матрица, элементы которой, переведённые в двоичную систему счисления, будут выступать в роли гаммы. SQL is the resulting matrix, the elements of which, converted to the binary number system, will act as a gamma.

Причём в Источнике 1 было показано, что при n = 4 параметр N, определяющий размер квадратных матриц SQ, КQ и SQL, вычисляется по формуле (1).Moreover, in Source 1 it was shown that for n = 4, the parameter N, which determines the size of the square matrices SQ, KQ and SQL, is calculated using formula (1).

N= 24/2= 22 = 4, (2)N= 2 4/2 = 2 2 = 4, (2)

То есть матрицы SQ, КQ и SQL при n = 4 являются квадратными матрицами размера 4×4, а при n = 8 N будет равно 16, а это значит, что матрицы SQ, КQ и SQL будут квадратными матрицами размера 16×16, и каждая из них содержат по 256 элементов (чисел). Каждый элемент матрицы SQL (sglij) может быть представлен как последовательность восьми нулей и единиц, то есть одним байтом.That is, the matrices SQ, KQ and SQL with n = 4 are square matrices of size 4x4, and with n = 8 N will be equal to 16, which means that the matrices SQ, KQ and SQL will be square matrices of size 16x16, and each of them contains 256 elements (numbers). Each element of the SQL matrix (sgl ij ) can be represented as a sequence of eight zeros and ones, that is, one byte.

Таким образом, каждый символ открытого текста Xi c помощью таблицы символов ASCII, записанный в виде последовательности 8 битов, то есть одним байтом, может быть сложен по модулю два с элементами матрицы SQL (sglij), каждый из которых также записан виде восьми битовой последовательности (одним байтом), а в результате данного сложения получается Yi – зашифрованное значение Xi ,которое поступает вход получателя информации и расшифровывается там в обратном порядке, то есть сложением по модулю два с элементами результирующей матрицы SQL(sglij), вычисленным по аналогичному алгоритму.Thus, each plaintext character X i using the ASCII character table, written as a sequence of 8 bits, that is, one byte, can be added modulo two with the elements of the SQL matrix (sgl ij ), each of which is also written as an eight-bit sequence (one byte), and as a result of this addition, Y i is obtained - the encrypted value X i, which is received as input by the recipient of the information and is decrypted there in reverse order, that is, by adding modulo two with the elements of the resulting matrix SQL(sgl ij ), calculated by similar algorithm.

В Источнике 2 было рассмотрено вычисление квадратных матриц SQ, КQ и SQL для n=4 и следовательно N= 24/2= 22 = 4, и матрицы SQ, КQ , SQL имеют размер 4×4 , различными способами. Source 2 discussed the calculation of square matrices SQ, KQ and SQL for n=4 and therefore N= 2 4/2 = 2 2 = 4, and the matrices SQ, KQ, SQL are 4x4 in size, in various ways.

То есть на первом этапе есть матрица состояния S (в алгоритме RС 4) и матрица SQ в предлагаемом алгоритме шифрования (n = 4 и 24 = 16), которая включает 16 элементов числа – 0,1,2,….15 , расставленные по порядку. На втором этапе вычисляется матрица ключ KQ – аналог матрицы ключа К в алгоритме шифрования RС 4 (различными способами [Источник 2]). На третьем этапе вычисляется результирующая матрица SQL как сумма матриц SQ и КQ. Все матрицы SQ, КQ и SQL в [Источник 2] имеют одинаковый размер – 4×4.That is, at the first stage there is a state matrix S (in the RC 4 algorithm) and a matrix SQ in the proposed encryption algorithm (n = 4 and 2 4 = 16), which includes 16 number elements – 0,1,2,….15, arranged in order. At the second stage, the key matrix KQ is calculated - an analogue of the key matrix K in the RC 4 encryption algorithm (in various ways [Source 2]). At the third stage, the resulting matrix SQL is calculated as the sum of matrices SQ and KQ. All matrices SQ, KQ and SQL in [Source 2] have the same size - 4x4.

Матричный подход позволяет вычислять матрицу-ключ KQ различными способами [Источник 2], например, как произведение матрицы-столбца размера 4×1, на матрицу строку размера 1×4 по модулю 2n , а элементы матрицы столбца и матрицы строки могут выбираться также различными способам, либо с помощью датчика случайных чисел ДСЧ (среди чисел, находящихся в диапазоне от 1 до 2n -1) или выбираться как произведение матрицы-столбца на матрицу-строку (обе матрицы получены из матрицы состояний S( RC-4) или SQ [Источники 1, 2].The matrix approach allows you to calculate the key matrix KQ in various ways [Source 2], for example, as the product of a column matrix of size 4 × 1 by a row matrix of size 1 × 4 modulo 2 n , and the elements of the column matrix and row matrix can also be chosen in different ways methods, either using a random number sensor DNS (among numbers in the range from 1 to 2 n -1) or selected as the product of a column matrix by a row matrix (both matrices are obtained from the state matrix S(RC-4) or SQ [Sources 1, 2].

В Источниках 1,2 и наиболее близком аналоге рассмотрено вычисление матриц SQ, KQ, SQL для n=4.In Sources 1,2 and the closest analogue, the calculation of matrices SQ, KQ, SQL for n=4 is considered.

Так как n = 4, то все вычисления будут производиться по модулю 24 , то есть по модулю 16.Since n = 4, all calculations will be performed modulo 2 4 , that is, modulo 16.

При n = 4 матрица состояний SQ, состоит из 24 элементов и имеет вид:For n = 4, the state matrix SQ consists of 2 4 elements and has the form:

SQ = SQ=

Вычислим матрицу-ключа KQ одним из способов, рассмотренных в Источнике 2, как произведение второго столбца матрицы SQ на третью строку данной матрицы по модулю 16, то есть Let us calculate the key matrix KQ using one of the methods discussed in Source 2, as the product of the second column of the matrix SQ by the third row of this matrix modulo 16, that is

KQ = ×( 8 9 10 11) = mod 16 (3)KQ = ×(8 9 10 11) = mod 16 (3)

Элементы результирующей матрицы SQL будут вычисляться как сумма соответствующих элементов матриц SQ и KQ по модулю 16.The elements of the resulting SQL matrix will be calculated as the sum of the corresponding elements of the SQ and KQ matrices modulo 16.

SQL = SQ ⊕ KQ = mod 16SQL = SQ ⊕ KQ = mod 16

Данную результирующую матрицу SQL, полученную в результате однократного сложения матриц SQ и KQ назовём однослойной [Источник 2] и обозначим как SQL1. В Источнике 2 показано вычисление двух, трёхслойных матриц и многослойных матриц различными способами, в том числе умножением матрицы-ключа KQ на константу µ ( 1 < µ ≤ 15 ) n=4.We will call this resulting matrix SQL, obtained as a result of a single addition of matrices SQ and KQ, single-layer [Source 2] and denote it as SQL 1 . Source 2 shows the calculation of two-, three-layer matrices and multi-layer matrices in various ways, including multiplying the key matrix KQ by the constant µ ( 1 < µ ≤ 15 ) n=4.

Матрица SQL2 будет вычисляться по формуле (1) и называется двухслойной матрицей.The SQL 2 matrix will be calculated using formula (1) and is called a two-layer matrix.

SQL2 = SQL1 KQ mod 16SQL2 = SQL1 KQ mod 16

SQL2 = SQL 2 =

В том случае, когда происходит передача информации по одному байту, то есть при n = 8 , все рассматриваемые матрицы: матрица состояний SQ, матрица ключа KQ и результирующая матрица SQL будут иметь размерность 16×16 и состоять из 256 элементов каждая. Матрица состояния SQ, состоящая из 256 элементов, записанных по порядку будет иметь вид:In the case when information is transferred one byte at a time, that is, when n = 8, all matrices under consideration: the state matrix SQ, the key matrix KQ and the resulting matrix SQL will have a dimension of 16 × 16 and consist of 256 elements each. The SQ state matrix, consisting of 256 elements written in order, will look like:

00 11 22 33 44 55 66 77 88 99 1010 11eleven 1212 1313 1414 1515 1616 1717 1818 1919 2020 2121 2222 2323 2424 2525 2626 2727 2828 2929 30thirty 3131 3232 3333 3434 3535 3636 3737 3838 3939 4040 4141 4242 4343 4444 4545 4646 4747 4848 4949 5050 5151 5252 5353 5454 5555 5656 5757 5858 5959 6060 6161 6262 6363 6464 6565 6666 6767 6868 6969 7070 7171 7272 7373 7474 7575 7676 7777 7878 7979 8080 8181 8282 8383 8484 8585 8686 8787 8888 8989 9090 9191 9292 9393 9494 9595 9696 9797 9898 9999 100100 101101 102102 103103 104104 105105 106106 107107 108108 109109 110110 111111 112112 113113 114114 115115 116116 117117 118118 119119 120120 121121 122122 123123 124124 125125 126126 127127 128128 129129 130130 131131 132132 133133 134134 135135 136136 137137 138138 139139 140140 141141 142142 143143 144144 145145 146146 147147 148148 149149 150150 151151 152152 153153 154154 155155 156156 157157 158158 159159 160160 161161 162162 163163 164164 165165 166166 167167 168168 169169 170170 171171 172172 173173 174174 175175 176176 177177 178178 179179 180180 181181 182182 183183 184184 185185 186186 187187 188188 189189 190190 191191 192192 193193 194194 195195 196196 197197 198198 199199 200200 201201 202202 203203 204204 205205 206206 207207 208208 209209 210210 211211 212212 213213 214214 215215 216216 217217 218218 219219 220220 221221 222222 223223 224224 225225 226226 227227 228228 229229 230230 231231 232232 223223 234234 235235 236236 237237 238238 239239 240240 241241 242242 243243 244244 245245 246246 247247 248248 249249 250250 251251 252252 253253 254254 255255

Предположим, что матрица KQ (для n = 8) вычисляется аналогично вычислению KQ (для n = 4), как в рассмотренном ранее примере, то есть как произведение второго столбца матрицы SQ - ST(2,1) на третью строку STR(3,1) данной матрицы, но по модулю 256 вместо 16 (для n = 4).То естьLet us assume that the matrix KQ (for n = 8) is calculated similarly to the calculation of KQ (for n = 4), as in the example considered earlier, that is, as the product of the second column of the matrix SQ - ST(2,1) by the third row STR(3, 1) of this matrix, but modulo 256 instead of 16 (for n = 4). That is

KQ= ST(2) * STR(3)= *[32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47] mod 256 (4)KQ= ST(2) * STR(3)= *[32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47] mod 256 (4)

Таким образом, матрица KQ будет иметь вид:Thus, the KQ matrix will look like:

3232 3333 3434 3535 3636 3737 3838 3939 4040 4141 4242 4343 4444 4545 4646 4747 3232 4949 6666 8383 100100 117117 134134 151151 168168 185185 202202 219219 236236 253253 1414 3131 3232 6565 9898 131131 164164 197197 230230 77 4040 7373 106106 139139 172172 205205 238238 1515 3232 8181 130130 179179 228228 2121 7070 119119 168168 217217 1010 5959 108108 157157 206206 255255 3232 9797 162162 227227 3636 101101 166166 231231 4040 105105 170170 235235 4444 109109 174174 239239 3232 113113 194194 1919 100100 181181 66 8787 168168 249249 7474 155155 236236 6161 142142 223223 3232 129129 226226 6767 164164 55 102102 199199 4040 137137 234234 7575 172172 1313 110110 207207 3232 145145 22 115115 228228 8585 198198 5555 168168 2525 138138 251251 108108 221221 7878 191191 3232 161161 3434 163163 3636 165165 3838 167167 4040 169169 4242 171171 4444 173173 4646 175175 3232 177177 6666 211211 100100 245245 134134 2323 168168 5757 202202 9191 236236 125125 1414 159159 3232 193193 9898 33 164164 6969 230230 135135 4040 201201 106106 11eleven 172172 7777 238238 143143 3232 209209 130130 5151 228228 149149 7070 247247 168168 8989 1010 187187 108108 2929 206206 127127 3232 225225 162162 9999 3636 229229 166166 103103 4040 233233 170170 107107 4444 237237 174174 111111 3232 241241 194194 147147 100100 5353 66 215215 168168 121121 7474 2727 236236 189189 142142 9595 3232 11 226226 195195 164164 133133 102102 7171 4040 99 234234 203203 172172 141141 110110 7979 3232 1717 22 243243 228228 213213 198198 183183 168168 153153 138138 123123 108108 9393 7878 6363

Тогда матрица SQL которая равна сумме матриц SQ и KQ вычисляется по формулеThen the SQL matrix which is equal to the sum of the SQ and KQ matrices is calculated by the formula

SQL = SQ ⊕ KQ mod 256, (5)SQL = SQ ⊕ KQ mod 256, (5)

примет следующий вид:will take the following form:

3232 3434 3636 3838 4040 4242 4444 4646 4848 5050 5252 5454 5656 5858 6060 6262 4848 6666 8484 102102 120120 138138 156156 174174 192192 210210 228228 246246 88 2626 4444 6262 6464 9898 132132 166166 200200 234234 1212 4646 8080 114114 148148 182182 216216 250250 2828 6262 8080 130130 180180 230230 2424 7474 124124 174174 224224 1818 6868 118118 168168 218218 1212 6262 9696 162162 228228 3838 104104 170170 236236 4646 112112 178178 244244 5454 120120 186186 252252 6262 112112 194194 2020 102102 184184 1010 9292 174174 00 8282 164164 246246 7272 154154 236236 6262 128128 226226 6868 166166 88 106106 204204 4646 144144 242242 8484 182182 2424 122122 220220 6262 144144 22 116116 230230 8888 202202 6060 174174 3232 146146 44 118118 232232 9090 204204 6262 160160 3434 164164 3838 168168 4242 172172 4646 176176 5050 180180 5454 184184 5858 188188 6262 176176 6666 212212 102102 248248 138138 2828 174174 6464 210210 100100 246246 136136 2626 172172 6262 192192 9898 44 166166 7272 234234 140140 4646 208208 114114 2020 182182 8888 250250 156156 6262 208208 130130 5252 230230 152152 7474 252252 174174 9696 1818 196196 118118 4040 218218 140140 6262 224224 162162 100100 3838 232232 170170 108108 4646 240240 178178 116116 5454 248248 186186 124124 6262 240240 194194 148148 102102 5656 1010 220220 174174 128128 8282 3636 246246 200200 154154 108108 6262 00 226226 196196 166166 136136 106106 7676 4646 1616 232232 212212 182182 152152 122122 9292 6262 1616 22 244244 230230 216216 202202 188188 174174 160160 146146 132132 118118 104104 9090 7676 6262

В общем виде матрица SQLi вычисляется по формуле:In general, the SQL i matrix is calculated using the formula:

SQLi= SQLi-1 + KQ mod 16, (6)SQL i = SQL i-1 + KQ mod 16, (6)

Каждый элемент данной матрицы sqlij, записанный в двоичном виде с помощью 8 бит, поступает на первый вход сумматора по модулю два (фиг.1), где складывается с символом открытого текста Xi, который также записан в виде 8 бит (при применении ASCII), и на выходе сумматора получается зашифрованный символ Yi, а дешифрование производится в обратном порядке на стороне получателя информации.Each element of this matrix sql ij , written in binary form using 8 bits, is supplied to the first input of the adder modulo two (Fig. 1), where it is added to the plaintext character X i , which is also written in the form of 8 bits (when using ASCII ), and at the output of the adder the encrypted symbol Y i is obtained, and decryption is performed in the reverse order on the side of the information recipient.

Таким образом, каждый символ открытого текста может быть зашифрован и передан получателю информации.Thus, each character of the plaintext can be encrypted and transmitted to the recipient of the information.

Заметим, что при шифровании можно использовать элементы матрицы sqlij как по порядку, то есть начиная с первого sql11 (первый символ открытого текста будет суммироваться по модулю два с sql11) и заканчивая последним sql255,255 или, как было указано в Источнике 1, элементы данной матрицы могут быть использованы в обратном порядке, то есть от sql255,255 до sql11.Note that when encrypting, you can use the elements of the sql ij matrix in order, that is, starting with the first sql 11 (the first character of the plaintext will be summed modulo two with sql 11 ) and ending with the last sql 255,255 or, as stated in Source 1, the elements of this matrix can be used in reverse order, that is, from sql 255,255 to sql 11 .

Кроме этого при применении матричного подхода, возможно, использовать группу элементов (40-100) матрицы SQL1 для шифрования части открытого текста, а потом перейти к таким же элементам матрицы SQL2 для шифрования второй части открытого текста т.д.In addition, when applying the matrix approach, it is possible to use a group of elements (40-100) of the SQL matrix 1 to encrypt part of the plaintext, and then move on to the same elements of the SQL matrix 2 to encrypt the second part of the plaintext, etc.

Данный алгоритм может быть реализован следующим образом. Во- первых, можно заранее обменяться значениями матриц SQL – на определённый срок (день, месяц) между отправителем и получателем информации. Во- вторых, на этапе «рукопожатие» («Handshakes») (фиг. 2) между отправителем и получателем информации происходит обмен коэффициентами, в качестве которых могут применяться числа, либо вырабатываемые с помощью ДСЧ выбираются элементы из чисел от 1 до 255, соответствующие элементам матрицы-столбца (16 чисел) и матрицы строки (16 чисел), а матрица KQ вычисляется как их произведение, либо как в рассмотренных ранее примерах можно указать номер столбца (α1) и номер строки (α2), при умножении которых по модулю 256 получается матрица ключа KQ, также можно указать значение коэффициента µ (α3), который может применяться при вычислении матрицы KQ [Источник 2] (в данной работе он был равен 5), а также указать количество элементов (α4), используемых при шифровании, если принято решение использовать при шифровании 40-100 символов матрицы SQL1 , а потом перейти к матрице SQL2 и далее к матрице SQLi и в этом случае необходимо указать номер элемента Ki (α5) с которого начинается отчёт. Все эти коэффициенты могут быть сведены в таблицу №1.This algorithm can be implemented as follows. Firstly, you can exchange the values of SQL matrices in advance - for a certain period (day, month) between the sender and recipient of the information. Secondly, at the “Handshakes” stage (Fig. 2), an exchange of coefficients takes place between the sender and the recipient of information, for which numbers can be used, or elements generated with the help of the random number are selected from numbers from 1 to 255, corresponding elements of the column matrix (16 numbers) and the row matrix (16 numbers), and the KQ matrix is calculated as their product, or, as in the previously discussed examples, you can specify the column number (α1) and row number (α2), when multiplied modulo 256 the key matrix KQ is obtained, you can also indicate the value of the coefficient µ (α3), which can be used when calculating the KQ matrix [Source 2] (in this work it was equal to 5), and also indicate the number of elements (α4) used in encryption, if it was decided to use 40-100 characters of the SQL 1 matrix when encrypting, and then move on to the SQL 2 matrix and then to the SQL i matrix, and in this case it is necessary to indicate the number of the element K i (α5) from which the report begins. All these coefficients can be summarized in table No. 1.

Таблица № 1. Table No. 1.

Номер столбца (α1)Column number (α1) Номер строки (α2)Line number (α2) Коэффициент ( µ=5) (α3)Coefficient ( µ=5) (α3) Кол-во элементов (α4)Number of elements (α4) Номер элемента Ki (α5)Element number K i (α5) 22 33 55 4040 100100

Заметим, что в качестве коэффициента µ могут быть использованы числа, входящие в матрицу-столбец (α1) или матрицу-строку (α2).Note that the numbers included in the column matrix (α1) or row matrix (α2) can be used as the coefficient µ.

На фигуре 2 представлена блок-схема алгоритма поточного шифрования, где: Figure 2 shows a block diagram of the stream encryption algorithm, where:

- блок № 1– блок инициализации матрицы SQ;- block No. 1 – SQ matrix initialization block;

- блок № 2 – программа вычисления матрицы ключа KQ;- block No. 2 – program for calculating the KQ key matrix;

- блок № 3 – вычисление результирующей матрицы состояний SQL;- block No. 3 – calculation of the resulting SQL state matrix;

- блок № 4 – счётчик элементов результирующей матрицы состояний SQL;- block No. 4 – counter of elements of the resulting SQL state matrix;

- блок № 5 – перевод из десятичной системы счисления в двоичную систему счисления;- block No. 5 – conversion from the decimal number system to the binary number system;

- блок № 6 – открытый текст;- block No. 6 – open text;

- блок №7 – блок перевода открытого теста в символы ASCII.- block No. 7 – block for converting an open test into ASCII characters.

Способ осуществляют следующим образом.The method is carried out as follows.

Цикл работы состоит из нескольких этапов. На первом этапе производится инициализация матрицы SQ (блок № 1), то есть запись чисел в данную матрицу по порядку от 0 до 255 (при n = 8) и вычисление матрицы-ключа KQ на основе коэффициентов из таблицы №1 или другим способом, например, с помощью ДСЧ выбираются элементы из чисел от 1 до 255, соответствующие элементам матрицы-столбца (16 чисел) и матрицы-строки (16 чисел), а матрица KQ вычисляется как их произведение (3,4). The work cycle consists of several stages. At the first stage, the matrix SQ is initialized (block No. 1), that is, numbers are written into this matrix in order from 0 to 255 (with n = 8) and the key matrix KQ is calculated based on the coefficients from table No. 1 or in another way, for example , using the DNS, elements are selected from numbers from 1 to 255, corresponding to the elements of the column matrix (16 numbers) and the row matrix (16 numbers), and the KQ matrix is calculated as their product (3,4).

На втором этапе по формуле (3) с учётом вычисленных значений матрицы KQ и значений матрицы SQ вычисляется матрица SQL. At the second stage, using formula (3), taking into account the calculated values of the KQ matrix and the values of the SQ matrix, the SQL matrix is calculated.

На третьем этапе происходит перевод числовых значений элементов матрицы SQL в двоичную систему счисления, соответствующую таблице символов ASCII.At the third stage, the numeric values of the SQL matrix elements are converted into the binary number system corresponding to the ASCII character table.

На четвёртом этапе символы открытого текста записываются с помощью таблицы символов ASCII (блок № 6 и блок № 7), и на выходе блока № 7 получают значение символа Xi, соответствующее символу открытого текста, но записанное в двоичной системе счисления.At the fourth stage, plaintext characters are written using the ASCII character table (block No. 6 and block No. 7), and at the output of block No. 7, the value of the character X i is obtained, corresponding to the plaintext character, but written in the binary number system.

На пятом этапе после суммирования по модулю два 8 бит символов, поступивших из блока №5, и 8 бит символов, поступивших из блока № 7, получают зашифрованное сообщение Yi.At the fifth stage, after modulo summation, two 8-bit symbols received from block No. 5 and 8 bits of symbols received from block No. 7 receive an encrypted message Y i .

Нет проблемы возникающей из-за наличия байтов вне диапазона. Все байты, как преобразующие символы открытого текста, так и байты для шифрования (элементы матрицы SQL) находятся в диапазоне от 0 до 255, и после сложения по модулю два они также будут находиться в этом диапазоне. То есть, производится сложение слова из 8бит(1 байт), соответствующего символу открытого текста с элементом матрицы sqlij ,также состоящим из 8 бит по модулю два и в результате получается слово из 8 бит(1байт).There is no problem arising from having out-of-range bytes. All bytes, both the plaintext character conversion and the encryption bytes (the elements of the SQL matrix) are in the range from 0 to 255, and after modulo two addition they will also be in this range. That is, a word of 8 bits (1 byte) corresponding to a plaintext character is added with an element of the matrix sql ij , also consisting of 8 bits modulo two, and the result is a word of 8 bits (1 byte).

В том случае, если размер открытого текста, то есть количество символов открытого текста равно 256, то для их шифрования достаточно элементов матрицы SQL1 (число которых равно 256), а если больше, чем 256 ,то по команде со счётчика элементов будет сформирована новая матрица SQL2 (число элементов которой также равно 256) и т.д.If the size of the plaintext, that is, the number of characters of the plaintext is 256, then the elements of the SQL matrix are sufficient to encrypt them1(the number of which is 256), and if more than 256 , then upon command from the element counter a new SQL matrix will be generated2(the number of elements of which is also 256) etc.

Кроме этого возможно использование определённого количества символов (40-100) из матрицы SQL1, а потом из матрицы SQL2 и тд., что сделает невозможным расшифрование зашифрованного текста.In addition, it is possible to use a certain number of characters (40-100) from the SQL matrix 1 , and then from the SQL matrix 2 , etc., which will make it impossible to decrypt the encrypted text.

В заявляемом способе производятся матричные операции, не требующие больших вычислительных и, как следствие, временных затрат: матрицы не возводятся в степень и нет вычисления обратных матриц (которые могут и не существовать), что значительно упрощает применение данного метода в реальной практике.In the proposed method, matrix operations are performed that do not require large computational and, as a consequence, time costs: matrices are not raised to a power and there is no calculation of inverse matrices (which may not exist), which greatly simplifies the use of this method in real practice.

Claims (11)

1. Способ побайтной передачи информации с помощью поточного шифрования, характеризующийся тем, что:1. A method of byte-by-byte information transmission using stream encryption, characterized by the fact that: - создают матрицу состояния SQ, записывая числа по порядку от 0 до 255;- create a state matrix SQ, writing numbers in order from 0 to 255; - выбирают вариант построения вспомогательной матрицы-ключа KQ;- choose the option of constructing an auxiliary key matrix KQ; - производят вычисление вспомогательной матрицы-ключа KQ;- calculate the auxiliary key matrix KQ; - производят вычисление результирующей матрицы состояний SQL по формуле:- calculate the resulting SQL state matrix using the formula: SQL = SQ ⊕ KQ mod256;SQL = SQ ⊕ KQ mod256; - переводят числовые значения элементов матрицы SQL в двоичную систему счисления, соответствующую таблице символов ASCII;- convert the numeric values of the SQL matrix elements into the binary number system corresponding to the ASCII character table; - символы открытого текста записывают с помощью таблицы символов ASCII, получая значение символа Xi, соответствующее символу открытого текста, записанное в двоичной системе счисления;- plaintext characters are written using an ASCII character table, obtaining the value of the character X i corresponding to the plaintext character, written in the binary number system; - суммируют по модулю два один байт символов ASCII матрицы SQL и один байт символов Xi, получая зашифрованное сообщение Yi.- sum modulo two one byte of ASCII characters of the SQL matrix and one byte of X charactersi, receiving encrypted message Yi. - передают зашифрованное сообщение Yi.- transmit an encrypted message Y i . 2. Способ по п.1, характеризующийся тем, что KQ вычисляют с помощью датчика случайных чисел.2. The method according to claim 1, characterized in that KQ is calculated using a random number sensor.
RU2023103229A 2023-02-14 Method for byte-by-byte transmission of information using stream encryption RU2811065C1 (en)

Publications (1)

Publication Number Publication Date
RU2811065C1 true RU2811065C1 (en) 2024-01-11

Family

ID=

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5297208A (en) * 1992-08-05 1994-03-22 Roger Schlafly Secure file transfer system and method
RU2462825C1 (en) * 2011-07-08 2012-09-27 Государственное образовательное учреждение высшего профессионального образования "Поволжский государственный университет телекоммуникаций и информатики" (ГОУВПО ПГУТИ) Method of hidden transfer of coded information along multiple communication channels
RU2783406C1 (en) * 2021-10-25 2022-11-14 Олег Петрович Дедов Method for gamma generation, used in stream encryption

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5297208A (en) * 1992-08-05 1994-03-22 Roger Schlafly Secure file transfer system and method
RU2462825C1 (en) * 2011-07-08 2012-09-27 Государственное образовательное учреждение высшего профессионального образования "Поволжский государственный университет телекоммуникаций и информатики" (ГОУВПО ПГУТИ) Method of hidden transfer of coded information along multiple communication channels
RU2783406C1 (en) * 2021-10-25 2022-11-14 Олег Петрович Дедов Method for gamma generation, used in stream encryption

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
РЯБКО Б.Я. и др., Криптография в информационном мире, Горячая линия-Телеком, 2018 г., с. 201-203. *

Similar Documents

Publication Publication Date Title
KR101267109B1 (en) Cryptographic primitives, error coding, and pseudo-random number improvement methods using quasigroups
US6415032B1 (en) Encryption technique using stream cipher and block cipher
Saraswat et al. An extended hybridization of vigenére and caesar cipher techniques for secure communication
JPH11509940A (en) Cryptographic method and apparatus for non-linearly combining data blocks and keys
US20080304664A1 (en) System and a method for securing information
CN108768617B (en) Format-preserving encryption method based on traditional block cipher
AU6043190A (en) Method of cryptographically transforming electronic digital data from one form to another
JPH0863097A (en) Method and system for symmetric encoding for encoding of data
Alqad et al. A new approach for data cryptography
CN114549266A (en) Image encryption method based on DNA replacement rule and chaotic system
Paragas et al. Hill cipher modification: A simplified approach
Sakib ANALYSIS ON FUNDAMENTAL ALGEBRAIC CONCEPTS AND INFORMATION SECURITY SYSTEM
Jangid et al. Hybrid approach of image encryption using DNA cryptography and TF Hill Cipher Algorithm
RU2811065C1 (en) Method for byte-by-byte transmission of information using stream encryption
US6553120B1 (en) Method for data decorrelation
KR100411684B1 (en) Method for the cryptographic conversion of binary data blocks
KR20040041860A (en) Cryptographic apparatus with parallel des structure
US7433905B2 (en) Device and method for processing digital values in particular in non-adjacent form
EP0605047B1 (en) Method for blockwise encryption/decryption using linear algebraic codes
CN110532763B (en) Password construction method and system based on high-order orthomorphism replacement
CN115103080A (en) Image encryption method and system based on DNA triploid variation
Kumari et al. A novel image encryption scheme with Huffman encoding and steganography technique
KR100350207B1 (en) Method for cryptographic conversion of l-bit input blocks of digital data into l-bit output blocks
CN110581759A (en) UOEC-HEX symmetric encryption algorithm
RU2783406C1 (en) Method for gamma generation, used in stream encryption