Multisignature Script / multisig and Wallets in Bitcoin

FREE BOOK -> Problems for the day before your Coding Interview (on Amazon)

Price is set to 0. Click on Buy Now and it will be downloaded in your account.
Internship at OpenGenus

In this article, we learn about multi-signature scripts/multisigs, multisig wallets, how they work, the different types of multisig wallets, and the pros and cons that come with the use of multisig wallets in Bitcoin.

Table of contents.

  1. Introduction.
  2. Multisignature Wallets.
  3. How Multisignature Wallets Work.
  4. Types of Multisig Wallets.
  5. Pros and Cons of Multisig Wallets.
  6. Escrow Transactions.
  7. Summary.
  8. References.

Introduction

We learned about Bitcoin transaction scripts and the scripting language. We said that the script programming language allows the programmability of blockchain transactions in Bitcoin. In this article, we will learn about a more complex transaction/script referred to as a multi-signature script / multisig, the accompanying wallets - multisig wallets, how they work, and the different types of multisig wallets. We will also look at the pros and cons that come with the use of multisig wallets.

A multi-signature is a digital signature scheme that allows a group of users to sign a document.

A multi-signature transaction scripts specify conditions whereby m public keys are embedded in the script, out of those, at least n provide signatures that are used to unlock the funds. Therefore for any multisig transaction, two or more signatures are required.

A Multisig wallet is a cryptocurrency wallet that is can be owned and managed by multiple parties. For example, business partners, spouses, organizations, etc.

Differences between Single-key and Multisig transactions

Single-key Transactions Multisig Transactions
Single key needed for a transaction to execute Multiple keys needed for a transaction to execute.
Single point of failure. If a single key is lost, the hope of recovering the funds is not lost.
Safe as long as the owner is cautious Even if a party loses a key, the funds remain inaccessible.
Centralized point of authority and control Decentralized. Here majority wins.
Faster transaction processing. Slower processing of transactions due to the number of keys needed for a valid transaction.

Multisignature Wallets.

In the prerequisite article, we learned about digital signatures and the reasons why they are used. The main point to remember is that digital signatures act as proof that the sender who signed the transaction is the rightful owner of the funds together with wallets that manage the keys used in the transaction.
Usually, a transaction requires a single signature, however for a multisig wallet owner to be able to send funds, he/she needs more than a single private key that will be used for signing the transaction. These private keys could be owned by the same person or different people.

So multisig wallets need multiple private keys in addition to each being used in the creation of digital signatures. These private keys can be stored in different locations, this ensures that there is no single point of failure and that even if we lose a key, we will be able to use the remaining to regenerate it. Also if a key is compromised the funds will remain safe since the remaining are needed to authorize any transaction using the wallet.

Here are some key points to note about multisig wallets;

  • First all signing parties can view transactions and funds involved with the wallet.
  • For any transaction to be authorized all parties have to sign off on them.
  • If any party loses a key or recovery phrase, then others cannot transact using the wallet. The key has to be regenerated.

How Multisignature Wallets Work?

Multisignature wallets can be compared to a bank safety deposit box that requires more than one key to open it. In this case, multi-signature wallets require more than two signatures for a transaction to be executed.

bit69

During setup, we choose the number of keys that are allowed to open the valve and a minimum number of keys that are required to be able to unlock funds. For example in a 2-of-3 multisig, two out of 3 private keys are needed to sign a transaction.

Types of Multisig Wallets.

Multisignature wallets are categorized according to the number of private keys a wallet controls, this translates to the number of signatures required for a transaction to execute.

The following are the most common types of multi-signature wallets;

  • 1-of-2 - these wallets allow sharing of funds controlled by the wallets in that, In this case, we don't need two keys in order to transact rather each person can use the spend funds without the need of the other.

  • 2-of-2 - these use two-factor authentication in addition to storing the private keys in two different locations. These are more secure than the normal single-signature wallets however, there is a possibility of loosing access to the funds if the keys are compromised.

  • 2-of-3 - In this case we need 2 out of 3 private keys in order to transact, meaning that two people out of three need to sign for a transaction to execute. These are commonly used in cryptocurrency exchanges since they offer better security. In this case, if a single key is lost, the remaining two can still be used in a transaction.

Pros and Cons of Multisig Wallets.

In this section, we will look at the various benefits and risks a multi-signature wallet introduces to Bitcoin.

Pros

  • Better security as more than a single key is needed for a transaction, if one is compromised in the case of 2-of-3, funds will not be lost.
  • Decentralized control over a wallet means that more than a single party has to authorize a transaction.
  • Enable two-factor authentication wallet capabilities.

Cons

  • If a key is lost, recovery could be tedious and complex.
  • Slower transactions as the needed keys are distributed.
  • Since multiple keys are embedded in a transaction, the size of a transaction increases, this can slow the network.
  • The process of configuring a multisignature wallet is complex and prone to mistakes. Advanced knowledge and skills in cryptography and blockchain technologies are needed.

Escrow Transactions.

A multisig escrow account or transaction is the perfect application of multi signatures in blockchains. Here for a transaction to be valid, all parties must be involved and agree to the terms of the transaction.

Here a third party is needed to hold the funds and only disburse the funds to the seller once the buyer has received the product.
In multisig escrow crypto payments, a buyer sends some crypto to a multisig wallet address. For example a 3 of 4 requires at least three signatures for a valid transaction. In this case, all three parties need to reach a consensus on all transactions.

Benefits of escrow transactions

  • The volume of transactions buyers and sellers can engage in is huge.
  • Funds are rarely mishandled since there is decentralized control.
  • It is very efficient compared to the process of establishing a trust account and regulating funds from a single centralized point.
  • Avoids the single point of failure problem since funds are not controlled by a single party.
  • Escrow accounts are also useful in preventing embezzlement of funds.
  • They also act to divide funds among the participants of the account.

Some cons involve the cost of escrow transactions which are very high. Also, escrow transactions are public knowledge. Anyone can be able to view how much is spent on what.

Summary

Multisig refers to the mechanism of a wallet requiring more than a single key to be able to authorize any Bitcoin transaction from the wallet. In Bitcoin protocol, it is used to distribute control over the wallet and the funds the wallet has a key for.

In Bitcoin, standard transactions only require a single signature, we also have complex transactions that require multiple signatures. These are referred to as multisig transactions of M-of-N transactions.
Examples of Bitcoin wallets that support multiple signatories include; Armory, Electrum, BitGo, Copay, and Coinbase among others.

With this article at OpenGenus, you must have the complete idea of Multisignature Script / multisig and Wallets in Bitcoin.