RU2445730C2 - Device for generating remainder from arbitrary modulus of number - Google Patents

Device for generating remainder from arbitrary modulus of number Download PDF

Info

Publication number
RU2445730C2
RU2445730C2 RU2010106685/08A RU2010106685A RU2445730C2 RU 2445730 C2 RU2445730 C2 RU 2445730C2 RU 2010106685/08 A RU2010106685/08 A RU 2010106685/08A RU 2010106685 A RU2010106685 A RU 2010106685A RU 2445730 C2 RU2445730 C2 RU 2445730C2
Authority
RU
Russia
Prior art keywords
modulo
adder
input
output
elements
Prior art date
Application number
RU2010106685/08A
Other languages
Russian (ru)
Other versions
RU2010106685A (en
Inventor
Владимир Вячеславович Копытов (RU)
Владимир Вячеславович Копытов
Вячеслав Иванович Петренко (RU)
Вячеслав Иванович Петренко
Алеся Вячеславна Сидорчук (RU)
Алеся Вячеславна Сидорчук
Original Assignee
Государственное образовательное учреждение высшего профессионального образования "Ставропольский государственный университет"
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Государственное образовательное учреждение высшего профессионального образования "Ставропольский государственный университет" filed Critical Государственное образовательное учреждение высшего профессионального образования "Ставропольский государственный университет"
Priority to RU2010106685/08A priority Critical patent/RU2445730C2/en
Publication of RU2010106685A publication Critical patent/RU2010106685A/en
Application granted granted Critical
Publication of RU2445730C2 publication Critical patent/RU2445730C2/en

Links

Images

Abstract

FIELD: information technology.
SUBSTANCE: device for generating remainder on arbitrary modulus of a number has first and second registers, a group of AND elements, a unit of half-adders and a delay element, where the device also includes (K-1) half-adders, to whose second data inputs a modulus code is transmitted, and a number code "1" is transmitted to the first data input of the first half-adder and the second data input of the group of AND elements, the output of the i-th half-adder is connected to the second data input of the group of AND elements and with shift of one bit towards the most significant bits to the first data input of the i+1 half-adder, where i=1,…,K-2, the K-1 output of the half-adder is connected to the second data input of the group of AND elements.
EFFECT: cutting the size of equipment.
2 dwg

Description

Изобретение относится к вычислительной технике и может быть использовано в цифровых вычислительных устройствах, в криптографических приложениях, а также в устройствах для формирования кодовых последовательностей, построение которых основывается на теории конечных полей.The invention relates to computer technology and can be used in digital computing devices, in cryptographic applications, as well as in devices for generating code sequences, the construction of which is based on the theory of finite fields.

Известно устройство для формирования остатка по произвольному модулю от числа, содержащее первый и второй регистр, первый и второй элементы ИЛИ, вычислитель, первую схему сравнения и мультиплексор (Авторское свидетельство СССР N 1633495, кл. H03M 7/18, 1989).A device is known for generating a remainder modulo an arbitrary number, containing the first and second register, the first and second OR elements, a calculator, a first comparison circuit and a multiplexer (USSR Author's Certificate N 1633495, class H03M 7/18, 1989).

Недостатком данного устройства является низкое быстродействие процесса формирования остатка.The disadvantage of this device is the low speed of the process of forming the residue.

Наиболее близким к предлагаемому по технической сущности и достигаемому результату является устройство для формирования остатка по произвольному модулю от числа, содержащее первый регистр, информационные входы которого являются входами кода числа, последовательно соединенные блок постоянной памяти, группу блоков элементов И, блок сумматоров по произвольному модулю и второй регистр, а также элемент задержки и блок инверторов (см. патент РФ №2007033, кл. H03M 7/18, 1994.01.30).The closest to the proposed technical essence and the achieved result is a device for generating a remainder modulo an arbitrary number, containing the first register, the information inputs of which are inputs of a number code, a series-connected block of read-only memory, a group of blocks of AND elements, an adder block by an arbitrary module and the second register, as well as the delay element and the inverter unit (see RF patent No. 20077033, class H03M 7/18, 1994.01.30).

Недостатком данного устройства является большой объем оборудования.The disadvantage of this device is the large amount of equipment.

Цель изобретения - сокращение объема оборудования.The purpose of the invention is to reduce the volume of equipment.

Для достижения поставленной цели в устройство для формирования остатка по произвольному модулю от числа, содержащее первый и второй регистры, группу блоков элементов И, блок сумматоров по модулю и элемент задержки, причем вход числа соединен с информационными входами первого регистра, выходы которого соединены соответственно с первыми входами группы блоков элементов группы И, выходы которой соединены с первыми входами блока сумматоров по модулю, вход элемента задержки является входом начала вычислений и соединен со входом записи первого регистра, выход второго регистра является выходом устройства, вход модуля соединен со вторыми входами блока сумматоров по модулю, выход блока задержки соединен с выходом окончания работы устройства и входом записи второго регистра, информационные входы которого соединены с выходами блока сумматоров по модулю, введен блок формирования частичных остатков, на первый информационный вход которого подается код модуля, на второй информационный вход подается код числа «1», а информационные выходы соединены со вторыми входами группы блоков элементов И, при этом блок формирования частичных остатков содержит (К-1) сумматоров по модулю, причем первые информационные входы всех сумматоров по модулю соединены с первым информационным входом блока формирования частичных остатков, второй информационный вход блока формирования частичных остатков является его первым информационным выходом и со сдвигом на один разряд в сторону старших соединен со вторым информационным входом первого сумматора по модулю, выход i-го сумматора по модулю является i+1 информационным выходом блока формирования частичных остатков и со сдвигом на один разряд в сторону старших соединен со вторым информационным входом i+1 сумматора по модулю, где i=1, …, K-2, выход К-1 сумматора по модулю является К-ым информационным выходом блока формирования частичных остатков.To achieve this goal, a device for forming a remainder modulo an arbitrary number, containing the first and second registers, a group of blocks of AND elements, a block of adders modulo and a delay element, the input of the number being connected to the information inputs of the first register, the outputs of which are connected respectively to the first the inputs of the group of blocks of elements of the group And, the outputs of which are connected to the first inputs of the block of adders modulo, the input of the delay element is the input of the beginning of the calculations and connected to the input of the recording first of the second register, the output of the second register is the output of the device, the module input is connected to the second inputs of the adder block modulo, the output of the delay block is connected to the output of the end of the device and the write input of the second register, the information inputs of which are connected to the outputs of the adder block modulo partial residuals, to the first information input of which the module code is supplied, the code of the number "1" is fed to the second information input, and the information outputs are connected to the second inputs of the block group elements And, while the partial residual formation unit contains (K-1) modulo adders, the first information inputs of all adders modulo connected to the first information input of the partial residual formation unit, the second information input of the partial residual formation unit is its first information output and with a shift by one bit in the direction of the senior is connected to the second information input of the first adder modulo, the output of the i-th adder modulo is i + 1 information output of the unit of partial residues and with a shift by one bit in the direction of the senior is connected to the second information input i + 1 of the adder modulo, where i = 1, ..., K-2, the output K-1 of the adder modulo is the K-th information output of the forming unit partial residues.

Сущность изобретения состоит в реализации следующей идеи приведения чисел по произвольному модулю. Известно, что позиционные системы счисления строятся по следующему принципу. Выбирается некоторое число m - основание системы счисления. Целое число А в m-ичной системе счисления представляется в виде конечной линейной комбинации степеней числа m:The essence of the invention consists in the implementation of the following idea of reducing numbers modulo arbitrary. It is known that positional number systems are built according to the following principle. A certain number m is chosen - the base of the number system. The integer A in the m-ary number system is represented as a finite linear combination of the degrees of the number m:

Figure 00000001
Figure 00000001

где k - разрядность представляемого числа, ai - это целые числа, удовлетворяющие неравенству 0≤ai≤m-1. Для двоичной системы счисления выражение (1) принимает вид:where k is the length of the represented number, a i are integers satisfying the inequality 0≤a i ≤m-1. For a binary number system, expression (1) takes the form:

Figure 00000002
Figure 00000002

где ai принимает значение 0 или 1.where a i takes the value 0 or 1.

Известно также, что сравнения можно почленно складывать, т.е.:It is also known that comparisons can be added term by term, i.e.:

A1≡B1(modP), A2≡B2(modP)...(Ak≡Bk(modP).A 1 ≡ B 1 (modP), A 2 ≡ B 2 (modP) ... (A k ≡ B k (modP).

Тогда справедливо следующее выражение:Then the following expression is true:

Figure 00000003
Figure 00000003

Учитывая выражения (2) и (3), можно записать:Given the expressions (2) and (3), we can write:

Figure 00000004
Figure 00000004

Так как для двоичной системы счисления коэффициенты ai, i=0, …k-1, где k - разрядность представляемого числа А, принимают только два значения 0 и 1, то суммируя заранее вычисленные остатки по модулю Р от чисел 2i, i=0, … k-1, для тех i, для которых коэффициенты ai=1, получают остаток по модулю Р от числа А.Since for the binary number system the coefficients a i , i = 0, ... k-1, where k is the bit depth of the represented number A, take only two values 0 and 1, then summing the pre-calculated residues modulo P of the numbers 2 i , i = 0, ... k-1, for those i for which the coefficients a i = 1, they get the remainder modulo P of the number A.

На фиг.1 представлена функциональная схема устройства для формирования остатка по произвольному модулю от числа; на фиг.2 - функциональная схема блока формирования частичных остатков.Figure 1 presents a functional diagram of a device for forming a remainder in an arbitrary modulus of a number; figure 2 is a functional block diagram of the formation of partial residues.

Устройство для формирования остатка по произвольному модулю от числа содержит (фиг.1) первый регистр 1, блок 2 формирования частичных остатков, группу 3 блоков элементов И, блок 4 сумматоров по модулю, второй регистр 5, элемент 6 задержки. Вход 7 служит для подачи кода числа А, вход 8 служит для подачи кода модуля Р. Вход 9 - вход начала вычисления. Выход 11 - выход конца вычисления. Выход 10 является информационным выходом устройства.A device for generating a remainder modulo an arbitrary number of contains (Fig. 1) a first register 1, a block 2 for forming partial balances, a group of 3 blocks of AND elements, a block of 4 adders modulo, a second register 5, an element 6 of the delay. Input 7 serves to feed the code of number A, input 8 serves to feed the code of module P. Input 9 is the input of the calculation. Output 11 - output of the end of the calculation. Output 10 is the information output of the device.

Блок 2 формирования частичных остатков содержит (фиг.2) К-1 сумматоров 14 по модулю. Вход 12 служит для подачи кода модуля Р, выходы 13.1-13.К являются выходами частичных остатков модуля Р. На второй информационный вход блока 2 формирования частичных остатков подается код числа «1».Block 2 forming partial residues contains (figure 2) K-1 adders 14 modulo. Input 12 serves to feed the code of module P, outputs 13.1-13. K are the outputs of the partial residuals of module P. The code of the number "1" is supplied to the second information input of the partial residual block 2.

Устройство для формирования остатка по произвольному модулю от числа работает следующим образом.A device for generating a remainder modulo an arbitrary number modulus works as follows.

В исходном состоянии регистры 1 и 5 обнулены. На вход 7 подается код числа А. На управляющий вход 9 подается сигнал начала вычислений. Под воздействием сигнала начала вычислений в регистр 1 записывается код числа А. На вход 8 подается код модуля Р и блок 2 формирования частичных остатков формирует частичные остатки от чисел 2i по модулю Р, которые подаются на вторые информационные входы группы блоков 3 элементов «И». Поразрядно в блоке 3 элементов И умножаются частичные остатки модуля Р и разряды числа А, поступающие на первые входы блока. В блоке 4 сумматоров по модулю результаты умножения складываются и снова вычисляются по модулю Р. Результат поступает на вход регистра 5, выход которого является информационным выходом устройства для формирования остатка по произвольному модулю от числа. Под воздействием импульса, поступающего с выхода элемента задержки 6, рассчитанного на задержку, равную времени формирования остатка, в регистр 5 происходит запись результата, который в результате этого появляется на выходе устройства. Импульс с выхода элемента задержки 6 поступает также на выход 11 устройства, свидетельствуя об окончании процесса формирования остатка.In the initial state, registers 1 and 5 are reset. At input 7, the code of number A. Under the influence of the start signal of the calculations, the code of number A is written into register 1. The code of module P is input to input 8 and the partial residue generating unit 2 generates partial residues from the numbers 2 i modulo P, which are fed to the second information inputs of the group of blocks of 3 AND elements . Bitwise in the block of 3 elements And the partial residuals of the module P and the bits of the number A arriving at the first inputs of the block are multiplied. In block 4 adders modulo the results of the multiplication are added and again calculated modulo P. The result is fed to the input of register 5, the output of which is the information output of the device to form the remainder of the arbitrary modulus of the number. Under the influence of a pulse coming from the output of the delay element 6, designed for a delay equal to the time of the formation of the remainder, a result is recorded in register 5, which, as a result, appears at the output of the device. The pulse from the output of the delay element 6 also enters the output 11 of the device, indicating the end of the process of forming the remainder.

Блок 2 формирования частичных остатков работает следующим образом (см. фиг.2). На первый вход первого сумматора 14 по модулю и на выход 13.0 поступает логическая единица. На вторые входы всех сумматоров 14 по модулю подается код модуля. Результат вычислений с выхода сумматора 14 по модулю поступает на соответствующий выход блока 13.i, где i=1…K-1, а также со сдвигом на один разряд в сторону старшего поступает на первый вход следующего по схеме сумматора 14 по модулю. Каждый сумматор 14 по модулю сравнивает модуль и поступающее число. Если модуль больше числа, то на выход сумматора 14 по модулю подается число, иначе - разность модуля и числа.Block 2 of the formation of partial residues works as follows (see figure 2). The first input of the first adder 14 modulo and output 13.0 receives a logical unit. The second inputs of all adders 14 modulo served code module. The result of the calculations from the output of the adder 14 modulo goes to the corresponding output of the block 13.i, where i = 1 ... K-1, and also with a shift by one digit in the direction of the older one, it goes to the first input of the next adder 14 modulo. Each adder 14 modulo compares the module and the incoming number. If the module is greater than the number, then the output of the adder 14 modulo feeds a number, otherwise the difference between the module and the number.

Рассмотрим работу устройства для формирования частичных остатков на примере. Зададим начальные условия. A=2910=111012, модуль Р=1310=11012 Consider the operation of the device for the formation of partial residues by example. We set the initial conditions. A = 29 10 = 11101 2 , module P = 13 10 = 1101 2

Коэффициент 2i Coefficient 2 i 20 2 0 21 2 1 22 2 2 23 2 3 24 2 4 2i (modl3)2 i (modl3) 1one 22 4four 88 33 Код числа АA code 1one 00 1one 1one 1one Результат логической операции «И»The result of the logical operation "AND" 1one 00 4four 88 33 СуммированиеSummation 1616 Сумма по mod 13Amount mod 13 33

Проверим: 29≡3 mod 13.Check: 29≡3 mod 13.

Эффективность заявляемого устройства перед устройством-прототипом заключается в существенном уменьшении объема оборудования при формировании остатков. Расчеты показывают, что если проводить вычисления с 64-разрядными числами, то устройство-прототип должно иметь блок постоянной памяти для хранения k*l частичных остатков, где k=64 количество разрядов числа, l=264 количество модулей, то есть объем блока постоянной памяти составит k*l=64*264=270 ячеек. В заявляемом устройстве при тех же исходных данных вырабатывается k частичных остатков, т.е. объем оборудования составляет 64=26 сумматоров, т.к. частичные остатки вычисляются в процессе формирования остатка для одного определенно заданного модуля.The effectiveness of the claimed device in front of the prototype device is to significantly reduce the amount of equipment during the formation of residues. Calculations show that if calculations are performed with 64-bit numbers, the prototype device must have a read-only memory block for storing k * l partial residuals, where k = 64 is the number of bits of the number, l = 2 64 are the number of modules, that is, the volume of the constant block memory will be k * l = 64 * 2 64 = 2 70 cells. In the inventive device with the same initial data, k partial residues are generated, i.e. the volume of equipment is 64 = 2 6 adders, because partial residuals are computed in the process of forming the remainder for one specific module.

Claims (1)

Устройство для формирования остатка по произвольному модулю от числа, содержащее первый и второй регистры, группу блоков элементов «И», блок сумматоров по модулю и элемент задержки, причем вход числа соединен с информационными входами первого регистра, выходы которого соединены соответственно с первыми входами группы блоков элементов «И», выходы которой соединены с первыми входами блока сумматоров по модулю, вход элемента задержки является входом начала вычислений и соединен со входом записи первого регистра, выход второго регистра является выходом устройства, вход кода модуля соединен со вторыми входами блока сумматоров по модулю, выход элемента задержки соединен с выходом окончания работы устройства и входом записи второго регистра, разрядные входы которого соединены с выходами блока сумматоров по модулю, отличающееся тем, что в него введены (К-1) сумматоров по модулю, на вторые информационные входы которых подается код модуля, на первый информационный вход первого сумматора по модулю и на второй информационный вход группы блоков элементов «И» подается код числа «1», выход i-го сумматора по модулю соединен со вторым информационным входом группы блоков элементов «И» и со сдвигом на один разряд в сторону старших с первым информационным входом i+1 сумматора по модулю, где i=1, …, K-2, выход К-1 сумматора по модулю соединен со вторым информационным входом группы блоков элементов «И». A device for generating a remainder modulo an arbitrary modulus of a number, containing the first and second registers, a group of blocks of I elements, an adder block modulo and a delay element, the input of the number being connected to the information inputs of the first register, the outputs of which are connected respectively to the first inputs of the group of blocks "I" elements, the outputs of which are connected to the first inputs of the adder block modulo, the input of the delay element is the input of the start of calculations and connected to the input of the first register, the output of the second register is is connected by the output of the device, the module code input is connected modulo to the second inputs of the adder block, the delay element output is connected to the end of the device operation and the second register entry, the bit inputs of which are connected to the outputs of the adder block modulo, characterized in that K-1) modulo adders, to the second information inputs of which the module code is supplied, to the first information input of the first adder modulo and to the second information input of the group of blocks of elements "AND" the code is the number "1" , the output of the i-th adder modulo is connected to the second information input of the group of blocks of elements "And" and with a shift by one bit in the direction of the senior with the first information input i + 1 adder modulo, where i = 1, ..., K-2, the output of K-1 adder modulo connected to the second information input of the group of blocks of elements "And".
RU2010106685/08A 2010-02-24 2010-02-24 Device for generating remainder from arbitrary modulus of number RU2445730C2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2010106685/08A RU2445730C2 (en) 2010-02-24 2010-02-24 Device for generating remainder from arbitrary modulus of number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2010106685/08A RU2445730C2 (en) 2010-02-24 2010-02-24 Device for generating remainder from arbitrary modulus of number

Publications (2)

Publication Number Publication Date
RU2010106685A RU2010106685A (en) 2011-08-27
RU2445730C2 true RU2445730C2 (en) 2012-03-20

Family

ID=44756359

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2010106685/08A RU2445730C2 (en) 2010-02-24 2010-02-24 Device for generating remainder from arbitrary modulus of number

Country Status (1)

Country Link
RU (1) RU2445730C2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0308963A2 (en) * 1987-09-25 1989-03-29 Kabushiki Kaisha Toshiba Remainder computing system and method
SU1633495A1 (en) * 1989-05-31 1991-03-07 Ставропольское высшее военное инженерное училище связи им.60-летия Великого Октября Device for generating arbitrary modulo residue
RU2007037C1 (en) * 1991-06-17 1994-01-30 Вячеслав Иванович Петренко Recurrent generator of remainders of arbitrary modulo
RU2007033C1 (en) * 1991-01-09 1994-01-30 Вячеслав Иванович Петренко Device for generation of integer remainder of arbitrary modulo
RU2029435C1 (en) * 1992-03-16 1995-02-20 Вячеслав Иванович Петренко Combination recurrent former of remainders
RU2324972C2 (en) * 2006-01-31 2008-05-20 Ставропольский военный институт связи ракетных войск Creator of random module reminder of number

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0308963A2 (en) * 1987-09-25 1989-03-29 Kabushiki Kaisha Toshiba Remainder computing system and method
SU1633495A1 (en) * 1989-05-31 1991-03-07 Ставропольское высшее военное инженерное училище связи им.60-летия Великого Октября Device for generating arbitrary modulo residue
RU2007033C1 (en) * 1991-01-09 1994-01-30 Вячеслав Иванович Петренко Device for generation of integer remainder of arbitrary modulo
RU2007037C1 (en) * 1991-06-17 1994-01-30 Вячеслав Иванович Петренко Recurrent generator of remainders of arbitrary modulo
RU2029435C1 (en) * 1992-03-16 1995-02-20 Вячеслав Иванович Петренко Combination recurrent former of remainders
RU2324972C2 (en) * 2006-01-31 2008-05-20 Ставропольский военный институт связи ракетных войск Creator of random module reminder of number

Also Published As

Publication number Publication date
RU2010106685A (en) 2011-08-27

Similar Documents

Publication Publication Date Title
RU2500017C1 (en) Modulo adder-accumulator
Talapatra et al. Unified digit serial systolic Montgomery multiplication architecture for special classes of polynomials over GF (2m)
Nykolaychuk et al. Theoretical foundations for the analytical computation of coefficients of basic numbers of Krestenson’s transformation
US20040177105A1 (en) Multilplier and cipher circuit
RU2316042C1 (en) Device for multiplying numbers with arbitrary modulus
El-Razouk et al. New Bit-Level Serial GF (2^ m) Multiplication Using Polynomial Basis
RU2696223C1 (en) Arithmetic logic unit for generating residual by arbitrary module from number
RU2445730C2 (en) Device for generating remainder from arbitrary modulus of number
RU2589361C1 (en) Modulo multiplier
Piestrak Design of multi-residue generators using shared logic
RU2348965C1 (en) Computing mechanism
Wei Fast signed-digit arithmetic circuits for residue number systems
Nti et al. Asic design of low area rsa cryptocore based on montgomery multiplier
Lee Super Digit-Serial Systolic Multiplier over GF (2^ m)
RU2661797C1 (en) Computing device
RU2642366C1 (en) Adder accumulator
RU2586574C1 (en) Polynomial modular computer systems of boolean functions with error detection
RU2626654C1 (en) Multiplier by module
KR20060037941A (en) Apparatus for hybrid multiplier in gf(2^m) and method for multiplying
CN107463354A (en) A kind of variable Montgomery modular multiplication circuits of dual domain degree of parallelism towards ECC
KR100946256B1 (en) Scalable Dual-Field Montgomery Multiplier On Dual Field Using Multi-Precision Carry Save Adder
KR100893695B1 (en) Architecture of fast-serial finite field multiplier
RU2755734C1 (en) Apparatus for multiplying numbers by an arbitrary modulus
Ambika et al. Data security using serial commutative RSA CORE for multiple FPGA system
RU2739338C1 (en) Computing device

Legal Events

Date Code Title Description
MM4A The patent is invalid due to non-payment of fees

Effective date: 20150225