CN114172658A - Compression encryption system based on improved LZW algorithm and PUF key - Google Patents

Compression encryption system based on improved LZW algorithm and PUF key Download PDF

Info

Publication number
CN114172658A
CN114172658A CN202111439496.9A CN202111439496A CN114172658A CN 114172658 A CN114172658 A CN 114172658A CN 202111439496 A CN202111439496 A CN 202111439496A CN 114172658 A CN114172658 A CN 114172658A
Authority
CN
China
Prior art keywords
dictionary
key
puf
compression
encryption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111439496.9A
Other languages
Chinese (zh)
Inventor
李冰
成小勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Institute Of Southeast University
Original Assignee
Shenzhen Institute Of Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Institute Of Southeast University filed Critical Shenzhen Institute Of Southeast University
Priority to CN202111439496.9A priority Critical patent/CN114172658A/en
Publication of CN114172658A publication Critical patent/CN114172658A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3271Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using challenge-response
    • H04L9/3278Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using challenge-response using physically unclonable functions [PUF]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/80Wireless
    • H04L2209/805Lightweight hardware, e.g. radio-frequency identification [RFID] or sensor

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention discloses a compression encryption system based on an improved LZW algorithm and a PUF (physical unclonable function) key, which comprises a PUF key reading module, a compression encryption module and a decompression decryption module, wherein the PUF key reading module reads a key generated by PUF key generation equipment to a host through a UART (universal asynchronous receiver/transmitter) serial port; the compression encryption module adopts a dictionary to perform a block management method, so that the compression ratio is greatly improved, and meanwhile, less speed performance is sacrificed, thereby reducing the use of bandwidth and storage space; by combining with the PUF secret key, encryption is embedded into a compression process, so that the encryption consumes less computing resources while resisting physical attack; the decompression decryption module is used for decompressing and decrypting the compressed and encrypted file so as to obtain an original file; the invention manages the dictionary in a partitioning way, so that the defect that the compression ratio is reduced because the original LZW algorithm is not updated after the dictionary is filled with entries is overcome; the encryption method based on the PUF key has certain safety while saving transmission bandwidth and storage space.

Description

Compression encryption system based on improved LZW algorithm and PUF key
Technical Field
The invention relates to a compression encryption system based on an improved LZW algorithm and a PUF key, which is used for compression encryption and belongs to the technical field of lossless compression security.
Background
The compression algorithm is divided into: lossy compression algorithms and lossless compression algorithms. Lossless compression is widely applied due to its undistorted characteristic, and is divided into a compression algorithm based on statistical characteristics and a compression algorithm based on dictionaries. The LZW compression algorithm has better self-adaptive capacity by maintaining a dynamic dictionary, and meanwhile, the algorithm has high compression ratio and high compression speed. The LZW compression algorithm has thus become a research hotspot in the industry. In the previous research, the main point is to improve the dictionary storage structure and the dictionary updating scheme. The main problem existing in the existing dictionary updating scheme is that the compression ratio and the compression speed can not be compatible.
With the development of the internet, people pay more and more attention to the security problem of data. The combination of encryption and compression is an important issue, and most of the current methods combine the two in series, but it needs to consume more computing resources. Furthermore, the key used for encryption is generally stored in a Non-volatile Memory (NVM), and is vulnerable to intrusion attacks to reveal data.
A Physical Unclonable Function (PUF) is a Physical Function that uses some small manufacturing differences that cannot be predicted and cloned inevitably during the manufacturing process of a device, and these differences can be regarded as fingerprints of hardware and do not need to be stored in NVM, so that the PUF can withstand some conventional Physical attacks. PUF keys are therefore well suited for use in the context of compression encryption.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a compression encryption system based on an improved LZW algorithm and a PUF key, the improvement of the LZW compression algorithm and a lightweight encryption method based on the PUF key are realized through C + + language design, the compression ratio of the improved LZW algorithm is further improved while less speed performance is sacrificed, and the lightweight encryption method resistant to physical attack is realized based on the PUF key.
In order to solve the technical problem, the invention discloses a compression encryption system based on an improved LZW algorithm and a PUF key, which comprises a PUF key reading module, a compression encryption module and a decompression decryption module, wherein the PUF key reading module reads a key generated by PUF key generation equipment to a host through a UART serial port; the compression encryption module adopts a dictionary to perform a block management method, so that the improved LZW algorithm can greatly improve the compression ratio and simultaneously sacrifice less speed performance compared with the original LZW algorithm, thereby reducing the use of bandwidth and storage space; by combining with the PUF secret key, encryption is embedded into a compression process, so that the encryption consumes less computing resources while resisting physical attack; and the decompression decryption module is used for decompressing and decrypting the compressed and encrypted file so as to obtain the original file.
Specifically, the reading step of the PUF key reading module is as follows:
step (1), the host is connected with the PUF key generation device through a UART serial port;
step (2), the host searches and identifies the corresponding serial port number, sends a key extraction signal to the PUF key generation device, and receives the generated key after the key is generated;
and (3) storing the received key into the host for encryption.
Specifically, the compression encryption module comprises the following steps:
step A, defining a dictionary with a fixed size, initializing vocabulary entries from 0 to 255 by using ASCII characters, defining an empty string variable s, and reading in a PUF key;
b, partitioning the regions of the dictionary except the first 256 terms, wherein the number of terms contained in each dictionary block is equal, and each dictionary block has respective influence factor identification;
step C, reading in the next character C, if s + C is in the dictionary, s is equal to s + C, and repeating the step C; otherwise, judging whether the dictionary is filled up; if the dictionary is full, emptying the dictionary block with the minimum influence factor, and adding s + c as a new entry to the initial position of the dictionary block; if the materials are not full, adding the materials in sequence, and entering the step D;
step D, outputting the index corresponding to s and the value (0 or 1) of the current key bit, wherein s is c, and updating the influence factor of the dictionary block where s is located; if the file end is not reached, repeating the step C, otherwise, entering the step E;
step E, if s is not a null character string, outputting the index corresponding to s and the value (0 or 1) of the current key bit, and then ending; otherwise, the process is finished directly.
Specifically, the decompression decryption module comprises the following steps
Step A, reading in a PUF key, defining a dictionary with a fixed size, initializing vocabulary entries from 0 to 255 by using ASCII characters, defining a null character string variable c, defining a character string w and initializing the character string w into a character string corresponding to the difference between the first digit to be decompressed and the first digit (0 or 1) of the key in the dictionary;
b, partitioning the regions of the dictionary except the first 256 terms, wherein the number of terms contained in each dictionary block is equal, each dictionary block has respective influence factor identification, and outputting w;
step C, reading a next numerical value ptr, if the difference value between the ptr and the key bit is in the dictionary, assigning a character string corresponding to the difference value to C, if the difference value is not in the dictionary and is equal to the index of the current entry needing to be added, then C is w + w [0] (w-first character), if the dictionary is full, the dictionary block with the minimum influence factor is emptied, and w + C [0] is used as a new entry and added to the initial position of the dictionary block; if the materials are not full, adding the materials in sequence; otherwise, the compressed file is damaged and the decompression and decryption process is ended;
d, updating the influence factor of the dictionary block where the difference value of the ptr and the key bit is located, and outputting c, wherein w is c; if the end of the file is not reached, repeating the step C, otherwise ending.
Specifically, the dictionary partitioning comprises all partitioning modes which can perform equal entry number on the areas of the dictionary except for the first 256 entries; the calculation mode of the influence factor is as follows: the time the first entry of the dictionary block is added + the number of times all entries in the dictionary block are indexed.
The decompression decryption module also comprises an operation interface providing a visualization for a user, and the main window consists of three text boxes and respectively displays the original file, the compressed and encrypted file and the decompressed and decrypted file content; the operation interface window comprises six functional buttons of PUF key reading, original file, compression encryption, decompression decryption, memory consumption and compression ratio.
Compared with the prior art, the invention has the following beneficial technical effects:
(1) due to the adoption of the three steps of the PUF key reading module, a user can more conveniently read the key through the UART serial port for the use of the next compression encryption, and the physical attack resistance of the key is realized.
(2) The dictionary is updated in a blocking mode in the step B of adopting the compression encryption module and the decompression decryption module, and the identification of the influence factor is introduced, so that the compression ratio is improved, and meanwhile, the good compression and decompression speed is kept.
(3) Because the step D, E of compressing the encryption module and the step C of decompressing the decryption module are adopted, the encryption based on the PUF secret key is well embedded into the compression process, certain safety is guaranteed, and meanwhile the light-weight characteristic is achieved.
(4) Because a visual operation interface is provided for the user, the operation process of the whole system is simplified, and the compression encryption and decompression decryption results and some important indexes are more intuitively presented to the user.
(5) The method is used for realizing self-adaptive adjustment based on different size dictionary blocks by adopting different block scoring modes, so that the optimal block scoring method is selected; the calculation of the influence factors improves the selection precision of the updated dictionary block, thereby improving the compression ratio.
Drawings
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a diagram of the steps of the compression encryption method of the present invention.
FIG. 2 is a diagram of the steps of the compression encryption method of the present invention.
Fig. 3 is a layout diagram of a visual ui according to the present invention.
Detailed Description
The invention relates to a compression encryption system based on an improved LZW algorithm and a PUF key, which comprises a core function unit and a user operation unit, wherein the core function unit comprises: PUF key reading module, compression encryption module, decompression decryption module, user operation unit includes: the device comprises an effect display module and a function operation module.
As shown in fig. 1, the compression encryption method includes the following specific steps:
step A1, defining a dictionary with fixed size, initializing the 0-255 entries with ASCII characters, defining a null character string variable s, and reading in a PUF key;
a2, partitioning the regions of the dictionary except the first 256 terms, wherein the number of terms contained in each dictionary block is equal, and each dictionary block has respective influence factor identification;
step A3, reading the next character c, if s + c is in the dictionary, s equals s + c, and repeating step A3; otherwise, it needs to judge whether the dictionary is full. If the dictionary is full, emptying the dictionary block with the minimum influence factor, and adding s + c as a new entry to the initial position of the dictionary block; if not, adding the components in sequence. Entering step A4;
step a4, adding the value (0 or 1) of the current key bit to the index corresponding to s, where s equals c, and updating the impact factor of the dictionary block where s is located. If the end of the file is not reached, repeating the step A3, otherwise, entering the step A5;
step A5, if s is not a null character string, outputting the index corresponding to s plus the value (0 or 1) of the current key bit, and then ending; otherwise, the process is finished directly.
As shown in fig. 2, the decompression decryption method includes the following specific steps:
step B1, reading in PUF key, defining a dictionary with fixed size, initializing the 0-255 entries with ASCII characters, defining a null character string variable c, defining a character string w and initializing the character string w into a character string corresponding to the difference between the first digit to be decompressed and the first digit (0 or 1) of the key in the dictionary;
b2, partitioning the regions of the dictionary except the first 256 terms, wherein the number of terms contained in each dictionary block is equal, each dictionary block has respective influence factor identification, and outputting w;
step B3, reading the next value ptr, if the difference value between ptr and the key bit is in the dictionary, assigning the character string corresponding to the difference value to c, if the difference value is not in the dictionary and is equal to the index of the current entry to be added, then c is w + w [0] (w-first character), if the dictionary is full, the dictionary block with the minimum influence factor is emptied, and w + c [0] is used as a new entry to be added to the starting position of the dictionary block; if the materials are not full, adding the materials in sequence; otherwise, the compressed file is damaged and the decompression and decryption process is ended;
and step B4, updating the influence factor of the dictionary block where the difference value of the ptr and the key bit is located, and outputting c, wherein w is c. If the end of the file is not reached, repeating the step B3, otherwise, ending;
as shown in fig. 3, the main window of the visual user operation interface is composed of three text boxes, and respectively displays the original file, the compressed and encrypted file, and the decompressed and decrypted file content; the operation interface window comprises six functional buttons of PUF key reading, original file, compression encryption, decompression decryption, memory consumption and compression ratio. The specific functions of each function button and the operation result display area are as follows:
after clicking the PUF key reading button, the host searches and identifies a corresponding serial port number, sends a key extraction signal to the PUF key generation device, and after generating the key, reads the generated key and displays the key in a text box behind the button.
And after clicking an original file button, popping up a file selection dialog box, and selecting the text which needs to be compressed and encrypted on the host. When the original file is selected, the specific content of the text is displayed in the text box of the original file in the main window, and the size of the text is displayed in the text box behind the original file button.
And clicking a compression encryption button to pop up a file to be saved as a dialog box, and executing a compression encryption algorithm in the background by the system after selecting a storage path and a file name of the compression encryption file. After the compression and encryption are finished, the named file is generated under the corresponding path, the compressed file content can be displayed in a binary system form in a compressed and encrypted text box in the main window, and the size of the compressed and encrypted file and the time consumption of the compression and encryption can be displayed in the text box after the encryption button is compressed.
And clicking a decompression decryption button to pop up a file selection dialog box, storing the pop-up file as the dialog box after the file to be decompressed and decrypted is selected, and executing a decompression decryption algorithm in the background by the system after the storage path and the file name of the decompression decryption file are selected. When the decompression and decryption are completed, the named file is generated under the corresponding path, the file content can be displayed in the text box for decompression and decryption in the main window, and the size of the file after decompression and decryption and the time consumption for decompression and decryption can be displayed in the text box after the decryption button is decompressed.
Clicking the memory consumption button displays the memory space consumed by compressing, encrypting or decompressing and decrypting in the text box behind the memory consumption button.
Clicking the compression ratio displays the value of the compression ratio in a text box behind the compression ratio, and the calculation formula is as follows: CR is the size of the text before compression encryption/the size of the text after compression encryption.
The above embodiments do not limit the present invention in any way, and all technical solutions obtained by means of equivalent substitution or equivalent transformation fall within the protection scope of the present invention.

Claims (6)

1. The compression encryption system based on the improved LZW algorithm and the PUF key is characterized by comprising a PUF key reading module, a compression encryption module and a decompression decryption module, wherein the PUF key reading module reads a key generated by PUF key generation equipment to a host through a UART serial port; the compression encryption module adopts a dictionary to perform a block management method, so that the improved LZW algorithm can greatly improve the compression ratio and simultaneously sacrifice less speed performance compared with the original LZW algorithm, thereby reducing the use of bandwidth and storage space; by combining with the PUF secret key, encryption is embedded into a compression process, so that the encryption consumes less computing resources while resisting physical attack; and the decompression decryption module is used for decompressing and decrypting the compressed and encrypted file so as to obtain the original file.
2. The improved LZW algorithm and PUF key based compression encryption system of claim 1, wherein: the reading steps of the PUF key reading module are as follows:
step (1), the host is connected with the PUF key generation device through a UART serial port;
step (2), the host searches and identifies the corresponding serial port number, sends a key extraction signal to the PUF key generation device, and receives the generated key after the key is generated;
and (3) storing the received key into the host for encryption.
3. The improved LZW algorithm and PUF key based compression encryption system of claim 1, wherein the compression encryption module comprises the steps of:
step A, defining a dictionary with a fixed size, initializing vocabulary entries from 0 to 255 by using ASCII characters, defining an empty string variable s, and reading in a PUF key;
b, partitioning the regions of the dictionary except the first 256 terms, wherein the number of terms contained in each dictionary block is equal, and each dictionary block has respective influence factor identification;
step C, reading in the next character C, if s + C is in the dictionary, s is equal to s + C, and repeating the step C; otherwise, judging whether the dictionary is filled up; if the dictionary is full, emptying the dictionary block with the minimum influence factor, and adding s + c as a new entry to the initial position of the dictionary block; if the materials are not full, adding the materials in sequence, and entering the step D;
step D, outputting the index corresponding to s and the value (0 or 1) of the current key bit, wherein s is c, and updating the influence factor of the dictionary block where s is located; if the file end is not reached, repeating the step C, otherwise, entering the step E;
step E, if s is not a null character string, outputting the index corresponding to s and the value (0 or 1) of the current key bit, and then ending; otherwise, the process is finished directly.
4. The improved LZW algorithm and PUF key based compression encryption system of claim 1, wherein the decompression decryption module comprises the steps of:
step A, reading in a PUF key, defining a dictionary with a fixed size, initializing vocabulary entries from 0 to 255 by using ASCII characters, defining a null character string variable c, defining a character string w and initializing the character string w into a character string corresponding to the difference between the first digit to be decompressed and the first digit (0 or 1) of the key in the dictionary;
b, partitioning the regions of the dictionary except the first 256 terms, wherein the number of terms contained in each dictionary block is equal, each dictionary block has respective influence factor identification, and outputting w;
step C, reading a next numerical value ptr, if the difference value between the ptr and the key bit is in the dictionary, assigning a character string corresponding to the difference value to C, if the difference value is not in the dictionary and is equal to the index of the current entry needing to be added, then C is w + w [0], if the dictionary is full, emptying the dictionary block with the minimum influence factor, and adding w + C [0] as a new entry to the initial position of the dictionary block; if the materials are not full, adding the materials in sequence; otherwise, the compressed file is damaged and the decompression and decryption process is ended;
d, updating the influence factor of the dictionary block where the difference value of the ptr and the key bit is located, and outputting c, wherein w is c; if the end of the file is not reached, repeating the step C, otherwise ending.
5. The improved LZW algorithm and PUF key-based compression encryption system according to claim 3 or 4, wherein the dictionary blocking comprises all blocking modes that can equally divide the dictionary into the areas except the first 256 entries; the calculation mode of the influence factor is as follows: the time the first entry of the dictionary block is added + the number of times all entries in the dictionary block are indexed.
6. The improved LZW algorithm and PUF key-based compression encryption system according to claim 1, wherein the decompression decryption module further comprises an operation interface for providing a visualization to a user, and the main window comprises three text boxes for displaying the original file, the compressed and encrypted file, and the decompressed and decrypted file; the operation interface window comprises six functional buttons of PUF key reading, original file, compression encryption, decompression decryption, memory consumption and compression ratio.
CN202111439496.9A 2021-11-30 2021-11-30 Compression encryption system based on improved LZW algorithm and PUF key Pending CN114172658A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111439496.9A CN114172658A (en) 2021-11-30 2021-11-30 Compression encryption system based on improved LZW algorithm and PUF key

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111439496.9A CN114172658A (en) 2021-11-30 2021-11-30 Compression encryption system based on improved LZW algorithm and PUF key

