code: func (cr *CredRequest) Sign(sk handlers.Big, ipk handlers.IssuerPublicKey, nonce []byte) (res []byte, err error) {
  	defer func() {
  		if r := recover(); r != nil {
  			res = nil
  			err = errors.Errorf("failure [%s]", r)
  		}
  	}()
  
  	isk, ok := sk.(*Big)
  	if !ok {
  		return nil, errors.Errorf("invalid user secret key, expected *Big, got [%T]", sk)
  	}
  	iipk, ok := ipk.(*IssuerPublicKey)
  	if !ok {
  		return nil, errors.Errorf("invalid issuer public key, expected *IssuerPublicKey, got [%T]", ipk)
  	}
  	if len(nonce) != cryptolib.FieldBytes {
  		return nil, errors.Errorf("invalid issuer nonce, expected length %d, got %d", cryptolib.FieldBytes, len(nonce))
  	}
  
  	rng := cr.NewRand()
  
  	credRequest := cryptolib.NewCredRequest(
  		isk.E,
  		nonce,
  		iipk.PK,
  		rng)
  
  	return proto.Marshal(credRequest)
  }
docs: // Sign produces an idemix credential request. It takes in input a user secret key and
  // an issuer public key.