A testing method for the boundary of secure database password modules

Through the layered cryptographic boundary testing architecture and national secret certification hardware, the problem of database security in highly sensitive areas relying on the operating system has been solved, and accurate verification of cryptographic module boundaries and multi-dimensional security testing have been achieved to ensure data security and integrity.

CN119782192BActive Publication Date: 2025-09-19TIANJIN NANKAI UNIV GENERAL DATA TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The database security of existing technologies in highly sensitive areas relies on operating systems and open source cryptographic algorithms, cannot independently verify the boundaries of cryptographic modules, and lacks the collaborative detection capabilities of multi-dimensional security mechanisms.

Method used

It adopts national secret certified password card hardware and adopts layered password boundary test architecture, including bottom password card test, password module function test and non-password module detection, using M1 algorithm, SM3 check code, SM2 signature algorithm, etc. for storage encryption, communication encryption, identity authentication and system integrity verification.

Benefits of technology

It achieves precise isolation and verification of the boundaries of secure database password modules, meets the systematic testing requirements of high-security scenarios, and ensures data security and integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782192B_ABST
    Figure CN119782192B_ABST
Patent Text Reader

Abstract

The present invention provides a testing method for the boundaries of a secure database cryptographic module, comprising: installing cryptographic card hardware and verifying its compatibility, including authority management, key performance, and random number primality testing; using the M1 algorithm and SM3 checksum combination to verify data security for storage encryption testing; establishing an encrypted channel through the SSL protocol and implementing a dual-session test for communication encryption verification; performing identity authentication verification based on a comparison between a hash-encrypted password and a database table field; using the SM3 digest algorithm and the SM2 signature algorithm for multi-level protection verification for system integrity testing; and verifying basic database functions through functional regression testing and performance monitoring tools. The present invention has the following beneficial effects: through a hierarchical strategy of hardware compatibility verification, cryptographic module function decoupling testing, and independent testing of non-cryptographic modules, precise isolation and verification of security functions and business functions is achieved, providing a systematic testing solution for database deployment in high-security scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present 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] With the increasing demand for data security in e-government, government cloud platforms and enterprise core business systems, the 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, existing technologies still have 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 of highly sensitive fields such as the party and government, telecommunications, etc. for national secret algorithms and hardware-level protection; second, traditional testing methods do not clearly divide the boundaries between cryptographic modules and non-cryptographic modules, and cannot independently verify the effectiveness of cryptographic functions in protecting data security, and there is 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:

[0006] A method for testing the boundaries of a secure database password module, comprising:

[0007] Low-level password card testing: Install password card hardware and verify its compatibility, including permission management, key performance, and random number primality testing;

[0008] Cryptographic module functional testing: including using the M1 algorithm and SM3 checksum combination to verify data security for storage encryption testing; establishing an encrypted channel through the SSL protocol and implementing dual-session testing for communication encryption verification; performing identity authentication verification based on the comparison of hash-encrypted passwords and database table fields; and using the SM3 digest algorithm and SM2 signature algorithm for multi-level protection verification for system integrity testing.

[0009] Non-cryptographic module detection: Verify basic database functions through functional regression testing and performance monitoring tools.

[0010] Furthermore, the storage encryption detection includes:

[0011] Use the M1 algorithm to encrypt and store data pages;

[0012] The data page checksum is generated using the SM3 digest algorithm. When the checksum is abnormal, the database startup fails.

[0013] Furthermore, the dual-session test includes:

[0014] Performing a user identity authentication process in the first session;

[0015] Capture network data packets in the second session to verify whether any sensitive information is leaked in plain text.

[0016] Furthermore, the identity authentication verification includes:

[0017] Match the hashed password with the hashed_password field in the sysuser:sysintauthusers table;

[0018] When authentication fails three times in a row, the userstate field in the sysuser:sysuserext table is updated to the locked state.

[0019] Furthermore, the system integrity test includes:

[0020] Use SM3 digest algorithm to generate program file digest value;

[0021] Use SM2 signature algorithm to sign and protect the summary value;

[0022] Integrity verification is achieved by verifying the signature when the system starts.

[0023] Furthermore, the integrity check includes:

[0024] Detect the system response when the password card is not installed or the driver is abnormal;

[0025] Stop loading program files with damaged integrity in real time during system startup;

[0026] Periodically perform safety subsystem self-tests.

[0027] Furthermore, the present solution discloses an electronic device, comprising a processor and a memory in communication with the processor and for storing instructions executable by the processor, wherein the processor is used to execute a testing method for the boundary of a secure database cryptographic module.

[0028] 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 to enable the at least one processor to execute a testing method for the boundary of a secure database cryptographic module.

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

[0030] 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:

[0031] The present invention describes a testing method for the boundaries of cryptographic modules in secure databases. Based on the hardware of national secret authentication cryptographic cards, a layered cryptographic boundary testing architecture is proposed. Through a hierarchical strategy of hardware compatibility verification, cryptographic module function decoupling testing, and independent detection of non-cryptographic modules, precise isolation and verification of security functions and business functions are achieved, providing a systematic testing solution for database deployment in high-security scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings, which constitute part of the present invention, are provided to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are provided to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings:

[0033] Figure 1 This is 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

[0034] 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.

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

[0036] This solution discloses a test method for the boundaries of a secure database password module. The specific solution is as follows:

[0037] A method for testing the boundaries of a secure database password module, comprising:

[0038] Low-level password card testing: Install password card hardware and verify its compatibility, including permission management, key performance, and random number primality testing;

