El lock script P2PK or Pay To Public Key, is the lock script oldest and most primitive of Bitcoin, developed directly by Satoshi Nakamoto in its first version of Bitcoin. It allows us to make bitcoin payments using the extended version of a public key instead of a hash of it as is currently the case with the standard script P2PKH (Pay to Public Key Hash).
Thanks to this, P2PK is a much simpler version of P2PKH and was used by Nakamoto in his initial mining operations when creating the coinbase transaction of its blocks. But you also used this script in your first transactions like the one you made to Hal Finney.
How does a P2PK work?
The operation of a P2PK follows the same basic scheme of Bitcoin transactions, in fact, P2PK is the origin of this scheme, only in an even simpler way. When we want to carry out a transaction in Bitcoin we need to have only the private key in our possession. As we already explained in How is a Bitcoin address generated?, from the private key the public key comes out mathematically and from the public key it is encoded to get the Bitcoin address.
In P2PK, that Bitcoin address (which usually starts with "1", "3" or "bc1") is not made the last part, that is, it is not encrypted. In this way the address remains as the complete public key, which would have a form similar to this:
The previous Bitcoin public key corresponds to one of Satoshi Nakamoto's addresses, specifically, the address to which the second Bitcoin coinbase was sent.
Thus, for example, to send a transaction to that address using a P2PK we do not use a Bitcoin address like the one we know today. Instead, it would be enough to take the entire public key, put it in the wallet and send it. The result in the end is the same, when the transaction is confirmed, the owner of that public key will have the bitcoins that we send him in his possession and will be able to use them without problems.
Explaining the operation process of a P2PK
The difference in the submission process between P2PK and P2PKH is the way the blocking scripts work, and we explain this detail below:
First of all, in a P2PK it is not necessary to encrypt the public key. Instead, we just need to copy said full key, place it in the Bitcoin script and we can send the transaction. The P2PK script to send (or block bitcoins) has the following form:
Blocking Script (scritpPubKey): <Public key to send> OP_CHECKSIG
This means that to unlock said bitcoins and be able to use them we would have to provide a valid digital signature for the public key that we have given, as we can see in the scriptSig that would have the following form:
Unlock Script (scriptSig): <SIGNATURE> (Valid digital signature)
However, on a P2PKH this changes slightly, and the blocking script is written as follows:
Blocking Script (scritpPubKey): OP_DUP OP_HASH160 <Public Key Hash> OP_EQUALVERIFY OP_CHECKSIG
And its unlocking is done by means of:
Unlock Script (scriptSig): <SIGNATURE> <Public Key>
This means that we must provide a public key, duplicate it, hash it, verify that the hash of the public key delivered and verify the digital signatures so that we can use the bitcoins at that address.
As you can see, P2PK is a much simpler and computationally less expensive option. However, P2PK is a rarely used blocking script in the Bitcoin world today, and we will explain why below.