Low-Power Design of a Functional Unit for Arithmetic in Finite Fields GF ( p ) and GF ( 2 m )