docs: public boolean check() {
          // check formalities of IdemixIssuerPublicKey
          if (AttributeNames == null || Hsk == null || HRand == null || HAttrs == null
                  || BarG1 == null || BarG1.is_infinity() || BarG2 == null
                  || HAttrs.length < AttributeNames.length) {
              return false;
          }
  
          for (int i = 0; i < AttributeNames.length; i++) {
              if (HAttrs[i] == null) {
                  return false;
              }
          }
  
          // check proofs
          ECP2 t1 = IdemixUtils.genG2.mul(ProofS);
          ECP t2 = BarG1.mul(ProofS);
  
          t1.add(W.mul(BIG.modneg(ProofC, IdemixUtils.GROUP_ORDER)));
          t2.add(BarG2.mul(BIG.modneg(ProofC, IdemixUtils.GROUP_ORDER)));
  
          // Generating proofData that will contain 3 elements in G1 (of size 2*FIELD_BYTES+1)and 3 elements in G2 (of size 4 * FIELD_BYTES)
          byte[] proofData = new byte[0];
          proofData = IdemixUtils.append(proofData, IdemixUtils.ecpToBytes(t1));
          proofData = IdemixUtils.append(proofData, IdemixUtils.ecpToBytes(t2));
          proofData = IdemixUtils.append(proofData, IdemixUtils.ecpToBytes(IdemixUtils.genG2));
          proofData = IdemixUtils.append(proofData, IdemixUtils.ecpToBytes(BarG1));
          proofData = IdemixUtils.append(proofData, IdemixUtils.ecpToBytes(W));
          proofData = IdemixUtils.append(proofData, IdemixUtils.ecpToBytes(BarG2));
  
          // Hash proofData to hproofdata and compare with proofC
          return Arrays.equals(IdemixUtils.bigToBytes(IdemixUtils.hashModOrder(proofData)), IdemixUtils.bigToBytes(ProofC));
      }