Questions tagged [hash-algorithm]

A hash algorithm is any algorithm that can be used to map data of arbitrary size to data of fixed size. The values returned by a hash function are called hash values, hash codes, hash sums, or simply hashes. In Ethereum, the algorithm used is Keccak 256.

Filter by
Sorted by
Tagged with
4
votes
1answer
1k views

Getting Method ID “Keccak hash” in Python

I am trying to derive the Method ID, the Keccak (SHA-3) hash, in Python so that I may call the functions of my contracts once they are deployed as detailed in the ABI documentation: https://github.com/...
12
votes
1answer
8k views

How does the Keccak256 hash function work?

As the Ethereum platform relies on the Keccak256 hash algorithm, I'd like to get a better understanding of it. My rough understanding is something like this: a function accepting a finite set of ...
11
votes
1answer
5k views

Ethash vs Equihash in terms of memory hardness?

Ethereum's Ethash was designed to be memory hard with the intention of making the mining process ASIC-resistant. Zcash's Equihash algorithm also promises the same. How do these two PoW systems compare ...
2
votes
1answer
5k views

How to use keccak256 in Solidity?

I have created a Student registration form and taking input as firstName, lastName and studentRegId. Something like this: contract Unique { string fn; string ln; bytes20 val; bytes32 sId; ...
4
votes
2answers
2k views

keccak256 Error Undeclared identifier in browser-solidity

I try to use sha3/keccak functions inside a Solidity contract, but I get a weird error: Untitled:5:13: Error: Undeclared identifier. bytes32 d=keccak256(0x616263); The contract : pragma ...
3
votes
2answers
362 views

Wallet download checksum

I am having trouble verifying the checksum of the newest Etherum wallet download. On the download site it is not specified which hash algorithm was used to generate the checksum so on my Mac I tried. ...
6
votes
1answer
133 views

Support in Ethereum for PoWs algos other than Ethash

I read that Ethereum uses Ethash as proof of work algorithm. But since there are other PoWs like NeoScrypt (used by Phoenixcoin), scryptJane (used by LEOcoin). Is it possible to use the above ...
25
votes
2answers
16k views

When will the difficulty bomb make mining impossible?

I know the answer must be out there in the code already, but I couldn't figure out where exactly. Could someone do the maths for me: With block 200k the difficulty bomb started increasing the ...
13
votes
1answer
5k views

arguments of the sha256 function in Solidity

In Solidity, I find that the sha256 function can be used like this a = sha256(uint b, string c, bool d, ......) (the arguments can be a combination of different types, and the other types can also be ...
22
votes
1answer
7k views

What is the cheapest hash function available in solidity?

AFAIK there are 3 hash functions to choose from in solidity (sha3, sha256, and ripemd). sha3 is native while the others use precompiled contracts. Which one of these is cheapest (in terms of gas)?
5
votes
1answer
478 views

Does bloom filter library for use in Solidity exist? [closed]

Since there are strict storage and computational limits forced by a VM some operations for enterprise-level contracts are impossible. Is there some Bloom filter implementation available in existing ...
25
votes
3answers
9k views

How does Solidity's sha3 / keccak256 hash uints?

This is not a question about the issue with Ethereum using a non-standard sha3. I have found the right JS hashing library, and am able to get matching hashes in JS and Solidity on byte strings. What I ...
10
votes
1answer
24k views

What is a block hash?

When we look at this block - what does the first number Hash: 0xfe88c94d860f01a17f961bf4bdfb6e0c6cd10d3fda5cc861e805ca1240c58553 actually mean? How is it calculated? "Nonce" is the value that is ...
4
votes
1answer
387 views

Why doesn't Ethereum do double hashing like Bitcoin?

Why doesn't Ethereum do double hashing like Bitcoin? What are the facts or theories on the security of single Keccak-256 hashing like Ethereum, as compared to Bitcoin's double hashing with SHA2-256? ...
9
votes
1answer
451 views

Are there any plans to switch Ethereum's primary hash algorithm from Keccak-256 to SHA3?

The Ethereum project was started before the SHA3 standard was finalised, and currently uses an earlier version of Keccak-256 which does not precisely match the FIPS-202 standard for SHA. Are there ...
94
votes
2answers
54k views

Which cryptographic hash function does Ethereum use?

Many sources refer to the use of the "SHA3" cryptographic hash function within Ethereum, but the Ethereum project began before the SHA3 standard was finalised, and there was some confusion/controversy ...

1
2