Algorithm 1: the "n" parameter to Attest should not be there; the Attest function only takes the first three parameters.