An apparatus for protecting software of a mobile terminal, comprising a main chip of the mobile terminal, an encryption chip and a hardware protection circuit;
- wherein
- the main chip of the mobile terminal is configured to, when the mobile terminal is turned on, detect whether or not the encryption chip is invalid, interact with the encryption chip when the encryption chip is not invalid, and authenticate the software of the mobile terminal;
- the encryption chip is configured to interact with the main chip of the mobile terminal, authenticate the software of the mobile terminal, and notify the hardware protection circuit to control a functional module of the mobile terminal when the authentication is not passed, wherein the encryption chip is mounted in the mobile terminal and information in the encryption chip cannot be modified by the main chip of the mobile terminal;
- and
- the hardware protection circuit is configured to, according to the notification from the encryption chip, control the functional module of the mobile terminal;
- wherein the encryption chip is configured to send a secret key configured to authenticate the software of the mobile terminal to the main chip of the mobile terminal;
- wherein when the encryption chip, in a set period of time, receives an authentication failure message or does not receive a matched secret key sent by the main chip of the mobile terminal, it indicates that the authentication is not passed;
- when the encryption chip receives an authentication passed message or the matched secret key, it indicates that the authentication is passed;
- accordingly, the main chip of the mobile terminal is further configured to, after receiving said secret key configured to authenticate the software of the mobile terminal from the encryption chip, search a secret key matched with said secret key in the main chip itself;
- return the matched secret key or an authentication passed message to the encryption chip when the secret key matched with said secret key is found;
- and return an authentication failure message or not return the matched secret key to the encryption chip when the secret key matched with said secret key is not found or not searched;
- accordingly, the apparatus further comprises a computer configured to set secret keys matched with each other in the encryption chip and in the main chip of the mobile terminal, respectively;
- or, the encryption chip is configured to read a status of a GPIO interface of the encryption chip;
- wherein when the status of the GPIO interface changes according to a preset period, it indicates that the authentication is passed;
- when the status of the GPIO interface does not change according to the preset period, it indicates that the authentication is not passed;
- accordingly, the main chip of the mobile terminal is further configured to preset a changing period of the status of the GPIO interface, and sets its own GPIO high or low according to the period.