Abstract:With the rapid development of the Internet of Things (IoT), a growing number of smart terminal devices collect large volumes of patient medical data to support healthcare applications, offering considerable value for medical research. However, such data typically involve sensitive patient information and may face security risks such as tampering and unauthorized access during aggregation and transmission. To address these security and privacy concerns while enabling fine-grained statistical analysis, this study proposes a secure and efficient statistical analysis and verifiable data aggregation scheme based on trusted execution environments (TEE). The proposed scheme improves the m and m2 dual-message BGN homomorphic encryption algorithm and integrates digital signatures to ensure data confidentiality and integrity. A verifiable aggregate signature algorithm is introduced to enable batch validation of encrypted data, thus reducing authentication overhead. By shifting the complex statistical analysis of ciphertext data into the TEE, the scheme enhances computational efficiency while reducing processing costs. Moreover, fine-grained statistical analysis is achieved through an access control mechanism based on edge servers that authorize research center access. Performance evaluations indicate that the proposed scheme significantly reduces computational overhead on both the statistical analysis and data owner sides.