EOS Account Management Overview by Attic Lab

in #eos6 years ago (edited)

Attic Lab is going to present you with EOS Account Management guide. From this post, you will learn about Accounts, Permissions, Wallets, Access to private and public keys, and the best practices for operating them. Enjoy! 

In EOS, there are two types of entities that operate with user keys - wallets and accounts. An account is a human-readable name that identifies a particular user, and is stored in the blockchain (similar to Bitcoin and Ethereum addresses). Each account is associated with one or more key pairs. Information about this is stored in the blockchain. Wallets are files in which key pairs are recorded. These key pairs can be either associated with certain accounts or not associated with any accounts. The keys contained in the wallet are encrypted with a password with high entropy. Wallet-files are stored offline. Thus, accounts and wallets actually "do not know" about each other. In one wallet, key pairs from different accounts belonging to different owners can be recorded. At the same time, key pairs associated with one account can be stored in different wallets on different devices in different corners of the Earth (including, the same key pair can be stored in a variety of wallets). Note that, since to record a key pair in a wallet it is necessary to know a private key, so the wallets and passwords from them must be stored in safe places.

Accounts and permissions

To create an account, you need to make a corresponding record in the blockchain. Such record should contain the name of the new account and the public keys associated with this account. Each public key is authorized to perform certain operations on behalf of the account. When creating an account, the keys for the access groups are defined (permissions). "Owner" is the key that has the right to sign transactions that change the access rights to the account, and "active" is the key that signs transactions such as funds transfer, voting for block producers, etc. In addition to the above permission groups, you can create custom access groups. Instead of public keys, account names can be specified.

Each key, that belongs to a particular access group, has a weight in it. For each group of rights, a threshold is also specified - the amount of signature weights that is necessary to send transactions.

For example: 

Account lab1234 “active” group access rights are the threshold value 3. The two public keys included in this group EOS6cicoG4z1VWdPMRUKJWxgsKMU3SiGxNXJ3oc32gpTLEdbhiW1Z with weighing 2 and EOS69wbUAw9pVx7aHAHTtMLi4Gy2e3GE2GFWZRSwgsk5hCBWnPD6p also with the weight 2. Thus, for example, to vote for block producer you need to sign the transaction by both keys, so that the total weight of signatures is 2 + 2 = 4 > 3.

Wallets and access to private keys

As mentioned above, the wallet is an offline storage of open / private key pairs. Each wallet is a file containing one or more key pairs. The file is stored in the local file system and is in encrypted form. The password by which the wallet is encrypted is shown to the user when creating the wallet. It must be saved in a safe place, since if you lose the password, the wallet will be computationally infeasible to unlock and you will not be able to access the private keys.

In the created wallet, you can import any key pair. It will also be saved and encrypted.

The wallet has two states - lock and unlock. In the lock state, the wallet is encrypted. In the unlock state, the wallet is decrypted for cleos and keosd clients and they can use private keys to sign transactions.

In order to sign a transaction with a private account key, cleos must find out the corresponding public key. That is, extract information about the account from the blockchain with the help of nodeos. Further, from the unlocked wallets the needed private key is extracted. Thus, the signature of the transaction without connection to the node is impossible, but at the same time, the node does not receive any information about the private key.

Attic Lab hopes that this post will help you to clarify and understand the EOS account management mechanism. If you want to know more about EOS, do not hesitate and follow us on social media listed below. 


Website 

Steemit

Facebook 

Twitter

#EOSSwissArmyKnife

Medium 

Github

Telegram Group 

Telegram Channel 


Sort:  

@attic-lab, I gave you an upvote on your post!

If you are interested in claiming free Byteballs ($10+), just for having a Steem account, please visit this post for instructions: https://steemit.com/steem/@berniesanders/do-you-want-some-free-byteballs

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63220.55
ETH 2560.85
USDT 1.00
SBD 2.80