Skip to content
CCPEDIAby Unity Nodes
Discussions/Outreach/Keccack hash function in DamlForum ↗

Keccack hash function in Daml

Outreach1 posts264 views5 likesLast activity Mar 2023
HU
huwOP
Mar 2023

We had a need for the keccak256 hash function in Daml, and as this is not supported within Daml, we decided to implement this in Daml ourselves. Please check out our open source codebase if you have any need for this functionality – https://github.com/SynfiniDLT/daml-keccak.

In future perhaps it might be better if there was a built-in function in Daml for this. Although I’m not sure, I think the built-in sha256 algorithm is not actually written in Daml itself, but makes use of a lower level language to optimise for performance. Another issue we faced was that Daml does not have any built-in bit-level operators such as bitwise AND/XOR etc. (necessary for the keccak function). This made our implementation more complex and most likely less performant.

← Back to Discussions