From 5d9f96ac3ea3cf256dd159aaae6db1db4074f532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Mon, 23 Jul 2018 16:44:29 +0200 Subject: [PATCH] EIP-1014: Use keccak256 name instead of sha3 Do not refer to the hash function as `sha3` because it is SHA3. Use more precise `keccak256` name. --- EIPS/eip-1014.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/EIPS/eip-1014.md b/EIPS/eip-1014.md index da654104..c2279255 100644 --- a/EIPS/eip-1014.md +++ b/EIPS/eip-1014.md @@ -10,7 +10,7 @@ created: 2018-04-20 ### Specification -Adds a new opcode at 0xf5, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to CREATE, except using `sha3(msg.sender ++ salt ++ init_code)[12:]` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. +Adds a new opcode at 0xf5, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to CREATE, except using `keccak256(msg.sender ++ salt ++ init_code)[12:]` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. ### Motivation @@ -18,6 +18,6 @@ Allows interactions to (actually or counterfactually in channels) be made with a #### Option 2 -Use `sha3(0xff ++ msg.sender ++ salt ++ init_code)[12:]` +Use `keccak256(0xff ++ msg.sender ++ salt ++ init_code)[12:]` -Rationale: ensures that addresses created with this scheme cannot collide with addresses created using the traditional `sha3(rlp([sender, nonce]))` formula, as 0xff can only be a starting byte for RLP for data many petabytes long. +Rationale: ensures that addresses created with this scheme cannot collide with addresses created using the traditional `keccak256(rlp([sender, nonce]))` formula, as 0xff can only be a starting byte for RLP for data many petabytes long.