Commutative Encryption and Watermarking Algorithm Based on Feature Invariants for Secure Vector Map

The existing commutative encryption and watermarking (CEW) methods based on feature invariants can achieve both the robustness of the watermarking algorithm and the security of the encryption algorithm. However, they are only applicable to the raster data such as images, videos, etc. In particular, the organization structure and storage structure of vector map have not been considered in these methods. Therefore, they cannot be used for vector map. This paper derives two feature invariants to solve this problem, which are the sum of inner angles and the storage direction of two adjacent objects according to the inherent characteristics of vector map. Based on these two feature invariants, a new CEW method is proposed in this paper, which includes the feature invariants based watermarking algorithm and the perceptual stream cipher based encryption algorithm on coordinates. Since the coordinate values used in encryption and the feature invariants used in watermarking are independent of each other, the commutativity is achieved for the proposed CEW method. The experiments are given to verify that the proposed CEW method can achieve the commutativity between encryption and watermarking without deteriorating accuracy of data. Besides, it has been verified that the proposed method is more robust to rotate, scaling, translation, and projection transformation compared with the existing CEW methods and has high security. The proposed algorithm has good scalability of encryption, and arbitrary encryption methods based on encrypting the coordinate values can be applied without affecting the extracted feature invariants.


I. INTRODUCTION
With the rapid development of cloud computing technology and geographical information system (GIS), more and more vector maps are stored, distributed and processed in the cloud because it is convenient and low cost. However, since the vector maps stored in the cloud is out of the user's control, it leads to concerns of data security and privacy leakage [1], [2]. The encryption and watermarking are served as two major techniques for protecting the vector map security [3]- [7]. The encryption technique converts original and meaningful The associate editor coordinating the review of this manuscript and approving it for publication was SK Hafizul Islam . data content into hard-to-understand data content under the control of a key, which protects the data's confidentiality [8]- [10]. Only the authorized customer who has the right key can recover the data correctly, but it cannot achieve the copyright trace for data in plaintext or ciphertext. Compared with the encryption technique, the watermarking technique embeds the invisible information into the data, which can be extracted and used to authenticate data's ownership or identification, but it cannot ensure the security in data transmission [11]- [18]. Therefore, it is possible to overcome the limitation of a single technique by combining both the techniques of encryption and watermarking together to protect both confidentiality and ownership/ identification [19]- [21].
There are two types of methods that simply combines encryption and watermarking together. The first type is encryption first then watermarking. This method will modify the ciphertext and cause the failure of decryption. The other one is watermarking first then encryption. This method also has the drawback that the secret key of cryptography must be gained by the copyright identification party, resulting in the leakage of key. The above methods are not practical and flexible because watermarking and encryption are not separated and commutative. Commutative encryption and watermarking (CEW) is such a technology that integrates encryption and watermarking and ensures the operation sequence is exchangeable [22], [23]. In this method, the operation of encryption and watermarking do not mutually interfere with each other which is often called commutative property. That means the watermark can be embedded into the encrypted data directly, or it can be extracted correctly from the decrypted data or the encrypted data. The CEW is not a simple combination of encryption and watermarking. However, the current encryption and watermarking techniques have not been involved the commute with the other, which in turn result in the absence of the commute of the CEW derived by using the existing encryption and watermarking techniques directly [24]. Therefore, how to ensure the commute between encryption and watermarking is a key issue in the CEW research.
There are three basic types of methods for achieving the commute of CEW. The first one is based on different data fields, in which the data are separated into two different parts, where one part is encrypted and the other is watermarked. Since the encryption part is independent of the watermarking part, they are naturally commutative [25]- [29]. For example, in [28], the data are partitioned into two parts after wavelet transformation, the high-level coefficients are fully encrypted, while the low-level coefficients are watermarked. In [29], the data are partitioned into important part (such as motion vector), and robust part (such as Discrete Cosine Transform coefficient values), where the former is encrypted and the latter is watermarked. However, only a part of data has been encrypted and the other part of data with watermarking operation is still in plaintext with this method, which will greatly lead to the issue of poor security of data.
The second type of methods is based on homomorphic encryption [30]. Homomorphic encryption is the operation on the encrypted data which can offer the same results after calculations as the operation straight on the original data. Therefore, if the encryption and the watermarking consist of the same homomorphic operation, they will not interfere with each other. For example, in [31], the quasi-commutative encryption and watermarking scheme is proposed based on the homogenous operations of additive modulation. The whole data can be encrypted in this method. Though some schemes based on homomorphic encryption show higher security than the methods based on the different data fields, their robustness of watermarking is relatively lower.
The third type of methods is based on invariant features that are extracted from the data. The invariant features are used for watermarking. The encryption will not have any impact on these features at the same time. Thus, the commute for CEW is achieved [32]- [34]. For example, the feature of global histogram statistics is invariable after scrambling pixel position. This invariant feature has been utilized to watermark and achieve the encryption by scrambling pixel position simultaneously. The security of encryption and robustness of watermarking is thus improved effectively [34]. However, some feature invariants proposed by this kind of methods (e.g., histogram statistics) cannot be applicable for vector map due to the difference in manifestations between vector map and raster data.
From the aforementioned introduction of current studies for CEW, it can be summarized as follows. It is easy to implement the methods based on different data fields, where the operations of encryption and watermarking are separated distinctly. However, the data with watermarking operation are still in plaintext, and suffer from the risks of data leak. The methods based on homomorphic encryption can achieve encryption on all data and improve the security of data. However, the current watermarking methods homomorphic with encryption are still less, which are limited to the simple homomorphic operation such as addition and multiplication. Thus, the robustness of the watermarking algorithm is weak. The methods based on feature invariants achieve encryption for full text by fully utilizing the data features and have good watermarking robust. It provides the basic techniques and approaches for widespread application in vector map. However, there are some obvious differences between vector map and traditional raster data, especially in aspects of data representation, organization methods, storage structure and application environment. Therefore, how to select the representative feature invariants of vector map that satisfy the commute of CEW has become a difficult and urgent problem in the current CEW research of vector map.
This paper aims to realize the commute of CEW for vector map based on feature invariants. Thus, the focus of this method is to construct feature invariants of CEW for vector map. Therefore, the method in this paper consists of three key steps: (1) construct the feature invariants of CEW based on the essential features of vector map; (2) present a feature invariants-based watermarking algorithm; (3) propose an encryption algorithm without changing the feature invariants, and thus ensure the commutativity of CEW for vector map. The remainder of the paper is organized as follows. In Section II, the feature invariants of CEW for vector map are constructed. In Section III, a new CEW algorithm based on feature invariants is presented, which includes two parts, i.e., watermark part and encryption part. Experiments and results are given in Section IV. Discussions are illustrated in Section V. Section VI draws the conclusions.

II. FEATURE INVARIANTS OF CEW FOR VECTOR MAP A. THE FEATURE INVARIANT OF SUM OF INNER ANGLES
The sum of interior angle of vector map refers to the sum value of the inner angles formed by all vertex inside polylines (the beginning vertex and the end vertex are allowed to be virtually connected) or polygons. Suppose one vector map includes N objects, one of which is represented by P i , 0 ≤ i < N , N P i represents the vertex number of the current feature, the sum of inner angles of one object can be represented as: where SumA i is the sum of inner angles of i-th object of polyline/polygon. Subtracting 2 from N P i is because a polygon with n vertices can be considered to be made up of (n − 2) triangles. From Eq. (1), it can be observed that the sum of inner angles is only related to the number of vertices in the current object. It is noted that the number of vertices does not change with the operation, such as rotation, scaling, translation and projection transformation, etc. That is to say, the sum of inner angles has invariability under the operation of rotation, scaling, translation, and projection transformation.

B. THE FEATURE INVARIANT OF STORAGE DIRECTION OF TWO ADJACENT OBJECTS
Suppose two adjacent objects are P i and P i+1 , and the number of vertices in these two adjacent objects are N P i and N P i+1 , respectively. The quantized value of the storage direction of two adjacent objects, namely PDir (i+1) / 2 is expressed as: It can be observed from Eq. (2) that the storage direction of two adjacent objects are only related to the number of vertices in two adjacent objects. Therefore, the storage direction also has invariability under operation of rotation, scaling, translation and projection transformation.

