Cloud computing provides a flexible and cost-effective solution to big data applications. Data privacy, however, is a main concern. To avoid information leakage to a cloud service provider, a user may store portions of encoded data in multiple clouds and perform computing tasks in a distributed way. In this work, nested MDS codes and the criterion of perfect secrecy are adopted. The allocation of encoded data to be stored in heterogeneous clouds with different computing capability is formulated as an optimization problem, subject to data reliability and security constraints. The problem is shown to be feasible if and only if the storage budget is above a certain level. The tradeoff between minimum computation time and storage budget is analytically characterized, and the former is proved to be a piecewise-linear decreasing function of the latter. When the storage budget increases beyond a certain threshold, the optimal computation time levels off. Closed-form expressions of minimum computation time and optimal storage allocation are obtained. Numerical results show that the optimized allocation outperforms equal allocation significantly if the computing rates of different clouds have large variation. Refereed/Peer-reviewed