File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1595,11 +1595,18 @@ where
1595
1595
#[ cfg( trampoline) ]
1596
1596
msgs:: InboundOnionPayload :: TrampolineEntrypoint ( hop_data) => {
1597
1597
let incoming_trampoline_public_key = hop_data. trampoline_packet . public_key ;
1598
+ let trampoline_blinded_node_id_tweak = hop_data. current_path_key . map ( |bp| {
1599
+ let blinded_tlvs_ss =
1600
+ node_signer. ecdh ( recipient, & bp, None ) . unwrap ( ) . secret_bytes ( ) ;
1601
+ let mut hmac = HmacEngine :: < Sha256 > :: new ( b"blinded_node_id" ) ;
1602
+ hmac. input ( blinded_tlvs_ss. as_ref ( ) ) ;
1603
+ Scalar :: from_be_bytes ( Hmac :: from_engine ( hmac) . to_byte_array ( ) ) . unwrap ( )
1604
+ } ) ;
1598
1605
let trampoline_shared_secret = node_signer
1599
1606
. ecdh (
1600
1607
recipient,
1601
1608
& incoming_trampoline_public_key,
1602
- blinded_node_id_tweak . as_ref ( ) ,
1609
+ trampoline_blinded_node_id_tweak . as_ref ( ) ,
1603
1610
)
1604
1611
. unwrap ( )
1605
1612
. secret_bytes ( ) ;
You can’t perform that action at this time.
0 commit comments