Electronic bidding file encryption transmission system, method and storage medium

Through multiple rounds of dynamic obfuscation encryption and elliptic curve key negotiation, the problems of data tampering, unauthorized access and replay attacks in the transmission of electronic bidding documents are solved, and high-security data transmission is achieved.

CN120342742BActive Publication Date: 2025-10-17ANHUI TENDERING GRP INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510628240.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-10-17
Estimated Expiration
2045-05-15

AI Technical Summary

Technical Problem

In the existing technology, electronic bidding documents are vulnerable to data tampering, unauthorized access and replay attacks during transmission. Traditional encryption methods are not secure enough, key negotiation is vulnerable to man-in-the-middle attacks, and the means of verifying data integrity and freshness are single.

Method used

A multi-round dynamic obfuscation encryption method is adopted. By dividing the electronic bidding documents into data blocks and generating unique identifiers, the elliptic curve Diffie-Hellman protocol is combined to negotiate the session key, dynamically generate the permutation table and round key sequence, and use the authentication tag and timestamp for double verification to ensure data integrity and freshness.

Benefits of technology

Effectively resist differential cryptanalysis and dictionary attacks, enhance key usage separation, ensure data confidentiality, integrity and freshness, improve system anti-attack capabilities, and prevent data tampering and replay attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120342742B_ABST
    Figure CN120342742B_ABST
Patent Text Reader

Abstract

The application discloses an electronic bidding file encryption transmission system and method and a storage medium, and the method comprises the following steps: the electronic bidding file of the sending end is divided into multiple data blocks, and a unique identifier is allocated to each data block; a permutation table and a round key sequence are generated according to a session key and a data block identifier; a multiple-round dynamic confusion operation is performed on the data block, each round of operation comprises bit operation based on the round key sequence and byte position rearrangement based on the permutation table, and a confused data block is obtained; an authentication tag is generated for the confused data block, and the confused data block is bound with a timestamp, a block identifier, a session identifier and the confused data block and then sent to the receiving end; the receiving end performs reverse decryption operation on the confused data block based on the multiple-round dynamic confusion operation, obtains decrypted data, and verifies the decrypted data according to the authentication tag and the timestamp. The application relates to the technical field of electronic information security, and solves the technical problems that the electronic bidding file transmission process is prone to data tampering and replay attacks in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of electronic information security, and relates to a file encryption technology, in particular to an electronic bidding file encryption transmission system and method and a storage medium. BACKGROUND

[0002] In the field of electronic bidding, the secure transmission of electronic bidding files is a core link to ensure the fairness and legality of bidding. In the prior art, electronic bidding files face multiple security threats during transmission, including unauthorized access, tampering, replay attacks, etc., resulting in leakage or integrity destruction of bidding information. Traditional encryption transmission methods usually use fixed block cipher algorithms for data encryption, and the round function rules, permutation tables and padding methods are statically designed. Attackers can perform differential cryptanalysis, dictionary attacks or padding attacks by analyzing the fixed mode, and the security cannot meet the needs of high-sensitive scenarios.

[0003] In the key agreement aspect, traditional schemes mostly rely on the simple Diffie-Hellman protocol or pre-shared keys, lack effective identity authentication mechanisms, are vulnerable to man-in-the-middle attacks, and lead to session keys being stolen. Moreover, the key derivation process is not customized according to business scenarios, and the key entropy value is insufficient or the use is not completely separated, which may lead to key misuse. In addition, the existing technology has a single verification method for data integrity and freshness, and only checks the data integrity through a hash function or a message authentication code, which cannot resist replay attacks and may cause the receiving end to misjudge the expired or fake bidding file as valid. SUMMARY

[0004] The present application aims to at least solve one of the technical problems existing in the prior art; for this purpose, the present application proposes an electronic bidding file encryption transmission system, method and storage medium to solve the technical problems of data tampering, unauthorized access and replay attacks in the transmission process of electronic bidding files in the prior art.

[0005] To achieve the above-mentioned purpose, the first aspect of the present application provides an electronic bidding file encryption transmission method, comprising:

[0006] The electronic bidding file of the sending end is divided into multiple data blocks, and each data block is assigned a unique identifier, obtaining a data block identifier;

[0007] A permutation table and a round key sequence are generated according to the session key and the data block identifier; wherein the session represents a communication interaction process of an electronic bidding file once;

[0008] A plurality of rounds of dynamic confusion operations are performed on the data blocks, each round of operation including bit operation based on the round key sequence and byte position rearrangement based on the permutation table, obtaining a confused data block;

[0009] An authentication tag is generated for the obfuscated data block and sent to the receiving end in binding with a timestamp, a block identifier, a session identifier, and the obfuscated data block; wherein the session identifier is used to identify each session and is generated according to a predefined rule;

[0010] The receiving end performs reverse decryption operation on the obfuscated data block based on the multi-round dynamic obfuscation operation to obtain decrypted data, and verifies the decrypted data according to the authentication tag and the timestamp.

[0011] Further, the segmentation rule of the data block is:

[0012] It is judged whether the size FS of the electronic bidding file is greater than a preset file size; if yes, the electronic bidding file is segmented into data blocks according to a preset data block size BS; if no, the electronic bidding file is processed as a single data block;

[0013] When the size of the last data block after segmentation is less than the preset data block size BS, a pseudo-random byte is generated according to the following formula and spliced after the last data block:

[0014] PL = (BS - (FS mod BS)) mod BS, Padding = PRNG1(SK||BlockID) mod 256 PL ;

[0015] Wherein, mod represents the modulo operation, PL represents the padding length, Padding represents the pseudo-random byte, PRNG1() represents the first pseudo-random number generator, SK represents the session key, BlockID represents the data block identifier, and || represents the data splicing operation.

[0016] Further, the generation mode of the session key comprises:

[0017] The receiving end and the sending end perform initialization of the key agreement protocol by using the Diffie-Hellman key exchange protocol based on a predefined elliptic curve cipher parameter set;

[0018] The receiving end and the sending end respectively generate a temporary key pair, including a temporary private key and a temporary public key of the receiving end, and a temporary private key and a temporary public key of the sending end, and the temporary public keys are all exchanged through an encrypted channel;

[0019] The temporary private key of the receiving end is subjected to elliptic curve scalar multiplication with the temporary public key of the sending end to calculate a shared secret point of the receiving end;

[0020] The temporary private key of the sending end is subjected to elliptic curve scalar multiplication with the temporary public key of the receiving end to calculate a shared secret point of the sending end;

[0021] ​extracting the x-coordinate value x of the shared secret point of the receiving end and the sending end z , to obtain the original key material;

[0022] generating a session key SK by using a HMAC-based extract-and-expand key derivation function HKDF; wherein the input of the derivation function HKDF includes the original key material, a predefined first label, a predefined identifier of the receiving end, a predefined identifier of the sending end, and the HMAC represents a hash operation message authentication code algorithm.

[0023] Further, the generation mode of the permutation table and the round key sequence includes:

[0024] inputting the session key, the data block identifier, and a session unique identifier into a hash function to generate a block-level seed;

[0025] initializing a second pseudo-random number generator PRNG2() based on the block-level seed, and outputting the permutation table and the round key sequence by using the second pseudo-random number generator, and the generation rule is:

[0026] P[i] = (PRNG2(SK||BlockID) × i) mod BS (i = 0, 1, …, BS-1); wherein, P[i] is the index value of the i-th position in the permutation table P, indicating the new position of the i-th byte in the data block after the confusion;

[0027] P[i] = (PRNG2(SK||BlockID) × i) mod BS (i = 0, 1, …, BS-1); wherein, P[i] is the index value of the i-th position in the permutation table P, indicating the new position of the i-th byte in the data block after the confusion;

[0028] K r = PRNG2(SK||r) mod 2 32 (r = 1, 2, …, R); wherein, K r represents the key of the r-th round in the round key sequence, R represents the total number of rounds, and r represents the round index.

[0029] Further, the function of the multi-round dynamic confusion operation is:

[0030] generating the dynamic parameters α r and β r of the r-th round by using the second pseudo-random number generator;

[0031] determining the input B input of the dynamic confusion operation of the current round: if the round index r = 1, the input is the current data block; if the round index r > 1, the input is the output C r-1 of the previous round;

[0032] performing a cyclic left shift on the bitwise XOR of the current round key K r and the input B input to obtain a preliminary confusion result B shift , and the expression is: B shift = (Binput ⊕K r )<< <s;其中,s表示移位位数,<<<表示循环左移;

[0033] Rearrange the byte positions according to the permutation table P[i] of the current data block to obtain the rearrangement result B permuted [i], the formula is: B permuted [i]=B shift [P[i]];

[0034] Based on the dynamic parameter α r and β r , using the second pseudo-random number generator to generate the dynamic confusion factor Γ of the current data block r , the formula is: Γ r =(PRNG2(Seed dyn ||r)·α r +β r )mod 2 32 ; Among them, B represents the plaintext content of the current data block, Seed dyn Represents a dynamic seed, which is generated by a hash function using the session key, block identifier, and session identifier;

[0035] Use the dynamic obfuscation factor to perform bitwise obfuscation operations on the rearranged results to obtain the current round of obfuscation result C r , the formula is: in, Indicates any combination of the four predefined operations: XOR / AND / OR / cyclic shift;

[0036] The current round of confusion result C r As the input of the next round, until the total number of rounds R is reached, the obfuscated data block is obtained.

[0037] Furthermore, the dynamic parameter α r and β r The generation methods include:

[0038] Multiplying the round index r by the first preset offset to generate a first seed, and calling a second pseudo-random number generator to generate a first intermediate value;

[0039] Perform a first modulus operation on the first intermediate value, and add a preset lower limit value to the operation result to obtain the dynamic parameter α r ;

[0040] Multiplying the round index r and the second preset offset to generate a second seed, and calling a second pseudo-random number generator to generate a second intermediate value;

[0041] Perform a second modulus operation on the second intermediate value to obtain a dynamic parameter β r ;

[0042] wherein the dynamic parameter a r and β r is used to generate a non-linear dynamic parameter bound to the content of the data block and the round.

[0043] Further, the generation method of the authentication tag comprises:

[0044] generating a message authentication code (MAC) key K MAC using an HKDF function; wherein the input of the derivation function HKDF comprises a session key, a session unique identifier, and a predefined second tag;

[0045] calculating an authentication tag Tag using an HMAC algorithm on the obfuscated data block B confused , to obtain a first authentication tag, and the formula is: Tag = HMAC(K MAC , B confused || Timestamp); wherein Timestamp represents a time stamp.

[0046] Further, the authentication tag and the time stamp are used to verify the decrypted data, comprising:

[0047] calculating the time difference between the time stamp of the encrypted data block in the decrypted data and the time stamp of the data reception, and if the time difference is greater than a preset time threshold, marking the encrypted data block as an invalid data block; wherein the encrypted data block is an obfuscated data block in the decrypted data;

[0048] generating an authentication tag of the encrypted data block according to the generation method of the authentication tag, to obtain a second authentication tag;

[0049] determining whether the first authentication tag and the second authentication tag are consistent; if yes, marking the encrypted data block as a secure data block; if no, marking the encrypted data block as an invalid data block;

[0050] splicing the encrypted data blocks in a preset order according to the block identifiers, and if there is an invalid data block, marking the spliced file as an invalid file, otherwise obtaining a secure electronic bidding file;

