Signaling data protection and analysis method and device, electronic equipment and storage medium
By using Paillier and EIGamal's hybrid homomorphic encryption scheme and metadata-assisted homomorphic encryption and decryption strategies, the problem of data processing and analysis while ensuring signaling data privacy and security is solved, and efficient encryption computing and analysis capabilities are achieved.
Patent Information
- Application Number
- CN202311676734.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2043-12-08
AI Technical Summary
The prior art is difficult to perform limited data processing and analysis in an encrypted state while ensuring the privacy and security of signaling data, especially in large-scale data processing and complex data analysis scenarios.
The hybrid homomorphic encryption scheme of Paillier and EIGamal is adopted to encrypt or decrypt signaling feature values, and the metadata-assisted homomorphic encryption and decryption strategy is used to realize the ability to perform addition, multiplication, subtraction and division operations without decryption.
It realizes effective calculation and analysis without decryption, significantly improves the efficiency of homomorphic encryption, and solves the limitations of data processing and analysis in the prior art.
Smart Images

Figure CN119696750A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a method, device, electronic equipment and storage medium for signaling data protection and analysis. Background Art
[0002] With the rapid development of telecommunication networks and mobile Internet, signaling data has become an important asset for communication operators, government agencies and third-party service providers. Signaling data not only contains basic information of both parties in communication, but also contains a large amount of sensitive information, such as call origination time, ringing time and call duration, which are widely used in network optimization, user behavior analysis and fraud detection. However, with the popularization of big data and cloud computing technology, when these data need to be shared among multiple parties or submitted to third-party organizations for analysis, they face serious data security and privacy protection issues.
[0003] Existing solutions also have their own limitations. Traditional encryption methods: Existing signaling data protection schemes mainly rely on traditional encryption technologies, such as AES or RSA. Although these methods can effectively protect data privacy, no effective data analysis or processing can be performed before data decryption. This is not feasible in scenarios that require real-time analysis or large-scale data processing. Homomorphic encryption technology: Homomorphic encryption technology is divided into two categories: fully homomorphic encryption (FHE) and partially homomorphic encryption (PHE). Fully homomorphic encryption can support any arithmetic operation at the same time, but the computational complexity is high and difficult to engineer. It is still in the research stage. Partial homomorphic encryption is simple and efficient, but the partially homomorphic encryption scheme cannot support both addition and multiplication operations at the same time, which greatly limits the ability of data analysis. Differential privacy: Differential privacy is another commonly used data protection method, which protects individual data by adding random noise. However, differential privacy is plaintext data. At the same time, this method will reduce the accuracy of the data and may expose private information under multiple queries. Secure multi-party computation: This is a method that allows multiple parties to perform computations without revealing their respective data. However, this method has high computational complexity and is not suitable for large-scale data processing.
[0004] Therefore, how to ensure that user privacy is not leaked, while ensuring data privacy and data security, and at the same time, perform limited data processing and analysis encryption methods in an encrypted state and perform efficient data calculations has become a problem that needs to be solved urgently. Summary of the invention
[0005] The technical problem to be solved by the present invention is how to ensure that user privacy is not leaked, while ensuring the privacy and security of signaling data, an encryption method that can perform limited data processing and analysis in an encrypted state and perform efficient data calculation.
[0006] To solve the above technical problem, according to one aspect of the present invention, a method for signaling data protection and analysis is provided, comprising the following steps:
[0007] Data collection: obtain raw signaling data from the data source, input raw signaling data, collect data through socket API calls, database queries or other data interfaces, and output structured signaling data;
[0008] Data preprocessing: clean and format the structured signaling data, use data cleaning algorithms and data conversion methods to desensitize the calling and called numbers, and generate the original features and derived features of the signaling. The calling and called numbers are desensitized using HMAC (hash-based message authentication code) to output the original features and derived features of the signaling.
[0009] Metadata generation: Generate metadata for each signaling data after preprocessing, use UUID to encode metadata for each signaling, and save it to the database or distributed storage system. Generate a piece of metadata for each signaling, and output a globally unique and meaningless metadata code. The metadata contains sensitive information and is globally unique.
[0010] Hybrid homomorphic encryption: Use Paillier and EIGamal hybrid homomorphic encryption schemes to encrypt or decrypt signaling feature values. Paillier encryption is used by default. If re-encryption is required, the EIGamal encryption scheme is switched according to the re-encryption requirement notification.
[0011] Data transmission: The encrypted data and metadata are transmitted to a third-party organization in the form of metadata plus signaling data ciphertext through the socket https API interface.
[0012] Re-encryption requirement notification: The third-party organization performs statistical analysis on the ciphertext data. When the third-party organization performs addition and subtraction operations on the ciphertext, it directly uses the ciphertext data provided by the data provider, because the data provider's default data encryption method is Paillier, which supports addition and subtraction. When the third-party organization needs to perform multiplication or division on the ciphertext, it calls the data provider's re-encryption requirement notification service to transmit the operation type and metadata back to the data provider. After the data provider restores the signaling plaintext through metadata query, it re-encrypts it with EIGamal and passes it to the third-party organization through the data transmission module, thereby realizing the adaptability of homomorphic encryption.
[0013] According to an embodiment of the present invention, in step S4, the signaling feature value can be encrypted or decrypted using the Paillier and ElGamal hybrid homomorphic encryption schemes, where the inputs are encryption type, metadata, and plaintext.
[0014] Among them, when the encryption type is used to encrypt the preprocessed metadata, Paillier encryption is used, and the output is the ciphertext encrypted by Paillier; when the metadata with heavy encryption requirements is encrypted, EIGamal encryption is used, and the output is the ciphertext encrypted by EIGamal; Paillier and EIGamal encryption algorithms are implemented by java and python;
[0015] Among them, the decryption operation is only implemented on the data provider side, and the decryption operation is directly queried and decrypted based on the metadata without the need for Paillier or EIGamal decryption.
[0016] According to an embodiment of the present invention, Paillier encryption is used to support homomorphic addition or subtraction operations on ciphertext, and Paillier encryption may include the following steps:
[0017] S411. Select two large prime numbers p and q, where p and q are unequal large prime numbers;
[0018] S412, calculate modulus n and γ
[0019] n=p×q
[0020] γ=lcm(p-1,q-1)
[0021] Where n is the public key, γ is the private key, and lcm is the least common multiple of p-1 and q-1;
[0022] S413. Select an integer g such that gcd(L(g γ mod n 2 ), n)=1,
[0023] Among them, L(x) = (x-1) / n, gcd is the greatest common divisor;
[0024] S414, generate a key, the key includes a public key and a private key,
[0025] Among them, the public key is (n, g), the private key is (γ, μ),
[0026] Where μ = L (g γ modn 2 ) -1 mod n;
[0027] S415, encryption process, first assume that M is the plaintext to be encrypted, select a random integer that satisfies
[0028] gcd(r,n)=1,
[0029] Then through c = g M × n mod n 2 , calculate the ciphertext;
[0030] S416: Perform an operation on the ciphertext. When the operation is addition or subtraction, no decryption operation is required. When the operation is multiplication or division, the operation type and metadata are transmitted back to the data provider by calling the re-encryption requirement notification service of the data provider. The data provider restores the signaling plaintext through the decryption process after metadata query, and re-encrypts it with EIGamal.
[0031] When the operation on the ciphertext is an addition operation, assuming there are two ciphertexts c1 and c2, corresponding to plaintexts m1 and m2 respectively, the sum c3 of c1 and c2 is calculated as: c3 = c1 × c2 mod n 2 , decrypting c3 will get m1+m2;
[0032] When the operation on the ciphertext is a subtraction operation, suppose there are two plaintexts m1 and m2, and they have been encrypted using the Paillier encryption algorithm to obtain c m1 and c m2 If we want to perform m1-m2 on the ciphertext, we first need to find the additive inverse of m2. In the ring modulo n, the additive inverse of m2 is -m2, which can be calculated by -m2=n-m2. Then, we encrypt -m2 to get c -m2 , c -m2 =g -m 2×r n mod n 2 ,then
[0033] c m1-m2 =c m1 ×c m2 mod n 2 , so c m1-m2 It is the encryption of m1-m2.
[0034] In the decryption process, the L value is first calculated: L = L (c γ mod n 2 ), and then decrypt to get the plaintext M = L × μ mod n.
[0035] According to an embodiment of the present invention, EIGamal encryption is used to support homomorphic multiplication or division operations on ciphertexts. EIGamal encryption may include the following steps:
[0036] S421. Select two large prime numbers p and a primitive root g, where p is a large prime number and g is a primitive root of p;
[0037] S422, generate a key,
[0038] Among them, the private key: randomly select an integer x, 1 <x<p-1;
[0039] Public key: calculate y = g x mod p
[0040] S423, encryption process, assuming that M is the plaintext to be encrypted, and 0≤M≤p, randomly select an integer k, 1 <k<p-1;
[0041] S424, calculate c1 and c2
[0042] Where c1 = g x mod p,c2=M·y x mod p, the ciphertext C is (c1, c2);
[0043] S425, perform multiplication or division operation,
[0044] Among them, the multiplication process on the ciphertext, assuming that there are two ciphertexts (C11, C21) and (C12, C22), corresponding to the plaintexts m1 and m2 respectively, then their product (C13, C23) is calculated as follows:
[0045] C13=C11×C12mod p
[0046] C23=C21×C22mod p
[0047] Among them, the division operation process on the ciphertext, assuming there are two ciphertexts (C1 m1 , C2 m1 ) and (C1 m2 , C2 m2 ), corresponding to plaintext m1 and m2 respectively, now if we want to execute on the ciphertext First, find the multiplicative inverse of m2 In the ring of p, this can be achieved by following the steps:
[0048]
[0049]
[0050] Where g and h are the public parameters of the ElGamal encryption algorithm. k is a random number. Now, we can convert (C1 m1 , C2 m1 ) and (C1 m2, C2 m2 ) to perform division on the ciphertext. The calculation formula is:
[0051]
[0052]
[0053] so, for Encryption;
[0054] Among them, the decryption process of the encrypted content is to calculate s:
[0055]
[0056] Calculate -1 ,s -1 is the multiplicative inverse of s under modulus p, then the decrypted plaintext is M = c2 s -1 modp.
[0057] According to a second aspect of the present invention, there is provided a signaling data protection and analysis device, comprising:
[0058] The data collection module is used to obtain the original signaling data from the data source, input the original signaling data, collect data through socket API calls, database queries or other data interfaces, and output structured signaling data;
[0059] The data preprocessing module is used to clean and format the structured signaling data, use the data cleaning algorithm and data conversion method to desensitize the calling and called numbers, and generate the original features and derived features of the signaling. The calling and called numbers are desensitized using HMAC (hash-based message authentication code) to output the original features and derived features of the signaling;
[0060] The metadata generation module is used to generate metadata for each signaling data after preprocessing, use UUID to encode metadata for each signaling, and save it to the database or distributed storage system. It generates a metadata for each signaling and outputs a globally unique and meaningless metadata code. The metadata contains sensitive information and is globally unique.
[0061] The hybrid homomorphic encryption module is used to encrypt or decrypt the signaling feature value using the hybrid homomorphic encryption scheme of Paillier and EIGamal. Paillier encryption is used by default. If there is a need for re-encryption, the EIGamal encryption scheme is switched according to the re-encryption requirement notification.
[0062] The data transmission module is used to transmit the encrypted data and metadata to a third-party organization in the form of metadata plus signaling data ciphertext through the socket https API interface.
[0063] The re-encryption requirement notification module is used by third-party organizations to perform statistical analysis on ciphertext data. When third-party organizations perform addition and subtraction operations on ciphertext, they directly use the ciphertext data provided by the data provider, because the default data encryption method of the data provider is Paillier, which supports addition and subtraction. When a third-party organization needs to perform multiplication or division on the ciphertext, it calls the re-encryption requirement notification service of the data provider to transmit the operation type and metadata back to the data provider. After the data provider restores the signaling plaintext through metadata query, it re-encrypts it with EIGamal and transmits it to the third-party organization through the data transmission module, thereby realizing the adaptability of homomorphic encryption.
[0064] According to an embodiment of the present invention, the hybrid homomorphic encryption module may use the Paillier and ElGamal hybrid homomorphic encryption schemes to encrypt or decrypt signaling feature values, and the inputs are encryption type, metadata, and plaintext.
[0065] Among them, when the encryption type is used to encrypt the preprocessed metadata, Paillier encryption is used, and the output is the ciphertext encrypted by Paillier; when the metadata with heavy encryption requirements is encrypted, EIGamal encryption is used, and the output is the ciphertext encrypted by EIGamal; Paillier and EIGamal encryption algorithms are implemented by java and python;
[0066] Among them, the decryption operation is only implemented on the data provider side, and the decryption operation is directly queried and decrypted based on the metadata without the need for Paillier or EIGamal decryption.
[0067] According to an embodiment of the present invention, Paillier encryption is used to support homomorphic addition or subtraction operations on ciphertext, and Paillier encryption may include the following steps:
[0068] S411. Select two large prime numbers p and q, where p and q are unequal large prime numbers;
[0069] S412, calculate modulus n and γ
[0070] n=p×q
[0071] γ=lcm(p-1,q-1)
[0072] Where n is the public key, γ is the private key, and lcm is the least common multiple of p-1 and q-1;
[0073] S413. Select an integer g such that gcd(L(g γ mod n 2 ), n)=1,
[0074] Among them, L(x) = (x-1) / n, gcd is the greatest common divisor;
[0075] S414, generate a key, the key includes a public key and a private key,
[0076] Among them, the public key is (n, g), the private key is (γ, μ),
[0077] Where μ = L (g γ modn 2 ) -1 mod n;
[0078] S415, encryption process, first assume that M is the plaintext to be encrypted, select a random integer that satisfies
[0079] gcd(r,n)=1,
[0080] Then through c = g M × n mod n 2 , calculate the ciphertext;
[0081] S416: Perform an operation on the ciphertext. When the operation is addition or subtraction, no decryption operation is required. When the operation is multiplication or division, the operation type and metadata are transmitted back to the data provider by calling the re-encryption requirement notification service of the data provider. The data provider restores the signaling plaintext through the decryption process after metadata query, and re-encrypts it with EIGamal.
[0082] When the operation on the ciphertext is an addition operation, assuming there are two ciphertexts c1 and c2, corresponding to plaintexts m1 and m2 respectively, the sum c3 of c1 and c2 is calculated as: c3 = c1 × c2 mod n 2 , decrypting c3 will get m1+m2;
[0083] When the operation on the ciphertext is a subtraction operation, suppose there are two plaintexts m1 and m2, and they have been encrypted using the Paillier encryption algorithm to obtain c m1 and c m2 If we want to perform m1-m2 on the ciphertext, we first need to find the additive inverse of m2. In the ring modulo n, the additive inverse of m2 is -m2, which can be calculated by -m2=n-m2. Then, we encrypt -m2 to get c -m2 , c -m2 =g -m 2×r n mod n 2,then
[0084] c m1-m2 =c m1 ×c m2 mod n 2 , so c m1-m2 It is the encryption of m1-m2.
[0085] In the decryption process, the L value is first calculated: L = L (c γ mod n 2 ), and then decrypt to get the plaintext M = L × μ mod n.
[0086] According to an embodiment of the present invention, EIGamal encryption is used to support homomorphic multiplication or division operations on ciphertexts. EIGamal encryption may include the following steps:
[0087] S421. Select two large prime numbers p and a primitive root g, where p is a large prime number and g is a primitive root of p;
[0088] S422, generate a key,
[0089] Among them, the private key: randomly select an integer x, 1 <x<p-1;
[0090] Public key: calculate y = g x mod p
[0091] S423, encryption process, assuming that M is the plaintext to be encrypted, and 0≤M≤p, randomly select an integer k, 1 <k<p-1;
[0092] S424, calculate c1 and c2
[0093] Where c1 = g x mod p,c2=M·y x mod p, the ciphertext C is (c1, c2);
[0094] S425, perform multiplication or division operation,
[0095] Among them, the multiplication process on the ciphertext, assuming that there are two ciphertexts (C11, C21) and (C12, C22), corresponding to the plaintexts m1 and m2 respectively, then their product (C13, C23) is calculated as follows:
[0096] C13=C11×C12mod p
[0097] C23=C21×C22mod p
[0098] Among them, the division operation process on the ciphertext, assuming there are two ciphertexts (C1 m1 , C2m1 ) and (C1 m2 , C2 m2 ), corresponding to plaintext m1 and m2 respectively, now if we want to execute on the ciphertext First, find the multiplicative inverse of m2 In the ring of p, this can be achieved by following the steps:
[0099]
[0100]
[0101] Where g and h are the public parameters of the ElGamal encryption algorithm. k is a random number. Now, we can convert (C1 m1 , C2 m1 ) and (C1 m2 , C2 m2 ) to perform division on the ciphertext. The calculation formula is:
[0102]
[0103]
[0104] so, for Encryption;
[0105] Among them, the decryption process of the encrypted content is to calculate s:
[0106]
[0107] Calculate -1 ,s -1 is the multiplicative inverse of s under modulus p, then the decrypted plaintext is M = c2 s -1 modp.
[0108] According to a third aspect of the present invention, there is provided an electronic device comprising: a memory, a processor, and a signaling data protection and analysis program stored in the memory and executable on the processor, wherein the signaling data protection and analysis program implements the steps of the above-mentioned signaling data protection and analysis method when executed by the processor.
[0109] According to a fourth aspect of the present invention, a computer storage medium is provided, wherein a signaling data protection and analysis program is stored on the computer storage medium, and when the signaling data protection and analysis program is executed by a processor, the steps of the above-mentioned signaling data protection and analysis method are implemented.
[0110] Compared with the prior art, the technical solution provided by the embodiments of the present invention can at least achieve the following beneficial effects:
[0111] The signaling data protection and analysis method provided by the present invention is adaptive, so that the encryption system can be automatically switched as needed, without the need to adopt fully homomorphic encryption that is complex and difficult to practice in software engineering. Through the adaptive homomorphic encryption technology of the present invention, not only effective calculations are achieved without decryption, but also the efficiency of homomorphic encryption is significantly improved, thereby showing obvious advantages over the existing technology.
[0112] The signaling data protection and analysis method provided by the present invention can achieve the adaptability of homomorphic encryption algorithm selection. Through the re-encryption requirement notification mechanism, the third-party organization can notify the data provider through API or other communication methods, indicating what type of encryption operation they need to perform. Then, the data provider can re-encrypt the data according to these requirements, and the third-party organization can complete relatively complex data analysis tasks in an environment where plain text is not required.
[0113] The signaling data protection and analysis method provided by the present invention adopts hybrid homomorphic encryption to solve the diversity of calculation types, and designs a Paillier+ElGamal hybrid homomorphic encryption algorithm suitable for communication signaling data, so that the algorithm can support both addition and multiplication operations on the ciphertext, and can expand subtraction and division operations based on addition and multiplication, so that a third-party organization can perform relatively complex data statistical analysis and machine learning model training without decryption.
[0114] The metadata-assisted homomorphic encryption and decryption strategy designed in the present invention reduces the complexity of partial homomorphic encryption calculations and avoids decryption operations by data providers, thereby greatly reducing the complexity of system encryption and solving the limitation that partial homomorphic encryption cannot support addition and multiplication at the same time in the scenario of signaling data protection.
[0115] The signaling data protection and analysis method provided by the present invention implements a metadata-assisted homomorphic encryption and decryption strategy, generates a metadata for each signaling, and the metadata does not contain sensitive information. The data provider makes a one-to-one correspondence between the metadata, plaintext, and encrypted data and stores them in the system. The data transmitted to the third-party agency only contains metadata and ciphertext, thereby allowing the third-party agency to more easily identify which data can be batch-calculated together. In this way, they can complete multiple computing tasks at one time, rather than one by one, thereby improving computing efficiency. At the same time, with metadata, the decryption operation of the data provider is simplified to a query operation based on metadata. When the third party needs a special homomorphic encryption algorithm, it only needs to transmit the metadata and encryption type of the signaling back to the data provider. The data provider retrieves the plaintext based on the metadata, thus eliminating the decryption process and greatly improving the computing efficiency of the system.
[0116] The metadata-assisted homomorphic encryption and decryption strategy designed by the present invention improves the computational efficiency and data transmission efficiency of data homomorphic encryption and decryption, allows third-party organizations to transmit batches of metadata and perform batch homomorphic encryption calculations, and significantly improves the efficiency of data encryption processing and data transmission.
[0117] The signaling data protection and analysis method provided by the present invention is adaptable and extensible. Due to the modular design, the scheme of the present invention can easily adapt to different types of data and application scenarios, and is also convenient for use in combination with other data protection or analysis methods.
[0118] The present invention has the function of protecting sensitive data of signaling data, and at the same time, the data encrypted by this encryption method cannot lose analyzability, including some statistical analysis on the encrypted data. The present invention is not limited to the encryption of signaling data, but can also meet the statistical analysis of some integer-type characteristic data of users or some common machine learning tasks.
[0119] This invention effectively solves many limitations of existing solutions, especially in big data and machine learning application scenarios. This invention adopts core technologies such as adaptive homomorphic encryption based on re-encryption demand notification mechanism, hybrid homomorphic encryption, and metadata-assisted homomorphic encryption and decryption strategy, providing an innovative solution to this problem, which has important theoretical significance and practical value. It is expected to be widely used in future communication networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0120] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present invention, but are not intended to limit the present invention.
[0121] Figure 1 It is a schematic diagram showing the process of adaptive homomorphic encryption according to an embodiment of the present invention.
[0122] Figure 2 FIG. 4 is a schematic diagram showing a metadata query process according to an embodiment of the present invention. DETAILED DESCRIPTION
[0123] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0124] Unless otherwise defined, the technical or scientific terms used herein shall have the common meanings understood by persons with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the patent application specification and claims of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "a" do not indicate a quantity limitation, but indicate the existence of at least one.
[0125] Figure 1 is a schematic diagram showing an adaptive homomorphic encryption process according to an embodiment of the present invention; Figure 2 FIG. 4 is a schematic diagram showing a metadata query process according to an embodiment of the present invention.
[0126] like Figure 1 and Figure 2 As shown, the signaling data protection and analysis method includes the following steps:
[0127] Data collection, obtain raw signaling data from the data source, input raw signaling data, collect data through socket API calls, database queries or other data interfaces, and output structured signaling data.
[0128] Data preprocessing: cleans and formats the structured signaling data, uses data cleaning algorithms and data conversion methods to desensitize the calling and called numbers, and generates the original and derived features of the signaling. The calling and called numbers are desensitized using HMAC (Hash-based Message Authentication Code) to output the original and derived features of the signaling.
[0129] Metadata generation: Generate metadata for each signaling data after preprocessing, use UUID to encode metadata for each signaling, and save it to the database or distributed storage system. Generate a metadata for each signaling, and output a globally unique and meaningless metadata code. The metadata contains sensitive information and is globally unique.
[0130] Hybrid homomorphic encryption uses the hybrid homomorphic encryption scheme of Paillier and EIGamal to encrypt or decrypt the signaling feature values. Paillier encryption is used by default. If there is a need for re-encryption, the EIGamal encryption scheme is switched according to the re-encryption requirement notification.
[0131] Data transmission: The encrypted data and metadata are transmitted to a third-party organization in the form of metadata plus signaling data ciphertext through the socket https API interface.
[0132] Re-encryption requirement notification: The third-party organization performs statistical analysis on the ciphertext data. When the third-party organization performs addition and subtraction operations on the ciphertext, it directly uses the ciphertext data provided by the data provider, because the data provider's default data encryption method is Paillier, which supports addition and subtraction. When the third-party organization needs to perform multiplication or division on the ciphertext, it calls the data provider's re-encryption requirement notification service to transmit the operation type and metadata back to the data provider. After the data provider restores the signaling plaintext through metadata query, it re-encrypts it with EIGamal and passes it to the third-party organization through the data transmission module, thereby realizing the adaptability of homomorphic encryption.
[0133] The signaling data protection and analysis method provided by the present invention adopts hybrid homomorphic encryption to solve the diversity of calculation types, and designs a Paillier+ElGamal hybrid homomorphic encryption algorithm suitable for communication signaling data, so that the algorithm can support both addition and multiplication operations on the ciphertext, and can expand subtraction and division operations based on addition and multiplication, so that a third-party organization can perform relatively complex data statistical analysis and machine learning model training without decryption.
[0134] The metadata-assisted homomorphic encryption and decryption strategy designed by the present invention improves the computational efficiency and data transmission efficiency of data homomorphic encryption and decryption, allows third-party organizations to transmit batches of metadata and perform batch homomorphic encryption calculations, and significantly improves the efficiency of data encryption processing and data transmission.
[0135] According to one or some embodiments of the present invention, in step S4, the signaling feature value is encrypted or decrypted using the Paillier and EIGamal hybrid homomorphic encryption scheme, and the input is encryption type, metadata, and plaintext.
[0136] Among them, for example, the encryption type is set to 1 when encrypting the preprocessed metadata, and is set to 2 when encrypting the metadata with re-encryption requirements. When the encryption type is 1, Paillier encryption is used, and the output is the ciphertext encrypted by Paillier; when the encryption type is 2, EIGamal encryption is used, and the output is the ciphertext encrypted by EIGamal; Paillier and EIGamal encryption algorithms are implemented by java and python.
[0137] Among them, the decryption operation is only implemented on the data provider side, and the decryption operation is directly queried and decrypted based on the metadata without the need for Paillier or EIGamal decryption.
[0138] According to one or some embodiments of the present invention, Paillier encryption is used to support homomorphic addition or subtraction operations on ciphertext, and Paillier encryption includes the following steps:
[0139] S411. Select two large prime numbers p and q, where p and q are unequal large prime numbers;
[0140] S412, calculate modulus n and γ
[0141] n=p×q
[0142] γ=lcm(p-1,q-1)
[0143] Where n is the public key, γ is the private key, and lcm is the least common multiple of p-1 and q-1;
[0144] S413. Select an integer g such that gcd(L(g γ mod n 2 ), n)=1,
[0145] Among them, L(x) = (x-1) / n, gcd is the greatest common divisor;
[0146] S414, generate a key, the key includes a public key and a private key,
[0147] Among them, the public key is (n, g), the private key is (γ, μ),
[0148] Where μ = L (g γ mod n 2 ) -1 mod n;
[0149] S415, encryption process, first assume that M is the plaintext to be encrypted, select a random integer that satisfies
[0150] gcd(r,n)=1,
[0151] Then through c = g M × n mod n 2 , calculate the ciphertext;
[0152] S416: Perform an operation on the ciphertext. When the operation is addition or subtraction, no decryption operation is required. When the operation is multiplication or division, the operation type and metadata are transmitted back to the data provider by calling the re-encryption requirement notification service of the data provider. The data provider restores the signaling plaintext through the decryption process after metadata query, and re-encrypts it with EIGamal.
[0153] When the operation on the ciphertext is an addition operation, assuming there are two ciphertexts c1 and c2, corresponding to plaintexts m1 and m2 respectively, the sum c3 of c1 and c2 is calculated as: c3 = c1 × c2 mod n 2 , decrypting c3 will get m1+m2;
[0154] When the operation on the ciphertext is a subtraction operation, suppose there are two plaintexts m1 and m2, and they have been encrypted using the Paillier encryption algorithm to obtain cm1 and cm2. If you want to perform m1-m2 on the ciphertext, you first need to find the additive inverse of m2. In the ring modulo n, the additive inverse of m2 is -m2, which is calculated by -m2=n-m2. Secondly, encrypt -m2 to obtain c -m2 , c -m2 =g -m 2×r n mod n 2 ,then
[0155] c m1-m2 =c m1 ×c m2 mod n 2 , so c m1-m2 It is the encryption of m1-m2.
[0156] In the decryption process, the L value is first calculated: L = L (c γ mod n 2 ), and then decrypt to get the plaintext M = L × μ mod n.
[0157] According to one or some embodiments of the present invention, EIGamal encryption is used to support homomorphic multiplication or division operations on ciphertexts, and the steps of EIGamal encryption include the following:
[0158] S421. Select two large prime numbers p and a primitive root g, where p is a large prime number and g is a primitive root of p;
[0159] S422, generate a key,
[0160] Among them, the private key: randomly select an integer x, 1 <x<p-1;
[0161] Public key: calculate y = g x mod p
[0162] S423, encryption process, assuming that M is the plaintext to be encrypted, and 0≤M≤p, randomly select an integer k, 1 <k<p-1;
[0163] S424, calculate c1 and c2
[0164] Where c1 = g x mod p,c2=M·y x mod p, the ciphertext C is (c1, c2);
[0165] S425, perform multiplication or division operation,
[0166] Among them, the multiplication process on the ciphertext, assuming that there are two ciphertexts (C11, C21) and (C12, C22), corresponding to the plaintexts m1 and m2 respectively, then their product (C13, C23) is calculated as follows:
[0167] C13=C11×C12mod p
[0168] C23=C21×C22mod p
[0169] Among them, the division operation process on the ciphertext, assuming there are two ciphertexts (C1 m1 , C2 m1 ) and (C1 m2 , C2 m2 ), corresponding to plaintext m1 and m2 respectively, now if we want to execute on the ciphertext First, find the multiplicative inverse of m2 In the ring of p, this can be achieved by following the steps:
[0170]
[0171]
[0172] Where g and h are the public parameters of the ElGamal encryption algorithm. k is a random number. Now, we can convert (C1 m1 , C2 m1 ) and (C1 m2 , C2 m2 ) to perform division on the ciphertext. The calculation formula is:
[0173]
[0174]
[0175] so, for Encryption;
[0176] Among them, the decryption process of the encrypted content is to calculate s:
[0177]
[0178] Calculate -1 ,s -1 is the multiplicative inverse of s under modulus p, then the decrypted plaintext is M = c2 s -1 mod p.
[0179] The present invention has the function of protecting sensitive data of signaling data, and at the same time, the data encrypted by this encryption method cannot lose analyzability, including some statistical analysis on the encrypted data. The present invention is not limited to the encryption of signaling data, but can also meet the statistical analysis of some integer-type characteristic data of users or some common machine learning tasks.
[0180] According to a second aspect of the present invention, there is provided a device for signaling data protection and analysis, which includes: a data collection module, a data preprocessing module, a metadata generation module, a hybrid homomorphic encryption module, a data transmission module and a re-encryption requirement notification module.
[0181] The data collection module is used to obtain raw signaling data from the data source, input the raw signaling data, collect data through socket API calls, database queries or other data interfaces, and output structured signaling data.
[0182] The data preprocessing module is used to clean and format the structured signaling data, use the data cleaning algorithm and data conversion method to desensitize the calling and called numbers, and generate the original features and derived features of the signaling. Among them, the calling and called numbers are desensitized using HMAC (hash-based message authentication code) to output the original features and derived features of the signaling.
[0183] The metadata generation module is used to generate metadata for each preprocessed signaling data, use UUID to encode metadata for each signaling, and save it to the database or distributed storage system. It generates a metadata for each signaling and outputs a globally unique and meaningless metadata code. The metadata contains sensitive information and is globally unique.
[0184] The hybrid homomorphic encryption module is used to encrypt or decrypt signaling feature values using the hybrid homomorphic encryption scheme of Paillier and EIGamal. Paillier encryption is used by default. If there is a need for re-encryption, the EIGamal encryption scheme is switched according to the re-encryption requirement notification.
[0185] The data transmission module is used to transmit the encrypted data and metadata to a third-party organization in the form of metadata plus signaling data ciphertext through the socket https api interface.
[0186] The re-encryption requirement notification module is used by third-party organizations to perform statistical analysis on ciphertext data. When third-party organizations perform addition and subtraction operations on ciphertext, they directly use the ciphertext data provided by the data provider, because the default data encryption method of the data provider is Paillier, which supports addition and subtraction. When a third-party organization needs to perform multiplication or division on the ciphertext, it calls the data provider's re-encryption requirement notification service to transmit the operation type and metadata back to the data provider. After the data provider restores the signaling plaintext through metadata query, it re-encrypts it with EIGamal and passes it to the third-party organization through the data transmission module, thereby realizing the adaptability of homomorphic encryption.
[0187] The metadata-assisted homomorphic encryption and decryption strategy designed by the present invention reduces the complexity of partial homomorphic encryption calculations and avoids the decryption operation of the data provider, thereby greatly reducing the complexity of system encryption and solving the limitation that partial homomorphic encryption cannot support addition and multiplication at the same time in the scenario of signaling data protection. The signaling data protection and analysis method provided by the present invention can realize the adaptability of homomorphic encryption algorithm selection. Through the re-encryption requirement notification mechanism, the third-party organization can notify the data provider through API or other communication methods to indicate what type of encryption operation they need to perform. Then, the data provider can re-encrypt the data according to these requirements, and the third-party organization can complete relatively complex data analysis tasks in an environment that does not require plain text.
[0188] According to one or some embodiments of the present invention, the hybrid homomorphic encryption module uses the Paillier and EIGamal hybrid homomorphic encryption schemes to encrypt or decrypt signaling feature values, and the input is encryption type, metadata, and plaintext.
[0189] Among them, for example, the encryption type is set to 1 when encrypting the preprocessed metadata, and is set to 2 when encrypting the metadata with re-encryption requirements. When the encryption type is 1, Paillier encryption is used, and the output is the ciphertext encrypted by Paillier; when the encryption type is 2, EIGamal encryption is used, and the output is the ciphertext encrypted by EIGamal; Paillier and EIGamal encryption algorithms are implemented by java and python.
[0190] Among them, the decryption operation is only implemented on the data provider side, and the decryption operation is directly queried and decrypted based on the metadata without the need for Paillier or EIGamal decryption.
[0191] According to one or some embodiments of the present invention, Paillier encryption is used to support homomorphic addition or subtraction operations on ciphertext, and Paillier encryption includes the following steps:
[0192] S411. Select two large prime numbers p and q, where p and q are unequal large prime numbers;
[0193] S412, calculate modulus n and γ
[0194] n=p×q
[0195] γ=lcm(p-1,q-1)
[0196] Where n is the public key, γ is the private key, and lcm is the least common multiple of p-1 and q-1;
[0197] S413. Select an integer g such that gcd(L(g γ mod n 2 ), n)=1,
[0198] Among them, L(x) = (x-1) / n, gcd is the greatest common divisor;
[0199] S414, generate a key, the key includes a public key and a private key,
[0200] Among them, the public key is (n, g), the private key is (γ, μ),
[0201] Where μ = L (g γ mod n 2 ) -1 mod n;
[0202] S415, encryption process, first assume that M is the plaintext to be encrypted, select a random integer that satisfies
[0203] gcd(r,n)=1,
[0204] Then through c = g M × n mod n 2 , calculate the ciphertext;
[0205] S416: Perform an operation on the ciphertext. When the operation is addition or subtraction, no decryption operation is required. When the operation is multiplication or division, the operation type and metadata are transmitted back to the data provider by calling the re-encryption requirement notification service of the data provider. The data provider restores the signaling plaintext through the decryption process after metadata query, and re-encrypts it with EIGamal.
[0206] When the operation on the ciphertext is an addition operation, assuming there are two ciphertexts c1 and c2, corresponding to plaintexts m1 and m2 respectively, the sum c3 of c1 and c2 is calculated as: c3 = c1 × c2 mod n 2 , decrypting c3 will get m1+m2;
[0207] When the operation on the ciphertext is a subtraction operation, suppose there are two plaintexts m1 and m2, and they have been encrypted using the Paillier encryption algorithm to obtain c m1 and c m2 If we want to perform m1-m2 on the ciphertext, we first need to find the additive inverse of m2. In the ring modulo n, the additive inverse of m2 is -m2, which can be calculated by -m2=n-m2. Then, we encrypt -m2 to get c -m2 , c -m2 =g -m 2×r n mod n 2 ,then
[0208] c m1-m2 =c m1 ×c m2 mod n 2 , so c m1-m2 It is the encryption of m1-m2.
[0209] In the decryption process, the L value is first calculated: L = L (c γ mod n 2 ), and then decrypt to get the plaintext M = L × μ mod n.
[0210] According to one or some embodiments of the present invention, EIGamal encryption is used to support homomorphic multiplication or division operations on ciphertexts, and EIGamal encryption includes the following steps:
[0211] S421. Select two large prime numbers p and a primitive root g, where p is a large prime number and g is a primitive root of p;
[0212] S422, generate a key,
[0213] Among them, the private key: randomly select an integer x, 1 <x<p-1;
[0214] Public key: calculate y = g x mod p
[0215] S423, encryption process, assuming that M is the plaintext to be encrypted, and 0≤M≤p, randomly select an integer k, 1 <k<p-1;
[0216] S424, calculate c1 and c2
[0217] Where c1 = g x mod p,c2=M·y x mod p, the ciphertext C is (c1, c2);
[0218] S425, perform multiplication or division operation,
[0219] Among them, the multiplication process on the ciphertext, assuming that there are two ciphertexts (C11, C21) and (C12, C22), corresponding to the plaintexts m1 and m2 respectively, then their product (C13, C23) is calculated as follows:
[0220] C13=C11×C12mod p
[0221] C23=C21×C22mod p
[0222] Among them, the division operation process on the ciphertext, assuming there are two ciphertexts (C1 m1 , C2 m1 ) and (C1 m2 , C2m2), corresponding to plaintext m1 and m2 respectively. Now if we want to execute First, find the multiplicative inverse of m2 In the ring of p, this can be achieved by following the steps:
[0223]
[0224]
[0225] Where g and h are the public parameters of the ElGamal encryption algorithm. k is a random number. Now, we can convert (C1 m1 , C2 m1 ) and (C1 m2 , C2 m2 ) to perform division on the ciphertext. The calculation formula is:
[0226]
[0227]
[0228] so, for Encryption;
[0229] Among them, the decryption process of the encrypted content is to calculate s:
[0230]
[0231] Calculate -1 ,s -1 is the multiplicative inverse of s under modulus p, then the decrypted plaintext is M = c2 s -1 modp.
[0232] The signaling data protection and analysis method provided by the present invention is adaptive, so that the encryption system can be automatically switched as needed, without the need to adopt fully homomorphic encryption that is complex and difficult to practice in software engineering. Through the adaptive homomorphic encryption technology of the present invention, not only effective calculations are achieved without decryption, but also the efficiency of homomorphic encryption is significantly improved, thereby showing obvious advantages over the existing technology.
[0233] The signaling data protection and analysis method provided by the present invention is adaptable and extensible. Due to the modular design, the solution of the present invention can easily adapt to different types of data and application scenarios, and is also convenient for use in combination with other data protection or analysis methods. The present invention effectively solves multiple limitations in existing solutions, especially in big data and machine learning application scenarios. The present invention adopts core technologies such as adaptive homomorphic encryption based on a re-encryption requirement notification mechanism, hybrid homomorphic encryption, and metadata-assisted homomorphic encryption and decryption strategies, providing an innovative solution to this problem, which has important theoretical significance and practical value. It is expected to be widely used in future communication networks.
[0234] When in use, the signaling data in the communication network is protected and analyzed using the method of this embodiment, as follows:
[0235] First, data collection is performed to collect signaling data from different data sources. The present invention uses the Netty framework to collect original signaling from communication links such as provincial C networks and core networks, and decodes the original signaling in the communication links into CDR signaling data formats with business significance according to the protocols of various manufacturers.
[0236] Next, data preprocessing is performed to preliminarily process the original signaling data to facilitate subsequent homomorphic encryption operations. The specific steps are as follows:
[0237] (1) Desensitizing the calling and called numbers: Extract the calling and called numbers from the original signaling data and use HMAC (hash-based message authentication code) to desensitize them.
[0238] (2) Extracting numerical features from signaling: Extracting numerical features such as call origination time, ringing time, call duration, and answering time from the original signaling data. The CDR signaling data structure is as follows:
[0239] Field Name Length (bytes) illustrate CDR Type 1 Reply, timeout, failure Link Number 2 Encoding Type 1 14 / 24 bit encoding OPC 3 Source Signaling Point Code DPC 3 Destination Signaling Point Code CIC System Number 2 Circuit Identification Code (Telephone Identification Code) CIC timeslot number 2 Circuit Identification Code (Telephone Identification Code) Call start time (ms) 5 IAM or IAI time Ringing time (ms) 5 ACM and start time difference Response time (ms) 5 ANC or ANN and start time difference CLF time (ms) 5 Difference from start time Talk time (ms) 5 CBK or CLF and ANC time difference Occupancy time (ms) 5 RLC and start time difference Called user number 20 Caller number 20 Original called party number 20 Caller Category 1 Call release reason
[0240] (3) Data cleaning: Remove incomplete or erroneous records to ensure data quality.
[0241] After data cleaning, a complete CDR signaling data sample is roughly as follows (simulated data):
[0242]
[0243]
[0244] Then, metadata is generated, and each piece of collected signaling data generates corresponding metadata. Metadata is used to assist the homomorphic encryption and decryption process, as well as subsequent data analysis.
[0245] Input: original signaling data, including but not limited to: call origination time, ringing time, and call duration.
[0246] Output: metadata array, each element contains a unique identifier (UUID) and other attributes of a signaling data. Assume we have the following signaling data (note: the calling party is omitted, and the value is in milliseconds):
[0247] Specific implementation method of obtaining plain text by metadata query:
[0248] (1) During the data transmission phase: the encrypted data and metadata array (metadata is plain text) are securely transmitted to a third-party organization.
[0249] (2) Third-party agency analysis phase: The third-party agency performs necessary homomorphic operations. If unsupported operations (such as division) are required, the third-party agency notifies the data provider through the re-encryption notification mechanism.
[0250] (3) Re-encryption notification stage: The third-party organization selects the UUIDs that need to be re-encrypted and transmits these UUIDs (which can be transmitted in batches) and the new encryption algorithm type back to the data provider.
[0251] (4) Data provider query phase: The data provider receives the UUID and the new encryption algorithm type, and uses the metadata array to query the original signaling data corresponding to these UUIDs.
[0252] (5) Data provider re-encryption stage: The data provider uses a new encryption algorithm to re-encrypt the original signaling data.
[0253] (6) The third-party organization continues to analyze: The third-party organization receives the re-encrypted data and continues to analyze it.
[0254] The composition of the metadata array is as follows:
[0255]
[0256] Furthermore, hybrid contractual encryption is performed, with two different homomorphic encryption schemes: Paillier and ElGamal. Depending on user or system requirements, you can dynamically choose which encryption scheme to use. This module mainly contains two API methods: encrypt and decrypt.
[0257] Input / Output
[0258] Encryption method (encrypt)
[0259] Input: encryption type parameter (1 or 2), metadata, plaintext.
[0260] Output: ciphertext and metadata under the corresponding encryption scheme.
[0261] Decryption method (decrypt)
[0262] Input: metadata.
[0263] Output: Find the corresponding plaintext through metadata query.
[0264] Main API methods
[0265] Encryption method (encrypt)
[0266] Parameters: encryptionType: encryption type (1: Paillier, 2: EIGamal), metadata: metadata, plaintext: plaintext data
[0267] Output: Encrypted ciphertext and metadata
[0268] Logic: If encryptionType is 1, use the Paillier encryption algorithm for encryption. If encryptionType is 2, use the ElGamal encryption algorithm for encryption.
[0269] Decryption method (decrypt)
[0270] Parameters: metadata: metadata
[0271] Output: Plain text data
[0272] Logic: Query based on metadata to obtain plaintext data. No need to use Paillier or ElGamal for decryption.
[0273] The encrypted signaling data looks like this (Note: the encrypted data is simulated data, not real encrypted data):
[0274] Finally, a re-encryption requirement notification is made. Since the signaling data received by the third party is generated by Paillier encryption by default, only addition (or subtraction) can be performed. When the third party needs to perform multiplication (or division), it only needs to pass the metadata and encryption class type back to the data provider through the https interface. The data provider then calls the hybrid homomorphic encryption API interface of this system to implement EIGamal encrypted multiplication or division (Note: it may also be Paillier addition or subtraction, because the same data may be repeatedly encrypted under different statistical requirements), and pass the encryption result and speech data to the third party again.
[0275] (1) Initialization phase: Establish a secure communication channel between the DPF and TPI. Specifically:
[0276] Obtaining an SSL / TLS Certificate
[0277] DPF and TPI need to obtain an SSL / TLS certificate from a trusted CA.
[0278] Install the certificate
[0279] Install the obtained certificates on the respective servers.
[0280] Configure HTTPS
[0281] In the server's configuration file, enable HTTPS and specify the location of the certificate and private key.
[0282] Test the connection
[0283] After enabling HTTPS, you can test the secure connection through a browser or other tools.
[0284] API Design
[0285] On this secure channel, DPF and TPI can design a set of RESTful APIs
[0286] (2) Re-encryption notification:
[0287] When the third party needs to perform multiplication (or division), it needs to notify the data provider of re-encryption and transmit the notification information to the data provider through the secure channel established in the initialization phase (UUIDs can be sent back in batches):
[0288] In this way, when the data provider receives the re-encryption notification request, it parses the calculation type in the message as division, queries the corresponding signaling plaintext based on the metadata in the message, and then calls the hybrid homomorphic encryption module to perform a new encryption calculation. Finally, the ciphertext is transmitted to a third-party organization through the data transmission module.
[0289] The signaling data protection and analysis method provided by the present invention implements a metadata-assisted homomorphic encryption and decryption strategy, generates a metadata for each signaling, and the metadata does not contain sensitive information. The data provider makes a one-to-one correspondence between the metadata, plaintext, and encrypted data and stores them in the system. The data transmitted to the third-party agency only contains metadata and ciphertext, thereby allowing the third-party agency to more easily identify which data can be batch-calculated together. In this way, they can complete multiple computing tasks at one time, rather than one by one, thereby improving computing efficiency. At the same time, with metadata, the decryption operation of the data provider is simplified to a query operation based on metadata. When the third party needs a special homomorphic encryption algorithm, it only needs to transmit the metadata and encryption type of the signaling back to the data provider. The data provider retrieves the plaintext based on the metadata, thus eliminating the decryption process and greatly improving the computing efficiency of the system.
[0290] According to another aspect of the present invention, a device for signaling data protection and analysis is provided, comprising: a memory, a processor, and a signaling data protection and analysis program stored in the memory and executable on the processor, wherein the signaling data protection and analysis program implements the steps of the above-mentioned signaling data protection and analysis method when executed by the processor.
[0291] According to the present invention, a computer storage medium is also provided.
[0292] A signaling data protection and analysis program is stored on the computer storage medium, and when the signaling data protection and analysis program is executed by the processor, the steps of the above-mentioned signaling data protection and analysis method are implemented.
[0293] Among them, the method implemented when the signaling data protection and analysis program running on the processor is executed can refer to the various embodiments of the signaling data protection and analysis method of the present invention, and will not be repeated here.
[0294] The present invention also provides a computer program product.
[0295] The computer program product of the present invention includes a signaling data protection and analysis program, which implements the steps of the signaling data protection and analysis method described above when executed by a processor.
[0296] Among them, the method implemented when the signaling data protection and analysis program running on the processor is executed can refer to the various embodiments of the signaling data protection and analysis method of the present invention, and will not be repeated here.
[0297] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0298] The above description is merely an exemplary embodiment of the present invention and is not intended to limit the protection scope of the present invention. The protection scope of the present invention is determined by the appended claims.
Claims
1. A method for signaling data protection and analysis, comprising the following steps: S1. Data collection: obtaining original signaling data from the data source, inputting the original signaling data, collecting data through socket API calls, database queries or other data interfaces, and outputting structured signaling data; S2, data preprocessing, cleaning and formatting the structured signaling data, using data cleaning algorithms and data conversion methods to desensitize the calling and called numbers, and generate original features and derived features of the signaling, wherein the calling and called numbers are desensitized using HMAC (hash-based message authentication code) to output the original features and derived features of the signaling; S3, metadata generation, generating metadata for each pre-processed signaling data, using UUID to encode metadata for each signaling, and saving it to a database or distributed storage system, generating a metadata for each signaling, and outputting a globally unique and meaningless metadata code, the metadata contains sensitive information, and the metadata is globally unique; S4, hybrid homomorphic encryption, use Paillier and EIGamal hybrid homomorphic encryption schemes to encrypt or decrypt signaling feature values, and Paillier encryption is used by default; if there is a need for re-encryption, switch to the EIGamal encryption scheme according to the re-encryption requirement notification; S5, data transmission, the encrypted data and metadata are transmitted to a third party organization in the form of metadata plus signaling data ciphertext through the socket https api interface; S6. Re-encryption requirement notification. The third-party organization performs statistical analysis on the ciphertext data. When the third-party organization performs addition and subtraction operations on the ciphertext, it directly uses the ciphertext data provided by the data provider, because the data provider's default data encryption method is Paillier, which supports addition and subtraction. When the third-party organization needs to perform multiplication or division on the ciphertext, it calls the data provider's re-encryption requirement notification service to transmit the operation type and metadata back to the data provider. After the data provider restores the signaling plaintext through metadata query, it re-encrypts it with EIGamal and transmits it to the third-party organization through the data transmission module, thereby realizing the adaptability of homomorphic encryption.
2. The signaling data protection and analysis method according to claim 1, wherein: In step S4, the Paillier and ElGamal hybrid homomorphic encryption schemes are used to encrypt or decrypt the signaling feature values. The inputs are encryption type, metadata, and plaintext. Among them, when the encryption type is used to encrypt the preprocessed metadata, Paillier encryption is used, and the output is the ciphertext encrypted by Paillier; when the metadata with heavy encryption requirements is encrypted, EIGamal encryption is used, and the output is the ciphertext encrypted by EIGamal; Paillier and EIGamal encryption algorithms are implemented by java and python; Among them, the decryption operation is only implemented on the data provider side, and the decryption operation is directly queried and decrypted based on the metadata without the need for Paillier or EIGamal decryption.
3. The signaling data protection and analysis method according to claim 2, wherein: The Paillier encryption is used to support homomorphic addition or subtraction operations on ciphertext, and the Paillier encryption includes the following steps: S411. Select two large prime numbers p and q, where p and q are unequal large prime numbers; S412, calculate modulus n and γ n=p×q Y = lcm(p-1,q-1) Where n is the public key, γ is the private key, and lcm is the least common multiple of p-1 and q-1; S413. Select an integer g such that gcd(L(g γ mod n 2 ), n)=1, Among them, L(x) = (x-1) / n, gcd is the greatest common divisor; S414: Generate a key, which includes a public key and a private key. Among them, the public key is (n, g), the private key is (γ, μ), where μ = L(g γ mod n 2 ) -1 mod n; S415, encryption process, first assume that M is the plaintext to be encrypted, select a random integer that satisfies gcd(r,n)=1, Then through c = g M × n mod n 2 , calculate the ciphertext; S416: Perform an operation on the ciphertext. When the operation is addition or subtraction, no decryption operation is required. When the operation is multiplication or division, the operation type and metadata are transmitted back to the data provider by calling the re-encryption requirement notification service of the data provider. The data provider restores the signaling plaintext through the decryption process after metadata query, and re-encrypts it with EIGamal. When the operation on the ciphertext is an addition operation, assuming there are two ciphertexts c1 and c2, corresponding to plaintexts m1 and m2 respectively, the sum c3 of c1 and c2 is calculated as: c3 = c1 × c2 mod n 2 , decrypting c3 will get m1+m2; When the operation on the ciphertext is a subtraction operation, suppose there are two plaintexts m1 and m2, and they have been encrypted using the Paillier encryption algorithm to obtain c m1 and c m2 If we want to perform m1-m2 on the ciphertext, we first need to find the additive inverse of m2. In the ring modulo n, the additive inverse of m2 is -m2, which can be calculated by -m2=n-m2. Then, we encrypt -m2 to get c -m2 , c -m2 =g -m 2×r n mod n 2 ,then c m1-m2 =c m1 ×c m2 mod n 2 , so c m1-m2 It is the encryption of m1-m2. In the decryption process, the L value is first calculated: L = L (c γ mod n 2 ), and then decrypt to get the plaintext M = L × μ mod n.
4. The signaling data protection and analysis method according to claim 2, wherein: The EIGamal encryption is used to support homomorphic multiplication or division operations on ciphertext. The EIGamal encryption includes the following steps: S421. Select two large prime numbers p and a primitive root g, where p is a large prime number and g is a primitive root of p; S422, generate a key, Among them, private key: randomly select an integer x, 1 <x<p-1; Public key: calculate y=g x mod p S423, encryption process, assuming that M is the plaintext to be encrypted, and 0≤M≤p, randomly select an integer k, 1 <k<p-1; S424, calculate c1 and c2 Where c1 = g x mod p,c2=M·y x mod p, the ciphertext C is (c1, c2); S425, perform multiplication or division operation, Among them, the multiplication process on the ciphertext, assuming that there are two ciphertexts (C11, C21) and (C12, C22), corresponding to the plaintexts m1 and m2 respectively, then their product (C13, C23) is calculated as follows: C13=C11×C12mod p C23=C21×C22 mod p Among them, the division operation process on the ciphertext, assuming there are two ciphertexts (C1 m1 , C2 m1 ) and (C1 m2 , C2 m2 ), corresponding to plaintext m1 and m2 respectively, now if we want to execute on the ciphertext First, find the multiplicative inverse of m2 In the ring of p, this can be achieved by following the steps: Where g and h are the public parameters of the ElGamal encryption algorithm. k is a random number. Now, we can convert (C1 m1 , C2 m1 ) and (C1 m2 , C2 m2 ) to perform division on the ciphertext. The calculation formula is: so, for Encryption; Among them, the decryption process of the encrypted content is to calculate s: Calculate -1 ,s -1 is the multiplicative inverse of s under modulus p, then the decrypted plaintext is M = c2 s -1 mod p.
5. A signaling data protection and analysis device, comprising: The data collection module is used to obtain the original signaling data from the data source, input the original signaling data, collect data through socket API calls, database queries or other data interfaces, and output structured signaling data; The data preprocessing module is used to clean and format the structured signaling data, use the data cleaning algorithm and data conversion method to desensitize the calling and called numbers, and generate the original features and derived features of the signaling. The calling and called numbers are desensitized using HMAC (hash-based message authentication code) to output the original features and derived features of the signaling; The metadata generation module is used to generate metadata for each pre-processed signaling data, use UUID to encode metadata for each signaling, and save it to a database or distributed storage system, generate a metadata for each signaling, and output a globally unique and meaningless metadata code. The metadata contains sensitive information and is globally unique. The hybrid homomorphic encryption module is used to encrypt or decrypt the signaling feature value using the hybrid homomorphic encryption scheme of Paillier and EIGamal. Paillier encryption is used by default. If there is a need for re-encryption, the EIGamal encryption scheme is switched according to the re-encryption requirement notification. The data transmission module is used to transmit the encrypted data and metadata to a third party organization in the form of metadata plus signaling data ciphertext through the socket https API interface; The re-encryption requirement notification module is used by third-party organizations to perform statistical analysis on ciphertext data. When third-party organizations perform addition and subtraction operations on ciphertext, they directly use the ciphertext data provided by the data provider, because the default data encryption method of the data provider is Paillier, which supports addition and subtraction. When a third-party organization needs to perform multiplication or division on the ciphertext, it calls the re-encryption requirement notification service of the data provider to transmit the operation type and metadata back to the data provider. After the data provider restores the signaling plaintext through metadata query, it re-encrypts it with EIGamal and transmits it to the third-party organization through the data transmission module, thereby realizing the adaptability of homomorphic encryption.
6. The signaling data protection and analysis device according to claim 5, wherein: The hybrid homomorphic encryption module uses the Paillier and ElGamal hybrid homomorphic encryption schemes to encrypt or decrypt signaling feature values. The input is encryption type, metadata, and plaintext. Among them, when the encryption type is used to encrypt the preprocessed metadata, Paillier encryption is used, and the output is the ciphertext encrypted by Paillier; when the metadata with heavy encryption requirements is encrypted, EIGamal encryption is used, and the output is the ciphertext encrypted by EIGamal; Paillier and EIGamal encryption algorithms are implemented by java and python; Among them, the decryption operation is only implemented on the data provider side, and the decryption operation is directly queried and decrypted based on the metadata without the need for Paillier or EIGamal decryption.
7. The signaling data protection and analysis device according to claim 6, wherein: The Paillier encryption is used to support homomorphic addition or subtraction operations on ciphertext, and the Paillier encryption includes the following steps: S411. Select two large prime numbers p and q, where p and q are unequal large prime numbers; S412, calculate modulus n and γ n=p=q γ=lcm(p-1,q-1) Where n is the public key, γ is the private key, and lcm is the least common multiple of p-1 and q-1; S413. Select an integer g such that gcd(L(g γ mod n 2 ), n)=1, Among them, L(x) = (x-1) / n, gcd is the greatest common divisor; S414: Generate a key, which includes a public key and a private key. Among them, the public key is (n, g), the private key is (γ, μ), where μ = L(g γ mod n 2 ) -1 mod n; S415, encryption process, first assume that M is the plaintext to be encrypted, select a random integer that satisfies gcd(r,n)=1, Then through c = g M × n mod n 2 , calculate the ciphertext; S416: Perform an operation on the ciphertext. When the operation is addition or subtraction, no decryption operation is required. When the operation is multiplication or division, the operation type and metadata are transmitted back to the data provider by calling the re-encryption requirement notification service of the data provider. The data provider restores the signaling plaintext through the decryption process after metadata query, and re-encrypts it with EIGamal. When the operation on the ciphertext is an addition operation, assuming there are two ciphertexts c1 and c2, corresponding to plaintexts m1 and m2 respectively, the sum c3 of c1 and c2 is calculated as: c3 = c1 × c2 mod n 2 , decrypting c3 will get m1+m2; When the operation on the ciphertext is a subtraction operation, suppose there are two plaintexts m1 and m2, and they have been encrypted using the Paillier encryption algorithm to obtain c m1 and c m2 If we want to perform m1-m2 on the ciphertext, we first need to find the additive inverse of m2. In the ring modulo n, the additive inverse of m2 is -m2, which can be calculated by -m2=n-m2. Then, we encrypt -m2 to get c -m2 , c -m2 =g -m 2×r n mod n 2 ,then c m1-m2 =c m1 ×c m2 mod n 2 , so c m1-m2 It is the encryption of m1-m2. In the decryption process, the L value is first calculated: L = L (c γ mod n 2 ), and then decrypt to get the plaintext M = L × μ mod n.
8. The signaling data protection and analysis device according to claim 6, wherein: The EIGamal encryption is used to support homomorphic multiplication or division operations on ciphertext. The EIGamal encryption includes the following steps: S421. Select two large prime numbers p and a primitive root g, where p is a large prime number and g is a primitive root of p; S422, generate a key, Among them, private key: randomly select an integer x, 1 <x<p-1; Public key: calculate y=g x mod p S423, encryption process, assuming that M is the plaintext to be encrypted, and 0≤M≤p, randomly select an integer k, 1 <k<p-1; S424, calculate c1 and c2 Where c1 = g x mod p,c2=M·y x mod p, the ciphertext C is (c1, c2); S425, perform multiplication or division operation, Among them, the multiplication process on the ciphertext, assuming that there are two ciphertexts (C11, C21) and (C12, C22), corresponding to the plaintexts m1 and m2 respectively, then their product (C13, C23) is calculated as follows: C13=C11×C12mod p C23=C21×C22mod p Among them, the division operation process on the ciphertext, assuming there are two ciphertexts (C1 m1 , C2 m1 ) and (C1 m2 , C2 m2 ), corresponding to plaintext m1 and m2 respectively, now if we want to execute on the ciphertext First, find the multiplicative inverse of m2 In the ring of p, this can be achieved by following the steps: Where g and h are the public parameters of the ElGamal encryption algorithm. k is a random number. Now, we can convert (C1 m1 , C2 m1 ) and (C1 m2 , C2 m2 ) to perform division on the ciphertext. The calculation formula is: so, for Encryption; Among them, the decryption process of the encrypted content is to calculate s: Calculate -1 ,s -1 is the multiplicative inverse of s under modulus p, then the decrypted plaintext is M = c2 s -1 mod p.
9. An electronic device, comprising: A memory, a processor, and a signaling data protection and analysis program stored in the memory and executable on the processor, wherein the signaling data protection and analysis program, when executed by the processor, implements the steps of the signaling data protection and analysis method as described in any one of claims 1 to 4.
10. A computer storage medium, wherein: The computer storage medium stores a signaling data protection and analysis program, which, when executed by a processor, implements the steps of the signaling data protection and analysis method according to any one of claims 1 to 4.
Citation Information
Patent Citations
An all-homomorphic encryption method and system based on data transformation
CN109190395A
Cloud database encryption method based on combined encryption
CN110750797A
Identity verification system and identity verification method
CN111770057A
Dynamic negotiation of encryption protocols
US20050198490A1