The cryptography in ethereum...the yellow paper (1)

Do repost and rate:

In this serie of articles I am going to try to do an analisys of the cryptography behing Ethereum, sometimes, it is difficult find information about it, so I believe that might be useful. Since this is a very complex topic and I am not actually an expert, if anybody notes some inconsistency is free to comment?? All  comments are welcome and I am sure I am going to learn about them.

The technical explanation of ethereum is reflected in the yellow paper. I will do a brief review about information collected in this paper. I will try to analize the cryptography 

The first step when we study ethereum is the state and transactions, a state is defined as ? ,a transaction defined as T and the state transition function is ? ,then, applying the transitiion function to a state in the instant t a transaction is generated at that moment and a new state in the instant t+1 is created as follows:

Spreading this concept to a bunch of transactions into a blockchain where a proof of work consensus protocol is used(at the moment, but as we know this will soon change), the paper define the following functions:

being B the block where a set of transactions are included, that is to say:

The function:

where ? is a function that rewards the miner and is named block-finalisation state transition function and ? is the block level state transition function,i.e.

the equivalent of a state transition function to a block.

  • The world state or state is a pair formed by an 160 bits address and an account state (Recursive Length Prefix),this account state,defined as ?(a) has the following fields:
    • nonce:Number that increases with each transaction and we name ?[a]n
    • balance:Quantity of wei ( 1 ether?10???) owned by an address,in the yellow paper is defined as ?[a]b
    • storageRoot:Hash of the root node of the merkle patricia tree saw previously,is defined as ?[a]s ,this account state is referred as: , where and being v a natural number and k a element of the set B32 of all sequences of bytes that represents the leaf in the trie.
    • codeHash:This field corresponds with the hash of the EVM code of the account ? [a] c =KEC (b)being b the code and KEC the hash function,in this case Keccak-256.
  • The transaction in the paper is defined as T. The transactions can be of two types, the message calls and the contract creation type. The fields that are reflected in the yellow paper are:
    • nonce:Number of transactions sent by the sender of the transaction ( Tn )
    • gasPrice:Wei that must by paid per unit of gas ( Tp ).
    • gasLimit:Max value of gas to be spend with the current transition( Tg ).
    • to:The address of the receiver of the transaction ( Tt ).
    • value:The quantity of wei that is transferred to the message call recipient ( Tv ).
    • v,r,s:Values that corresponds with the signature that let determine the sender( Tw , Tr , Ts ).

The transactions in ethereum are signed using ECDSA signatures using the curve SECP-256k1. The sender private key, defined as p r is defined randomly into the domain and is represented as a 32 byte array (big endian) [1, secp256k1n? 1].

We will continue in the next article

 

Regulation and Society adoption

Events&meetings

Reviews and LongReads

Ждем новостей

Нет новых страниц

Следующая новость