Cryptocurrencies: What is the difference between SEED, Private/Public Keys, and Address?

Asked

Viewed 261 times

-3

What is the difference between these elements? and what is the importance of each, and the relationship between them? What is generated from which? and how these elements are generated/created?

1 answer

1


The difference depends on the context.

Seed:

The Seed is simply a long set of uniformly random bytes used to create the keys. It can be displayed in text format, such as Mnemonic Phrase, but this is not required nor a requirement.

If it has a seeed, any derivation of that Seed, with the same value, will be fixed. Cryptocurrency wallets generate new keys whenever you use a previous address, the reasons for this are out of the question.

In this way we need a fixed way to generate infinite keys, so we use Seed, because we can do F(Seed, 1), F(Seed, 2), F(Seed, n). The results will always be the same n and seed, but having only the result of them does not inform what is the seed nor the n used.

The Hierarchical Deterministic Wallets is more complex than this, due to the existence of Public Master Key, even that makes it vulnerable. But, ignoring these demands, a Seed can be used as HASH(seed + n) or HMAC(seed, n), including this is part of the construction of the HD.

Keys:

Cryptocurrencies use DSA, in the case of Bitcoin (and most others) the ECDSA with the Secp256k1 curve is used. If you are able to sign the transaction with a key matching the address, then you can move the funds.

Therefore it is necessary to create a private key (or more). Creation may or may not use the derivation of Seed. Each transaction you make will need to use the private key to sign it.

Address:

The address is simply a way to send the funds to someone who in the future will prove to own the address. But you don’t need to use it in two ways.

This is more complex, because each cryptocurrency has its own form. I will use Bitcoin as an example, in specific.

In it you have the P2SH and P2PKH. The first of them says that you want to pay for a Scripthash, each Bitcoin transaction has the Script, where it uses the OPCodes.

So, you pay for the Script hash. It can be a multi-sig, that is, several people must sign that for the transaction to be valid. Therefore, when you send to an address of this type, the wallet owner will send the Script and send the signatures. Checking whether the Script matches the signatures (and other Script settings) and whether the Script hash matches the address in question.

In general, you will use P2PKH, which is simply an address with the public key hash. In this case the owner of the wallet can prove his possession by signing and sending the public key, if all match you have possession.

The address format varies, in the case of Bitcoin uses Base58, but this is not general and is not the case. The addresses also have a checksum, to avoid typos, in the case of Bitcoin is a few bytes of SHA256.

You can send funds directly through the public key (not the address) then being a P2PK (not P2PKH), plus you can burn your coins using the OP_RETURN, where it does not send to anyone. These are the two ways, that I know, not to use it.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.