-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These use onion encoding for simple one-way messaging: there are no error returns. However, every onion uses route blinding *even if it doesn't need to*. You can prove what path was used to reach you by including `path_id` in the encrypted_data_tlv. Note that this doesn't actually define the payload we're transporting: that's explictly defined to be payloads in the 64-255 range. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
- Loading branch information
1 parent
03f0c7d
commit 60c6f8a
Showing
4 changed files
with
202 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -387,6 +387,7 @@ CHECKSIGVERIFY | |
IFDUP | ||
sats | ||
anysegwit | ||
onionmsg | ||
griefing | ||
unspendable | ||
pkh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
[ | ||
{ | ||
"test name": "Simple enctlv for Alice, next is Bob", | ||
"node_privkey": "414141414141414141414141414141414141414141414141414141414141414101", | ||
"node_id": "02eec7245d6b7d2ccb30380bfbe2a3648cd7a942653f5aa340edcea1f283686619", | ||
"blinding_secret": "050505050505050505050505050505050505050505050505050505050505050501", | ||
"blinding": "0362c0a046dacce86ddd0343c6d3c7c79c2208ba0d9c9cf24a6d046d21d21f90f7", | ||
"encmsg": { | ||
"next_node_id": "0324653eac434488002cc06bbfb7f10fe18991e35f9fe4302dbea6d2353dc0ab1c" | ||
}, | ||
"ss": "2e83e9bc7821d3f6cec7301fa8493aee407557624fb5745bede9084852430e3f", | ||
"HMAC256('blinded_node_id', ss)": "7d846b3445621d49a665e5698c52141e9dda8fa2fe0c3da7e0f9008ccc588a38", | ||
"blinded_node_id": "02004b5662061e9db495a6ad112b6c4eba228a079e8e304d9df50d61043acbc014", | ||
"E": "0362c0a046dacce86ddd0343c6d3c7c79c2208ba0d9c9cf24a6d046d21d21f90f7", | ||
"H(E || ss)": "bae3d9ea2b06efd1b7b9b49b6cdcaad0e789474a6939ffa54ff5ec9224d5b76c", | ||
"next_e": "76d4de6c329c79623842dcf8f8eaee90c9742df1b5231f5350df4a231d16ebcf01", | ||
"encmsg_hex": "04210324653eac434488002cc06bbfb7f10fe18991e35f9fe4302dbea6d2353dc0ab1c", | ||
"rho": "030ddf4da23c97ada489fbdc4342e701de57f6170e46c66ea6c7585b0933db80", | ||
"enctlv_hex": "6970e870b473ddbc27e3098bfa45bb1aa54f1f637f803d957e6271d8ffeba89da2665d62123763d9b634e30714144a1c165ac9" | ||
}, | ||
{ | ||
"test name": "Blinding-key-override enctlv for Bob, next is Carol", | ||
"node_privkey": "424242424242424242424242424242424242424242424242424242424242424201", | ||
"node_id": "0324653eac434488002cc06bbfb7f10fe18991e35f9fe4302dbea6d2353dc0ab1c", | ||
"blinding_secret": "76d4de6c329c79623842dcf8f8eaee90c9742df1b5231f5350df4a231d16ebcf01", | ||
"blinding": "03fc5e56da97b462744c9a6b0ba9d5b3ffbfb1a08367af9cc6ea5ae03c79a78eec", | ||
"encmsg": { | ||
"next_node_id": "027f31ebc5462c1fdce1b737ecff52d37d75dea43ce11c74d25aa297165faa2007", | ||
"blinding": "070707070707070707070707070707070707070707070707070707070707070701" | ||
}, | ||
"ss": "f18a1ddb1cb27d8fc4faf2cf317e87524fcc6b7f053496d95bf6e6809d09851e", | ||
"HMAC256('blinded_node_id', ss)": "8074773a3745818b0d97dd875023486cc35e7afd95f5e9ec1363f517979e8373", | ||
"blinded_node_id": "026ea8e36f78e038c659beba9229699796127471d9c7a24a0308533371fd63ad48", | ||
"E": "03fc5e56da97b462744c9a6b0ba9d5b3ffbfb1a08367af9cc6ea5ae03c79a78eec", | ||
"H(E || ss)": "9afb8b2ebc174dcf9e270be24771da7796542398d29d4ff6a4e7b6b4b9205cfe", | ||
"next_e": "5149cb0ce6100209f9a2a1140c4e6e8235381aac6201da2c0f8ce1f91bcc3b6e01", | ||
"encmsg_hex": "0421027f31ebc5462c1fdce1b737ecff52d37d75dea43ce11c74d25aa297165faa20070c2102989c0b76cb563971fdc9bef31ec06c3560f3249d6ee9e5d83c57625596e05f6f", | ||
"rho": "46b7af481999101f3d7fb20a87c4d6fb9191b93ddc0f163d00b94fcbc571f564", | ||
"enctlv_hex": "1630da85e8759b8f3b94d74a539c6f0d870a87cf03d4986175865a2985553c997b560c36613bd9184c1a6d41a37027aabdab5433009d8409a1b638eb90373778a05716af2c215b3d31db7b2c2659716e663ba3d9c909" | ||
}, | ||
{ | ||
"test name": "Padded enctlv for Carol, next is Dave", | ||
"node_privkey": "434343434343434343434343434343434343434343434343434343434343434301", | ||
"node_id": "027f31ebc5462c1fdce1b737ecff52d37d75dea43ce11c74d25aa297165faa2007", | ||
"blinding_secret": "070707070707070707070707070707070707070707070707070707070707070701", | ||
"blinding": "02989c0b76cb563971fdc9bef31ec06c3560f3249d6ee9e5d83c57625596e05f6f", | ||
"encmsg": { | ||
"next_node_id": "032c0b7cf95324a07d05398b240174dc0c2be444d96b159aa6c7f7b1e668680991", | ||
"padding": "0000000000000000000000000000000000000000000000000000000000000000000000" | ||
}, | ||
"ss": "8c0f7716da996c4913d720dbf691b559a4945bf70cdd18e0b61e3e42635efc9c", | ||
"HMAC256('blinded_node_id', ss)": "02afb2187075c8af51488242194b44c02624785ccd6fd43b5796c68f3025bf88", | ||
"blinded_node_id": "02f4f524562868a09d5f54fb956ade3fa51ef071d64d923e395cc6db5e290ec67b", | ||
"E": "02989c0b76cb563971fdc9bef31ec06c3560f3249d6ee9e5d83c57625596e05f6f", | ||
"H(E || ss)": "cc3b918cda6b1b049bdbe469c4dd952935e7c1518dd9c7ed0cd2cd5bc2742b82", | ||
"next_e": "306f017c285aac7b613e0f70895b7e4fa5cce9ddaf96f50c613d5dcee847703801", | ||
"encmsg_hex": "012300000000000000000000000000000000000000000000000000000000000000000000000421032c0b7cf95324a07d05398b240174dc0c2be444d96b159aa6c7f7b1e668680991", | ||
"rho": "d6297b5645c27be8ea1240cc96e162c53fd9c389c6bec25cbdb4b6b3f654e7bc", | ||
"enctlv_hex": "8285acbceb37dfb38b877a888900539be656233cd74a55c55344fb068f9d8da365340d21db96fb41b76123207daeafdfb1f571e3fea07a22e10da35f03109a0380b3c69fcbed9c698086671809658761cf65ecbc3c07a2e5" | ||
} | ||
] |