The proliferation of Internet of Things (IoT) devices has led to exponential data growth that can be harnessed for personalized services, cost savings, and environmental benefits. However, collecting and sharing this data comes with significant risks, including hacking attacks, breaches of sensitive data, and non-compliance with privacy regulations. This paper proposes a comprehensive, end-to-end secure system, MOZAIK, for privacy-preserving data collection, analysis, and sharing to address these challenges. We perform a requirements analysis from the perspectives of security, privacy, legal, and functionality, highlighting the various mechanisms employed to safeguard sensitive data throughout the entire data cycle. This includes the use of lightweight encryption, distributed computation, and anonymous communication mechanisms to reduce security and privacy risks and to protect against single points of failure. MOZAIK provides a trusted and secure platform for data sharing and processing that can enable the creation of a data market and data economy.