[0039] Cryptographic module functional testing: including using the M1 algorithm and SM3 checksum combination to verify data security for storage encryption testing; establishing an encrypted channel through the SSL protocol and implementing dual-session testing for communication encryption verification; performing identity authentication verification based on the comparison of hash-encrypted passwords and database table fields; and using the SM3 digest algorithm and SM2 signature algorithm for multi-level protection verification for system integrity testing.

[0040] Non-cryptographic module detection: Verify basic database functions through functional regression testing and performance monitoring tools.

[0041] The storage encryption detection includes:

[0042] Use the M1 algorithm to encrypt and store data pages;

[0043] The data page checksum is generated using the SM3 digest algorithm. When the checksum is abnormal, the database startup fails.

[0044] Furthermore, the dual-session test includes:

[0045] Performing a user identity authentication process in the first session;

[0046] Capture network data packets in the second session to verify whether any sensitive information is leaked in plain text.

[0047] The identity authentication verification includes:

[0048] Match the hashed password with the hashed_password field in the sysuser:sysintauthusers table;

[0049] When authentication fails three times in a row, the userstate field in the sysuser:sysuserext table is updated to the locked state.

[0050] The system integrity test includes:

[0051] Use SM3 digest algorithm to generate program file digest value;

[0052] Use SM2 signature algorithm to sign and protect the summary value;

[0053] Integrity verification is achieved by verifying the signature when the system starts.

[0054] The integrity check includes:

[0055] Detect the system response when the password card is not installed or the driver is abnormal;

[0056] Stop loading program files with damaged integrity in real time during system startup;

[0057] Periodically perform safety subsystem self-tests.

[0058] The specific implementation methods of this embodiment include:

[0059] Part 1: Testing of the underlying cryptographic card hardware, including installing the cryptographic card, installing the driver, and starting the cryptographic card management program, to ensure that the cryptographic 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 cryptographic card through verification of permissions / user management, key management testing, key performance testing, random number quality and primality testing.

[0060] 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.

[0061] The storage protection module uses the M1 algorithm to encrypt and protect data pages to prevent illegal data theft. 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 uses the SM3 digest algorithm for integrity protection and records data page checksums to prevent illegal tampering of data pages, thereby ensuring that file integrity is protected by the password program. Once the file is damaged, the database service startup abnormality will be abnormal, and a clear error warning message will be displayed.

[0062] The communication protection module uses the SSL protocol for encryption via the communication interface provided by the password card. The test design includes identity authentication, using user passwords and digital certificates. User certificates are verified during login and each session to ensure that user sessions are processed and transmitted within a trusted path. The test method utilizes two sessions: one for packet capture and the other for user identity authentication. The test is considered a pass if no username, password, or certificate information is detected in the captured program log.

[0063] The identity authentication and identification module protects user passwords. The passwords are encrypted using hash encryption. The test design includes connecting to the database through password + certificate. If the password is hashed and 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 boundary detection of the number of password failures. 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.

[0064] The system integrity protection module provides a self-protection function for the security subsystem based on a cryptographic algorithm. The basic principle is as follows: (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-test program detection. The detection process at each stage includes hardware not installed or the underlying password card encryption card not loaded, hardware correctly installed password card driver loading, hardware correctly installed password card driver not loaded or re-uninstalled, file integrity damage detection and failure correction during system startup, and password USB KEY status damage and correction detection during system startup.

[0065] Part 3: Cryptographic boundary, that is, non-cryptographic module function testing, including 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.

[0066] Those skilled 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 above description has generally described the components and steps of each example according to their functions. 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.

[0067] In the several embodiments provided in this 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 embodiment of the present invention.

[0068] 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 above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions 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 description of the present invention.

[0069] 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 principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for testing the boundary of a secure database password module, characterized in that: include: Low-level cryptographic card testing: Install the cryptographic card hardware and verify its compatibility, including permission management, key performance, and random number primality testing. The verification process calls the EVP_EncryptInit_ex() function interface of the OpenSSL engine and executes the SM4-CBC algorithm for a single encryption time of ≤2ms. Cryptographic module functional testing: This includes using the M1 algorithm and SM3 checksum to verify data security for storage encryption testing, encrypting 512-byte blocks and generating SM3-256 checksums, and triggering the sgx_enclave_destroy() function to clear key memory when the checksum is abnormal. An encrypted channel is established through the SSL protocol and a dual-session test is implemented to verify communication encryption. Based on the comparison of hash encrypted passwords and database table fields, identity authentication is performed; SM3 digest algorithm and SM2 signature algorithm are used for multi-level protection verification to perform system integrity testing; Non-cryptographic module detection: Verify basic database functions 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: Use the M1 algorithm to encrypt and store data pages; The data page checksum is generated using the SM3 digest 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 the 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 digest algorithm to generate program file digest value; Use SM2 signature algorithm 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 program files with damaged integrity in real time during system startup; Periodically perform self-tests on the safety subsystem; This includes quantitative performance loss evaluation: using the eBPF program to hook the kernel schedule() function to collect statistics on the CPU scheduling delay histogram, predicting performance loss trends based on the ARIMA model, and triggering 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 programs on the API gateway to intercept invalid 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 in communication with the processor and configured to store instructions executable by the processor, wherein: The processor is used to execute the testing method for the boundary of a secure database password module as described in any one of claims 1 to 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 to enable the at least one processor to perform 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 the method for testing the boundary of a secure database password module according to any one of claims 1 to 6.

Citation Information

Patent Citations

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

    CN117494164A

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

    US20210105297A1