endo
endo copied to clipboard
add sha256 a la base64
What is the Problem Being Solved?
Importing sha256 from @cosmjs/crypto failed trying to import node:crypto. Attempts to work around that using a newer @noble/hashes ran into a limitation around package exports:
- https://github.com/Agoric/testnet-load-generator/issues/115
Description of the Design
sketch: https://github.com/Agoric/agoric-sdk/pull/9576#discussion_r1655591371
cc @kriskowal
Security Considerations
sha256 callers rely on cryptographic hash properties (other than constant time)
Scaling Considerations
I'm not currently aware of a need to hash large quantities of data, so dropping down to native code isn't likely to have a significant impact.
Test Plan
@noble/hashes is extensively tested; any deviation should be carefully tested.
Compatibility / Upgrade Considerations
This would be a new feature.
ran into a limitation
Circumvented in #9576