A. BASIC IDEA
The basic idea of this paper is to establish the feature invariants of CEW for vector map, propose a watermarking algorithm based on the constructed feature invariants, and present an encryption algorithm based on coordinate values that keeps the constructed feature invariants unchanged. In this method, the derived feature invariants are the sum of inner angles and the storage direction of two adjacent objects, which are independent of the coordinates of vector map. Therefore, the proposed watermarking algorithm based on feature invariants and the encryption algorithm based on coordinates do not interfere with each other.
The flowchart of this method is shown in Figure 1. From the original data to the CEWed data, we can see that the proposed CEW method consists of two parts, namely the watermark part and the encryption part. First, feature invariants and coordinates are extracted from the original data. Then the watermark is embedded in the feature invariants, and the encryption is applied to the coordinates with a key. The watermark and the encryption are commutative. Afterwards, the watermark extraction is the inverse process of the watermark embedding, and the decryption is also the inverse process of the encryption. Furthermore, the watermark extraction and the decryption can be exchangeable. As aforementioned, the sum of inner angles of two adjacent objects is utilized to determine the bit of watermarking. In this VOLUME 8, 2020 way, the synchronization of watermarks can be achieved before and after their embedding processes. In addition, the storage directions of two adjacent objects are used to embed the watermark information. In this way, not only the coordinates of data are unchanged before and after the watermark embedding, but also the robustness of the watermarking algorithm can be enhanced. The encryption algorithm is proposed for the coordinates based on perceptual stream cipher to achieve the commutativity between the encryption and the watermarking. This encryption algorithm does not affect the feature invariants, and therefore does not interfere with the watermarking part.

B. WATERMARK PART 1) WATERMARK EMBEDDING
The detailed diagram of watermark embedding method is shown in Figure 2. First, sum of inner angles and storage direction of two adjacent objects are calculated from the original vector map. Then, the watermark index is determined by the sum of inner angles, and the watermark bit at the watermark index is obtained. Finally, the watermark bit is embedded by making the storage direction of the two adjacent objects equal to the watermark bit.
The basic steps of watermark embedding are listed as follows.
Step 1: The copyright information is mapped to a meaningless watermark information, which is a binary sequence including zeros and ones. The watermark information is represented by W = w j |w j = 0, 1 , where 0 ≤ w j ≤ N W − 1, and N W represents the length of watermark information.
Step 2: Read the vector map, and combine two adjacent objects into one object pair (P i , P i+1 ). Then, the number of vertices is got for each object pair N P i , N P i+1 .
Step 3: Calculate the sum of internal angle of each object according to formula (1), then (SumA i , SumA i+1 ) is obtained.
Step 4: In order to ensure the synchronization relationship of watermark information effectively, the index of the watermark bit is calculated by, where k 1 and k 2 are two random primes. Therefore, the embedding watermark bit of the current object pair is w Index .
Step 6: Then, the watermark is embedded in the storage direction for each object pair. The embedding rule is given as: Through Eq. (4), it is easy to see that if the storage direction of the current object pair is the same as the watermark bit, then the storage order of the current object pair will not be changed. Otherwise, the storage order of the object pair is reversed. Finally, the embedded watermark bit is equal to the storage direction of the current object pair.
Step 7: After embedding the watermark for all objects, the watermarked vector map is obtained.
During the aforementioned watermark embedding process, the coordinates of vector map are not changed. This could provide good precondition for the commutativity of the proposed encryption algorithm in this paper.

2) WATERMARK EXTRACTION
Watermark extraction is the inverse process of watermark embedding, and the watermark bit is determined by the storage direction of each object pair. Therefore, the watermark bit can be determined by, where PDir (i+1) / 2 is the storage direction of the object, which is acquired as the same procedure of embedding watermark. Index is the embedding watermark index, which can also be acquired as the same procedure of embedding watermark. It is noticed that one watermark bit may be extracted for several times, and the majority rule is used to determine the watermark information for each watermark bit. The majority rule is given as: where N jw 0 represents the number of extracting the watermark information of 0 for the bit of j, and N jw 1 represents the number of extracting the watermark information of 1 for the bit of j. The watermark information W can thus be extracted with the steps mentioned above. Then, the bit error rate (BER) is employed to estimate the similarity between the extracted watermark W = w 0 , w 1 , . . . , w N w −1 and the original watermark W = BER ranges from 0 to 1, where the lower BER means that less watermark changed.

C. ENCRYPTION PART 1) PERCEPTUAL STREAM CIPHER
Stream cipher is a symmetric key encryption system used to encrypt streams of plaintext data. It produces an infinite pseudo-random sequence of n-bit symbols, which is, actually, the keystream. Encryption is then XORed with the plaintext bits, thereby producing a sequence of ciphertext bits. Decryption is done in a similar process, with an identical keystream sequence generated and XORed with ciphertext to produce plaintext [35], [36].
RC4 is probably the most widely used stream cipher and is used in many applications [37]. It has two parts, namely the Key Scheduling Algorithm (KSA) and the Pseudo-Random Generator Algorithm (PRGA). KSA turns a random key into an initial permutation S of {0, 1, . . . , N S − 1}, where N S is the size of the RC4 permutation. PRGA uses this pseudorandom permutation to generate the arbitrary number of pseudorandom keystream bytes [38], [39].
According to the discussion above, the coordinates of vector map can be expressed by binary system, and encrypted by RC4 stream cipher. Since the feature invariant based watermarking algorithm and the coordinates are independent of each other, the stream cipher based on coordinates will not affect the feature invariant proposed in this paper. However, straightforward RC4 stream cipher conducted on the coordinates will change geographic range of the vector map totally and possible generate invalid coordinate values, which cause significant degradation on visual effect and severe unevenness on spatial distribution. The traditional RC4 stream cipher is improved and a perceptual stream cipher method is proposed in this paper to solve this problem.
The main idea of the perceptual stream cipher is to keep the prior n bits unchanged and encrypt the other bits. More specifically, suppose an arbitrary value is represented in the binary form as (a 1 a 2 a 3 . . . a n b 1 b 2 b 3 . . . b m ) 2 , and the encryption will skip the bits a 1 a 2 a 3 . . . a n and only encrypt Hence, the parameter n controls the number of bits, which cannot be modified. It implies that the coordinate values are encrypted by a stream cipher with range control.

2) CALCULATION OF THE ENCRYPTION BITS BASED ON THE PERCEPTUAL STREAM CIPHER
Based on the perceptual stream cipher, the n x and n y for x and y coordinate as the parameters can be calculated to construct the encryption bits. Firstly, read the coordinate values of vertices where N V means the number of the vertices. Then, each coordinate is converted into the binary form as Then, the binary length of (x i ) 2 and (y i ) 2 are obtained as L x and L y , respectively. Then, get the coordinate range of the vector map [x min , x max ] and [y min , y max ], where x min and x max represent the minimum x-coordinate value and the maximum x-coordinate value, respectively. y min and y max represent the minimum y-coordinate value and the maximum y-coordinate value, respectively. Finally, calculate the n x and n y for x and y coordinate as the parameters of perceptual stream cipher with the following equations: where means the operator of rounding up to an integer and max function means to choose the maximum value.

3) DATA ENCRYPTION AND DECRYPTION
After n x and n y are obtained, we can set the RC4 input key with key, and then generate the keystream c 1 c 2 c 3 . . . c m x with the length of m x = L x − n x , and continually generate the keystream c m x +1 c m x +2 c m x +3 . . . c m x +m y with the length of m y = L y − n y . Therefore, skip the first n x bit of (x i ) 2 and encrypt its remaining m x bit with the keystream of c 1 c 2 c 3 . . . c m x by exclusive OR operation. Encrypt (y i ) 2 in a similar way with the keystream of c m x +1 c m x +2 c m x +3 . . . c m x +m y . The encrypted map can be obtained by converting the encrypted binary number into the decimal form.  By using the same random key, i.e. key, the number of bits n x and n y , the inverse processes of data encryption are performed to obtain the decrypted vector map.

