Security encryption system for data subpackaging and packaging
By slicing, encrypting and dynamic key management of data streams, the problem of unauthorized access or tampering of data packets during transmission is solved, the security and efficiency of data transmission is improved, network changes are adapted to ensure data integrity.
Patent Information
- Application Number
- CN202510774997.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-08-12
AI Technical Summary
Existing data subcontracting and group packet encryption systems are difficult to effectively deal with packet-level security risks when facing security threats from emerging technologies such as the Internet of Things and edge computing, especially when they may be unauthorized access or tampered with during transmission.
By dividing the big data stream into data slices according to specific rules, dynamically adjusting the slice size, encrypting with different encryption keys, and using dynamic key management mechanism and redundant verification and error correction technology, we ensure the security and integrity of the data during transmission.
It achieves the security, reliability and efficiency of data transmission, can adapt to changes in network conditions, prevent unauthorized access and tampering, and ensure the privacy and integrity of data.
Smart Images

Figure CN120474813A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data subpackaging and packet grouping security encryption, and in particular relates to a data subpackaging and packet grouping security encryption system. Background Art
[0002] Data packetization and repackaging are technologies used to protect the integrity, confidentiality, and tamper-proofing of data during transmission. They segment large data blocks into smaller packets for transmission to prevent data loss or corruption during transmission and improve network efficiency. Each data packet typically includes a header containing control information for the packet and the data itself. At the receiving end, the data packets are reassembled into the original data. During the repackaging process, the system uses information such as sequence numbers added during packetization to restore the data to its original order. During the packetization and repackaging process, each data packet is encrypted to ensure confidentiality and prevent unauthorized access or tampering. Encryption methods may include symmetric encryption (such as AES) and asymmetric encryption (such as RSA). Encryption ensures that even if a data packet is intercepted during transmission, an attacker cannot read its contents. In addition to encryption, hashing algorithms (such as the SHA family) are often used to ensure that the data packet has not been tampered with during transmission. The receiver uses the same hashing algorithm to verify the integrity and integrity of the data packet.
[0003] However, although the secure encryption system for data subpackaging and grouping provides security in many aspects, it may still have some defects and challenges. With the popularization of emerging technologies such as the Internet of Things and edge computing, the security threats faced by data packets during transmission are gradually increasing, and existing encryption technologies often cannot effectively deal with security risks at the data packet level. Summary of the Invention
[0004] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a secure encryption system for data subpackaging and packaging, which improves the security, reliability and efficiency of data transmission through slicing, encryption, dynamic key management and data packaging mechanisms.
[0005] The technical solution adopted by the present invention to solve its technical problem is:
[0006] A secure encryption system for data subpackaging and grouping, comprising:
[0007] The data slicing module is used to divide the large data stream into several data slices according to specific size rules. The size of each slice is dynamically adjusted according to network bandwidth, transmission delay, and storage limitations.
[0008] The encryption processing module is used to encrypt each slice using an encryption algorithm to ensure that the data is not stolen or tampered with by unauthorized access during transmission. Through the dynamic key management mechanism, different data slices are encrypted with different encryption keys;
[0009] Dynamic key management module, used to automatically generate, update and distribute keys according to predetermined rules or real-time system feedback. The key management system generates, distributes and synchronizes keys based on public key infrastructure or symmetric encryption key exchange protocols;
[0010] The data packaging module is used to reassemble all data slices transmitted to the receiving end and restore the original data. During the packaging process, the integrity of the data slices is first tested and assembled in the correct order;
[0011] Error detection and correction module, used to detect whether the data slice is complete or errors occur during data transmission, and adopt redundancy check and error correction technology;
[0012] The secure transmission protocol module is used to provide end-to-end encryption protection for the data transmission process and ensure the privacy, integrity and non-repudiation of the data.
[0013] As a preferred method, the large data stream is divided into several data slices according to specific size rules. The size of each slice is dynamically adjusted according to network bandwidth, transmission delay, and storage limitations as follows:
[0014] When dynamically resizing each slice, the following formula is used:
[0015]
[0016] Where C is the size of each data slice;
[0017] B is the bandwidth;
[0018] D is the delay;
[0019] The transmission cycle is the data transmission time required by the system;
[0020] S is the storage limit or the maximum size of each slice;
[0021] Assume bandwidth B = 10 Mbps, latency D = 100 ms, transmission period is set to 1 second, storage limit is 1 MB, and the size of each data slice is:
[0022]
[0023] Through the dynamic adjustment mechanism, the size of data slices is automatically optimized according to network conditions and device capabilities.
[0024] As a preference, an encryption algorithm is used to encrypt each slice to ensure that the data is not stolen or tampered with by unauthorized access during transmission. Through a dynamic key management mechanism, different data slices are encrypted with different encryption keys as follows:
[0025] Setting parameters:
[0026] M k : kth data slice;
[0027] K k : encryption key for the kth data slice;
[0028] E: encryption algorithm;
[0029] T k : timestamp of the slice;
[0030] N k : The serial number of the slice;
[0031] S k : Key update cycle;
[0032] The key generation uses a function based on time and slice sequence number, which is:
[0033] K k =H(T k ||N k ||K prev ||Salt)
[0034] Where H is a hash function;
[0035] T k is the current timestamp;
[0036] N k is the serial number of the current data slice;
[0037] K_{\text{prev}} is the encryption key used in the previous slice;
[0038] Salt is a random factor used to increase security;
[0039] After the key is generated, the data slice is encrypted using the key. The formula is:
[0040] C k =E(M k , K k ) Where Ck is the encrypted data slice;
[0041] Mk is the kth data slice;
[0042] K k The encryption key generated for the slice;
[0043] The key update depends on a certain time period or data volume. When a certain threshold is reached, the system automatically generates a new key and replaces the old key. The key is updated once every certain amount of data transmitted or after a certain period of time.
[0044] The system generates a new key every 1MB of data transferred or every 10 minutes. During the transfer process, when a new data slice arrives, the key will be updated as follows:
[0045] K new =H(T current ||N new ||K old ||Salt).
[0046] Preferably, keys are automatically generated, updated, and distributed according to predetermined rules or real-time system feedback. The key management system generates, distributes, and synchronizes keys based on a public key infrastructure or a symmetric encryption key exchange protocol as follows:
[0047] In a PKI system, each entity has a pair of public and private keys. Public keys are issued and verified through digital certificates. The key management system uses the following processes and formulas to generate, distribute, and update keys:
[0048] The public key is generated and distributed by the certificate authority, and user A is set up to generate a pair of public and private keys. And the certificate Cert is issued by CA A ;
[0049] Key pair generation:
[0050]
[0051] Certificate issuance:
[0052] CA’s public key K A Sign and generate certificate Cert A :
[0053] Cert A =CA.Sign(K A )
[0054] Public key distribution:
[0055] Entity A sends the certificate Cert A Distribute to communication party B, communication party B obtains the public key by verifying the certificate; establish B using A's public key K A Encrypt message M, and then A uses the private key Decrypt a message; encrypt:
[0056] C A=E(K A , M)
[0057] Decryption:
[0058]
[0059] Set up A and B to generate a shared key K shared ;
[0060] Public basic information: Both parties disclose p and g;
[0061] Key pair generation:
[0062] A selects private key a and calculates A pub =g a mod p;
[0063] B selects private key b and calculates B pub =g b mod p;
[0064] Exchange public keys:
[0065] A will A pub , sent to B;
[0066] B will B pub Send to A;
[0067] Calculate the shared secret:
[0068] A calculates the shared key B calculates the shared key
[0069] Due to g ab mod p=g ba mod p, so both parties obtain the same shared key K shared ;
[0070] Shared key generation formula:
[0071] Calculation of A:
[0072]
[0073] Calculation of B:
[0074]
[0075] The key is updated or redistributed after a period of time, and the key is updated based on system feedback or predetermined rules;
[0076] When a predetermined time or data transfer volume threshold is reached, the key is updated:
[0077] Knew =H(K shared ||T current ||Salt)
[0078] Where H is the hash function, T current is the current timestamp, and Salt is a random factor;
[0079] Key synchronization:
[0080] After the key is updated, both parties synchronize the new key through a secure channel.
[0081] As a preference, all data slices transmitted to the receiving end are reassembled to restore the original data. During the packet assembly process, the integrity of the data slices is first checked and assembled in the correct order as follows:
[0082] The transmitted data is divided into N slices, each of which usually contains the following information:
[0083] Slice number: indicates the position of the slice in the data stream;
[0084] Slice data: the actual data part;
[0085] Checksum: a checksum value used to verify the integrity of the slice;
[0086] Reorganization process:
[0087] The receiving end first receives one or more data slices, each of which includes a slice number, data content, and a checksum;
[0088] For each received data slice, the receiving end verifies its integrity and uses checksums and hash functions to check whether the data is complete and has not been tampered with.
[0089] Checksum detection formula:
[0090]
[0091] Among them, P received is the received data slice, P calcueeted is the value calculated by the checksum algorithm;
[0092] Set the slice serial number to S i ,The receiving end sorts the slices by sequence number. If the received sequence number is discontinuous or missing, the receiving end requests to retransmit the missing slice;
[0093] After ensuring that all slices are complete and received in the correct order, the receiving end stitches all slices together and restores them to the original data. The slice data is set as P1, P2, ..., P N , the reorganized data D is expressed as:
[0094] D=P1||P2||…||P N
[0095] Among them, || represents data splicing operation;
[0096] Set up original data D orig is divided into N slices, each slice includes a sequence number S i. Data part P i and checksum C i , the formula of the recombination process is expressed as:
[0097] For each slice i:
[0098]
[0099] If all slices are Valid i If true, the data slice is valid;
[0100] According to the sequence number S of each slice i , reorder the slices sequentially to get the correct order:
[0101] S1, S2, ..., S N
[0102] If any slices are missing or out of order, a request is initiated to retransmit the missing or out of order slices;
[0103] All valid and sequentially arranged slice data P i Splice together and restore the original data D orig :
[0104] D orig =P1||P2||…||P N .
[0105] As a preference, during the data transmission process, whether the data slice is complete or an error occurs is detected, and redundant check and error correction technology is used as follows:
[0106] Each data slice is usually attached with a checksum value to verify the integrity of the data. The transmitted data slice is set as P i , whose checksum is C i The receiving end recalculates the checksum C′ of the slice using the same algorithm i , if C i =C″ i , then the data slice P i be complete and free from error;
[0107] Calculate data slice P i Checksum C i :
[0108] C i =Checksum(P i )
[0109] Recalculate the checksum C′ of the received slice i :
[0110] C′ i =Checksum(P′ i )
[0111] If C′ i ≠C i , it means that an error has occurred in the data slice and the receiving end will request to resend it;
[0112] Set the received data slice as P' i , which contains data bits D1, D2, ..., D m and redundant bits R1, R2, ..., R k ;
[0113] At the receiving end, the Hamming code check formula is used to calculate and check the redundant bits:
[0114] (Calculated according to the verification rules of Hamming code)
[0115] If the calculated redundant bits R′ j The received redundant bits R j If there is any inconsistency, the receiving end locates the error and corrects it;
[0116] CRC appends redundant bits to the data through polynomial division, allowing the receiving end to check whether the data is complete and error-free by performing the same polynomial operation;
[0117] Perform CRC operation on the data and add CRC check code CRC i :
[0118] CRC i =CRC(P i )
[0119] Use the same polynomial to perform CRC operation and calculate the CRC check value CRC' of the received data i :
[0120] CRC′ i =CRC(P′ i )
[0121] If CRC′ i =0, it means the data is complete and error-free; if CRC′ i≠0, it means the data is wrong and will be retransmitted.
[0122] As a preference, provide end-to-end encryption protection for the data transmission process and ensure the privacy, integrity and non-repudiation of the data as follows:
[0123] Symmetric encryption uses the same key for encryption and decryption. During the transmission process, the sender uses the key K send To encrypt data, the receiver uses the key K recv Decrypt the data;
[0124] Set the plaintext data to be sent as M and use the symmetric key K send Encrypted data:
[0125] C=Encrypt(M,K send )
[0126] Where C is the ciphertext;
[0127] The receiver uses the key K recv Decrypt ciphertext C:
[0128] M′=Decrypt(C,K recv )
[0129] If K send =K recv , the receiver obtains the original data M;
[0130] Asymmetric encryption uses public key encryption and private key decryption. The sender uses the receiver's public key PK recv To encrypt data:
[0131] C=Encrypt(M,PK recv )
[0132] The receiver uses his own private key SK recv Decrypted ciphertext:
[0133] M′=Decrypt(C,SK recv )
[0134] The sender calculates the hash value H(M) of data M:
[0135] H(M)=Hash(M)
[0136] The hash value is sent together with the data, and the receiver calculates the hash value H(M′) of the received data M′:
[0137] H(M′)=Hash(M′)
[0138] If H(M′) = H(M), the data is complete and correct;
[0139] In order to increase the verification of data, a message authentication code is used, and the sender uses the key K MAC Calculate the message authentication code MAC(M, K MAC ):
[0140] MAC(M,K MAC )=MAC Function(M,K MAC )
[0141] If MAC(M,K MAC )=MAC'(M',K MAC ), the data has not been tampered with;
[0142] The sender uses its private key SK send Sign the hash value H(M) of data M to generate a digital signature S:
[0143] S=Sign(H(M),SK send )
[0144] The receiver uses the sender's public key PK send Verify that the digital signature is valid:
[0145] Verify(S,H(M),PK send ).
[0146] Another technical problem to be solved by the present invention is to provide an electronic device, including a memory, a processor and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the program, a secure encryption system for data subpackaging and grouping as described above is implemented.
[0147] Another technical problem to be solved by the present invention is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a secure encryption system for data subpackaging and grouping.
[0148] The beneficial effects of the present invention are:
[0149] The data slicing module can effectively adapt to changes in network conditions by dynamically adjusting the size of slices based on network bandwidth, transmission delay and storage limitations; the encryption processing module encrypts each data slice to ensure that the data will not be stolen or tampered with by unauthorized visitors during transmission; the dynamic key management module can automatically generate, update and distribute keys, and supports public key infrastructure or symmetric encryption key exchange protocols; the data packaging module is responsible for reorganizing data slices at the receiving end and ensuring the integrity of each slice; the error detection and correction module uses redundant checksum and error correction technology to detect whether the data slice is complete or erroneous in time during transmission, and automatically correct errors when they occur; the secure transmission protocol module provides end-to-end encryption protection to ensure that data is not tampered with or leaked during transmission; through the comprehensive collaboration of various modules, this solution not only ensures the security and integrity of data transmission, but also can adjust the size of data slices according to actual network conditions to improve transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0150] Figure 1 The figure is a flow chart of a secure encryption system for data subpackaging and grouping according to the present invention. DETAILED DESCRIPTION
[0151] The principles and features of the present invention are described below. The examples provided are intended to illustrate the present invention only and are not intended to limit the scope of the present invention. The following paragraphs describe the present invention in more detail by way of example. The advantages and features of the present invention will become more apparent from the following description and claims.
[0152] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used in this specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0153] Example
[0154] The technical solution adopted by the present invention to solve its technical problem is:
[0155] A secure encryption system for data subpackaging and grouping, comprising:
[0156] The data slicing module is used to divide the large data stream into several data slices according to specific size rules. The size of each slice is dynamically adjusted according to network bandwidth, transmission delay, and storage limitations.
[0157] The encryption processing module is used to encrypt each slice using an encryption algorithm to ensure that the data is not stolen or tampered with by unauthorized access during transmission. Through the dynamic key management mechanism, different data slices are encrypted with different encryption keys;
[0158] Dynamic key management module, used to automatically generate, update and distribute keys according to predetermined rules or real-time system feedback. The key management system generates, distributes and synchronizes keys based on public key infrastructure or symmetric encryption key exchange protocols;
[0159] The data packaging module is used to reassemble all data slices transmitted to the receiving end and restore the original data. During the packaging process, the integrity of the data slices is first tested and assembled in the correct order;
[0160] Error detection and correction module, used to detect whether the data slice is complete or errors occur during data transmission, and adopt redundancy check and error correction technology;
[0161] The secure transmission protocol module is used to provide end-to-end encryption protection for the data transmission process and ensure the privacy, integrity and non-repudiation of the data.
[0162] The data slicing module dynamically adjusts the size of data slices based on network bandwidth, transmission latency, and storage limitations. Slice size is adjusted in real time based on network conditions, avoiding the inefficiency and network incompatibility risks associated with fixed slice sizes. Each data slice is encrypted using a different encryption key, preventing attackers from decrypting data by intercepting multiple data blocks. Through the dynamic key management module, key generation, distribution, and updates are based on real-time system feedback, increasing key complexity and reducing the risk of a single key being compromised. The data packetization module and error detection and correction module ensure data integrity during transmission. Even if slices are lost or damaged due to transmission errors, the error detection and correction module can still repair the data, minimizing the impact of data loss. End-to-end encryption ensures data privacy, integrity, and non-repudiation during transmission. The dynamic key management module can generate, distribute, and synchronize keys based on either a public key infrastructure (PKI) or a symmetric key exchange protocol. Both key management methods offer different advantages, and the choice can be tailored to meet specific needs, enhancing system flexibility and security.
[0163] The large data stream is divided into several data slices according to specific size rules. The size of each slice is dynamically adjusted according to network bandwidth, transmission delay, and storage limitations:
[0164] When dynamically resizing each slice, the following formula is used:
[0165]
[0166] Where C is the size of each data slice;
[0167] B is the bandwidth;
[0168] D is the delay;
[0169] The transmission cycle is the data transmission time required by the system;
[0170] S is the storage limit or the maximum size of each slice;
[0171] Assume bandwidth B = 10 Mbps, latency D = 100 ms, transmission period is set to 1 second, storage limit is 1 MB, and the size of each data slice is:
[0172]
[0173] Through the dynamic adjustment mechanism, the size of data slices is automatically optimized according to network conditions and device capabilities.
[0174] By automatically calculating the size of data slices based on network bandwidth, latency, and storage limitations, optimal data transmission efficiency can be ensured. When bandwidth is low, slices are automatically adjusted to smaller sizes to avoid transmission delays or packet loss caused by overly large slices. Storage limitations ensure that the size of data slices does not exceed the storage capacity of a single device, preventing storage overflow or insufficient processing power due to overly large data slices. Dynamic adjustment of slice size can achieve higher transmission reliability in the face of different network conditions. By adjusting the size of data slices, long waits and delays caused by overly large data packets can be avoided, so that the transmission time of each slice is as close as possible to the transmission cycle requirements, reducing overall transmission delays. The system can automatically adapt to different network conditions (bandwidth, latency, etc.), so that data transmission is not affected by changes in the external environment and always maintains good transmission effects. Bandwidth and latency information are used to reasonably allocate slice size, so that bandwidth is effectively utilized without causing excessive data accumulation or frequent network adjustments, thereby improving transmission rate and stability.
[0175] Each slice is encrypted using an encryption algorithm to ensure that the data is not stolen or tampered with by unauthorized visitors during transmission. Through the dynamic key management mechanism, different data slices are encrypted with different encryption keys as follows:
[0176] Setting parameters:
[0177] Mk: kth data slice;
[0178] Kk: encryption key for the kth data slice;
[0179] E: encryption algorithm;
[0180] T k : timestamp of the slice;
[0181] Nk: the serial number of the slice;
[0182] S k : Key update cycle;
[0183] The key generation uses a function based on time and slice sequence number, which is:
[0184] K k =H(T k ||N k ||K prev ||Salt)
[0185] Where H is a hash function;
[0186] T k is the current timestamp;
[0187] Nk is the serial number of the current data slice;
[0188] K_{\text{prev}} is the encryption key used in the previous slice;
[0189] Salt is a random factor used to increase security;
[0190] After the key is generated, the data slice is encrypted using the key. The formula is:
[0191] C k =E(M k , K k )
[0192] Among them, C k Slice the encrypted data;
[0193] M k is the kth data slice;
[0194] K k The encryption key generated for the slice;
[0195] The key update depends on a certain time period or data volume. When a certain threshold is reached, the system automatically generates a new key and replaces the old key. The key is updated once every certain amount of data transmitted or after a certain period of time.
[0196] The system generates a new key every 1MB of data transferred or every 10 minutes. During the transfer process, when a new data slice arrives, the key will be updated as follows:
[0197] K new =H(Tcurrent ||N new ||K old ||Salt).
[0198] By using a different encryption key for each data slice, attackers can be effectively prevented from decrypting the entire data stream by cracking a single key; the key update mechanism based on time and slice serial number is used to effectively avoid the risk of key leakage; by using a timestamp (T k ) and serial number (N k ), the system ensures the uniqueness of the data and key for each slice, preventing attackers from replaying previous data slices. The introduction of a random factor (Salt) further enhances the unpredictability of the key, preventing attacks based on known information. Even if an attacker knows the timestamp and serial number, they cannot infer the key through simple calculations. This scheme allows the key to be updated based on the amount of data transmitted or the time, thus adapting to the security requirements of different network environments. By periodically generating new encryption keys instead of encrypting each slice with a brand new key, the computational overhead of frequent key exchanges is reduced, ensuring the efficient operation of the system.
[0199] Automatically generate, update, and distribute keys based on predetermined rules or real-time system feedback. The key management system generates, distributes, and synchronizes keys based on public key infrastructure or symmetric encryption key exchange protocols as follows:
[0200] In a PKI system, each entity has a pair of public and private keys. Public keys are issued and verified through digital certificates. The key management system uses the following processes and formulas to generate, distribute, and update keys:
[0201] The public key is generated and distributed by the certificate authority, and user A is set up to generate a pair of public and private keys. And the certificate Cert is issued by CA A ;
[0202] Key pair generation:
[0203]
[0204] Certificate issuance:
[0205] CA’s public key K A Sign and generate certificate Cert A :
[0206] Cert A =CA.Sign(K A )
[0207] Public key distribution:
[0208] Entity A sends the certificate CertA Distribute to communication party B, communication party B obtains the public key by verifying the certificate; establish B using A's public key K A Encrypt message M, and then A uses the private key Decrypt a message; encrypt:
[0209] C A =E(K A , M)
[0210] Decryption:
[0211]
[0212] Set up A and B to generate a shared key K shared ;
[0213] Public basic information: Both parties disclose p and g;
[0214] Key pair generation:
[0215] A selects private key a and calculates A pub =g a mod p;
[0216] B selects private key b and calculates B pub =g b mod p;
[0217] Exchange public keys:
[0218] A will A pub Send to B;
[0219] B will B pub Send to A;
[0220] Calculate the shared secret:
[0221] A calculates the shared key
[0222] B calculates the shared key
[0223] Due to g ab mod p=g ba mod p, so both parties obtain the same shared key K shared ;
[0224] Shared key generation formula:
[0225] Calculation of A:
[0226]
[0227] Calculation of B:
[0228]
[0229] The key is updated or redistributed after a period of time, and the key is updated based on system feedback or predetermined rules;
[0230] When a predetermined time or data transfer volume threshold is reached, the key is updated:
[0231] K new =H(K shared ||T current ||Salt)
[0232] Where H is the hash function, T currrent is the current timestamp, and Salt is a random factor;
[0233] Key synchronization:
[0234] After the key is updated, both parties synchronize the new key through a secure channel.
[0235] Use CA to issue certificates to prevent man-in-the-middle attacks; public key exchange is combined with the DH algorithm to establish a shared key, without the need to share symmetric keys in advance; regular updates are made based on time or transmission volume to prevent key leakage due to long-term use; even if an attacker intercepts part of the data, the new key cannot be deduced through the key update mechanism; key derivation using Salt and timestamps ensures key uniqueness; supports secure communication between multiple users, and can independently generate keys for each pair of communicating entities; can be flexibly deployed in different network protocol layers; supports collaboration between software and hardware encryption modules.
[0236] All data slices transmitted to the receiving end are reassembled to restore the original data. During the packaging process, the integrity of the data slices is first checked and assembled in the correct order as follows:
[0237] The transmitted data is divided into N slices, each of which usually contains the following information:
[0238] Slice number: indicates the position of the slice in the data stream;
[0239] Slice data: the actual data part;
[0240] Checksum: a checksum value used to verify the integrity of the slice;
[0241] Reorganization process:
[0242] The receiving end first receives one or more data slices, each of which includes a slice number, data content, and a checksum;
[0243] For each received data slice, the receiving end verifies its integrity and uses checksums and hash functions to check whether the data is complete and has not been tampered with.
[0244] Checksum detection formula:
[0245]
[0246] Among them, P received is the received data slice, P calculated is the value calculated by the checksum algorithm;
[0247] Set the slice serial number to S i ,The receiving end sorts the slices by sequence number. If the received sequence number is discontinuous or missing, the receiving end requests to retransmit the missing slice;
[0248] After ensuring that all slices are complete and received in the correct order, the receiving end stitches all slices together and restores them to the original data. The slice data is set as P1, P2, ..., P N , the reorganized data D is expressed as:
[0249] D=P1||P2||…||P N
[0250] Among them, || represents data splicing operation;
[0251] Set up original data D orig is divided into N slices, each slice includes a sequence number S i , data part P i and checksum C i , the formula of the recombination process is expressed as:
[0252] For each slice i:
[0253]
[0254] If all slices are Valid i If true, the data slice is valid;
[0255] According to the sequence number S of each slice i , reorder the slices sequentially to get the correct order:
[0256] S1, S2, ..., S N
[0257] If any slices are missing or out of order, a request is initiated to retransmit the missing or out of order slices;
[0258] All valid and sequentially arranged slice data P i Splice together and restore the original data D orig :
[0259] D orig=P1||P2||…||P N .
[0260] Through checksum or hash function, the integrity of each slice is ensured to prevent data from being tampered with or lost during transmission; if a slice is lost or damaged, the receiving end can detect it and request retransmission to ensure the ultimate integrity of the data; sequence control is performed through slice numbering to ensure that data is spliced in the correct order when restored to avoid data confusion; data is transmitted after being fragmented, which can support the transmission of large amounts of data and improve network transmission efficiency; it supports a dynamic request retransmission mechanism, and when data is detected to be missing or out of order, it can request the lost slice in time to improve the reliability of data transmission; for unstable network environments, the slice distribution and reassembly solution provides a reliable solution, enhancing the system's adaptability to unstable factors such as packet loss and delay.
[0261] During the data transmission process, the data slice is detected to see if it is complete or an error occurs, and redundancy check and error correction technology are used as follows:
[0262] Each data slice is usually attached with a checksum value to verify the integrity of the data. The transmitted data slice is set as P i , whose checksum is C i The receiving end recalculates the checksum C′ of the slice using the same algorithm i , if C i =C′ i , then the data slice P i be complete and free from error;
[0263] Calculate data slice P i Checksum C i :
[0264] C i =Checksum(P i )
[0265] Recalculate the checksum C′ of the received slice i :
[0266] C′ i =Checksum(P′ i )
[0267] If C′ i ≠C i , it means that an error has occurred in the data slice and the receiving end will request to resend it;
[0268] Set the received data slice as P' i , which contains data bits D1, D2, ..., D m and redundant bits R1, R2, ..., R k ;
[0269] At the receiving end, the Hamming code check formula is used to calculate and check the redundant bits:
[0270] (Calculated according to the verification rules of Hamming code)
[0271] If the calculated redundant bits R′ j With the received redundant bit R j If there is any inconsistency, the receiving end locates the error and corrects it;
[0272] CRC appends redundant bits to the data through polynomial division, allowing the receiving end to check whether the data is complete and error-free by performing the same polynomial operation;
[0273] Perform CRC operation on the data and add CRC check code CRC i :
[0274] CRC i =CRC(P i )
[0275] Use the same polynomial to perform CRC operation and calculate the CRC check value CRC' of the received data i :
[0276] CRC′ i =CRC(P′ i )
[0277] If CRC′ i =0, it means the data is complete and error-free; if CRC′ i ≠0, it means the data is wrong and will be retransmitted.
[0278] Checksum and CRC can effectively detect the integrity of data slices, ensuring that the data has not been tampered with or damaged during transmission; Hamming code redundant bits can help the receiver locate and correct single-bit errors, improving transmission reliability; CRC polynomial operations have high error detection capabilities and can detect multi-bit errors in data, making them more reliable than simple checksums; in the event of errors or data loss, a retransmission request mechanism is used to ensure that the data is eventually restored intact; even if errors occur during transmission, the solution can automatically correct certain types of errors and increase transmission stability through a redundant check mechanism; Hamming codes can quickly locate the error and correct it, avoiding global retransmission and saving bandwidth and time.
[0279] Provides end-to-end encryption protection for data transmission and ensures data privacy, integrity, and non-repudiation:
[0280] Symmetric encryption uses the same key for encryption and decryption. During the transmission process, the sender uses the key K send To encrypt data, the receiver uses the key K recv Decrypt the data;
[0281] Set the plaintext data to be sent as M and use the symmetric key K send Encrypted data:
[0282] C=Encrypt(M,K send )
[0283] Where C is the ciphertext;
[0284] The receiver uses the key K recv Decrypt ciphertext C:
[0285] M′=Decrypt(C,K recv )
[0286] If K send =K recv , the receiver obtains the original data M;
[0287] Asymmetric encryption uses public key encryption and private key decryption. The sender uses the receiver's public key PK recv To encrypt data:
[0288] C=Encrypt(M,PK recv )
[0289] The receiver uses his own private key SK recv Decrypted ciphertext:
[0290] M′=Decrypt(C,SK recv )
[0291] The sender calculates the hash value H(M) of data M:
[0292] H(M)=Hash(M)
[0293] The hash value is sent together with the data, and the receiver calculates the hash value H(M′) of the received data M′:
[0294] H(M′)=Hash(M′)
[0295] If H(M′) = H(M), the data is complete and correct;
[0296] In order to increase the verification of data, a message authentication code is used, and the sender uses the key K MAC Calculate the message authentication code MAC(M, K MAC ):
[0297] MAC(M,K MAC )=MAC Function(M,K MAC )
[0298] If MAC(M,K MAC )=MAC'(M',K MAC ), the data has not been tampered with;
[0299] The sender uses its private key SK sen d signs the hash value H(M) of data M to generate a digital signature S:
[0300] S=Sign(H(M),SK send )
[0301] The receiver uses the sender's public key PK send Verify that the digital signature is valid:
[0302] Verify(S,H(M),PK send ).
[0303] Symmetric encryption and asymmetric encryption ensure that data cannot be read by third parties during transmission; hash values and MAC mechanisms ensure that data has not been tampered with or damaged; digital signatures provide non-repudiation of data, ensuring that the sender cannot deny the data it has sent; combining multiple security technologies such as symmetric encryption, asymmetric encryption, hash algorithms, MAC and digital signatures provides powerful encryption protection; asymmetric encryption and digital signatures verify the identities of the communicating parties and ensure the credibility of the data source.
[0304] This embodiment also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a secure encryption system for data subpackaging and grouping as described above is implemented.
[0305] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the secure encryption system for data subpackaging and grouping as described above is implemented.
[0306] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0307] Those skilled in the art will clearly understand that for the sake of convenience and brevity in description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.
[0308] The above embodiments of the present invention are not intended to limit the scope of protection of the present invention, and the implementation methods of the present invention are not limited thereto. All other modifications, replacements or changes made to the above structures of the present invention based on the above contents of the present invention, in accordance with common technical knowledge and customary means in this field, without departing from the above basic technical ideas of the present invention, should fall within the scope of protection of the present invention.
Claims
1. A secure encryption system for data subpackaging and grouping, characterized in that: Includes: The data slicing module is used to divide the large data stream into several data slices according to specific size rules. The size of each slice is dynamically adjusted according to network bandwidth, transmission delay, and storage limitations. The encryption processing module is used to encrypt each slice using an encryption algorithm to ensure that the data is not stolen or tampered with by unauthorized access during transmission. Through the dynamic key management mechanism, different data slices are encrypted with different encryption keys; Dynamic key management module, used to automatically generate, update and distribute keys according to predetermined rules or real-time system feedback. The key management system generates, distributes and synchronizes keys based on public key infrastructure or symmetric encryption key exchange protocols; The data packaging module is used to reassemble all data slices transmitted to the receiving end and restore the original data. During the packaging process, the integrity of the data slices is first tested and assembled in the correct order; Error detection and correction module, used to detect whether the data slice is complete or errors occur during data transmission, and adopt redundancy check and error correction technology; The secure transmission protocol module is used to provide end-to-end encryption protection for the data transmission process and ensure the privacy, integrity and non-repudiation of the data.
2. The data sub-packaging and grouping security encryption system according to claim 1 is characterized in that: The large data stream is divided into several data slices according to specific size rules. The size of each slice is dynamically adjusted according to network bandwidth, transmission delay, and storage limitations: When dynamically resizing each slice, the following formula is used: Where C is the size of each data slice; B is the bandwidth; D is the delay; The transmission cycle is the data transmission time required by the system; S is the storage limit or the maximum size of each slice; Assume bandwidth B = 10 Mbps, latency D = 100 ms, transmission period is set to 1 second, storage limit is 1 MB, and the size of each data slice is: Through the dynamic adjustment mechanism, the size of data slices is automatically optimized according to network conditions and device capabilities.
3. The data sub-packaging and grouping security encryption system according to claim 2 is characterized in that: Each slice is encrypted using an encryption algorithm to ensure that the data is not stolen or tampered with by unauthorized visitors during transmission. Through the dynamic key management mechanism, different data slices are encrypted with different encryption keys as follows: Setting parameters: M k : kth data slice; K k : encryption key for the kth data slice; E: encryption algorithm; T k : timestamp of the slice; N k : The serial number of the slice; S k : Key update cycle; The key generation uses a function based on time and slice sequence number, which is: K k =H(T k ||N k ||K prev ||Salt) Where H is a hash function; T k is the current timestamp; N k is the serial number of the current data slice; K_{\text{prev}} is the encryption key used in the previous slice; Salt is a random factor used to increase security; After the key is generated, the data slice is encrypted using the key. The formula is: C k =E(M k ,K k ) Among them, C k Slice the encrypted data; M k is the kth data slice; K k The encryption key generated for the slice; The key update depends on a certain time period or data volume. When a certain threshold is reached, the system automatically generates a new key and replaces the old key. The key is updated once every certain amount of data transmitted or after a certain period of time. The system generates a new key every 1MB of data transferred or every 10 minutes. During the transfer process, when a new data slice arrives, the key will be updated as follows: K new =H(T current ||N new ||K old ||S alt )。 4. The data sub-packaging and grouping security encryption system according to claim 3 is characterized in that: Automatically generate, update, and distribute keys based on predetermined rules or real-time system feedback. The key management system generates, distributes, and synchronizes keys based on public key infrastructure or symmetric encryption key exchange protocols as follows: In a PKI system, each entity has a pair of public and private keys. Public keys are issued and verified through digital certificates. The key management system uses the following processes and formulas to generate, distribute, and update keys: The public key is generated and distributed by the certificate authority, and user A is set up to generate a pair of public and private keys. And the certificate Cert is issued by CA A ; Key pair generation: Certificate issuance: CA’s public key K A Sign and generate certificate Cert A : Cert A =CA.Sign(K A ) Public key distribution: Entity A sends the certificate Cert A Distribute to communication party B, communication party B obtains the public key by verifying the certificate; establish B using A's public key K A Encrypt message M, and then A uses the private key Decrypt the message; encryption: C A =E(K A ,M) Decryption: Set up A and B to generate a shared key K sharcd ; Public basic information: Both parties disclose p and g; Key pair generation: A selects private key a and calculates A pub =g a mod p; B selects private key b and calculates B pub =g b mod p; Exchange public keys: A will A pub Send to B; B will B pub Send to A; Calculate the shared secret: A calculates the shared key B calculates the shared key Due to g ab mod p=g ba mod p, so both parties obtain the same shared key K shared ; Shared key generation formula: Calculation of A: Calculation of B: The key is updated or redistributed after a period of time, and the key is updated based on system feedback or predetermined rules; When a predetermined time or data transfer volume threshold is reached, the key is updated: K new =H(K shared ||T current ||Salt) Where H is the hash function, T currcnt is the current timestamp, and Salt is a random factor; Key synchronization: After the key is updated, both parties synchronize the new key through a secure channel.
5. The data sub-packaging and grouping security encryption system according to claim 4 is characterized in that: All data slices transmitted to the receiving end are reassembled to restore the original data. During the packaging process, the integrity of the data slices is first checked and assembled in the correct order as follows: The transmitted data is divided into N slices, each of which usually contains the following information: Slice number: indicates the position of the slice in the data stream; Slice data: the actual data part; Checksum: a checksum value used to verify the integrity of the slice; Reorganization process: The receiving end first receives one or more data slices, each of which includes a slice number, data content, and a checksum; For each received data slice, the receiving end verifies its integrity and uses checksums and hash functions to check whether the data is complete and has not been tampered with. Checksum detection formula: Among them, P rcccived is the received data slice, P calculatcd is the value calculated by the checksum algorithm; Set the slice serial number to S i ,The receiving end sorts the slices by sequence number. If the received sequence number is discontinuous or missing, the receiving end requests to retransmit the missing slice; After ensuring that all slices are complete and received in the correct order, the receiving end stitches all slices together and restores them to the original data. The slice data is set as P1, P2, ..., P N , the reorganized data D is expressed as: D=P1||P2||...||P N Among them, || represents data splicing operation; Set up original data D orig is divided into N slices, each slice includes a sequence number S i , data part P i and checksum C i , the formula of the recombination process is expressed as: For each slice If all slices are Valid i If true, the data slice is valid; According to the sequence number S of each slice i , reorder the slices sequentially to get the correct order: S1,S2,...,S N If any slices are missing or out of order, a request is initiated to retransmit the missing or out of order slices; All valid and sequentially arranged slice data P i Splice together and restore the original data D orig : D orig =P1||P2||...||P N 。 6. The data sub-packaging and grouping security encryption system according to claim 5 is characterized in that: During the data transmission process, the data slice is detected to see if it is complete or an error occurs, and redundancy check and error correction technology are used as follows: Each data slice is usually attached with a checksum value to verify the integrity of the data. The transmitted data slice is set as P i , whose checksum is C i The receiving end recalculates the checksum C′ of the slice using the same algorithm i , if C i =C′ i , then the data slice P i be complete and free from error; Calculate data slice P i Checksum C i : C i =Checksum(P i ) Recalculate the checksum C′ of the received slice i : C′ i =Checksum(P′ i ) If C′ i ≠C i , it means that an error has occurred in the data slice and the receiving end will request to resend it; Set the received data slice as P' i , which contains data bits D1, D2, ..., D m and redundant bits R1, R2, ..., R k ; At the receiving end, the Hamming code check formula is used to calculate and check the redundant bits: (Calculated according to the verification rules of Hamming code) If the calculated redundant bits R′ j With the received redundant bit R j If there is any inconsistency, the receiving end locates the error and corrects it; CRC appends redundant bits to the data through polynomial division, allowing the receiving end to check whether the data is complete and error-free by performing the same polynomial operation; Perform CRC operation on the data and add CRC check code CRC i : CRC i =CRC(P i ) Use the same polynomial to perform CRC operation and calculate the CRC check value CRC' of the received data i : CRC′ i =CRC(P′ i ) If CRC′ i =0, it means the data is complete and error-free; if CRC′ i ≠0, it means the data is wrong and will be retransmitted.
7. The data sub-packaging and grouping security encryption system according to claim 6 is characterized in that: Provides end-to-end encryption protection for data transmission and ensures data privacy, integrity, and non-repudiation: Symmetric encryption uses the same key for encryption and decryption. During the transmission process, the sender uses the key K send To encrypt data, the receiver uses the key K recv Decrypt the data; Set the plaintext data to be sent as M and use the symmetric key K send Encrypted data: C=Encrypt(M,K send ) Where C is the ciphertext; The receiver uses the key K recv Decrypt ciphertext C: M′=Decrypt(C,K recv ) If K send =K recv , the receiver obtains the original data M; Asymmetric encryption uses public key encryption and private key decryption. The sender uses the receiver's public key PK recv To encrypt data: C=Encrypt(M,PK recv ) The receiver uses his own private key SK recv Decrypted ciphertext: M′=Decrypt(C,SK recv ) The sender calculates the hash value H(M) of data M: H(M)=Hash(M) The hash value is sent together with the data, and the receiver calculates the hash value H(M′) of the received data M′: H(M′)=Hash(M′) If H(M′) = H(M), the data is complete and correct; In order to increase the verification of data, a message authentication code is used, and the sender uses the key K MAC Calculate the message authentication code MAC(M, K MAC ): MAC(M,K MAC )=MAC Funciton(M,K MAC ) If MAC(MK MAC )=MAC'(M',K MAC ), the data has not been tampered with; The sender uses its private key SK send Sign the hash value H(M) of data M to generate a digital signature S: S=Sign(H(M),SK send ) The receiver uses the sender's public key PK send Verify that the digital signature is valid: Verify(S,H(M),PK send )。 8. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the secure encryption system for data subpackaging and grouping as claimed in any one of claims 1 to 7 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the secure encryption system for data subpackaging and grouping as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Buffer optimization method and device, electronic equipment, communication system and storage medium
CN114980150A
Firmware transmission authentication protection method and system based on national cryptographic algorithm
CN116975875A
File data secure transmission method based on bidirectional encryption algorithm
CN119628964A