CN114626053A - Testing method and device for national secret authentication, national secret authentication program and system - Google Patents

Testing method and device for national secret authentication, national secret authentication program and system Download PDF

Info

Publication number
CN114626053A
CN114626053A CN202210243497.4A CN202210243497A CN114626053A CN 114626053 A CN114626053 A CN 114626053A CN 202210243497 A CN202210243497 A CN 202210243497A CN 114626053 A CN114626053 A CN 114626053A
Authority
CN
China
Prior art keywords
script
target
running
disc
target script
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
CN202210243497.4A
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.)
Shenzhen Huadian Communication Co ltd
Original Assignee
Shenzhen Huadian Communication 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 Shenzhen Huadian Communication Co ltd filed Critical Shenzhen Huadian Communication Co ltd
Priority to CN202210243497.4A priority Critical patent/CN114626053A/en
Publication of CN114626053A publication Critical patent/CN114626053A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2247Verification or detection of system hardware configuration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2268Logging of test results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The invention discloses a test method and a test device for national secret authentication, a national secret authentication program and a national secret authentication system. The invention comprises the following steps: acquiring a plurality of disc information corresponding to a plurality of discs, and determining a target disc according to the plurality of disc information; determining at least one national password to-be-tested item corresponding to the target disk, and calling at least one target script corresponding to the at least one national password to-be-tested item in the script library according to the national password to-be-tested item; controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log; and generating a test report corresponding to the target disk according to the at least one operation result and the at least one script operation log. The invention solves the problems that in the related technology, the testing steps are more, the testing time is long, the experience requirement on testing personnel for carrying out national secret authentication is high, the fault tolerance rate is low, and the work cannot be done from the beginning if the replacement of the personnel or the work handover is incomplete.

Description

