user10390: I woud like to obtain an extended public key of a derivation path (m/84'/0'/0').
I'm using btclib, and I have the xpub of the root account.
When I try to use bip32.derive("xpub...","m/84'/0'/0'")
I get btclib.exceptions.BTClibValueError: invalid hardened derivation from public key
What am I doing wrong ?

user3667: Review BIP32:

The fact that they are equivalent is what makes non-hardened keys
useful (one can derive child public keys of a given parent key without
knowing any private key), and also what distinguishes them from
hardened keys. The reason for not always using non-hardened keys
(which are more useful) is security; see further for more information.

That little apostrophe ' means that branch of the key derivation tree is "hardened" -- and THAT means that you must have the private key to derive its child keys.
So if you have the PRIVATE key for m/84'/0'/0' you can generate child keys for example m/84'/0'/0'/0 or m/84'/0'/0'/0' (these are two different keys, one is hardened the other is not).
If you were to derive the non-hardened key at m/84'/0'/0'/0 then you could use an xpub FROM THIS KEY (not any of the parent keys) to derive public child keys, without any private keys. Examples would be m/84'/0'/0'/0/0 and m/84'/0'/0'/0/1

10390: <p>I woud like to obtain an extended public key of a derivation path (m/84'/0'/0').
I'm using btclib, and I have the xpub of the root account.</p>
<p>When I try to use <code>bip32.derive(&quot;xpub...&quot;,&quot;m/84'/0'/0'&quot;)</code></p>
<p>I get <code>btclib.exceptions.BTClibValueError: invalid hardened derivation from public key</code></p>
<p>What am I doing wrong ?</p>
 3667: <p>Review <a href="https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki" rel="nofollow noreferrer">BIP32</a>:</p>
<blockquote>
<p>The fact that they are equivalent is what makes non-hardened keys
useful (one can derive child public keys of a given parent key without
knowing any private key), and also what distinguishes them from
hardened keys. The reason for not always using non-hardened keys
(which are more useful) is security; see further for more information.</p>
</blockquote>
<p>That little apostrophe <code>'</code> means that branch of the key derivation tree is &quot;hardened&quot; -- and THAT means that you must have the private key to derive its child keys.</p>
<p>So if you have the PRIVATE key for <code>m/84'/0'/0'</code> you can generate child keys for example <code>m/84'/0'/0'/0</code> or <code>m/84'/0'/0'/0'</code> (these are two different keys, one is hardened the other is not).</p>
<p>If you were to derive the non-hardened key at <code>m/84'/0'/0'/0</code> then you could use an xpub FROM THIS KEY (not any of the parent keys) to derive public child keys, without any private keys. Examples would be <code>m/84'/0'/0'/0/0</code> and <code>m/84'/0'/0'/0/1</code></p>
