Questions tagged [keccak]

keccak is a cryptographic family which is used in ethereum and nowerdays provides the standards for sha-3

Filter by
Sorted by
Tagged with
2
votes
0answers
646 views

On Ubuntu, I can't build sha3sum

I was following this article. When I saw that I've to have this keccak256-sum, I moved to this GitHub repo. But, when I am building it, it's giving below issue. $ make cc -Wall -Wextra -pedantic ...
1
vote
1answer
1k views

Save hash data with KECCAK-256 then reverse the process in PHP

I am saving data hashed with keccak-256 in Solidity and I am trying read that data with PHP, but cant seem to find any good solutions. I can get PHP to read off the data but I cant arrive at the same ...
9
votes
2answers
747 views

What if two ether functions have the same signature?

It should not be hard to find collision. There is only 4 294 967 296 possible signatures.
2
votes
1answer
334 views

WEB3.SHA3 JSON CURL

I am trying to convert the string function name Double(int256) to hash using the Keccak-256 SHA3 algorithm using web3sha3 for curl. In geth I use the command as such web3.sha3('double(int256)') and ...
3
votes
1answer
576 views

Ecrecover after eth_sign update with preamble

I've just discovered that with b59c839 geth is now pre-appending the string: *\x19Ethereum Signed Message:\n<length of message>* before signing the passed message. I've read here that to use ...
4
votes
1answer
1k views

How does keccak256 concatenate values inside a Solidity smart contract?

I'm developing a smart contract in Solidity in which I need to evaluate the hash of two concatenated bytes32. I don't have to concatenate the bytes32 since the sha3 function supports more than one ...
2
votes
1answer
5k views

Does Ethereum use Ethash or KECCAK-256 (an alias to SHA3) as hash function?

Ethdoccs says that the PoW algorithm Ethereum is using is Ethash. While I was searching around for information about Ethash, I ran across this post, which indicates KECCAK is the one. So what is ...
4
votes
1answer
2k 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/...
18
votes
1answer
13k 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 bits ...
3
votes
3answers
4k views

Keccak256(parameter) How to pass a string to be hashed?

I'm trying to do something that in theory is very simple: I want to pass a string like "hello" to a function and then compute the sha3/keccak256 hash. I think the problem is that if the parameter is a ...
4
votes
1answer
3k views

Different hash values for keccak256 functions?

In solidity i used the following command: keccak256(firstName, lastName, studentId); ->0x157effbe0a2f53d887ad79b0dc3e9eb6084c3025ae0114a253b8f94f83c1462d And, in NodeJS i used the following ...
2
votes
2answers
921 views

In Solidity, can i store the value of keccak_256 in bytes32?

var uniqueIdentifier = keccak_256(firstName+LastName+studentId); This line returns me a value and can i store that value in bytes32 in solidity?
0
votes
1answer
217 views

Solidity's Keccak256 function requires mining? [closed]

I have used keccak256 and passed 3 parameters. Does keccak256 require mining?
2
votes
1answer
6k 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; ...
7
votes
1answer
546 views

How to install and test Viper programming language?

Viper is a new functional, strongly typed, bounds/overflow-checking, fixed-point-decimal python syntax-based HLL. The repository does not inlcude any documentation yet. I built and installed ...
5
votes
1answer
570 views

Generate key in Ruby, import in Geth

I'm a Ruby newbie and I need to implement a Geth-compatible key import/export in Ruby. I was looking at the Geth implementation in Go, as well as keythereum. For generating the key, I am using the ...
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 ...
9
votes
2answers
3k views

What is topics[0] in Event logs?

Here's a snapshot from etherscan.io
24
votes
1answer
8k 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)?
25
votes
3answers
10k 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 ...
4
votes
1answer
431 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? ...
20
votes
2answers
7k views

Why aren't Solidity sha3 hashes not matching what other sha3 libraries produce?

Solidity has a function named sha3 and I tested it with an empty string input. It is not matching what other sha3 libraries produce. I see contracts written by others using the same sha3 function ...
9
votes
1answer
478 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 ...
97
votes
2answers
64k 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
3