  We study the discrete logarithm problem for the multiplicative group and for
elliptic curves over a finite field by using a lifting of the corresponding
object to an algebraic number field and global duality. We introduce the
\textit{signature} of a Dirichlet character (in the multiplicative group case)
or principal homogeneous space (in the elliptic curve case), which is a measure
of the ramification at certain places. We then develop \textit{signature
calculus}, which generalizes and refines the index calculus method. Finally, we
show the random polynomial time equivalence for these two cases between the
problem of computing signatures and the discrete logarithm problem.
