Theory of cryptography refers to the study of cryptographic algorithms and protocols in a formal framework. The two main goals of the study are definitions and proofs of security.