haskell-crypto / cryptonite

lowlevel set of cryptographic primitives for haskell
Other
226 stars 139 forks source link

Hash data in 4GB chunks to avoid uint32_t overflow. #331

Closed chpatrick closed 4 years ago

chpatrick commented 4 years ago

This fixes #330.

I think hashFinalizePrefix could have the same issue if you give it a huge buffer though, and this doesn't fix it.

vincenthz commented 4 years ago

Thanks, that should do the job, but still cannot recommend of using the >4GB strict bytestring.

NorfairKing commented 4 years ago

This is being fixed without a regression test. What prevents this from being reintroduced?

nh2 commented 4 years ago

What prevents this from being reintroduced?

Nothing; we also don't know whether this completely fixes it everywhere (see PR description). We just upstreamed the fix that makes those functions that we use work.