%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Copyright: 2010 Integrated Sytems Laboratory, ETH Zurich
%%            http://www.iis.ee.ethz.ch/~sha3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [a, b] = mixword(a, b)
b=bitxor(b, a);
a=bitor(bitshift(a, 2), bitshift(a, 2-32));
a=bitxor(a, b);
b=bitor(bitshift(b, 14), bitshift(b, 14-32));
b=bitxor(b, a);
a=bitor(bitshift(a, 10), bitshift(a, 10-32));
a=bitxor(a, b);
b=bitor(bitshift(b, 1), bitshift(b, 1-32));
end

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