A Math problem related to cryptography