m_inv and n are now provided to decrypt_letter