AES (Advanced Encryption Standard)-based front-end and back-end separation system data interaction encryption application method
Through key management and hardware accelerated encryption provided by cloud services, combined with data check and cross-domain resource sharing, modern encryption standards and TLS protocols are adopted, and automated security tools are used to solve the key management, performance, and data in front-end separation systems. Consistency and security issues improve the overall security and performance of the system.
Patent Information
- Application Number
- CN202411015206.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art in the front and back end separation system has improper key management, resulting in key leakage, encryption and decryption operations increase system processing load, possible damage or loss in data transmission, restricted cross-domain requests, and improper selection of encryption algorithms reduce system security. , Key exchange has security risks and the lack of regular security audits, resulting in system vulnerabilities not being discovered in a timely manner.
Use the key management service provided by cloud services for key storage and management, set up automatic rotation policies, accelerate encryption and decryption using hardware security modules or CPU instruction sets that support encryption, only encrypt target sensitive data, generate and accompany data calibration Checksum, configure cross-domain resource sharing policies, adopt modern encryption standards and TLS protocols for key exchange, use automated security scanning and auditing tools, modular encryption logic and conduct comprehensive testing and recording.
Effectively reduce the risk of key leakage, improve encryption and decryption performance, ensure data transmission integrity, solve cross-domain request restrictions, enhance system security and performance, promptly discover potential vulnerabilities and ensure that the system complies with the latest security standards.
Smart Images

