Faster table compute in mpn_sec_powm

francisco delgado frdelgado at yahoo.com
Tue Mar 20 14:56:38 UTC 2018


For odd values of i

Instead of this
B^(2j+1) = (B^(j-1))*B 

Shouldn't be this?
B^(2j+1) = (B^j)^2*B

Fran.

--------------------------------------------
El mar, 20/3/18, Torbjörn Granlund <tg at gmplib.org> escribió:

 Asunto: Faster table compute in mpn_sec_powm
 Para: gmp-devel at gmplib.org
 Fecha: martes, 20 de marzo, 2018 13:53
 
 In the side-channel silent GMP mpn_sec_powm
 we compute a table of powers
 of the base B, from B^0 to B^k-1 for
 some table size k.
 
 We do this simple by using the
 recusrion B^k = B^k*B.
 I now realised this can be sped up very
 easily:
 
  B^(2j)   = (B^j)^2   
   (i.e., even values of i)
  B^(2j+1) = (B^(j-1))*B  (i.e.,
 odd values of i)
 
 I.e., for even powers we do a squaring,
 while for odd numbers we do like
 before.
 
 
 -- 
 Torbjörn
 Please encrypt, key id 0xC8601622
 _______________________________________________
 gmp-devel mailing list
 gmp-devel at gmplib.org
 https://gmplib.org/mailman/listinfo/gmp-devel
 


More information about the gmp-devel mailing list