NEWTON

NEWTON


Popular tags

    why does keccak256 replace sha256 in warp?

    Asked

    26 days ago

    26

    views


    0

    why does keccak256 replace sha256 in warp transpiler? I want to know: are they technically identical or different?

    I am asking because I haven't the support of sha256 on Github

    sha256 is not supported in warp, use keccak256 instead

      keccakwarptranspilernethermind

    vargastartup

    asked

    26 days ago


    1 answers

    0

    Accepted answer

    No their results are different, we recommend using keccak256 because the Cairo standard library has an implementation for it so Warp can support it. There is no sha256 implementation in the Cairo standard library yet. Since both of them output a 256 bit key in most cases you can replace sha256 with keccak256, there might other considerations to make depending on your protocol, example if there is an off-chain sha256 being checked on chain then you'll need to change the off-chain component. Additionally in real world solidity codebases we did not observe sha256 being used a lot, so its lower on our priority list compared to other features.

    0x25f2...C58830

    answered

    26 days ago

    Your answer

    NEWTON

    NEWTON