Post
Topic
Board Development & Technical Discussion
Re: How the Bitcoin Private pubkey prefix is generated ?
by
shahzadafzal
on 06/05/2018, 19:19:33 UTC
Public key prefix yes but are there prefixes for private key too? I don't think so.

1 prefix is public key hash
3 prefix is a script hash

For public key prefix you can get idea from below

Quote
Bitcoin address is a Base58Check representation of a Hash160 of a public key with a version byte 0x00 which maps to a prefix "1". Typically represented as text (ex. 1CBtcGivXmHQ8ZqdPgeMfcpQNJrqTrSAcG) or as a QR code.

A more recent variant of an address is a P2SH address: a hash of a spending script with a version byte 0x05 which maps to a prefix "3" (ex. 3NukJ6fYZJ5Kk8bPjycAnruZkE5Q7UW7i8).


Ref: https://github.com/oleganza/CoreBitcoin/blob/master/GLOSSARY.md

You check here list of address prefixes: https://en.bitcoin.it/wiki/List_of_address_prefixes