Schnorr Protocol Signature Algorithm for Bitcoin

Schnorr

Schnorr

In the world of cryptocurrency, cryptography is the foundation for everything. As with anything, there are improvements and advancements made. The Schnorr Protocol is an example of improving technologies. For most of us, a general knowledge of how these protocols work is hard to come by. By their very nature, cryptographic standards and protocols are not easily understood by most people. They are filled with mathematical equations, and a lot of them. It will bring back nightmares of your high school algebra class. Cryptographic mathematics is not an easy field, but then again, if it were, it probably would not offer the capabilities that it does.

Schnorr ProtocolWhile most of us do not aspire to become cryptographic gurus, we would like to have a general, working knowledge of how things work when it comes to our money. In the spirit of keeping things very simple, a current bitcoin transaction is possible, without the need for a trusted third party because of secret passphrases, basically.

Think back to the spy novels you have read or movies you have seen. One spy says, “The crow flies west into the wind.” The second spy, who knows the passphrase can then be assured that the first spy has indeed authenticated himself. To take it further, the second spy may need to verify that he too, is who he says he is and has authorization to partake in their dealings. To do so, the second spy could have a reply that must be said when the first spy finishes his sentence. Something along the lines of, “Yes, the crows do tend to fly at this time of day.” If that was the exact response expected by the first spy, then both parties can be assured that they are dealing with the right counterparty.

Schnorr Protocol Will Still Utilize Public and Private Key Cryptography

In cryptocurrency, we see a version of this with public and private keys. Your wallet address, that you give out to people who wish to send you money, and that is published openly in the transaction details on the blockchain is your public key. Someone sends money to you via that public key. The only reason you can access, and then spend that money is because you have the private key that matches, or as in the spy example above, you know the correct response to give.

A private key can generate many different public keys, and if you have a private key, it is possible to find all the public keys it has ever generated before. However, it does not work the same in reverse. It is impossible to gain the private key from the public key. A public key is forever tied to a specific private key and it will never be duplicated by any other private key. This is what makes this method of cryptography so secure.

So, let us use our spies again, only this time, with Bitcoin:

Spy 1: I have sent 1.25 Bitcoins to your wallet, 1FAry1dobpiaGA7XTxvKQY9HeKkkNVyHkY

Spy 2: Thank you, I will spend them now. As long as you have the corresponding private key, then you will access the funds and spend them at will. Assume this is the private key for the Bitcoin Wallet Address (its not): DfhiD7HMdio2polnLN3EeVYoi6PVBxUaU8N7Wn7kRBTzSB5ytohuSchnorr Protocol

This lets the network know that you are authorized to move these funds however you wish. To do this, without giving away the private key, which would defeat the purpose, you generate a signature using your private key. Through a series of extremely difficult cryptographic mathematical functions that are beyond the scope of this article (and my full understanding), the network can verify that the signature did come from the authorized holder of the private key.

Schnorr Protocol Explained

In the current Bitcoin signature scheme, every individual input that it takes to create a new transaction requires its own signature. This causes the size of some transactions to be much higher than if they only needed one signature for all inputs combined. This is exactly what the Schnorr Protocol solves. The Schnorr Protocol allows all the inputs to be grouped together and then creates a single signature for the lot.

In addition to allowing for smaller transaction sizes, and therefore more room in each block, the Schnorr protocol also offers additional benefits. It allows for a security proof, an added measure of security that the current protocol does not. Where the current Bitcoin signature protocols are malleable, the Schnorr protocol is provably non-malleable. In addition to grouping inputs together and creating one signature, the Schnorr Protocol also allows for multiple parties to collaborate and group together, again using only one transaction. MultiSig wallets and transactions requiring multiple signatures can still require multiple authorizations, while still only creating one signature for the transaction itself.

Some other benefits are that the Schnorr Protocol uses a simple 64-byte format for the signature size compared to the current method which can use up to 72 bytes. The Schnorr Protocol also allows for more efficient processing of batch validation.

There are other, much more technical benefits to using the Schnorr Protocol with bitcoin that are not covered here. If you are interested in reading the full technical details, BIPS (Bitcoin Internet Payment System), essentially the Bitcoin Core development team has released a paper on it.

You can read the BIPS Schnor Protocol paper here.

Schnorr Protocol vs Current Bitcoin Signature Algorithm

The problems and issues that the current Bitcoin signature scheme, ECDSA, or Elliptic Curve Digital Signature Algorithm present are apparent to anyone who has ever conducted a Bitcoin transaction. Among these major problems is transaction malleability, lack of privacy, lack of security proof and scalability issues.

Anyone who was involved in conducting Bitcoin transactions in or around October 2017 will remember just how bad things got. Space in a block was being sold at a premium. In some cases, the transaction fees needed to get a transaction confirmed were more than the amount being sent in the first place. Transactions were being delayed for days, some not even being completed at all. The number of unconfirmed transactions was in the hundreds of thousands range. Segregated Witness, or SegWit, helped to solve that issue and effectively handled the situation. The Schnorr Protocol looks to further the efficiency and security of Bitcoin, making it a more user friendly and approachable technology for the public.

By reducing the amount of data, effectively lowering the total size of a transaction, more transactions will be able to be included in each block. According to bitcoin core developers, an overall of up to 40% more transactions can be included once the Schnorr protocol is put into place. This will make transaction confirmation times less, lower transaction fees even further and make the number of unconfirmed transactions, at any given time, negligible.

Schnorr Protocol Solves Malleability/Privacy Issues & Adds Security

Malleability is the ability to change something or reshape it. Under the ECDSA algorithm, a signature can be altered by anyone who has access to the public key. Since the public key is also the wallet address you use, it essentially means that someone can message into another signature that is valid for the same key and message.  Since this still does not allow anyone to steal or access your bitcoins directly, it is not an immediate concern for most people, however it can lead to much larger issues with security, efficiency, transaction sizes, etc.….

Adding security to the Bitcoin network is like pouring water into the ocean, in all reality, since the Bitcoin network is still, to this day, the only cryptocurrency network that has never had any kind of breach whatsoever. However, adding more security cannot hurt.

Schnorr ProtocolThe Schnorr protocol will also allow for more privacy when conducting Bitcoin transactions. Since each individual input will not need its own signature, it will increase privacy. Currently, when you send a transaction, you are taking all the Bitcoin that is in your wallet and the signatures on where it all came from are included when you send it out. This makes it traceable.

To put it in a more practical sense: imagine that you must send $1,000.00 to someone. Now, instead of cash, you have checks. You have your paycheck from work for $500.00, your grandmother gave you a check for $150.00, Your friend wrote a check to help for $350.00. together, these checks total the $1,000 you need to send. If you simply place your signature on the back of each check, you have created three signatures that authorize whoever receives these checks to spend them, cash them, etc.…

However, the receiver of the 3 checks, while it satisfies your debt, now knows exactly where the money came from since your employer’s name, address and phone number are on your paycheck, as is your grandmother’s information and your friend’s information on the checks that they gave to you.

This is currently the way bitcoin works. Each input is signed, and it allows for the Bitcoin you send to be traced. With the Schnorr Protocol, we can take the same situation and change one simple thing. You need to send the $1,000 and get the same amounts as above from your paycheck, grandma and your friend. Only this time, you cash your paycheck first and your grandmother and friend also give you cash. Now, you go to the store and hand over the cash for a money order in the amount of $1,000. You sign the money order and send it off. The receiver still gets the $1,000 but now has no idea where the money originated from.

The same three sources, or inputs, were used to get the total amount, but with the Schnorr Protocol, those sources are hidden and only one signature is required to send the funds.

The Schnorr Protocol Offers All Upside and Zero Downside

The pros of the Schnorr Protocol are many. Some more obvious than others, but the one thing that has been almost unanimously agreed upon s that there is no list of “cons”. No downside whatsoever to implementing the Schnorr Protocol for bitcoin transaction signatures. In a community that saw a long, drawn out dispute that resulted in a hard fork, a new coin and a community divided just last year, that says a lot about the Schnorr protocol.

The Bitcoin Core development team is currently working on making the Schnorr Protocol more standardized for implementation and while no set date for its activation has been given, you can be assured that they are moving forward and are looking to implement it as soon as possible.

Read More:

 

Share This
Inline
Inline