- Building Blockchain Projects
- Narayan Prusty
- 208字
- 2021-07-02 23:45:13
Ethereum accounts
To create an Ethereum account, we just need an asymmetric key pair. There are various algorithms, such as RSA, ECC, and so on, for generating asymmetric encryption keys. Ethereum uses elliptic curve cryptography (ECC). ECC has various parameters. These parameters are used to adjust speed and security. Ethereum uses the secp256k1 parameter. To go in depth about ECC and its parameters will require mathematical knowledge, and it's not necessary to understand it in depth for building DApps using Ethereum.
Ethereum uses 256-bit encryption. An Ethereum private/public key is a 256-bit number. As processors cannot represent such big numbers, it's encoded as a hexadecimal string of length 64.
Every account is represented by an address. Once we have the keys we need to generate the address, here is the procedure to generate the address from the public key:
- First, generate the keccak-256 hash of the public key. It will give you a 256-bit number.
- Drop the first 96 bits, that is, 12 bytes. You should now have 160 bits of binary data, that is, 20 bytes.
- Now encode the address as a hexadecimal string. So finally, you will have a bytestring of 40 characters, which is your account address.
Now anyone can send ether to this address.
- 區(qū)塊鏈國(guó)際監(jiān)管與合規(guī)應(yīng)對(duì)
- 跨境電商:理論、操作與實(shí)務(wù)
- 微商掘金:決勝微商的7個(gè)關(guān)鍵要素
- 電商基礎(chǔ):策略 運(yùn)營(yíng) 技術(shù)
- 電子商務(wù)運(yùn)行機(jī)理初探
- 電子商務(wù)綜合實(shí)訓(xùn)
- 微營(yíng)銷(xiāo):指尖上的利器
- 旅游電子商務(wù)理論及應(yīng)用
- 微信公眾號(hào)運(yùn)營(yíng):粉絲及平臺(tái)數(shù)據(jù)分析和營(yíng)銷(xiāo)
- 人人都能做生鮮
- 爆紅:創(chuàng)業(yè)公司一鳴驚人的6大營(yíng)銷(xiāo)絕招
- 首都文化服務(wù)供應(yīng)商運(yùn)營(yíng)模式研究報(bào)告
- 二維碼的秘密:智能手機(jī)時(shí)代的新?tīng)I(yíng)銷(xiāo)寶典
- 淘寶客服超級(jí)口才訓(xùn)練與實(shí)用技巧:網(wǎng)店銷(xiāo)售中的144個(gè)經(jīng)典溝通實(shí)例
- 2018天貓雙11全球狂歡節(jié)設(shè)計(jì)年鑒(全彩)