A method of operating a secure programming system, the secure programming system comprising a first authentication module and a program burning system, the program burning system comprising a second authentication module, a first programmer, a first programming unit and a first security control unit, the method comprising steps of:
- (S1) using the first authentication module as a root authentication module to verify and issue a first certificate, wherein the first certificate comprises a first certificate public key, a first digital signature and a first information content used to identify the first certificate, the first certificate public key corresponds to a first certificate private key, and the first digital signature is signed by the first certificate private key;
- (S2) providing a first hash value and a first original information to the first authentication module by the second authentication module, wherein the first original information is used to generate the first hash value, the first authentication module uses the first certificate private key to encrypt a second hash value regenerated from the first original information provided by the second authentication module as a second digital signature, and generates a second certificate composed of the second digital signature signed by the first authentication module, and the first hash value is used for verification before the first authentication module signs the second hash value regenerated from the first original information, wherein the second certificate comprises the second digital signature signed by the first certificate private key of the first authentication module, a second information content used to identify the second certificate, the first information content of the first certificate, the first digital signature of the first certificate and a second certificate public key, the second certificate public key corresponds to a second certificate private key, and the second authentication module obtains the second certificate composed of the second digital signature and becomes a first relay authentication module authorized by the first authentication module to issue certificates on behalf of the first authentication module;
- (S3) while a first burning process is executed, the first programmer of the second authentication module served as the first relay authentication module using a first security control unit key generated by the first security control unit to decrypt a first encrypted job control package so as to extract a first payload;
- (S4) the first programmer generating a first verification code calculated from the first payload;
- (S5) the first programmer burning the first payload into a first programmable device;
- (S6) after the first payload is burned into the first programmable device, the first programmer reading the burnt first payload to calculate a second verification code;
- (S7) the first programmer verifying the first verification code and the second verification code, wherein when the first verification code and the second verification code are verified successfully, a first task is performed;
- (S8) while the first task is performed, executing a first certificate signing process to allow the second authentication module to provide a signed first certificate to the first programming unit;
- (S9) the first programming unit verifying the signed first certificate with the first certificate public key included in the first certificate issued by the first authentication module;
- (S10) when a verification result of the step S9 is correct, the first programmer generates a third verification code calculated according to the signed first certificate;
- (S11) the first programmer burning the first certificate into the first programmable device;
- (S12) the first programmer reading the burnt first certificate from the first programmable device and calculating a fourth verification code according to the burnt first certificate;
- (S13) the first programmer verifying the third verification code and the fourth verification code;
- and
- (S14) the first programming unit categorizing the first programmable device according to a verification result of the step S13, wherein when the verification result is successful, the first programmable device is categorized into a first output container representing a good output container.