```%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Copyright: 2010 Integrated Sytems Laboratory, ETH Zurich
%%            http://www.iis.ee.ethz.ch/~sha3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function a = subcrumb(a)
% tmp=a(1);
% a(3)=bitxor(a(3), a(2));
% a(1)=bitand(a(1), a(2));
% a(1)=bitxor(a(1), a(3));
% a(2)=bitcmp(a(2));
% a(3)=bitor(a(3), tmp);
% a(3)=bitxor(a(3), a(4));
% tmp=bitxor(tmp, a(1));
% a(4)=bitand(a(4), a(1));
% a(4)=bitxor(a(4), a(2));
% tmp=bitcmp(tmp);
% a(2)=bitor(a(2), a(3));
% tmp=bitxor(tmp, a(2));
% a(1)=bitxor(a(1), a(4));
% a(2)=bitand(a(2), a(3));
% a(2)=bitxor(a(2), a(4));
% a(3)=a(4);
% a(4)=tmp;

tmp  = a(1);
a(1) = bitor( a(2), a(1));
a(3) = bitxor( a(4), a(3));
a(2)  = bitcmp(a(2));
a(1) = bitxor( a(4), a(1));
a(4) = bitand( tmp, a(4));
a(2) = bitxor( a(4), a(2));
a(4) = bitxor( a(3), a(4));
a(3) = bitand( a(1), a(3));
a(1)  = bitcmp(a(1));
a(3) = bitxor( a(2), a(3));
a(2) = bitor( a(4), a(2));
tmp = bitxor( a(2), tmp);
a(4) = bitxor( a(3), a(4));
a(3) = bitand( a(2), a(3));
a(2) = bitxor( a(1), a(2));
a(1)  = tmp;

end
```

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