code: func (m *CredRequest) Check(ipk *IssuerPublicKey) error {
  	Nym := EcpFromProto(m.GetNym())
  	IssuerNonce := m.GetIssuerNonce()
  	ProofC := FP256BN.FromBytes(m.GetProofC())
  	ProofS := FP256BN.FromBytes(m.GetProofS())
  
  	HSk := EcpFromProto(ipk.HSk)
  
  	if Nym == nil || IssuerNonce == nil || ProofC == nil || ProofS == nil {
  		return errors.Errorf("one of the proof values is undefined")
  	}
  
  	// Verify Proof
  
  	// Recompute t-values using s-values
  	t := HSk.Mul(ProofS)
  	t.Sub(Nym.Mul(ProofC)) // t = h_{sk}^s / Nym^C
  
  	// Recompute challenge
  	proofData := make([]byte, len([]byte(credRequestLabel))+3*(2*FieldBytes+1)+2*FieldBytes)
  	index := 0
  	index = appendBytesString(proofData, index, credRequestLabel)
  	index = appendBytesG1(proofData, index, t)
  	index = appendBytesG1(proofData, index, HSk)
  	index = appendBytesG1(proofData, index, Nym)
  	index = appendBytes(proofData, index, IssuerNonce)
  	copy(proofData[index:], ipk.Hash)
  
  	if *ProofC != *HashModOrder(proofData) {
  		return errors.Errorf("zero knowledge proof is invalid")
  	}
  
  	return nil
  }
docs: // Check cryptographically verifies the credential request