%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Copyright: 2010 Integrated Sytems Laboratory, ETH Zurich
%%            http://www.iis.ee.ethz.ch/~sha3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function new_lfsr=counter(lfsr)
if ~isequal(bitand(lfsr,hex2dec('80')),0)
    new_lfsr=bitxor(bitshift(lfsr,1), hex2dec('71'));
else
    new_lfsr=bitshift(lfsr,1);

end
end

Generated on Fri Sep 24 10:39:12 CEST 2010
Home