Testing method and device for national password authentication, national password authentication program and system
Technical Field
The invention relates to the field of national secret authentication, in particular to a testing method and device for national secret authentication, a national secret authentication program and a national secret authentication system.
Background
In the related art, the national password authentication refers to applying security evaluation to a commercial password to a product, thereby obtaining an authentication certificate. The market pays more and more attention to the 'high-safety' product, and whether the product has a national secret certificate or not is an important standard for measuring the quality of the product. The solid state disk product and the chip thereof are subjected to state secret certification, only general requirements on results exist at present, and a test means and a test tool are not clear.
The test items of the national secret authentication test are many and complicated, and for a person who participates in the authentication work for the first time, the person needs to know how to issue a command capable of calling a product safety interface, what the preset condition is, and where the middle point needs to be noticed so as to avoid the damage of a test platform and a product caused by misoperation of the person; secondly, the requirements of national secret certification on products need to be known, and the safety interface needs to be reasonably tested, so that the test result is convincing; at the final stage, the evaluation center can evaluate whether the product meets the national password requirement according to the submitted test report and data. The test report is formed by the test results which are hidden in numerous logs, and the test personnel is required to paste key log screenshots in the report, and as for the test data, because the national secret certification is quite strict, the submitted data can be subjected to secondary detection, so that the data must be automatically verified firstly to ensure the quality of the submitted data to be guaranteed. The method needs a plurality of testing steps, has long testing time, has high experience requirement on testing personnel for carrying out national secret authentication, has low fault tolerance rate, and can cause no work to be done from the beginning if the personnel are replaced or the work is not completely handed over.
In view of the above problems in the related art, no effective solution has been proposed.
Disclosure of Invention
The invention mainly aims to provide a testing method and device for national secret authentication, a national secret authentication program and a national secret authentication system, which aim to solve the problems that in the related technology, the testing steps are multiple, the testing time is long, the experience requirement on testing personnel for carrying out the national secret authentication is high, the fault tolerance rate is low, and if the replacement of personnel or the work handover is incomplete, the work cannot be carried out from the beginning.
In order to achieve the above object, according to one aspect of the present invention, there is provided a test method of cryptographic certification. The invention comprises the following steps: acquiring a plurality of disc information corresponding to a plurality of discs, and determining a target disc according to the plurality of disc information, wherein the target disc is a disc to be tested, and the disc is a medium for data storage; determining at least one national password to-be-tested item corresponding to the target disk, and calling at least one target script corresponding to the at least one national password to-be-tested item in the script library according to the national password to-be-tested item; controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log, wherein the running result is any one of the following results: successful operation and failure operation; and generating a test report corresponding to the target disk according to the at least one operation result and the at least one script operation log.
Further, acquiring a plurality of disc information corresponding to a plurality of discs includes: and under the condition that the plurality of discs are detected to be accessed to the host through the back plate, issuing a disc scanning command, and scanning the plurality of discs according to the disc scanning command to acquire the information of the plurality of discs.
Further, before determining at least one national password to-be-tested item corresponding to the target disc and calling at least one target script corresponding to the at least one national password to-be-tested item in the script library according to the national password to-be-tested item, the method further includes: generating at least one target script; generating at least one target script, comprising: obtaining operation parameters corresponding to each target script, wherein the operation parameters at least comprise the following parameters: a disk operating instruction, a host operating instruction corresponding to the target script, a read-write IO instruction corresponding to the target script, a safe interface calling instruction corresponding to the target script, and a power-on/off instruction issued by the target script to the back panel; acquiring a function interface corresponding to each target script; acquiring script codes corresponding to the target scripts; and generating a target script according to the operation parameters, the function interface and the script code.
Further, before controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log, the method includes: determining the total number of target scripts; acquiring the running condition corresponding to each target script in real time, wherein the running condition is any one of the following conditions: the operation is finished and not finished; and determining the current test progress corresponding to the disk and displaying the current test progress on a preset display interface according to the total number of the target scripts and the running condition corresponding to each target script.
Further, controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script, including: judging whether the operation of each target script is finished; setting the running state of the target script to be successful under the condition that the target script completes the running process; under the condition that an error occurs in the running process of the target script, stopping the running process of the target script and setting the running state of the target script as failure; and determining the running result corresponding to the target script according to the running state of the target script.
Further, in the case of an error occurring during the running of the target script, the method further includes: judging whether the error is a preset error or not; and stopping the whole test process corresponding to the disc when the error is a preset error.
Further, generating a test report corresponding to the target disc according to the at least one operation result and the at least one script operation log, including: and summarizing the at least one operation result and the at least one script operation log to a test report template to generate a test report.
In order to achieve the above object, according to another aspect of the present application, there is provided a cryptographic authentication program that executes a cryptographic authentication test method of any one of the above.
In order to achieve the above object, according to another aspect of the present application, there is provided a cryptographic authentication system including the above cryptographic authentication program; a script library; the host computer is provided with a back plate for accommodating the disk, and the host computer is used for operating the national password authentication program.
In order to achieve the above object, according to another aspect of the present invention, there is provided a test apparatus for cryptographic certification. The device comprises: the first acquisition unit is used for acquiring a plurality of disc information corresponding to a plurality of discs and determining a target disc according to the plurality of disc information, wherein the target disc is a disc to be tested, and the disc is a data storage medium; the first determining unit is used for determining at least one national password to-be-tested item corresponding to the target disk and calling at least one target script corresponding to the at least one national password to-be-tested item in the script library according to the national password to-be-tested item; the control unit is used for controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log, wherein the running result is any one of the following results: the operation is successful and the operation is failed; and the first generating unit is used for generating a test report corresponding to the target disk according to the at least one operation result and the at least one script operation log.
In order to achieve the above object, according to another aspect of the present application, there is provided a computer-readable storage medium including a stored program, wherein the program executes a test method of cryptographic certification in any one of the above.
In order to achieve the above object, according to another aspect of the present application, there is provided a processor for executing a program, wherein the program executes a testing method of cryptographic certification according to any one of the above items.
The invention adopts the following steps: acquiring a plurality of disc information corresponding to a plurality of discs, and determining a target disc according to the plurality of disc information, wherein the target disc is a disc to be tested, and the disc is a data storage medium; determining at least one national password to-be-tested item corresponding to the target disk, and calling at least one target script corresponding to the at least one national password to-be-tested item in the script library according to the national password to-be-tested item; controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log, wherein the running result is any one of the following results: successful operation and failure operation; according to at least one operation result and at least one script operation log, a test report corresponding to a target disk is generated, and the problems that in the related technology, the number of test steps is large, the test time is long, the experience requirement on a tester for performing state secret authentication is high, the fault tolerance rate is low, and if the replacement of the tester or the work handover is incomplete, the worker can work without work, are solved, so that the test difficulty of the state secret authentication is reduced, and the test error is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart of a testing method for cryptographic certification according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a cryptographic authentication system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an interface main program of a cryptographic authentication system according to an embodiment of the present invention;
fig. 4 is a flowchart of the operation of a cryptographic authentication system according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a testing apparatus for national cryptographic certification according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged under appropriate circumstances in order to facilitate the description of the embodiments of the invention herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an embodiment of the invention, a testing method for national password certification is provided.
Fig. 1 is a flowchart of a testing method for cryptographic certification according to an embodiment of the present invention. As shown in fig. 1, the invention comprises the following steps:
step S101, acquiring a plurality of disc information corresponding to a plurality of discs, and determining a target disc according to the plurality of disc information, wherein the target disc is a disc to be tested, and the disc is a data storage medium.
The disk is a solid state disk and is used for storing data to be tested and determining the disk to be tested according to a plurality of pieces of disk information.
Step S102, at least one national password to-be-tested item corresponding to the target disk is determined, and at least one target script corresponding to the at least one national password to-be-tested item in the script library is called according to the national password to-be-tested item.
The national password is a domestic password algorithm identified by the national password administration. The script is an executable file written according to a certain format by using a specific descriptive language, and is also called as a macro or batch file, the script can be usually called and executed temporarily by an application program, the script library is a collection of a plurality of scripts, the script library comprises related scripts for the cryptographic test, each script corresponds to one cryptographic test item, and parameters in the script can be modified to adapt to different test requirements.
Step S103, controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log, wherein the running result is any one of the following results: the operation is successful and the operation is failed.
In the above, the target script collects script running logs in the running process of the cryptographic test, and when the running of different target scripts is completed, success, failure or the current disk security state may be returned, so as to obtain a running result, where the running result is success or failure in running.
And step S104, generating a test report corresponding to the target disk according to the at least one operation result and the at least one script operation log.
In the above, the target script sequentially runs to obtain a running result and a script running log, and a test report corresponding to the target disk is generated according to at least one running result and at least one script running log.
By the method, the script in the script library is special for the national secret test, the collected log and test data are automatic, the generated test report does not need manual collection, the script controls the backboard to be powered on and off during the national secret test, the manual operation is not needed, the test result is automatically judged after the national secret test is carried out, and the experience judgment of a tester is not needed.
In an optional example, acquiring a plurality of disc information corresponding to a plurality of discs includes: and under the condition that the plurality of discs are detected to be accessed to the host through the back plate, issuing a disc scanning command, and scanning the plurality of discs according to the disc scanning command to acquire the information of the plurality of discs.
The back plate is used for connecting the host and the disc, has the function of supplying power to the disc, disconnects or connects the power supply of the disc through a received power-down or power-up command, and is mainly used for enabling the disc to be in a locked state after the key is configured on the disc. The host is used for running a national password authentication tool and a platform of a target disk, can be a personal PC or a server, and can be configured with windows, Linux or other domestic system platforms according to the requirement. When detecting that a plurality of disks are connected to the host through the backboard, the backboard scans the plurality of disks to acquire a plurality of disk information when receiving a disk scanning command from the host.
In an optional example, before determining at least one secret to be tested item corresponding to the target disc, and calling at least one target script corresponding to the at least one secret to be tested item in the script library according to the secret to be tested item, the method further includes: generating at least one target script; generating at least one target script, comprising: obtaining operation parameters corresponding to each target script, wherein the operation parameters at least comprise the following parameters: a disk operating instruction, a host operating instruction corresponding to the target script, a read-write IO instruction corresponding to the target script, a safe interface calling instruction corresponding to the target script, and a power-on/off instruction issued by the target script to the back panel; acquiring a function interface corresponding to each target script; acquiring script codes corresponding to the target scripts; and generating a target script according to the operation parameters, the function interface and the script code.
The disk operating instructions comprise information query, disk scanning and the like, the host operating instructions corresponding to the target script comprise host time query, process monitoring and the like, the read-write IO instructions corresponding to the target script are instructions used by the CPU for controlling read-write input and output, the safety interface calling instructions corresponding to the target script comprise key management, identity authentication, SM2/SM3/SM4 and the like, and the power-up and power-down instructions issued by the target script to the back plate are used for disconnecting or connecting the disk power supply, so that the disk power-up and power-down are controlled through the script without manual operation. And acquiring the operating parameters corresponding to each target script, the function interface corresponding to each target script and the script code corresponding to the target script, and generating the target script according to the acquired content.
In an optional example, before controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log, the method includes: determining the total number of target scripts; acquiring the running condition corresponding to each target script in real time, wherein the running condition is any one of the following conditions: the operation is finished and not finished; and determining the current test progress corresponding to the disc and displaying the current test progress on a preset display interface according to the total number of the target scripts and the running condition corresponding to each target script.
And displaying the current test progress corresponding to the disk on a preset display interface according to the total number of the target scripts and the running condition corresponding to each target script.
In an optional example, controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script includes: judging whether the operation of each target script is finished; setting the running state of the target script to be successful under the condition that the target script completes the running process; under the condition that an error occurs in the running process of the target script, stopping the running process of the target script and setting the running state of the target script as failure; and determining the running result corresponding to the target script according to the running state of the target script.
The target script can identify the currently running script through the matching field, judge whether the current script runs successfully, and set the running state of the target script to be successful when the target script finishes the running process; and under the condition that an error occurs in the running process of the target script, stopping the running process of the target script, and setting the running state of the target script to be failed.
In an optional example, in case of an error occurring during the running of the target script, the method further includes: judging whether the error is a preset error or not; and stopping the whole test process corresponding to the disc when the error is a preset error.
In the foregoing, if a preset error occurs during the running of the target script, the disc cannot be used, and therefore, it is required to determine whether the error is the preset error, and if the error is the preset error, the whole test process corresponding to the disc is terminated.
In an optional example, generating a test report corresponding to the target disc according to the at least one operation result and the at least one script operation log includes: and summarizing the at least one operation result and the at least one script operation log to a test report template to generate a test report.
In the above way, the whole test flow is completed by the script, so that labor is saved, the running result and the script running log can be automatically collected by a field matching method and can be transmitted to the test report template to generate the test report, and time is saved.
The embodiment of the invention provides a testing method of national password authentication, which comprises the steps of obtaining a plurality of disc information corresponding to a plurality of discs, and determining a target disc according to the plurality of disc information, wherein the target disc is a disc to be tested, and the disc is a medium for data storage; determining at least one national password to-be-tested item corresponding to the target disk, and calling at least one target script corresponding to the at least one national password to-be-tested item in the script library according to the national password to-be-tested item; controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log, wherein the running result is any one of the following results: successful operation and failure operation; according to at least one operation result and at least one script operation log, a test report corresponding to a target disk is generated, and the problems that in the related technology, the number of test steps is large, the test time is long, the experience requirement on a tester for performing state secret authentication is high, the fault tolerance rate is low, and if the replacement of the tester or the work handover is incomplete, the worker can work without work, are solved, so that the test difficulty of the state secret authentication is reduced, and the test error is avoided.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present invention provides a national secret authentication program, and it should be noted that the national secret authentication program according to the embodiment of the present invention may be used to run the test method for national secret authentication provided by the embodiment of the present invention.
The embodiment of the invention provides a national secret authentication system, and it should be noted that the national secret authentication system provided by the embodiment of the invention can be used for operating the test method for the national secret authentication provided by the embodiment of the invention. A cryptographic authentication system according to an embodiment of the present invention is described below.
Fig. 2 is a schematic diagram of a cryptographic authentication system according to an embodiment of the present invention. As shown in fig. 2, the system includes: a national secret authentication program; a script library; the host computer is provided with a back plate for accommodating the disk, and the host computer is used for operating the national password authentication program.
The national password authentication program comprises two parts, one part is an interface main program, the operation of a user is convenient, after test information is simply configured, the test can be started by one key, and the test progress, the test report and the like are displayed to the user; the second part is related scripts of the national password test, and each script corresponds to one national password test item. The back board is connected with the host through an RS232 serial port and used for receiving power-off/power-on instructions, a disk slot on the back board is provided with a data port (SATA/pci) and a power port, one end of the data port is connected with a disk, the other end of the data port is connected with the host, and the power port is connected with a power supply of the host. Each script in the script library has a specific function interface and can be called by a main program.
As shown in fig. 3, fig. 3 is a schematic diagram of an interface main program of a cryptographic authentication system according to an embodiment of the present invention, where the interface main program has the functions of: the disc access system which needs to be tested currently is selected through a 'select disc' button. The test items contained in the national password test (each test item corresponds to a script in a script library) are displayed in the test item frame, the scripts in the frame can be selected, and the selected test items can be called by the main program for testing. And the main program summarizes the result and the log after each script is executed and displays the result and the log on a log display interface. After the disk and the test items to be executed are selected, clicking a START key to execute and generate a result, displaying the test progress in the test process, and exporting a key log, test data and a test report after the test is finished. When all the test items are successfully executed, the test result of the time is displayed in an execution result display frame, if all the selected test items are successful, the pass is displayed, and if some test items fail, the number of failures and the names of the failed items are displayed in the frame.
In an embodiment provided by the present invention, as shown in fig. 4, fig. 4 is a flowchart of a work flow of a cryptographic authentication system provided by an embodiment of the present invention, where the work flow is as follows: and inserting the disk on the back plate to access the host, and opening a national password test interface program. Clicking the button of selecting the disk, the program issues a disk scanning command to acquire the disk information, and the disk to be tested is selected. And checking the required test items, and clicking a key of a 'START' button to test. And the interface main program judges the scripts required to be operated in the test according to the selected test items, and all the scripts are sequentially executed. The script tests the cryptographic test item according to the flow in the script, if the script is normally executed in the running process, the state of the test item is set as successful, and an execution success log is stored according to the requirement; if an error occurs, the script is terminated, the state of the test item is set as failure, and the log is read and saved (if the disk cannot be used due to the occurrence of the fatal error, the whole test is terminated). And calculating the current test progress according to the total number and the execution condition of the selected scripts and displaying the current test progress on an interface. The log saved after each script is successfully executed is also displayed in the key log in real time. After all the scripts are executed, summarizing the test report template according to the execution condition of the scripts, and generating a test report. And clicking a result export button to store the test data, the test report and the related log into a specified directory.
Through the national secret authentication system, the program layout of the national secret test interface is simple and easy to understand, no complex flow exists, a tester can test by one key only by knowing own test objects and test items, the test difficulty is reduced, the risk of errors is avoided, the problems encountered in the test process can be visually displayed, and the log is saved, so that the problem reason can be conveniently located by a developer.
The embodiment of the invention also provides a testing device for national secret authentication, and it should be noted that the testing device for national secret authentication provided by the embodiment of the invention can be used for operating the testing method for national secret authentication provided by the embodiment of the invention. The following describes a testing apparatus for cryptographic certification according to an embodiment of the present invention.
Fig. 5 is a schematic diagram of a testing apparatus for national cryptographic certification according to an embodiment of the present invention. As shown in fig. 5, the apparatus includes: a first obtaining unit 501, configured to obtain a plurality of pieces of disc information corresponding to a plurality of discs, and determine a target disc according to the plurality of pieces of disc information, where the target disc is a disc to be tested, and the disc is a medium for storing data; the first determining unit 502 is configured to determine at least one national password to-be-tested item corresponding to the target disc, and call at least one target script corresponding to the at least one national password to-be-tested item in the script library according to the national password to-be-tested item; a control unit 503, configured to control at least one target script to sequentially run, so as to obtain at least one running result and at least one script running log corresponding to the at least one target script, where the running result is any one of the following results: successful operation and failure operation; the first generating unit 504 is configured to generate a test report corresponding to the target disc according to the at least one running result and the at least one script running log.
In an alternative example, the first obtaining unit 501 includes: and the scanning subunit is used for issuing a disc scanning command under the condition that the plurality of discs are detected to be accessed to the host through the back plate, and scanning the plurality of discs according to the disc scanning command to acquire the information of the plurality of discs.
In an optional example, the apparatus further comprises: the second generation unit is used for generating at least one target script before determining at least one national password to-be-tested item corresponding to the target disk and calling at least one target script corresponding to the at least one national password to-be-tested item in the script library according to the national password to-be-tested item; a second generating unit for generating at least one target script, comprising: the first obtaining subunit is configured to obtain an operation parameter corresponding to each target script, where the operation parameter at least includes the following parameters: a disk operating instruction, a host operating instruction corresponding to the target script, a read-write IO instruction corresponding to the target script, a safety interface calling instruction corresponding to the target script, and a power-on/off instruction issued by the target script to the back plate; the second acquiring subunit is used for acquiring a function interface corresponding to each target script; the third acquisition subunit is used for acquiring script codes corresponding to the target scripts; and the generating subunit is used for generating the target script according to the operating parameters, the function interface and the script code.
In an alternative example, the apparatus comprises: the second determining unit is used for determining the total number of the target scripts before controlling the at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log; a second obtaining unit, configured to obtain, in real time, an operation condition corresponding to each target script, where the operation condition is any one of: the operation is finished and not finished; and the third determining unit is used for determining the current test progress corresponding to the disc and displaying the current test progress on a preset display interface according to the total number of the target scripts and the running condition corresponding to each target script.
In an alternative example, the control unit 503 includes: the judging subunit is used for judging whether the operation of each target script is finished; the setting subunit is used for setting the running state of the target script to be successful under the condition that the target script completes the running process; the system comprises a stopping subunit, a running state setting subunit and a running state setting subunit, wherein the stopping subunit is used for stopping the running process of the target script and setting the running state of the target script to be failed under the condition that an error occurs in the running process of the target script; and the determining subunit determines an operation result corresponding to the target script according to the operation state of the target script.
In an optional example, the apparatus further comprises: the judging unit is used for judging whether the error is a preset error or not under the condition that the error occurs in the running process of the target script; and the stopping unit is used for stopping the whole testing process corresponding to the disc under the condition that the error is a preset error.
In an alternative example, the first generating unit 504 includes: and the summarizing subunit is used for summarizing the at least one operation result and the at least one script operation log to the test report template so as to generate a test report.
The testing device for national password authentication provided by the embodiment of the invention is used for acquiring a plurality of disc information corresponding to a plurality of discs through the first acquiring unit 501, and determining a target disc according to the plurality of disc information, wherein the target disc is a disc to be tested, and the disc is a medium for data storage; the first determining unit 502 is configured to determine at least one secret to be tested item corresponding to the target disc, and call at least one target script corresponding to the at least one secret to be tested item in the script library according to the secret to be tested item; a control unit 503, configured to control at least one target script to sequentially run, so as to obtain at least one running result and at least one script running log corresponding to the at least one target script, where the running result is any one of the following results: successful operation and failure operation; the first generating unit 504 is configured to generate a test report corresponding to the target disc according to at least one running result and at least one script running log, so that the problems that in the related art, many test steps are required, the test time is long, the experience requirement on a tester performing the country secret authentication is high, the fault tolerance rate is low, and if the replacement of the tester or the work handover is incomplete, the next step of the work cannot be performed are solved, and the effects of reducing the difficulty of testing the country secret authentication and avoiding the test error are achieved.
The testing device for national password certification comprises a processor and a memory, wherein the first obtaining unit 501 and the like are stored in the memory as program units, and the processor runs the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problems that in the related technology, many testing steps are needed, the testing time is long, the experience requirement on testing personnel for performing national secret certification is high, the fault tolerance rate is low, and the work cannot be done from the beginning if the replacement of the personnel or the work handover is incomplete are solved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
The embodiment of the invention provides a computer readable storage medium, wherein a program is stored on the computer readable storage medium, and the program realizes the testing method of the national secret authentication when being executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the testing method for the national password certification is run when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can be operated on the processor, wherein the following steps are realized when the processor operates the program: acquiring a plurality of disc information corresponding to a plurality of discs, and determining a target disc according to the plurality of disc information, wherein the target disc is a disc to be tested, and the disc is a medium for data storage; determining at least one national password to-be-tested item corresponding to the target disk, and calling at least one target script corresponding to the at least one national password to-be-tested item in the script library according to the national password to-be-tested item; controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log, wherein the running result is any one of the following results: successful operation and failure operation; and generating a test report corresponding to the target disk according to the at least one operation result and the at least one script operation log.
Further, acquiring a plurality of disc information corresponding to a plurality of discs includes: and under the condition that the plurality of discs are detected to be accessed to the host through the back plate, issuing a disc scanning command, and scanning the plurality of discs according to the disc scanning command to acquire the information of the plurality of discs.
Further, before determining at least one national password to-be-tested item corresponding to the target disc and calling at least one target script corresponding to the at least one national password to-be-tested item in the script library according to the national password to-be-tested item, the method further includes: generating at least one target script; generating at least one target script, comprising: obtaining operation parameters corresponding to each target script, wherein the operation parameters at least comprise the following parameters: a disk operating instruction, a host operating instruction corresponding to the target script, a read-write IO instruction corresponding to the target script, a safe interface calling instruction corresponding to the target script, and a power-on/off instruction issued by the target script to the back panel; acquiring a function interface corresponding to each target script; acquiring script codes corresponding to the target scripts; and generating a target script according to the operation parameters, the function interface and the script code.
Further, before controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log, the method includes: determining the total number of target scripts; acquiring the running condition corresponding to each target script in real time, wherein the running condition is any one of the following conditions: the operation is finished and not finished; and determining the current test progress corresponding to the disc and displaying the current test progress on a preset display interface according to the total number of the target scripts and the running condition corresponding to each target script.
Further, controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script, including: judging whether the operation of each target script is finished; setting the running state of the target script to be successful under the condition that the target script completes the running process; under the condition that an error occurs in the running process of the target script, stopping the running process of the target script and setting the running state of the target script as failure; and determining the running result corresponding to the target script according to the running state of the target script.
Further, in the case of an error occurring during the running of the target script, the method further includes: judging whether the error is a preset error or not; and stopping the whole test process corresponding to the disc when the error is a preset error.
Further, generating a test report corresponding to the target disc according to the at least one operation result and the at least one script operation log, including: and summarizing the at least one operation result and the at least one script operation log to a test report template to generate a test report.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The invention also provides a computer program product adapted to run a program which, when run on a data processing apparatus, is initialized with the method steps of: acquiring a plurality of disc information corresponding to a plurality of discs, and determining a target disc according to the plurality of disc information, wherein the target disc is a disc to be tested, and the disc is a medium for data storage; determining at least one national password to-be-tested item corresponding to the target disk, and calling at least one target script corresponding to the at least one national password to-be-tested item in the script library according to the national password to-be-tested item; controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log, wherein the running result is any one of the following results: successful operation and failure operation; and generating a test report corresponding to the target disk according to the at least one operation result and the at least one script operation log.
Further, acquiring a plurality of disc information corresponding to a plurality of discs includes: and under the condition that the plurality of discs are detected to be accessed to the host through the back plate, issuing a disc scanning command, and scanning the plurality of discs according to the disc scanning command to acquire the information of the plurality of discs.
Further, before determining at least one national password to-be-tested item corresponding to the target disc and calling at least one target script corresponding to the at least one national password to-be-tested item in the script library according to the national password to-be-tested item, the method further includes: generating at least one target script; generating at least one target script, comprising: obtaining operation parameters corresponding to each target script, wherein the operation parameters at least comprise the following parameters: a disk operating instruction, a host operating instruction corresponding to the target script, a read-write IO instruction corresponding to the target script, a safe interface calling instruction corresponding to the target script, and a power-on/off instruction issued by the target script to the back panel; acquiring a function interface corresponding to each target script; acquiring script codes corresponding to the target scripts; and generating a target script according to the operation parameters, the function interface and the script code.
Further, before controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script and at least one script running log, the method includes: determining the total number of target scripts; acquiring the running condition corresponding to each target script in real time, wherein the running condition is any one of the following conditions: the operation is finished and not finished; and determining the current test progress corresponding to the disc and displaying the current test progress on a preset display interface according to the total number of the target scripts and the running condition corresponding to each target script.
Further, controlling at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script, including: judging whether the operation of each target script is finished; setting the running state of the target script to be successful under the condition that the target script finishes the running process; under the condition that an error occurs in the running process of the target script, stopping the running process of the target script and setting the running state of the target script as failure; and determining the running result corresponding to the target script according to the running state of the target script.
Further, in the case of an error occurring during the running of the target script, the method further includes: judging whether the error is a preset error or not; and stopping the whole test process corresponding to the disc when the error is a preset error.
Further, generating a test report corresponding to the target disc according to the at least one operation result and the at least one script operation log, including: and summarizing the at least one operation result and the at least one script operation log to a test report template to generate a test report.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present invention, and are not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (12)

1. A testing method for national cryptographic certification is characterized by comprising the following steps:
acquiring a plurality of disc information corresponding to a plurality of discs, and determining a target disc according to the disc information, wherein the target disc is a disc to be tested, and the disc is a data storage medium;
determining at least one national password to-be-tested item corresponding to the target disk, and calling at least one target script corresponding to at least one national password to-be-tested item in a script library according to the national password to-be-tested item;
controlling the at least one target script to sequentially run to obtain at least one running result and at least one script running log corresponding to the at least one target script, wherein the running result is any one of the following results: successful operation and failure operation;
and generating a test report corresponding to the target disk according to at least one running result and at least one script running log.
2. The method of claim 1, wherein obtaining a plurality of disc information corresponding to a plurality of discs comprises:
and under the condition that the plurality of the discs are detected to be accessed to the host through the back plate, issuing a disc scanning command, and scanning the plurality of the discs according to the disc scanning command to acquire the information of the plurality of the discs.
3. The method of claim 1, wherein before determining at least one secret key item to be tested corresponding to the target disc and invoking at least one target script corresponding to the at least one secret key item to be tested in a script library according to the secret key item to be tested, the method further comprises:
generating at least one of the target scripts;
generating at least one of the target scripts, including:
obtaining operation parameters corresponding to each target script, wherein the operation parameters at least comprise the following parameters: a disk operating instruction, a host operating instruction corresponding to the target script, a read-write IO instruction corresponding to the target script, a safety interface calling instruction corresponding to the target script, and a power-on/off instruction issued by the target script to a back panel;
acquiring a function interface corresponding to each target script;
acquiring script codes corresponding to the target scripts;
and generating the target script according to the operating parameters, the function interface and the script code.
4. The method according to claim 1, wherein before controlling the at least one target script to run in sequence to obtain at least one running result corresponding to the at least one target script and at least one script running log, the method comprises:
determining a total number of the target scripts;
acquiring the running condition corresponding to each target script in real time, wherein the running condition is any one of the following conditions: the operation is finished and not finished;
and determining the current test progress corresponding to the disc and displaying the current test progress on a preset display interface according to the total number of the target scripts and the running condition corresponding to each target script.
5. The method according to claim 1, wherein controlling the at least one target script to sequentially run to obtain at least one running result corresponding to the at least one target script comprises:
judging whether the operation of each target script is finished;
setting the running state of the target script to be successful under the condition that the target script completes the running process;
under the condition that an error occurs in the running process of the target script, stopping the running process of the target script, and setting the running state of the target script to be failed;
and determining an operation result corresponding to the target script according to the operation state of the target script.
6. The method of claim 1, wherein in the event of an error in the running of the target script, the method further comprises:
judging whether the error is a preset error or not;
and stopping the whole test process corresponding to the disk under the condition that the error is a preset error.
7. The method of claim 1, wherein generating a test report corresponding to the target disc according to at least one of the running results and at least one of the script running logs comprises:
and summarizing at least one running result and at least one script running log to a test report template to generate the test report.
8. A national secret authentication program, wherein the national secret authentication program runs a testing method of the national secret authentication according to any one of claims 1 to 7.
9. A cryptographic authentication system, comprising:
the cryptographic authentication program of claim 8;
a script library;
the host computer is provided with a back plate, the back plate is used for containing a disc, and the host computer is used for operating the national password authentication program.
10. A testing device for national secret authentication is characterized by comprising:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring a plurality of disc information corresponding to a plurality of discs and determining a target disc according to the plurality of disc information, the target disc is a disc to be tested, and the disc is a medium for data storage;
the first determining unit is used for determining at least one national password to-be-tested item corresponding to the target disk and calling at least one target script corresponding to the at least one national password to-be-tested item in a script library according to the national password to-be-tested item;
a control unit, configured to control the at least one target script to sequentially run to obtain at least one running result and at least one script running log corresponding to the at least one target script, where the running result is any one of the following results: successful operation and failure operation;
and the first generating unit is used for generating a test report corresponding to the target disk according to at least one running result and at least one script running log.
11. A computer-readable storage medium, comprising a stored program, wherein when the program runs, the apparatus where the computer-readable storage medium is located is controlled to run a testing method of national secret authentication according to any one of claims 1 to 7.
12. A processor configured to run a program, wherein the program runs the testing method of the cryptographic certification according to any one of claims 1 to 7.
CN202210243497.4A 2022-03-11 2022-03-11 Testing method and device for national secret authentication, national secret authentication program and system Pending CN114626053A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210243497.4A CN114626053A (en) 2022-03-11 2022-03-11 Testing method and device for national secret authentication, national secret authentication program and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210243497.4A CN114626053A (en) 2022-03-11 2022-03-11 Testing method and device for national secret authentication, national secret authentication program and system

Publications (1)

Publication Number Publication Date
CN114626053A true CN114626053A (en) 2022-06-14

Family

ID=81901217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210243497.4A Pending CN114626053A (en) 2022-03-11 2022-03-11 Testing method and device for national secret authentication, national secret authentication program and system

Country Status (1)

Country Link
CN (1) CN114626053A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115760118A (en) * 2022-11-03 2023-03-07 鼎铉商用密码测评技术(深圳)有限公司 Commercial password detection method, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160004625A1 (en) * 2014-07-07 2016-01-07 Unisys Corporation Method of executing test scripts based on runtime test selection
CN108898018A (en) * 2018-07-23 2018-11-27 南方电网科学研究院有限责任公司 Program code security detection method, device and readable storage medium
CN109918338A (en) * 2019-03-11 2019-06-21 北京智芯微电子科技有限公司 Safety chip operating system testing device
CN110188011A (en) * 2019-05-28 2019-08-30 东信和平科技股份有限公司 A kind of smart card national secret algorithm test method and device
CN113220588A (en) * 2021-06-02 2021-08-06 北京锐安科技有限公司 Automatic testing method, device and equipment for data processing and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160004625A1 (en) * 2014-07-07 2016-01-07 Unisys Corporation Method of executing test scripts based on runtime test selection
CN108898018A (en) * 2018-07-23 2018-11-27 南方电网科学研究院有限责任公司 Program code security detection method, device and readable storage medium
CN109918338A (en) * 2019-03-11 2019-06-21 北京智芯微电子科技有限公司 Safety chip operating system testing device
CN110188011A (en) * 2019-05-28 2019-08-30 东信和平科技股份有限公司 A kind of smart card national secret algorithm test method and device
CN113220588A (en) * 2021-06-02 2021-08-06 北京锐安科技有限公司 Automatic testing method, device and equipment for data processing and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李兆斌;刘丹丹;黄鑫;曹浩;: "基于国密算法的安全接入设备设计与实现", 信息网络安全, no. 11, 10 November 2016 (2016-11-10) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115760118A (en) * 2022-11-03 2023-03-07 鼎铉商用密码测评技术(深圳)有限公司 Commercial password detection method, device and storage medium

Similar Documents

Publication Publication Date Title
CN104246714A (en) Software defect verification
CN111209206B (en) Automatic test method and system for software products
CN112269697B (en) Equipment storage performance testing method, system and related device
CN103364650A (en) Testing system and testing method
CN113051180B (en) Method, device, equipment and storage medium for monitoring test task
CN106547653A (en) Computer system fault condition detection method, apparatus and system
CA3127343A1 (en) Test data acquisition method and device, computer equipment and storage medium
CN107329914A (en) It is a kind of that the out of order method and device of hard disk is detected based on linux system
CN114626053A (en) Testing method and device for national secret authentication, national secret authentication program and system
CN113553226B (en) Startup and shutdown testing method, device, testing system, electronic equipment and storage medium
CN113538725B (en) Method for testing hardware products and related equipment
CN110941520A (en) Hardware function test system and method based on two-out-of-two safety control unit
CN110780904A (en) Application updating method and device
CN112463472B (en) Automatic testing method and device for disk array, electronic equipment and storage medium
CN111124774B (en) Method and related device for testing stability of server in starting process
CN111176917B (en) Method, system, terminal and storage medium for testing stability of CPU SST-BF function
CN112148599A (en) Performance pressure measurement method, device and equipment
CN117455401A (en) Verification method and device for emergency plan, electronic equipment and storage medium
CN111858208B (en) Standby function testing method, device, equipment and medium of processor chip
KR20120111618A (en) Apparatus and method for testing plc command
CN105405220A (en) Method and device for automated test
CN113094281B (en) Test method and device for hybrid App
CN114265735A (en) Equipment testing method, system, device and computer readable storage medium
CN111737130B (en) Public cloud multi-tenant authentication service testing method, device, equipment and storage medium
CN114911656A (en) Automatic IPMI instruction testing method, single chip microcomputer and related device

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