function Q = ElGamalDigitalSigAuthenticate(P,r,s,A,p,g)
%  Q = ElGamalDigitalSigAuthenticate(P,r,s,A,p,g)

left = mod(FastExp(A,r,p)*FastExp(r,s,p),p);
right = FastExp(g,P,p);
if left == right
    Q = P; %authentic digital signature
else
    fprintf('\rDigital signature does not authenticate.\r')
end

