function y=secret(w,n)
%A program to encrypt a secret word and share it among n people
%Input w, secret word, in format w='secretword'
%Input n, the number of people with whom you wish to share the secret
%Output y, a vector whose ith entry corresponds to the piece of the secret shared with person i

a0=b26b10(w);

a=floor(100000*rand(1,n-1));
x=[1:n];

z=ones(n,n-1);

for j=[1:n-1]
z(:,j) = x.^j;
end

for i=[1:n]
y(i)=a0+sum(a.*z(i,:));
end

end


