That is a talk in two parts. The first one is about algorithms for determining whether a given integer n is prime or composite. The simplest algorithms, namely the Miller-Rabin test and the PocKlington-Lehmer algorithm, use properties of Z/nZ. However Z/nZ-algebras play an important role in the construction of powerful primality tests. We will recall a few properties of Galois ring extensions of Z/nZ. And then we will describe how we use them for primality testing algorithms. The second part of the talk will be concerned with the problem of computing the quotient of the Jacobian variety J of an hyperelliptic curve C by a certain subgroup. We will start from the genus one case (with elliptic curves).