Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does EVM memory data location of the first two 32-bytes slot be used?

solidity doc says:

0x00 - 0x3f (64 bytes): scratch space for hashing methods

how can i understand "scratch space for hashing methods" ?

like image 283
jayphbee Avatar asked Oct 25 '25 05:10

jayphbee


1 Answers

Simply put, these 64 bytes of space will be used by hashing methods (e.g., keccak256) which need a temporary space to store intermediate outputs before ultimately returning a final output.

In hash functions, there are a lot of steps involved and the output of one step is the input for the next. This makes it necessary to have a reserve space available to perform these workings and store the intermediate outputs.

like image 83
Hasan Raza Avatar answered Oct 26 '25 18:10

Hasan Raza



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!