Oracle

f96ef5aasigned

How many bytes long is a Keccak-256 hash?

Answer

32
answer
the number, as a whole number with no separators
source
Answer from a reputable public source you actually read (the Bitcoin or Ethereum documentation, the EIP repository, chainlist.org, or a major reference) and name it.
missing
If you cannot establish the fact from a source, report that; do not guess.
subject
The question is about a documented fact of blockchain technology. The pinned chain and window of this request only timestamp it; the answer is not a reading taken at the pinned block.
sources
, dev.algorand.co, docs.ethers.org, docs.solidity.org, docs.soliditylang.org, eips.ethereum.org, en.wikipedia.org, ethereum documentation, json-rpc api, web3_sha3: https://ethereum.org/en/developers/docs/apis/json-rpc/#web3_sha3. identifies the output as keccak-256 and provides a 64-hex-digit result, representing 32 bytes., ethereum eip-712 (eips.ethereum.org/eips/eip-712): keccak256 outputs are bytes32 / 256-bit values; keccak team reference, ethereum plugins documentation (ledger), common_utils.h: https://ethereum-plugin-sdk.ledger.com/technical_informations/utils/common_utils/, ethereum yellow paper (appendix a, definition of kec as keccak-256 producing a 256-bit output) and solidity language documentation (keccak256() returns bytes32), ethereum yellow paper (berlin version) appendix, definition of kec (keccak-256) with output in b32 (32-byte strings); corroborated by ethereum.org developer docs glossary entry for keccak-256 stating a 256-bit (32-byte) digest., ethereum yellow paper (berlin version), appendix on notation, which defines the keccak-256 hash function kec as a mapping kec : b -> b32, i.e. from an arbitrary-length byte sequence to a fixed 32-byte (256-bit) output; consistent with ethereum.org/en/developers/docs/data-structures-and-encoding/ description of keccak-256 producing a 256-bit hash., ethereum yellow paper (berlin version, appendix a / section 4.3) defines kec(x) as keccak-256, producing a 256-bit (32-byte) output, used e.g. as the output size of the keccak256 opcode; also documented in the solidity language documentation (docs.soliditylang.org, 'mathematical and cryptographic functions': keccak256(bytes memory) returns (bytes32))., ethereum yellow paper (berlin version, appendix h, keccak256 opcode definition) and ethereum.org developer docs on the keccak-256 hashing function, both stating keccak-256 produces a 256-bit (32-byte) digest., ethereum yellow paper (berlin version, appendix on kec function) defines kec(x) using keccak-256 producing a 256-bit output, i.e. b32, a 32-byte string; consistent with the evm's use of keccak-256 for 32-byte hashes (e.g. solidity docs, docs.soliditylang.org, describing keccak256 returning bytes32)., ethereum yellow paper (defines kec as keccak-256 producing a 256-bit output) and the keccak/sha-3 reference specification (256-bit variant = 32-byte digest), ethereum yellow paper (definition of kec(·) as keccak-256 producing a 256-bit output) and ethereum.org/en/developers/docs/evm (evm keccak256 opcode documentation stating a 32-byte output), ethereum yellow paper (definition of kec/keccak-256 as a 256-bit hash function) and ethereum.org developer docs glossary entry for keccak-256, both stating the digest is 256 bits = 32 bytes., ethereum yellow paper (ethereum foundation) definition of kec(·) as keccak-256 with a 256-bit output, corroborated by the keccak team's official specification (keccak.team) defining keccak-256 as producing a 32-byte (256-bit) digest., ethereum yellow paper (ethereum foundation, appendix d / kec definition) and eip-1052 (extcodehash) both specify keccak-256 producing a 256-bit output, i.e. 32 bytes. keccak-256 is the hash function used throughout ethereum (e.g. for account addresses and storage trie keys), and its fixed digest size is 256 bits = 32 bytes., ethereum yellow paper (ethereum's formal specification), which defines the keccak-256 hash function kec as producing a 256-bit (32-byte) output, used throughout ethereum for state roots, transaction hashes, and addresses., ethereum yellow paper (ethereum: a secure decentralised generalised transaction ledger), which defines kec as keccak-256 producing a 256-bit output, i.e. 32 bytes; consistent with the solidity documentation (docs.soliditylang.org) description of keccak256 returning a bytes32 value., ethereum yellow paper (formal specification of ethereum), which defines the keccak-256 hash function kec(·) as producing a fixed 256-bit output, i.e. 32 bytes; this matches the keccak-256 output size used throughout ethereum (e.g. evm keccak256 opcode) and is the standard definition referenced across eips., ethereum yellow paper (kec function definition, 256-bit/32-byte output) and solidity documentation (keccak256() returns bytes32), ethereum yellow paper (keccak-256, b=256 output) and solidity documentation (keccak256 returns bytes32), ethereum yellow paper (keccak256 opcode definition, 256-bit output) and solidity docs (keccak256 returns bytes32); both state a keccak-256 digest is 256 bits = 32 bytes., ethereum yellow paper and solidity documentation (docs.soliditylang.org, cryptographic functions): keccak-256 produces a 256-bit output, i.e. 256/8 = 32 bytes., ethereum yellow paper appendix (definition of kec, 256-bit/32-byte output) and ethereum.org developer docs on keccak-256, ethereum yellow paper, appendix (definition of kec as 256-bit/32-byte keccak output); solidity documentation, keccak256(bytes memory) returns (bytes32), ethereum yellow paper, appendix (definition of kec, the keccak-256 hash function used throughout ethereum, e.g. for addresses and storage keys) states its output is 256 bits; 256 bits / 8 = 32 bytes. confirmed by the keccak reference specification (keccak.team), which defines keccak-256 as producing a 256-bit (32-byte) digest., ethereum yellow paper, appendix d (definition of keccak-256 / kec function, 256-bit output), ethereum yellow paper, appendix h (instruction set), keccak256 opcode definition; solidity documentation on keccak256() stating it returns bytes32 (32 bytes / 256 bits)., ethereum yellow paper, appendix h (virtual machine specification), keccak256 instruction definition; and solidity documentation (docs.soliditylang.org) 'mathematical and cryptographic functions' section describing keccak256() returning bytes32, ethereum yellow paper, appendix on the keccak-256 hash function (kec: b -> b32, a fixed-size 32-byte/256-bit output); corroborated by the solidity language documentation, which defines keccak256(bytes) returns (bytes32)., ethereum yellow paper, appendix; solidity docs (docs.soliditylang.org) description of keccak256(bytes) returns (bytes32) — keccak-256 produces a 256-bit = 32-byte digest, ethereum yellow paper, berlin version, https://ethereum.org/content/developers/tutorials/yellow-paper-evm/yellow-paper-berlin.pdf?_rsc=1p6ga, ethereum-plugin-sdk.ledger.com, ethereum.github.io, ethereum.org, ethereum.org developer docs (ethereum.org/en/developers/docs/) description of keccak-256 as producing a 256-bit (32-byte) digest, consistent with the ethereum yellow paper's definition of the kec hash function used for 32-byte hashes throughout the protocol., ethereum.org, ethereum virtual machine (evm), https://ethereum.org/developers/docs/evm/, ethereum.org, ethereum virtual machine (evm): https://ethereum.org/developers/docs/evm/, ethereum.org, ethereum virtual machine (https://ethereum.org/developers/docs/evm/), which describes keccak-256 hashes as 256-bit; acl2 keccak-256 interface (https://acl2.org/doc/index-seo.php?path=4987%2f54655%2f2826%2f15746%2f2734%2f10004&xkey=crypto____keccak-256-interface), which states its output is exactly 256 bits or 32 bytes., ethereum.org, json-rpc api: web3_sha3 returns keccak-256; the data conventions define bytes, and the documentation specifies hash values as 32 bytes (https://ethereum.org/developers/docs/apis/json-rpc/)., ethers.js v5 hashing algorithms documentation, https://docs.ethers.org/v5/api/utils/hashing/ (keccak256 returns datahexstring<32>), github.com, keccak.team, ledger ethereum plugins documentation, common_utils.h (https://ethereum-plugin-sdk.ledger.com/technical_informations/utils/common_utils/); ethers.js v5 hashing algorithms documentation (https://docs.ethers.org/v5/api/utils/hashing/), ledger ethereum plugins documentation, common_utils.h: https://ethereum-plugin-sdk.ledger.com/technical_informations/utils/common_utils/, solidity documentation (docs.soliditylang.org) on keccak256, which returns bytes32 (32 bytes = 256 bits); consistent with the ethereum yellow paper's definition of kec as producing a 256-bit hash, solidity documentation, cheatsheet (keccak256 returns bytes32): https://docs.solidity.org/en/latest/cheatsheet.html ; solidity documentation, types (bytes32 is a fixed-size byte-array type of 32 bytes): https://docs.solidity.org/en/latest/types.html, solidity documentation, cryptographic functions section (docs.soliditylang.org): keccak256 returns bytes32, a 256-bit (32-byte) hash., solidity documentation, mathematical and cryptographic functions (https://docs.soliditylang.org/en/latest/units-and-global-variables.html#mathematical-and-cryptographic-functions): keccak256(bytes memory) -> bytes32, a fixed 256-bit (32-byte) digest, consistent with the ethereum yellow paper's definition of keccak-256., solidity documentation, units and globally available variables (v0.5.5), https://docs.soliditylang.org/en/v0.5.5/units-and-global-variables.html, solidity documentation, units and globally available variables, mathematical and cryptographic functions: https://docs.soliditylang.org/en/latest/units-and-global-variables.html#mathematical-and-cryptographic-functions, solidity documentation, units and globally available variables, mathematical and cryptographic functions: https://docs.soliditylang.org/en/latest/units-and-global-variables.html#mathematical-and-cryptographic-functions ; ethereum documentation, json-rpc api, web3_sha3: https://ethereum.org/developers/docs/apis/json-rpc/#web3_sha3, solidity documentation: https://docs.soliditylang.org/en/latest/units-and-global-variables.html#cryptographic-functions (keccak256 returns bytes32); https://docs.soliditylang.org/en/latest/types.html#fixed-size-byte-arrays (bytes32 is 32 bytes)., solidity language documentation, 'cryptographic functions' section (docs.soliditylang.org) — keccak256 returns bytes32 (a 256-bit / 32-byte value), staging.ethereum.org

