24 ms·
> The usefulness of popcnt, et al, in cryptography was known at least as far back as Alan Turing Ok. Why?????????????? @gpderetta is correct at least in quoti
by _a_a_a_ 4y ago
> The usefulness of popcnt, et al, in cryptography was known at least as far back as Alan Turing
Ok. Why??????????????
@gpderetta is correct at least in quoting hacker's delight where it was also said to be rumoured the NSA wanted popcount but it was unclear to HD's author why they wanted it.
- moloch-hai 4y agoI think it is generally taken as useful in, specifically, cryptanalysis, presumably for estimating Hamming distance.
- rep_lodsb 4y agoIIRC the Colossus machine built during WW2 was basically counting the number of bits resulting from doing various boolean operations on the input. It was used to crack the Lorenz cipher, which XORed the plaintext with a pseudo-random keystream (generated using mechanical rotors!). Cryptography has advanced since then - and I'm not an expert - but there may still be statistical weaknesses that could be found by counting bits?
- gpderetta 4y agoOh right! Hacker's Delight might be where I read the story, and likely I misremember the details.
- kjs3 4y agoWhy?????????????? It accelerates the calculation of the Hamming weight of a vector or string. Hamming weight is useful lots of places in crypto, like helping frequency analysis, or observed power consumption attacks against crypto systems. It's useful in many other disciplines as well.