Test method for security database cryptographic module boundary

Through testing methods for the boundaries of secure database password modules, including underlying password card testing, password module functional testing and non-password module detection, the problems of insufficient data security and lack of boundary division in the existing technology are solved, and accurate isolation verification and systematic testing of database security functions are realized, and data security and integrity are enhanced.

CN119782192AActive Publication Date: 2025-04-08TIANJIN NANKAI UNIV GENERAL DATA TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510281446.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-04-08
Estimated Expiration
2045-03-11

AI Technical Summary

Technical Problem

The existing technology has several significant shortcomings in data security, including relying on operating system security capabilities and open source cryptography algorithms, which leads to insufficient security strength and cannot meet the national secret algorithm and hardware-level protection requirements in highly sensitive fields; traditional testing methods fail to clearly divide the boundaries between password modules and non-cryptographic modules, and cannot independently verify the effectiveness of password functions to ensure data security, which poses a risk of affecting the basic performance of the database; existing security tests lack the ability to coordinate detection of multi-dimensional security mechanisms.

Method used

A test method for the boundary of a secure database password module is proposed, including underlying password card testing, password module functional testing and non-password module detection. By installing the password card hardware and verifying its compatibility, using the M1 algorithm and SM3 verification code combination for storage encryption detection, establishing an encryption channel through the SSL protocol for communication encryption verification, identity authentication verification based on hash encryption password, and system integrity testing is performed using SM3 digest algorithm and SM2 signature algorithm.

Benefits of technology

It realizes accurate testing of the boundaries of the secure database password module. Through the hierarchical cryptographic boundary testing architecture, it ensures accurate isolation and verification of security functions and business functions, and provides a systematic testing solution for database deployment in high-security scenarios, enhancing data security and integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782192A_ABST
    Figure CN119782192A_ABST
Patent Text Reader

Abstract

The invention provides a method for testing the boundary of a secure database cryptographic module, which comprises the following steps of: installing cryptographic card hardware and verifying the compatibility of the cryptographic card hardware, including authority management, key performance and random number privilege detection; the M1 algorithm and the SM3 check code are combined to verify the data security so as to carry out storage encryption detection; establishing an encryption channel through an SSL protocol and implementing a dual-session test for communication encryption verification; performing identity authentication verification based on comparison between the Hash encryption password and a database table field; adopting an SM3 digest algorithm and an SM2 signature algorithm to carry out multi-stage protection verification so as to carry out system integrity testing; and verifying the basic functions of the database through a function regression test and a performance monitoring tool. The method has the beneficial effects that through a grading strategy of hardware compatibility verification, cryptographic module function decoupling test and non-cryptographic module independent detection, precise isolation verification of a security function and a service function is realized, and a systematic test scheme is provided for database deployment in a high-security scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer technology, and in particular relates to a testing method for the boundary of a security database password module. Background Art

[0002] As the demand for data security in e-government, government cloud platforms and enterprise core business systems continues to increase, a security database based on GBase 8s has built a data management platform that meets security standards by optimizing management functions, improving SQL standard compliance and enhancing security mechanisms on the basis of general databases.

[0003] However, the existing technology still has significant defects: first, data confidentiality and integrity rely on the security capabilities of the operating system and open source cryptographic algorithms, resulting in security strength being limited by the underlying environment, making it difficult to meet the mandatory requirements for national secret algorithms and hardware-level protection in highly sensitive fields such as telecommunications; second, traditional testing methods do not clearly divide the boundaries between cryptographic modules and non-cryptographic modules, and are unable to independently verify the effectiveness of cryptographic functions in protecting data security, posing a risk that cryptographic operations will affect the basic performance of the database; in addition, existing security tests mostly focus on single function verification, and lack the ability to collaboratively detect multi-dimensional security mechanisms such as storage encryption, communication protection, identity authentication, and system integrity. Summary of the invention

[0004] In view of this, the present invention aims to provide a testing method for the boundary of a secure database password module to at least solve one of the problems in the background technology.

[0005] To achieve the above object, the technical solution of the present invention is achieved as follows: A testing method for the boundary of a secure database password module, comprising: Low-level password card testing: Install the password card hardware and verify its compatibility, including permission management, key performance, and random number primality testing; Password module function test: including using the M1 algorithm and SM3 checksum combination to verify data security for storage encryption detection; establishing an encrypted channel through the SSL protocol and implementing a dual-session test for communication encryption verification; performing identity authentication verification based on the hash encryption password and database table field comparison; using the SM3 digest algorithm and SM2 signature algorithm for multi-level protection verification for system integrity testing; Non-cryptographic module detection: Verify the basic functions of the database through functional regression testing and performance monitoring tools.

[0006] Furthermore, the storage encryption detection includes: The M1 algorithm is used to encrypt and store data pages; The data page checksum is generated by the SM3 algorithm. When the checksum is abnormal, the database startup fails.

[0007] Furthermore, the dual-session test includes: Performing a user identity authentication process in the first session; Capture network data packets in the second session to verify whether any sensitive information is leaked in plain text.

[0008] Furthermore, the identity authentication verification includes: Match the hashed password with the hashed_password field in the sysuser:sysintauthusers table; When authentication fails three times in a row, the userstate field in the sysuser:sysuserext table is updated to a locked state.

[0009] Furthermore, the system integrity test includes: Use SM3 algorithm to generate program file digest value; The SM2 signature algorithm is used to sign and protect the summary value; Integrity verification is achieved by verifying the signature when the system starts.

[0010] Furthermore, the integrity check includes: Detect the system response when the password card is not installed or the driver is abnormal; Stop loading of program files with damaged integrity in real time during system startup; Periodically perform safety subsystem self-tests.

[0011] Furthermore, the present solution discloses an electronic device, including a processor and a memory that is communicatively connected to the processor and is used to store executable instructions of the processor, wherein the processor is used to execute a testing method for the boundary of a secure database password module.

[0012] Furthermore, the present solution discloses a server comprising at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor so that the at least one processor executes a testing method for the boundary of a secure database cryptographic module.

[0013] Furthermore, the present solution discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements a testing method for the boundary of a secure database cryptographic module.

[0014] Compared with the prior art, the testing method for the boundary of a secure database password module described in the present invention has the following beneficial effects: The present invention discloses a testing method for the boundary of a password module of a secure database, based on the hardware of a national secret authentication password card, and proposes a hierarchical password boundary testing architecture. Through a hierarchical strategy of hardware compatibility verification, password module function decoupling test, and non-cryptographic module independent detection, it realizes precise isolation verification of security functions and business functions, and provides a systematic testing solution for database deployment in high-security scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings: Figure 1 A schematic diagram of a testing method for the boundary of a secure database password module according to an embodiment of the present invention. DETAILED DESCRIPTION

[0016] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0017] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0018] This solution discloses a testing method for the boundary of a secure database password module. The specific solution is as follows: A testing method for the boundary of a secure database password module, comprising: Low-level password card testing: Install the password card hardware and verify its compatibility, including permission management, key performance, and random number primality testing; Password module function test: including using the M1 algorithm and SM3 checksum combination to verify data security for storage encryption detection; establishing an encrypted channel through the SSL protocol and implementing a dual-session test for communication encryption verification; performing identity authentication verification based on the hash encryption password and database table field comparison; using the SM3 digest algorithm and SM2 signature algorithm for multi-level protection verification for system integrity testing; Non-cryptographic module detection: Verify the basic functions of the database through functional regression testing and performance monitoring tools.

[0019] The storage encryption detection includes: The M1 algorithm is used to encrypt and store data pages; The data page checksum is generated by the SM3 algorithm. When the checksum is abnormal, the database startup fails.

[0020] Furthermore, the dual-session test includes: Performing a user identity authentication process in the first session; Capture network data packets in the second session to verify whether any sensitive information is leaked in plain text.

[0021] The identity authentication verification includes: Match the hashed password with the hashed_password field in the sysuser:sysintauthusers table; When authentication fails three times in a row, the userstate field in the sysuser:sysuserext table is updated to a locked state.

[0022] The system integrity test includes: Use SM3 algorithm to generate program file digest value; The SM2 signature algorithm is used to sign and protect the summary value; Integrity verification is achieved by verifying the signature when the system starts.

[0023] The integrity check includes: Detect the system response when the password card is not installed or the driver is abnormal; Stop loading of program files with damaged integrity in real time during system startup; Periodically perform safety subsystem self-tests.

[0024] The specific implementation methods of this embodiment include: Part 1: Testing of the underlying password card hardware, including installing the password card, installing the driver, and starting the password card management program to ensure that the password card hardware system can be used normally in the test environment without affecting the encryption program and password functions; ensuring perfect compatibility between the test environment and the password card by verifying authority / user management, key management detection, key performance detection, random number quality and primality detection.

[0025] Part 2: Functional testing within the password boundary of the upper-level database system, namely, the password module function test. The password module test design includes four parts: storage protection module, communication protection module, identity authentication and identification, and system integrity protection.

[0026] The storage protection module encryption and decryption uses the M1 algorithm to encrypt and protect the data page to prevent data from being illegally stolen. Therefore, the test design includes user data file encryption detection to ensure that user data is ciphertext and chunk files do not contain plaintext information. The storage protection module integrity protection uses the SM3 algorithm to record the data page checksum to prevent the data page from being illegally tampered with, thereby ensuring that the file integrity is protected by the password program. Once the file is damaged, the database service startup is abnormal, and the error warning message is clear. The communication protection module is encrypted through the communication interface SSL protocol provided by the password card. The test design includes identity authentication. Through the user password and digital certificate, the user certificate is verified during the user login and each session to ensure that the user session is processed and transmitted in a trusted path. The test method uses two sessions, one for executing the packet capture operation and the other for executing the user identity authentication process. If the user name, password and certificate information cannot be detected in the capture program log, it is considered to have passed.

[0027] The identity authentication and identification module protects the user password. The password is encrypted by hash encryption. The test design includes connecting to the database through password + certificate. If the password is hashed and encrypted and is consistent with the hashed_password field stored in the system table sysuser:sysintauthusers, the connection is successful and the test passes, otherwise it fails. Identification requires a password protection mechanism. The test design includes password failure limit detection. If the password fails three times, the account is locked. The fields of sysuser:sysuserext are userstate=1, lcfctimes=3, cflimits=3. After unlocking, the fields of sysuser:sysuserext are userstate=0, lcfctimes=0, cflimits=3.

[0028] The system integrity protection module provides a self-protection function for the security subsystem based on a cryptographic algorithm. The basic principle is: (1) Use the SM3 digest algorithm to generate a digest value and perform integrity verification on the protected data file (installation package, program file, etc.); (2) Use the SM2 signature / verification algorithm to perform integrity protection on the digest value; (3) Use the SM3 digest algorithm to perform integrity protection on the public key used by the SM2 signature / verification algorithm; the test design includes installation package file integrity protection detection, security system program file integrity protection detection at system startup, and system operation cycle self-check program detection. The detection process at each stage includes hardware not installed or underlying password card encryption card not loaded, hardware correctly installed password card driver loading, hardware correctly installed password card driver not loaded or re-unloaded, file integrity damage detection and failure correction during system startup, and password USB KEY status damage and correction detection during system startup.

[0029] Part 3: Cryptographic boundary, i.e., non-cryptographic module function testing, includes basic database function testing and performance testing. Functional regression testing is used to verify the integrity and correctness of non-cryptographic module functions, and performance testing tools are used to verify the stability of non-cryptographic module performance.

[0030] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0031] In the several embodiments provided in the present application, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the division of the units described above is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The above-mentioned units may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0032] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.

[0033] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A testing method for the boundary of a secure database password module, characterized in that: include: Bottom-layer password card test: Install the password card hardware and verify its compatibility, including permission management, key performance and random number primality detection. The verification process calls the EVP_EncryptInit_ex() function interface of the OpenSSL engine and performs a performance test of SM4-CBC algorithm single encryption time ≤ 2ms; Password module function test: including using the M1 algorithm and SM3 checksum combination to verify data security for storage encryption detection, encrypting by 512 bytes and generating SM3-256 checksum, triggering sgx_enclave_destroy() function to clear key memory when checksum is abnormal; establishing an encrypted channel through SSL protocol and implementing dual-session test for communication encryption verification; Based on the comparison between hash encrypted password and database table field, identity authentication is realized; SM3 digest algorithm and SM2 signature algorithm are used for multi-level protection verification to test system integrity; Non-cryptographic module detection: Verify the basic functions of the database through functional regression testing and performance monitoring tools.

2. A method for testing the boundary of a secure database password module according to claim 1, characterized in that: The storage encryption detection includes: The M1 algorithm is used to encrypt and store data pages; The data page checksum is generated by the SM3 algorithm. When the checksum is abnormal, the database startup fails.

3. A method for testing the boundary of a secure database password module according to claim 1, characterized in that: The dual-session test includes: Performing a user identity authentication process in the first session; Capture network data packets in the second session to verify whether any sensitive information is leaked in plain text.

4. A method for testing the boundary of a secure database password module according to claim 1, characterized in that: The identity authentication verification includes: Match the hashed password with the hashed_password field in the sysuser:sysintauthusers table; When authentication fails three times in a row, the userstate field in the sysuser:sysuserext table is updated to a locked state.

5. A method for testing the boundary of a secure database password module according to claim 1, characterized in that: The system integrity test includes: Use SM3 algorithm to generate program file digest value; The SM2 signature algorithm is used to sign and protect the summary value; Integrity verification is achieved by verifying the signature when the system starts.

6. A method for testing the boundary of a secure database password module according to claim 5, characterized in that: The integrity check includes: Detect the system response when the password card is not installed or the driver is abnormal; Stop loading of program files with damaged integrity in real time during system startup; Periodically perform safety subsystem self-checks; Including quantitative evaluation of performance loss: hook the kernel schedule() function through the eBPF program to count the CPU scheduling delay histogram, predict the performance loss trend based on the ARIMA model, and trigger the dynamic thread pool expansion thread_pool+=ceil(ΔQPS×1.2) when ΔQPS ≥ 5% for three consecutive sampling periods; Including attack surface protection: Decompile the cryptographic card driver through IDA Pro to generate an IOCTL call whitelist; Deploy eBPF program in API gateway to intercept illegal parameter calls (key_size∉{128,256} or iv=NULL); Block non-whitelisted password function calls at the database parser layer.

7. An electronic device, comprising a processor and a memory connected to the processor for storing instructions executable by the processor, characterized in that: The processor is used to execute a testing method for the boundary of a secure database password module as described in any one of claims 1-6.

8. A server, characterized in that: It includes at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor so that the at least one processor executes a testing method for the boundary of a secure database password module as described in any one of claims 1-6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer program implements a testing method for the boundary of a secure database password module as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for testing kernel mode driver interface of PCIe password card

    CN115525564A

  • Encryption and decryption module verification method and device, computer equipment and storage medium

    CN117494164A

  • Hardware cryptographic module based on domestic commercial cryptographic algorithm and implementation method thereof

    CN119276463A

  • Method and Apparatus for Out of Path Border Gateway Protocol Validation

    US20210105297A1