Figure CN118940293A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of application of data interaction encryption in a front-end and back-end separation system, and in particular to an application method of data interaction encryption in a front-end and back-end separation system based on AES. Background Art
[0002] In modern front-end and back-end separation systems, ensuring the security of data interaction is a vital task. The front-end and back-end separation architecture has been widely used in Web development. Through this architecture, the front-end and back-end can be independently developed and deployed, thereby improving the flexibility and scalability of the system. However, the front-end and back-end separation architecture also brings security issues during data transmission. In order to protect the security of data during transmission, encryption technology is usually used, among which AES (Advanced Encryption Standard) is a common and efficient symmetric encryption algorithm, which is widely used due to its security and performance advantages.
[0003] The existing technical solution has the following problems when using AES for data encryption:
[0004] Improper key management may lead to key leakage.
[0005] Encryption and decryption operations increase the processing load on the system and affect system performance.
[0006] Data may be damaged or lost during transmission, leading to data consistency issues.
[0007] Restrictions on cross-origin requests may affect the transmission of encrypted data.
[0008] Improper selection of encryption algorithm may reduce system security.
[0009] There are security risks in the key exchange process.
[0010] Lack of regular security audits may result in system vulnerabilities and weaknesses going undetected.
[0011] The implementation of encryption and decryption logic increases the complexity of the system and affects development and maintenance. Summary of the invention
[0012] In order to solve the above problems, the present invention proposes an application method for data interaction encryption of a front-end and back-end separated system based on AES, which aims to improve the security and performance of the system by optimizing key management, improving system performance, ensuring data consistency, solving cross-domain problems, selecting appropriate encryption algorithms, ensuring key exchange security, strengthening security audits, and simplifying system complexity.
[0013] An application method for data interaction encryption of a front-end and back-end separation system based on AES, the method comprising:
[0014] Use the key management service provided by the cloud service to store and manage keys, set a policy for automatic key rotation, and regularly replace keys according to the policy;
[0015] Use hardware security modules or crypto-enabled CPU instruction sets to accelerate encryption and decryption operations, select target encryption modes, and encrypt only targeted sensitive data;
[0016] Generate a data checksum before data transmission and attach the checksum during transmission. The receiver verifies the data integrity, ensures that the API interface is designed for idempotent operations, and uses a transaction processing mechanism on the back end;
[0017] Configure cross-origin resource sharing policies, allow cross-origin requests from specific sources on the server side, ensure that cross-origin requests from specific sources include necessary HTTP header information, and process pre-check requests;
[0018] Use modern encryption standards, select the encryption mode of the target, follow the encryption standards and protocols required by the industry and regulations, and keep the latest versions of encryption algorithms and libraries;
[0019] Use the TLS protocol for key exchange, use a strong cipher suite, and adopt the Diffie-Hellman key negotiation mechanism;
[0020] Use automated security scanning and auditing tools to regularly scan systems and codes to identify potential vulnerabilities, implement comprehensive logging and monitoring, and conduct regular third-party security audits;
[0021] Modularize the encryption and decryption logic, encapsulate them into independent components, write comprehensive unit tests and integration tests, and document the design and usage instructions of the encryption implementation.
[0022] In the above solution, optionally, the key management service provided by the cloud service includes AWS KMS, Azure KeyVault or Google Cloud KMS;
[0023] Generate an initial key in the key management service and set a key rotation policy to automatically change the key at a preset time interval.
[0024] In the above solution, optionally, the hardware security module includes an HSM or a CPU instruction set supporting AES-NI;
[0025] The target encryption mode is AES-GCM;
[0026] Encrypting target sensitive data includes determining which data is sensitive data, implementing encryption logic, and ensuring that only sensitive data is encrypted before being sent.
[0027] In the above solution, optionally, the data checksum generation method is to use a hash function to generate the data checksum;
[0028] Before the data is sent, a hash function is used to generate a checksum of the data;
[0029] A checksum is sent along with the data to ensure the integrity of the data during transmission.
[0030] In the above solution, optionally, ensuring that the API interface is designed as an idempotent operation includes:
[0031] When designing your API, ensure that executing the same request multiple times will produce the same result and will not affect the system state.
[0032] In the above solution, optionally, configuring the cross-domain resource sharing policy includes:
[0033] Configure CORS policy on the server side to allow requests from specific frontend domains;
[0034] Make sure that cross-origin requests contain the necessary HTTP headers, including Access-Control-Allow-Origin.
[0035] In the above scheme, optionally, the TLS protocol adopts TLS1.2 or TLS1.3 version, and a strong cipher suite is selected, specifically, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 is adopted;
[0036] The Diffie-Hellman algorithm is used during the TLS handshake to securely negotiate session keys.
[0037] In the above solution, optionally, the automated security scanning and auditing tools include OWASP ZAP or Nessus, and the logging and monitoring are centrally managed and analyzed using a SIEM system.
[0038] In the above scenario, optionally, comprehensive logging and monitoring is implemented including:
[0039] Implement a log management strategy to record all critical operations and system events;
[0040] Use SIEM system for centralized log management and analysis;
[0041] Regularly invite third-party security experts to conduct security audits on the system and evaluate the security of the system.
[0042] Compared with the prior art, this application has at least the following beneficial effects:
[0043] Based on further analysis and research of existing technical problems, this application recognizes that improper key management of existing solutions may lead to key leakage, encryption and decryption operations increase the processing load of the system, and affect the system performance. This application can ensure the secure storage and access of keys through the key management service provided by cloud services. These services provide secure key storage, access control and automatic key rotation functions, reduce the risk of key leakage, and use HSM or CPU instruction sets that support AES-NI to accelerate encryption and decryption operations, which can significantly improve the performance of encryption and decryption. Selecting an efficient encryption mode can not only provide encryption functions, but also provide message authentication codes, thereby improving overall performance and data security. Generate a data checksum before data transmission, and attach a checksum during transmission. The receiver verifies the integrity of the data, which can effectively prevent data from being damaged or lost during transmission. Ensure that the API interface is designed as an idempotent operation and use a transaction processing mechanism in the back end to ensure data consistency and integrity. Correctly configure the cross-domain resource sharing policy, allow cross-domain requests from specific sources, ensure that the necessary HTTP header information is included, and correctly handle pre-check requests, solve the restrictions of cross-domain requests, and ensure the secure transmission of encrypted data. Adopting modern encryption standards, selecting appropriate encryption modes, and following encryption standards and protocols required by industry and regulations can ensure the security and compatibility of the system. Keeping the latest versions of encryption algorithms and libraries allows you to apply the latest security fixes and improvements. Using the TLS protocol for key exchange, using strong cipher suites and secure key negotiation mechanisms such as Diffie-Hellman, can ensure the security of key exchange, prevent man-in-the-middle attacks, and ensure the security of data transmission. Using automated security scanning and auditing tools (regularly scanning systems and codes to identify potential vulnerabilities, and implementing comprehensive logging and monitoring can promptly detect abnormal behavior and potential threats. Conduct regular third-party security audits to ensure that the system complies with the latest security standards and best practices. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A flowchart of an application method for data interaction encryption in a front-end and back-end separation system based on AES is provided as an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0046] In the description of this application: unless otherwise specified, the meaning of "plurality" is two or more. The terms "first", "second", "third", etc. in this application are intended to distinguish the objects referred to, and do not have special meanings in terms of technical connotations (for example, they should not be understood as emphasizing the importance or order, etc.). Expressions such as "including", "comprising", "having", etc. also mean "not limited to" (certain units, components, materials, steps, etc.).
[0047] In one embodiment, Figure 1 As shown, an application method for data interaction encryption of a front-end and back-end separation system based on AES is provided, comprising the following steps:
[0048] Use the key management service provided by the cloud service to store and manage keys, set a policy for automatic key rotation, and regularly replace keys according to the policy;
[0049] Use hardware security modules or crypto-enabled CPU instruction sets to accelerate encryption and decryption operations, select target encryption modes, and encrypt only targeted sensitive data;
[0050] Generate a data checksum before data transmission and attach the checksum during transmission. The receiver verifies the data integrity, ensures that the API interface is designed for idempotent operations, and uses a transaction processing mechanism on the back end;
[0051] Configure cross-origin resource sharing policies, allow cross-origin requests from specific sources on the server side, ensure that cross-origin requests from specific sources include necessary HTTP header information, and process pre-check requests;
[0052] Use modern encryption standards, select the encryption mode of the target, follow the encryption standards and protocols required by the industry and regulations, and keep the latest versions of encryption algorithms and libraries;
[0053] Use the TLS protocol for key exchange, use a strong cipher suite, and adopt the Diffie-Hellman key negotiation mechanism;
[0054] Use automated security scanning and auditing tools to regularly scan systems and codes to identify potential vulnerabilities, implement comprehensive logging and monitoring, and conduct regular third-party security audits;
[0055] Modularize the encryption and decryption logic, encapsulate them into independent components, write comprehensive unit tests and integration tests, and document the design and usage instructions of the encryption implementation.
[0056] In this embodiment, the key management service provided by the cloud service includes AWS KMS, Azure KeyVault or Google Cloud KMS;
[0057] Generate an initial key in the key management service and set a key rotation policy to automatically change the key at a preset time interval.
[0058] In this embodiment, the hardware security module includes an HSM or a CPU instruction set supporting AES-NI;
[0059] The target encryption mode is AES-GCM;
[0060] Encrypting target sensitive data includes determining which data is sensitive data, implementing encryption logic, and ensuring that only sensitive data is encrypted before being sent.
[0061] In this embodiment, the data checksum generation method is to use a hash function to generate the data checksum;
[0062] Before the data is sent, a hash function is used to generate a checksum of the data;
[0063] A checksum is sent along with the data to ensure the integrity of the data during transmission.
[0064] In this embodiment, ensuring that the API interface is designed as an idempotent operation includes:
[0065] When designing your API, ensure that executing the same request multiple times will produce the same result and will not affect the system state.
[0066] In this embodiment, configuring the cross-domain resource sharing policy includes:
[0067] Configure CORS policy on the server side to allow requests from specific frontend domains;
[0068] Make sure that cross-origin requests contain the necessary HTTP headers, including Access-Control-Allow-Origin.
[0069] In this embodiment, the TLS protocol adopts TLS1.2 or TLS1.3 version, and a strong cipher suite is selected, specifically, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 is adopted;
[0070] The Diffie-Hellman algorithm is used during the TLS handshake to securely negotiate session keys.
[0071] In this embodiment, the automated security scanning and auditing tools include OWASP ZAP or Nessus, and the logging and monitoring are centrally managed and analyzed using a SIEM system.
[0072] In this example, implementing comprehensive logging and monitoring includes:
[0073] Implement a log management strategy to record all critical operations and system events;
[0074] Use SIEM system for centralized log management and analysis;
[0075] Regularly invite third-party security experts to conduct security audits on the system and evaluate the security of the system.
[0076] Compared with the existing solutions, the encryption solution based on AES in this embodiment has the following advantages and innovations:
[0077] High performance: AES is an efficient symmetric encryption algorithm that can provide high encryption and decryption performance without sacrificing security. This makes AES-based encryption solutions suitable for application scenarios that require system performance.
[0078] Flexibility: AES supports multiple encryption modes and key lengths, and you can select appropriate encryption parameters based on actual needs. This flexibility allows AES-based encryption solutions to adapt to different security requirements and application scenarios.
[0079] Open source implementation: The AES algorithm design is public, and there are many open source implementations and reliable encryption libraries available. This allows developers to easily integrate AES encryption functions into their applications without having to implement encryption algorithms themselves.
[0080] Standardization and interoperability: AES is a standardized encryption algorithm with mature implementations on various operating systems and platforms and good interoperability: This allows AES-based encryption schemes to be easily deployed and used in different environments.
[0081] In summary, the AES-based encryption scheme has advantages in security, performance, flexibility and practicality, and is a widely used and trusted encryption scheme. It can provide reliable encryption protection for data interaction in front-end and back-end separation systems and solve many problems related to data security.
[0082] In one embodiment, this application provides detailed embodiments to solve the following problems existing in the prior art:
[0083] Key management: Improper storage and distribution of keys may lead to compromise.
[0084] Managing and rotating keys securely is a challenge.
[0085] The solution of this embodiment is:
[0086] Use KMS services: Use key management services provided by cloud services, such as AWS KMS, Azure KeyVault, and Google Cloud KMS. These services provide secure storage, access control, and automatic key rotation capabilities.
[0087] Key rotation policy: Set a policy for automatic key rotation and change keys regularly to reduce the risk of using the same key for a long time.
[0088] Separate permissions: Separate key access permissions from other permissions to ensure that only required components or personnel can access the key. Use the principle of least privilege.
[0089] Regarding the performance cost issue:
[0090] Encryption and decryption operations increase system processing load and affect response time.
[0091] The solution of this embodiment includes:
[0092] Hardware acceleration: Use a hardware security module (HSM) or a CPU instruction set that supports encryption (such as Intel AES-NI) to accelerate encryption and decryption operations.
[0093] Efficient algorithm selection: Choose an efficient encryption mode, such as AES-GCM (Galois / CounterMode), which not only provides encryption but also provides a message authentication code (MAC) to improve overall performance.
[0094] Selective encryption: Encrypt only sensitive data, rather than the entire data packet, to reduce the amount of encryption and decryption processing.
[0095] Regarding the data consistency of the existing solutions:
[0096] Data may be damaged or lost during transmission, leading to data consistency issues.
[0097] The solution of this embodiment includes:
[0098] Data checksum: Generate a checksum on the data before transmission (for example, using a hash function), and include the checksum during transmission so that the receiver can verify the integrity of the data.
[0099] Idempotent operation design: Ensure that the API interface is designed for idempotent operations so that requests can be safely retried when errors occur during transmission.
[0100] Transaction processing: Use transaction processing mechanism on the back end to ensure data consistency and integrity.
[0101] Regarding cross-domain issues: cross-domain requests may be restricted, affecting encrypted data transmission.
[0102] The solution of this embodiment includes:
[0103] CORS configuration: Correctly configure the Cross-Origin Resource Sharing (CORS) policy to allow cross-origin requests from specific origins on the server side. Make sure to include necessary HTTP header information, such as Access-Control-Allow-Origin, Access-Control-Allow-Methods, etc.
[0104] Preflight request handling: Ensure that the server handles preflight requests (OPTIONS) correctly and returns appropriate CORS header information.
[0105] Use security header information: Configure Content-Security-Policy (CSP) header information to further control the security policy of cross-domain resource requests.
[0106] Regarding the selection of encryption algorithms:
[0107] Using insecure or inappropriate encryption algorithms will reduce system security.
[0108] This application solution includes:
[0109] Modern encryption standards: Use currently recognized strong encryption algorithms, such as AES-256. Select an appropriate encryption mode (such as AES-GCM).
[0110] Follow best practices: Follow encryption standards and protocols (such as TLS 1.2 or 1.3) as required by the industry and regulations.
[0111] Update regularly: Stay up to date with the latest cryptographic algorithms and libraries to ensure that the latest security fixes and improvements are applied.
[0112] Regarding key exchange:
[0113] The key exchange process may be stolen, resulting in data leakage.
[0114] The solution of this embodiment includes:
[0115] Security protocol: Use TLS protocol for key exchange to ensure that the key cannot be stolen during transmission. Use strong cipher suites such as TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384.
[0116] Key negotiation: Use secure key negotiation mechanisms such as Diffie-Hellman to ensure the security of key exchange. You can consider using PFS (Perfect Forward Secrecy) technology to further improve the security of key exchange.
[0117] Questions about security audits:
[0118] Failure to audit regularly can result in system vulnerabilities and weaknesses going unnoticed.
[0119] The solution of this embodiment includes:
[0120] Automated security tools: Use automated security scanning and auditing tools (such as OWASP ZAP, Nessus) to regularly scan systems and codes to identify potential vulnerabilities.
[0121] Logging and monitoring: Implement comprehensive logging and monitoring to promptly detect abnormal behaviors and potential threats. Use SIEM (Security Information and Event Management) system for centralized management and analysis.
[0122] Third-party audits: Regular third-party security audits are conducted to ensure that the system complies with the latest security standards and best practices.
[0123] In the prior art, encryption and decryption logics increase the complexity of the system, affecting development and maintenance.
[0124] The solution for this application includes: Modular design: modularize the encryption and decryption logic and encapsulate them into independent components to ensure the maintainability and scalability of the code.
[0125] Comprehensive testing: Write comprehensive unit tests and integration tests covering encryption and decryption logic to ensure its correctness and reliability.
[0126] Development documentation: Detailed documentation of the design and usage of encryption implementations to help development and operations teams understand and maintain the system.
[0127] Security training: Provide security training to development and operation and maintenance personnel to improve the team's security awareness and skills.
[0128] The above solution can effectively cope with various technical challenges faced by AES-based data interaction encryption in front-end and back-end separation systems, and improve the security, performance and stability of the system.
[0129] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. An application method for data interaction encryption of front-end and back-end separation systems based on AES, characterized in that: The method comprises: Use the key management service provided by the cloud service to store and manage keys, set a policy for automatic key rotation, and regularly replace keys according to the policy; Use hardware security modules or crypto-enabled CPU instruction sets to accelerate encryption and decryption operations, select target encryption modes, and encrypt only targeted sensitive data; Generate a data checksum before data transmission and attach the checksum during transmission. The receiver verifies the data integrity, ensures that the API interface is designed for idempotent operations, and uses a transaction processing mechanism on the back end; Configure cross-origin resource sharing policies, allow cross-origin requests from specific sources on the server side, ensure that the cross-origin requests from the specific sources include necessary HTTP header information, and process pre-check requests; Use modern encryption standards, select the encryption mode of the target, follow the encryption standards and protocols required by the industry and regulations, and keep the latest versions of encryption algorithms and libraries; Use the TLS protocol for key exchange, use a strong cipher suite, and adopt the Diffie-Hellman key negotiation mechanism; Use automated security scanning and auditing tools to regularly scan systems and codes to identify potential vulnerabilities, implement comprehensive logging and monitoring, and conduct regular third-party security audits; Modularize the encryption and decryption logic, encapsulate them into independent components, write comprehensive unit tests and integration tests, and record the design and usage instructions of the encryption implementation.
2. The method according to claim 1, wherein the key management service provided by the cloud service comprises AWS KMS, AzureKeyVault or Google CloudKMS; Generate an initial key in the key management service and set a key rotation policy to automatically change the key at a preset time interval.
3. The method according to claim 1, wherein the hardware security module comprises an HSM or a CPU instruction set supporting AES-NI; The target encryption mode is AES-GCM; Encrypting target sensitive data includes determining which data is sensitive data, implementing encryption logic, and ensuring that only sensitive data is encrypted before being sent.
4. According to the method of claim 1, the data checksum generation method is to use a hash function to generate the data checksum; Before the data is sent, a hash function is used to generate a checksum of the data; A checksum is sent along with the data to ensure the integrity of the data during transmission.
5. According to the method of claim 1, ensuring that the API interface is designed as an idempotent operation comprises: When designing your API, ensure that executing the same request multiple times will produce the same result and will not affect the system state.
6. According to the method of claim 1, configuring the cross-domain resource sharing policy comprises: Configure CORS policy on the server side to allow requests from specific frontend domains; Make sure that cross-origin requests contain the necessary HTTP headers, including Access-Control-Allow-Origin.
7. The method according to claim 1, wherein: The TLS protocol uses TLS 1.2 or TLS 1.3 version, and a strong cipher suite is selected, specifically, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384; The Diffie-Hellman algorithm is used during the TLS handshake to securely negotiate session keys.
8. The method according to claim 1, wherein: The automated security scanning and auditing tools include OWASP ZAP or Nessus, and the logging and monitoring are centrally managed and analyzed using a SIEM system.
9. The method of claim 8, wherein implementing comprehensive logging and monitoring comprises: Implement a log management strategy to record all critical operations and system events; Use SIEM system for centralized log management and analysis; Regularly invite third-party security experts to conduct security audits on the system and evaluate the security of the system.
Citation Information
Patent Citations
Portal security design method using network isolation and password compilation
CN116781359A
Computer network engineering safety control system
CN117155678A
Safety management platform for informatization data transmission
CN117201131A
Data security transmission system
CN117319030A
Solid state disk data encryption method and solid state disk
CN117892369A
