Page 345 - Hardware Implementation of Finite-Field Arithmetic
P. 345
Optimal Extension Fields 325
constant MINUS_ONE: std_logic_vector(LOGK downto 0)
:= conv_std_logic_vector(-1, LOGK+1);
constant MINUS_TWO: std_logic_vector(LOGK downto 0)
:= conv_std_logic_vector(-2, LOGK+1);
--if p mod 4 = 1:
constant pp1: std_logic_vector (K+1 downto 0)
:= MINUS_P;
constant pp3: std_logic_vector (K+1 downto 0) := p(k)&p;
end plus_minus_Parameters;
The cost and delay of several mod (2 − 387) dividers are shown
32
in Table B.5.
FFs LUTs Slices Period AverCycles AverTime
Euclidean 459 729 435 5.1 1,348.3 10,517
Binary 130 510 285 8.9 65.3 582
Plus-minus 151 402 206 13.9 46.5 647
Fermat 228 445 267 8.8 3,457 30,422
TABLE B.5 Cost and Delay of mod (2 − 387) Dividers
32
6
B.2.6 mod (x − 2) Multiplication
The MSE-first serial multiplier of Chap. 5 is used. The package storing
the parameter values is the following:
package mod_f_multiplier_parameters_package is
constant k: natural := 32;
constant p: std_logic_vector(k-1 downto 0)
:= X”fffffe7d”;
constant m: natural := 6;
type long_polynomial is
array(m downto 0) of
std_logic_vector(k-1 downto 0);
type polynomial is
array(m-1 downto 0) of
std_logic_vector(k-1 downto 0);
--logm is the number of bits of m-1
constant logm: natural := 3;
constant f: long_polynomial :=
(X”00000001”, X”00000000”, X”00000000”, X”00000000”,
X”00000000”, X”00000000”, X”fffffe7b”);
end mod_f_multiplier_parameters_package;
FFs LUTs Slices Period Cycles Total time
340 760 518 15.8 2,455 38,789