protected function _f(string $P, string $S, int $c, int $i): string
    {
        // compute U_1
        $U = $this->_prf->compute($P, $S . pack("N", $i));
        $result = $U;
        for ($x = 2; $x <= $c; ++$x) {
            // U_x receives feedback from U_{x-1}
            $U_x = $this->_prf->compute($P, $U);
            // add to XOR-sum
            $result ^= $U_x;
            $U = $U_x;
        }
        return $result;
    }