Hacker News new | ask | show | jobs
by mappum 4421 days ago
The README for the btcwallet library says that it needs to decrypt the root key every time it needs to derive a new address. With hierarchical deterministic keys, you can derive a public-only key, which lets you derive new public keys without needing to enter the password every time.

This has the benefit of less time for the unencrypted key to be vulnerable in memory and also ease-of-use since it can automatically search the blockchain for keys generated by the user. For application servers this adds a huge layer of security since you can accept money with the private keys fully airgapped.

1 comments

Primary btcwallet dev here.

Where do you see this? In a conformal README or another README for this scala project? Because it is not necessary to derive the root private key to create a new public address. Instead, the next public key can be chained from the previous public key and the chaincode (seed). When pubkeys and addresses are created this way, the private keys are not immediately created, but are recovered the next time the wallet is unlocked. So while this is not an HD wallet (it's essentially the same as Armory's current file format, and there is no hierarchy), it does have some of the same deterministc address chaining properties.

The code for performing this pubkey chaining can be found here: https://github.com/conformal/btcwallet/blob/8795534408b47685....

I think I misunderstood your README: "Unencrypted wallets are unsupported and are never written to disk. This design decision has the consequence of generating new wallets on the fly impossible: a frontend is required to provide a wallet encryption passphrase."