File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -38,13 +38,13 @@ macro_rules! basepoint_impl {
3838 self . 0
3939 }
4040
41- /// Derives a per-commitment-transaction (eg an htlc key or delayed_payment key) private key addition tweak
42- /// from a basepoint and a per_commitment_point:
41+ /// Derives the "tweak" used in calculate [`Self::from_basepoint`].
42+ ///
43+ /// [`Self::from_basepoint`] calculates a private key as:
4344 /// `privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`
44- /// This calculates the hash part in the tweak derivation process, which is used to ensure
45- /// that each key is unique and cannot be guessed by an external party. It is equivalent
46- /// to the `from_basepoint` method, but without the addition operation, providing just the
47- /// tweak from the hash of the per_commitment_point and the basepoint.
45+ ///
46+ /// This calculates the hash part in the tweak derivation process, which is used to
47+ /// ensure that each key is unique and cannot be guessed by an external party.
4848 pub fn derive_add_tweak( & self , per_commitment_point: & PublicKey ) -> [ u8 ; 32 ] {
4949 let mut sha = Sha256 :: engine( ) ;
5050 sha. input( & per_commitment_point. serialize( ) ) ;
You can’t perform that action at this time.
0 commit comments