Skip to content

Commit beee9fb

Browse files
committed
Refactor: Introduce ReceiveAuthKey
In the upcoming commit, we introduce the usage of a new `ReceiveAuthKey` that will be used to authenticate message contexts in the received `BlindedMessagePath`s.
1 parent 9285453 commit beee9fb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lightning/src/sign/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,15 @@ pub struct PeerStorageKey {
804804
pub inner: [u8; 32],
805805
}
806806

807+
/// A secret key used to authenticate message contexts in received [`BlindedMessagePath`]s.
808+
///
809+
/// This key ensures that a node only accepts incoming messages delivered through
810+
/// blinded paths that it constructed itself.
811+
///
812+
/// [`BlindedMessagePath`]: crate::blinded_path::message::BlindedMessagePath
813+
#[derive(Clone, Copy, PartialEq, Eq)]
814+
pub struct ReceiveAuthKey(pub [u8; 32]);
815+
807816
/// Specifies the recipient of an invoice.
808817
///
809818
/// This indicates to [`NodeSigner::sign_invoice`] what node secret key should be used to sign

0 commit comments

Comments
 (0)