%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Copyright: 2010 Integrated Sytems Laboratory, ETH Zurich %% http://www.iis.ee.ethz.ch/~sha3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [s] = s1(x) a = [0 x(1:31)]; b = [x(3:32) zeros(1,2)]; c = circshift(x,[0 -8]); d = circshift(x,[0 -23]); s = xor(xor(a,b),xor(c,d));