A method and system for enterprise credit assessment based on blockchain and homomorphic encryption
By adopting blockchain and homomorphic encryption technology in government data sharing, the problems of government data silos and low utilization efficiency are solved, the security assessment and efficient management of enterprise credit are achieved, and the comprehensiveness of government departments is enhanced. Management ability.
Patent Information
- Application Number
- CN202110714716.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-25
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2041-06-25
AI Technical Summary
Due to the large amount of government data, fast growth rate and inconsistent structure, government data is in data island situations, low efficiency of government data utilization, weak sharing ability, and poor comprehensive management capabilities of enterprises.
Using the enterprise credit evaluation method based on blockchain and homomorphic encryption, the public and private keys are generated through the coordinated work of blockchain storage nodes, government department nodes, key management nodes, supervisor nodes, and credit evaluation nodes, and the public and private keys are generated to carry out the Data encryption and homomorphic calculation, automatic calculation and certificate-saving enterprise credit rating.
It realizes enterprise credit assessment without leaking original data, improves data utilization and activity, enhances the comprehensive management capabilities of government departments for enterprises, and ensures the evaluation process through the decentralized characteristics of blockchain. Transparency and distributed trust.
Smart Images

Figure CN113435744B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to an enterprise credit assessment method and system based on blockchain and homomorphic encryption. Background Art
[0002] As the demand for government data sharing increases, the multi-faceted integration and utilization of government data has attracted the attention of the government. However, government data involves a large amount of private information of enterprises and citizens, and strict data control is required to prevent private information from being tampered with or leaked by managers, or stolen by lawbreakers for profit. At the same time, government data has the characteristics of large data volume, fast data growth rate, and inconsistent data structure, and is owned by different government departments, making it extremely difficult to ensure the safe sharing of data. It is precisely because of these characteristics that government data is "unwilling to share", "dare not share", and "cannot share" data islands, resulting in low efficiency in the use of government data, weak sharing capabilities, and poor comprehensive management capabilities of enterprises. Summary of the invention
[0003] The embodiment of the present invention provides a method and system for enterprise credit assessment based on blockchain and homomorphic encryption. The technical solution is as follows:
[0004] On the one hand, a method for enterprise credit assessment based on blockchain and homomorphic encryption is provided, the method is implemented by an enterprise credit assessment system, the enterprise credit assessment system includes a blockchain storage node, a government department node, a key management node, a supervisor node, and a credit assessment node; the method includes:
[0005] The credit assessment node generates a public key and a private key, and stores the public key in the key management node;
[0006] The government department nodes obtain the primary indicator score values corresponding to the secondary indicators based on the enterprise credit assessment data stored by each of them;
[0007] The government department node queries the key management node for the public key of the credit assessment node, uses the public key to encrypt the primary indicator score value, and sends the encrypted ciphertext to the credit assessment node;
[0008] The credit assessment node sets a primary indicator weight value, calls a smart contract, performs homomorphic calculation on the encrypted ciphertext and the indicator weight value, and obtains the plaintext corresponding to the ciphertext according to the homomorphic calculation result and the private key, and the plaintext is the primary indicator score value of the government department node;
[0009] The credit assessment node classifies the credit rating of the enterprise according to the primary indicator score of the government department node, and stores the classification result on the blockchain storage node;
[0010] The supervisor node obtains the level division results on the blockchain storage node for verification and audit.
[0011] Optionally, the credit assessment node generates a public key and a private key, including:
[0012] Randomly select two large prime numbers p and q as the input of the function ParamsGen(p, q), and obtain the output results n and λ, where p and q satisfy gcd(pq, (p-1)(q-1))=1, gcd() represents the greatest common divisor operation, n=pq, λ=lcm(p-1, q-1), where lcm() represents the least common multiple operation;
[0013] Define a multiplication group Here G is a multiplicative group of order n, and group H is isomorphic to group
[0014] Generate public key PK and private key SK, PK = KeyGen (n, g), SK = λ, where KeyGen () represents the key generation algorithm and g is a randomly selected integer So that g = (1 + n) j x mod n 2 , where j is an integer known to be relatively prime to n.
[0015] Optionally, the using the public key to encrypt the first-level indicator score value includes:
[0016] Select a random integer r such that 0<r<n and
[0017] The first-level index score value is set to be represented by m, where m satisfies 0<m<n, and the first-level index score value is encrypted according to the following formula (1):
[0018] c=E(m,r)=g m r n mod n 2 ……(1)
[0019] Optionally, the credit assessment node sets a primary indicator weight value, calls a smart contract, and performs homomorphic calculation on the encrypted ciphertext and the indicator weight value, including:
[0020] The credit assessment node sets the primary index weight value to be a1 to a6, and a1+a2+a3+a4+a5+a6=1;
[0021] For the encrypted ciphertext c1, c2, c3, c4, c5, c6, perform homomorphic calculation according to the following formula (2):
[0022] c=a1c1+a2c2+a3c3+a4c4+a5c5+a6c6……(2)
[0023] Optionally, obtaining a plaintext corresponding to the ciphertext according to the homomorphic computation result and the private key includes:
[0024] According to the homomorphic calculation result, the private key and the following formula (3), the plaintext corresponding to the ciphertext is calculated:
[0025] m=D(c,λ)=L(c λ mod n) / L(g λ mod n)mod n……(3)
[0026] Among them, c is the result of homomorphic calculation, λ is the private key, and the L() function is defined as L(x)=(x-1) / n.
[0027] Optionally, the supervisor node obtains the level division result on the blockchain storage node for verification and audit, including:
[0028] The supervisor node obtains the primary indicator score value of the government department node for homomorphic calculation, and classifies the enterprise credit rating according to the homomorphic calculation result to obtain the supervision rating result;
[0029] The supervisor node obtains the grade division result stored in the blockchain storage node, and compares the obtained supervision grade division result with the obtained supervision grade division result. If they are the same, the accuracy check passes; if they are not the same, the accuracy check fails, and the supervisor node makes corresponding adjustments to the credit assessment node.
[0030] On the other hand, an enterprise credit assessment system is provided, which is used to implement the above-mentioned enterprise credit assessment method based on blockchain and homomorphic encryption, and the enterprise credit assessment system includes a credit assessment node, a blockchain storage node, a key management node, a government department node, and a supervisor node; wherein:
[0031] The credit assessment node is used to generate a public key and a private key, and store the public key in the key management node; set a primary indicator weight value, call a smart contract, perform homomorphic calculation on the encrypted ciphertext and the indicator weight value, and obtain the plaintext corresponding to the ciphertext according to the homomorphic calculation result and the private key, wherein the plaintext is the primary indicator score value of the government department node; classify the credit rating of the enterprise according to the primary indicator score value of the government department node, and store the classification result on the blockchain storage node;
[0032] The blockchain storage node is used to store the level division results;
[0033] The key management node is used to store the public key of the credit assessment node;
[0034] The government department node is used to obtain the first-level indicator score value corresponding to the second-level indicator according to the enterprise credit assessment data stored in each of them; and is used to query the key management node for the public key of the credit assessment node, encrypt the first-level indicator score value using the public key, and send the encrypted ciphertext to the credit assessment node;
[0035] The supervisor node is used to obtain the level division results on the blockchain storage node for verification and audit.
[0036] Optionally, the credit assessment section is used to:
[0037] Randomly select two large prime numbers p and q as the input of the function ParamsGen(p, q), and obtain the output results n and λ, where p and q satisfy gcd(pq, (p-1)(q-1))=1, gcd() represents the greatest common divisor operation, n=pq, λ=lcm(p-1, q-1), where lcm() represents the least common multiple operation;
[0038] Define a multiplication group Here G is a multiplicative group of order n, and group H is isomorphic to group
[0039] Generate public key PK and private key SK, PK = KeyGen (n, g), SK = λ, where KeyGen () represents the key generation algorithm and g is a randomly selected integer So that g = (1 + n) j x mod n 2 , where j is an integer known to be relatively prime to n.
[0040] Optionally, the credit assessment node is used to:
[0041] Select a random integer r such that 0<r<n and
[0042] The first-level index score value is set to be represented by m, where m satisfies 0<m<n, and the first-level index score value is encrypted according to the following formula (1):
[0043] c=E(m,r)=g m r n mod n 2 ……(1)
[0044] Optionally, the credit assessment node is used to:
[0045] The credit assessment node sets the primary index weight value to be a1 to a6, and a1+a2+a3+a4+a5+a6=1;
[0046] For the encrypted ciphertext c1, c2, c3, c4, c5, c6, perform homomorphic calculation according to the following formula (2):
[0047] c=a1c1+a2c2+a3c3+a4c4+a5c5+a6c6……(2)
[0048] Optionally, the credit assessment node is used to:
[0049] According to the homomorphic calculation result, the private key and the following formula (3), the plaintext corresponding to the ciphertext is calculated:
[0050] m=D(c,λ)=L(c λ mod n) / L(g λ mod n)mod n……(3)
[0051] Among them, c is the result of homomorphic calculation, λ is the private key, and the L() function is defined as L(x)=(x-1) / n.
[0052] Optionally, the supervisor node is used to:
[0053] The supervisor node obtains the primary indicator score value of the government department node for homomorphic calculation, and classifies the enterprise credit rating according to the homomorphic calculation result to obtain the supervision rating result;
[0054] The supervisor node obtains the grade division result stored in the blockchain storage node, and compares the obtained supervision grade division result with the obtained supervision grade division result. If they are the same, the accuracy check passes; if they are not the same, the accuracy check fails, and the supervisor node makes corresponding adjustments to the credit assessment node.
[0055] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0056] In the above scheme, blockchain and additive homomorphic encryption technology are mainly used to evaluate the credit of enterprises without leaving the original data. At the same time, the evaluation process will be automatically calculated and stored by the blockchain smart contract. Based on the decentralized and tamper-proof characteristics of blockchain, the evaluation process can be transparent and distributed trust, so that data between multiple departments can be safely integrated and utilized, which improves the utilization and activity of data and enhances the comprehensive management capabilities of government departments over enterprises. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0058] Figure 1 This is a flow chart of a method for enterprise credit assessment based on blockchain and homomorphic encryption provided by an embodiment of the present invention;
[0059] Figure 2 This is a flow chart of a method for enterprise credit assessment based on blockchain and homomorphic encryption provided by an embodiment of the present invention;
[0060] Figure 3 This is an architecture diagram of a government blockchain basic platform provided by an embodiment of the present invention;
[0061] Figure 4 The present invention provides a system block diagram of enterprise credit assessment. DETAILED DESCRIPTION
[0062] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0063] The embodiment of the present invention provides a method for enterprise credit assessment based on blockchain and homomorphic encryption. The method is implemented by an enterprise credit assessment system, which includes a blockchain storage node, a government department node, a key management node, a supervisor node, and a credit assessment node. Figure 1 The flowchart of the enterprise credit assessment method based on blockchain and homomorphic encryption is shown. The processing flow of the method may include the following steps:
[0064] Step 101: The credit assessment node generates a public key and a private key, and stores the public key in the key management node;
[0065] Step 102: The government department nodes obtain the primary indicator score values corresponding to the secondary indicators based on the enterprise credit assessment data stored in each node;
[0066] Step 103: The government department node queries the key management node for the public key of the credit assessment node, uses the public key to encrypt the primary indicator score value, and sends the encrypted ciphertext to the credit assessment node;
[0067] Step 104: The credit assessment node sets the first-level indicator weight value, calls the smart contract, performs homomorphic calculation on the encrypted ciphertext and the indicator weight value, and obtains the plaintext corresponding to the ciphertext according to the homomorphic calculation result and the private key. The plaintext is the first-level indicator score value of the government department node;
[0068] Step 105: The credit assessment node classifies the enterprise credit rating according to the primary indicator score of the government department node, and stores the rating results on the blockchain storage node;
[0069] Step 106: The supervisor node obtains the level classification results on the blockchain storage node for verification and audit.
[0070] Optionally, the credit assessment node generates a public key and a private key, including:
[0071] Randomly select two large prime numbers p and q as the input of the function ParamsGen(p, q), and obtain the output results n and λ, where p and q satisfy gcd(pq, (p-1)(q-1))=1, gcd() represents the greatest common divisor operation, n=pq, λ=lcm(p-1, q-1), where lcm() represents the least common multiple operation;
[0072] Define a multiplication group Here G is a multiplicative group of order n, and group H is isomorphic to group
[0073] Generate public key PK and private key SK, PK = KeyGen (n, g), SK = λ, where KeyGen () represents the key generation algorithm and g is a randomly selected integer So that g = (1 + n) j x mod n 2 , where j is an integer known to be relatively prime to n.
[0074] Optionally, the first-level indicator score value is encrypted using a public key, including:
[0075] Choose a random integer r, r satisfies 0<r<n and
[0076] The first-level index score is set to m, where m satisfies 0<m<n, and the first-level index score is encrypted according to the following formula (1):
[0077] c=E(m,r)=g m r n mod n 2 ……(1)
[0078] Optionally, the credit assessment node sets the first-level indicator weight value, calls the smart contract, and performs homomorphic calculation on the encrypted ciphertext and the indicator weight value, including:
[0079] The credit assessment node sets the first-level indicator weight value to be a1 to a6, and a1+a2+a3+a4+a5+a6=1;
[0080] For the encrypted ciphertext c1, c2, c3, c4, c5, c6, perform homomorphic calculation according to the following formula (2):
[0081] c=a1c1+a2c2+a3c3+a4c4+a5c5+a6c6……(2)
[0082] Optionally, the plaintext corresponding to the ciphertext is obtained according to the homomorphic computation result and the private key, including:
[0083] According to the homomorphic calculation result, the private key and the following formula (3), the plaintext corresponding to the ciphertext is calculated:
[0084] m=D(c,λ)=L(c λ mod n) / L(g λ mod n)mod n……(3)
[0085] Among them, c is the result of homomorphic calculation, λ is the private key, and the L() function is defined as L(x)=(x-1) / n.
[0086] Optionally, the supervisor node obtains the level division results on the blockchain storage node for verification and audit, including:
[0087] The supervisor node obtains the primary indicator score value of the government department node for homomorphic calculation, and classifies the enterprise credit rating according to the homomorphic calculation result to obtain the supervision rating result;
[0088] The supervisor node obtains the grade division results stored in the blockchain storage node, and compares the obtained supervision grade division results with the obtained supervision grade division results. If they are the same, the accuracy check passes; if they are different, the accuracy check fails, and the supervisor node makes corresponding adjustments to the credit assessment node.
[0089] In the embodiment of the present invention, blockchain and additive homomorphic encryption technology are mainly used to evaluate the credit of an enterprise without the original data being stored in the warehouse. At the same time, the evaluation process will be automatically calculated and stored by the blockchain smart contract. Based on the decentralized and tamper-proof characteristics of the blockchain, the transparency and distributed trust of the evaluation process can be achieved, so that data between multiple departments can be safely integrated and utilized, thereby improving the utilization and activity of data and enhancing the comprehensive management capabilities of government departments over enterprises.
[0090] The embodiment of the present invention provides a method for enterprise credit assessment based on blockchain and homomorphic encryption. The method is implemented by an enterprise credit assessment system, which includes a blockchain storage node, a government department node, a key management node, a supervisor node, and a credit assessment node. Figure 2 The flowchart of the enterprise credit assessment method based on blockchain and homomorphic encryption is shown. The processing flow of the method may include the following steps:
[0091] Step 201: Build an enterprise credit assessment system platform.
[0092] In a feasible implementation method, a government blockchain basic platform with government department nodes, key management nodes, supervisor nodes, credit assessment nodes, and blockchain storage nodes is first built, such as Figure 3 As shown, the government blockchain basic platform is the platform corresponding to the enterprise credit evaluation system, which can include the following steps:
[0093] Step 2011: The government cloud provides basic computing, storage and network resources.
[0094] Step 2012: Provide unified technical standards and interfaces for key algorithms, CA management, SDK access, and smart contract management.
[0095] Step 2013: Build basic blockchain functional modules such as node management, storage management, contract management, and consensus mechanism.
[0096] Step 2014: define the relevant role nodes in the government blockchain, and use the Register(ID, address) function to register new department nodes in the blockchain, such as: government department nodes, key management nodes, supervisor nodes, credit assessment nodes, and blockchain storage nodes.
[0097] Step 202: Build an enterprise credit assessment business application on the government blockchain basic platform.
[0098] In a feasible implementation, a business application for enterprise credit assessment is built on the government blockchain basic platform, thereby realizing a method for assessing enterprise credit. By embedding the credit assessment method in the smart contract, the automatic calculation of the assessment process and the dynamic update of the assessment method are realized. Building the application may include the following steps:
[0099] Step 2021: Build a distributed credit assessment business application module on the government blockchain basic platform, and the basic function module provides blockchain capability support for the business application module.
[0100] Step 2022: The government department constructs an enterprise credit evaluation index system with an internal structure based on various characteristics of its enterprise evaluation objects and multiple interrelated indicators (collectively referred to as secondary indicators in the embodiment of the present invention), and formulates an enterprise credit evaluation method.
[0101] Step 2023: Integrate the enterprise credit assessment method into the smart contract, and the smart contract automatically calculates the assessment process. The enterprise credit assessment method can also be dynamically updated according to specific needs.
[0102] Step 203: define the public parameters related to the enterprise credit assessment system, the credit assessment node generates a public key and a private key, and stores the public key in the key management node.
[0103] In a feasible implementation, after the public key and private key are generated, the public key is stored in the key management node, and the private key is held by the credit assessment node. The operations of initializing and generating the public key and private key may include the following steps:
[0104] Step 2031, randomly select two large prime numbers p and q as inputs of the function ParamsGen(p, q), and obtain output results n and λ, where p and q satisfy gcd(pq, (p-1)(q-1))=1, and this property is to make the lengths of the two prime numbers consistent. gcd() represents the greatest common divisor operation, n=pq, λ=lcm(p-1, q-1), where lcm() represents the least common multiple operation.
[0105] Step 2032: define a multiplication group Here G is a multiplicative group of order n, and group H is isomorphic to group
[0106] Step 2033: Generate a public key PK and a private key SK, PK = KeyGen (n, g), SK = λ, where KeyGen () represents the key generation algorithm, and g is a randomly selected integer. So that g = (1 + n) j x mod n 2 , where j is an integer known to be relatively prime to n.
[0107] Step 204: The government department nodes obtain the primary indicator score values corresponding to the secondary indicators based on the enterprise credit assessment data stored in their respective storages.
[0108] In a feasible implementation, each government department node of the blockchain stores its own enterprise credit assessment data in advance. When an enterprise credit assessment is required, the government department node obtains the first-level indicator score corresponding to the second-level indicator based on the enterprise credit assessment data stored by each government department. Among them, the second-level indicator can be an indicator jointly formulated by the government management enterprise department for evaluating the credit of the enterprise. Its role and basic formulation method are recorded in the above step 2022, which will not be repeated here. The first-level indicator score is a score obtained by performing a preset operation on the second-level indicator, which can quantitatively represent the degree to which each enterprise has reached the second-level indicator. There are many methods in the prior art for calculating the indicator score based on the indicator, which will not be repeated in the embodiment of the present invention.
[0109] Step 205: The government department node queries the key management node for the public key of the credit assessment node, uses the public key to encrypt the primary indicator score value, and sends the encrypted ciphertext to the credit assessment node.
[0110] In a feasible implementation, each government department node of the blockchain calculates the primary indicator score corresponding to the secondary indicator, and then uses the public key of the credit assessment node to encrypt the primary indicator score, and then sends the encrypted ciphertext to the enterprise credit assessment node through the blockchain network, so that the blockchain network nodes reach a consensus for verification and audit. The encryption and transmission process can include the following steps:
[0111] Step 2051: Select a random integer r, where r satisfies 0<r<n and
[0112] Step 2052: Set the first-level index score value to be represented by m, where m satisfies 0<m<n, and encrypt the first-level index score value according to the following formula (1):
[0113] c=E(m,r)=g m r n mod n 2 ……(1)
[0114] Step 2053: Send the encrypted ciphertext to the enterprise credit assessment node through the blockchain network, and reach a consensus among the blockchain nodes. The uploading of blockchain data is achieved through UpData(Hash(x)).
[0115] Step 206: The credit assessment node sets the first-level indicator weight value, calls the smart contract, performs homomorphic calculation on the encrypted ciphertext and the indicator weight value, and obtains the plaintext corresponding to the ciphertext based on the homomorphic calculation result and the private key.
[0116] Among them, the plain text is the primary indicator score value of the government department node.
[0117] In a feasible implementation, performing homomorphic computing may include the following steps:
[0118] Step 2051: The credit assessment node sets the primary index weight values to a1 to a6, and a1+a2+a3+a4+a5+a6=1.
[0119] In a feasible implementation, the weight value of the first-level indicator can be dynamically adjusted according to the specific situation, and the indicator weight setting can be set manually or trained by machine learning methods.
[0120] Step 2062: For the encrypted ciphertexts c1, c2, c3, c4, c5, and c6, perform homomorphic calculation according to the following formula (2):
[0121] c=a1c1+a2c2+a3c3+a4c4+a5c5+a6c6……(2)
[0122] Among them, homomorphic encryption refers to processing the homomorphically encrypted data to obtain an output, and decrypting this output. The result is the same as the output result obtained by processing the unencrypted original data in the same way. The present invention adopts additive homomorphism, that is, Enc(x+y)=Enc(x)+Enc(y).
[0123] Obtaining the plaintext based on the homomorphic computation result may include the following steps:
[0124] Step 2063: Calculate the plaintext corresponding to the ciphertext according to the homomorphic computation result, the private key and the following formula (3):
[0125] m=D(c,λ)=L(c λ mod n) / L(g λ mod n)mod n……(3)
[0126] Among them, c is the result of homomorphic calculation, λ is the private key, and the L() function is defined as L(x)=(x-1) / n.
[0127] Step 207: The credit assessment node classifies the enterprise credit rating according to the primary indicator score of the government department node, and stores the rating results on the blockchain storage node.
[0128] In a feasible implementation, the credit assessment node divides the assessment results into five levels: A, B, C, D, and E. At the same time, the level results are published to the blockchain, and SetEvidenceStr(id, data) is used for data storage. Blockchain data storage uses the method of separating files and hash values to achieve the purpose of tamper-proof, traceability, and trustworthy data sources.
[0129] Step 208: The supervisor node obtains the level classification results on the blockchain storage node for verification and audit.
[0130] In a feasible implementation, the supervisor node uses GetEvidenceStr(id) to obtain the evidence record of the credit assessment process on the blockchain, recalculates the primary indicator score of each government department node in a homomorphic manner, and compares the obtained results with the original results for consistency. The steps of verification audit can be as follows:
[0131] Step 2081: The supervisor node obtains the primary indicator score value of the government department node for homomorphic calculation, and classifies the enterprise credit rating according to the homomorphic calculation result to obtain the supervision rating result;
[0132] Step 2082: The supervisor node obtains the grade division result stored in the blockchain storage node, and compares the obtained supervision grade division result with the obtained supervision grade division result. If they are the same, the accuracy check passes; if they are different, the accuracy check fails, and the supervisor node makes corresponding adjustments to the credit assessment node.
[0133] In the embodiment of the present invention, blockchain and additive homomorphic encryption technology are mainly used to evaluate the credit of an enterprise without the original data being stored in the warehouse. At the same time, the evaluation process will be automatically calculated and stored by the blockchain smart contract. Based on the decentralized and tamper-proof characteristics of the blockchain, the transparency and distributed trust of the evaluation process can be achieved, so that data between multiple departments can be safely integrated and utilized, thereby improving the utilization and activity of data and enhancing the comprehensive management capabilities of government departments over enterprises.
[0134] Figure 4 is a block diagram of an enterprise credit evaluation system according to an exemplary embodiment. Figure 4 The enterprise credit assessment system 400 is used to implement the above-mentioned enterprise credit assessment method based on blockchain and homomorphic encryption. The enterprise credit assessment system 400 includes a credit assessment node 410, a blockchain storage node 420, a key management node 430, a government department node 440, and a supervisor node 450; wherein:
[0135] The credit assessment node 410 is used to generate a public key and a private key, and store the public key in the key management node 430; set a primary indicator weight value, call a smart contract, perform homomorphic calculation on the encrypted ciphertext and the indicator weight value, and obtain the plaintext corresponding to the ciphertext according to the homomorphic calculation result and the private key, and the plaintext is the primary indicator score value of the government department node 440; classify the credit rating of the enterprise according to the primary indicator score value of the government department node 440, and store the classification result on the blockchain storage node 420;
[0136] The blockchain storage node 420 is used to store the level division results;
[0137] The key management node 430 is used to store the public key of the credit assessment node 410;
[0138] The government department node 440 is used to obtain the first-level indicator score value corresponding to the second-level indicator according to the enterprise credit assessment data stored in each of them; it is used to query the key management node 430 for the public key of the credit assessment node 410, use the public key to encrypt the first-level indicator score value, and send the encrypted ciphertext to the credit assessment node 410;
[0139] The supervisor node 450 is used to obtain the level classification results on the blockchain storage node 420 for verification and audit.
[0140] Optionally, the credit assessment section is used to:
[0141] Randomly select two large prime numbers p and q as the input of the function ParamsGen(p, q), and obtain the output results n and λ, where p and q satisfy gcd(pq, (p-1)(q-1))=1, gcd() represents the greatest common divisor operation, n=pq, λ=lcm(p-1, q-1), where lcm() represents the least common multiple operation;
[0142] Define a multiplication group Here G is a multiplicative group of order n, and group H is isomorphic to group
[0143] Generate public key PK and private key SK, PK = KeyGen (n, g), SK = λ, where KeyGen () represents the key generation algorithm and g is a randomly selected integer So that g = (1 + n) j x mod n 2 , where j is an integer known to be relatively prime to n.
[0144] Optionally, the credit evaluation node 410 is used to:
[0145] Select a random integer r such that 0<r<n and
[0146] The first-level index score value is set to be represented by m, where m satisfies 0<m<n, and the first-level index score value is encrypted according to the following formula (1):
[0147] c=E(m,r)=g m r n mod n2 ……(1)
[0148] Optionally, the credit evaluation node 410 is used to:
[0149] The credit evaluation node 410 sets the primary index weight values to be a1 to a6, and a1+a2+a3+a4+a5+a6=1;
[0150] For the encrypted ciphertext c1, c2, c3, c4, c5, c6, perform homomorphic calculation according to the following formula (2):
[0151] c=a1c1+a2c2+a3c3+a4c4+a5c5+a6c6……(2)
[0152] Optionally, the credit evaluation node 410 is used to:
[0153] According to the homomorphic calculation result, the private key and the following formula (3), the plaintext corresponding to the ciphertext is calculated:
[0154] m=D(c,λ)=L(c λ mod n) / L(g λ mod n)mod n……(3)
[0155] Among them, c is the result of homomorphic calculation, λ is the private key, and the L() function is defined as L(x)=(x-1) / n.
[0156] Optionally, the supervisor node 450 is used to:
[0157] The supervisor node 450 obtains the primary indicator score value of the government department node 440 to perform homomorphic calculation, and classifies the enterprise credit rating according to the homomorphic calculation result to obtain the supervision rating result;
[0158] The supervisor node 450 obtains the grade division result stored in the blockchain storage node 420, and compares the obtained supervision grade division result with the obtained supervision grade division result. If they are the same, the accuracy check passes; if they are not the same, the accuracy check fails, and the supervisor node 450 performs corresponding adjustment processing on the credit assessment node 410.
[0159] In the embodiment of the present invention, blockchain and additive homomorphic encryption technology are mainly used to evaluate the credit of an enterprise without the original data being stored in the warehouse. At the same time, the evaluation process will be automatically calculated and stored by the blockchain smart contract. Based on the decentralized and tamper-proof characteristics of the blockchain, the transparency and distributed trust of the evaluation process can be achieved, so that data between multiple departments can be safely integrated and utilized, thereby improving the utilization and activity of data and enhancing the comprehensive management capabilities of government departments over enterprises.
[0160] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0161] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A corporate credit assessment method based on blockchain and homomorphic encryption, characterized in that: The method is implemented by an enterprise credit assessment system, which includes a blockchain storage node, a government department node, a key management node, a supervisor node, and a credit assessment node; the method includes: The credit assessment node generates a public key and a private key, and stores the public key in the key management node; The government department nodes obtain the first-level index score values corresponding to the second-level indexes according to the enterprise credit assessment data stored by them; The government department nodes query the public key of the credit assessment node from the key management node, encrypt the first-level index score values using the public key, and send the encrypted ciphertext to the credit assessment node; The credit assessment node sets the first-level index weight values, calls a smart contract, performs homomorphic calculation on the encrypted ciphertext and the index weight values, and obtains the plaintext corresponding to the ciphertext according to the homomorphic calculation result and the private key, where the plaintext is the first-level index score value of the government department node; The credit assessment node divides the enterprise credit level according to the first-level index score value of the government department node, and stores the level division result on the blockchain storage node; The supervisor node obtains the level division result on the blockchain storage node for verification and auditing; Among them, the credit assessment node generates a public key and a private key, including: Randomly select two large prime numbers p and q as the input of the function ParamsGen(p,q), and obtain the output results n and λ, where p and q satisfy gcd(pq,(p - 1)(q - 1)) = 1, gcd() represents the greatest common divisor operation, n = pq, λ = lcm(p - 1,q - 1), where lcm() represents the least common multiple operation; Define a multiplication group Here G is a multiplicative group of order n, and group H is isomorphic to group Generate public key PK and private key SK, PK = KeyGen (n, g), SK = λ, where KeyGen () represents the key generation algorithm and g is a randomly selected integer So that g = (1 + n) j xmodn 2 , where j is an integer known to be relatively prime to n; Among them, the encrypting the first-level index score value using the public key includes: Select a random integer r, where r satisfies 0 < r < n and Set the first-level index score value as m, where m satisfies 0 < m < n, and encrypt the first-level index score value according to the following formula (1): c=E(m,r)=g m r n modn 2 ……(1) Among them, the credit assessment node sets the first-level index weight values, calls a smart contract, and performs homomorphic calculation on the encrypted ciphertext and the index weight values, including: The credit assessment node sets the first-level index weight values as a1 to a6, and a1 + a2 + a3 + a4 + a5 + a6 = 1; For the encrypted ciphertexts c1, c2, c3, c4, c5, c6, perform homomorphic calculation according to the following formula (2): c = a1c1 + a2c2 + a3c3 + a4c4 + a5c5 + a6c6......(2) Among them, the obtaining the plaintext corresponding to the ciphertext according to the homomorphic calculation result and the private key includes: Calculate the plaintext corresponding to the ciphertext according to the homomorphic calculation result, the private key, and the following formula (3): m=D(c,λ)=L(c λ modern) / L(g λ modern)modern……(3) Among them, c is the homomorphic calculation result, λ is the private key, and the L() function is defined as L(x) = (x - 1) / n.
2. The method according to claim 1, characterized in that The supervisor node obtains the level division result on the blockchain storage node for verification and auditing, including: The supervisor node obtains the first-level index score values of the government department nodes for homomorphic calculation, and divides the enterprise credit level according to the homomorphic calculation results to obtain the supervision level division results; The supervisor node obtains the level division results stored in the blockchain storage node, compares the obtained supervision level division results with the obtained supervision level division results. If they are the same, the accuracy test passes; if they are different, the accuracy test fails, and the supervisor node performs corresponding adjustment processing on the credit evaluation node.
3. An enterprise credit evaluation system, characterized in that: The system is used to implement the above-mentioned enterprise credit evaluation method based on blockchain and homomorphic encryption. The enterprise credit evaluation system includes a blockchain storage node, a government department node, a key management node, a supervisor node, and a credit evaluation node; among them: The credit evaluation node is used to generate a public key and a private key, store the public key in the key management node; set the first-level index weight values, call the smart contract, perform homomorphic calculation on the encrypted ciphertext and the index weight values, and obtain the plaintext corresponding to the ciphertext according to the homomorphic calculation results and the private key. The plaintext is the first-level index score value of the government department node; divide the enterprise credit level according to the first-level index score value of the government department node, and store the level division results on the blockchain storage node; The blockchain storage node is used to store the level division results; The key management node is used to store the public key of the credit evaluation node; The government department node is used to obtain the first-level index score values corresponding to the second-level indexes according to the enterprise credit evaluation data stored respectively; query the public key of the credit evaluation node from the key management node, encrypt the first-level index score value with the public key, and send the encrypted ciphertext to the credit evaluation node; The supervisor node is used to obtain the level division results on the blockchain storage node for verification and auditing; Among them, the credit evaluation node is used for: Randomly select two large prime numbers p and q as the input of the function ParamsGen(p,q), and obtain the output results n and λ, where p and q satisfy gcd(pq, (p - 1)(q - 1)) = 1, gcd() represents the greatest common divisor operation, n = pq, λ = lcm(p - 1, q - 1), where lcm() represents the least common multiple operation; Define a multiplication group Here G is a multiplicative group of order n, and group H is isomorphic to group Generate public key PK and private key SK, PK = KeyGen (n, g), SK = λ, where KeyGen () represents the key generation algorithm and g is a randomly selected integer So that g = (1 + n) j xmodn 2 , where j is an integer known to be relatively prime to n; Among them, the credit evaluation node is used for: Select a random integer r, where r satisfies 0 < r < n and Set the first-level index score value to be represented by m, where m satisfies 0 < m < n, and encrypt the first-level index score value according to the following formula (1): c=E(m,r)=g m r n modn 2 ……(1) Among them, the credit evaluation node is used for: The credit evaluation node sets the first-level index weight values as a1~a6, and a1 + a2 + a3 + a4 + a5 + a6 = 1; For the encrypted ciphertexts c1, c2, c3, c4, c5, c6, perform homomorphic calculation according to the following formula (2): c = a1c1 + a2c2 + a3c3 + a4c4 + a5c5 + a6c6……(2) Among them, obtaining the plaintext corresponding to the ciphertext according to the homomorphic calculation results and the private key includes: According to the homomorphic calculation result, the private key and the following formula (3), the plaintext corresponding to the ciphertext is calculated: m=D(c,λ)=L(c λ modern) / L(g λ modern)modern……(3) Among them, c is the result of homomorphic calculation, λ is the private key, and the L() function is defined as L(x)=(x-1) / n.
Citation Information
Patent Citations
A credit information reputation method and device based on a block chain intelligent contract
CN109284627A
Cited By
Credit evaluation system and method based on random forest algorithm and block chain
CN120342631A