Relation between number theory and cryptography