Quick, dirty and maybe broken implementation of Discrete Logs