Open dckc opened 6 days ago
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:
sha256
@cosmjs/crypto
node:crypto
@noble/hashes
exports
sketch: https://github.com/Agoric/agoric-sdk/pull/9576#discussion_r1655591371
cc @kriskowal
sha256 callers rely on cryptographic hash properties (other than constant time)
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.
@noble/hashes is extensively tested; any deviation should be carefully tested.
This would be a new feature.
What is the Problem Being Solved?
Importing
sha256
from@cosmjs/crypto
failed trying to importnode:crypto
. Attempts to work around that using a newer@noble/hashes
ran into a limitation around packageexports
: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.