Uh oh!
There was an error while loading. Please reload this page.
Add lifetime to CustomizedExtArg - #1561
Conversation
7bcd5d5 to
e6b7b52Compare
newpavlov
left a comment
There was a problem hiding this comment.
Hm, this is a bit unfortunate, but I guess it's the most practical solution with the current version of Rust.
tarcieri
commented
Apr 30, 2024
Hmm, this sort of API seems problematic for building generic abstractions over customized hashes. I think customization should probably be limited to a single bytestring in order to promote generic abstractions. The cSHAKE function name seems unrelated to customization, or rather to the extent it's related it's very much cSHAKE-specific. |
sylvainpelissier
commented
May 1, 2024
I agree It would make the trait more generic. Function name is used to build TupleHash, ParallelHash and KMAC from cSHAKE beside that I don't see other usage. For Blake2 it would handle the Salt parameter in addition to the Personalization but I don't know if it is used in practice. Do you want me to remove |
tarcieri
commented
May 3, 2024
@sylvainpelissier even if both constructions took 2-tuples of byte slices, the parameters aren't interchangeable: the cSHAKE function name is something very specific to cSHAKE.
That's my vote. I think for the purposes of generic abstractions for customization the best we can do is a single byte slice. |
newpavlov
commented
May 3, 2024
I am also fine with having simple byte slice customization only. |
sylvainpelissier
commented
May 5, 2024
I agree, I removed it in #1564. |
Add a explicit lifetime for
CustomizedExtArg. It seems to be needed. See RustCrypto/hashes#573.