| CPC H04L 9/3247 (2013.01) [H04L 9/006 (2013.01); H04L 9/3263 (2013.01)] | 10 Claims | 

| 
               1. A software integrity protection method, comprising: 
            obtaining, by a first device, a first software package, wherein the first software package comprises a first signature and software, the first signature made by a first party for the software as part of a second software package using a first private key; 
                performing, by the first device, a signing operation on at least the software using a second private key, to obtain a third software package comprising a second signature and the software, wherein the first private key is controlled by the first party, and the second private key is controlled by a second party; 
                sending, by the first device, the third software package to a second device; 
                receiving, by the second device, the third software package; and 
                wherein the second device comprises a switching enable bit, and the method further comprises at least one of: 
              when the switching enable bit is invalid and a dual-root enable bit on the second device is valid: 
                  determining, by the second device, that the first signature and the second signature are both valid; and 
                    indicating, by the second device, that integrity verification on the software succeeds based on the switching enable bit being invalid, the dual-root enable bit being valid, and the first signature and second signature both being valid; or 
                  when the switching enable bit on the second device is valid: 
                  determining, by the second device, that the first signature is valid; and 
                    indicating, by the second device, that integrity verification on the software succeeds based a on the switching enable bit being valid and the first signature being valid; or 
                  when the switching enable bit is invalid and the dual-root enable bit on the second device is invalid: 
                  determining, by the second device, that the second signature is valid; 
                  and 
                indicating, by the second device, that integrity verification on the software succeeds based on the switching enable bit being invalid, the dual-root enable bit being invalid, and the second signature being valid. 
                   |