pub fn verify_sig(&self) -> Result<Commitment, secp::Error> {
		let rsum = self.sum_commitments()?;

		let msg = Message::from_slice(&kernel_sig_msg(self.fee, self.lock_height))?;

		let secp = static_secp_instance();
		let secp = secp.lock().unwrap();
		let sig = Signature::from_der(&secp, &self.excess_sig)?;

		// pretend the sum is a public key (which it is, being of the form r.G) and
		// verify the transaction sig with it
		//
		// we originally converted the commitment to a key_id here (commitment to zero)
		// and then passed the key_id to secp.verify()
		// the secp api no longer allows us to do this so we have wrapped the complexity
		// of generating a public key from a commitment behind verify_from_commit
		secp.verify_from_commit(&msg, &sig, &rsum)?;

		Ok(rsum)
	}
/// The verification for a MimbleWimble transaction involves getting the
/// excess of summing all commitments and using it as a public key
/// to verify the embedded signature. The rational is that if the values
/// sum to zero as they should in r.G + v.H then only k.G the excess
/// of the sum of r.G should be left. And r.G is the definition of a
/// public key generated using r as a private key.
The verification for a MimbleWimble transaction involves getting the
excess of summing all commitments and using it as a public key
to verify the embedded signature. The rational is that if the values
sum to zero as they should in r.G + v.H then only k.G the excess
of the sum of r.G should be left. And r.G is the definition of a
public key generated using r as a private key.
The verification for a MimbleWimble transaction involves getting the excess of summing all commitments and using it as a public key to verify the embedded signature . The rational is that if the values sum to zero as they should in r . G + v . H then only k . G the excess of the sum of r . G should be left . And r . G is the definition of a public key generated using r as a private key .
pub fn verify_sig(&self) -> Result<Commitment, secp::Error> {
		let rsum = self.sum_commitments()?;
		let msg = Message::from_slice(&kernel_sig_msg(self.fee, self.lock_height))?;
		let secp = static_secp_instance();
		let secp = secp.lock().unwrap();
		let sig = Signature::from_der(&secp, &self.excess_sig)?;
		// pretend the sum is a public key (which it is, being of the form r.G) and
		// verify the transaction sig with it
		//
		// we originally converted the commitment to a key_id here (commitment to zero)
		// and then passed the key_id to secp.verify()
		// the secp api no longer allows us to do this so we have wrapped the complexity
		// of generating a public key from a commitment behind verify_from_commit
		secp.verify_from_commit(&msg, &sig, &rsum)?;
		Ok(rsum)
	}
pub fn verify_sig ( & self ) -> Result < Commitment , secp :: Error > { let rsum = self . sum_commitments ( ) ? ; let msg = Message :: from_slice ( & kernel_sig_msg ( self . fee , self . lock_height ) ) ? ; let secp = static_secp_instance ( ) ; let secp = secp . lock ( ) . unwrap ( ) ; let sig = Signature :: from_der ( & secp , & self . excess_sig ) ? ; // pretend the sum is a public key (which it is, being of the form r.G) and // verify the transaction sig with it // // we originally converted the commitment to a key_id here (commitment to zero) // and then passed the key_id to secp.verify() // the secp api no longer allows us to do this so we have wrapped the complexity // of generating a public key from a commitment behind verify_from_commit secp . verify_from_commit ( & msg , & sig , & rsum ) ? ; Ok ( rsum ) }
The verification for a MimbleWimble transaction involves getting the
excess of summing all commitments and using it as a public key
to verify the embedded signature.
The verification for a MimbleWimble transaction involves getting the excess of summing all commitments and using it as a public key to verify the embedded signature .
&self