File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1595,11 +1595,18 @@ where
15951595 #[ cfg( trampoline) ]
15961596 msgs:: InboundOnionPayload :: TrampolineEntrypoint ( hop_data) => {
15971597 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+ } ) ;
15981605 let trampoline_shared_secret = node_signer
15991606 . ecdh (
16001607 recipient,
16011608 & incoming_trampoline_public_key,
1602- blinded_node_id_tweak . as_ref ( ) ,
1609+ trampoline_blinded_node_id_tweak . as_ref ( ) ,
16031610 )
16041611 . unwrap ( )
16051612 . secret_bytes ( ) ;
You can’t perform that action at this time.
0 commit comments