%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 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