From 6e6a04111eace164e0932bcd26b5498a20e09599 Mon Sep 17 00:00:00 2001 From: Anynomouss <85170856+Anynomouss@users.noreply.github.com> Date: Thu, 9 Oct 2025 12:29:47 +0200 Subject: [PATCH 1/2] Update 0015-slatepack.md - doc fix to address mimblewimble/grin-wallet#663 I took better and more explicit documentation on SlatepackAddress key derivation from parts of grin's cod base to make this RFC more clear to readers and in line with the current implementation in grin-wallet. This PR addresses the following GitHub issue: https://github.com/mimblewimble/grin-wallet/issues/663 --- text/0015-slatepack.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/text/0015-slatepack.md b/text/0015-slatepack.md index 831a061..7cf548a 100644 --- a/text/0015-slatepack.md +++ b/text/0015-slatepack.md @@ -78,9 +78,15 @@ ed25519 keys are bech32 encoded as `SlatepackAddresses` rather than x25519 keys #### Key Generation -Keys used in `SlatepackAddresses` are derived from a path from the master seed in a given wallet account. Currently the wallet uses separate derivation paths: one for the private bytes used for the blinding factor keys and one for the private bytes used to derive the ed25519 keys used to derive Tor onion addresses. ed25519 keys used for a `SlatepackAddress` are derived from this second derivation path of the master seed. +Keys used in `SlatepackAddresses` are derived from a path from the master seed in a given wallet account. Currently the wallet uses separate derivation paths: one for the private bytes used for the blinding factor keys and one for the private bytes used to derive the ed25519 keys used to derive Tor onion addresses. ed25519 keys used for a `SlatepackAddress` are derived from this second derivation path of the master seed. +Find below an example of ouptput and key derivation. -`SlatepackAddress` keys may be derived in parallel to the blinding factor derivation path such that a unique `SlatepackAddress` is derived each time a new blinding factor is derived for a transaction to satisfy the requirement for a unique `SlatepackAddress` to be used for each transaction by default. +|Account|OutputKeys |SlatepackAddress key(s)| +|-------|------------|----------------------| +|m/0 | m/0/1/x |m/0/1/x | +|m/1 | m/1/1/x |m/1/1/x | + +In _grin-wallet_ the x for slatepack address generation is currently fixed (`x=0`) per account. `SlatepackAddress` keys may be derived in parallel to the blinding factor derivation path such that a unique `SlatepackAddress` is derived each time a new blinding factor is derived for a transaction to satisfy the requirement for a unique `SlatepackAddress` to be used for each transaction by default. In a future update it may be desirable to encode the derivation path for the `SlatepackAddress` for a given encrypted `SlatepackMessage` somewhere so that the x25519 decryption keys can be derived without grinding down the path to find the right key to use. From ed420d6d55e8bf574bf04e0f764b555241cc1e9b Mon Sep 17 00:00:00 2001 From: Anynomouss <85170856+Anynomouss@users.noreply.github.com> Date: Fri, 29 May 2026 16:58:08 +0200 Subject: [PATCH 2/2] Update 0015-slatepack.md Fixing my sloppy edit. |Account|OutputKeys |SlatepackAddress key(s)| |-------|------------|----------------------| |m/0 | m/0/0/x |m/0/1/x | |m/1 | m/1/0/x |m/1/1/x | --- text/0015-slatepack.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/text/0015-slatepack.md b/text/0015-slatepack.md index 7cf548a..cee6220 100644 --- a/text/0015-slatepack.md +++ b/text/0015-slatepack.md @@ -83,8 +83,8 @@ Find below an example of ouptput and key derivation. |Account|OutputKeys |SlatepackAddress key(s)| |-------|------------|----------------------| -|m/0 | m/0/1/x |m/0/1/x | -|m/1 | m/1/1/x |m/1/1/x | +|m/0 | m/0/0/x |m/0/1/x | +|m/1 | m/1/0/x |m/1/1/x | In _grin-wallet_ the x for slatepack address generation is currently fixed (`x=0`) per account. `SlatepackAddress` keys may be derived in parallel to the blinding factor derivation path such that a unique `SlatepackAddress` is derived each time a new blinding factor is derived for a transaction to satisfy the requirement for a unique `SlatepackAddress` to be used for each transaction by default.