Hi Hannes, On Fri, Jan 14, 2022 at 6:44 PM Hannes Frederic Sowa <hannes@xxxxxxxxxxxxxxxxxxx> wrote: > I don't think we can argue our way out of this by stating that there are > no guarantees anyway, as much as I would like to change the hash > function as well. Shucks. Alright then. > As much as I know about the problems with SHA1 and would like to see it > removed from the kernel as well, I fear that in this case it seems hard > to do. I would propose putting sha1 into a compilation unit and > overwrite the compiler flags to optimize the function optimized for size > and maybe add another mode or knob to switch the hashing algorithm if > necessary. Already on it! :) https://lore.kernel.org/linux-crypto/20220114154247.99773-3-Jason@xxxxxxxxx/ > I haven't investigated recent research into breakage of SHA1, I mostly > remember the chosen-image and collision attacks against it. Given the > particular usage of SHA1 in this case, do you think switching the > hashing function increases security? Considering we're only using 64-bits of SHA-1 output, I don't think the SHA-1 collision attacks give you that much here. And it seems like there are other network-level security concerns with the whole scheme anyway. So it might not be the largest of matters. However... > I am asking because of the desire > to decrease the instruction size of the kernel Indeed this is what I was hoping for. Jason