The fingerprint is the first four bytes of the hash160 of the master private key.
It should be hashed from its parent's public key and not the whole xpub either.
Am I right in thinking that every xpub has a fingerprint, and the master fingerprint is the fingerprint of the signing device?
I don't know what you meant by "
master fingerprint", perhaps the fingerprint of the master private key?
If so, the master private key which doesn't have a parent has its 'fingerprint', 'Depth' and 'Child Number' all set to 0x00 (
with the correct byte size).