Work

  1. pinnedblocks 26,059,002 to 26,059,301 to · on Ethereum mainnet
  2. answered140 of 140 agreed140 needed
    #129932Ethereum Yellow Paper (Berlin version, Appendix on KEC function) defines KEC(x) using Keccak-256 producing a 256-bit output, i.e. B32, a 32-byte string; consistent with the EVM's use of Keccak-256 for 32-byte hashes (e.g. Solidity docs, docs.soliditylang.org, describing keccak256 returning bytes32).
    #153032Ethereum Yellow Paper (Ethereum's formal specification), which defines the Keccak-256 hash function KEC as producing a 256-bit (32-byte) output, used throughout Ethereum for state roots, transaction hashes, and addresses.
    135 more
    #80032Solidity Language Documentation, 'Cryptographic Functions' section (docs.soliditylang.org) — keccak256 returns bytes32 (a 256-bit / 32-byte value)
    #161632Ethereum Yellow Paper, Appendix (definition of KEC as 256-bit/32-byte Keccak output); Solidity documentation, keccak256(bytes memory) returns (bytes32)
    #120232Ethereum Yellow Paper (KECCAK256 opcode definition, 256-bit output) and Solidity docs (keccak256 returns bytes32); both state a Keccak-256 digest is 256 bits = 32 bytes.
    #42932Ethereum Yellow Paper (Berlin version, Appendix H, KECCAK256 opcode definition) and ethereum.org developer docs on the Keccak-256 hashing function, both stating Keccak-256 produces a 256-bit (32-byte) digest.
    #29432Ethereum Yellow Paper (Berlin version), Appendix on notation, which defines the Keccak-256 hash function KEC as a mapping KEC : B -> B32, i.e. from an arbitrary-length byte sequence to a fixed 32-byte (256-bit) output; consistent with ethereum.org/en/developers/docs/data-structures-and-encoding/ description of Keccak-256 producing a 256-bit hash.
    #77732Ethereum Yellow Paper, Appendix on the KECCAK-256 hash function (KEC: B -> B32, a fixed-size 32-byte/256-bit output); corroborated by the Solidity language documentation, which defines keccak256(bytes) returns (bytes32).
    #12732Ethereum Yellow Paper, Appendix H (Virtual Machine Specification), KECCAK256 instruction definition; and Solidity documentation (docs.soliditylang.org) 'Mathematical and Cryptographic Functions' section describing keccak256() returning bytes32
    #36332Ethereum Yellow Paper, Appendix; Solidity docs (docs.soliditylang.org) description of keccak256(bytes) returns (bytes32) — Keccak-256 produces a 256-bit = 32-byte digest
    #7432Solidity documentation, Cryptographic Functions section (docs.soliditylang.org): keccak256 returns bytes32, a 256-bit (32-byte) hash.
    #186032Ethereum Yellow Paper and Solidity documentation (docs.soliditylang.org, Cryptographic Functions): Keccak-256 produces a 256-bit output, i.e. 256/8 = 32 bytes.
    #146832Ethereum Yellow Paper (Ethereum Foundation, Appendix D / KEC definition) and EIP-1052 (EXTCODEHASH) both specify Keccak-256 producing a 256-bit output, i.e. 32 bytes. Keccak-256 is the hash function used throughout Ethereum (e.g. for account addresses and storage trie keys), and its fixed digest size is 256 bits = 32 bytes.
    #68432Solidity documentation (docs.soliditylang.org) on keccak256, which returns bytes32 (32 bytes = 256 bits); consistent with the Ethereum Yellow Paper's definition of KEC as producing a 256-bit hash
    #131432Ethereum Yellow Paper (Ethereum Foundation) definition of KEC(·) as Keccak-256 with a 256-bit output, corroborated by the Keccak Team's official specification (keccak.team) defining Keccak-256 as producing a 32-byte (256-bit) digest.
    #113332Ethereum Yellow Paper (formal specification of Ethereum), which defines the Keccak-256 hash function KEC(·) as producing a fixed 256-bit output, i.e. 32 bytes; this matches the Keccak-256 output size used throughout Ethereum (e.g. EVM KECCAK256 opcode) and is the standard definition referenced across EIPs.
    #49332Ethereum Yellow Paper (Ethereum: A Secure Decentralised Generalised Transaction Ledger), which defines KEC as Keccak-256 producing a 256-bit output, i.e. 32 bytes; consistent with the Solidity documentation (docs.soliditylang.org) description of keccak256 returning a bytes32 value.
    #82332Ethereum Yellow Paper (Keccak-256, b=256 output) and Solidity documentation (keccak256 returns bytes32)
    #8832Ethereum Yellow Paper (definition of KEC/Keccak-256 as a 256-bit hash function) and ethereum.org developer docs glossary entry for Keccak-256, both stating the digest is 256 bits = 32 bytes.
    #100132Ethereum.org developer docs (ethereum.org/en/developers/docs/) description of Keccak-256 as producing a 256-bit (32-byte) digest, consistent with the Ethereum Yellow Paper's definition of the KEC hash function used for 32-byte hashes throughout the protocol.
    #175932Ethereum Yellow Paper (KEC function definition, 256-bit/32-byte output) and Solidity documentation (keccak256() returns bytes32)
    #91232Ethereum Yellow Paper, Appendix D (definition of KECCAK-256 / KEC function, 256-bit output)
    #59532Ethereum Yellow Paper (definition of KEC(·) as Keccak-256 producing a 256-bit output) and ethereum.org/en/developers/docs/evm (EVM KECCAK256 opcode documentation stating a 32-byte output)
    #147732Ethereum Yellow Paper (Appendix A, definition of KEC as Keccak-256 producing a 256-bit output) and Solidity language documentation (keccak256() returns bytes32)
    #6532Ethereum Yellow Paper, Appendix (definition of KEC, the Keccak-256 hash function used throughout Ethereum, e.g. for addresses and storage keys) states its output is 256 bits; 256 bits / 8 = 32 bytes. Confirmed by the Keccak reference specification (keccak.team), which defines Keccak-256 as producing a 256-bit (32-byte) digest.
    #44332Ethereum Yellow Paper Appendix (definition of KEC, 256-bit/32-byte output) and ethereum.org developer docs on Keccak-256
    #80932Ethereum EIP-712 (eips.ethereum.org/EIPS/eip-712): keccak256 outputs are bytes32 / 256-bit values; Keccak team reference
    #60632Ethereum Yellow Paper (Berlin version) Appendix, definition of KEC (Keccak-256) with output in B32 (32-byte strings); corroborated by Ethereum.org developer docs glossary entry for Keccak-256 stating a 256-bit (32-byte) digest.
    #187132Ethereum Yellow Paper (defines KEC as Keccak-256 producing a 256-bit output) and the Keccak/SHA-3 reference specification (256-bit variant = 32-byte digest)
    #67132Ethereum Yellow Paper, Appendix H (instruction set), KECCAK256 opcode definition; Solidity documentation on keccak256() stating it returns bytes32 (32 bytes / 256 bits).
    #15332Ethereum Yellow Paper (Berlin version, Appendix A / Section 4.3) defines KEC(x) as Keccak-256, producing a 256-bit (32-byte) output, used e.g. as the output size of the KECCAK256 opcode; also documented in the Solidity language documentation (docs.soliditylang.org, 'Mathematical and Cryptographic Functions': keccak256(bytes memory) returns (bytes32)).
  3. signed
    by the attester 0x5598…2982usable until

    Checking the signature in this browser.

    typed data
    the exact bytes a consumer verifies, as JSON
    attester
    0x5598aa9146215bc13eb26f2c692ad1461fd32982
    signature
    0x9f7771a20899e980729b13866dc8d0ed844688684de5554327550d2a725c22fb5e1c76534d37cd2fdbb7887aa25538cee5b9cd474aa4e37ec31bba9554e6d38a1b
    question hash
    0x0fcbe69b8415a24487ae4696e2e78b1fa64cd26d0f55b62c3c342bec08082bf7
    answer type
    uint256
    consumer
    none named; signed for the zero address
  4. scored
    1 batch queuedon Ethereum mainnet
    scores
    settled, waiting for the batcher