A password protection method, application method, and device for a spatial coordinate transformation algorithm and interface for a mobile terminal map app.

By jointly compiling and encrypting the spatial coordinate transformation algorithm with a commercial cryptographic algorithm, the problems of poor flexibility and insufficient security in the existing technology are solved, and efficient and secure distribution and use of the spatial coordinate transformation algorithm are realized.

CN121435199BActive Publication Date: 2026-06-30CHINESE ACAD OF SURVEYING & MAPPING

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINESE ACAD OF SURVEYING & MAPPING
Filing Date
2025-12-29
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In existing technologies, the joint compilation method of spatial coordinate transformation algorithms and navigation software map apps suffers from poor flexibility, insufficient security, inability to adapt to rapid iteration needs, and vulnerability to decompilation and cracking.

Method used

The spatial coordinate transformation algorithm is jointly compiled with the source code of commercial cryptographic algorithms. The SM2, SM3, SM4 and SM3 algorithms are used for encryption to form an encrypted distribution package. The authenticity and integrity of the file are ensured by digital signature, and it is decrypted and used only after verification.

Benefits of technology

It improves the efficiency of compilation, ensures the security of spatial coordinate transformation algorithms during distribution and use, avoids the risks of decompilation and cracking, and adapts to the needs of rapid iteration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121435199B_ABST
    Figure CN121435199B_ABST
Patent Text Reader

Abstract

This application discloses a cryptographic protection method, application method, and device for a spatial coordinate transformation algorithm and interface in a mobile terminal map app, relating to the fields of surveying and mapping geographic information, information security, and cryptography. The method includes jointly compiling the source code of the spatial coordinate transformation algorithm and interface with the source code of a commercial cryptographic algorithm to obtain a binary bound file; encrypting the binary file using the SM2 and SM3 algorithms to obtain a spatial coordinate transformation algorithm result distribution package; encrypting the test and official versions of the geographic control area of ​​the spatial coordinate transformation algorithm interface using the SM4 and SM3 algorithms respectively to obtain two geographic control area distribution packages for the spatial coordinate transformation algorithm interface; and distributing the spatial coordinate transformation algorithm result distribution package and the geographic control area distribution package to the mobile terminal map app. This application improves the efficiency of the bound compilation process and ensures the security of the spatial coordinate transformation algorithm and interface during distribution and use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of surveying and mapping geographic information, information security and cryptography, and in particular to a cryptographic protection method, application method and device for a spatial coordinate transformation algorithm and interface of a mobile terminal map App. Background Technology

[0002] According to regulations, measured results of navigation electronic maps with a planar accuracy of 10 meters or better and a continuous area exceeding 25 square kilometers involve state secrets and should be used in classified environments in strict accordance with current confidentiality management regulations. For navigation electronic map data results that must be used in non-classified environments, spatial location should be protected using geographic information confidentiality processing technology and the corresponding review procedures should be followed, in accordance with the requirements of the mandatory national standard "Basic Requirements for Spatiotemporal Data Security Processing of Intelligent Connected Vehicles".

[0003] When navigation software, intelligent driving software, and other mobile terminal map apps publicly use the aforementioned confidentialized navigation electronic map data, they need to integrate a spatial coordinate transformation algorithm based on geographic information confidentiality processing technology into the mobile phone or vehicle terminal. This algorithm is required to process the real-time received spatial coordinates of the terminal before matching the location with the confidentialized navigation electronic map, enabling accurate matching, nearby search, route planning, and navigation functions on the map. To ensure the security of the spatial coordinate transformation algorithm by protecting its source code and preventing saturation attacks on the algorithm interface, since its inception, the algorithm has consistently employed a protection method that involves jointly compiling the algorithm with the terminal map module using real-time location functionality. This method is managed through a controlled "application-approval-processing" approach, representing a "weak technology + strong management" protection method.

[0004] The current method for protecting spatial coordinate transformation algorithms involves jointly compiling the original spatial coordinates using the source code of the spatial coordinate transformation algorithm and the source code of the navigation software map module, thereby obtaining a binary combined file (plaintext).

[0005] To achieve the protective effect of joint compilation of the two types of source code, mobile terminal map app developers such as navigation software and intelligent driving software need to separate the modules that use location-related functions from the mobile terminal map app. The source code of these location-related function modules and their compilation environment should be deployed on designated secure and trusted R&D equipment. The personnel responsible for the spatial coordinate transformation algorithm should integrate the source code of both parties together, and then provide the jointly compiled binary file to the mobile terminal map app developers such as navigation software and intelligent driving software. The agreement should bind the other party to not carry out any form of decompilation, and not to record, store or output spatial coordinates in any way.

[0006] Under the current protection method, the source code and interface of the spatial coordinate transformation algorithm are "usable but not visible". The generated binary bundle file can realize functions such as route planning, lane keeping judgment, vehicle acceleration and deceleration control, and vehicle driving direction angle calculation. However, the spatial coordinate transformation algorithm code cannot be obtained by conventional technical means, and the spatial coordinate transformation interface cannot be called to launch a saturation attack on the algorithm in the binary bundle file.

[0007] However, the current protection method of "weak technology + strong management" cannot completely prevent individual R&D personnel from decompiling binary bundled files to obtain algorithm source code out of curiosity or other reasons. It also cannot prevent individual R&D personnel from reserving interfaces for recording or outputting spatial coordinates in the source code of location-related functional modules, thereby launching illegal cracking behaviors such as saturation attacks on algorithm interfaces.

[0008] Cryptography is a core technology and fundamental support for ensuring network and information security. Through its two core functions of encryption protection and security authentication, it can fully meet security requirements such as preventing impersonation, leakage, tampering, and repudiation. The Cryptography Law divides cryptography into core cryptography, ordinary cryptography, and commercial cryptography, and clarifies that commercial cryptography is used to protect information that does not constitute state secrets.

[0009] To ensure the security of commercial cryptography applications, the state has released a series of commercial cryptographic algorithms and promulgated a management regulation to entrust qualified testing institutions to test the security of commercial cryptographic algorithms.

[0010] Currently, the method of co-compiling spatial coordinate transformation algorithm code with location-related functional modules of mobile terminal map apps such as navigation software and intelligent driving software can meet the current application needs to a certain extent. However, with the development of information technology, this method of co-compiling with navigation module code also has many prominent problems. One of the biggest problems is that the algorithm code needs to be compatible with location-related functional modules of different brands and versions. Co-compiling is time-consuming, labor-intensive, and costly, and the flexibility of the co-compilation results is very poor. Because all functions involving location information participate in co-compilation, any upgrade, optimization, or addition or removal of functions requires recompilation and regeneration of the co-compilation results. In the vehicle testing phase, such function upgrades and optimizations are very frequent, which greatly reduces the efficiency of co-compilation and cannot meet the needs of rapid iteration of intelligent driving software versions in the future autonomous driving stage. Another problem is that the binary co-compilation files stored, tested, and distributed in plaintext have no security protection measures and are vulnerable to decompilation and cracking, so the security of the algorithm cannot be fully guaranteed. Summary of the Invention

[0011] The purpose of this application is to provide a password protection method, application method, and device for a spatial coordinate transformation algorithm and interface for a mobile terminal map app, so as to increase the security of the spatial coordinate transformation algorithm.

[0012] To achieve the above objectives, this application provides the following solution:

[0013] Firstly, this application provides a password protection method for a spatial coordinate transformation algorithm and interface of a mobile terminal map app, including:

[0014] The spatial coordinate transformation algorithm and interface source code, along with the commercial cryptographic algorithm source code, are jointly compiled to obtain a binary bundled file. The spatial coordinate transformation algorithm and interface source code are used to transform the original spatial coordinates within a specified geographical control area; the commercial cryptographic algorithm source code is used to encrypt the transformed spatial coordinates.

[0015] The binary concatenated file is encrypted using the SM2 and SM3 algorithms to obtain a spatial coordinate transformation algorithm result distribution package;

[0016] The test version and the official version of the geographic control range of the spatial coordinate transformation algorithm interface are encrypted using the SM4 and SM3 algorithms respectively, resulting in the test version and the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface.

[0017] The spatial coordinate transformation algorithm results distribution package, the test version of the geographic control area distribution package, and the official version of the geographic control area distribution package are distributed to mobile terminal map apps.

[0018] In one embodiment, the spatial coordinate transformation algorithm is jointly compiled with the interface source code and the commercial cryptographic algorithm source code to obtain a binary bundle file, specifically including:

[0019] The spatial coordinate transformation algorithm and interface source code are inserted into the framework file of the commercial cryptographic algorithm source code to obtain the integrated source code;

[0020] The integrated source code is compiled, assembled, and linked using the compilation tools provided by the development environment to form a binary linked file.

[0021] In one embodiment, the binary concatenated file is encrypted using the SM2 and SM3 algorithms to obtain a spatial coordinate transformation algorithm result distribution package, specifically including:

[0022] Based on the SM2 algorithm, the binary concatenated file is encrypted using the public key provided by the mobile terminal map app to obtain the ciphertext binary concatenated file;

[0023] The first ciphertext hash value of the binary concatenated file of the ciphertext is generated using the SM3 algorithm;

[0024] The first ciphertext hash value of the binary concatenated file of the ciphertext is signed using the private key of the distributor of the results to obtain the first digital signature value;

[0025] The first digital signature value is stored before the binary concatenation file of the ciphertext to form a spatial coordinate transformation algorithm result distribution package.

[0026] In one embodiment, the test version and the official version of the geographic control area of ​​the spatial coordinate transformation algorithm interface are encrypted using the SM4 and SM3 algorithms respectively, resulting in a test version geographic control area distribution package and an official version geographic control area distribution package for the spatial coordinate transformation algorithm interface. Specifically, this includes:

[0027] Encryption is applied to the geographic control area for any version, including:

[0028] The geographic control range of the spatial coordinate transformation algorithm interface is encrypted using the SM4 algorithm and the symmetric key built into the spatial coordinate transformation algorithm result distribution package to form the ciphertext geographic control range.

[0029] The SM3 algorithm is used to perform a hash operation on the geographic control area of ​​the ciphertext to obtain the third ciphertext hash value of the geographic control area of ​​the ciphertext.

[0030] The third ciphertext hash value of the geographic control range of the ciphertext is signed using the private key of the results distributor to obtain the second digital signature value.

[0031] The second digital signature value is stored before the geographic control area of ​​the ciphertext, forming a geographic control area distribution packet of the spatial coordinate transformation algorithm interface.

[0032] Secondly, this application provides a method for applying a mobile terminal map app, including:

[0033] Launch the mobile map app and load the spatial coordinate transformation algorithm module;

[0034] During the self-test of the mobile terminal map App, the authenticity and integrity of the spatial coordinate transformation algorithm result distribution package are verified and decrypted to obtain a binary concatenated file; the spatial coordinate transformation algorithm result distribution package is determined using the aforementioned password protection method for the mobile terminal map App's spatial coordinate transformation algorithm and interface;

[0035] After the spatial coordinate transformation algorithm module is loaded, the authenticity and integrity of the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface are verified and decrypted to obtain the official version of the geographic control range of the spatial coordinate transformation algorithm interface. The official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface is determined using the above-mentioned password protection method for the spatial coordinate transformation algorithm and interface of the mobile terminal map App.

[0036] Mobile terminal map apps obtain the raw spatial coordinates of the current location;

[0037] The original spatial coordinates are converted and encrypted using the official version of the binary bound file and spatial coordinate transformation algorithm interface to obtain the converted spatial coordinates in ciphertext.

[0038] Using the symmetric key of the SM4 algorithm, the converted spatial coordinates of the ciphertext are decrypted to obtain the converted spatial coordinates of the plaintext, thus achieving map-based location matching. The symmetric key of the SM4 algorithm is obtained by exchanging the digital envelope technology of the SM2 algorithm between the mobile terminal map app and the spatial coordinate conversion algorithm module.

[0039] In one implementation, the authenticity and integrity of the spatial coordinate transformation algorithm result distribution package are verified and decrypted to obtain a binary concatenated file, specifically including:

[0040] Extract the first digital signature value from the spatial coordinate transformation algorithm result distribution package, and verify the first digital signature value using the public key of the result distributor;

[0041] If the signature verification is successful, it proves that the source of the spatial coordinate transformation algorithm result distribution package is authentic and reliable. Extract the first ciphertext hash value of the binary concatenated file of the ciphertext from the spatial coordinate transformation algorithm result distribution package.

[0042] Extract the encrypted binary concatenated file from the spatial coordinate transformation algorithm result distribution package;

[0043] The SM3 algorithm is used to calculate the second ciphertext hash value of the binary concatenated file of the ciphertext, and the second ciphertext hash value is compared with the first ciphertext hash value.

[0044] If the second ciphertext hash value is equal to the first ciphertext hash value, it indicates that the spatial coordinate transformation algorithm result distribution package is complete;

[0045] Using the private key of the mobile terminal map app, the encrypted binary concatenated file is decrypted to obtain the binary concatenated file;

[0046] If the second ciphertext hash value is not equal to the first ciphertext hash value, it indicates that the spatial coordinate transformation algorithm result distribution package has been tampered with during the distribution process.

[0047] If the verification fails, it proves that the source of the spatial coordinate transformation algorithm result distribution package is not genuine or reliable.

[0048] In one implementation, the authenticity and integrity of the official version of the geographic control area distribution package of the spatial coordinate transformation algorithm interface are verified and decrypted to obtain the official version of the geographic control area of ​​the spatial coordinate transformation algorithm interface, specifically including:

[0049] Extract the second digital signature value from the official version of the geographic control area distribution package of the spatial coordinate transformation algorithm interface, and verify the second digital signature value using the public key of the spatial coordinate transformation algorithm result distribution package;

[0050] If the signature verification is successful, it proves that the source of the official version of the geographic control area distribution package of the spatial coordinate transformation algorithm interface is authentic and reliable. The third ciphertext hash value of the geographic control area is extracted from the official version of the geographic control area distribution package of the spatial coordinate transformation algorithm interface.

[0051] Extract the encrypted geographic control range from the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface;

[0052] The SM3 algorithm is used to calculate the fourth ciphertext hash value of the geographic control area of ​​the ciphertext, and the fourth ciphertext hash value is compared with the third ciphertext hash value.

[0053] If the fourth ciphertext hash value is equal to the third ciphertext hash value, it indicates that the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface is complete.

[0054] Using the symmetric key built into the spatial coordinate transformation algorithm result distribution package, the geographic control range of the ciphertext is decrypted to obtain the official version of the geographic control range of the spatial coordinate transformation algorithm interface.

[0055] If the fourth ciphertext hash value is not equal to the third ciphertext hash value, it indicates that the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface has been tampered with during the distribution process.

[0056] If the signature verification fails, it proves that the official version of the geographic control area distribution package of the spatial coordinate transformation algorithm interface is not genuine or reliable.

[0057] In one embodiment, the symmetric key exchange process of the SM4 algorithm specifically includes:

[0058] After each startup self-test and loading of the spatial coordinate transformation algorithm module, the mobile terminal map app calls the key exchange interface of the spatial coordinate transformation algorithm module to transmit the public key value of the mobile terminal map app.

[0059] The spatial coordinate transformation algorithm module generates a random number as the symmetric key of the SM4 algorithm, and uses the public key value to encrypt the symmetric key of the SM4 algorithm to obtain the encrypted symmetric key of the SM4 algorithm.

[0060] The encryption symmetric key of the SM4 algorithm is returned to the mobile terminal map App through the key exchange interface of the spatial coordinate transformation algorithm module;

[0061] The mobile terminal map app decrypts the encryption symmetric key of the SM4 algorithm to obtain the symmetric key of the SM4 algorithm.

[0062] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described mobile terminal map App application method.

[0063] According to the specific embodiments provided in this application, this application has the following technical effects:

[0064] This application provides a method, application method, and device for cryptographic protection of spatial coordinate transformation algorithms and interfaces in mobile terminal map apps. The method involves jointly compiling the source code of the spatial coordinate transformation algorithm and the source code of a commercial cryptographic algorithm to obtain a binary bound file; encrypting the binary bound file using the SM2 and SM3 algorithms to obtain a spatial coordinate transformation algorithm result distribution package; and encrypting the test and official versions of the geographic control area of ​​the spatial coordinate transformation algorithm interface using the SM4 and SM3 algorithms to obtain two geographic control area distribution packages for the spatial coordinate transformation algorithm interface; and distributing the spatial coordinate transformation algorithm result distribution package and the geographic control area distribution package of the spatial coordinate transformation algorithm interface to the mobile terminal map app. This application provides security protection for the algorithm and transformation interface from several aspects, including the joint compilation of the spatial coordinate transformation algorithm source code and the source code of a commercial cryptographic algorithm, the encryption protection of the binary bound file, and the customized geographic control area protection of the coordinate transformation interface. This improves the efficiency of the bound compilation process while ensuring the security of the coordinate transformation algorithm during distribution and use. Attached Figure Description

[0065] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0066] Figure 1 A flowchart illustrating a password protection method for a spatial coordinate transformation algorithm and interface of a mobile terminal map app provided in an embodiment of this application;

[0067] Figure 2 A flowchart illustrating the generation process of a spatial coordinate transformation algorithm result distribution package provided in an embodiment of this application;

[0068] Figure 3 A flowchart illustrating the encryption and decryption process of the geographic control range of a spatial coordinate transformation algorithm interface provided in an embodiment of this application;

[0069] Figure 4 This is a schematic diagram of the usage process of a mobile terminal map App provided in an embodiment of this application;

[0070] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0071] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0072] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0073] The cryptographic protection method for the spatial coordinate transformation algorithm and interface provided in this application uses domestic commercial cryptographic technology to protect the spatial coordinate transformation algorithm and its transformation interface. It provides security protection for the algorithm and transformation interface from four aspects: joint compilation of the spatial coordinate transformation algorithm source code and the domestic commercial cryptographic algorithm source code (hereinafter referred to as joint compilation), encryption protection of the binary file of the joint compilation result (binary joint compilation file), customized geographic control range protection of the coordinate transformation interface, and encryption protection of the transformed spatial coordinates. While improving the efficiency of joint compilation, it ensures the security of the coordinate transformation algorithm during distribution and use.

[0074] Spatial coordinate transformation algorithms are essential terminal plug-in algorithms for navigation software, intelligent driving software, and other mobile terminal map apps to perform navigation positioning and assisted driving when using confidentialized navigation electronic map data. Because they are developed based on geographic information confidentiality processing technology, they are considered important controlled management content. The source code of spatial coordinate transformation algorithms and their spatial coordinate transformation interfaces need to be protected to avoid the risk of the source code being obtained or the spatial coordinate transformation interfaces being cracked due to saturation attacks.

[0075] This application proposes a method and system for protecting spatial coordinate transformation algorithms and interfaces. This involves co-compiling the code with any domestically developed commercial cryptographic algorithm that possesses confidentiality, integrity, authenticity, and non-repudiation protection features and has passed testing by a third-party institution with commercial cryptographic testing qualifications. The binary co-compilation result and the transformed spatial coordinates are then provided as an encrypted distribution package. Only authorized navigation software, intelligent driving software, and other mobile terminal map apps can decrypt the commercially encrypted binary co-compilation result and transformed spatial coordinates after verifying the authenticity of the distribution package's source and the integrity of the files. This method and system for protecting spatial coordinate transformation algorithms and interfaces based on domestically developed commercial cryptographic technology ensures the security of the spatial coordinate transformation algorithm source code and transformation interface while enabling "compile once, use multiple times," greatly facilitating the subsequent development, testing, optimization, and upgrades of various functions in mobile terminal map apps.

[0076] In one exemplary embodiment, such as Figure 1 As shown, a password protection method for a mobile terminal map app spatial coordinate transformation algorithm and interface is provided, including the following steps:

[0077] S1: Compile the spatial coordinate transformation algorithm, the interface source code, and the commercial cryptographic algorithm source code together to obtain a binary bound file.

[0078] The spatial coordinate transformation algorithm and interface source code are used to implement the transformation process from original spatial coordinates to agreed spatial coordinates within a specified geographic control area, specifically including:

[0079] Decrypt and read the encrypted geographic control area to verify the authenticity of its source.

[0080] Verify whether the input original spatial coordinates are within the aforementioned geographic control range.

[0081] The process of converting the original spatial coordinates to agreed spatial coordinates within the aforementioned geographical control area.

[0082] The commercial cryptographic algorithm source code is used to encrypt the transformed spatial coordinates using the SM2 and SM4 algorithms, specifically including:

[0083] Generate a 64-bit random number as the symmetric key for the SM4 algorithm.

[0084] The transformed spatial coordinates are encrypted using the aforementioned symmetric key and SM4 algorithm.

[0085] The symmetric key of the SM4 algorithm is encrypted using the public key of the mobile terminal map app and the SM2 algorithm to form a digital envelope.

[0086] As an optional implementation, S1 specifically includes:

[0087] S11: Insert the spatial coordinate transformation algorithm and interface source code into the framework file of the commercial cryptographic algorithm source code to obtain the integrated source code.

[0088] S12: The integrated source code is compiled, assembled, and linked using the compilation tools provided by the development environment to form a binary bound file.

[0089] In this embodiment, the spatial coordinate transformation algorithm and interface are widely applicable and essential for navigation and intelligent driving software such as Gaode, Baidu, and Huawei in developing location-related functional modules for navigation, positioning, and assisted driving. To avoid the enormous workload associated with repeatedly compiling the controlled spatial coordinate transformation algorithm with the source code of location-related functional modules from different brands and versions of navigation and intelligent driving software, this embodiment co-compiles the spatial coordinate transformation algorithm and interface source code with the source code of any domestic commercial cryptographic algorithm. This achieves a "one-time compilation, nationwide applicability" effect, significantly improving work efficiency. The process of co-compiling the spatial coordinate transformation algorithm and interface source code with the domestic commercial cryptographic algorithm source code is the same as the current method of co-compiling with the source code of location-related functional modules from any brand and version of navigation and intelligent driving software. Both processes are conducted in a secure and reliable environment, resulting in a binary file concatenation result (binary concatenation file F1), ensuring that the spatial coordinate transformation algorithm and interface source code is not exposed.

[0090] Union compilation is the process of integrating, compiling, assembling, and linking code modules in the same or different programming languages ​​into a single binary file (functional module library file or executable program file). In this embodiment, integration involves inserting the spatial coordinate transformation algorithm and interface source code into a commercial cryptographic algorithm code framework file; compilation uses compilation tools provided by the development environment to perform lexical analysis, syntax analysis, and semantic analysis on the integrated source code to generate assembly code; assembly converts the assembly code into machine-executable instructions specific to the hardware platform; and linking merges multiple object files into an executable file, completing the address mapping from logical addresses to physical memory addresses.

[0091] S2: Encrypt the binary concatenated file using the SM2 and SM3 algorithms to obtain the spatial coordinate transformation algorithm result distribution package.

[0092] As an optional implementation, S2 specifically includes:

[0093] S21: Based on the SM2 algorithm, the binary concatenation file is encrypted using the public key provided by the mobile terminal map App to obtain the ciphertext binary concatenation file.

[0094] S22: Use the SM3 algorithm to generate the first ciphertext hash value of the binary concatenated file of the ciphertext.

[0095] S23: Use the private key of the results distributor to sign the first ciphertext hash value of the binary concatenated file of the ciphertext to obtain the first digital signature value.

[0096] S24: The first digital signature value is stored before the binary concatenation file of the ciphertext to form a spatial coordinate transformation algorithm result distribution package.

[0097] In this embodiment, the plaintext binary concatenated file F1 formed by concatenating S1 is protected for confidentiality, integrity, and authenticity of origin using the SM2 and SM3 algorithms respectively, forming an encrypted spatial coordinate transformation algorithm result distribution package. After confirming the authenticity and integrity of the encrypted file, only designated mobile terminal map apps are authorized to decrypt and access the distribution package. Figure 2As shown, the original spatial coordinates are transformed and encrypted using the spatial coordinate transformation algorithm and interface source code and the commercial cryptographic algorithm source code (domestic), outputting the transformed ciphertext coordinates. The spatial coordinate transformation algorithm and interface source code includes coordinate range updating, coordinate range verification, spatial coordinate transformation, and encryption protection of the transformed coordinates. The commercial cryptographic algorithm source code (domestic) includes the SM2 algorithm, the SM4 algorithm, and key exchange. The source code for spatial coordinate transformation and the source code for domestic commercial cryptographic algorithms are jointly compiled. When protecting the confidentiality of the plaintext binary concatenation file F1 based on the SM2 algorithm, the public key of an authorized mobile terminal map app is used to encrypt the plaintext binary concatenation file F1 to form the ciphertext binary concatenation file F2. Only the mobile terminal map app with the corresponding private key can decrypt and access the ciphertext binary concatenation file F2. When protecting the integrity of the ciphertext binary concatenation file F2 based on the SM3 algorithm, the first ciphertext hash value H2_f of the ciphertext binary concatenation file F2 is first generated using the SM3 algorithm. The first ciphertext hash value H2_f is then signed using the private key of the result distributor to protect the authenticity of the source, resulting in the first digital signature value S2_f. This first signature value S2_f is then placed before the ciphertext binary concatenation file F2 to form the spatial coordinate transformation algorithm result distribution package R1 (ciphertext with a digital signature). This ensures that the mobile terminal map app, as the recipient of the binary file, can simultaneously verify the integrity of the binary concatenation file and the identity of the result distributor.

[0098] For different authorized mobile terminal map apps, since each uses its own different public key to encrypt the plaintext binary concatenation file F1, this application will form different result distribution packages for different brands of mobile terminal map apps, but the plaintext binary concatenation file F1 only needs to be concatenated once.

[0099] When a mobile map app applies for a spatial coordinate transformation algorithm and interface distribution package, it only needs to provide a digital certificate containing its own identity information and public key information to the distribution party. The distribution party, after verifying the certificate's validity, will then complete the aforementioned encryption protection. The distribution party is responsible for submitting the encrypted spatial coordinate transformation algorithm distribution package and its public key to the mobile map app for testing.

[0100] S3: The test version and the official version of the geographic control range of the spatial coordinate transformation algorithm interface are encrypted using the SM4 and SM3 algorithms respectively, resulting in the test version and the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface.

[0101] As an optional implementation, in S3, encryption is performed on the geographic control area for any version, specifically including:

[0102] S31: Use the SM4 algorithm and the symmetric key built into the spatial coordinate transformation algorithm result distribution package to encrypt the geographic control range of the spatial coordinate transformation algorithm interface, forming the ciphertext geographic control range.

[0103] S32: Use the SM3 algorithm to perform a hash operation on the geographic control area of ​​the ciphertext to obtain the third ciphertext hash value of the geographic control area of ​​the ciphertext.

[0104] S33: Use the private key of the results distributor to sign the third ciphertext hash value of the geographic control range of the ciphertext to obtain the second digital signature value.

[0105] S34: Store the second digital signature value before the geographic control area of ​​the ciphertext to form a geographic control area distribution packet of the spatial coordinate transformation algorithm interface.

[0106] S4: Distribute the spatial coordinate transformation algorithm result distribution package, the test version of the geographic control area distribution package, and the official version of the geographic control area distribution package to the mobile terminal map App.

[0107] In this embodiment, controlling the geographic control range of the spatial coordinate transformation interface application can prevent mobile terminal map app developers from launching saturation attacks on the spatial coordinate transformation algorithm interface during the development and testing phase, without affecting interface calls after the app is released and running. To this end, the geographic control range of the spatial coordinate transformation algorithm interface is used as a configuration file, and the SM4 and SM3 algorithms are used respectively to protect its confidentiality, integrity, and source authenticity, ensuring that only the distributor of the results can update and identify this geographic control range.

[0108] The procedures for protecting and verifying the confidentiality, integrity, and source authenticity of the geographic control area using the SM4 and SM3 algorithms for the spatial coordinate transformation algorithm interface in both the test and official versions are the same, such as... Figure 3 As shown:

[0109] 1. The symmetric key K built into the distribution package of the SM4 algorithm and the spatial coordinate transformation algorithm is used to encrypt and protect the geographic control range G1 (the geographic control range of the spatial coordinate transformation algorithm interface) of the plaintext, forming the geographic control range G2 of the ciphertext.

[0110] 2. Use the SM3 algorithm to perform a hash operation on the geographical control range G2 of the ciphertext for integrity protection, and obtain the third ciphertext hash value H2_g.

[0111] 3. Use the private key of the distributor of the spatial coordinate transformation algorithm result to sign the third ciphertext hash value H2_g to protect the authenticity of the source, obtaining the second digital signature value S2_g. This second digital signature value S2_g is then stored before the geographic control area G2 of the ciphertext, forming the spatial coordinate transformation algorithm interface geographic control area distribution packet R2 (i.e., Figure 3 (encrypted text with digital signature).

[0112] During the code integration phase, two distribution packages of the spatial coordinate transformation algorithm interface with geographical control ranges are generated according to the pilot area and the national area, respectively, for software testing and software release. This prevents developers from launching saturation attacks on the spatial coordinate transformation algorithm interface during the research and development testing process.

[0113] In one exemplary embodiment, a method for applying a mobile terminal map app is provided, including:

[0114] Step 1: Launch the mobile map app and load the spatial coordinate transformation algorithm module.

[0115] Step 2: During the self-check of the mobile terminal map App, the authenticity and integrity of the spatial coordinate transformation algorithm result distribution package are verified and decrypted to obtain a binary bound file; the spatial coordinate transformation algorithm result distribution package is determined using the above-mentioned password protection method of the mobile terminal map App spatial coordinate transformation algorithm and interface.

[0116] As an optional implementation, the authenticity and integrity of the spatial coordinate transformation algorithm result distribution package are verified and decrypted to obtain a binary concatenated file, specifically including:

[0117] Step 21: Extract the first digital signature value from the spatial coordinate transformation algorithm result distribution package, and verify the first digital signature value using the public key of the result distributor.

[0118] Step 22: If the signature verification passes, it proves that the source of the spatial coordinate transformation algorithm result distribution package is authentic and reliable. Extract the first ciphertext hash value of the binary concatenated file of the ciphertext from the spatial coordinate transformation algorithm result distribution package.

[0119] Step 23: Extract the ciphertext binary concatenation file from the spatial coordinate transformation algorithm result distribution package.

[0120] Step 24: Calculate the second ciphertext hash value of the binary concatenated file of the ciphertext using the SM3 algorithm, and compare the second ciphertext hash value with the first ciphertext hash value.

[0121] Step 25: If the second ciphertext hash value is equal to the first ciphertext hash value, it indicates that the spatial coordinate transformation algorithm result distribution package is complete.

[0122] Step 26: Use the private key of the mobile terminal map App to decrypt the binary concatenated file of the encrypted text to obtain the binary concatenated file.

[0123] Step 27: If the second ciphertext hash value is not equal to the first ciphertext hash value, it indicates that the spatial coordinate transformation algorithm result distribution package has been tampered with during the distribution process.

[0124] Step 28: If the signature verification fails, it proves that the source of the spatial coordinate transformation algorithm result distribution package is not genuine and reliable.

[0125] In this embodiment, navigation software, intelligent driving software, and other mobile terminal map apps must verify the authenticity and integrity of the spatial coordinate transformation algorithm result distribution package file and decrypt it each time they start self-checking before they can load and use it. The corresponding process is as follows:

[0126] 1. Source Authenticity Verification. Extract the first digital signature value S2_f from the spatial coordinate transformation algorithm result distribution package. Use the public key of the spatial coordinate transformation algorithm result distributor to verify the first digital signature value S2_f in the spatial coordinate transformation algorithm result distribution package. If the verification passes, it proves that the source of the spatial coordinate transformation algorithm result distribution package is authentic and reliable, and the first ciphertext hash value H2_f is extracted from the spatial coordinate transformation algorithm result distribution package; otherwise, it indicates that the source of the distribution package is not authentic and reliable.

[0127] 2. Distribution Packet Integrity Verification. After the above signature verification is successful, the ciphertext binary concatenated file F2 is extracted from the spatial coordinate transformation algorithm result distribution packet. The SM3 algorithm is used to calculate the second ciphertext hash value H_f of the ciphertext binary concatenated file F2, and the second ciphertext hash value H_f is compared with the first ciphertext hash value H2_f. If H_f = H2_f, it means that the distribution packet is intact and the distribution process has not been tampered with; otherwise, the distribution packet has been tampered with during the distribution process.

[0128] 3. Decrypt the binary file. Using the private key of the mobile terminal map app such as navigation software and intelligent driving software, decrypt the encrypted binary concatenation file F2 to obtain the plaintext binary concatenation file F1, and integrate it into the running environment of the mobile terminal map app.

[0129] Step 3: After the spatial coordinate transformation algorithm module is loaded, the authenticity and integrity of the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface are verified and decrypted to obtain the official version of the geographic control range of the spatial coordinate transformation algorithm interface. The official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface is determined using the above-mentioned password protection method for the spatial coordinate transformation algorithm and interface of the mobile terminal map App.

[0130] As an optional implementation, the test and release runtime load the test and official versions of the geographic control area distribution package respectively, and verify and decrypt the authenticity and integrity of the geographic control area distribution package of the spatial coordinate transformation algorithm interface to obtain the geographic control area of ​​the spatial coordinate transformation algorithm interface, specifically including:

[0131] Step 31: Extract the second digital signature value from the geographic control area distribution packet of the spatial coordinate transformation algorithm interface, and verify the second digital signature value using the public key of the spatial coordinate transformation algorithm result distribution packet.

[0132] Step 32: If the signature verification passes, it proves that the source of the geographic control area distribution packet of the spatial coordinate transformation algorithm interface is authentic and reliable. Extract the third ciphertext hash value of the geographic control area from the ciphertext of the geographic control area distribution packet of the spatial coordinate transformation algorithm interface.

[0133] Step 33: Extract the encrypted geographic control range from the geographic control range distribution packet of the spatial coordinate transformation algorithm interface.

[0134] Step 34: Calculate the fourth ciphertext hash value of the geographic control range of the ciphertext using the SM3 algorithm, and compare the fourth ciphertext hash value with the third ciphertext hash value.

[0135] Step 35: If the fourth ciphertext hash value is equal to the third ciphertext hash value, it indicates that the geographic control range distribution package of the spatial coordinate transformation algorithm interface is complete.

[0136] Step 36: Use the symmetric key built into the spatial coordinate transformation algorithm result distribution package to decrypt the geographic control range of the ciphertext, and obtain the geographic control range of the spatial coordinate transformation algorithm interface.

[0137] Step 37: If the fourth ciphertext hash value is not equal to the third ciphertext hash value, it indicates that the geographic control range distribution package of the spatial coordinate transformation algorithm interface has been tampered with during the distribution process.

[0138] Step 38: If the signature verification fails, it proves that the source of the geographic control range distribution package of the spatial coordinate transformation algorithm interface is not genuine and reliable.

[0139] In this embodiment, as Figure 3As shown, when the spatial coordinate transformation algorithm interface geographic control range distribution packet R2 is decrypted and run in memory by the spatial coordinate transformation algorithm result distribution packet R1, the second digital signature value S2_g is first extracted. The second digital signature value S2_g is verified using R1's public key. After successful verification, the third ciphertext hash value H2_g is extracted from the spatial coordinate transformation algorithm interface geographic control range distribution packet R2. Only after successful verification can the transformation algorithm start normally. The ciphertext geographic control range G2 is extracted from the spatial coordinate transformation algorithm interface geographic control range distribution packet R2. The ciphertext geographic control range G2 is hashed using the SM3 algorithm to obtain the fourth ciphertext hash value H_g. The identity of H_g and H2_g is verified. Only when H_g = H2_g, the integrity check passes, and the spatial coordinate transformation algorithm can start normally. The ciphertext geographic control range G2 is decrypted using R1's built-in symmetric key K to obtain the spatial coordinate transformation algorithm interface geographic control range G1. G1 is used to control the scope of the spatial coordinate transformation algorithm interface.

[0140] Step 4: The mobile terminal map app obtains the original spatial coordinates of the current location.

[0141] Step 5: Use the official version of the geographic control range of the binary bound file and spatial coordinate transformation algorithm interface to transform and encrypt the original spatial coordinates to obtain the ciphertext transformed spatial coordinates.

[0142] In one embodiment, step 5 specifically includes:

[0143] Step 51: Use the spatial coordinate transformation algorithm and the official version of the geographic control range of the interface in the binary bind file to transform the original spatial coordinates to obtain the transformed spatial coordinates.

[0144] Step 52: Encrypt the transformed spatial coordinates using the format-preserving encryption method of the SM4 algorithm to obtain the ciphertext transformed spatial coordinates. The SM4 algorithm is a commercial cryptographic algorithm.

[0145] In practical applications, the spatial coordinate transformation algorithm is decoupled from the location-related functional modules of mobile terminal map apps such as navigation software and intelligent driving software. This allows the transformed spatial coordinates to be output to any functional module of the mobile terminal map app, rather than a pre-defined location-related functional module. To prevent the spatial coordinate transformation algorithm interface from being subjected to saturation attacks by unauthorized functional modules, the transformed spatial coordinates are encrypted using the SM4 algorithm's format preservation encryption method and output in ciphertext form. Only functional modules with the SM4 algorithm symmetric key can correctly decrypt and use the transformed spatial coordinates.

[0146] Step 6: Using the symmetric key of the SM4 algorithm, decrypt the converted spatial coordinates of the ciphertext to obtain the converted spatial coordinates of the plaintext, thereby achieving map-based location matching; wherein, the symmetric key of the SM4 algorithm is obtained by exchanging between the mobile terminal map App and the spatial coordinate conversion algorithm module using the digital envelope technology of the SM2 algorithm.

[0147] In this embodiment, in order to improve the efficiency of symmetric key distribution of the SM4 algorithm while ensuring security, the symmetric key is exchanged once between the mobile terminal map app and the spatial coordinate transformation algorithm module using digital envelope technology based on the SM2 algorithm during each startup self-test of the mobile terminal map app. This key is then used continuously until the software is started again.

[0148] In one embodiment, the symmetric key exchange process of the SM4 algorithm specifically includes:

[0149] Each time the mobile terminal map app starts a self-test and loads the spatial coordinate transformation algorithm module, it calls the key exchange interface of the spatial coordinate transformation algorithm module to transmit the public key value of the mobile terminal map app.

[0150] The spatial coordinate transformation algorithm module generates a random number as the symmetric key of the SM4 algorithm, which is then used as the key for encrypting the transformed spatial coordinates. The public key value is then used to encrypt the symmetric key of the SM4 algorithm to obtain the encrypted symmetric key of the SM4 algorithm.

[0151] The encrypted symmetric key of the SM4 algorithm is returned to the mobile terminal map App through the key exchange interface of the spatial coordinate transformation algorithm module.

[0152] The mobile terminal map app decrypts the encryption symmetric key of the SM4 algorithm to obtain the symmetric key of the SM4 algorithm, and distributes it to the location-related functional module using the spatial coordinate transformation algorithm as the key for the transformed spatial coordinates of the subsequent decryption of the ciphertext.

[0153] In this embodiment, when the location-related functional modules of mobile terminal map apps such as navigation software and intelligent driving software call the integrated spatial coordinate transformation algorithm interface, the location-related functional modules send the original spatial coordinates to the spatial coordinate transformation algorithm interface to obtain the converted spatial coordinates of the ciphertext. Using the exchanged symmetric key of the SM4 algorithm, the converted spatial coordinates of the ciphertext are decrypted to obtain the converted spatial coordinates of the plaintext, enabling functions such as map-based location matching. Throughout this process, in accordance with national regulations on spatial coordinate transformation algorithms, the spatial coordinates before and after the transformation are not recorded, stored, or displayed in any form.

[0154] This application involves a product structure comprising a protected spatial coordinate transformation algorithm result distribution package R1, a spatial coordinate transformation algorithm interface geographic control range distribution package R2, a plaintext binary bound file F1, a mobile terminal map app, and its location-related functional modules. The protected spatial coordinate transformation algorithm result distribution package is generated via steps S1 and S2, the spatial coordinate transformation algorithm interface geographic control range distribution package is generated via step S3, and the decrypted plaintext binary bound file F1 is generated via step 2. The authenticity and integrity verification and result decryption of the spatial coordinate transformation algorithm result distribution package are completed by the mobile terminal map app during startup self-test. After the spatial coordinate transformation algorithm module is loaded, the authenticity and integrity verification and decryption of the spatial coordinate transformation interface geographic control range are performed, completing the preparatory work for the spatial coordinate transformation algorithm. When the mobile terminal map app is in the development and testing phase, only the spatial coordinate transformation interface geographic control range for the test area is provided; upon software release after testing, the spatial coordinate transformation interface geographic control range for the entire country is provided.

[0155] In this embodiment, as Figure 4 As shown, navigation, intelligent driving, and other mobile terminal map apps receive and call the coordinate transformation module's result distribution package and the coordinate transformation interface's geographic control range. The navigation, intelligent driving, and other mobile terminal map apps first verify the authenticity and integrity of the source of both and decrypt the results. The decrypted plaintext binary concatenation file is then input into the coordinate transformation module for location-related modules to call through the coordinate transformation interface. Location-independent modules will not call the plaintext binary concatenation file.

[0156] This application has the following advantages:

[0157] 1. Decouple the source code of the spatial transformation algorithm to be protected from navigation software and intelligent driving software of different brands and versions, so as to reduce the joint compilation work from "multiple versions and multiple times" to "multiple versions and one time".

[0158] The current method of tightly coupling the source code of spatial coordinate transformation algorithms with the source code of location-related functional modules in mobile terminal map apps such as navigation software and intelligent driving software is inflexible. Not only do the compilation environments differ significantly between brands, requiring different joint compilation environments to be configured, but any upgrade or addition / removal of location-related functional modules in different versions of the same brand also necessitates recompilation, making the work tedious and complex. This application jointly compiles the source code of spatial coordinate transformation algorithms with domestically developed commercial cryptographic algorithms. Without exposing the source code of the spatial coordinate transformation algorithms or compromising their security, it decouples the joint compilation work from software brands and versions, achieving the effect of "one-time joint compilation, multiple versions, one time," greatly reducing the workload and improving the efficiency of joint compilation.

[0159] 2. Upgrade the plaintext binary concatenation file of the current concatenation result to a confidential result distribution package (spatial coordinate transformation algorithm result distribution package) that protects confidentiality, integrity, and authenticity of source. This enhances the security of the concatenation result while facilitating its use by different functional modules of mobile terminal map apps.

[0160] Currently, the source code of spatial coordinate transformation algorithms is jointly compiled with the source code of location-related functional modules in navigation and intelligent driving software to form a plaintext binary bundle file. This file faces the risk of being decompiled and cracked during the research, development, testing, and distribution processes. This application uses domestically developed commercial cryptographic algorithms to protect the confidentiality, integrity, and authenticity of the plaintext binary bundle file. This ensures the reliable and intact origin of the distributed results package, allowing only authorized upper-layer application files to be decrypted and used in memory, thus avoiding the risk of external decompilation and cracking of the distributed results package and further enhancing the security of the algorithm distribution process.

[0161] 3. The test version and the official release version of the development result distribution package are distinguished by the geographical control range of the control spatial coordinate transformation algorithm interface, which reduces the risk of using the conversion interface during the development process.

[0162] For mobile map apps calling spatial coordinate transformation algorithm interfaces, the ability to decrypt transformed spatial coordinates presents a risk during testing and development. Developers may exploit this vulnerability by using massive amounts of data on raw and transformed spatial coordinates to launch saturation attacks. Such attacks would be impossible once the mobile map app is fully developed and officially released. Therefore, this application differentiates the development package versions based on different geographic control areas, only opening the spatial coordinate transformation function to developers in demonstration areas to prevent saturation attacks. Upon official release, the mobile map app will update the control area of ​​the transformation interface online to support spatial coordinate transformation nationwide.

[0163] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described mobile terminal map App application method.

[0164] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the above-described mobile terminal map app application method.

[0165] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described mobile terminal map App application method.

[0166] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 5 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media to run. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a mobile terminal map application method.

[0167] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0168] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0169] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0170] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logic devices, etc., and are not limited to these.

[0171] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.

[0172] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A password protection method for a spatial coordinate transformation algorithm and interface of a mobile terminal map App, characterized in that, include: The spatial coordinate transformation algorithm, interface source code, and commercial cryptographic algorithm source code are jointly compiled to obtain a binary bound file; The source code for the spatial coordinate transformation algorithm and interface is used to transform the original spatial coordinates within a specified geographical control area; the source code for the commercial cryptographic algorithm is used to encrypt the transformed spatial coordinates. The binary concatenated file is encrypted using the SM2 and SM3 algorithms to obtain a spatial coordinate transformation algorithm result distribution package; The test version and the official version of the geographic control range of the spatial coordinate transformation algorithm interface are encrypted using the SM4 and SM3 algorithms respectively, resulting in the test version and the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface. The test and official versions of the geographic control area of ​​the spatial coordinate transformation algorithm interface are encrypted using the SM4 and SM3 algorithms respectively, resulting in the test and official versions of the geographic control area distribution package. Specifically, these packages include: Encryption is applied to the geographic control area for any version, including: The geographic control range of the spatial coordinate transformation algorithm interface is encrypted using the SM4 algorithm and the symmetric key built into the spatial coordinate transformation algorithm result distribution package to form the ciphertext geographic control range. The SM3 algorithm is used to perform a hash operation on the geographic control area of ​​the ciphertext to obtain the third ciphertext hash value of the geographic control area of ​​the ciphertext. The third ciphertext hash value of the geographic control range of the ciphertext is signed using the private key of the results distributor to obtain the second digital signature value. The second digital signature value is stored before the geographic control area of ​​the ciphertext to form a geographic control area distribution packet of the spatial coordinate transformation algorithm interface; The spatial coordinate transformation algorithm results distribution package, the test version of the geographic control area distribution package, and the official version of the geographic control area distribution package are distributed to mobile terminal map apps.

2. The cryptographic protection method for the spatial coordinate transformation algorithm and interface according to claim 1, characterized in that, The spatial coordinate transformation algorithm, its interface source code, and the source code of commercial cryptographic algorithms are jointly compiled to obtain a binary bundled file, which specifically includes: The spatial coordinate transformation algorithm and interface source code are inserted into the framework file of the commercial cryptographic algorithm source code to obtain the integrated source code; The integrated source code is compiled, assembled, and linked using the compilation tools provided by the development environment to form a binary linked file.

3. The cryptographic protection method for the spatial coordinate transformation algorithm and interface according to claim 1, characterized in that, The binary concatenated file is encrypted using the SM2 and SM3 algorithms to obtain a spatial coordinate transformation algorithm result distribution package, specifically including: Based on the SM2 algorithm, the binary concatenated file is encrypted using the public key provided by the mobile terminal map app to obtain the ciphertext binary concatenated file; The first ciphertext hash value of the binary concatenated file of the ciphertext is generated using the SM3 algorithm; The first ciphertext hash value of the binary concatenated file of the ciphertext is signed using the private key of the distributor of the results to obtain the first digital signature value; The first digital signature value is stored before the binary concatenation file of the ciphertext to form a spatial coordinate transformation algorithm result distribution package.

4. A method for applying a mobile terminal map app, characterized in that, include: Launch the mobile map app and load the spatial coordinate transformation algorithm module; During the self-test of the mobile terminal map App, the authenticity and integrity of the spatial coordinate transformation algorithm result distribution package are verified and decrypted to obtain a binary concatenated file; the spatial coordinate transformation algorithm result distribution package is determined using the password protection method of the mobile terminal map App spatial coordinate transformation algorithm and interface as described in any one of claims 1-3; After the spatial coordinate transformation algorithm module is loaded, the authenticity and integrity of the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface are verified and decrypted to obtain the official version of the geographic control range of the spatial coordinate transformation algorithm interface; the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface is determined using the password protection method of the mobile terminal map App spatial coordinate transformation algorithm and interface as described in any one of claims 1-3; Mobile terminal map apps obtain the raw spatial coordinates of the current location; The original spatial coordinates are converted and encrypted using the official version of the binary bound file and spatial coordinate transformation algorithm interface to obtain the converted spatial coordinates in ciphertext. Using the symmetric key of the SM4 algorithm, the converted spatial coordinates of the ciphertext are decrypted to obtain the converted spatial coordinates of the plaintext, thus achieving map-based location matching. The symmetric key of the SM4 algorithm is obtained by exchanging the digital envelope technology of the SM2 algorithm between the mobile terminal map app and the spatial coordinate conversion algorithm module.

5. The mobile terminal map App application method according to claim 4, characterized in that, The authenticity and integrity of the spatial coordinate transformation algorithm result distribution package are verified and decrypted to obtain a binary concatenated file, specifically including: Extract the first digital signature value from the spatial coordinate transformation algorithm result distribution package, and verify the first digital signature value using the public key of the result distributor; If the signature verification is successful, it proves that the source of the spatial coordinate transformation algorithm result distribution package is authentic and reliable. Extract the first ciphertext hash value of the binary concatenated file of the ciphertext from the spatial coordinate transformation algorithm result distribution package. Extract the encrypted binary concatenated file from the spatial coordinate transformation algorithm result distribution package; The SM3 algorithm is used to calculate the second ciphertext hash value of the binary concatenated file of the ciphertext, and the second ciphertext hash value is compared with the first ciphertext hash value. If the second ciphertext hash value is equal to the first ciphertext hash value, it indicates that the spatial coordinate transformation algorithm result distribution package is complete; Using the private key of the mobile terminal map app, the encrypted binary concatenated file is decrypted to obtain the binary concatenated file; If the second ciphertext hash value is not equal to the first ciphertext hash value, it indicates that the spatial coordinate transformation algorithm result distribution package has been tampered with during the distribution process. If the verification fails, it proves that the source of the spatial coordinate transformation algorithm result distribution package is not genuine or reliable.

6. The mobile terminal map App application method according to claim 4, characterized in that, The authenticity and integrity of the official version of the geographic control area distribution package of the spatial coordinate transformation algorithm interface are verified and decrypted to obtain the official version of the geographic control area of ​​the spatial coordinate transformation algorithm interface, specifically including: Extract the second digital signature value from the official version of the geographic control area distribution package of the spatial coordinate transformation algorithm interface, and verify the second digital signature value using the public key of the spatial coordinate transformation algorithm result distribution package; If the signature verification is successful, it proves that the source of the official version of the geographic control area distribution package of the spatial coordinate transformation algorithm interface is authentic and reliable. The third ciphertext hash value of the geographic control area is extracted from the official version of the geographic control area distribution package of the spatial coordinate transformation algorithm interface. Extract the encrypted geographic control range from the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface; The SM3 algorithm is used to calculate the fourth ciphertext hash value of the geographic control area of ​​the ciphertext, and the fourth ciphertext hash value is compared with the third ciphertext hash value. If the fourth ciphertext hash value is equal to the third ciphertext hash value, it indicates that the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface is complete. Using the symmetric key built into the spatial coordinate transformation algorithm result distribution package, the geographic control range of the ciphertext is decrypted to obtain the official version of the geographic control range of the spatial coordinate transformation algorithm interface. If the fourth ciphertext hash value is not equal to the third ciphertext hash value, it indicates that the official version of the geographic control range distribution package of the spatial coordinate transformation algorithm interface has been tampered with during the distribution process. If the signature verification fails, it proves that the official version of the geographic control area distribution package of the spatial coordinate transformation algorithm interface is not genuine or reliable.

7. The mobile terminal map App application method according to claim 4, characterized in that, The symmetric key exchange process of the SM4 algorithm specifically includes: After each startup self-test and loading of the spatial coordinate transformation algorithm module, the mobile terminal map app calls the key exchange interface of the spatial coordinate transformation algorithm module to transmit the public key value of the mobile terminal map app. The spatial coordinate transformation algorithm module generates a random number as the symmetric key of the SM4 algorithm, and uses the public key value to encrypt the symmetric key of the SM4 algorithm to obtain the encrypted symmetric key of the SM4 algorithm. The encryption symmetric key of the SM4 algorithm is returned to the mobile terminal map App through the key exchange interface of the spatial coordinate transformation algorithm module; The mobile terminal map app decrypts the encryption symmetric key of the SM4 algorithm to obtain the symmetric key of the SM4 algorithm.

8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the mobile terminal map App application method according to any one of claims 4-7.