File tree 1 file changed +6
-6
lines changed
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 {
38
38
self . 0
39
39
}
40
40
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:
43
44
/// `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.
48
48
pub fn derive_add_tweak( & self , per_commitment_point: & PublicKey ) -> [ u8 ; 32 ] {
49
49
let mut sha = Sha256 :: engine( ) ;
50
50
sha. input( & per_commitment_point. serialize( ) ) ;
You can’t perform that action at this time.
0 commit comments