04.11.2012 Views

1 Montgomery Modular Multiplication in Hard- ware

1 Montgomery Modular Multiplication in Hard- ware

1 Montgomery Modular Multiplication in Hard- ware

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FEI KEMT<br />

not significant. On the other hand, the possibility to remove correction unit from<br />

hard<strong>ware</strong> design of Algorithm 1 – 4 br<strong>in</strong>gs valuable advantage.<br />

In the rest of the thesis the notions e1 or e2 are used to denote the number of<br />

words <strong>in</strong> cases we need to emphasis the difference of the number of words <strong>in</strong> the<br />

algorithms, or we use the notation e <strong>in</strong> case we mean a number of words <strong>in</strong> general.<br />

2.1.1 Scalable Multiple-Word Algorithms<br />

Operations <strong>in</strong> Algorithm 1 – 3 and Algorithm 1 – 4 are performed on the full-precision<br />

operands and do not provide scalability feature expla<strong>in</strong>ed above. We analyse rela-<br />

tions between parameters of the multipliers and underly<strong>in</strong>g FPGA structure and<br />

provide solution suitable for devices <strong>in</strong>clud<strong>in</strong>g fast carry architecture.<br />

A scalable algorithm <strong>in</strong> which the operand Y (multiplicand) is scanned word-<br />

by-word, and the operand X (multiplier) is scanned bit-by-bit was proposed <strong>in</strong><br />

[108,109]. The Multiple Word Radix-2 <strong>Montgomery</strong> <strong>Multiplication</strong> algorithm (MW-<br />

R2MM) uses the follow<strong>in</strong>g vectors:<br />

M = (M (e−1) , . . . , M (1) , M (0) ) (2.1)<br />

Y = (Y (e−1) , . . . , Y (1) , Y (0) )<br />

S = (S (e−1) , . . . , S (1) , S (0) )<br />

X = (xk−1, . . . , x1, x0)<br />

where the words are marked with superscripts and the bits are marked with sub-<br />

scripts. The concatenation of vectors a and b is noted as (a, b). A particular range<br />

of bits <strong>in</strong> a vector a from position i to position j, j > i will be expressed as aj..i.<br />

The bit position i of the k-th word of a is represented by symbol a (k)<br />

i .<br />

The details of the MWR2MM algorithm (further referred to as MWR2MM CSA,<br />

where CSA states for Carry-Save Adder) are given <strong>in</strong> [108] and <strong>in</strong> the thesis it will<br />

be denoted as Algorithm 2 – 1. Optimized version of MMM Algorithm 1 – 4 can be<br />

transformed to a multiple word form (referred to as MWR2MM CPA, where CPA<br />

states for Carry-Propagate Adder) <strong>in</strong> a similar way, shown <strong>in</strong> Algorithm 2 – 2. The<br />

reason for such nam<strong>in</strong>g of algorithms is given by the way of their implementation<br />

and we expla<strong>in</strong> more about it <strong>in</strong> the follow<strong>in</strong>g parts of the thesis.<br />

The algorithms compute a partial sum S for each bit of X, scann<strong>in</strong>g the words<br />

of Y and M. Once the precision is exhausted, another bit of X is taken, and the<br />

scan is repeated. Thus, the algorithms MWR2MM CSA as well as MWR2MM CPA<br />

22

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!