Curves and Abelian Varieties over Finite Fields and their Applications