The present invention relates to a cryptographic method of protecting an electronic chip against fraud and a device including an electronic chip which is adapted to protect the electronic chip against fraud. The method includes: mixing (1) some or all of the input parameters (E.sub.m) to supply an output data item E'=(e'.sub.1, e'.sub.2, . . . , e'.sub.n, . . . , e'.sub.N)), changing (2) the state of a finite state automaton from an old state to a new state as a function of the data item E'=(e'.sub.1, e'.sub.2, . . . , e'.sub.n, . . . , e'.sub.N), and calculating (3) a certificate (S) by means of an output function having at least one state of the automaton as an input argument. The device includes: mixing means, a finite state automaton, and output means for calculating a certificate (S).