In this paper we present an ElGamal-like cryptosystem, based on elliptic and hyperelliptic curves, in which we combine the advantages of both curves. The main idea is to use the isogenies between the Weil restriction of the elliptic curve and the Jacobian of the genus-2 hyperelliptic curve.