Boost logo

Boost :

From: Rainer Deyke (rdeyke_at_[hidden])
Date: 2024-12-08 12:33:22


On 08.12.24 12:04, Andrey Semashev via Boost wrote:
> On 12/7/24 03:16, Peter Dimov via Boost wrote:
> However, I still don't see the benefit of extending through subsequent
> calls to finalize() when the internal state is not larger than the hash
> value. Any input data that produce a particular hash value v will also
> produce the same extended value xv. And that would be true whether you
> perform extension through additional calls to finalize(), duplicating
> the baseline hash value or zero-extension. Of course, the contribution
> to uniqueness of individual bits in xv would be different in each case,
> but as far as the uniqueness of xv as a whole is concerned, there seems
> to be no difference.

One property of a good N bit hash is that picking M bits from that hash,
where M < N, produces a good M bit hash. This is not the case when the
original hash uses zero-extension, since the picked bits could all come
from zero-extension.

-- 
Rainer Deyke - rainerd_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk