$w[0-3] is prepared to be for the final-round while the pre-round will starting with $w[4-7] see here: https://github.com/phpseclib/phpseclib/pull/69/files#L0R606