Let $X: y^2=f(x)$ be an hyperelliptic curve over a finite field $k$. Consider two non-fibral correspondences $C,D\subset X\times X$. It is well known that they induce endomorphisms $\phi_C,\phi_D:Jac(X)\longrightarrow Jac(X)$, where $Jac(X)$ is the jacobian of $X$.
My question is: Is there an algorithm to compute $\phi_C+\phi_D$ and $\phi_C\circ \phi_D$?
If this is not easy in such generality, is it possible to compute these operations when $C$ and $D$ are the graphs of morphisms $X\longrightarrow X$?