CN113553114A - Control method and device for single-board CPLD encrypted loading, electronic equipment and storage medium - Google Patents

Control method and device for single-board CPLD encrypted loading, electronic equipment and storage medium Download PDF

Info

Publication number
CN113553114A
CN113553114A CN202010322118.1A CN202010322118A CN113553114A CN 113553114 A CN113553114 A CN 113553114A CN 202010322118 A CN202010322118 A CN 202010322118A CN 113553114 A CN113553114 A CN 113553114A
Authority
CN
China
Prior art keywords
cpld
loading
version information
file
board
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010322118.1A
Other languages
Chinese (zh)
Inventor
张志坚
曹力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Great Wall Technology Group Co ltd
Original Assignee
China Great Wall Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Great Wall Technology Group Co ltd filed Critical China Great Wall Technology Group Co ltd
Priority to CN202010322118.1A priority Critical patent/CN113553114A/en
Publication of CN113553114A publication Critical patent/CN113553114A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Abstract

The application provides a control method, a device, electronic equipment and a storage medium for encrypting and loading a single-board CPLD, wherein the method comprises the following steps: acquiring first version information, wherein the first version information is version information of a CPLD file corresponding to the operation expectation of the single-board CPLD; acquiring an encrypted CPLD file to be loaded according to the first version information and by combining the corresponding relation between the version information and the CPLD file in the server; comparing the first version information with original version information corresponding to a CPLD file currently configured by the single-board CPLD; and if the first version information is inconsistent with the original version information, decrypting and loading the encrypted CPLD file to be loaded, otherwise, stopping loading. The method discriminates the CPLD file through encryption and decryption calculation before the loading operation is executed on the single-board CPLD, so that the encryption loading control of the single-board CPLD is realized, only the CPLD file which passes the discrimination is loaded, the normal operation of the system is ensured, and the loading efficiency is high.

Description

Control method and device for single-board CPLD encrypted loading, electronic equipment and storage medium
Technical Field
The present application belongs to the field of computer communication technologies, and in particular, to a method and an apparatus for controlling encryption loading of a single board CPLD, an electronic device, and a storage medium.
Background
A Complex Programmable Logic Device (CPLD), which is a Device that forms Logic behavior in a product term structure, and a user can construct a large-scale digital integrated circuit with Logic function according to his own needs, and is widely applied to a storage control system. The initially designed CPLD can be used only after being loaded for the first time, and the loading processing of the CPLD for improving efficiency, reducing cost and enhancing user experience is also avoided.
However, the existing CPLD loading method generally loads the CPLD with the JTAG tool before testing the single-board CPLD, and in the process of loading the single-board CPLD, the loaded CPLD file cannot be discriminated, and all files can be loaded to the CPLD, so that the system is likely to be abnormal due to loading of an incorrect file.
Disclosure of Invention
In view of this, the embodiments of the present application provide a control method, an apparatus, an electronic device and a storage medium for encryption loading of a single board CPLD, which can realize discrimination of a loaded CPLD file and ensure normal operation of a single board CPLD system; and/or the first loading and upgrading loading of the single-board CPLD can be realized through the unique interface, so that the safety is good and the efficiency is high.
A first aspect of an embodiment of the present application provides a method for controlling encryption loading of a single board CPLD, where the method for controlling encryption loading of a single board CPLD includes:
acquiring first version information, wherein the first version information is version information of a CPLD file corresponding to the operation expectation of the single-board CPLD;
acquiring an encrypted CPLD file to be loaded according to the first version information and by combining the corresponding relation between the version information and the CPLD file in the server;
comparing the first version information with original version information corresponding to a CPLD file currently configured by the single-board CPLD;
and if the first version information is inconsistent with the original version information, decrypting and loading the encrypted CPLD file to be loaded, otherwise, stopping loading.
With reference to the first aspect, in a first possible implementation manner of the first aspect, before the step of obtaining, according to the first version information and in combination with a correspondence between version information in a server and a CPLD file, an encrypted CPLD file to be loaded, the method further includes:
for a CPLD file stored in a server, carrying out encryption calculation on the content of the CPLD file to obtain a hash value corresponding to the CPLD file, and compiling the hash value at the head of the CPLD file;
and reading the hash value compiled at the head of the CPLD file, and mapping and associating the hash value with the version information of the CPLD file to establish a corresponding relation between the hash value and the version information of the CPLD file.
With reference to the first aspect, in a second possible implementation manner of the first aspect, a unique interface is established between the server and the single board CPLD through a GPIO to simulate a JTAG timing sequence, and the step of decrypting and loading the to-be-loaded CPLD file includes:
and carrying out decryption calculation on the CPLD file to be loaded, and loading the decrypted CPLD file to be loaded into the single-board CPLD through the unique interface, wherein the loading comprises first loading or upgrading loading.
With reference to the first aspect or the first possible implementation manner of the first aspect or the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the step of obtaining the first version information includes:
and receiving a loading instruction which is expected to be generated by the server according to the operation of the single-board CPLD, and analyzing the loading instruction to obtain first version information.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the method for controlling encrypted loading of the single board CPLD includes:
carrying out encryption loading control on the single-board CPLD in a manual loading mode; and/or
And carrying out encryption loading control on the single-board CPLD in an automatic loading mode.
With reference to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the step of receiving a load instruction expected to be generated by a server according to a single board CPLD operation, and obtaining the first version information by analyzing the load instruction includes:
if the single-board CPLD is controlled to be encrypted and loaded in a manual loading mode, triggering a server to generate a loading instruction based on request information input by a user in the server and representing the operation expectation of the single-board CPLD;
and if the single-board CPLD is controlled to be encrypted and loaded in an automatic loading mode, triggering the server to automatically generate a loading instruction based on a loading strategy preset by the server.
A second aspect of the embodiments of the present application provides a control device for encryption loading of a single board CPLD, where the control device for encryption loading of a single board CPLD includes:
the system comprises a first obtaining module, a second obtaining module and a third obtaining module, wherein the first obtaining module is used for obtaining first version information, and the first version information is version information of a CPLD file corresponding to a single-board CPLD operation expectation;
the second obtaining module is used for obtaining the encrypted CPLD file to be loaded according to the first version information and by combining the corresponding relation between the version information in the server and the CPLD file;
the comparison module is used for comparing the first version information with original version information corresponding to a CPLD file currently configured by the single-board CPLD;
and the execution module is used for decrypting and loading the encrypted CPLD file to be loaded if the first version information is inconsistent with the original version information, and otherwise, stopping loading.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the control device for encrypting and loading the single board CPLD further includes:
and the loading submodule is used for carrying out decryption calculation on the CPLD file to be loaded and loading the decrypted CPLD file to be loaded into the single-board CPLD through the unique interface, wherein the loading comprises first loading or upgrading loading.
A third aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the control method for encryption loading of the single board CPLD according to any one of the first aspect when executing the computer program.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the control method for encryption loading of a single-board CPLD according to any one of the first aspects are implemented.
Compared with the prior art, the embodiment of the application has the advantages that:
the method comprises the steps of obtaining first version information, wherein the first version information is version information of a CPLD file corresponding to a single-board CPLD operation expectation; acquiring an encrypted CPLD file to be loaded according to the first version information and by combining the corresponding relation between the version information and the CPLD file in the server; comparing the first version information with original version information corresponding to a CPLD file currently configured by the single-board CPLD; and if the first version information is inconsistent with the original version information, decrypting and loading the encrypted CPLD file to be loaded, otherwise, stopping loading. The method can discriminate the CPLD file by encryption and decryption calculation to obtain the CPLD file to be loaded with the correct version before the loading operation is executed on the single-board CPLD, thereby realizing the encryption loading control on the single-board CPLD. In the method, only the CPLD file which passes the discrimination is loaded, so that the normal operation of the system is ensured, and the loading efficiency is high. According to the method, the only interface is established between the server and the single-board CPLD through the GPIO to simulate the JTAG time sequence, the first loading and upgrading loading of the single-board CPLD are completed through the only interface, and the safety is good.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a basic method of a control method for encryption loading of a single board CPLD according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a method for associating version information with a CPLD file based on a hash value in the control method for encryption loading of a single-board CPLD according to the embodiment of the present application;
fig. 3 is a hardware block diagram of a connection between a server and a single board CPLD according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a control device for encryption loading of a single board CPLD according to an embodiment of the present application;
fig. 5 is a schematic diagram of an electronic device of a control method for encryption loading of a single board CPLD according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
The embodiment of the application aims to provide a control method for encrypting and loading a single-board CPLD, wherein a CPLD file stored in a built-in memory of a server is encrypted to generate a hash value, and the hash value is compiled at the head of the CPLD file as version information corresponding to the CPLD file. And then, the CPLD file is screened according to the version information, and only the CPLD file with the correct version confirmed by screening can be subjected to decryption calculation and loading operation. Therefore, the situation that all files are loaded into the single-board CPLD is avoided, and the normal operation of the single-board CPLD system is ensured.
In some embodiments of the present application, please refer to fig. 1, and fig. 1 is a schematic flowchart of a basic method of a control method for encryption loading of a single board CPLD according to an embodiment of the present application. The details are as follows:
in step S101, first version information is obtained, where the first version information is version information of a CPLD file corresponding to a single-board CPLD operation expectation.
In this embodiment, the functions of the server may be implemented by being integrated into a Controller, and the Controller is called a Baseboard Management Controller (BMC). In this embodiment, the CPLD file is used to run a single board CPLD system. Technical personnel can create the CPLD file on the terminal according to actual requirements, or modify the original CPLD file to obtain a plurality of CPLD files with different versions. The CPLD files of different versions have differences in function and/or performance when used for operating a single board CPLD system, or the CPLD files of different versions and the original CPLD file. Moreover, each version of the CPLD file has unique version information corresponding thereto. In this embodiment, based on the operation expectation of the single board CPLD, the CPLD file of the version corresponding to the operation expectation of the single board CPLD may be loaded into the single board CPLD by the BMC, so as to implement the operation expectation of the single board CPLD. It can be appreciated that the operation of the single board CPLD is expected to be the function and performance that the single board CPLD system is expected to have in operation.
In step S102, according to the first version information, the encrypted CPLD file to be loaded is obtained in combination with the corresponding relationship between the version information in the server and the CPLD file.
In this embodiment, CPLD files of different versions created by a technician are all stored in a memory built in a server, and each CPLD file has one corresponding version information. Therefore, the BMC can traverse the built-in memory of the server based on the obtained first version information, and perform version verification on all the CPLD files stored in the memory by combining the corresponding relation between the version information and the CPLD files in the server to obtain the CPLD file corresponding to the first version information, wherein the obtained CPLD file corresponding to the first version information is the CPLD file to be loaded.
In some embodiments of the present application, please refer to fig. 2, and fig. 2 is a schematic flow chart of a method for associating version information with a CPLD file based on a hash value in a control method for encryption loading of a single-board CPLD according to an embodiment of the present application. The details are as follows:
in step S201, for a CPLD file stored in a server, performing encryption calculation on the content of the CPLD file to obtain a hash value corresponding to the CPLD file, and compiling the hash value at the head of the CPLD file;
in step S202, the hash value compiled at the header of the CPLD file is read, and the hash value is mapped and associated with the version information of the CPLD file, so as to establish a corresponding relationship between the hash value and the version information of the CPLD file.
In this embodiment, when a technician creates a CPLD file loaded by the single-board CPLD for the first time or creates a CPLD file updated iteratively by the single-board CPLD, the CPLD compiling tool completes the compiling of the CPLD file content, and then encrypts the CPLD file content by the hash algorithm to generate a hash value corresponding to the CPLD file content. And compiling the generated hash value at the head of the CPLD file. Furthermore, the encrypted CPLD file with the file header compiled with the hash value is stored in a memory built in the server so as to be loaded and used by the single-board CPLD. And for all the CPLD files stored in the server, reading the hash value compiled at the head of each CPLD file, and mapping and associating the hash value with the version information of the corresponding CPLD file to establish the corresponding relationship between the hash value and the version information of the CPLD file. That is, each CPLD file has a corresponding version information and a corresponding hash value in the memory, and the hash value is associated with the version information. Therefore, the BMC can obtain the hash value corresponding to the first version information according to the corresponding relation between the hash value and the version information of the CPLD file, and then traverse the hash value of the head of each encrypted CPLD file in the memory according to the hash value corresponding to the first version information, so that the encrypted CPLD file which is consistent with the hash value corresponding to the first version information is obtained from the memory as the CPLD file to be loaded by checking the hash value of the head of the CPLD file.
In step S103, the first version information is compared with the original version information corresponding to the CPLD file currently configured by the single board CPLD.
In this embodiment, the BMC reads the original version information corresponding to the CPLD file currently configured by the single board CPLD by querying the current operating state information of the single board CPLD, and then compares the first version information corresponding to the CPLD file to be loaded obtained by the BMC with the original version information corresponding to the CPLD file currently configured by the single board CPLD read by the BMC, thereby determining whether the original version information is consistent with the first version information, and further determining whether the CPLD file to be loaded needs to be loaded at present by the single board CPLD. It can be understood that, when determining whether the original version information is consistent with the first version information, the determination may also be performed by checking whether hash values corresponding to the original version information and the first version information are consistent.
In step S104, if the first version information is inconsistent with the original version information, the encrypted CPLD file to be loaded is decrypted and loaded, otherwise, the loading is stopped.
In this embodiment, the obtained first version information corresponding to the CPLD file to be loaded is compared with the read original version information corresponding to the CPLD file currently configured by the single board CPLD, and if the first version information is consistent with the original version information, it is indicated that the single board CPLD is already using the CPLD file to be loaded to operate the system, and the loading is stopped without updating at the current time. If the first version information is inconsistent with the original version information, it indicates that the current single-board CPLD does not use the CPLD file operating system to be loaded, and the loading operation needs to be executed on the single-board CPLD currently, that is, the encrypted CPLD file to be loaded can be decrypted, the content of the corresponding CPLD file to be loaded is obtained, and the content of the CPLD file to be loaded is loaded into the single-board CPLD.
The control method for encryption loading of the single-board CPLD provided in the above embodiment discriminates the CPLD file by encryption/decryption calculation before the loading operation is performed on the single-board CPLD, so that the encryption loading control of the single-board CPLD is realized, and only the CPLD file that is discriminated to pass is loaded, thereby ensuring normal operation of the system and high loading efficiency.
In some embodiments of the present application, please refer to fig. 3, and fig. 3 is a hardware block diagram of the connection between the server and the single board CPLD according to the embodiments of the present application. As shown in fig. 3, the unique interface 30 forming the connection is established between the server 10 and the single board CPLD20 by simulating JTAG timing through GPIO. Specifically, four General-purpose input/output pins (GPIOs) are configured in the server 10, and the four pins respectively simulate a test clock/programming clock input (TCK pin), a test data/programming data input (TDI pin), a test data/programming data output (TDO pin), and a test mode selection (TMS pin) in the JTAG timing sequence, and are connected to the single board CPLD20, so as to form a unique interface for connecting the server 10 and the single board CPLD 20. Therefore, the BMC in the server can write the running program (i.e., first loading operation) or update the running program (i.e., upgrade loading operation) for the single board CPLD through the unique interface. In this embodiment, if the loading operation needs to be executed on the single board CPLD currently, the BMC decrypts the CPLD file to be loaded obtained according to the first version information based on the hash algorithm to obtain the content of the CPLD file to be loaded, and then loads the decrypted content of the CPLD file to be loaded into the single board CPLD through the unique interface 30 established between the server 10 and the single board CPLD20, thereby implementing the first loading or the upgraded loading of the single board CPLD. The method comprises the steps of loading the CPLD file to be loaded into the single-board CPLD, and loading the CPLD file to be loaded into the single-board CPLD.
In some embodiments of the application, when the first version information is obtained, the server may generate a load instruction requesting to load the single board CPLD according to the single board CPLD operation expectation, and the BMC may obtain the first version information of the CPLD file corresponding to the single board CPLD operation expectation by receiving the load instruction and analyzing the load instruction. The BMC traverses a memory built in the server according to the first version information, and then checks all the CPLD files stored in the memory by combining the corresponding relation between the version information and the CPLD files in the server so as to obtain the CPLD files to be loaded corresponding to the first version information.
In some embodiments of the present application, the encryption loading control may be performed on the single board CPLD in a manual loading manner or an automatic loading manner. If the loading is manual loading, the server is triggered to generate a loading instruction based on the request information input by the user in the server and representing the operation expectation of the single-board CPLD. For example, a user needs to upgrade a CPLD file currently configured by the single board CPLD to a specific version, and at this time, the user can input request information representing the operation expectation of the single board CPLD in the server in a manual loading manner, so that the server generates a corresponding loading instruction according to the request information. And if the loading is automatic loading, triggering the server to automatically generate a loading instruction based on a loading strategy preset by the server. For example, the CPLD file of the latest version is always used and automatically updated by default, so that when the BMC is started, the version information in the CPLD file of the single board is automatically read, the memory built in the server is traversed according to the version information, whether the CPLD file of the latest version exists in the memory is found, and if the CPLD file of the latest version exists, the CPLD file of the latest version is loaded into the CPLD file of the single board.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
In some embodiments of the present application, please refer to fig. 4, where fig. 4 is a schematic structural diagram of a control device for encryption loading of a single board CPLD according to an embodiment of the present application, which is detailed as follows:
the control device for encrypting and loading the single-board CPLD comprises: a first obtaining module 401, a second obtaining module 402, a comparing module 403 and an executing module 404. The first obtaining module 401 is configured to obtain first version information, where the first version information is version information of a CPLD file corresponding to a single-board CPLD operation expectation. The second obtaining module 402 is configured to obtain, according to the first version information, the encrypted CPLD file to be loaded in combination with the correspondence between the version information in the server and the CPLD file. The comparing module 403 is configured to compare the first version information with original version information corresponding to a CPLD file currently configured by the single board CPLD. The execution module 404 is configured to decrypt and load the encrypted CPLD file to be loaded if the first version information is inconsistent with the original version information, and otherwise, stop loading.
In some embodiments of the present application, the control device for encrypting and loading a single board CPLD further includes: and loading the submodule. The loading submodule is used for carrying out decryption calculation on the CPLD file to be loaded and loading the decrypted CPLD file to be loaded into the single-board CPLD through the unique interface, wherein the loading comprises first loading or upgrading loading.
The control device for the encryption loading of the single-board CPLD corresponds to the control method for the encryption loading of the single-board CPLD one by one.
In some embodiments of the present application, please refer to fig. 5, and fig. 5 is a schematic diagram of an electronic device of a control method for encryption loading of a single board CPLD according to an embodiment of the present application. As shown in fig. 5, the electronic apparatus 5 of this embodiment includes: a processor 51, a memory 52 and a computer program 53 stored in said memory 52 and operable on said processor 51, such as a control program loaded by a single board CPLD encryption. When the processor 51 executes the computer program 52, the steps in the above-described control method embodiment for encrypting and loading the CPLD on each board are implemented. Alternatively, the processor 51 implements the functions of the modules/units in the above-described device embodiments when executing the computer program 53.
Illustratively, the computer program 53 may be partitioned into one or more modules/units that are stored in the memory 52 and executed by the processor 51 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 53 in the electronic device 5. For example, the computer program 53 may be divided into:
the system comprises a first obtaining module, a second obtaining module and a third obtaining module, wherein the first obtaining module is used for obtaining first version information, and the first version information is version information of a CPLD file corresponding to a single-board CPLD operation expectation;
the second obtaining module is used for obtaining the encrypted CPLD file to be loaded according to the first version information and by combining the corresponding relation between the version information in the server and the CPLD file;
the comparison module is used for comparing the first version information with original version information corresponding to a CPLD file currently configured by the single-board CPLD;
and the execution module is used for decrypting and loading the encrypted CPLD file to be loaded if the first version information is inconsistent with the original version information, and otherwise, stopping loading.
The electronic device may include, but is not limited to, a processor 51, a memory 52. Those skilled in the art will appreciate that fig. 5 is merely an example of an electronic device 5 and does not constitute a limitation of the electronic device 5 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the electronic device may also include input-output devices, network access devices, buses, etc.
The Processor 51 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 52 may be an internal storage unit of the electronic device 5, such as a hard disk or a memory of the electronic device 5. The memory 52 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 5. Further, the memory 52 may also include both an internal storage unit and an external storage device of the electronic device 5. The memory 52 is used for storing the computer programs and other programs and data required by the electronic device. The memory 52 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A control method for encryption loading of a single-board CPLD is characterized by comprising the following steps:
acquiring first version information, wherein the first version information is version information of a CPLD file corresponding to the operation expectation of the single-board CPLD;
acquiring an encrypted CPLD file to be loaded according to the first version information and by combining the corresponding relation between the version information and the CPLD file in the server;
comparing the first version information with original version information corresponding to a CPLD file currently configured by the single-board CPLD;
and if the first version information is inconsistent with the original version information, decrypting and loading the encrypted CPLD file to be loaded, otherwise, stopping loading.
2. The method for controlling encryption loading of a single board CPLD according to claim 1, wherein before the step of obtaining the CPLD file to be loaded encrypted according to the first version information in combination with the correspondence between the version information and the CPLD file in the server, the method further comprises:
for a CPLD file stored in a server, carrying out encryption calculation on the content of the CPLD file to obtain a hash value corresponding to the CPLD file, and compiling the hash value at the head of the CPLD file;
and reading the hash value compiled at the head of the CPLD file, and mapping and associating the hash value with the version information of the CPLD file to establish a corresponding relation between the hash value and the version information of the CPLD file.
3. The control method for encryption loading of a single board CPLD according to claim 1, wherein a unique interface is established between the server and the single board CPLD by simulating a JTAG timing sequence through a GPIO, and the step of decrypting and loading the CPLD file to be loaded includes:
and carrying out decryption calculation on the CPLD file to be loaded, and loading the decrypted CPLD file to be loaded into the single-board CPLD through the unique interface, wherein the loading comprises first loading or upgrading loading.
4. The method for controlling encryption loading of a single board CPLD according to any one of claims 1 to 3, wherein the step of obtaining the first version information includes:
and receiving a loading instruction which is expected to be generated by the server according to the operation of the single-board CPLD, and analyzing the loading instruction to obtain first version information.
5. The method for controlling encryption loading of a single board CPLD according to claim 4, wherein the method for controlling encryption loading of a single board CPLD includes:
carrying out encryption loading control on the single-board CPLD in a manual loading mode; and/or
And carrying out encryption loading control on the single-board CPLD in an automatic loading mode.
6. The method for controlling encryption loading of a single board CPLD according to claim 5, wherein the step of receiving a load instruction generated by a server according to an operation expectation of the single board CPLD and obtaining the first version information by analyzing the load instruction includes:
if the single-board CPLD is controlled to be encrypted and loaded in a manual loading mode, triggering a server to generate a loading instruction based on request information input by a user in the server and representing the operation expectation of the single-board CPLD;
and if the single-board CPLD is controlled to be encrypted and loaded in an automatic loading mode, triggering the server to automatically generate a loading instruction based on a loading strategy preset by the server.
7. A control device for encryption loading of a single board CPLD is characterized in that the control device for encryption loading of the single board CPLD comprises:
the system comprises a first obtaining module, a second obtaining module and a third obtaining module, wherein the first obtaining module is used for obtaining first version information, and the first version information is version information of a CPLD file corresponding to a single-board CPLD operation expectation;
the second obtaining module is used for obtaining the encrypted CPLD file to be loaded according to the first version information and by combining the corresponding relation between the version information in the server and the CPLD file;
the comparison module is used for comparing the first version information with original version information corresponding to a CPLD file currently configured by the single-board CPLD;
and the execution module is used for decrypting and loading the encrypted CPLD file to be loaded if the first version information is inconsistent with the original version information, and otherwise, stopping loading.
8. The apparatus for controlling loading and encryption of a CPLD on a board according to claim 7, wherein the apparatus for controlling loading and encryption of a CPLD on a board further comprises:
and the loading submodule is used for carrying out decryption calculation on the CPLD file to be loaded and loading the decrypted CPLD file to be loaded into the single-board CPLD through the unique interface, wherein the loading comprises first loading or upgrading loading.
9. An electronic device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor implements the steps of the control method of the cryptographic loading of the single board CPLD according to any one of claims 1 to 6 when executing said computer program.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the control method for encryption loading of a single board CPLD according to any one of claims 1 to 6.
CN202010322118.1A 2020-04-22 2020-04-22 Control method and device for single-board CPLD encrypted loading, electronic equipment and storage medium Pending CN113553114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010322118.1A CN113553114A (en) 2020-04-22 2020-04-22 Control method and device for single-board CPLD encrypted loading, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010322118.1A CN113553114A (en) 2020-04-22 2020-04-22 Control method and device for single-board CPLD encrypted loading, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113553114A true CN113553114A (en) 2021-10-26

