RU2368942C2 - Device for generating remainder with arbitrary modulus - Google Patents

Device for generating remainder with arbitrary modulus Download PDF

Info

Publication number
RU2368942C2
RU2368942C2 RU2007124282/09A RU2007124282A RU2368942C2 RU 2368942 C2 RU2368942 C2 RU 2368942C2 RU 2007124282/09 A RU2007124282/09 A RU 2007124282/09A RU 2007124282 A RU2007124282 A RU 2007124282A RU 2368942 C2 RU2368942 C2 RU 2368942C2
Authority
RU
Russia
Prior art keywords
modulo
input
adders
adder
inputs
Prior art date
Application number
RU2007124282/09A
Other languages
Russian (ru)
Other versions
RU2007124282A (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 RU2007124282/09A priority Critical patent/RU2368942C2/en
Publication of RU2007124282A publication Critical patent/RU2007124282A/en
Application granted granted Critical
Publication of RU2368942C2 publication Critical patent/RU2368942C2/en

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Error Detection And Correction (AREA)

Abstract

FIELD: information technology.
SUBSTANCE: invention relates to computer engineering and can be used in digital computing devices, as well as in devices for generating finite field elements and in cryptographic applications. The device has a unit for generating partial remainders in absolute magnitude, unit of modulus multipliers and unit of modulus adders.
EFFECT: faster operation.
4 cl, 3 dwg

Description

Изобретение относится к вычислительной технике и может быть использовано в цифровых вычислительных устройствах, а также в устройствах для формирования элементов конечных полей и в криптографических приложениях.The invention relates to computer technology and can be used in digital computing devices, as well as in devices for forming finite field elements and in cryptographic applications.

Известно устройство для формирования остатка по произвольному модулю от числа, содержащее регистры, элементы ИЛИ, вычислитель, схемы сравнения, мультиплексор, элемент задержки, сумматор, группу блоков элементов И и блок постоянной памяти со связями (см. авт. св. СССР №1633495, кл. H03M 7/18, 1991).A device is known for generating a remainder modulo an arbitrary number, containing registers, OR elements, a calculator, comparison circuits, a multiplexer, a delay element, an adder, a group of blocks of AND elements, and a read-only memory block with communications (see ed. St. USSR No. 1633495, C. H03M 7/18, 1991).

Недостатком известного устройства является низкая надежность, так как для его реализации требуется большой объем оборудования.A disadvantage of the known device is low reliability, since its implementation requires a large amount of equipment.

Наиболее близким по технической сущности к заявляемому изобретению является комбинационный рекуррентный формирователь остатков, содержащий комбинационный формирователь частичных остатков, блок ключей и блок сумматоров по модулю (см. патент РФ №2029435, кл. 6 H03M 7/18, 20.02.1995, бюл. №5).Closest to the technical nature of the claimed invention is a combination recurrent residual shaper containing a combination shaper of partial residues, a key block and a block of adders modulo (see RF patent No. 2029435, CL 6 H03M 7/18, 02.20.1995, bull. No. 5).

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

Целью изобретения является повышение быстродействия.The aim of the invention is to increase performance.

Сущность изобретения заключается в реализации следующего способа формирования остатка по произвольному модулю.The essence of the invention lies in the implementation of the following method of forming a residue in an arbitrary modulus.

Пусть требуется сформировать остаток r от числа А по модулю р.Let it be required to form the remainder r of the number A modulo p.

Число А может быть представлено в позиционной системе счисления в видеThe number A can be represented in the positional number system in the form

Figure 00000001
Figure 00000001

где ai,

Figure 00000002
- коэффициенты, принимающие значения 0 или 1, n - количество разрядов в представлении числа А. Это выражение может быть представлено в следующем виде:where a i
Figure 00000002
- coefficients taking values 0 or 1, n - the number of digits in the representation of A. This expression can be represented in the following form:

Figure 00000003
Figure 00000003

где

Figure 00000004
, если n четное, и
Figure 00000005
, если n нечетное, [] - целая часть от деления.Where
Figure 00000004
if n is even, and
Figure 00000005
if n is odd, [] is the integer part of the division.

Из теории чисел известно, что операция приведения по модулю инвариантна к сложению и умножению, т.е. величина остатка не зависит от того, вычислен он от суммы (произведения) или от каждого слагаемого (сомножителя), а затем соответствующие частичные остатки просуммированы (перемножены) и от результата вычислен остаток по модулю.It is known from number theory that the modulo reduction operation is invariant to addition and multiplication, i.e. the value of the remainder does not depend on whether it is calculated on the sum (product) or on each term (factor), and then the corresponding partial balances are summed (multiplied) and the remainder is calculated modulo.

В таком виде значительно облегчается задача нахождения остатка r от числа A.In this form, the task of finding the remainder r of the number A. is greatly facilitated.

Для вычисления остатка от числа А по модулю р достаточно в выражении (2) просуммировать частичные остатки по модулю р от чисел 22i(a2i+12+a2i), где

Figure 00000006
- при n четном и
Figure 00000007
при n нечетном. Частичные остатки получаются в результате умножения частичного остатка от 22i по модулю р на число To calculate the remainder of the number A modulo p, it suffices to sum in the expression (2) the partial residues modulo p of the numbers 2 2i (a 2i + 1 2 + a 2i ), where
Figure 00000006
- for n even and
Figure 00000007
for n odd. Partial residues are obtained by multiplying the partial remainder of 2 2i modulo p by the number

(a2i+12+a2i). Способ вычисления частичных остатков от 22i по модулю р состоит в следующем. Вычисление частичного остатка от 22i заключается в умножении на четыре частичного остатка от 22(i-1) и приведение результата по модулю р. Операция умножения на четыре может быть реализована сдвигом всех разрядов числа на два разряда влево. Операция приведения по модулю реализуется следующим образом. Если число не превышает величину р, то оно остается без изменения. Если оно лежит в интервале от р до 2р-1, то из него вычитается модуль р. Если число лежит в интервале от 2р до 3р-1, то из него вычитается удвоенный модуль р. Если число лежит в интервале от 3р до 4р-1, то из него вычитается утроенный модуль р. Способ умножения частичного остатка от 22i по модулю p на число (a2i+12+a2i) состоит в следующем. Частичный остаток от 22i по модулю р, умноженный на a2i+12, складывается с частичным остатком от 22i по модулю р, умноженный на a2i. Если полученный результат не превышает величину р, то оно остается без изменения. Если оно лежит в интервале от p до 2р-1, то из него вычитается модуль р. Если число лежит в интервале от 2р до 3p-1, то из него вычитается удвоенный модуль р. Суммирование по модулю р частичных остатков происходит последовательно.(a 2i + 1 2 + a 2i ). A method for calculating partial residues from 2 2i modulo p is as follows. The calculation of the partial remainder of 2 2i consists in multiplying by four partial remainders of 2 2i (i-1) and the result is modulo p. The operation of multiplying by four can be implemented by shifting all the digits of the number by two digits to the left. The reduction operation modulo is implemented as follows. If the number does not exceed p, then it remains unchanged. If it lies in the range from p to 2p-1, then the module p is subtracted from it. If the number lies in the range from 2p to 3p-1, then the doubled module p is subtracted from it. If the number lies in the range from 3p to 4p-1, then the triple module p is subtracted from it. The method of multiplying the partial remainder of 2 2i modulo p by the number (a 2i + 1 2 + a 2i ) is as follows. The partial remainder of 2 2i modulo p multiplied by a 2i + 1 2 is added to the partial remainder of 2 2i modulo p multiplied by a 2i . If the result obtained does not exceed p, then it remains unchanged. If it lies in the interval from p to 2p-1, then the module p is subtracted from it. If the number lies in the range from 2p to 3p-1, then the doubled module p is subtracted from it. Summation modulo p of partial residues occurs sequentially.

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

Устройство формирования остатка по произвольному модулю от числа (фиг.1) содержит блок 1 формирователей частичных остатков, блок 2 умножителей по модулю и блок 3 сумматоров по модулю. Входы 4 служат для подачи двоичного кода числа А. Выход 5 является выходом остатка устройства формирования остатка по произвольному модулю от числа.A device for generating a remainder modulo an arbitrary modulus of a number (Fig. 1) comprises a block 1 of partial remover, a block 2 of modulators, and a block of 3 adders modulo. Inputs 4 serve for supplying the binary code of the number A. Output 5 is the output of the remainder of the device for generating the remainder modulo an arbitrary modulus of the number.

Блок 1 формирователей частичных остатков (фиг.1) содержит n/2 формирователей частичных остатков 6, соединенных последовательно, причем на вход первого формирователя частичных остатков 6 подан код единицы, разряд которого сдвинут на два разряда влево. Выходы разрядов предыдущего формирователя частичных остатков 6 подаются на входы последующего формирователя частичных остатков 6 со сдвигом на два в сторону старших. Выходы каждого формирователя частичных остатков 6 являются информационными выходами формирователя. Блок 2 умножителей по модулю (фиг.1) содержит n/2 умножителей по модулю 7, на информационные входы которых подаются коды с выходов формирователей частичных остатков 6. Блок 3 сумматоров по модулю (фиг.1) содержит n/2 сумматоров по модулю 8, на информационные входы которых подаются коды с выходов умножителей по модулю 7 и с выходов предыдущего сумматора по модулю 8, причем на первый сумматор по модулю 8 подаются два младших разряда кода числа А.Block 1 formers of partial residuals (Fig. 1) contains n / 2 formers of partial residues 6 connected in series, and a unit code is applied to the input of the first former of partial residues 6, the discharge of which is shifted two bits to the left. The outputs of the discharges of the previous shaper of partial residues 6 are fed to the inputs of the subsequent shaper of partial residues 6 with a shift of two towards the older ones. The outputs of each shaper of partial residues 6 are the information outputs of the shaper. Block 2 multipliers modulo (Fig. 1) contains n / 2 multipliers modulo 7, to the information inputs of which codes from the outputs of the formers of partial residues 6 are supplied. Block 3 adders modulo (figure 1) contains n / 2 adders modulo 8 , on the information inputs of which codes from the outputs of the multipliers modulo 7 and from the outputs of the previous adder modulo 8 are supplied, and the lower two bits of the code of number A are fed to the first adder modulo 8

Каждый формирователь частичных остатков (фиг.2) содержит три сумматора 12 и мультиплексор 13. На входы переносов трех сумматоров 12 подается код единицы. На первые информационные входы трех сумматоров 12 подается код с выхода формирователя частичных остатков 6. Вход 9 служит для подачи инверсного кода модуля, вход 10 - для подачи инверсного кода удвоенного кода модуля, вход 11 - для подачи инверсного кода утроенного кода модуля.Each shaper of partial residuals (Fig. 2) contains three adders 12 and a multiplexer 13. A unit code is supplied to the carry inputs of the three adders 12. At the first information inputs of the three adders 12, a code is supplied from the output of the partial residual generator 6. Input 9 is used to supply the inverse code of the module, input 10 is used to supply the inverse code of the doubled code of the module, input 11 is used to supply the inverse code of the triple code of the module.

Каждый умножитель 7 по модулю (фиг.3) содержит два ключа 16, которые управляются разрядами кода числа А, три сумматора 17 и мультиплексор 18. Вход 14 служит для подачи инверсного кода модуля, вход 15 - для подачи инверсного кода удвоенного кода модуля.Each multiplier 7 modulo (Fig. 3) contains two keys 16, which are controlled by digits of the code of number A, three adders 17 and a multiplexer 18. Input 14 is used to supply the inverse code of the module, input 15 is used to supply the inverse code of the doubled code of the module.

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

На вход первого формирователя частичных остатков 6 подается код единицы, сдвинутый на два разряда в сторону старших, выходы разрядов предыдущего формирователя частичных остатков 6 подключены к входам последующего формирователя частичных остатков 6 со сдвигом на два разряда в сторону старших. Таким образом на выходах блока формирования частичных остатков 1 формируются частичные остатки по модулю р от числа 22i, где

Figure 00000008
при n четном и
Figure 00000009
при n нечетном.At the input of the first shaper of partial residuals 6, a unit code is shifted by two digits towards the older ones; the outputs of the bits of the previous shaper of partial residues 6 are connected to the inputs of the subsequent shaper of partial residues 6 with a shift by two digits towards the older ones. Thus, at the outputs of the unit for the formation of partial residues 1, partial residues are formed modulo p from the number 2 2i , where
Figure 00000008
for n even and
Figure 00000009
for n odd.

Код числа А через входы 4 поступает на управляющие входы умножителя 7 по модулю. Умножитель 7 по модулю умножает частичный остаток по модулю р от числа 22i на число (a2i+12+a2i), где ai коэффициенты двоичного кода числа А, и вычисляет частичный остаток по модулю р от полученного результата. Блок сумматоров 3 по модулю суммирует по модулю р частичные остатки и число (а12+а0). Результат суммирования выдается на информационные выходы 5 устройства для формирования остатка по произвольному модулю от числа.The code of the number A through inputs 4 is supplied to the control inputs of the multiplier 7 modulo. The multiplier 7 modulo multiplies the partial remainder modulo p of the number 2 2i by the number (a 2i + 1 2 + a 2i ), where a i are the binary code coefficients of the number A, and calculates the partial remainder modulo p of the result. Block adders 3 modulo sums modulo p partial residuals and a number (a 1 2 + a 0 ). The result of the summation is issued to the information outputs 5 of the device to form a remainder modulo an arbitrary number.

Формирователь частичных остатков работает следующим образом. На первые информационные входы трех сумматоров 12 и на первый информационных вход мультиплексора 13 подается частичный остаток ti-1 по модулю р от числа 22(i-l), сдвинутый на два разряда в сторону старших. На входы переносов трех сумматоров 12 подается код единицы. На второй вход первого сумматора 12 подается инверсный код модуля р. На второй вход второго сумматора 12 подается инверсный код удвоенного модуля р. На второй вход третьего сумматора 12 подается инверсный код утроенного модуля р. Первый сумматор 12 выполняет операцию

Figure 00000010
. Сигнал со старшего (k+1)-го разряда полученного значения, где k - количество разрядов инверсного двоичного кода модуля р, поступает на выход переноса первого сумматора 12. Остальные разряды представляют собой разность (ti-1-р). Второй сумматор выполняет операцию
Figure 00000011
. Сигнал со старшего (k+1)-го разряда полученного значения, где k - количество разрядов инверсного двоичного кода удвоенного модуля р, поступает на выход переноса второго сумматора 12. Остальные разряды представляют собой разность (ti-1-2р). Третий сумматор выполняет операцию
Figure 00000012
. Сигнал со старшего (k+1)-го разряда полученного значения, где k - количество разрядов инверсного двоичного кода утроенного модуля р, поступает на выход переноса третьего сумматора 12. Остальные разряды представляют собой разность (ti-1-3р). Если на выходе переноса третьего сумматора 12 сигнал равен "1", то на выходе формирователя частичных остатков будет разность (ti-1-3р). Если на выходе переноса третьего сумматора 12 сигнал равен "0", а на выходе переноса второго сумматора 12 сигнал равен "1", то на выходе формирователя частичных остатков будет разность (ti-1-2р). Если на выходе переноса третьего сумматора 12 сигнал равен "0" и на выходе переноса второго сумматора 12 сигнал равен "0", а на выходе переноса первого сумматора 12 сигнал равен "1", то на выходе формирователя частичных остатков будет разность (ti-1-р). Если на выходе переноса третьего сумматора 12 сигнал равен "0", на выходе переноса второго сумматора 12 сигнал равен "0" и на выходе переноса первого сумматора 12 сигнал равен "0", то на выходе формирователя частичных остатков будет число ti-1.Shaper partial residues works as follows. The first information inputs of the three adders 12 and the first information input of the multiplexer 13 are fed with a partial remainder t i-1 modulo p of the number 2 2 (il) , shifted by two digits in the direction of the older ones. The unit code is supplied to the carry inputs of the three adders 12. At the second input of the first adder 12 is fed the inverse code of the module p. At the second input of the second adder 12, the inverse code of the doubled module p. At the second input of the third adder 12, the inverse code of the triple module p. The first adder 12 performs the operation
Figure 00000010
. The signal from the highest (k + 1) -th bit of the obtained value, where k is the number of bits of the inverse binary code of the module p, is fed to the transfer output of the first adder 12. The remaining bits are the difference (t i-1 -p). The second adder performs the operation
Figure 00000011
. The signal from the highest (k + 1) -th bit of the obtained value, where k is the number of bits of the inverse binary code of the doubled module p, is fed to the transfer output of the second adder 12. The remaining bits are the difference (t i-1 -2р). The third adder performs the operation
Figure 00000012
. The signal from the highest (k + 1) -th bit of the obtained value, where k is the number of bits of the inverse binary code of the triple module p, is fed to the transfer output of the third adder 12. The remaining bits are the difference (t i-1 -3p). If the signal at the transfer output of the third adder 12 is “1”, then at the output of the partial remover, there will be a difference (t i-1 -3p). If the signal at the transfer output of the third adder 12 is "0", and at the transfer output of the second adder 12, the signal is "1", then at the output of the partial residual shaper there will be a difference (t i-1 -2p). If at the transfer output of the third adder 12 the signal is “0” and at the transfer output of the second adder 12 the signal is “0”, and at the transfer output of the first adder 12, the signal is “1”, then at the output of the partial residual shaper there will be a difference (t i- 1- p). If the signal at the transfer output of the third adder 12 is “0”, at the transfer output of the second adder 12, the signal is “0” and at the transfer output of the first adder 12, the signal is “0”, then the number t i-1 will be at the output of the partial residual shaper.

Умножитель по модулю работает следующим образом. Коэффициенты ai+1 и ai, через входы 4 поступают на управляющие входы двух ключей 16. На информационные входы двух ключей подается частичный остаток ti по модулю р от числа 22t. В зависимости от того, на управляющий вход какого из ключей 16 поступает логическая "1", тот из ключей 16 оказывается открытым и коммутирует на свои выходы значения с информационных входов, которые поступают на входы первого сумматора 17. Причем на первый вход первого сумматора 17 поступает значение, сдвинутое на один разряд влево. На выходе первого сумматора оказывается результат умножения частичного остатка t1, по модулю р от числа 22i на число (a2i+12+a2i,). Результат вычисления поступает на первые входы второго и третьего сумматоров 17. На входы переносов второго и третьего сумматоров 17 подается код единицы. На второй вход второго сумматора 17 подается инверсный код модуля р. На второй вход третьего сумматора 17 подается инверсный код удвоенного модуля р. Второй сумматор 17 выполняет операцию

Figure 00000013
. Сигнал со старшего (k+1)-го разряда полученного значения, где k - количество разрядов инверсного двоичного кода модуля р, поступает на выход переноса второго сумматора 17. Остальные разряды представляют собой разность (ti-р). Третий сумматор выполняет операцию
Figure 00000014
Сигнал со старшего (k+1)-го разряда полученного значения, где k - количество разрядов инверсного двоичного кода удвоенного модуля р, поступает на выход переноса третьего сумматора 17. Остальные разряды представляют собой разность (ti-2р). Если на выходе переноса третьего сумматора 17 сигнал равен "1", то на выходе умножителя по модулю будет разность (ti-2p). Если на выходе переноса третьего сумматора 17 сигнал равен "0", а на выходе переноса второго сумматора 17 сигнал равен "1", то на выходе умножителя по модулю будет разность (ti-р). Если на выходе переноса третьего сумматора 17 сигнал равен "0" и на выходе переноса второго сумматора 17 сигнал равен "0", то на выходе умножителя по модулю будет число ti.The multiplier modulo works as follows. The coefficients a i + 1 and a i , through inputs 4, go to the control inputs of two keys 16. A partial remainder t i modulo p of the number 2 2t is supplied to the information inputs of the two keys. Depending on the control input of which of the keys 16 receives a logical "1", that of the keys 16 is open and commutes to its outputs the values from the information inputs that go to the inputs of the first adder 17. Moreover, the first input of the first adder 17 receives value shifted one bit to the left. The output of the first adder is the result of multiplying the partial remainder t 1 modulo p from the number 2 2i by the number (a 2i + 1 2 + a 2i ,). The result of the calculation goes to the first inputs of the second and third adders 17. The unit code is supplied to the carry inputs of the second and third adders 17. At the second input of the second adder 17 is fed the inverse code of the module p. At the second input of the third adder 17, the inverse code of the doubled module p. The second adder 17 performs the operation
Figure 00000013
. The signal from the highest (k + 1) -th bit of the obtained value, where k is the number of bits of the inverse binary code of the module p, is fed to the transfer output of the second adder 17. The remaining bits are the difference (t i -p). The third adder performs the operation
Figure 00000014
The signal from the highest (k + 1) -th bit of the obtained value, where k is the number of bits of the inverse binary code of the doubled module p, is fed to the transfer output of the third adder 17. The remaining bits are the difference (t i -2p). If at the transfer output of the third adder 17 the signal is "1", then at the output of the multiplier modulo there will be a difference (t i -2p). If at the transfer output of the third adder 17 the signal is "0", and at the transfer output of the second adder 17, the signal is "1", then the difference in the output of the multiplier will be modulus (t i -р). If at the transfer output of the third adder 17 the signal is “0” and at the transfer output of the second adder 17, the signal is “0”, then the output of the multiplier will be modulo t i .

Рассмотрим работу устройства формирования остатка по произвольному модулю от числа на примере.Consider the operation of the device for the formation of the remainder of an arbitrary module of the number on an example.

Пусть A=4910=1100012, p=910=0010012. Первый формирователь частичных остатков формирует значение частичного остатка от 22 по модулю р, который равен 0001002. Второй формирователь частичных остатков формирует частичный остаток от 24 по модулю р, который равен 0001112. Первый умножитель по модулю производит умножение частичного остатка, полученного на первом формирователе частичных остатков, и коэффициентов а2=0 и а3=0. В результате получается значение, равное 0. Первый сумматор по модулю выполняет операцию сложения полученного значения и коэффициентов а0=1 и 2а1=00 и находит остаток по модулю р. В результате получается значение, равное 1. Второй умножитель по модулю производит умножение частичного остатка, полученного на втором формирователе частичных остатков, и коэффициентов а4=1 и a5=1. В результате получается значение, равное 000011. Второй сумматор по модулю выполняет операцию сложения полученного значения и результата с первого сумматора по модулю и находит остаток по модулю р. В результате получается значение, равное 1002=410.Let A = 49 10 = 110001 2 , p = 9 10 = 001001 2 . The first shaper of partial residues generates the value of the partial residue of 2 2 modulo p, which is equal to 000100 2 . The second shaper of partial residues forms a partial residue of 2 4 modulo p, which is equal to 000111 2 . The first multiplier modulates the partial residue obtained on the first shaper of the partial residues, and the coefficients a 2 = 0 and a 3 = 0. The result is a value equal to 0. The first adder modulo performs the operation of adding the obtained value and the coefficients a 0 = 1 and 2a 1 = 00 and finds the remainder modulo p. The result is a value equal to 1. The second multiplier modulates the partial residue obtained on the second shaper of the partial residuals, and the coefficients a 4 = 1 and a 5 = 1. The result is a value equal to 000011. The second adder modulo performs the operation of adding the obtained value and the result from the first adder modulo and finds the remainder modulo p. The result is a value equal to 100 2 = 4 10 .

49=9·3+449 = 9.3 + 4

Claims (3)

1. Устройство для формирования остатка по произвольному модулю, содержащее блок формирователей частичных остатков и блок сумматоров по модулю, причем на первый формирователь частичных остатков блока формирователей частичных остатков подается код единицы, выход каждого формирователя частичных остатков соединен с входом последующего формирователя частичных остатков и является соответствующим информационным выходом блока формирователей частичных остатков, второй вход каждого сумматора по модулю блока сумматоров по модулю соединен с выходом предыдущего сумматора по модулю, выход последнего сумматора по модулю является выходом устройства для формирования остатков по произвольному модулю, отличающееся тем, что в него введен блок умножителей по модулю, содержащий t умножителей по модулю, где
Figure 00000015
, если n четное, и
Figure 00000016
, если n нечетное, n - разрядность входного числа, управляющие входы которых соединены с входами двоичного кода числа, причем два младших разряда числа подаются на второй вход первого сумматора по модулю, блок формирователей частичных остатков содержит t формирователей частичных остатков, блок сумматоров по модулю содержит t сумматоров по модулю, t выходов блока формирователей частичных остатков соединены соответственно с информационными входами умножителей по модулю блока умножителей по модулю, t выходов которого соединены соответственно с информационными входами блока сумматоров по модулю, являющихся первыми входами сумматоров по модулю.
1. A device for generating a remainder modulo an arbitrary module, comprising a block of partial residual shapers and a block of adders modulo, and a unit code is supplied to the first partial residual block of the partial residual shaper block, the output of each partial residual shaper is connected to the input of the subsequent partial residual shaper and is corresponding the information output of the block formers partial residuals, the second input of each adder modulo block adders modulo connected to the output of the previous adder modulo, the output of the last adder modulo is the output of the device for generating residues modulo arbitrary, characterized in that it introduced a block of multipliers modulo containing t modulators, where
Figure 00000015
if n is even, and
Figure 00000016
if n is odd, n is the bit depth of the input number, the control inputs of which are connected to the inputs of the binary code of the number, and the two least significant bits of the number are supplied to the second input of the first adder modulo, the block of partial residual shapers contains t formers of partial residuals, the block of adders modulo contains t modulo adders, t outputs of the partial remainder block are connected respectively to the information inputs of the multipliers modulo the modulators block, t outputs of which are connected respectively about with the information inputs of the block adders modulo, which are the first inputs of adders modulo.
2. Формирователь частичных остатков, содержащий три сумматора и мультиплексор, причем первые входы сумматоров и мультиплексора соединены с входом формирователя частичных остатков, второй вход первого сумматора соединен с входом инверсного кода модуля, второй вход второго сумматора соединен с входом инверсного кода удвоенного модуля, второй вход третьего сумматора соединен с входом инверсного кода утроенного модуля, на входы переносов всех сумматоров подается код единицы, входы мультиплексора соединены с информационными выходами и выходами переноса всех сумматоров, выход мультиплексора соединен с выходом формирователя частичных остатков.2. A partial residual shaper comprising three adders and a multiplexer, the first inputs of the adders and multiplexer connected to the input of the partial residual shaper, the second input of the first adder connected to the input of the inverse code of the module, the second input of the second adder connected to the input of the inverse code of the double module, second input the third adder is connected to the input of the inverse code of the triple module, the unit code is supplied to the carry inputs of all adders, the inputs of the multiplexer are connected to the information outputs and you odes transfer of adders, a multiplexer output coupled to the output of the partial balances. 3. Умножитель по модулю, содержащий мультиплексор, три сумматора, два ключа, информационные входы которых соединены с входом умножителя по модулю, на управляющие входы ключей подаются разряды кода числа, а выходы соединены с входами первого сумматора, выход которого соединен с первыми входами второго и третьего сумматоров, второй вход второго сумматора соединен с входом инверсного кода модуля, второй вход третьего сумматора соединен с входом инверсного кода двойного модуля, на входы переносов второго и третьего сумматоров подается код единицы, информационные выходы всех сумматоров и выходы переноса второго и третьего сумматоров соединены с входами мультиплексора, выход которого соединен с выходом умножителя по модулю. 3. The multiplier modulo containing the multiplexer, three adders, two keys, the information inputs of which are connected to the input of the multiplier modulo, the digits of the number code are fed to the control inputs of the keys, and the outputs are connected to the inputs of the first adder, the output of which is connected to the first inputs of the second and third adders, the second input of the second adder is connected to the input of the inverse code of the module, the second input of the third adder is connected to the input of the inverse code of the double module, the code unit is supplied to the carry inputs of the second and third adders The wires, information outputs of all adders and transfer outputs of the second and third adders are connected to the inputs of the multiplexer, the output of which is connected to the output of the multiplier modulo.
RU2007124282/09A 2007-06-27 2007-06-27 Device for generating remainder with arbitrary modulus RU2368942C2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2007124282/09A RU2368942C2 (en) 2007-06-27 2007-06-27 Device for generating remainder with arbitrary modulus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2007124282/09A RU2368942C2 (en) 2007-06-27 2007-06-27 Device for generating remainder with arbitrary modulus

Publications (2)

Publication Number Publication Date
RU2007124282A RU2007124282A (en) 2009-01-10
RU2368942C2 true RU2368942C2 (en) 2009-09-27

Family

ID=40373694

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2007124282/09A RU2368942C2 (en) 2007-06-27 2007-06-27 Device for generating remainder with arbitrary modulus

Country Status (1)

Country Link
RU (1) RU2368942C2 (en)

Also Published As

Publication number Publication date
RU2007124282A (en) 2009-01-10

Similar Documents

Publication Publication Date Title
US20200004506A1 (en) Integrated circuits with modular multiplication circuitry
CA2530015C (en) Division and square root arithmetic unit
RU2348965C1 (en) Computing mechanism
RU2316042C1 (en) Device for multiplying numbers with arbitrary modulus
JP4660066B2 (en) Device for modular multiplication
RU2717915C1 (en) Computing device
RU2299461C1 (en) Modulus multiplexer
US6662201B1 (en) Modular arithmetic apparatus and method having high-speed base conversion function
RU2368942C2 (en) Device for generating remainder with arbitrary modulus
KR101136972B1 (en) method for evaluating Elliptic Curve Cryptosystem
RU2324972C2 (en) Creator of random module reminder of number
RU2661797C1 (en) Computing device
RU2356086C2 (en) Computing device
RU2029435C1 (en) Combination recurrent former of remainders
RU2804380C1 (en) Pipeline calculator
RU2012137C1 (en) Device for forming remainder on arbitrary modulus
RU2299462C1 (en) Device for forming remainder by double modulus
Ercegovac et al. Design and FPGA implementation of radix-10 algorithm for square root with limited precision primitives
RU2791440C1 (en) Pipeline generator of remainders by an arbitrary modulus
RU2756408C1 (en) Computing apparatus
RU2739338C1 (en) Computing device
RU2797164C1 (en) Pipeline module multiplier
RU2797163C1 (en) Pipeline calculator
Ercegovac et al. Design and FPGA implementation of radix-10 algorithm for division with limited precision primitives
KR20070062901A (en) Apparatus and method for modular multiplication using chhinese remainder theorem and carry save adder

Legal Events

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

Effective date: 20090628