diff --git a/go/proofs.pb.go b/go/proofs.pb.go index dc401d1d..49ad173a 100644 --- a/go/proofs.pb.go +++ b/go/proofs.pb.go @@ -29,7 +29,7 @@ const ( HashOp_NO_HASH HashOp = 0 HashOp_SHA256 HashOp = 1 HashOp_SHA512 HashOp = 2 - HashOp_KECCAK HashOp = 3 + HashOp_KECCAK256 HashOp = 3 HashOp_RIPEMD160 HashOp = 4 HashOp_BITCOIN HashOp = 5 HashOp_SHA512_256 HashOp = 6 @@ -42,7 +42,7 @@ var HashOp_name = map[int32]string{ 0: "NO_HASH", 1: "SHA256", 2: "SHA512", - 3: "KECCAK", + 3: "KECCAK256", 4: "RIPEMD160", 5: "BITCOIN", 6: "SHA512_256", @@ -55,7 +55,7 @@ var HashOp_value = map[string]int32{ "NO_HASH": 0, "SHA256": 1, "SHA512": 2, - "KECCAK": 3, + "KECCAK256": 3, "RIPEMD160": 4, "BITCOIN": 5, "SHA512_256": 6, @@ -1172,73 +1172,73 @@ func init() { func init() { proto.RegisterFile("cosmos/ics23/v1/proofs.proto", fileDescriptor_5e599a3f914c9389) } var fileDescriptor_5e599a3f914c9389 = []byte{ - // 1048 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcb, 0x6e, 0x23, 0x45, - 0x14, 0x75, 0xd9, 0x6e, 0x3f, 0xae, 0x27, 0x49, 0x4f, 0x29, 0x82, 0x66, 0xc2, 0x38, 0x51, 0x4b, - 0x48, 0x21, 0x8c, 0x1c, 0x62, 0x27, 0xe1, 0x39, 0x1a, 0x6c, 0xa7, 0x67, 0x6c, 0x62, 0x62, 0x53, - 0x36, 0xa3, 0x81, 0x4d, 0xab, 0xe3, 0x94, 0xe3, 0xd6, 0xb8, 0x1f, 0xea, 0xee, 0x44, 0xce, 0x6c, - 0xf9, 0x81, 0x41, 0x91, 0xf8, 0x09, 0x24, 0xf8, 0x0d, 0x96, 0xb3, 0x64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0xab, 0x2c, 0x7a, 0x73, - 0x95, 0x45, 0x7f, 0x5e, 0x65, 0xd1, 0xeb, 0xeb, 0x6c, 0xe4, 0xcd, 0x75, 0x36, 0xf2, 0xc7, 0x75, - 0x36, 0xf2, 0xc3, 0xc6, 0xa9, 0x19, 0x74, 0xcf, 0x8e, 0x73, 0x6d, 0xc7, 0xda, 0x9e, 0xf8, 0x09, - 0x3d, 0x75, 0xbe, 0xe0, 0x83, 0xe3, 0x04, 0xff, 0x09, 0x2d, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, - 0x3f, 0x0e, 0x3c, 0xb5, 0xa4, 0x0a, 0x00, 0x00, + // 1050 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcb, 0x6e, 0xdb, 0x46, + 0x17, 0xd6, 0x48, 0xa2, 0x2e, 0x47, 0xbe, 0x30, 0x03, 0xe3, 0xff, 0xd9, 0xb8, 0x91, 0x0d, 0x02, + 0x05, 0x5c, 0x37, 0x90, 0x6b, 0xc9, 0x76, 0xaf, 0x41, 0x2a, 0xc9, 0x4c, 0xa4, 0x5a, 0xb5, 0xd4, + 0x91, 0x1a, 0xa4, 0xdd, 0x10, 0xb4, 0x3c, 0xb2, 0x88, 0x88, 0x17, 0x90, 0xb4, 0x21, 0x67, 0xdb, + 0x17, 0x48, 0x11, 0x20, 0x2f, 0x51, 0xa0, 0x7d, 0x8d, 0x2e, 0xb3, 0xec, 0xb2, 0xb0, 0x9f, 0xa0, + 0xbb, 0x76, 0x57, 0xcc, 0x0c, 0x75, 0xb3, 0x64, 0xc9, 0x59, 0x14, 0xdd, 0xf1, 0x9c, 0xf3, 0x7d, + 0x67, 0xce, 0x9c, 0xf9, 0x66, 0x0e, 0xe1, 0xfd, 0xb6, 0xe3, 0x5b, 0x8e, 0xbf, 0x63, 0xb6, 0xfd, + 0x7c, 0x61, 0xe7, 0x62, 0x77, 0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, 0x87, 0x9e, 0x39, 0x5f, 0xf0, 0x8f, 0x93, 0x04, 0xff, 0x0f, 0x2d, 0xfc, 0x13, 0x00, 0x00, + 0xff, 0xff, 0x97, 0x5c, 0xd2, 0xae, 0xa7, 0x0a, 0x00, 0x00, } func (m *ExistenceProof) Marshal() (dAtA []byte, err error) { diff --git a/js/src/generated/codecimpl.d.ts b/js/src/generated/codecimpl.d.ts index de86820e..1186f691 100644 --- a/js/src/generated/codecimpl.d.ts +++ b/js/src/generated/codecimpl.d.ts @@ -6,7 +6,7 @@ export namespace ics23 { NO_HASH = 0, SHA256 = 1, SHA512 = 2, - KECCAK = 3, + KECCAK256 = 3, RIPEMD160 = 4, BITCOIN = 5, SHA512_256 = 6, diff --git a/js/src/generated/codecimpl.js b/js/src/generated/codecimpl.js index 41753c86..65677752 100644 --- a/js/src/generated/codecimpl.js +++ b/js/src/generated/codecimpl.js @@ -25,7 +25,7 @@ $root.ics23 = (function() { * @property {number} NO_HASH=0 NO_HASH value * @property {number} SHA256=1 SHA256 value * @property {number} SHA512=2 SHA512 value - * @property {number} KECCAK=3 KECCAK value + * @property {number} KECCAK256=3 KECCAK256 value * @property {number} RIPEMD160=4 RIPEMD160 value * @property {number} BITCOIN=5 BITCOIN value * @property {number} SHA512_256=6 SHA512_256 value @@ -38,7 +38,7 @@ $root.ics23 = (function() { values[valuesById[0] = "NO_HASH"] = 0; values[valuesById[1] = "SHA256"] = 1; values[valuesById[2] = "SHA512"] = 2; - values[valuesById[3] = "KECCAK"] = 3; + values[valuesById[3] = "KECCAK256"] = 3; values[valuesById[4] = "RIPEMD160"] = 4; values[valuesById[5] = "BITCOIN"] = 5; values[valuesById[6] = "SHA512_256"] = 6; @@ -1244,7 +1244,7 @@ $root.ics23 = (function() { case 2: message.hash = 2; break; - case "KECCAK": + case "KECCAK256": case 3: message.hash = 3; break; @@ -1274,7 +1274,7 @@ $root.ics23 = (function() { case 2: message.prehashKey = 2; break; - case "KECCAK": + case "KECCAK256": case 3: message.prehashKey = 3; break; @@ -1304,7 +1304,7 @@ $root.ics23 = (function() { case 2: message.prehashValue = 2; break; - case "KECCAK": + case "KECCAK256": case 3: message.prehashValue = 3; break; @@ -1639,7 +1639,7 @@ $root.ics23 = (function() { case 2: message.hash = 2; break; - case "KECCAK": + case "KECCAK256": case 3: message.hash = 3; break; @@ -2307,7 +2307,7 @@ $root.ics23 = (function() { case 2: message.hash = 2; break; - case "KECCAK": + case "KECCAK256": case 3: message.hash = 3; break; diff --git a/proto/cosmos/ics23/v1/proofs.proto b/proto/cosmos/ics23/v1/proofs.proto index b72ff238..1c8b6ad7 100644 --- a/proto/cosmos/ics23/v1/proofs.proto +++ b/proto/cosmos/ics23/v1/proofs.proto @@ -9,7 +9,7 @@ enum HashOp { NO_HASH = 0; SHA256 = 1; SHA512 = 2; - KECCAK = 3; + KECCAK256 = 3; RIPEMD160 = 4; BITCOIN = 5; // ripemd160(sha256(x)) SHA512_256 = 6; diff --git a/rust/src/cosmos.ics23.v1.rs b/rust/src/cosmos.ics23.v1.rs index 7268cb32..eeef5534 100644 --- a/rust/src/cosmos.ics23.v1.rs +++ b/rust/src/cosmos.ics23.v1.rs @@ -270,7 +270,7 @@ pub enum HashOp { NoHash = 0, Sha256 = 1, Sha512 = 2, - Keccak = 3, + Keccak256 = 3, Ripemd160 = 4, /// ripemd160(sha256(x)) Bitcoin = 5, @@ -289,7 +289,7 @@ impl HashOp { HashOp::NoHash => "NO_HASH", HashOp::Sha256 => "SHA256", HashOp::Sha512 => "SHA512", - HashOp::Keccak => "KECCAK", + HashOp::Keccak256 => "KECCAK256", HashOp::Ripemd160 => "RIPEMD160", HashOp::Bitcoin => "BITCOIN", HashOp::Sha512256 => "SHA512_256", @@ -304,7 +304,7 @@ impl HashOp { "NO_HASH" => Some(Self::NoHash), "SHA256" => Some(Self::Sha256), "SHA512" => Some(Self::Sha512), - "KECCAK" => Some(Self::Keccak), + "KECCAK256" => Some(Self::Keccak256), "RIPEMD160" => Some(Self::Ripemd160), "BITCOIN" => Some(Self::Bitcoin), "SHA512_256" => Some(Self::Sha512256), diff --git a/rust/src/cosmos.ics23.v1.serde.rs b/rust/src/cosmos.ics23.v1.serde.rs index 0348cc7b..f3271dfd 100644 --- a/rust/src/cosmos.ics23.v1.serde.rs +++ b/rust/src/cosmos.ics23.v1.serde.rs @@ -983,7 +983,7 @@ impl serde::Serialize for HashOp { Self::NoHash => "NO_HASH", Self::Sha256 => "SHA256", Self::Sha512 => "SHA512", - Self::Keccak => "KECCAK", + Self::Keccak256 => "KECCAK256", Self::Ripemd160 => "RIPEMD160", Self::Bitcoin => "BITCOIN", Self::Sha512256 => "SHA512_256", @@ -1004,7 +1004,7 @@ impl<'de> serde::Deserialize<'de> for HashOp { "NO_HASH", "SHA256", "SHA512", - "KECCAK", + "KECCAK256", "RIPEMD160", "BITCOIN", "SHA512_256", @@ -1056,7 +1056,7 @@ impl<'de> serde::Deserialize<'de> for HashOp { "NO_HASH" => Ok(HashOp::NoHash), "SHA256" => Ok(HashOp::Sha256), "SHA512" => Ok(HashOp::Sha512), - "KECCAK" => Ok(HashOp::Keccak), + "KECCAK256" => Ok(HashOp::Keccak256), "RIPEMD160" => Ok(HashOp::Ripemd160), "BITCOIN" => Ok(HashOp::Bitcoin), "SHA512_256" => Ok(HashOp::Sha512256), diff --git a/rust/src/host_functions.rs b/rust/src/host_functions.rs index b9eb5b24..d4a6c53d 100644 --- a/rust/src/host_functions.rs +++ b/rust/src/host_functions.rs @@ -11,10 +11,10 @@ pub trait HostFunctionsProvider { /// The SHA-512 hash algorithm with its output truncated to 256 bits. fn sha2_512_truncated(message: &[u8]) -> [u8; 32]; - /// SHA-3-512 hash function. - fn sha3_512(message: &[u8]) -> [u8; 64]; + /// The Keccak-256 hash function. + fn keccak_256(message: &[u8]) -> [u8; 32]; - /// Ripemd160 hash function. + /// The Ripemd160 hash function. fn ripemd160(message: &[u8]) -> [u8; 20]; /// BLAKE2b-512 hash function. @@ -33,7 +33,7 @@ pub mod host_functions_impl { use blake2::{Blake2b512, Blake2s256}; use ripemd::Ripemd160; use sha2::{Digest, Sha256, Sha512, Sha512_256}; - use sha3::Sha3_512; + use sha3::Keccak256; pub struct HostFunctionsManager; impl HostFunctionsProvider for HostFunctionsManager { @@ -58,9 +58,9 @@ pub mod host_functions_impl { buf } - fn sha3_512(message: &[u8]) -> [u8; 64] { - let digest = Sha3_512::digest(message); - let mut buf = [0u8; 64]; + fn keccak_256(message: &[u8]) -> [u8; 32] { + let digest = Keccak256::digest(message); + let mut buf = [0u8; 32]; buf.copy_from_slice(&digest); buf } diff --git a/rust/src/ops.rs b/rust/src/ops.rs index d7da9a15..585ea824 100644 --- a/rust/src/ops.rs +++ b/rust/src/ops.rs @@ -42,7 +42,7 @@ pub(crate) fn do_hash(hash: HashOp, data: &[u8]) -> Ha HashOp::NoHash => Hash::from(data), HashOp::Sha256 => Hash::from(H::sha2_256(data)), HashOp::Sha512 => Hash::from(H::sha2_512(data)), - HashOp::Keccak => Hash::from(H::sha3_512(data)), + HashOp::Keccak256 => Hash::from(H::keccak_256(data)), HashOp::Ripemd160 => Hash::from(H::ripemd160(data)), HashOp::Bitcoin => Hash::from(H::ripemd160(&H::sha2_256(data)[..])), HashOp::Sha512256 => Hash::from(H::sha2_512_truncated(data)), @@ -157,6 +157,12 @@ mod tests { hash == decode("f775a8ccf8cb78cd1c63ade4e9802de4ead836b36cea35242accf31d2c6a3697"), "blake3 hash fails" ); + + let hash = do_hash::(HashOp::Keccak256, b"food"); + assert!( + hash == decode("a471c7c90860799b1facb54795f0a93d821fb727241025770865602471b765a8"), + "Keccak256 hash fails" + ); } #[test] diff --git a/rust/src/proto_descriptor.bin b/rust/src/proto_descriptor.bin index bb31fa46..709b343d 100644 Binary files a/rust/src/proto_descriptor.bin and b/rust/src/proto_descriptor.bin differ