def schnorr_generate_nonce_pair(self, msg, raw=False,<EOL>digest=hashlib.sha256):
if not HAS_SCHNORR:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT>msg32 = _hash32(msg, raw, digest)<EOL>pubnonce = ffi.new('<STR_LIT>')<EOL>privnonce = ffi.new('<STR_LIT>')<EOL>valid = lib.secp256k1_schnorr_generate_nonce_pair(<EOL>self.ctx, pubnonce, privnonce, msg32, self.private_key,<EOL>ffi.NULL, ffi.NULL)<EOL>assert valid == <NUM_LIT:1><EOL>return pubnonce, privnonce<EOL>
Generate a nonce pair deterministically for use with
schnorr_partial_sign.