The selection of parameters for LWE-based schemes is a challenging problem and becomes more important as lattice-based cryptography attracts increasing attention. In this paper, different from the conventional routine of selecting parameters by experience or deduction, we focus on the mathematical theory behind the problem, and address the problem of selecting optimal parameters for LWE-based schemes, which is even harder than selecting good parameters.
This problem can be modeled as a global optimization problem, in which a certain constraint may not be expressed in closed form. Fortunately, through analysis we discover that the objective and the functions in all the constraints of this problem are monotone with respect to each of the variables. We provide a framework to address such problems; and for optimization problems in a special form, we are able to design a complete global optimization algorithm that is guaranteed to terminate in finitely many steps. This algorithm enables us to search for optimal parameters for the encryption schemes, while guaranteeing security and correctness specified by the user. As an example, we investigate the problem of choosing optimal parameters for the state-of-the-art BGV scheme, in the context of minimizing the communication overhead, without considering homomorphic operations, and present optimal parameters for it under specified security levels and correctness probability. In addition, we analyze the security level of the LWE instances in detail and empirically derive a closed formula to estimate the security level in terms of the parameters, which may be useful for future work.