Abstract:
The present invention discloses a method for anonymous entity identification, which comprises the following steps: an entity A transmits an R A  and an I GA  to an entity B; the entity B returns an R B , an I GB  and a TokenBA to the entity A; the entity A sends an R A ′, the R B , the I GA  and the I GB  to a credible third-party TP; the credible third-party TP checks the validity of a first group and a second group according to the I GA  and the I GB ; the credible third-party TP returns an RES GA , an RES GB , and a TokenTA to the entity A, or returns the RES GA , the RES GA , a TokenTA 1  and a TokenTA 2  to the entity A; and the entity A performs a verification after receiving them; the entity A sends a TokenAB to the entity B; and the entity B performs the verification after receiving it. In the present invention, there is no need to send the identity information of the entity to be identified to an opposite terminal, so that anonymous identity identification is realized.

Description:
[0001]    This application is a US National Stage of International Application No. PCT/CN2011/076296, filed on 24 Jun. 2011, designating the United States, and claiming priority from Chinese Patent Application No. 201010546339.3, filed with the Chinese Patent Office on Nov. 12, 2010 and entitled “Method and Device for Anonymous Entity Identification”, which is hereby incorporated by reference in its entirety. 
         [0002]    The present invention relates to a method and device for entity identification, and particularly to a method and device for anonymous entity identification. 
       BACKGROUND OF THE INVENTION 
       [0003]    At present, an entity identification method using an asymmetric password technology involves two scenarios, in one of which there is an on-line trusted third party involving and in the other of which there is no trusted third party involving, where the identity of an identified entity can be verified for legality through entity identification, and at the same time, an identifier can further obtain identity information of the identified entity. However, such a scenario may arise in real life that the identified entity would not like to have its identity information disclosed. For example, when people vote on some sensitive events, e.g., voting on a personnel appointment decision, electronic bidding, etc., anonymous voting is desirable, that is, their own voting opinions are signed without exposing their identities. Thus there is a need of an anonymous entity identification method capable of both identifying the identity of an entity and protecting identity information of the identified entity from being exposed. 
       SUMMARY OF THE INVENTION 
       [0004]    In order to address the foregoing technical problem in the prior art, the invention proposes a method and device for anonymous entity identification. 
         [0005]    A method for anonymous entity identification includes the following steps: 
         [0006]    1) sending, by an entity A, a first message to an entity B, wherein the first message comprises a random number R A  generated by the entity A; 
         [0007]    2) returning, by the entity B, a second message to the entity A after receiving the first message, wherein the second message comprises an identity I GB  of a second group and a token field TokenBA containing a signature of the entity B on a message including a distinguishing identifier GB of the second group and the R A , and the entity B resides in the second group; 
         [0008]    3) sending, by the entity A, a third message to a trusted third party TP after receiving the second message, wherein the third message comprises the I GB ; 
         [0009]    4) checking, by the trusted third party TP, the second group for legality according to the I GB  after receiving the third message; 
         [0010]    5) returning, by the trusted third party TP, a fourth message to the entity A after checking the second group for legality, wherein the fourth message comprises a verification result Res GB  of the second group; and 
         [0011]    6) identifying, by the entity A, identity of the entity B according to the verification result Res GB  in the fourth message and the token field TokenBA after receiving the fourth message and verifying the fourth message for validity. 
         [0012]    The invention further provides an entity device for anonymous entity identification including: 
         [0013]    a first message sending unit configured to send a first message to an entity B, wherein the first message comprises a random number R A  generated by the entity device for anonymous entity identification; 
         [0014]    a second message receiving unit configured to receive a second message returned from the entity B, wherein the second message comprises an identity I GB  of a second group and a token field TokenBA containing a signature of the entity B on a message comprising a distinguishing identifier GB of the second group and the R A , and the entity B resides in the second group; 
         [0015]    a third message sending unit configured to send a third message to a trusted third party TP after receiving the second message, wherein the third message comprises the I GB ; 
         [0016]    a fourth message receiving unit configured to receive a fourth message retuned from the trusted third party TP after checking the second group for legality, wherein the fourth message comprises a verification result Res GB  of the second group; and 
         [0017]    an identifying unit configured to identify identity of the entity B according to the verification result Res GB  in the fourth message and the token field TokenBA after receiving the fourth message and verifying the fourth message for validity. 
         [0018]    The invention further provides another device for anonymous entity identification including: 
         [0019]    a first message receiving unit configured to receive a first message sent by an entity A, wherein the first message comprises a random number R A  generated by the entity A; and 
         [0020]    a second message sending unit configured to return a second message to the entity A after receiving the first message, wherein the second message comprises an identity I GB  of a second group and a token field TokenBA containing a signature of the device for anonymous entity identification on a message comprising a GB and the R A , and the device for anonymous entity identification resides in the second group. 
         [0021]    The invention further provides an device for legality verification including: 
         [0022]    a third message receiving device configured to receive a third message sent by an entity A, wherein the third message comprises an I GB  or the I GB  and an I GA , the I GB  is an identity of a second group, the I GA  is an identity of a first group, and the entity A resides in the first group; 
         [0023]    a legality checking unit configured to check the second group or the second group and the first group for legality according to the I GB  or the I GB  and the I GA  after receiving the third message; and 
         [0024]    a result returning unit configured to return a fourth message to the entity A after checking the second group or the second group and the first group for legality, wherein the fourth message comprises a verification result Res GB  of the second group or verification results Res GB  and Res GA  of the second group and the first group. 
         [0025]    In the invention, an identified entity will not need to send its own identity information to an opposite entity or a trusted third party but will send only identity information of a group where it resides to the opposite entity or the trusted third party for verification, and an verification result will be transmitted to the requested opposite entity. The opposite entity can accomplish the verification on a signature of the identified entity simply through a verification result of the trusted third party on the group where the identified entity resides, to thereby accomplish the identification on the identity of the identified entity. Throughout the identification process, the identity information of the identified entity need not be disclosed and transmitted to the opposite entity, to thereby avoid the identity information of the identified entity from being exposed. The invention defines an anonymous entity identifying mechanism capable of protecting identity information of an identified entity as compared with the traditional entity identifying mechanism. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0026]      FIG. 1  is a schematic diagram of a preferred implementation of a bidirectional method for anonymous entity identification according to the invention; 
           [0027]      FIG. 2  is a schematic diagram of a preferred implementation of a unidirectional method for anonymous entity identification according to the invention; 
           [0028]      FIG. 3  is a structural diagram of an entity device for anonymous entity identification according to an embodiment of the invention; 
           [0029]      FIG. 4  is a structural diagram of another entity device for anonymous entity identification according to an embodiment of the invention; and 
           [0030]      FIG. 5  is a structural diagram of a device for legality verification according to an embodiment of the invention. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0031]    A method according to the invention involves entities including identified entities A and B, a first group and a second group, and a Trusted third Party TP. The entities A and B reside respectively in the first group and the second group as members of the groups where they reside respectively. The Trusted third Party TP is a trusted third party of the entities A and B as well as the first group and the second group, and provides an identification service for the entities. Before being identified, the entities A and B possess their own private keys respectively, the first group and the second group possess their own group public keys respectively, and signatures generated by the entities A and B through using their own private keys can be verified by using the pubic keys of the groups where they reside respectively. 
         [0032]    The following notations are defined for the sake of convenience: 
         [0033]    GA indicates a distinguishing identifier of the first group, GB indicates a distinguishing identifier of the second group, Valid GX  indicates the validity of a certificate Cert GX  of a group GX (X represents A or B, where A refers to the entity A, and B refers to the entity B here and hereinafter); PublicKey GX  is a public key of the group GX; I GX  is an identity of the group GX, which can be the certificate Cert GX  or the distinguishing identifier of the group; Res GX  indicates a verification result of the group GX consisted of the certificate Cert GX  and the validity thereof Valid GX  or consisted of the group GX and the public key thereof PublicKey GX ; Token is a token field; sS Y (M) is a signature of Y on a message M (Y represents A or B or T, where T refers to the trusted third party TP here and hereinafter); and Text is an optional text. 
         [0034]    A method for anonymous entity identification according to an embodiment of the invention includes the following steps: 
         [0035]    1) An entity A sends a first message to an entity B, where the first message includes a random number R A  generated by the entity A; 
         [0036]    2) The entity B returns a second message to the entity A after receiving the first message, where the second message includes an identity I GB  of a second group and a token field TokenBA containing a signature of the entity B on a message including a GB and the R A , and the entity B resides in the second group; 
         [0037]    3) The entity A sends a third message to a trusted third party TP after receiving the second message, where the third message includes the I GB ; 
         [0038]    4) The trusted third party TP checks the second group for legality according to theagainst I GB  after receiving the third message; 
         [0039]    5) The trusted third party TP returns a fourth message to the entity A after checking the second group for legality, where the fourth message includes a verification result Res GB  of the second group; and 
         [0040]    6) The entity A identifies the identity of the entity B according to the verification result Res GB  in the fourth message and the token field TokenBA after receiving the fourth message and verifying the fourth message for validity. 
         [0041]    In the embodiment of the invention, it is firstly determined whether the fourth message is valid, that is, whether the identity of the trusted third party sending the fourth message is legal and whether the contents of the message are correct, and in the case that the fourth message is determined to be valid, it can be determined whether the identity of the second group is legal according to the verification result Res GB  in the fourth message, so that the verification on the signature of the identified entity can be accomplished simply through the verification result of the trusted third party on the group where the identified entity resides, to thereby accomplish the identification on the identity of the identified entity. Throughout the identification process, the identity information of the identified entity need not be disclosed and transmitted to the opposite entity, to thereby avoid the identity information of the identified entity from being exposed. The embodiment of the invention defines an anonymous entity identifying mechanism capable of protecting identity information of an identified entity as compared with the traditional entity identifying mechanism. 
         [0042]    In the step 6), the identity of the entity B is identified according to the verification result Res GB  in the fourth message and the token field TokenBA preferably as follows: 
         [0043]    6.2) The entity A obtains the verification result Res GB  of the second group, and if the second group is determined to be legal and valid according to the Res GB , then the entity A performs the step 6.3); otherwise, the entity A finishes the identity identification of the entity B, that is, the entity A determines that the identity of the entity B is illegal; and 
         [0044]    6.3) The entity A obtains a public key PublicKey GB  of the second group, verifies the signature of the entity B in the TokenBA in the second message and checks whether the random number R A  in the first message is consistent with the random number R A  contained in the signature of the entity B in the TokenBA to thereby finish the identity identification of the entity B, for example, when the signature of the entity B is correct and the R A  in the first message is consistent with the R A  contained in the signature of the entity B, the entity A determines that the identity of the entity B is legal; otherwise, the entity A determines that the identity of the entity B is illegal. 
         [0045]    Preferably in this embodiment, the entity A verifies the fourth message for validity as follows: 
         [0046]    The third message further includes a random number R′ A  regenerated by the entity A, where the R′ A  may be the same as or different from the R A , and the fourth message further includes a token field TokenTA containing a signature of TP on a message including the R′ A  and the Res GB , and in the step 6), the process of verifying the fourth message for validity includes: 
         [0047]    6.1) The entity A verifies the signature of the trusted third party TP in the TokenTA in the fourth message, and when the signature is valid, the entity A checks the R′ A  generated by the entity A in the third message is consistent with R′ A  contained in the signature of the trusted third party TP in the TokenTA, and if they are consistent, then the entity A determines that the fourth message is valid and performs the step 6.2); otherwise, the entity A determines that the identification fails. 
         [0048]    In the foregoing embodiment of the invention, one entity identifies another entity, and preferably some messages and flows can be added to the messages in the foregoing embodiment to thereby accomplish mutual identity identification between the two entities, and in a mechanism of further identifying the identity of the entity A by the entity B in the embodiment of the invention, an identity I GA  of a first group is added to the first message sent by the entity A to the entity B, the I GA  is added to the third message sent by the entity A to the trusted third party TP, and in the step 4), the trusted third party TP further checks the first group for legality according to the I GA  after receiving the third message and adds a verification result Res GA  of the first group by TP to the fourth message sent to the entity A. 
         [0049]    Then after the step 6), in order to accomplish the identity identification of the entity B on the entity A, the method further includes: 
         [0050]    7) The entity A sends a fifth message to the entity B, where the fifth message includes a token field TokenAB containing the Res GA  and a signature of the entity A on a message including the GA, the R A  and the GB; or the third message sent by the entity A to the trusted third party TP includes the random number R′ A  regenerated by the entity A, and the TokenAB includes the R′ A , the Res GB , the Res GA  and a signature of the entity A on a message including the GA, the R A  and the GB, and the entity A resides in the first group; and 
         [0051]    8) The entity B identifies the identity of the entity A according to the token field TokenAB in the fifth message after receiving the fifth message and verifying the fifth message for validity. 
         [0052]    Preferably in the step 8), the entity B identifies the identity of the entity A according to the token field TokenAB in the fifth message particularly as follows: 
         [0053]    8.2) The entity B obtains the Res GA , and if the first group is determined to be legal and valid according to the Res GA , then the entity B performs the step 8.3); otherwise, the entity B finishes the identification of the entity A; and 
         [0054]    8.3) The entity B obtains a public key of the first group, verifies the signature of the entity A in the TokenAB and checks whether the distinguishing identifier GB of the second group is consistent with the GB included contained in the signature data of the entity A in the TokenAB to thereby finish the identity identification of the entity A. 
         [0055]    The entity B can verify the fifth message for validity particularly in the following mechanism: the second message sent by the entity B to the entity A further includes a random number R B  generated by the entity B, the third message sent by the entity A to the trusted third party TP includes the R B  and the random number R′ A  regenerated by the entity A, and the fourth message sent by the trusted third party TP to the entity A includes a TokenTA or includes a TokenTA 1  and a TokenTA 2 , wherein the TokenTA includes a signature of the trusted third party TP on a message including the R′ A , the R B , the Res GB  and the Res GA , the TokenTA 1  includes a signature of the trusted third party TP on a message including the R′ A  and the Res GB , and the TokenTA 2  includes a signature of the trusted third party TP on a message including the R B  and the Res GA ; and the entity B receives the fifth message and verifies the fifth message for validity particularly as follows: 
         [0056]    8.1) The entity B verifies the signature of the trusted third party TP contained in the TokenTA or the TokenTA 2  in the TokenAB and checks whether the R B  generated by the entity B in the second message is consistent with the R B  contained in the signature of the trusted third party TP in the TokenTA or the TokenTA 2 , and if they are consistent, then the entity B determines that the fifth message is valid. 
         [0057]    Preferably, the TokenAB includes the Res GA , the TokenTA 2  and a signature of the entity A on a message including the GA, the R A , the GB, the R B  and the TokenTA 2 ; or the TokenAB includes the R′ A , the Res GB , the Res GA , the TokenTA and a signature of the entity A on a message including the GA, the R A , the GB, the R B  and the TokenTA, and in the step 8.3), after the entity B verifies the signature of the entity A in the TokenAB, the method further includes: 
         [0058]    The entity B checks whether the R B  in the second message is consistent with the R B  contained in the signature of the entity A in the TokenAB. 
         [0059]    Preferably in the step 4), the trusted third party TP checks the second group or the first group and the second group for legality particularly as follows: 
         [0060]    In the third message, if the I GA  is the distinguishing identifier GA of the first group, then TP searches for a valid public key PublicKey GA  of the first group; and if the I GA  is a certificate Cert GA  of the first group, then TP checks the certificate Cert GA  for validity Valid GA ; and 
         [0061]    If the I GB  is the distinguishing identifier GB of the second group, then TP searches for a valid public key PublicKey GB  of the second group; and if the I GB  is a certificate Cert GB  of the second group, then TP checks the certificate Cert GB  for validity Valid GB . 
         [0062]    The above random numbers R A , R′ A  and R B  are replaced with time labels or sequence numbers. The first message, the third message and the fourth message further include optional texts respectively. 
         [0063]    Preferred embodiments of the invention will be given below with reference to the drawings. 
         [0064]    Referring to  FIG. 1 , a specific flow of bidirectional identification between an entity A and an entity B is as follows: 
         [0065]    1) The entity A sends a first message to the entity B, where the first message includes a random number R A  generated by the entity A, an identity I GA  of a first group and an optional text Text 1 . 
         [0066]    2) The entity B returns a second message to the entity A after receiving the first message, where the second message includes a random number R B  generated by the entity B, an identity I GB  of a second group and a token field TokenBA containing a signature of the entity B on a message including a GB, the R B , a GA and the R A , and particularly, the entity B generates the signature by its own private key. 
         [0067]    3) The entity A sends a third message to a trusted third party TP after receiving the second message, where the third message includes a random number R′ A  regenerated by the entity A, the R B , the identity I GA  of the first group, the identity I GB  of the second group and an optional text Text 4 . 
         [0068]    4) The trusted third party TP checks the first group and the second group for legality according to the identities I GA  and I GB  after receiving the third message. 
         [0069]    The trusted third party TP checks the first group and the second group for legality particularly in the following several approaches: 
         [0070]    In the third message, if the identifier I GA  of the first group is the distinguishing identifier GA of the first group, then the trusted third party TP searches for a valid public key PublicKey GA  of the first group; and if the identifier I GA  of the first group is a certificate Cert GA  of the first group, then the trusted third party TP checks the certificate Cert GA  for validity Valid GA ; and if the Cert GA  is determined to be valid, then the first group is determined to be legal; otherwise, the first group is determined to be illegal; and if the identifier I GB  of the second group is the distinguishing identifier GB of the second group, then the trusted third party TP searches for a valid public key PublicKey GB  of the second group corresponding to the GB; and if the identifier I GB  of the second group is a certificate Cert GB  of the second group, then the trusted third party TP checks the certificate Cert GB  for validity Valid GB ; and if the Valid GB  is valid, then the second group is determined to be legal; otherwise, the second group is determined to be illegal. 
         [0071]    5) The trusted third party TP returns a fourth message to the entity A after checking the first group and the second group for legality, where the fourth message includes group verification results Res GA  and Res GB , a token field TokenTA and an optional text Text 7  or includes group verification results Res GA  and Res GB , token fields TokenTA 1  and TokenTA 2  and an optional text Text 7 , wherein the TokenTA includes a signature of the trusted third party TP using its own private key on a message including the R′ A , the R B , the Res GB  and the Res GA , the TokenTA 1  includes a signature of the trusted third party TP using its own private key on a message including the R′ A  and the Res GB , and the TokenTA 2  includes a signature of the trusted third party TP using its own private key on a message including the R B  and the Res GA . 
         [0072]    6) The entity A verifies the fourth message after receiving the fourth message. The verification process is as follows: 
         [0073]    6.1) The entity A verifies the signature of the trusted third party TP in the TokenTA or the TokenTA 1  in the fourth message using a public key of the TP and checks whether the random number R′ A  generated by the entity A in the third message is consistent with the random number R′ A  contained in the signature of the trusted third party TP in the TokenTA or the TokenTA 1 , and if the verification passes, that is, the signature of the trusted third party TP is correct and R′ A s are consistent, then the entity A performs the step 6.2); otherwise, the entity A determines that the identification fails; 
         [0074]    6.2) The entity A obtains the verification result Res GB  of the second group from the fourth message, and if the second group is determined to be legal and valid according to the Res GB , then the entity A performs the step 6.3); otherwise, the entity A finishes the identification of the entity B, that is, the entity A determines that the identity of the entity B is illegal; and 
         [0075]    6.3) The entity A obtains the public key of the second group, verifies the signature of the entity B in the token TokenBA in the second message by using the obtained public key and checks whether the distinguishing identifier GA of the first group is consistent with the distinguishing identifier GA of the first group contained in the signature of the entity B in the TokenBA, and checks whether the random number R A  generated by the entity A in the first message is consistent with the random number R A  contained in the signature of the entity B in the TokenBA, and if the verification passes, that is, the signature of the entity B is correct, GAs are consistent and R A s are consistent, then the entity A determines that the identity of the entity B is legal; otherwise, the entity A determines that the identity of the entity B is illegal, so that the entity A finishes the identification of the entity B and performs the step 7). 
         [0076]    7) The entity A sends a fifth message to the entity B, where the fifth message includes a token TokenAB. The TokenAB contains the Res GA , the TokenTA 2  and a signature of the entity A on a message including the GA, the R A , the GB, the R B  and the TokenTA 2  or contains the R′ A , the Res GB , the Res GA , the TokenTA and a signature of the entity A on a message including the GA, the R A , the GB, the R B  and the TokenTA. 
         [0077]    8) The entity B verifies the fifth message after receiving the fifth message. The verification process is as follows: 
         [0078]    8.1) The entity B verifies the signature of the trusted third party TP contained in the TokenTA or the TokenTA 2  in the TokenAB by using the public key of TP and checks whether the random number R B  generated by the entity B in the second message is consistent with the random number R B  contained in the signature of the trusted third party TP in the TokenTA or the TokenTA 2 , and if the verification passes, that is, the signature of the trusted third party TP is correct and R B s are consistent, then the entity B performs the step 8.2); 
         [0079]    8.2) The entity B obtains the verification result Res GA  of the first group, and if the first group is determined to be legal and valid according to the Res GA , then the entity B performs the step 8.3); otherwise, the entity B finishes the identification of the entity A, that is, the entity B determines that the entity A is illegal; and 
         [0080]    8.3) The entity B obtains the public key of the first group, verifies the signature of the entity A in the TokenAB and checks whether the distinguishing identifier GB of the second group is consistent with the distinguishing identifier GB of the second group contained in the signature of the entity A in the TokenAB, and checks whether the random number R B  generated by the entity B in the second message is consistent with the random number R B  contained in the signature of the entity A in the TokenAB, and if the verification passes, that is, the signature of the entity A is correct, distinguishing identifiers are consistent and R B s are consistent, then the entity B determines that the entity A is legal; otherwise, the entity B determines that the entity A is illegal, so that the entity B finishes the identification of the entity A. 
         [0081]    Particularly, the random numbers R A , R′ A  and R B  can be replaced with time labels or sequence numbers. 
         [0082]    With the foregoing anonymous bidirectional identification process between the entity A and the entity B, bidirectional identity legality identification between the two entities can be accomplished and the identity information of the two entities can be protected from being exposed. 
         [0083]    Furthermore, the invention further provides preferred embodiments of definitions of token fields in accordance with the foregoing bidirectional identification process: 
         [0084]    1) Definition 1 
         [0085]    TokenBA=Text 3 ∥sS B (GB∥R B ∥GA∥R A ∥Text 2 ) 
         [0086]    TokenTA 1 =sS T (R′ A ∥Res GB ∥Text 6 ) 
         [0087]    TokenTA 2 =sS T (R B ∥Res GA ∥Text 5 ) 
         [0088]    TokenAB=Res GA ∥Text 9 ∥TokenTA 2 ∥sS A (GA∥R A ∥GB∥R B ∥TokenTA 2 ∥Text 8 ) 
         [0089]    2) Definition 2 
         [0090]    TokenBA=Text 3 ∥sS B (GB∥R B ∥GA∥R A ∥Text 2 ) 
         [0091]    TokenTA=sS T (R′ A ∥R B ∥Res GB ∥Res GA ∥Text 5 ) 
         [0092]    TokenAB=R′ A ∥Text 9 ∥Res GB ∥Res GA ∥TokenTA∥sS A (GA∥R A ∥GB∥R B ∥TokenTA∥Text 8 ) 
         [0093]    Wherein “X∥Y” indicates a result of splicing sequentially a data item X and a data item Y in that order. 
         [0094]    In a practical application, sometimes only unidirectional identification of the entity A on the entity B is required to be accomplished, and at this time the method according to the foregoing embodiment can be modified by omitting the steps 7) and 8) and simplifying the contents of the first message to the fourth message to accomplish unidirectional identification of the entity A on the entity B, and the modified identification flow is as illustrated in  FIG. 2  and described as follows: 
         [0095]    1) The entity A sends a first message to the entity B, where the first message includes a random number R A  generated by the entity A and an optional text Text 1 . 
         [0096]    2) The entity B returns a second message to the entity A after receiving the first message, where the second message includes an identity I GB  of a second group and a token TokenBA, wherein a preferred embodiment of the TokenBA is TokenBA=Text 3 ∥sS B (GB∥R A ∥Text 2 ), and in another embodiment, the TokenBA includes at least a signature of the entity B on a message including a GB and the R A . 
         [0097]    3) The entity A sends a third message to a trusted third party TP after receiving the second message, where the third message includes a random number R′ A , the identity I GB  and an optional text Text 4 . 
         [0098]    4) The trusted third party TP checks the second group for legality according to the identity I GB  after receiving the third message. 
         [0099]    The trusted third party TP checks the second group for legality particularly in the following several approaches: 
         [0100]    In the third message, if the identity I GB  of the second group is a distinguishing identifier GB of the second group, then the trusted third party TP searches for a valid public key PublicKey GB  of the second group; and if the identity I GB  of the second group is a certificate Cert GB  of the second group, then the trusted third party TP checks the certificate Cert GB  for validity Valid GB . 
         [0101]    5) The trusted third party TP returns a fourth message to the entity A after checking the second group for legality, where the fourth message includes a verification result Res GB  of the second group, a token TokenTA and an optional text Text 6 , wherein a preferred embodiment of the TokenTA is TokenTA=sS T (R′ A ∥Res GB ∥Text 5 ), and in another embodiment, the TokenTA includes at least a signature of the trusted third party TP on a message including the R′ A  and the ReS GB . 
         [0102]    6) The entity A verifies the fourth message after receiving the fourth message. The verification process is as follows: 
         [0103]    6.1) The entity A verifies the signature of the trusted third party TP in the TokenTA in the fourth message and checks whether the random number R′ A  generated by the entity A in the third message is consistent with the random number R′ A  contained in the signature of the trusted third party TP in the TokenTA, and if the verification passes, then the entity A performs the step 6.2); 
         [0104]    6.2) The entity A obtains the verification result Res GB  of the second group, and if the second group is determined to be legal and valid according to the Res GB , then the entity A performs the step 6.3); otherwise, the entity A finishes the identification of the entity B; and 
         [0105]    6.3) The entity A obtains the public key PublicKey GB  of the second group, verifies the signature of the entity B in the token TokenBA in the second message and checks whether the random number R A  generated by the entity A in the first message is consistent with the random number R A  contained in the signature of the entity B in the TokenBA, and if the verification passes, the entity A finishes the identification of the entity B. 
         [0106]    The presence and contents of the arisen optional texts Text 1 , Text 2 , Text 3 , . . . , in the foregoing embodiments are indeterminate in view of the possibility for implementers to define contents of the optional texts by themselves as their specific requirements, to achieve the purpose of extending the optional texts, and thus the optional texts may be omitted in other embodiments. 
         [0107]    Based upon the same inventive idea, embodiments of the invention further provide two entity devices for anonymous entity identification and a device for legality verification, and since these devices address the problem under a similar principle to that of the method for anonymous entity identification, reference can be made to the implementations of the methods for implementations thereof, and a repeated description will be omitted here. 
         [0108]    An entity device for anonymous entity identification according to an embodiment of the invention, as illustrated in  FIG. 3 , includes: 
         [0109]    A first message sending unit  301  configured to send a first message to an entity B, where the first message includes a random number R A  generated by the entity device for anonymous entity identification (entity A); 
         [0110]    A second message receiving unit  302  configured to receive a second message returned from the entity B, where the second message includes an identity I GB  of a second group and a token field TokenBA containing a signature of the entity B on a message including a distinguishing identifier GB of the second group and the R A , and the entity B resides in the second group; 
         [0111]    A third message sending unit  303  configured to send a third message to a trusted third party TP after receiving the second message, wherein the third message comprises the I GB ; 
         [0112]    A fourth message receiving unit  304  configured to receive a fourth message retuned from the trusted third party TP after checking the second group for legality, wherein the fourth message comprises a verification result Res GB  of the second group; and 
         [0113]    An identifying unit  305  configured to identify identity of the entity B according to the verification result Res GB  in the fourth message and the token field TokenBA after receiving the fourth message and verifying the fourth message for validity. 
         [0114]    Preferably, the identifying unit  305  is configured to identify the identity of the entity B according to the verification result Res GB  in the fourth message and the token field TokenBA, which is specifically configured: 
         [0115]    6.2) To obtain the verification result Res GB  of the second group, and if the second group is determined to be legal and valid according to the Res GB , then to perform step  6 . 3 ); otherwise, to finish the identity identification of the entity B; and 
         [0116]    6.3) To obtain a public key PublicKey GB  of the second group, to verify the signature of the entity B in the TokenBA in the second message and to check whether the random number R A  in the first message is consistent with the random number R A  contained in the signature of the entity B in the TokenBA to thereby finish the identity identification of the entity B. 
         [0117]    Preferably, the third message further comprises a random number R′ A  regenerated by the device for anonymous entity identification, the fourth message further comprises a token field TokenTA containing a signature of the TP on a message comprising the R′ A  and the Res GB , and the process of verifying the fourth message for validity by the identifying unit  305  includes: 
         [0118]    6.1) The entity A verifies the signature of the trusted third party TP in the TokenTA in the fourth message, and when the signature is valid, the entity A checks whether the random number R′ A  generated by the entity device for anonymous entity identification in the third message is consistent with a random number R′ A  contained in the signature of the trusted third party TP in the TokenTA, and if they are consistent, then the entity A determines that the fourth message is valid. 
         [0119]    Preferably, the first message further specifically comprises an identity I GA  of the device for anonymous entity identification which resides in a first group, the third message further includes the I GA , and in the step 4), the TP further checks the first group for legality according to the I GA  after receiving the third message, the fourth message further comprises a verification result Res GA  of the first group, and the device further comprises: 
         [0120]    A fifth message sending unit  306  configured to send a fifth message to the entity B, wherein the fifth message comprises a token field TokenAB containing the Res GA  and a signature of the device for anonymous entity identification on a message comprising a GA, the R A  and the GB; or the third message comprises a random number R′ A  regenerated by the device for anonymous entity identification, the TokenAB comprises the R′ A , the Res GB , the Res GA , the TokenTA and a signature of the device for anonymous entity identification on a message comprising the GA, the R A  and the GB. 
         [0121]    An embodiment of the invention further provides another device for anonymous entity identification (an entity B) as illustrated in  FIG. 4 , which includes: 
         [0122]    A first message receiving unit  401  configured to receive a first message sent by an entity A, wherein the first message comprises a random number R A  generated by the entity A; and 
         [0123]    A second message sending unit  402  configured to return a second message to the entity A after receiving the first message, wherein the second message comprises an identity I GB  of a second group and a token field TokenBA containing a signature of the device for anonymous entity identification on a message comprising a GB and the R A , and the device for anonymous entity identification resides in the second group. 
         [0124]    Preferably, the first message further specifically comprises an identity I GA  of a first group in which the entity A resides, and the device further comprises: 
         [0125]    A fifth message receiving unit  403  configured to receive a fifth message sent by the entity A, wherein the fifth message comprises a token field TokenAB containing a Res GA  and a signature of the entity A on a message comprising a GA, the R A  and the GB; or the third message comprises a random number R′ A  regenerated by the entity A, and the TokenAB comprises the R′ A , a Res GB , the Res GA  and a signature of the entity A on a message comprising the GA, the R A  and the GB, wherein the Res GA  is a verification result of the first group by a trusted third party TP, and the Res GB  is a verification result of the second group by the trusted third party TP; and 
         [0126]    An identifying unit  404  configured to identify identity of the entity A according to the token field TokenAB in the fifth message after receiving the fifth message and verifying the fifth message for validity. 
         [0127]    Preferably, the identifying unit  404  is configured to identify the identity of the entity A according to the token field TokenAB in the fifth message, which is specifically configured: 
         [0128]    8.2) To obtain the Res GA , and if the first group is determined to be legal and valid according to the Res GA , then to perform step 8.3); otherwise, to finish the identification of the entity A; and 
         [0129]    8.3) To obtain a public key of the first group, to verify the signature of the entity A in the TokenAB and to check whether the distinguishing identifier GB of the second group is consistent with the GB contained in the signature data of the entity A in the TokenAB to thereby finish the identity identification of the entity A. 
         [0130]    Preferably, the second message further comprises a random number R B  generated by the device for anonymous entity identification, and the fifth message further comprises a TokenTA 2  or a TokenTA, wherein the TokenTA 2  comprises a signature of the trusted third party TP on a message comprising the R B  and the Res GA , the TokenTA comprises a signature of the trusted third party TP on a message comprising the R′ A , the R B , the Res GB  and the Res GA , the R′ A  is a random number regenerated by the entity A when sending the third message to TP, and the identifying unit  404  is configured to verify the fifth message for validity, which is specifically configured: 
         [0131]    8.1) To verify the signature of the trusted third party TP contained in the TokenTA or the TokenTA 2  in the TokenAB and to check whether the R B  generated by the device for anonymous entity identification in the second message is consistent with the R B  contained in the signature of the trusted third party TP in the TokenTA or the TokenTA 2 , and if they are consistent, to determine that the fifth message is valid. 
         [0132]    Preferably, the TokenAB comprises the Res GA , the TokenTA 2  and a signature of the entity A on a message comprising the GA, the R A , the GB, the R B  and the TokenTA 2 ; or the TokenAB comprises the R′ A , the Res GB , the Res GA , the TokenTA and a signature of the entity A on a message comprising the GA, the R A , the GB, the R B  and the TokenTA, and after verifying the signature of the entity A in the TokenAB, the identifying unit  404  is further configured: 
         [0133]    To check whether the R B  in the second message is consistent with the R B  contained in the signature of the entity A in the TokenAB. 
         [0134]    An embodiment of the invention further provides a device for legality verification as a trusted third party as illustrated in  FIG. 5 , which includes: 
         [0135]    A third message receiving device  501  configured to receive a third message sent by an entity A, wherein the third message comprises an I GB  or the I GB  and an I GA , the I GB  is an identity of a second group, the I GA  is an identity of a first group, and the entity A resides in the first group; 
         [0136]    A legality checking unit  502  configured to check the second group or the second group and the first group for legality according to the I GB  or the I GB  and the I GA  after receiving the third message; and 
         [0137]    A result returning unit  503  configured to return a fourth message to the entity A after checking the second group or the second group and the first group for legality, wherein the fourth message comprises a verification result Res GB  of the second group or verification results Res GB  and Res GA  of the second group and the first group. 
         [0138]    Preferably, the legality checking unit  502  is configured to check the second group or the second group and the first group for legality, which is specifically configured: 
         [0139]    In the third message, if the I GA  is a distinguishing identifier GA of the first group, to search for a valid public key PublicKey GA  of the first group; and if the I GA  is a certificate Cert GA  of the first group, to check the certificate Cert GA  for validity Valid GA ; and 
         [0140]    If the I GB  is a distinguishing identifier GB of the second group, to search for a valid public key PublicKey GB  of the second group; and if the I GB  is a certificate Cert GB  of the second group, to check the certificate Cert GB  for validity Valid GB . 
         [0141]    Preferably, the fourth message returned from the result returning unit  503  includes TokenTA or includes TokenTA 1  and TokenTA 2 , where TokenTA includes a TokenTA or comprises a TokenTA 1  and a TokenTA 2 , wherein the TokenTA comprises a signature of the device on a message comprising an R′ A , an R B , the Res GB  and the Res GA , the TokenTA 1  comprises a signature of the device on a message comprising the R′ A  and the Res GB , and the TokenTA 2  comprises a signature of the device on a message comprising the R B  and the Res GA . 
         [0142]    Although the preferred embodiments of the invention have been described, those skilled in the art benefiting from the essential inventive concept can make additional modifications and variations to these embodiments. Therefore the appended claims are intended to be construed as encompassing the preferred embodiments and all the modifications and variations coming into the scope of the invention. 
         [0143]    Evidently those skilled in the art can make various modifications and variations to the embodiments of the invention without departing from the spirit and scope of the embodiments of the invention. Thus the invention is also intended to encompass these modifications and variations thereto so long as these modifications and variations to the embodiments of the invention come into the scope of the claims appended to the invention and their equivalents.