Number Theory Inspired by Cryptography