Family

ID=78129322

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010322118.1A Pending CN113553114A (en) 2020-04-22 2020-04-22 Control method and device for single-board CPLD encrypted loading, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113553114A (en)

Similar Documents

Publication Publication Date Title
US7730545B2 (en) Test access control for secure integrated circuits
KR100832589B1 (en) Debugging a trusted component in a system
US20010005885A1 (en) Cryptographic policy filters and policy control method and apparatus
US9548867B2 (en) Method and apparatus for secure distribution of embedded firmware
US20130173899A1 (en) Method for Secure Self-Booting of an Electronic Device
CN109871312B (en) Interface testing method, device, equipment and readable storage medium
US7814334B2 (en) Method and apparatus for changing and adding activation keys for functions of digital content without having to change and recompile the digital content
US10691424B2 (en) Method for programming and terminal device
CN108920962B (en) Firmware downloading and signing checking method, firmware publishing method, mobile terminal and server
US5751595A (en) Method for building and verifying authenticity of a rule system
US10838742B1 (en) Multi-user hidden feature enablement in firmware
CN113553114A (en) Control method and device for single-board CPLD encrypted loading, electronic equipment and storage medium
CN112948233A (en) Interface testing method, device, terminal equipment and medium
CN115688120A (en) Secure chip firmware importing method, secure chip and computer readable storage medium
CN111190614A (en) Software installation method and computer equipment
CN115906046A (en) Trusted computing system and measurement method based on trusted computing system
CN111610996B (en) Method and system for upgrading, producing and sampling inspection of IC card personalized software
US7962796B2 (en) State testing device and methods thereof
CN114281065A (en) Electronic control unit flashing method and device for vehicle and diagnostic equipment
CN112579990A (en) Motor control program encryption method and device and terminal equipment
US11836255B1 (en) Microcontroller unit (MCU) secure boot
CN103942074A (en) Algorithm loading method and device
CN112579341A (en) Method and device for identifying whether radio frequency calibration data of mobile terminal is normal
CN115688087A (en) Equipment verification method and device and electronic equipment
CN117149645A (en) Method and system for detecting three-way code missing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination