Data encryption method and system applied to intellectual property transaction
By improving the AES-GCM algorithm and ECDH key exchange mechanism, and combining elliptic curve cryptography and pre-computed lookup table method to optimize encryption operations, the problem of low encryption efficiency in intellectual property transactions is solved, and efficient and secure data protection is achieved.
Patent Information
- Application Number
- CN202511024244.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-11-07
AI Technical Summary
Existing encryption algorithms have low encryption efficiency in intellectual property transactions and are unable to meet the needs of efficient and secure data protection.
An improved AES-GCM algorithm and ECDH key exchange mechanism are adopted, and public and private keys are generated by combining elliptic curve cryptography. Encryption operations are optimized by pre-computation lookup table method, and symmetric encryption is performed using an improved AES-256 algorithm. Under the supervision of the consortium blockchain, a shared key is generated for data encryption.
It improves encryption efficiency, ensures the security and reliability of transaction data, prevents data tampering, and enhances the security and efficiency of transactions.
Smart Images

Figure CN120912200A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of encryption technology, and in particular to a data encryption method and system applied to intellectual property transactions. BACKGROUND
[0002] Nowadays, intellectual property transactions are of great significance in realizing property value, enhancing enterprise technological innovation, optimizing resource allocation, and promoting international exchanges and cooperation. In the digital economy era of rapid Internet development, intellectual property transactions have shifted from traditional offline trading to online trading, bringing convenience to transactions and expanding transaction channels. However, networked intellectual property transactions have the characteristics of low cost and high concealment, posing new challenges to traditional intellectual property protection mechanisms. Blockchain technology, with its immutable data records and distributed ledger features, brings innovative solutions to the intellectual property protection field. Consortium chain, with its excellent transaction efficiency and privacy protection capabilities, is suitable for intellectual property transaction scenarios. By limiting the number of participating nodes, consortium chain ensures fast transaction processing while protecting the privacy rights of participants. Combining consortium chain technology with the intellectual property transaction field is expected to reduce transaction time and cost, optimize the rights protection process, and ensure transaction security and efficiency.
[0003] Smart contracts are programs running on the blockchain, realizing the digital transformation of contracts. These programs automatically execute according to predetermined logic without the need for third-party intervention to fulfill the terms of the agreement. Cryptography is the key to ensuring data security, and existing symmetric and asymmetric encryption algorithms are used to encrypt data to ensure its security and integrity. However, current encryption algorithms can guarantee data security, but encryption efficiency needs to be improved. SUMMARY
[0004] The purpose of the present application is to provide a data encryption method and system applied to intellectual property transactions to improve encryption efficiency.
[0005] To achieve the above purpose, the present application provides the following technical solutions:
[0006] In a first aspect, based on data encryption, the present application provides a data encryption method applied to intellectual property transactions, comprising the following steps:
[0007] Generating a public key and a private key through elliptic curve cryptography;
[0008] Generating a shared key based on the private key of itself and the public key of the transaction partner;
[0009] The intellectual property transaction content and the additional information are encrypted based on the shared key, and in the encryption process, a numerical table pre-calculated and stored is queried to obtain data values required for encryption.
[0010] In a second aspect, from the perspective of a transaction system, the application provides another data encryption method applied to intellectual property transactions, including the following steps:
[0011] The supplier terminal and the demand terminal respectively generate their own public keys and private keys through elliptic curve cryptography, and transmit the private keys to the alliance chain;
[0012] The smart contract of the alliance chain verifies whether the private keys generated by the supplier terminal and the demand terminal are expired, and if so, generates an expiration prompt information so as to make the supplier terminal or the demand terminal regenerate the private keys;
[0013] After the private key verification, under the supervision of the alliance chain, the supplier terminal and the demand terminal exchange the public keys with each other, and generate a shared key in combination with the public key of the other party and the private key of the self;
[0014] The supplier terminal sends the intellectual property content and the additional information and the shared key to the alliance chain;
[0015] The smart contract of the alliance chain encrypts the intellectual property content and the additional information by using the shared key, and in the encryption process, a numerical table pre-calculated and stored is queried to obtain data values required for encryption, and the initialization vector required for encryption, the ciphertext generated by encryption and the authentication tag are transmitted to the demand terminal;
[0016] After receiving the ciphertext, the initialization vector and the authentication tag T, the demand terminal decrypts to obtain the corresponding plaintext and the authentication tag T', and verifies whether the authentication tag T' obtained by decryption is consistent with the received authentication tag T.
[0017] In a third aspect, from the perspective of a software system, the application provides a data encryption system applied to intellectual property transactions, including:
[0018] The public-private key generation module is configured to generate the public key and the private key through elliptic curve cryptography;
[0019] The key generation module is configured to generate the shared key based on the private key of the self and the public key of the transaction counterpart;
[0020] The encryption module is configured to encrypt the intellectual property transaction content and the additional information based on the shared key, and in the encryption process, a numerical table pre-calculated and stored is queried to obtain data values required for encryption.
[0021] In a fourth aspect, the present application provides a computer program product comprising computer readable instructions which, when executed by a processor, implement the steps of the data encryption method for intellectual property transactions of the present application.
[0022] In a fifth aspect, the present application provides a computer readable storage medium comprising computer readable instructions which, when executed by a processor, implement the steps of the data encryption method for intellectual property transactions of the present application.
[0023] In a sixth aspect, the present application provides an electronic device comprising a memory storing program instructions, and a processor connected to the memory and executing the program instructions in the memory to implement the steps of the data encryption method for intellectual property transactions of the present application.
[0024] Compared with the prior art, the present application uses an improved AES-GCM encryption model for encryption, and the improvements mainly include: (1) setting a unique random 12-bit IV value for generating an incremental counter to prevent the same plaintext from generating the same ciphertext and also prevent the same key stream from being generated; (2) using an improved AES-256 algorithm to perform symmetric encryption operations on the input N0-N n and 0 128 , and improving the encryption operation efficiency through a pre-computation lookup table method; (3) using an improved finite field GF(2 128 ) to perform multiplication operations on the additional information and the ciphertext block, and improving the calculation efficiency through a pre-computation lookup table method and a parallel operation method; and (4) the ECDH key exchange mechanism and the key update strategy, which guarantee the data security.
[0025] Overall, the present application improves the encryption efficiency, guarantees the security and authenticity of the transaction data.
[0026] The other advantages of the present application are described in the embodiment section. BRIEF DESCRIPTION OF DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments or the prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.
[0028] Figure 1 is a structural diagram of an intellectual property transaction system.
[0029] Figure 2 is a flowchart of a data encryption method for intellectual property transactions provided in the embodiments.
[0030] Figure 3 A schematic diagram of the encryption process based on the improved AES-GCM encryption model in the embodiment.
[0031] Figure 4 A flowchart of the improved AES-256 algorithm in the embodiment.
[0032] Figure 5 A flowchart of the processing of the thirteenth round of the loop operation in the example.
[0033] Figure 6 A flowchart of the processing of the final round of operation in the example.
[0034] Figure 7 A flowchart of another data encryption method applied to intellectual property transactions provided in the embodiment.
[0035] Figure 8 A corresponding block diagram of a data encryption system applied to intellectual property transactions provided in the embodiment. Figure 2
[0036] A block diagram of an electronic device in the embodiment. Figure 9 DETAILED DESCRIPTION
[0037] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application.
[0038] For reference Figure 1 In the intellectual property transaction system, there are a supplier terminal, a demander terminal and an alliance chain. The supplier terminal is a terminal device used by the supplier to participate in data interaction in the transaction. The supplier is a subject with legal rights of intellectual property, including the legal right holder of achievements such as patents, trademarks and original works, or an organization authorized by the right holder to obtain the disposal qualification, which can realize the value conversion and circulation application of its intellectual assets in the commercial field through marketization methods such as authorization license and property right transfer. The demander terminal is a terminal device used by the demander to participate in data interaction in the transaction. The demander is a subject with demand for introduction or application of intellectual property, including enterprises, research and development groups or individual innovators, etc. The alliance chain is a collaborative network of intellectual assets built among specific organizations, which records transaction information while transacting intellectual property through the automatic execution of relevant processes by combining smart contracts, ensures the integrity and authenticity of data, and guarantees data security by combining cryptography and other technologies.
[0039] It should be noted that the ECDH exchange key module and the improved AES-GSM model in the figure are both functional units integrated in the alliance chain, Figure 1 The data interaction process is separately shown in the figure to more intuitively reflect the data interaction process.
[0040] Reference can be made to Figure 2 The data encryption method applied to intellectual property transactions provided in the embodiment includes the following steps:
[0041] S10, the supplier terminal and the demand terminal respectively generate their own public keys and private keys through elliptic curve cryptography, and transmit the private keys to the alliance chain.
[0042] In the embodiment, as an example, the secp256r1 elliptic curve is used, the base point G=(6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296, 4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5), and the order n=ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551. According to the random integer [1, n-1] of the private key, the supplier terminal and the demand terminal respectively generate their own private keys, the private key a generated by the supplier terminal is ce1fd83f7b37871616ee3f00c430d809f7beca2c86251f3ac6119c67fc00e9cf, and the private key b of the demand terminal is 620fabedd9b7c8769749e75ad36059e77292529e98514bf6d9b3befb90d4f6c9; then the corresponding public key is calculated according to the elliptic curve algorithm, the public key aG generated by the supplier terminal is 045fa817ce0baa5b1bff090c8c5eed99e5bccd78e4f4d74cb5d8637b501c5699a7cf2861de32ecbaea65501ffcda286f68661d68366b4d8cd1ee7d86b64138a8a, and the public key bG generated by the demand terminal is 04f4fe13c3539e41a9e305bfd155796c8aa044e37f0e2e05ce42788035616b57d1ac311586270c1372d5b8810695065ba6a998f665736a6640006d6c56b6ab6210.
[0043] S20, the smart contract of the alliance chain verifies whether the private key generated by the supply side terminal and the demand side terminal is expired, and generates an expired prompt information if it is expired, so as to make the supply side terminal or the demand side terminal regenerate the private key.
[0044] In this embodiment, the validity period of the private key is set to three days. If the user private key is generated more than three days, the smart contract will automatically require the user to reset the private key to ensure the subsequent intellectual property transaction key exchange step. Only in the case that the user private key is not expired, the key exchange operation is allowed to continue, thereby ensuring the security and privacy of the transaction. The core purpose of this strategy is to prevent the security risks that may be caused by long time without updating the key, and to ensure that the user's identity verification and transaction information are always in a trusted and secure state during each key exchange process. This not only improves the security of the system, but also ensures the efficiency and accuracy of the key exchange.
[0045] S30, after the private key verification, the supply side terminal and the demand side terminal exchange public keys with each other under the supervision of the alliance chain, and generate a shared key based on the public key of the other party and the private key of itself.
[0046] According to K=abG, the shared key is generated. Based on the above example, the generated shared key K=422d56b8b1fa71dacd30c7f7fb7f5fb1b04d9cd35ccc6ffb381b2b2b6164e316.
[0047] S40, the supply side terminal sends the intellectual property content and additional information, and the shared key K to the alliance chain.
[0048] S50, the smart contract of the alliance chain encrypts the intellectual property content and additional information using the key K, and transmits the initialization vector required for encryption, the encrypted ciphertext and the authentication tag to the demand side terminal.
[0049] In this embodiment, the improved AES-GCM model is used for encryption. IV is the initialization vector, and a unique random 12-bit IV value is set to generate an incremental counter to prevent the same plaintext from generating the same ciphertext, and also to prevent the same key stream from being generated.
[0050] The whole encryption process is as shown in Figure 3 The input N0-N n and 0 128 are subjected to symmetric encryption operation using the shared key K through the improved AES-256 algorithm. Among them, N1-N n are subjected to symmetric encryption operation using the shared key K through the improved AES-256 algorithm, and the results and the plaintext composed of the intellectual property content are divided into 16-byte plaintext blocks P1-Pn respectively, to obtain ciphertext blocks C1-C n , that is, the result of the N1 encryption operation and the plaintext block P1 are XORed to obtain the ciphertext block C1, the result of the N2 encryption operation and the plaintext block P2 are XORed to obtain the ciphertext block C2, and so on; then the ciphertext blocks C1-C n are merged to obtain the ciphertext C. The input 0 128 128 128 128
[0051] The improved AES-256 algorithm process is shown in Figure 4 , the input 16-byte plaintext block is first subjected to initial transformation to obtain an initial matrix, then subjected to thirteen rounds of cyclic operation, including byte transformation, row transformation, improved column confusion and round key addition, and finally subjected to a final round to obtain an encryption block. The final round does not include improved column confusion. Figure 5 The processing flow of the example thirteen rounds of cyclic operation is shown in Figure 6 , and the processing flow of the example final round operation is shown in
[0052] The improved AES-256 algorithm mainly optimizes the column confusion operation. The first column of the state matrix is M is the column confusion fixed matrix, and formula (1) is as follows:
[0053]
[0054] Therefore, the pre-computed lookup table method can be used for optimization. The pre-computed S table and T table are stored to reduce the amount of calculation, thereby improving the calculation efficiency. The S table is a table for byte substitution of AES-256. Byte substitution means that, for example, if one byte of the 16-byte plaintext block is 1f, it corresponds to the 1st row and the Fth column in the S table, which is 0xc0 according to the table below. The T table is a table of values obtained by performing finite field GF(2 x ) multiplication of S(A 8 ) and 0x02.
[0055] S table:
[0056]
[0057]
[0058] T table:
[0059]
[0060]
[0061] In the GCM mode, the GF(2 128 ) field is defined by an irreducible polynomial, and the modulo reduction is performed using the p(x) = x 128 + x 7 + x 2 + x + 1 polynomial, which ensures that the operation result is still in the field. The improved GF(2 128 ) finite field multiplication operation mainly uses a pre-computed lookup table method in the calculation, and parallel computation optimization is performed, which improves the calculation speed and in turn improves the execution efficiency of the AES-GCM algorithm model.
[0062]
[0063] X is a sixteen-byte data input, x0-x 127 is a 128-bit bit string corresponding value, and a is a multiplication generator of GF(2 128 ), and H is a 128-bit authentication key H.
[0064] By pre-computing HTable(i) = a 8i ·H and storing it in the table, the calculation steps of HTable(i) are as follows formula (3)
[0065]
[0066]
[0067] Where h 127 -h 120 is the high eight bits of Htable(i-1), i = 1-15, R = 0xe100…0, the high 8 bits are e1, and the last 120 bits are 0, and'indicates right shift one bit.
[0068] The value of is calculated by looking up the R table, which speeds up the pre-computation speed of the P table.
[0069] Where, R is only the highest 8 bits non-0, from the above formula, maximum right shift 8 times, only need 16 bits to store the highest 16 bits of all possible values, so you can reduce the storage space, then check R table through left shift 112 bits operation after the result can be obtained .
[0070] The result and HTable(i-1) XOR finally get HTable(0)-HTable(15), then stored in P table, according to the following formula (4) to calculate the value of Z(0)-Z(15) in parallel.
[0071]
[0072] Finally, according to the following formula (5) to add the final finite field product.
[0073]
[0074] R table:
[0075]
[0076]
[0077] P table:
[0078] table[0] e74b1f0d91856d9873212bebe1905e04 table[1] 07ef4b1f0d91856d9873212bebe1905e table[2] 663bef4b1f0d91856d9873212bebe190 table[3] fd463bef4b1f0d91856d9873212bebe1 table[4] a8ff463bef4b1f0d91856d9873212beb table[5] a53eff463bef4b1f0d91856d9873212b table[6] 34b33eff463bef4b1f0d91856d987321 table[7] 39b6b33eff463bef4b1f0d91856d9873 table[8] 569fb6b33eff463bef4b1f0d91856d98 table[9] f3669fb6b33eff463bef4b1f0d91856d table
[10] 40e9669fb6b33eff463bef4b1f0d9185 table
[11] e78ae9669fb6b33eff463bef4b1f0d91 table
[12] fc058ae9669fb6b33eff463bef4b1f0d table
[13] 0826058ae9669fb6b33eff463bef4b1f table
[14] 177626058ae9669fb6b33eff463bef4b table
[15] 7cc17626058ae9669fb6b33eff463bef
[0079] As an example, the IV initial vector is ec63649c82b48992c91a7ba5, and according to the IV to generate the counter, the counter N0-N n and 0 128 symmetric encryption operation, wherein the specific operation is as follows: first, the key K is expanded according to the AES algorithm to obtain fifteen round keys, the initial key 422d56b8b1fa71dacd30c7f7fb7f5fb1 and the input are XORed to complete the initial transformation, and then thirteen round cyclic operations including byte transformation, row shift, improved column confusion, round key addition, wherein the improved column confusion is given as follows: the first column of the state matrix
[0080]
[0081] After another round of final round operation including byte transformation, row shift, round key addition, the ciphertext block is obtained. N1-N n The result obtained by the symmetric encryption operation and the plaintext are divided into 16 bytes of plaintext block P1-P n respectively, and then XORed to obtain the ciphertext block C1-C nThe ciphertext C is 480a82fd7f78a9e1af85d80f59fec5e90371a8029ebe253129c6f75a4d87c4e265b5f867304b44ac486f9f2ee9350284dfc1397f9e, and the input 0 128 The authentication key H obtained by performing the symmetric encryption operation is e74b1f0d91856d9873212bebe1905e04. The improved finite field multiplication is implemented by using a lookup table, and parallel computation of Z(0)-Z(15) is performed, where X=1064646974696f6e616c20696e666f72, X0=10, and the result of Z(0) is as follows:
[0082] Z(0)=X0·HTable(0)=(α)·HTable(0)
[0083] =(α)e74b1f0d91856d9873212bebe1905e04
[0084] =f3a58f86c8c2b6cc3b90975f70c82f02
[0085] The additional information, the ciphertext, and their lengths are input, the result obtained by the improved finite field multiplication is XORed with N0, and the authentication tag T is e8be3ac6f30a64d8d4cbgeda3a776b67.
[0086] S60, after the demand-side terminal receives the ciphertext C, the initialization vector IV, and the authentication tag T, the corresponding plaintext and the authentication tag T' are obtained by decryption in accordance with the foregoing encryption steps, it is verified whether the authentication tag T' obtained by decryption is consistent with the received authentication tag T, if not, it is indicated that the data is tampered, and if yes, it is indicated that the data is not tampered. After the corresponding plaintext is obtained, the transaction can be completed according to the intellectual property content.
[0087] Reference can be made to Figure 7 In the embodiment, another data encryption method applied to intellectual property transaction is provided, which includes the following steps.
[0088] S100, generating a public key and a private key by using elliptic curve cryptography. The specific operation of this step can be referred to the related description in the foregoing step S10, which will not be described here again.
[0089] S200, generating a shared key based on the private key of the self and the public key of the transaction counterpart. The specific operation of this step can be referred to the related description in the foregoing step S30, which will not be described here again.
[0090] S300, the intellectual property transaction content and additional information are encrypted based on the shared key, and the data value required for encryption is obtained by querying a pre-calculated and stored numerical table during the encryption process.
[0091] Specifically, the encryption process can be:
[0092] N1-N n The key is used to perform symmetric encryption using the improved AES-256 algorithm. The result and the plaintext consisting of the intellectual property transaction content are divided into 16-byte plaintext blocks P1-P. n Performing XOR operations on each block yields the ciphertext blocks C1-C2. n ;
[0093] Then the ciphertext blocks C1-C n The ciphertext C is obtained by merging;
[0094] Input 0 128 The authentication key H is obtained by performing symmetric encryption using a shared key and an improved AES-256 algorithm. The additional information A and the authentication key H are then subjected to an improved finite field GF(2). 128 The multiplication operation is performed, and the result is XORed with the ciphertext block C1. The result of the XOR operation is then XORed with the authentication key H using the improved finite field GF(2). 128 The multiplication operation is repeated, and so on. The final result is then XORed with the length of the additional information and the ciphertext C, and finally subjected to the improved finite field GF(2) operation. 128 The multiplication operation is followed by an XOR operation on the result of the symmetric encryption operation with N0 to obtain the authentication tag T, N0-N. n This is the input to the CTR counter.
[0095] The improved AES-256 algorithm performs symmetric encryption operations, including:
[0096] The input is first subjected to an initial transformation to obtain an initial matrix;
[0097] Then, after thirteen rounds of iterative operations, including byte transformation, row transformation, improved column obfuscation, and round key addition; the improved column obfuscation operation includes: setting the first column of the state matrix to... If M is a column confusion fixed matrix, then we have
[0098] Query the pre-computed and stored S and T tables to obtain S(A0) - S(A0). 15 The value of ) and t(S(A0))-T(S(A) 15 The value of ));
[0099] Finally, after the final round operation, including byte transformation, row transformation and round key addition.
[0100] Wherein, the improved finite field GF(2 128 ) multiplication operation processing can include:
[0101] Querying the pre-computed and stored P table to obtain the values of HTable(0)-HTable(15);
[0102] According to the formula Parallel computing obtains the values of Z(0)-Z(15);
[0103] According to the formula The finite field product is calculated.
[0104] The more detailed description of step S300 can refer to the related description in the foregoing step S50, which will not be repeated here.
[0105] Referring to Figure 8 , the embodiment also provides a data encryption system applied to intellectual property transaction, which comprises:
[0106] A public and private key generation module is configured to generate a public key and a private key through elliptic curve cryptography;
[0107] A key generation module is configured to generate a shared key based on the private key of itself and the public key of the transaction counterpart;
[0108] An encryption module is configured to encrypt the intellectual property transaction content and the additional information based on the shared key, and in the encryption process, the data values required for encryption are obtained by querying a pre-computed and stored value table.
[0109] The specific execution operations of each module can refer to the related description in the foregoing method steps, which will not be repeated here.
[0110] As shown in Figure 9 , the embodiment also provides an electronic device, which can include a processor 41 and a memory 42, wherein the memory 42 is coupled to the processor 41. It is worth noting that this figure is exemplary, and other types of structures can be used to supplement or replace this structure to achieve data extraction, report generation, communication or other functions.
[0111] As shown in Figure 9 , the electronic device can also include an input unit 43, a display unit 44 and a power supply 45. It is worth noting that the electronic device does not necessarily include all the components shown in Figure 9 . In addition, the electronic device can also include components not shown in Figure 9 , which can refer to the prior art.
[0112] The processor 41, which is also sometimes referred to as a controller or operating control, can include a microprocessor or other processor device and / or logic device, which receives inputs and controls the operation of the various components of the electronic device.
[0113] The memory 42, which can be one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable device, can store configuration information for the processor 41, instructions for execution by the processor 41, and the like. The processor 41 can execute programs stored in the memory 42 to enable information storage or processing, and the like. In one embodiment, the memory 42 also includes a buffer memory, i.e., a buffer, to store intermediate information.
[0114] The embodiments of the present application also provide a computer program product comprising computer readable instructions, which, when executed in an electronic device, cause the electronic device to perform the operational steps of the method of the present application.
[0115] The embodiments of the present application also provide a storage medium having stored computer readable instructions, which cause an electronic device to perform the operational steps of the method of the present application.
[0116] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in general terms in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0117] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part of the prior art that contributes to the present application, or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0118] The above-described embodiments are merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications, replacements, and improvements within the technical scope disclosed by the present application, and these modifications, replacements, and improvements should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A data encryption method applied to intellectual property transactions, characterized by, The method comprises the following steps: generating a public key and a private key through elliptic curve cryptography; generating a shared key based on the private key of the self and the public key of the transaction counterpart; encrypting the intellectual property transaction content and the additional information based on the shared key, and obtaining the data values required for encryption by querying a pre-calculated and stored numerical table during the encryption process.
2. The data encryption method for intellectual property transactions according to claim 1, characterized in that, The encryption process based on the shared key comprises: N1-N n The improved AES-256 algorithm is used for symmetric encryption operation with the key, and the result and the plaintext constituted by the intellectual property transaction content are divided into 16-byte plaintext blocks P1-P n The XOR operation is performed respectively to obtain ciphertext blocks C1-C n ; The ciphertext blocks C1-C n The ciphertext C is obtained by merging. Input 0 128 The authentication key H is obtained by using the improved AES-256 algorithm with the shared key for symmetric encryption operation, and the additional information A and the authentication key H are subjected to the improved finite field GF(2 128 ) multiplication operation, and the result is subjected to the XOR operation with the cipher block C1, and the result of the XOR operation is subjected to the improved finite field GF(2 128 ) multiplication operation with the authentication key H, and so on, and finally the result is subjected to the improved finite field GF(2 128 ) multiplication operation with the additional information and the length of the cipher C, and then subjected to the XOR operation with the result of the symmetric encryption operation of N0, and the authentication tag T is obtained, N0-N n is the input of the CTR counter.
3. The data encryption method for intellectual property transactions according to claim 2, characterized in that, The improved AES-256 algorithm for symmetric encryption operation comprises: The input is first subjected to initial transformation to obtain an initial matrix; Then after thirteen rounds of cyclic operations, including byte transformation, row transformation, improved column confusion and round key addition; the operation of the improved column confusion includes setting the first column of the state matrix as M is a column confusion fixed matrix, so Query the pre-computed and stored S-table and T-table for the value of S(A0)-S(A 15 ) and the value of T(S(A0))-T(S(A 15 )); Finally, the final round operation is performed, including byte transformation, row transformation and round key addition.
4. The data encryption method for intellectual property transactions according to claim 2, characterized in that, The improved finite field GF(2 128 ) multiplication operation processing includes: The values of HTable(0)-HTable(15) are obtained by querying the pre-calculated and stored P table. According to the formula The values of Z(0)-Z(15) are obtained in parallel computations; The finite field product is calculated according to the formula GF(2n) = GF(2) [x] / (x 5. The data encryption method for intellectual property transactions according to claim 2, characterized in that, The CTR counter is generated by a unique random 12-bit initialization vector.
6. A data encryption method applied to intellectual property transactions, characterized by, The method comprises the following steps: The supplier terminal and the demand terminal generate their respective public keys and private keys through elliptic curve cryptography, and transmit the private keys to the alliance chain; The smart contract of the alliance chain verifies whether the private keys generated by the supplier terminal and the demand terminal are expired, and generates an expiration prompt if the private keys are expired, so that the supplier terminal or the demand terminal can regenerate the private keys; After the private key verification is passed, the supplier terminal and the demand terminal exchange public keys with each other under the supervision of the alliance chain, and generate a shared key in combination with the public key of the other party and the private key of the self; The supplier terminal sends the intellectual property content and the additional information, and the shared key to the alliance chain; The smart contract of the alliance chain encrypts the intellectual property content and the additional information using the shared key, obtains the data values required for encryption by querying a pre-calculated and stored numerical table during the encryption process, and transmits the initialization vector required for encryption, the ciphertext generated by encryption, and the authentication tag to the demand terminal; After receiving the ciphertext, the initialization vector, and the authentication tag T, the demand terminal decrypts to obtain the corresponding plaintext and the authentication tag T', and verifies whether the authentication tag T' obtained by decryption is consistent with the received authentication tag T.
7. A data encryption system applied to intellectual property transactions, characterized by, The method comprises: a public-private key generation module configured to generate a public key and a private key through elliptic curve cryptography; a key generation module configured to generate a shared key based on the private key of the self and the public key of the transaction counterpart; an encryption module configured to encrypt the intellectual property transaction content and the additional information based on the shared key, and obtain the data values required for encryption by querying a pre-calculated and stored numerical table during the encryption process.
8. A computer program product comprising computer readable instructions, characterized in that, The computer readable instructions, when executed by the processor, implement the steps of the data encryption method for intellectual property transactions in any one of claims 1-5.
9. A computer-readable storage medium comprising computer-readable instructions, wherein, The computer readable instructions, when executed by the processor, implement the steps of the data encryption method for intellectual property transactions in any one of claims 1-5.
10. An electronic device, comprising: The method comprises: a memory storing program instructions; a processor connected to the memory, executing the program instructions in the memory, and implementing the steps of the data encryption method for intellectual property transactions in any one of claims 1-5.