1.- Explain in detail the P2SH and the P2PKH, show the differences between both directions.
Detailed Explanation of the P2SH
The Pay-to-Script-Hash (P2SH) is a formating standard for Bitcoin addresses adopted since 2012 that enables transactions to be sent to a script hash instead of a public key. It is a script format that is used on the Bitcoin network that allows a holder of Bitcoins (BTC) to lock/restrict bitcoins in the script hash [scripts hashes usually start with 3; instead of to a public address (which usually starts with 1], and then supply the entire script when the bitcoins are released at the moment of transaction.
If one must send Bitcoin within a P2SH, the recipient can only spend or gain access to the received currency after meeting specific criteria, which is basically their (recipient) ability to provide a matching script and data to be evaluated and if true, unlocks the transaction.
Criteria/conditions that allow assessing BTC in a P2SH transaction are usually unique and sometimes can be decided by the sender, it could include providing more than one signature, or providing a unique password, or whatever requirement specified by the sender.
Detailed Explanation of the P2PKH
The P2PKH refers to the Pay-to-Public-Key-Hash and is a way of carrying out Bitcoin transactions on the BTC blockchain. It is a form of ScriptPubKey used on the BTC network to lock bitcoin during a transaction. In a P2PKH transaction, the P2PKH ScriptPubKey is used to lock the inputs. P2PKH is the most prevalent script type at the moment, and a public key hash is also known as an address. Unlike in P2SH, the addresses in P2PKH begins with the number "1". A P2PKH transaction is illustrated in the graphics below:
How P2SH & P2PKH compares
Factor | P2SH | P2PKH |
---|---|---|
Address format | Begins with 3 | Begins with 1 |
Signature Support | Multi-signature support (MULTISIG) | Single signature support |
Transaction costs | Lower fee | Higher fees |
Speed | Slower compared to P2PKH | Faster compared to P2SH |
2.- It is required to transfer 10 BTC that belong to a multi-signature wallet 3 of 5, to the MTC company, for the purchase of some equipment.
- Use the scripts and scriptPubKey to explain the steps that are followed
- Explain What happens if the transaction is made using Schnorr signatures?
Transferring BTC using scripts and scriptPubKey
A multisignature transaction would be performed in this situation, and in order for it to be executed, the requirement of 3 signatures of 5 must be satisfied. In this case, the 3 signatures of 5 would be ScriptSig, and these signatures will be checked by OP_CHECKMULTISIG. Two types of scripts, the scriptsig and the scriptPubKey, are used to carry out the entire operation. The scriptsig is responsible for unlocking the transaction through the usage of the OP CHECKMULTISIG function, which is used to verify that the three signatures indeed correspond to all of the transaction's keys. The scripts will unlock the cash if the OP CHECKMULTISIG certifies that the prerequisites are met. Otherwise, the procedure will be aborted if the three keys do not match the rest.
Explain What happens if the transaction is made using Schnorr signatures?
If all five parties (5 senders - Send 1-5) want to send 10 BTC to the organization using Schnorr signature technology, they will present their public keys, which will be merged to form a new secure and private transaction key, which will then be utilized to complete the transaction through the usual execution procedure. Because the transaction size has been lowered and the users' identities have been protected, it is now a more secure and scalable transaction. Basically, by using Schnorr signatures, we can achieve better privacy that cannot be achieved when these transactions are conducted conventionally.
3.- Why do you think Taproot and Schnorr signatures will help the privacy of the Bitcoin network? Explain.
Taproot and Schnorr Signatures are upgrades to the Bitcoin network that aim to increase the network's scalability and, as a result, its privacy. Users of multiple-signature wallets may now make transactions using Schnorr Signatures thanks to the development of Taproot and Schnorr Signatures. The Schnorr Signature allows individuals in a transaction's list of signatories to combine with other signatories to generate a single hybrid signature that is sufficient to commence the transaction, decreasing the chance of individual signatories being identified. There is enhanced security with the Taproot and Schnorr upgrade to the BTC blockchain, and with greater security comes better privacy, since this update only discloses a portion of the script that they used to execute the transaction in the network. There is no longer any differentiation between single-signature and multiple-signature transactions in this fashion.
4.- Using the Blockchain Demo, write exactly the following message: Schnorr Signatures, generate the signature of the message and verify the message. Then delete the first character of the message signature and check again What happened? Explain. Screenshots required.
To do this task, we will be visiting the blockchain demo website. A private demo key is automatically generated. Now, let's sign the messages.
Signing "Schnorr Signatures" on Blockchain demo
To sign, input the message in the text box and click on the sign button to generate your message signature as shown below:
Verifying the Message
Simply click on the verify tab and with all entries intact, simply click on "Verify" to verify your message. If the message is accurate and untampered, you will find a green glow around it. This is shown below:
Message Tampered
If the message is tampered with, by maybe changing a character, or in this case, deleting a character, the message won't match up with the signature created and signed for it, thus, the interface will glow red to show that a criterion has not been met and the message has been tampered with or altered. The screenshot below demonstrates this.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit