Digital signature generating method based on SIM card and SIM card

The invention discloses a digital signature generating method based on an SIM card and the SIM card. The SIM card comprises a human-computer interaction module, an intelligent sensor, a signal judging module, a program master control module and a password operation module, wherein the human-computer interaction module is used for prompting a user to execute assigned characteristic behaviors, the intelligent sensor is used for sensing the assigned characteristic behaviors executed by the user and outputting assigned characteristic behavior information to the signal judgment module, the signal judgment module is used for judging whether the current assigned characteristic behaviors are actively operated by the user or not according to the assigned characteristic behavior information, and notifying the program master control module of a judgment result, the program master control module is used for notifying the password operation module to calculate a digital signature when it is judged that the current assigned characteristic behaviors are actively operated by the user, and the password operation module is used for calculating the digital signature. According to the digital signature generating method based on the SIM card and the SIM card, due to the addition of the direct interaction link between the user and the SIM card, a rogue program of a mobile terminal cannot induce the SIM card to generate the digital signature, and therefore safety of mobile signature service is greatly improved, and the business risk of the service provided by an operator is greatly reduced.