Skip to content

Commit 5f14409

Browse files
committed
Update HMAC_INPUT docs to accurately describe legacy reservations
We recently switched to `ReceiveAuthKey`-based blinded path authentication, removing various fields used to authenticate blinded paths from contexts. In doing so we removed no-longer-needed `HMAC_INPUT`s in offer metadata validation, and left a comment noting that previously used values should not be reused. That comment was slightly incorrect as it indicated some kind of "backward compatibility" concern, but of course we broke backwards compatibility when we stopped accepting the previous authentication scheme. Instead, here, we update the comment to note that what we're protecting against is a type confusion attack.
1 parent c9c2867 commit 5f14409

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/offers/signer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const WITH_ENCRYPTED_PAYMENT_ID_HMAC_INPUT: &[u8; 16] = &[4; 16];
4242
// `OffersContext`, but were removed in LDK v0.2 with the introduction of `ReceiveAuthKey`-based
4343
// authentication.
4444
// Their corresponding values (`[5; 16]` and `[7; 16]`) are now reserved and must not
45-
// be reused to preserve backward compatibility.
45+
// be reused to ensure type confusion attacks are impossible.
4646
//
4747
// Reserved HMAC_INPUT values — do not reuse:
4848
//

0 commit comments

Comments
 (0)