lfsr and z2

z2 fix in modExp
lfsr sequence length for general case