endo icon indicating copy to clipboard operation
endo copied to clipboard

add sha256 a la base64

Open dckc opened this issue 1 year ago • 1 comments

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.

dckc avatar Jun 27 '24 14:06 dckc

ran into a limitation

Circumvented in #9576

turadg avatar Jul 12 '24 16:07 turadg