Publications (1)

Publication Number Publication Date
CN114172658A true CN114172658A (en) 2022-03-11

Family

ID=80481640

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111439496.9A Pending CN114172658A (en) 2021-11-30 2021-11-30 Compression encryption system based on improved LZW algorithm and PUF key

Country Status (1)

Country Link
CN (1) CN114172658A (en)

Similar Documents

Publication Publication Date Title
US20100131476A1 (en) Computer product, information retrieval method, and information retrieval apparatus
US9081874B2 (en) Information retrieval method, information retrieval apparatus, and computer product
CN112953550B (en) Data compression method, electronic device and storage medium
WO2006123429A1 (en) Information search method, device, program, and recording medium containing the program
CN109075798B (en) Variable size symbol entropy-based data compression
JP2016522931A (en) Blocking password attacks
CN115296862B (en) Network data safety transmission method based on data coding
CN102761418A (en) Character compression encrypting method
CN116796354B (en) Information security enhancement method for computer system
CN115664847A (en) User information safe storage method of internet education platform
US20030152220A1 (en) Digital data transforming method
CN107317814A (en) With applying transparent cipher text searching method, gateway apparatus, gateway device and system
CN114172658A (en) Compression encryption system based on improved LZW algorithm and PUF key
CN109145613A (en) Security encryption chip and electronic equipment containing the chip
CN113220651A (en) Operation data compression method and device, terminal equipment and storage medium
CN107135064B (en) Information encryption method based on depth self-encoder
US7567236B2 (en) Communications terminal apparatus, reception apparatus, and method therefor
WO2020226105A1 (en) Data compression and decompression methods, data compression device, and data decompression device
Chavali et al. Comparative Study of Image Encryption and Image Steganography Using Cryptographic Algorithms and Image Evaluation Metrics
JPH1166005A (en) Password generation device and password communication system
CN116915922B (en) Image transmission method and device, electronic equipment and storage medium
CN117354059B (en) Data sharing method based on cloud edge end cooperation
CN117540441B (en) Transaction data secure storage method for hall type cloud terminal
US20240178999A1 (en) Method for data encryption, terminal device and non-transitory computer-readable storage medium
CN111324897B (en) Image encryption method and device and image decryption method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication