<p>A method of controlling access to resources on a smart card, the method involving: providing a list of n questions for presentation to the user, where n is an integer; receiving from the user answers to questions among the list of n questions; determining how many of the received answers are correct; and if a sufficient number of the n questions was answered correctly, granting access to the resources on the smart card. The method involves recovering or restoring a PIN or password. The comparison of the questions is performed on the card via JAVA applets (Java Card). The information of the card is hashed or signed digitally.</p>