%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Copyright: 2010 Integrated Sytems Laboratory, ETH Zurich
%%            http://www.iis.ee.ethz.ch/~sha3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [o] = shiftbytes(in)
%ShiftBytes transformation
%Shifts all bytes in row i of the state matrix to the left by i postions
%wrap around
o=in;
for i=2:8
    for j=1:8,
        o(i,j)=in(i,mod(j+(i-2),8)+1);
    end
end
end

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