Cloud computing provides centralized data storage and online computing. For centralized data storage, to address both security and availability issue, distributed storage is an appealing option in that it can ensure file security without requiring data encryption. Instead of storing a file and its replications on multiple servers, we can break the file into components and store the components on multiple servers. In this paper, we develop the minimum storage regeneration (MSR) point based distributed storage schemes that can achieve optimal storage efficiency and storage capacity. Moreover, our scheme can detect and correct malicious nodes with much higher error correction efficiency. For online computing, we investigate outsourcing of general computational problems and propose efficient Cost-Aware Secure Outsourcing (CASO) schemes for problem transformation and outsourcing so that the cloud is unable to learn any key information from the transformed problem. We also propose a verification scheme to ensure that the end-users will always receive a valid solution from the cloud. Our extensive complexity and security analysis show that our proposed Cost-Aware Secure Outsourcing (CASO) scheme is both practical and effective.