The invention relates to an identity-based anonymous authentication method and system. The method comprises the following steps: a server generates two partial private keys and sends the same to double parties P1 and P2 participating in the authentication respectively, wherein P1 and P2 generate a main authentication code (the formula is described in the specification) and R in an authentication process, and the privacy and reliability of the interactive information between P1 and P2 are ensured by using zero knowledge proof; after the P1 obtains the main authentication code, the P1 generatesa pseudo-address AID, generates a third temporary public key R3, calculates a final authentication code alpha, and sends the authentication information (AID, R, R3, alpha, T) the server, and the server verifies the authentication information and feeds back the authentication information to a user, after the successful completion of three times of handshake, the server can establish secure communication with the user. The identity-based anonymous authentication method and system are suitable for jointly completing identity-based distributed anonymous authentication without exposing the respective partial authentication private keys of the both parties together, the both parties holding the partial private keys must participate in the authentication at the same time, and the complete authentication private key does not need to be restored.