[0051] wherein the preset order represents the logical order of the unique identifiers allocated to each data block by the sending end when the electronic bidding file is segmented.

[0052] The second aspect of the present application provides an electronic bidding file encryption transmission system, comprising:

[0053] a data segmentation module, configured to segment an electronic bidding file of a sending end into a plurality of data blocks, and allocate a unique identifier to each data block;

[0054] A parameter generation module is configured to generate a permutation table and a round key sequence according to a session key and a data block identifier, wherein the session represents a communication interaction process of an electronic bidding file;

[0055] A data encryption module is configured to perform a multi-round dynamic confusion operation on the data block, wherein each round of operation includes a bit operation based on the round key sequence and a byte position rearrangement based on the permutation table, to obtain a confused data block;

[0056] A data sending module is configured to generate an authentication tag for the confused data block, and send the authentication tag to a receiving end after being bound with a timestamp, a block identifier, a session identifier and the confused data block;

[0057] A decryption verification module is configured to perform an inverse decryption operation on the confused data block based on the multi-round dynamic confusion operation at the receiving end, to obtain decrypted data, and verify the decrypted data according to the authentication tag and the timestamp.

[0058] A third aspect of the present application provides a storage medium, comprising:

[0059] A computer readable storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the electronic bidding file encryption transmission method according to the first aspect, and specifically includes:

[0060] An electronic bidding file of a sending end is divided into a plurality of data blocks and assigned with unique identifiers;

[0061] A permutation table and a round key sequence are generated according to a session key and a data block identifier;

[0062] A multi-round dynamic confusion operation including a bit operation and a byte position rearrangement is performed on the data block to generate a confused data block;

[0063] An authentication tag is generated and sent to a receiving end after being bound with a timestamp, a block identifier, a session identifier and the confused data block;

[0064] An inverse decryption operation is performed at the receiving end, and decrypted data is verified based on the authentication tag and the timestamp.

[0065] Compared with the prior art, the present application has the following beneficial effects:

[0066] At the encryption algorithm level, the application constructs a new encryption system of "dynamic parameters + customized confusion". Unlike the traditional encryption method using a fixed round function, the application dynamically generates a unique permutation table for each data block, and introduces independent dynamic parameters for each round of confusion, combines the round key with the confusion factor related to the data content, and forms a dynamic encryption mode of "one block one permutation, one round one transformation", so that the encryption rules of different data blocks and different rounds are completely independent and unpredictable, effectively resisting common means such as differential cryptanalysis and dictionary attack, and fundamentally breaking the regularity defect of static encryption algorithm. At the same time, the superposition of multi-round iteration, byte rearrangement and nonlinear transformation realizes multi-layer confusion diffusion at the bit, byte and block levels, greatly increasing the analysis difficulty of the attacker.

[0067] At the key management and security verification level, the application constructs a full-link security protection system. The session key is generated by the Elliptic Curve Diffie-Hellman protocol negotiation, and the two-way identity authentication is combined with the digital certificate, solving the problem of being vulnerable to man-in-the-middle attack in the transmission process; the HKDF key derivation function is used to realize key layering, enhancing the security of key usage separation. Pseudo-random padding and padding length verification are used when data is blocked, avoiding the risk of boundary leakage, and being more difficult to be reverse analyzed than traditional fixed padding; the binding mechanism of authentication label and timestamp forms a double verification of "content fingerprint + time window", which not only ensures that the data has not been tampered with, but also resists replay attacks, filling the gap in the freshness verification of the prior art. In addition, the single use of the session key and the temporary key pair destruction strategy realize the forward security, that is, even if the long-term private key is leaked, it cannot be traced back to the historical session, significantly improving the anti-attack ability of the system. BRIEF DESCRIPTION OF DRAWINGS

[0068] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, below will briefly introduce the drawings needed to be used in the embodiments or prior art description, obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0069] Figure 1 A framework schematic diagram of an electronic bidding file encryption transmission system provided by the application;

[0070] Figure 2 A flowchart schematic diagram of an electronic bidding file encryption transmission method provided by the application;

[0071] Figure 3 A flowchart schematic diagram of a multi-round dynamic confusion operation provided by the application. DETAILED DESCRIPTION

[0072] The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0073] The electronic bidding document encryption transmission method provided in the embodiment of the present application can be applied to Figure 1 The electronic bidding document encryption transmission system shown in FIG. Figure 1 As shown, the system includes a data segmentation module, a parameter generation module, a data encryption module, a data transmission module and a decryption verification model, and the modules are communicatively connected, wherein:

[0074] A data segmentation module is used to segment the electronic bidding document of the sending end into multiple data blocks and assign a unique identifier to each data block;

[0075] a parameter generation module, configured to generate a permutation table and a round key sequence based on a session key and a data block identifier, wherein the session represents a communication interaction process of an electronic bidding document;

[0076] A data encryption module is used to perform multiple rounds of dynamic obfuscation operations on the data block, where each round of operations includes bit operations based on the round key sequence and byte position rearrangement based on the permutation table to obtain an obfuscated data block;

[0077] A data sending module is used to generate an authentication tag for the obfuscated data block, and bind the authentication tag with the timestamp, block identifier, session identifier, and obfuscated data block before sending the tag to the receiving end;

[0078] The decryption verification module is used to perform reverse decryption operations on the obfuscated data block based on multiple rounds of dynamic obfuscation operations at the receiving end to obtain decrypted data, and verify the decrypted data based on the authentication tag and timestamp.

[0079] To address technical issues such as data tampering, unauthorized access, and replay attacks that exist in the prior art during the transmission of electronic bidding documents, the present invention provides a method for encrypted transmission of electronic bidding documents. This method ensures the confidentiality, integrity, and freshness of electronic bidding documents during transmission through multiple rounds of dynamic obfuscation, session key negotiation, and timestamp authentication mechanisms. Based on this, the specific implementation steps are described in detail below with reference to the accompanying figures.

