  The security of public-key cryptosystems relies on computationally hard
problems, that are classically analyzed by number theoretic methods. In this
paper, we introduce a new perspective on cryptosystems by interpreting the
Diffie-Hellman key exchange as a nonlinear dynamical system. Employing Koopman
theory, we transfer this dynamical system into a higher-dimensional space to
analytically derive a purely linear system that equivalently describes the
underlying cryptosystem. In this form, analytic tools for linear systems allow
us to reconstruct the secret integers of the key exchange by simple
manipulations. Moreover, we provide an upper bound on the minimal required
lifting dimension to obtain perfect accuracy. To demonstrate the potential of
our method, we relate our findings to existing results on algorithmic
complexity. Finally, we transfer this approach to a data-driven setting where
the Koopman representation is learned from data samples of the cryptosystem.
