Embodiments of this application disclose a
software integrity protection method and apparatus, and a
software integrity
verification method and apparatus. A protection process includes: A first device obtains a first
software package, where the first
software package includes a first signature made by a first party for a second
software package by using a first private key; and the first device performs a signing operation on the first
software package by using a second private key, to obtain a third software
package including a second signature, where the first private key is controlled by the first party, and the second private key is controlled by a second party. After the third software
package is sent to a second device, a
verification process includes: The second device obtains the first software package, where the first software package includes the first signature, the second signature, and the second software package; and the second device verifies the first signature and the second signature respectively based on a first public key and a second public key that are prestored, to obtain a
verification result. In this way,
software integrity protection is performed by using keys provided by a manufacturer and a user, to provide the user with a dual
software integrity verification basis, and a trust issue is resolved for the user.