With the increasing development of smart grid, multiparty cooperative computation between several entities has become a typical characteristic of modern energy systems. Traditionally, data exchange among parties is inevitable, rendering how to complete multiparty collaborative optimization without exposing any private information a critical issue. This paper proposes a fully privacy-preserving distributed optimization framework based on secure multiparty computation (SMPC) secret sharing protocols. The framework decomposes the collaborative optimization problem into a master problem and several subproblems. The process of solving the master problem is executed in the SMPC framework via the secret sharing protocols among agents. The relationships of agents are completely equal, and there is no privileged agent or any third party. The process of solving subproblems is conducted by agents individually. Compared to the traditional distributed optimization framework, the proposed SMPC-based framework can fully preserve individual private information. Exchanged data among agents are encrypted and no private information disclosure is assured. Furthermore, the framework maintains a limited and acceptable increase in computational costs while guaranteeing optimality. Case studies are conducted to demonstrate the principle of secret sharing and verify the feasibility and scalability of the proposed methodology.