As people are increasingly inclined to use instant messaging software for communication, ensuring the security of messages in group chats has become an urgent issue. Therefore, we propose an identity-based group key distribution scheme based on the national cryptographic algorithm SM9 and provide rigorous security proofs. The proposed scheme has advantages over the ones introduced by Guo et al. and Meng et al. in terms of convenience and compatibility. Additionally, our scheme outperforms the asymmetric group key agreement protocol proposed by Wu et al. at the Eurocrypt in terms of group key management and compatibility. Furthermore, we provide application demonstrations of the proposed scheme in both instant messaging group chats and peer-to-peer communication scenarios, further proving that the proposed scheme outperforms current typical secure group chat implementation methods in terms of communication overhead and key management in instant messaging software.