If you are new to crypto, you must be wondering about what are public and private keys.
NEAR protocol, as well as all other major cryptocurrencies, is built upon public-key cryptography, a cryptographic system that uses pairs of keys: public keys and private keys to authenticate transactions on the blockchain — send or receive funds.
Public keys can be described as an email address. You openly share your email address so that your friends or families can send you emails (or messages). Similarly, public keys can be shared with everyone. So to send a transaction (or fund), one first should know the public key of the other user.
The private key gives the user a ‘write-access’ — meaning ownership of the funds on a given address and must remain known only to the user (or owner). The private key is akin to the password of your email account, that only you have a copy (or knowledge). Anyone who learns the associated password has access to the account and may misuse it. Therefore, this information should not be shared with anyone and stored secretly.
What are the addresses:
In the cryptocurrency transactions, the public key is represented by its digital fingerprint, called an address. Addresses are derived by using a hash function (such as SHA3) on the public key. For example, in Ethereum, the resulting hash on the public key will be 64 characters long string. To get the final address take the last 40 characters and prefix with 0x.
The motivation for using hashes of public keys was to shorten the size of the address. Note - When using the wallets, the public keys are very rarely seen by the users. For the most part, public keys are stored inside the wallet file and managed by the wallet software. However, it is possible to send cryptocurrencies to either a public key or to the hash of a public key.
Customizable experience in NEAR wallets:
NEAR protocol goes further to simplify the addresses.
NEAR wallet allows users to create a customizable experience. When creating an account through the NEAR Wallet, users can define the account name like creating an email account. These human-readable accounts end in ‘.near’. For e.g. ashkharoo.near
To make private keys user-friendly, similar to other blockchains, the NEAR protocol uses mnemonic keys. Mnemonic keys are a human-readable version of the private keys.
When we look at the private keys, these are a string of random numbers. It looks something like this: d255192o4A5yaoxg1zvpGCrh9LaEUFVTZCht1PsXNacyMbot7i.
Not as easy as remembering your Gmail account ID and security password. Given the complexity to remember crypto key-pairs, users need to store it somewhere safe. If a user loses them, especially private-key, they lose access to funds in the account. This can be a barrier to user adoption, especially for non-tech-savvy individuals.
Mnemonic is a way to reproduce something hard to remember. To a series of data like private keys, random words are associated so as users can remember the original form. Remember the phrase — ‘Some People Have Curly Brown Hair Turn Permanently Black’ from your school days. It’s a mnemonic form to remember Sin, Cos, and Tan trigonometric formulas.
NEAR wallets use 12-word mnemonic seeds that are tied to a given private key. This conversion is done through the method called BIP 39. BIP 39 is an English wordlist that contains 2048 words.
Closing thoughts:
The onboarding process is a user’s first impression of the application. If users don’t understand your app, they won’t use it. Studies show that 60% of users say they have chosen not to use the app after discovering how much information the app asked for. Blockchain apps have a complex onboarding process. One has to make an effort to know the wallet, public/ private key, etc.
With the NEAR wallet, users login to NEAR-based decentralized applications seamlessly. The customizable experience from NEAR wallets increases the chances of apps usability and the likelihood of successful user adoption.