A. EXPERIMENTAL MAPS AND PARAMETER SETTINGS
Three vector maps in the shapefile format are chosen to verify the proposed CEW method. Three vector maps, including polyline and polygon layers, have been used in the experiments. They are named as Yonkers, LianYunGang and DaFeng. Their meta information is listed in Table 1, including the geographical region, the coordinate system, the number of vertices, scale and map accuracy. The map of Yonkers is downloaded from OpenStreetMap (http://download.geofabrik.de), and the other maps are provided by National Earth System Science Data Center, National Science & Technology Infrastructure of China (http://www.geodata.cn). It has to been noted that there are obvious differences in their coordinated system, vertices, scale and map accuracy. The visual expressions of the three vector maps are shown in Figure 3.
The experiments are conducted to verify the commutativity, imperceptibility, watermark robustness and security of the proposed CEW method. The experiments are performed on a platform of MATLAB 2018b with a CPU of i7-8700 and a memory of 16GB. The binary watermark sequence is used as the watermark and its length is 100 bits in the experiments for testing the watermarking method. Two random prime numbers for calculating the Index of embedding watermark bit are k 1 = 199 and k 2 = 613.
In the experiments for testing the encryption method, the secret key for stream cipher is key 1 = abcdef 1234567890.

B. COMMUTATIVITY
Commutativity is a basic indicator of the CWE algorithm and differs from other algorithms that combining encryption and watermarking. It is used to assess whether encryption and watermark interfere with each other. Commutativity enables the processing order of encryption and watermarking will not affect the final result, and watermark can be extracted from watermarked data no matter it is decrypted or not.
The commutativity between watermark embedding and encryption, and the commutativity between watermark extraction and decryption are investigated in this section. The results are shown in Figure 4. The watermarked-encrypted (W-Eed) maps, which are obtained by watermarking at first and then encrypting, are shown in Figure 4(a1), 4(b1) and 4(c1). The encrypted-watermarked(E-Wed) maps, which are obtained by encrypting at first and then watermarking, are shown in Figure 4(a2), 4(b2) and 4(c2). As shown in Figure 4, there is no difference (except the rendering style) between the W-Eed maps and E-Wed maps.
For evaluating the difference between the W-Eed maps and E-Wed maps objectively, the root-mean-square error (RMSE) is used here to measure the errors between the processed data and the original data. RMSE is calculated according to the mean error of vertices coordinates as: where N v means the total number of vertices of the vector map. x i , y i means the processed coordinate value, and (x i , y i ) means the original coordinate value. The higher value of RMSE implies that the error between these two maps are  larger. Besides, all the three datasets are conducted and named in the same way, with RMSE values between them are listed in Table 2.
According to the RMSE values in Table 2, all the RMSE values are 0. RMSE = 0 implies that all the vertices of the compared maps are the same, meaning that the maps under watermarking at first and then encrypting is consistent with the maps under encrypting at first and then watermarking. Thus, the commutativity between the watermark embedding and the encryption is verified.
Furthermore, the watermark extraction results will be the main investigation object to evaluate the commutativity between watermark extraction and decryption. Table 3 shows the BER values of watermark extracted from the decryptedwatermarked (D-Wed) maps and those from the CEWed maps.
From Table 3, either the D-Wed maps or the CEWed maps, the BER values between the extracted watermark and the original watermark are always 0, meaning that the watermark is correctly extracted from the D-Wed maps and the CEWed maps. Hence, the commutativity between the watermark extraction and the decryption is proved. Combine the experiments above, the commutativity of the proposed CEW scheme is verified successfully.

C. IMPERCEPTIBILITY
Imperceptibility refers to the difference between the D-Wed maps and the original maps for a CEW method. That is, the precision of vector maps should not be deteriorated after processes of watermarking embedding and decryption for a CEW method. Thus, the coordinate difference between the decrypted-watermarked data and the original data is used to evaluate the imperceptibility.
To evaluate the imperceptibility, three CEWed maps are decrypted to obtain the decrypted-watermarked maps, which are shown in Figure 5. It can be seen that there is no visible difference between the D-Wed maps and the original maps.   It is noted that the method of embedding watermark based on feature invariants does not change any coordinate, so that embedding watermark and data decryption do not affect the visualization of the D-Wed maps.
The objective indices including RMSE is used to measure the quality of the D-Wed maps to further verify the imperceptibility of the proposed CEW algorithm. The imperceptibility of our method and two conventional schemes of Li and Zhu [44] and Yang et al. [12] are evaluated. They are tested using the same watermark length as our scheme. In addition, the other algorithm combining watermarking and encryption is used as the comparison algorithm, referred to the method in [41]. The experimental results with respect to the imperceptibility are shown in Table 4.
As shown in Table 4, all of the RMSE values of the proposed method are 0. And the number of unchanged vertices is the same as that of the original vertices in three datasets. That is, all the vertices of the dataset in the proposed method keep invariant from the D-Wed maps. However, all the other methods have some distance errors between the watermarked maps and the original maps. This is due to that embedding watermark does not change any coordinate and decryption is also completely reversible. Therefore, the proposed method is a lossless watermarking and decryption that has good imperceptibility and no loss of data accuracy.

D. WATERMARK ROBUSTNESS
As a robust watermarking algorithm, the watermark should survive such acceptable operations as rotating, scaling, translation (RST), projective transformation, and so on. In the experimental design, ''GEOMARK'' is selected as the copyright information, and then we set up the following attacks. In the RST experiment, we rotated a vector map from 36 • to 360 • at the gap of 36 • , scaled the map by 0.1 to 10 times, and translated the map from 10% to 100% of the data width at the gap of 10%, respectively. In the projection transformation attacks, eight map projections are selected. They come from four categories: the equal area projection, the conformal projection, the equidistant projection, and the compromise projection. Then we project the vector map to different projected coordinate systems. The threshold of BER is set to 0.3, which means if the BER is less than 0.3, the corresponding watermark extracting succeed, that is, the extracted copyright information is ''GEOMARK'', otherwise failed. The BER results are shown in Table 5 to Table 8. The symbol '' √ '' means the watermarking algorithm is robust against the attack while ''×'' means the algorithm is not robust.   Overall, all BER values of the methods vary with different types of attacks from Table 5 to Table 8 except the proposed method. The BER values of the proposed method always maintain 0.00, which means that it can resist RST and projection transformation attacks completely. As for Jang's method and Li's method, the BER values keep 0.00 from Table 5 to Table 7, but all of the values for Jang's method and more than half of the values for Li's method are larger than the threshold of BER, 0.3, in Table 8. This shows Jang's method and Li's method are robust to RST attacks but cannot resist projection transformation attacks. For Yang's method, Only the BER values in Table 7 are 0.00, and most of them in other tables are larger than the threshold. Therefore, Yang's method is not robust among the four methods, and it can only resist translation attacks. In the proposed method, the RST and projection transformation attacks only change the coordinate of the vertices of the polylines and polygons, and they do not change the constructed feature invariants. Thus, the watermark can be extracted directly in the arbitrarily rotated, scaled, translated and projected map using the proposed method. Especially, the proposed algorithm is able to resist the attack of projection transformation, while its counterparts cannot. Thus, the robustness of the proposed CEW scheme is high enough to resist the attacks of rotation, scaling, translation and projection transformation comparing with other watermarking algorithms.

E. SECURITY OF ENCRYPTION
The encryption algorithm with good security that can make the encrypted data have nothing to do with the original data, and any useful information cannot be obtained from the encrypted data. The security of the proposed CEW scheme will be verified by three aspects: the spatial distribution, the data difference and the key sensitivity.

1) THE SPATIAL DISTRIBUTION
The spatial distribution measures the aggregation degree of spatial objects in a certain area. Generally, the spatial distribution of a vector map is large because of uneven distribution. Here the distribution index σ is used to evaluate the spatial distribution. In the calculation of σ , the vector layer is tiled into grid with the size of m × n, and there are vertices [N 1 , N 2 , N 3 . . . , N m×n ] in each tile. N represents the mean value of [N 1 , N 2 , N 3 . . . , N m×n ]. σ is expressed as the standard deviation of those vertices: By comparing the difference of σ , the uniformity of vertex distribution is verified. According to Equation (10), the distribution index σ of the datasets are listed in Table 9.
From Table 9, it is obvious that σ of the encrypted data has been largely reduced after data encryption. The magnitude of change rate of σ ranges from 736.88/21.90 ≈ 33.65 to VOLUME 8, 2020 53.41/8.46 ≈ 6.31. The dramatic reduction on σ means that the uneven spatial distribution is changed to the distribution with a quite even level. Obviously, the original vector data is distributed irregularly, making it easier for cracker to infer the spatial characteristics. The spatial distribution becomes more even after encryption. Its characteristics then become harder to deduce. Thus, the reduction on σ demonstrates the algorithm security to keep from cracking through the features of spatial distribution.

2) THE DATA DIFFERENCE
The data difference represents the mean error between two different data. The larger difference means more difference between the encrypted maps and the original maps. Here MAE (Mean Absolute Error) is used to measure the difference between the original vertices and the encrypted vertices, which is calculated by: where the variables are with the same definition of variables as in Equation (9). From the definition of MAE, it measures how much error between the encrypted map and the original one. Larger MAE means that each encrypted vertex is far away from the original one, increasing the difficulty to deduce the original vertex position from the encrypted vertex. Thus, the larger MAE implies better encryption effect for encryption. As for the security experiments, MAE is calculated based on the proposed CEW scheme. According to Equation (11), MAE of the encrypted vertices and the original vertices for each dataset is listed in Table 10.
From Table 10, it is apparent that MAE values between the encrypted maps and the original maps are all very large, either in geographical coordinate system or in projected coordinate system. For example, the MAE of Yonkers are 0.6784 • , which is a large error in geographical coordinate system. These results means that each vertex has been moved with a wide range in the coordinate system. Thus, the difference demonstrates the security of the proposed CEW scheme.

3) KEY SENSITIVITY
A good cryptographic system needs to have a dependency on the secret keys to be able to resist brute-force attacks [42]. In other words, the encrypted maps cannot be recovered correctly when the key used is slightly changed in the decryption process. If similar results have been got when using similar keys in encryption or decryption, the cryptographic system is easy to crack by using differential cryptanalysis. Hence, key sensitivity is a vital feature of security. In this section, the key sensitivity is measured from two aspects. One is the differences between the decrypted data with slightly different keys and the original key are evaluated. Another one is the differences among the encrypted data with slightly different keys are evaluated.
As mentioned in Section 4.1, the initial encryption key is key 1 = abcdef 1234567890. Two different keys are set as key 2 = abcdef 1234567891 and key 3 = abcdef 1234567889 to evaluate the key sensitivity of the proposed encryption method. key 2 and key 3 are only one digit difference with the initial encryption key key 1 , and these two different slightly keys are used to replace key 1 in the decryption of LianYunGang, which is already encrypted by key 1 . The results are shown in Figure 6. Figure 6(a) shows the decrypted map using the secret key key 2 , and Figure 6(b) shows the decrypted map using the secret key key 3 . In addition, Table 11 shows the MAE distortion between the decrypted data and the original one with two different keys to measure the differences objectively.
It can be clearly seen from Figure 6 that these decrypted maps have not been recovered to the original ones successfully, and no useful information is obtained from them. Moreover, from Table 11, all the values of MAE are very large. In particular, the MAE value between the decrypted LianYunGang map and the original one is 14369m. So, the maps decrypted with slightly incorrect keys are totally different from the maps decrypted with correct key. Therefore, the proposed method is sensitive to the slight change in the keys for the decryption.
To further evaluate the key sensitivity, key 2 and key 3 are used to replace key 1 to encrypt LianYunGang map. The encrypted maps with two keys are shown in Figure 7. Figure 7(a) shows the encrypted LianYunGang map with key 2 , and Figure 7(b) shows the encrypted LianYunGang map with key 3 . As shown in Figure 7, there are prominent visual differences among the encrypted data using different secret keys.
In addition, the values of MAE between the encrypted map and the original map using different secret keys for LianYunGang data are listed in Table 12 to measure the differences objectively. It can be observed from Table 12 that the values of MAE of these encrypted data are very high, although the three keys are almost the same with a tiny difference of the secret key. It indicates that the sensitivity of the secret key in encryption is also verified.
The sensitivity of key has been verified in the above experiments. Hence, the integrity of key must be ensured in   encryption or decryption, otherwise, the result will be wrong. However, the distribution or management of secret keys are not the focus of this paper and can be solved by classical cryptographic technology. For example, the digital signature can be used to check the key integrity and asymmetric encryption can be used to distribute the key, which will not be detailed explained here.

A. THE EFFECTIVENESS OF THE APPROACH 1) COMMUTATIVITY
The proposed method has full use of the inherent features of vector map for constructing two feature invariants, which are further utilized for design of the CEW algorithm. Both simulation and experiments are presented to verify the commutativity of the proposed CEW method in Figure 3, Table 2 and  Table 3. Therefore, the proposed method has solved the aforementioned challenges of CEW technique for vector map.

2) LOSSLESS DECRYPTION AND LOSSLESS WATERMARKING
The second feature of the proposed method lies in lossless decryption [43] and lossless watermarking. The lossless decryption allows the original data to be perfectly recovered from the encrypted data without any attacks. The lossless watermarking means that embedding watermark will not damage the coordinates of the data. The lossless decryption and the lossless watermarking are achieved by the proposed CEW method, as shown in Figure 5 and Table 4. Thus, both the security and the precision are guaranteed for vector map. This feature shows the advantages of the proposed CEW method in security protection for vector map, especially for the high-precision vector map.

B. APPLICABILITY OF THE APPROACH
It is worth noting that the proposed encryption method in this paper is not fixed on the perceptual stream cipher, because the feature invariants proposed are independent of the coordinate values of the objects. Actually, the proposed CEW algorithm can be used for arbitrary encryption methods based on coordinate values, including the traditional AES/DES encryption methods, without changing the extracted feature invariants.
There are still some points to be studied further in the future for a wide use of the proposed CEW method in practice, including the security of the method with different encryption algorithms, the working efficiency of the method, the integration of the method with the features of vector map, and the commutativity between the method and other the watermarking algorithm.

C. THE CHARACTERISTICS OF THE PROPOSED WATERMARKING METHOD 1) WATERMARK CAPACITY
The watermark capacity refers to the maximum amount of watermark that can be embedded in the host data. The watermark capacity directly determines whether the copyright information can be successfully embedded. The proposed method selects polyline and polygon objects as the embedding target, and every two adjacent objects can be embedded one bit. There, the watermark capacity of the proposed method is half of the number of the objects in vector, and the unit is bit. In the experiments, we set the watermark length as 100bits, which means that if a vector data needs to be embedded a watermark, it must contain at least 200 objects. That is to say, for those data whose number of objects is far less than 200, the proposed method is not applicable. Thus, there is still room in improving the watermark capacity of the proposed method. For example, spreading the characteristics between objects, or finding the characteristics of a single object to embed a watermark bit losslessly are some feasible approaches. This will be further studied in our future research.

2) WATERMARK LENGTH
The watermark used in the paper is a binary sequence with the length of 100 bits. This section will discuss the relationship between the watermark length and the robustness in the proposed method. Table 13 shows the experimental results of the proposed method with different watermark lengths. In the experiment, three experimental maps are tested with RST and projection transformation attacks. Overall, as the watermark length increases from 64 to 500, the BER value is always 0. Thus, varying the watermark length does not affect the robustness result in the above experiments. This is because the proposed CEW method is totally resistant to the above attacks. Therefore, no matter the watermark length is shorter or longer, the watermark can be extracted without error and BER keeps 0. However, considering the mapping relationship between watermark and copyright, the watermark length of 100 can provides 2 100 possibilities of different copyright, which is sufficient in normal cases.

VI. CONCLUSION
In this paper, a novel commutativity encryption watermarking method is proposed for secure vector map. The proposed CEW method consists of a lossless watermarking algorithm and a coordinate encryption algorithm, which are proposed based on feature invariants and perceptual stream cipher, respectively. The key is to propose two feature invariants, i.e., the sum of inner angles and the storage direction of two adjacent objects, for vector maps according to their inherent characteristics. In this way, the proposed CEW method can achieve the commutativity of watermark embedding and encryption, and also the commutativity of watermark extraction and decryption. Compared with the existing methods, the proposed method has better robustness and security. In addition, the quality of the protected vector map is not degraded by embedding watermark or decryption by using the proposed CEW method. The experimental results have been given to verify the improved performance of the proposed method. It is noted that the proposed method is not limited to the stream cipher based encryption method. Instead, it can be applied to other encryption methods with coordinate values without changing the constructed feature invariants. Therefore, the proposed CEW method offers good application values of security protection for vector maps.