[0080] like Figure 2 As shown, the method for encrypting and transmitting electronic bidding documents provided in the embodiment of the present application includes the following steps:

[0081] S101. Divide the electronic bidding document of the sending end into multiple data blocks and assign unique identifiers.

[0082] First, it is judged whether the electronic bidding file size FS is greater than the preset file size: if greater, it is divided into data blocks according to the preset data block size BS; if not greater, the file is processed as a single data block.

[0083] In some implementations, when the size of the last data block is smaller than BS, padding processing is required, which can specifically include:

[0084] Calculate the padding length: PL = (BS - (FS mod BS)) mod BS, to ensure that the size of the padded data block is equal to BS;

[0085] Generate pseudo-random bytes: generate PL pseudo-random bytes Padding through the pseudo-random number generator PRNG1(SK||BlockID), and concatenate them to the end of the data block, to ensure that the padding between different sessions and different blocks is unpredictable, preventing attackers from inferring the file structure through the padding pattern.

[0086] It should be noted that the padding block structure is "plaintext data||Padding||Lp", where Lp is the big-endian encoding of the padding length, which can be fixed as 2 bytes, and the receiving end can verify the padding integrity by analyzing Lp.

[0087] For example, if FS = 5KB, BS = 4KB, the first data block is 4KB plaintext, BlockID = 001, the second data block is 1KB plaintext + 3KB padding, BlockID = 002, and the padding length PL = 3072 is obtained by calculation, and the Lp encoding is 0x0C00 (big-endian). The receiving end can verify the padding integrity by analyzing Lp, and if the actual padding length does not match the decoded PL, it can be determined that the data has been tampered with.

[0088] S102, generate a permutation table and a round key sequence according to the session key and the data block identifier.

[0089] First, initialize the key agreement protocol:

[0090] The tenderer and the bidder perform a temporary Diffie-Hellman key exchange protocol based on a predefined elliptic curve cryptography parameter set; wherein,

[0091] The predefined elliptic curve cryptography parameter set includes a base point G, a prime order n, a cofactor h, and is selected from a standard elliptic curve family; both parties exchange and verify digital certificates before communication, and the certificate contains a long-term public key PK 招标 , PK 投标 , and is issued by a trusted certificate authority.

[0092] Then, a temporary key pair is generated: the tenderer generates a temporary key pair (d 招标 , Q 招标 ), the bidder generates a temporary key pair (d 投标 , Q 投标 ), and the two parties exchange the public keys Q 招标 , Q 投标 through a secure channel;

[0093] Then the two parties calculate a shared secret point: Z 招标 =d 招标 ·Q 投标 , Z 投标 =d 投标 ·Q 招标 ; wherein · represents elliptic curve scalar multiplication, and since the elliptic curve scalar multiplication satisfies the commutative law, the point calculated by the two parties on the same elliptic curve is called a common secret point Z 招标 , and the x-coordinate x z is extracted as the original key material;

[0094] A session key SK is derived through an HKDF function, and the input parameters include the original key material, a first label, and pre-defined identifiers of the two parties.

[0095] It should be noted that the tenderer and the bidder in the embodiment represent a receiving end and a sending end.

[0096] In an implementation, derivation of the session key and identity authentication can include:

[0097] An input parameter is defined: a salt value Salt = Nonce 招标 || Nonce 投标 || T 协商 ; wherein Nonce 招标 and Nonce 投标 are random numbers generated by the two parties, and T 协商 is a key agreement timestamp;

[0098] A derivation information Info = “electronic bidding session key” || tenderer pre-defined identifier || bidder pre-defined identifier is defined; wherein “electronic bidding session key” is a pre-defined first label, and can also be pre-defined as other characters, and the tenderer pre-defined identifier and the bidder pre-defined identifier can be tenderer codes and bidder codes; similarly, the receiving end pre-defined identifier can be a receiving end code, and the sending end pre-defined identifier can be a sending end code, for example, the receiving end code adopts a “R-equipment serial number” form (such as R-01 representing a No. 1 receiving device), and the sending end code adopts a “S-equipment serial number” form (such as S-10 representing a No. 10 sending device);

[0099] Session key is generated by HMAC-based key derivation function: SK = HKDF(x z , Salt, Info, L); where L represents the target length of the session key.

[0100] Then both sides use the long-term private key to sign the temporary public key and exchange the verification signature:

[0101] σ 招标 = Sign(d 招标长期 , Q 招标 || Q 投标 ), σ 投标 = Sign(d 投标长期 , Q 投标 || Q 招标 ); σ 招标 represents

[0102] The digital signature generated by the tenderer, σ 投标 represents the digital signature generated by the bidder, d 招标长期 represents the long-term private key of the tenderer, d 投标长期 represents the long-term private key of the bidder, used for identity binding, Sign() represents an asymmetric encryption signature algorithm, such as ECDSA or RSA-PSS, which generates a signature by using a private key on data;

[0103] If the signature verification fails, the session is aborted.

[0104] The shared secret point is a unique public point calculated by the temporary private key and the temporary public key of the other party on the elliptic curve, and the mathematical essence is the invariance of the commutative law of scalar multiplication, which ensures that both parties can reach a key consensus without transmitting the private key. The mechanism is the core link of the session key negotiation of the application, which combines standard elliptic curve parameters and digital certificate authentication, ensures the security of cryptography, and realizes the engineering identity authentication, thereby providing a secure key root for subsequent dynamic confusion encryption.

[0105] It should be noted that the session key SK is only valid for the current transmission session, and is destroyed immediately after the session ends, so even if the attacker obtains the long-term private key, the historical session key cannot be backtracked and cracked.

[0106] In some implementations, the permutation table and the round key sequence generation rule are:

[0107] The input SK, BlockID and session unique identifier are input to the hash function to generate the block-level seed, and the expression is:

[0108] Seed block = SHA3-256(SK||LE(BlockID)||SessionID); where LE(BlockID) represents

[0109] BlockID is converted into a little-endian byte stream, SHA3-256() represents the 256 version of the third generation hash algorithm, Seed block represents a block-level seed, and SessionID represents a session identifier, which can be generated by combining a tenderer temporary public key, a bidder temporary public key, a timestamp Timestamp, and a random array;

[0110] A pseudo-random number generator PRNG2 is initialized by using the block-level seed, and a permutation table P is output, and the expression is: P[i] = (PRNG2(SK||BlockID) * i) mod BS, so that the new position P[i] of the i-th byte after permutation is obtained.

[0111] A round key K r = PRNG2(SK||r) mod 2 32 , wherein r is a round index, and R is the total number of rounds.

[0112] It should be noted that the application binds the session key SK, the unique identifier BlockID of the data block and the session identifier SessionID to the hash function SHA3-256, dynamically generates the block-level seed Seed block , ensures that the permutation table of each data block and the round key have session uniqueness and data block independence, and completely eliminates the security risk of static parameters;

[0113] The pseudo-random number generator initialized based on the block-level seed generates a dynamic permutation table for each data block, the permutation rule realizes unpredictable rearrangement of byte positions through linear transformation, and the round key is independently generated according to the round, the key range is constrained through modular operation, dynamic isolation of multi-round permutation is formed, so that an attacker cannot crack the encryption logic through statistical correlation;

[0114] In addition, the introduction of SessionID guarantees the parameter isolation between different sessions, and the deep binding of SK and BlockID ensures that even the same file will generate completely different permutation parameters in multiple transmissions, so that the forward security and anti-replay attack capability are considered.

[0115] S103, performing a multi-round dynamic permutation operation on the data block.

[0116] As shown in Figure 3 , each round of operation includes bit operation and byte rearrangement, and the specific process is as follows:

[0117] Dynamic parameters α r and β r are generated: seeds are generated through a round index r and a preset offset, intermediate values are generated by calling PRNG2, and are obtained through modular operation;

[0118] Determine input B input : the first round is the original data block, and the subsequent rounds are the output of the previous round;

[0119] Bit operation: B shift = (B input XOR K r )<<<s, where s is the number of shift bits;

[0120] Byte rearrangement: rearrange B permuted according to the permutation table P[i] to obtain B shift [P[i]], so as to destroy the byte correlation of the plaintext data;

[0121] Dynamic confusion: based on dynamic parameters α r and β r , a second pseudo-random number generator is used to generate a dynamic confusion factor Γ r for the current data block, and the formula is: Γ r = (PRNG2(Seed dyn ||r)·α r + β r )mod 2 32 ;

[0122] where B represents the plaintext content of the current data block, Seed dyn is a dynamic seed generated by a hash function from the session key, block identifier, and session identifier, and the expression is: Seed dyn = SHA3-256(SK||LE(BlockID)||SessionID);

[0123] The current round result is obtained by a combination of predefined XOR / AND / OR / cyclic shift operations Γ r ; where B represents the plaintext content of the current data block, may represent a combination of XOR + cyclic shift, or other predefined operations;

[0124] Repeat until R rounds are completed to obtain the final confused data block.

[0125] For example, the dynamic parameters α r and β r may be bound to the round to ensure that the confusion rule changes dynamically every round and enhances the anti-analysis capability, and the generation expression can be: α r = PRNG2(r·8)mod 2 16 +1, β r = PRNG2(r·8+4)mod 2 32 .

[0126] In the present application, through the dynamic parameter generation mechanism of round binding, the calculation rule of the confusion factor Γ r is dynamically changed and unpredictable;

[0127] Through multi-level confusion superposition (bit operation, byte rearrangement, nonlinear factor disturbance), deep security protection is realized; among them, bit operation can destroy local features at the bit level, and permutation table driven byte rearrangement can eliminate byte sequence correlation, and the nonlinear operation (XOR / AND / OR / cyclic shift combination) of the dynamic confusion factor Γ r further introduces the double randomness of data block content and round, forming a multi-dimensional confusion diffusion effect;

[0128] Since the multi-round iteration design greatly improves the ability to resist differential analysis and statistical attacks through dynamic rule superposition, even if the attacker cracks a single round of logic, it cannot deduce the correlation rules across rounds or across data blocks.

[0129] S104, generate an authentication tag and bind it with a timestamp, a block identifier, a session identifier, and a confusion data block and send it.

[0130] Derive the message authentication code key K MAC through the HKDF function, the expression is: K MAC =HKDF(SK,SessionID,Info=”MAC”); Where “MAC” represents a predefined second label, which can also be predefined as other characters;

[0131] Calculate the authentication tag Tag of the confusion data block B confused using the HMAC algorithm, the expression is: Tag = HMAC(K MAC , B confused ||Timestamp);

[0132] Finally, the data block identifier BlockID, Tag, timestamp Timestamp, session identifier are sent to the receiving end together with the confusion data block as a data packet.

[0133] In some implementations, the timestamp is used to resist replay attacks, and the data needs to be integrity checked before sending.

[0134] S105, the receiving end decrypts and verifies the data in reverse;

[0135] Timestamp verification: Calculate the difference between the receiving time and the timestamp, and if it exceeds the preset threshold, mark the data block as expired;

[0136] Reverse decryption: in the reverse order of the rounds, perform dynamic parameter reverse calculation, byte reverse rearrangement and bit operation reverse operation to restore the original data block;

[0137] Authentication tag verification: the receiving end generates a second authentication tag by the same rule, compares it with the received first authentication tag, and if they are consistent, splices the file according to the BlockID, otherwise marks tampering.

[0138] Exemplarily, the specific steps of reverse decryption include:

[0139] First, after receiving the transmission data packet, the receiving end parses the data packet into the following parts: Packet = BlockID || Timestamp || ciphertext block || MAC || SessionID; wherein the ciphertext block CR represents the encrypted data after multiple rounds of confusion;

[0140] Obtain the negotiated session key SK from the secure storage, and derive the decryption key and parameters according to the session key, including:

[0141] MAC key: K MAC ’ = HKDF(SK, Salt = SessionID, Info = "MAC");

[0142] Permutation table seed Seed 置换表 : Seed 置换表 = SHA3-256(SK || LE(BlockID) || SessionID);

[0143] Round key sequence: according to the round r = R, R-1,..., 1, call PRNG2 to generate the round key in reverse: K r ’ = PRNG2(SK || r) mod 2 32 ;

[0144] Then, perform the reverse dynamic confusion round by round:

[0145] First, ensure that the total number of rounds R is consistent with the encryption, and then execute:

[0146] Input the current round ciphertext: the Rth round input is the received ciphertext block CR (i.e. the received encrypted confusion data block), and the subsequent rounds input the output C r-1 of the previous round;

[0147] Taking the Rth round as an example, the reverse operation includes:

[0148] (1) Generate the same dynamic confusion factor Γ r ’ as encryption:

[0149] Calculate the dynamic seed Seed dyn = SHA3-256(SK || LE(BlockID) || SessionID) according to the data parsed from the data packet with the session key;

[0150] Γ r ’ = (PRNG2(Seeddyn||r) · a r + b r ) mod 2 32 ;

[0151] Then reverse the operation:

[0152] (2) Perform inverse permutation table rearrangement: according to the permutation table P[i] generated during encryption, generate the inverse permutation table P -1 [i], and satisfy P -1 [P[i]] = i, and perform: B shift ’[P -1 [i]] = B permuted ’[i];

[0153] (3) Perform inverse cyclic shift:

[0154] Get the shift number s during encryption, such as through K r mod 8 recovery, then perform cyclic right shift: B xor ’ = B shift ’>>>s; where >>> represents cyclic right shift;

[0155] (3) Perform inverse round key XOR: B input ’ = B xor ’⊕K r ; Note that the inverse operation of XOR operation is itself;

[0156] Finally, take the current round output B input ’ as the input of the next round r-1, and when all R rounds are completed, the decrypted data block B decrypted is obtained.

[0157] Then reorganize and remove the padding of the decrypted data block to restore it to the original plaintext, i.e. the data block without padding characters:

[0158] Read the padding length field at the end of the decrypted data block: Lp = B decrypted [BS-1];

[0159] Cut the valid plaintext data B plain : B plain = B decrypted [0:BS-Lp-1].

[0160] Verify the validity of the valid plaintext:

[0161] (1) calculate the difference between the receiving time and the parsed timestamp, and compare whether the difference is greater than a preset threshold; if yes, it indicates that the data transmission is timed out, possibly intercepted and replayed by a man-in-the-middle or the network link is abnormal to cause too high delay, thus marking the data block as expired data and marking the electronic bidding file as an invalid file; if no, the data block is kept;

[0162] (2) calculate a local authentication tag and mark it as a second authentication tag: MAC2=HMAC(K MAC ’,B plain ||Timestamp)

[0163] If the second authentication tag is the same as the first authentication tag, it indicates that the data is safe, and the data block is kept; if the two are not the same, the data block is marked as tampered, the electronic bidding file is marked as an invalid file, and the current session is terminated, and the session key SK is re-negotiated;

[0164] When all data blocks are verified to be valid, the data blocks are arranged in order according to the identifiers to obtain a safe electronic bidding file.

[0165] The embodiment of the application further provides a computer readable storage medium, including instructions, when the instructions are run on a computer, the computer executes any of the above methods.

[0166] Therefore, the method of the application can be stored in a computer readable storage medium if it is realized in the form of a software function module and sold or used as an independent product. Based on such understanding, the technical solutions of the embodiments of the application essentially or the parts that make contributions to the prior art 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.) or a processor to execute all or part of the steps of the methods described in the embodiments of the application. The storage medium that stores the computer software product includes a U disk, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, and various media that can store program codes.

[0167] Some data in the above formula are calculated by removing the dimension and taking the numerical value, the formula is obtained by software simulation of a large amount of collected data to obtain a formula closest to the real situation, and the preset parameters and the preset threshold in the formula are set by a person skilled in the art according to the actual situation or obtained by a large amount of data simulation.

[0168] Working principle of the application:

[0169] The electronic bidding document encryption transmission method of the present invention is divided into three core stages: sending end processing, secure transmission and receiving end verification. At the sending end, the electronic bidding document is first divided into multiple data blocks according to preset rules. If the last data block is less than the preset size, it is padded with pseudo-random bytes to ensure that the size of each data block is uniform and a unique identifier is assigned. Subsequently, the tendering party and the bidder negotiate the session key based on elliptic curve cryptography technology, generate a shared secret point through a temporary key pair, and then obtain the session key through a key derivation function. The key is only valid in the current session to ensure forward security. The session key and data block information are used to dynamically generate a permutation table and a round key sequence, and multiple rounds of obfuscation operations are performed on each data block. Each round introduces nonlinear transformations through bit operations, byte rearrangement and dynamic parameters to form an obfuscated data block. Finally, an authentication tag is generated for the obfuscated data block, which is bound to information such as a timestamp and a block identifier and sent to the receiving end.

