Arbitrary Message Signing in Dapps

nuel_ikwuoma

nuel ikwuoma

Posted on August 17, 2021

Arbitrary Message Signing in Dapps

Hi, I am nuel, a web and smart contract developer, i tweet frequently about web development and blockchains, find me here

For the absolute beginners, i would like to briefly define what Dapps are...

A Dapp is a decentralized application, that functions and executes based on the primitives of the blockchain, making it permissionless, trustless and censorship resistant

In a quest to understand message signing and digital signatures, which is quite a relatively new concept for me, I had gone through the rabbit hole of reading tons of articles and even landed in several official Ethereum Improvement Proposals (EIP-155, EIP-191, EIP-712), these proposals although well detailed out isnt neccasarily the best landing point for a beginner new to this concept as it can seem really abstract, as it was for my case initially as it took me a whole lot of time to figure out the basics of arbitratry message signing and what digital signatures really are and why we might need one. So I would approach this article starting by answering the question of:

  • What digital signatures are?
  • Why we need digital signatures?
  • Use cases in Dapps.

What are digital signatures?

Basically, digital signature is a way to prove identity, even in the absence of the entity who owns the signature.(still dosent make sense, relax).

  • It works similar like this: Imagine you were issued a cheque by a account holder, the cheque is signed and all you have to do is go to the bank, once the bank verifies the signature on the cheque (and maybe other verifications), you become elligible to claim the said ammount. In the context of Dapps, an externally owned account signs a message or transaction off-chain, and anyone can submit the transaction on-chain to verify the signature or perform its intended action in the case of a transaction.

Why we need digital signatures?

Aside the obvious benefits of authentication checks, digital signatures can improve the user experience in Dapps, and also reduce the number of transactions sent to the blockchain, see this awesome article for a quick and well explained demonstration.

Use cases?

Some trending uses cases for digital signatures are listed but not limited to...

  • Authentication
  • Message signing and verification
  • UX improvements
  • Gasless transactions

Where to go from here?

If you are building smart contract on ethereum using solidity or you flesh out the frontends of Dapps, you might want to take look at this, this and this proposals, to get a much deeper understanding on the topic.

NOTE: Message signing, although done with a private key, is not the same as encryption.

I am still actively learning and researching about blockchain and web3/p2p technologies, and I would love to hear your suggestions, as well as recommendations.

Thanks for reading, have any questions and/or interests related to Ethereum smart contract development or solidity? Reach out on Twitter>>> nuel

💖 💪 🙅 🚩
nuel_ikwuoma
nuel ikwuoma

Posted on August 17, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Arbitrary Message Signing in Dapps
ethereum Arbitrary Message Signing in Dapps

August 17, 2021