Some Algebraic and Number Theoretic Aspects of Classical and Post Quantum Cryptography