[0170] After receiving the data, the receiver first verifies the data's expiration using the timestamp to prevent replay attacks. It then reverse-generates the permutation table, round keys, and dynamic parameters required for decryption based on the session key and data block information, recovering the original data block round by round through the reverse encryption process. After decryption, the authentication tag is recalculated and compared with the sender's tag to verify data integrity. If all verifications pass, the data blocks are concatenated in block identifier order, and padding is removed to restore the original electronic bidding document. If any verification step fails, the data is marked as tampered with or expired, and the process terminates.

[0171] The above embodiments are only used to illustrate the technical method of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.

Claims

1. A method for encrypting and transmitting electronic bidding documents, characterized in that: include: Segmenting the electronic bidding document of the sending end into a plurality of data blocks, and assigning a unique identifier to each data block to obtain a data block identifier; A permutation table and a round key sequence are generated based on the session key and the data block identifier; wherein the session key is used to encrypt the session for transmitting the electronic bidding document, and the generation method includes: The receiver and the sender initialize the key agreement protocol using the Diffie-Hellman key exchange protocol based on a predefined set of elliptic curve cryptographic parameters. The receiving end and the sending end generate temporary key pairs respectively, including the temporary private key and temporary public key of the receiving end, and the temporary private key and temporary public key of the sending end, and the temporary public keys are exchanged through an encrypted channel; Perform elliptic curve scalar multiplication on the temporary private key of the receiver and the temporary public key of the sender to calculate the shared secret point of the receiver; Perform elliptic curve scalar multiplication on the temporary private key of the sender and the temporary public key of the receiver to calculate the shared secret point of the sender; Extract the x coordinate value x of the shared secret point between the receiver and the sender z , obtain the original key material; Generate a session key SK using an HMAC-based extraction and expansion key derivation function HKDF; wherein the input of the derivation function HKDF includes the original key material, the predefined first tag, the receiver predefined identifier, and the sender predefined identifier, and the HMAC represents a hash operation message authentication code algorithm; Performing multiple rounds of dynamic obfuscation operations on the data block to obtain an obfuscated data block, where each round of dynamic obfuscation operations includes bit operations based on a round key sequence and byte position rearrangement based on a permutation table; Generate an authentication tag for the obfuscated data block, and bind the authentication tag with the timestamp, block identifier, session identifier, and obfuscated data block and send it to the receiving end; The receiving end performs reverse decryption operations on the obfuscated data blocks based on multiple rounds of dynamic obfuscation operations to obtain decrypted data, and verifies the decrypted data based on the authentication tag and timestamp.

2. The method for encrypting and transmitting electronic bidding documents according to claim 1, wherein: The electronic bidding document of the sending end is divided into multiple data blocks, including: Determine whether the size of the electronic bidding document FS is greater than the preset file size; if so, divide the electronic bidding document into FS / BS data blocks; otherwise, the electronic bidding document will be processed as a single data block; Represents the ceiling operator; When the size of the last data block after segmentation is smaller than the preset data block size BS, pseudo-random bytes are generated according to the following formula and are concatenated after the last data block: PL=(BS-(FS mod BS)) mod BS; Padding=PRNG1(SK||BlockID) mod 256 PL ; Wherein, mod represents a modulo operation, PL represents a padding length, Padding represents a pseudo-random byte, PRNG1() represents a first pseudo-random number generator, SK represents a session key, BlockID represents a data block identifier, and || represents a data concatenation operation.

3. The method for encrypting and transmitting electronic bidding documents according to claim 2, wherein: The generation method of the permutation table and the round key sequence includes: Input the session key, the data block identifier and the session unique identifier into a hash function to generate a block-level seed; Initialize the second pseudo-random number generator PRNG2() based on the block-level seed, and use the second pseudo-random number generator to output a permutation table and a round key sequence, and the generation rule is: P[i]=(PRNG2(SK||BlockID)×i) mod BS(i=0,1,…,BS-1); where P[i] is the index value of the i-th position in the permutation table P, indicating the new position of the i-th byte in the data block after obfuscation; K r =PRNG2(SK||r) mod 2 32 (r=1,2,…,R); where K r Represents the key of the rth round in the round key sequence, R represents the total number of rounds, and r represents the round index.

4. The method for encrypting and transmitting electronic bidding documents according to claim 3, wherein: The function of the multiple rounds of dynamic obfuscation operation is: Use the second pseudo-random number generator to generate the dynamic parameter α of the rth round r and β r ; Determine the input B of the current round of dynamic obfuscation operation input : If the round index r=1, the input is the current data block; If the round index r>1, the input is the output C of the previous round r-1 ; XOR the current round key K r with the input B input and then perform a circular left shift to obtain the preliminary confusion result B shift , and the expression is: B shift = (B input ⊕ K r ) <<< s; where s represents the shift bit number, and <<< represents a circular left shift; Rearrange the byte positions according to the permutation table P[i] of the current data block to obtain the rearrangement result B permuted [i], the formula is: B permuted [i]=B shift [P[i]]; Based on the dynamic parameter α r and β r , using the second pseudo-random number generator to generate the dynamic confusion factor Γ of the current data block r , the formula is: Γ r =(PRNG2(Seed dyn ||r)·α r +β r ) mod 2 32 ; Among them, B represents the plaintext content of the current data block, Seed dyn Represents a dynamic seed, which is generated by a hash function using the session key, block identifier, and session identifier; Use the dynamic obfuscation factor to perform bitwise obfuscation operations on the rearranged results to obtain the current round of obfuscation result C r , the formula is: C r =B permuted Γ r ;in, Indicates any combination of the four predefined operations: XOR / AND / OR / cyclic shift; The result of the current round of obfuscation is used as the input of the next round until the total number of rounds R is reached to obtain the obfuscated data block.

