public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [bitcoin-dev]  BIP174 PSBT test vector
@ 2022-04-05 22:55 Tobin Harding
  2022-04-05 23:21 ` Achow101
  0 siblings, 1 reply; 3+ messages in thread
From: Tobin Harding @ 2022-04-05 22:55 UTC (permalink / raw)
  To: bitcoin-dev

Hi,

Does anyone have software that successfully parses the extended private key seed
found in the BIP174 test vector? I have been implementing the test vector PSBT
workflow in Rust and have everything working except I can only create the
extended private key from the xpriv, I am unable to use the seed to create it?

BIP174: https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#test-vectors

PSBT workflow in BIP174 starting at the line:

  "The private keys in the tests below are derived from the following master private key:"

xpriv:

  tprv8ZgxMBicQKsPd9TeAdPADNnSyH9SSUUbTVeFszDE23Ki6TBB5nCefAdHkK8Fm3qMQR6sHwA56zqRmKmxnHk37JkiFzvncDqoKmPWubu7hDF

seed:

  cUkG8i1RFfWGWy5ziR11zJ5V4U4W3viSFCfyJmZnvQaUsd1xuF3T

I've tried decoding it as base64 and as base58.

Thanks in advance,
Tobin.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [bitcoin-dev] BIP174 PSBT test vector
  2022-04-05 22:55 [bitcoin-dev] BIP174 PSBT test vector Tobin Harding
@ 2022-04-05 23:21 ` Achow101
  2022-04-06 22:15   ` Tobin Harding
  0 siblings, 1 reply; 3+ messages in thread
From: Achow101 @ 2022-04-05 23:21 UTC (permalink / raw)
  To: me, bitcoin-dev

[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]

The seed is encoded as a WIF private key. Decoding as WIF will result in the 32 byte seed that can be used as specified in BIP 32.

Andrew

-------- Original Message --------
On Apr 5, 2022, 6:55 PM, Tobin Harding via bitcoin-dev wrote:

> Hi,
>
> Does anyone have software that successfully parses the extended private key seed
> found in the BIP174 test vector? I have been implementing the test vector PSBT
> workflow in Rust and have everything working except I can only create the
> extended private key from the xpriv, I am unable to use the seed to create it?
>
> BIP174: https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#test-vectors
>
> PSBT workflow in BIP174 starting at the line:
>
> "The private keys in the tests below are derived from the following master private key:"
>
> xpriv:
>
> tprv8ZgxMBicQKsPd9TeAdPADNnSyH9SSUUbTVeFszDE23Ki6TBB5nCefAdHkK8Fm3qMQR6sHwA56zqRmKmxnHk37JkiFzvncDqoKmPWubu7hDF
>
> seed:
>
> cUkG8i1RFfWGWy5ziR11zJ5V4U4W3viSFCfyJmZnvQaUsd1xuF3T
>
> I've tried decoding it as base64 and as base58.
>
> Thanks in advance,
> Tobin.
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev

[-- Attachment #2: Type: text/html, Size: 1802 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [bitcoin-dev] BIP174 PSBT test vector
  2022-04-05 23:21 ` Achow101
@ 2022-04-06 22:15   ` Tobin Harding
  0 siblings, 0 replies; 3+ messages in thread
From: Tobin Harding @ 2022-04-06 22:15 UTC (permalink / raw)
  To: Achow101; +Cc: bitcoin-dev

On Tue, Apr 05, 2022 at 11:21:17PM +0000, Achow101 wrote:
> The seed is encoded as a WIF private key. Decoding as WIF will result in the 32 byte seed that can be used as specified in BIP 32.

Thanks fro the response Andrew, works as you say!

I am totally _not_ surprised that I was unable to work this out, for future
reference is there anything about those 52 characters from which I should have
been able to tell it is a WIF private key? Why is the seed not just the 32 bytes
of seed data?

Thanks for you time,
Tobin.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-06 22:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 22:55 [bitcoin-dev] BIP174 PSBT test vector Tobin Harding
2022-04-05 23:21 ` Achow101
2022-04-06 22:15   ` Tobin Harding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox