1

Aside from the fact that HD wallets derive them deterministically, is it correct to state that keys driven at any path or index under BIP32 isn't any different from a private key that's derived randomly in a non-HD wallet?

In other words, its theoretically possible for someone to derive a private key that's at a particular node under your master key in HD wallets, irrespective of how small the probability is, and actually the same probability that there is for generating a private key (non-deterministically) that's already in use by someone else?

Essentially, private key being just a number in a specific range, you can either guess it randomly every single time or have a mechanism of generating random numbers, it essentially means the same thing and is possible to arrive at the same number from either of the ways.

Correct?

2
  • 1
    A private key derived via the HD algorithm is still a usual private key. Does this answer your question?
    – MCCCS
    Commented May 25, 2020 at 11:35
  • @MCCCS Yes, that's what I am looking to confirm. Are Multi-sigs & P2SH any different or they are also usual private keys?
    – Ashfame
    Commented May 25, 2020 at 11:42

1 Answer 1

0

Bitcoin uses ECDSA for signing and verifying. That is, G is a curve parameter (known constant), k is a number, then the public key is kG, etc. The same mechanism is used in different script types too: Multisig scripts and other P2SH scripts. However, note that it is easier to brute-force a P2SH multisig scripts, which is why the Bech32 format P2SH scripts have longer hashes. Similarly, P2SH scripts might not use signature validation at all.

An HD private key can be encoded in the WIF private key format, and any wallet supporting importing private keys would be able to spend its outputs. This doesn't hold true for other address types.

4
  • Sorry, but I am unable to link this additional info to the question I asked. Are Multi-sigs & P2SH usual private keys too? (Y/N) I am still learning about how signing of transactions work.
    – Ashfame
    Commented May 25, 2020 at 15:23
  • A P2SH script may need zero or more private keys. A multisig needs one or more private keys. Those private keys are all of the same type: a large number between 0 and about 2^256.
    – MCCCS
    Commented May 25, 2020 at 15:27
  • m-of-n multisig means there are n public keys. For it to be spendable we need private keys of m of those public keys so sign. So a multisig is like batch verification of signatures made by private keys.
    – MCCCS
    Commented May 25, 2020 at 15:33
  • Gotcha, I think it will make more sense with time as I understand signing of transactions. Thank you! I have an additional related question bitcoin.stackexchange.com/q/96144/82646 Can you take a look?
    – Ashfame
    Commented May 25, 2020 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.