debris / tiny-keccak

An implementation of Keccak derived functions specified in FIPS-202, SP800-185 and KangarooTwelve
Creative Commons Zero v1.0 Universal
193 stars 49 forks source link

Can a context that does not implement a separate XOF struct absorb and squeeze at the same time? #53

Open stackinspector opened 1 year ago

stackinspector commented 1 year ago

Some contexts implement separate XOF structs and provide IntoXof to convert to XOF structs, while others implement both Hasher and Xof traits directly. can the latter absorb and squeeze at the same time? Does the Keccak structure theoretically allow this?

burdges commented 1 year ago

See https://docs.rs/merlin/latest/merlin/

Also, you can obviously clone a hasher state whenever it'd be safe to rehash exactly the same data, and then have those two hashers diverge.