1

I would like to know how does the process of authentication work and how are the private keys used for signing transactions?

For eg while using email : We log-in to our accounts and send as many mails as we want...but in this case each transaction is signed with the users private key.

How is this implemented while developing an application?

Also what is a blockchain signer?

1

Authentication of the user is separate from signing transactions and using your key(s). Authentication is the process by which you make the system understand who you are, who is logging in for the specific session that is starting (i.e. to a wallet, where you log in with ususal procedures which can be more or less sophisticated like 2FA etc). Prior to being able to log in you may go through an accurate identification process by providing copies of your IDs, utility bills, sometimes even a video interview. But that only happens once to register you correctly. When the registration completes you are authorized to log in as many times as you want. The registration process assigns to you a private key and a public key.

In general the pair of keys works as follows: any data set (a document, an image, a simple text etc) can be encrypted with one of the keys, and decrypted only using the other one.

The private key is used to sign any set of data you want (in this specific case, the info related to a transaction) in this way: first you run a complex, non-reversible algorithm feeding it with the data you want to sign. The result of the algorithm is called a hash, a number represented on a pre-defined number of bits (which depends on the signing algorithm you are using).

Once you created the hash, you encrypt it using your private key.

The encrypted hash is "appended" or anyway associated to the data set, as would happen for a signature appended to a paper document. A user willing to make sure that 1) data were not modified and 2) it was sent by you proceeds in this way: first, the hash algorithm is applied to the data, deriving a signature. Second, the encrypted signature you appended is decrypted using your public key (which is by definition publicly known). The two hashes are then compared. If they match, this means that you actually sent the data (otherwise it wouldn't be possible to decrypt the signature you sent), and that the data set was not modified (otherwise the hash would be different). (In the above text the term hash and signature are synonyms)

When you develop software or contracts to be used in the blockchain you need the tools / libraries needed to perform all the operations above: the hash algorithm to generate the signature, the encryption algorithm used to encrypt the signature, the decryption algorithm used to verify other people's signatures. A signer is the part of sw in a wallet (as an example) that deals with all the above. Other modules include the transaction management and the networking protocol management (to participate in the P2P network)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.