public boolean verify ( ECP nym , IdemixIssuerPublicKey ipk , byte [ ] msg ) { if ( nym == null || ipk == null || msg == null ) { return false ; } ECP t = ipk . getHsk ( ) . mul2 ( proofSSk , ipk . getHRand ( ) , proofSRNym ) ; t . sub ( nym . mul ( proofC ) ) ; // create array for proof data that will contain the sign label, 2 ECPs (each of length 2* FIELD_BYTES + 1), the ipk hash and the message byte [ ] proofData = new byte [ 0 ] ; proofData = IdemixUtils . append ( proofData , NYM_SIGN_LABEL . getBytes ( ) ) ; proofData = IdemixUtils . append ( proofData , IdemixUtils . ecpToBytes ( t ) ) ; proofData = IdemixUtils . append ( proofData , IdemixUtils . ecpToBytes ( nym ) ) ; proofData = IdemixUtils . append ( proofData , ipk . getHash ( ) ) ; proofData = IdemixUtils . append ( proofData , msg ) ; BIG cvalue = IdemixUtils . hashModOrder ( proofData ) ; byte [ ] finalProofData = new byte [ 0 ] ; finalProofData = IdemixUtils . append ( finalProofData , IdemixUtils . bigToBytes ( cvalue ) ) ; finalProofData = IdemixUtils . append ( finalProofData , IdemixUtils . bigToBytes ( nonce ) ) ; byte [ ] hashedProofData = IdemixUtils . bigToBytes ( IdemixUtils . hashModOrder ( finalProofData ) ) ; return Arrays . equals ( IdemixUtils . bigToBytes ( proofC ) , hashedProofData ) ; }
Verify this IdemixPseudonymSignature