%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Copyright: 2010 Integrated Sytems Laboratory, ETH Zurich
%%            http://www.iis.ee.ethz.ch/~sha3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function y = reduce(x)

if x < 0
    
    x = x;
end;

if x > 0
    y = bitand(x, 255) - bitshift(x,-8);
else
    y = mod(x,257);
end

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