RC4 keystream bias, or parallel processing made easy with for_each/accumulate

RC4 is an obsolete cipher that was widely used just a decade ago, despite the fact that it has an exploitable statistical bias. This post shows how to compute the bias, using the neat modern C++ trick of parallel execution policies for the algorithms library, or for_each(std::execution::par). Complete code is available on GitHub. std::for_each() applies … Continue reading RC4 keystream bias, or parallel processing made easy with for_each/accumulate