NEWTON
Asked
3 months ago
34
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
vargastartup
asked
3 months ago
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
3 months ago
What hashing functions are available in Cairo? How are they secure?
How to modify keccak.cairo and/or packed_keccak.cairo to compute a 512bits keccak hash instead of 256 bits?
Cairo: How to reassign Uint256 in a conditional
How can I change solc compiler version in warp?
Is there a Cairo equivalent to Keccak256(abi.encode(parameters))?
Nethermind's warp error: JavaScript heap out of memory
How to transpile multiple contracts at once using warp?
Cairo: Getting function selector
Nethermind's warp error: JavaScript heap out of memory
Which oracle service provider is StarkNet using?
Can I transpile any solidity version?
ApeWorX: Why are the cairo and starknet plugins not installing properly?
Would anyone have a link or know how fast blocks would be generated on StarkNet after Regenesis ?
CairoLang error: `GatewayError: {'contract_address': ['Expected hex string, got: