Cloud-based Quadratic Optimization with Partially Homomorphic Encryption