Sorry, I've read and reread TFA but the concept still evades me. Is it that, since it's easier for a hash function to have higher entropy in the higher bits than in the lower ones, it would be more logical for hash tables to discard the lower bits and keep the higher ones?
Higher entropy in the higher bits is a property of addition and multiplication when the result has the same size as the operands (i.e. the result is taken modulo 2^N, which folds back the values exceeding the size of the result).
When other operations are used, there may be other bits with higher entropy. For example, when full-length multiplication is used (i.e. where the length of the result is the sum of the lengths of the operands), the middle bits have the highest entropy, not the top bits. On CPUs like the Intel/AMD x86-64 CPUs, where fast long multiplication instructions are available, this can be exploited in more performant hash functions and PRNGs.
In hash functions, additions and multiplications are frequently used together with rotations, in order to redistribute the entropy from the top bits to the bottom bits, during the following operations.
Honorary mention: byte swapping instructions (originally added to CPUs for endianness conversion) can also be used to redistribute entropy, but they're slightly slower than rotations on Intel, which is why I think they aren't utilized much.
Yes, that's my point. It's not true that all hash functions have this characteristic, but most fast ones do. (And if you're using a slow-and-high-quality hash function, the distinction doesn't matter, so might as well use top bits.)
While I generally like to reinvent the wheel, for hash functions I strongly recommend to use a proved good one. Djb2 by the venerable Daniel Bernstein satisfies all the requirements of TFA.
h = 5381
while still has data:
h = h * 33 + next_byte()
return h
PS of course if you think the multiplication is overkill, consider that it is nothing more than a shift and an addition.
Djb2 is hardly a proven good hash :) It's really easy to find collisions for it, and it's not seeded, so you're kind of screwed regardless. It's the odd middle ground between "safely usable in practice" and "fast in practice", which turns out to be "neither safe nor fast" in this case.
> Canonical isn’t making 6GB memory a hard requirement for Ubuntu 26.04. It will still install on machines that fall below the minimum requirement, but users will have to deal with slower performance.
I think we have quite different definition of "minimum requirement", then.
I think the author is too quick to dismiss the impact of the plugboard.
> IC attacks only the rotor settings [...] Once you’ve found the right rotors and positions, you can solve the plugboard separately using frequency analysis.
So two steps: first solve for rotor settings with IC analysis, then solve the plugboard.
But IC analysis can't find the solution, just propose a lot of candidates among which a human can spot the correct one by looking for intelligible German text. And how can you spot intelligible German text if some letters are swapped by the plugboard?
Yeah something is wrong there, and I don't see actual breaks in the post, though maybe I missed something. Solving the rotors to get to the plugboard isn't so easy! The permutation changes every character, as the rotors advance.
The choice of countries seems arbitrary. I thought the list was limited to EU nations, but Iceland and Norway are there. Then I thought it was EFTA countries, but Switzerland is missing. Then noted Belgium is also missing... I give up!
It wasn't actually that exact amount. It was "about 12 tons", and somebody did the 12000 kg / 29g calculation and used the answer with way too many significant digits. Probably the reporter trying to make the 12 ton number relatable.
(You might object that KitKats usually weigh 40g. So these were probably the new KitKat Icon F1 chocolates, which weigh exactly 29g.)
My brain went here too. I'm guessing that one box missed the truck (either it was damaged during loading or had a manufacturing defect), so a full shipment is 3 x 3 x 23 x 2000. So my SWAG:
The kind of meters we used to install 50 years ago would turn backwards if electricity flowed backwards.
So if you spent a week with the meter connected normally, then you swapped the input and output cables around for a week, the meter would be back at zero. Free electricity!
They used anti-tamper seals to make it more detectable, but there are ways around that sort of thing.
reply