08.03.2014 Views

FPGA based Hardware Accleration for Elliptic Curve Cryptography ...

FPGA based Hardware Accleration for Elliptic Curve Cryptography ...

FPGA based Hardware Accleration for Elliptic Curve Cryptography ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

v E k<br />

Input:<br />

v ­ Y<br />

Ø moxµBÙ 3 ( _ c<br />

Output:<br />

2.2. FINITE FIELD ARITHMETIC 11<br />

Algorithm 4 Finite Field Inversion<br />

Ø rx~yÚm v<br />

whileØ ³ I<br />

do<br />

st<br />

ṕ´ Ø<br />

// right shift byØ<br />

bits spmo(<br />

st Ø r9xKy<br />

<strong>for</strong>¯<br />

fromc toKs ṕ´ cS do<br />

qm<br />

_ œqBr;Pst=zq // per<strong>for</strong>m Û3 square operations<br />

end <strong>for</strong><br />

qpmonpn<br />

_ wr9xKyKst Ø rxKyX@gq<br />

ifs is odd then<br />

yœm‚npn<br />

npn _ #qkr;PstPKyg yœm<br />

Ø r9xKyœm npn _ wr9xKyKyX@ v <br />

else<br />

st<br />

Ø r9xKyœmoy<br />

end if<br />

st<br />

m Ø _ c Ø<br />

end while<br />

Ø rx~yÚmonpn _ #qkr9;=stPKst Ø r9xKyg<br />

returnst<br />

Ø rx~y<br />

st<br />

v 3CÝ ­ Y ͉Ï4Ð v ­ Y cƒÜ v 3CÝ ­ 3 ͉Ï4Ð (2.7)<br />

Ü<br />

Inversion can there<strong>for</strong>e be simply computed by repeated FF-Square and FF-Mult operations like it is shown<br />

in Alg. 4. The algorithm in particular benefits from the fact in that squaring is much cheaper than<br />

multiplication. The total number multiplications¢K(b of required <strong>for</strong> one FF inversion is given by<br />

6]ÞKßÏà 3 K( _ cSºá)?¬bK( _ cS _ c#\<br />

½K(b<br />

2.2.8 Polynomial Reduction<br />

As mentioned above, the basic arithmetic operations take place in-hÁ5ÃÂ . In case of multiplication and<br />

squaring the resulting polynomial has to be reduced. According to Eqn. 2.5 the maximum degree of the<br />

multiplication result} 6 v |<br />

withv<br />

@ |¤E isk( _ . The subsequent polynomial reduction of}<br />

modulo is <strong>based</strong> on the equivalence<br />

Ü P­ Y Ì<br />

±–Çɮ⠱~5 ± ͉Ï4Ð \ (2.8)<br />

5

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

Saved successfully!

Ooh no, something went wrong!