5. The method for encrypting and transmitting electronic bidding documents according to claim 4, characterized in that: The dynamic parameter α r and β r The generation methods include: Multiplying the round index r by the first preset offset to generate a first seed, and calling a second pseudo-random number generator to generate a first intermediate value; Perform a first modulus operation on the first intermediate value, and add a preset lower limit value to the operation result to obtain the dynamic parameter α r ; Multiplying the round index r and the second preset offset to generate a second seed, and calling a second pseudo-random number generator to generate a second intermediate value; Perform a second modulus operation on the second intermediate value to obtain a dynamic parameter β r .

6. The method for encrypting and transmitting electronic bidding documents according to claim 1, wherein: The authentication tag is generated in the following manner: Use HKDF function to generate message authentication code MAC key K MAC ;Wherein the input of the HKDF function includes a session key, a session unique identifier, and a predefined second tag; Use the HMAC algorithm to encrypt the obfuscated data block B confused Calculate the authentication tag Tag and get the first authentication tag. The formula is: Tag=HMAC(K MAC ,B confused ||Timestamp); where Timestamp indicates a timestamp.

7. The method for encrypting and transmitting electronic bidding documents according to claim 1, wherein: The verifying the decrypted data according to the authentication tag and the timestamp includes: Calculate the time difference between the timestamp of the encrypted data block in the decrypted data and the timestamp of the data received. If the time difference is greater than a preset time threshold, mark the encrypted data block as an invalid data block; wherein the encrypted data block is the obfuscated data block in the decrypted data; generating an authentication tag for the encrypted data block according to the authentication tag generation method to obtain a second authentication tag; Determine whether the first authentication tag and the second authentication tag are consistent; if yes, mark the encrypted data block as a safe data block; if not, mark the encrypted data block as an invalid data block; The encrypted data blocks are spliced ​​together according to the block identifiers. If there are invalid data blocks, the spliced ​​file will be marked as an invalid file. Otherwise, a secure electronic bidding document will be obtained.

8. An electronic bidding document encryption transmission system, applied to an electronic bidding document encryption transmission method according to any one of claims 1 to 7, characterized in that: include: A data segmentation module is used to segment the electronic bidding document of the sending end into multiple data blocks and assign a unique identifier to each data block; The parameter generation module is used to generate a permutation table and a round key sequence based on a session key and a data block identifier, wherein the session represents a communication interaction process of an electronic bidding document; the session key is used to encrypt the session for transmitting the electronic bidding document, and the generation method includes: The receiver and the sender initialize the key agreement protocol using the Diffie-Hellman key exchange protocol based on a predefined set of elliptic curve cryptographic parameters. The receiving end and the sending end generate temporary key pairs respectively, including the temporary private key and temporary public key of the receiving end, and the temporary private key and temporary public key of the sending end, and the temporary public keys are exchanged through an encrypted channel; Perform elliptic curve scalar multiplication on the temporary private key of the receiver and the temporary public key of the sender to calculate the shared secret point of the receiver; Perform elliptic curve scalar multiplication on the temporary private key of the sender and the temporary public key of the receiver to calculate the shared secret point of the sender; Extract the x coordinate value x of the shared secret point between the receiver and the sender z , obtain the original key material; Generate a session key SK using an HMAC-based extraction and expansion key derivation function HKDF; wherein the input of the derivation function HKDF includes the original key material, the predefined first tag, the receiver predefined identifier, and the sender predefined identifier, and the HMAC represents a hash operation message authentication code algorithm; A data encryption module is used to perform multiple rounds of dynamic obfuscation operations on the data block, where each round of operations includes bit operations based on the round key sequence and byte position rearrangement based on the permutation table to obtain an obfuscated data block; A data sending module is used to generate an authentication tag for the obfuscated data block, and bind the authentication tag with the timestamp, block identifier, session identifier, and obfuscated data block before sending the tag to the receiving end; The decryption verification module is used to perform reverse decryption operations on the obfuscated data block based on multiple rounds of dynamic obfuscation operations at the receiving end to obtain decrypted data, and verify the decrypted data based on the authentication tag and timestamp.

9. A storage medium, characterized in that include: A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method for encrypting and transmitting electronic bidding documents according to any one of claims 1 to 8 are implemented, specifically including: Segmenting the electronic bidding document at the sending end into multiple data blocks and assigning unique identifiers; A permutation table and a round key sequence are generated based on the session key and the data block identifier; the session key is used to encrypt the session for transmitting the electronic bidding document, and the generation method includes: The receiver and the sender initialize the key agreement protocol using the Diffie-Hellman key exchange protocol based on a predefined set of elliptic curve cryptographic parameters. The receiving end and the sending end generate temporary key pairs respectively, including the temporary private key and temporary public key of the receiving end, and the temporary private key and temporary public key of the sending end, and the temporary public keys are exchanged through an encrypted channel; Perform elliptic curve scalar multiplication on the temporary private key of the receiver and the temporary public key of the sender to calculate the shared secret point of the receiver; Perform elliptic curve scalar multiplication on the temporary private key of the sender and the temporary public key of the receiver to calculate the shared secret point of the sender; Extract the x coordinate value x of the shared secret point between the receiver and the sender z , obtain the original key material; Generate a session key SK using an HMAC-based extraction and expansion key derivation function HKDF; wherein the input of the derivation function HKDF includes the original key material, the predefined first tag, the receiver predefined identifier, and the sender predefined identifier, and the HMAC represents a hash operation message authentication code algorithm; performing multiple rounds of dynamic obfuscation operations including bit operations and byte position rearrangement on the data block to generate an obfuscated data block; Generate an authentication tag and bind it to the timestamp, block identifier, session identifier, and obfuscated data block before sending it to the receiving end; The receiving end performs the reverse decryption operation and verifies the decrypted data based on the authentication tag and timestamp.

Citation Information

Patent Citations

  • Method and system for chaotic digital signature, encryption, and authentication

    US20050271207A1

  • A method and a system for transmitting and receiving the data

    WO2009000209A1