A kind of dedicated compressibility based on PUF key
Technical field
The present invention relates to lossless compression security technology area, especially a kind of dedicated compressibility based on PUF key.
Background technique
Compression and decompression are a pair of of the operations that often use in data transimission and storage, in some pairs of security requirements
Need to carry out ciphered compressed and encryption decompression under relatively high application scenarios.So far, most of ciphered compresseds and encryption solution
Key storage used in pressing is stored in the number of NVM in non volatile register (Non-volatile Memory, NVM)
It is believed that breath is easy to be stolen, so that protected data be caused to reveal.
Physics unclonable function (Physical Unclonable Function, PUF) is a kind of physical function, essence
On can be regarded as the fingerprint of hardware, be a kind of characteristic of hardware circuit itself, be not required to be stored in NVM.This characteristic of PUF
So that PUF is highly suitable for safe ciphered compressed and encryption decompression scene, the crypticity of PUF key itself both can guarantee,
The safety of compressed data can more be protected.
In recent years, with the extensive research to PUF, the method for the PUF of more and more types occur and extracting PUF.
Many scholars generate PUF using FPGA (Field-Programmable Gate Array) or flush type circuit and make at present
Make key, and is mostly that data are extracted by PCIE or UART serial ports.But at present many methods do not accomplish it is enough from
Dynamicization and visualization, do not account for actual production requirement, not too much friendly to user;And mentioning for PUF key
It takes method each different, needs to do various adaptations when application, it is very complicated.
Summary of the invention
To solve problems of the prior art, the present invention proposes a kind of dedicated compressibility based on PUF key, should
System using Python compile visual user's operation interface can in major mainstream operation system efficient operation, be
System use PUF key read module, from PUF key generator circuitry read PUF key, realize using the system encryption compression and
The compressed file of acquisition can only obtain original by the system decryption compression, in addition, the system also achieves the acquisition of PUF key
Module with PUF key generator circuitry decoupling, therefore without carrying out cumbersome suitability operation when extract PUF key.
The present invention uses following technical scheme to solve above-mentioned technical problem:
A kind of dedicated compressibility based on PUF key proposed by the present invention, comprising: core function unit, user's operation
Unit and miscellaneous function unit.Core function unit includes: PUF key read module, compression module and decompression module, user
Operating unit includes: user authentication module, GUI operation module and function display module, and miscellaneous function unit includes: Worker mould
Block and log module.
PUF key read module reads PUF key from PUF key generator circuitry.
Compression module includes: Ordinary Compression unit, dedicated compression unit;Wherein, Ordinary Compression unit carries out not file
For the Ordinary Compression of encryption to obtain Ordinary Compression file, dedicated compression unit carries out based on the dedicated of the PUF key file
Ciphered compressed is to obtain dedicated compressed file.
Decompression module includes: common decompression unit, dedicated decompression unit;Wherein, common decompression unit is to text
The common decompression that part is not encrypted is to obtain original;Dedicated decompression unit carries out based on the PUF key file
Dedicated encrypted decompress to obtain original.
Dedicated compression unit executes dedicated compression algorithm, and dedicated decompression unit executes dedicated decompression algorithm.Dedicated pressure
Compression algorithm first calls PUF key read module to obtain PUF key, then PUF key is added in compression algorithm and is executed
Compression.Dedicated decompression algorithm first calls PUF key read module to obtain PUF key, PUF key is then added to solution
In compression algorithm and execute decompression.
A kind of dedicated compressibility based on PUF key proposed by the present invention further includes providing a user a kind of visualization behaviour
The GUI operation module for making interface main window, in whole compression and decompression functions of the user-friendly this system of main window.It should
Visual user's operation interface can in major mainstream operation system efficient operation.
A kind of dedicated compressibility based on PUF key proposed by the present invention further includes providing a user a kind of visualization behaviour
Make the function display module of showing interface plate window.Pass through picture presentation area, text show area and the audio in display board window
Show area shows the execution state of dedicated squeeze operation and dedicated decompression operation to user.
A kind of dedicated compressibility based on PUF key proposed by the present invention further includes based on asynchronous and multi-process technology tune
Spend the Worker module of compression module and decompression module, with improve the response speed of GUI operation module, compression algorithm module and
The execution speed of decompression algorithm module realizes the parallel execution of GUI operation module and function display module.
A kind of dedicated compressibility based on PUF key proposed by the present invention further includes the main window at visualized operation interface
Log when this system operation and the log module of user operation records are exported on mouth, when this system is run with document form
Log and user operation records be saved in local disk.
A kind of dedicated compressibility based on PUF key proposed by the present invention further includes the use for authentication operation this system
The user authentication module of family identity, to protect this system not used by illegal user, and then guarantee the data peace of legitimate user
Entirely.
In a kind of dedicated compressibility based on PUF key proposed by the present invention, PUF key read module uses such as lower section
Method reads PUF key, the specific steps are as follows:
Step A1:PUF key generator circuitry is connected by UART serial ports with host, automatic seeking after dedicated compressibility starting
Look for and identify the UART serial port of PUF key generator circuitry.
Step A2: host is arranged the baud rate of UART serial ports, reads delay, character format, parity check bit, and closes software
Flow control and hardware flow control.Wherein, character format includes: start bit, stop position and valid data position.
Step A3: starting PUF key generator circuitry.
Step A4:PUF Key Acquisition Module is detected by UART serial ports, and it is raw whether to receive PUF key at the appointed time
The Ready mark sent at circuit, enters step A5 if received;If do not received, repeatedly step A3, i.e., heavy
New starting PUF key generator circuitry.
Step A5: mode is generated to the key of PUF key generator circuitry and generation delay is configured, and is started primary
PUF key generation process.
Step A6: host constantly detects the output stream of PUF key generator circuitry generation, in time-out time 90 seconds, if inspection
Bfp numerical value and key numerical value are measured, then caches currently detected bfp numerical value and key numerical value, and terminate this PUF key
Generating process enters step A7;If bfp numerical value is not detected or key numerical value is not detected or be not detected bfp numerical value and
Key numerical value, then repeatedly step A5.
Step A7: whether the bfp numerical value cached in detecting step A6 is less than 150.If bfp numerical value is less than 150, to PUF
The key of key generator circuitry, which generates mode and generates delay, re-starts setting, and repeats step A6, until bfp numerical value is not small
When 150, A8 is entered step.
Step A8: whether the bfp numerical value cached in detecting step A7 is less than or equal to 300.If bfp numerical value is greater than 300, right
The key of PUF key generator circuitry, which generates mode and generates delay, re-starts setting, and repeats step A6, until bfp numerical value
When less than or equal to 300, A9 is entered step.
Step A9: if bfp value is no more than 300 and is not less than 150, then it is assumed that the PUF key key value this time generated is correct
Value, records PUF key of the current key value as dedicated compression unit and dedicated decompression unit.It closes PUF key and generates electricity
Road.
A kind of dedicated compressibility based on PUF key proposed by the present invention, provides a user visualized operation interface, should
There are five function buttons in the main window at visualized operation interface, are display board button, Ordinary Compression button, common decompression respectively
Contracting button, dedicated compression button, dedicated decompression button, there are one running logs in the main window at the visualized operation interface
Viewing area.
Each function button and the concrete function of running log viewing area are as follows:
Select file dialog box is popped up after clicking Ordinary Compression button, appointing for Ordinary Compression is wanted according to dialog box prompt selection
Anticipate type original after, system backstage execute Ordinary Compression, and running log viewing area export current execution into
Degree.
Select file dialog box is popped up after clicking common decompression button, selection Ordinary Compression file is prompted according to dialog box
Afterwards, system executes common decompression on backstage, and current execution journal is exported in running log viewing area.
Select file dialog box is popped up after clicking dedicated compression button, dedicated compression is wanted according to the prompt of dialog box selection
After any type of original, dedicated compression unit calls PUF Key Acquisition Module to go to obtain PUF key first, then by PUF
Key is added in compression algorithm and executes, and this time operates used PUF key value in the output of running log viewing area
And current execution journal.
Select file dialog box is popped up after clicking dedicated decompression button, should be selected at this time by dedicated compressed text
Part, because only that dedicated decompression can decompress the file through dedicated compression.After selecting files, system calls PUF close first
Key obtains module and goes to obtain PUF key, and then PUF key is added in decompression algorithm and is executed.Running log viewing area
It can show PUF key and system running log used in this decompression procedure.
Display board button is clicked to recall a kind of display board window at visualized operation interface.The exhibition at visualized operation interface
Show that plate window includes: picture presentation area, text show area and audio presentation area.Main window and display board window can while and be deposited
And do not interfere with each other, the displaying operation that main window is carried out can be immediately reflected to display board window.
After having selected original or dedicated compressed file in main window and having executed dedicated compression or dedicated decompression operation,
By picture presentation area, text show area and the audio presentation area in impression window, dedicated squeeze operation or specially is shown to user
It is specific as follows with the execution state of decompression operation:
If the original selected in main window is picture format, when recalling display board window for the first time, in picture presentation area
Inside intactly show the image content;After carrying out dedicated squeeze operation to the picture format file in main window, picture
Show area is without display content;After carrying out dedicated decompression operation to dedicated compressed picture format file in main window, figure
Piece show area intactly shows image content again.Therefore, the verifying of picture presentation area is proposed by the present invention a kind of based on PUF
The function accuracy of dedicated compression and the dedicated decompression of key.
If the original of main window selection is text formatting, when recalling display board window for the first time, in text show area
Passage content in intact display this document;Dedicated compression is carried out to the text formatting file in main window to grasp
After work, text show area is without display content;Dedicated decompression is carried out to dedicated compressed text formatting file in main window
After operation, text show area intactly shows the passage content in this document again.Therefore, text show area is verified
The perfect in shape and function of a kind of dedicated compression based on PUF key proposed by the present invention and dedicated decompression.
It is aobvious in audio presentation area when recalling display board window for the first time if the original of main window selection is audio format
Show the music name and music duration of " music being played on ", and click play button can be with the loop play music file;
Stop playing the music file, and after carrying out dedicated squeeze operation to the audio format file in main window, audio presentation
Click play button can not normal play audio file in area;Dedicated compressed audio format file is carried out in main window
After dedicated decompression operation, audio presentation area shows the music name and music duration of " music being played on ", and point again
Hitting broadcast button can be with the loop play music file.Therefore, the verifying of audio presentation area is proposed by the present invention a kind of close based on PUF
The functional safety of dedicated compression and the dedicated decompression of key.
Further, display board window shows only dedicated compression and dedicated decompression to picture format file, text formatting
The impact effect of file and audio format file, but a kind of dedicated compression based on PUF key proposed by the present invention and dedicated
Decompression can be applied to various types of files, and be not limited to three class files that display board is shown.Pass through display board
Real time demonstration is able to verify that the functional completeness and peace of a kind of dedicated compressibility based on PUF key proposed by the present invention
Quan Xing.
Due to having used Worker module, the various operations that above each function button is triggered execute parallel and
And it will not interfere with each other, and the key operation that user and system execute can all be shown in running log viewing area and be saved to
Log file, it is achieved that the high efficiency of squeeze operation.By PUF key generator circuitry and dedicated compression and dedicated decompression institute
The PUF key used is closely connected, therefore can only be equipped with this PUF key generator circuitry by dedicated compressed file
It is restored on system using dedicated decompression, therefore even if dedicated compressed file is stolen, illegal user can not also obtain correct PUF
Key goes decompression to obtain original, to improve the safety of squeeze operation.
Specific step is as follows for a kind of dedicated compressibility based on PUF key proposed by the present invention:
Step S1: legal username and password must be inputted in authentication dialog box before using the system
It is able to carry out subsequent operation;For the legitimate user by certification, it can choose and system is allowed not have to carry out whithin a period of time
User authentication is to save the operating time.
Step S2: by click user interface main window in Ordinary Compression button, commonly decompress button, specially
The operation to be carried out is selected with compression button, dedicated decompression button.
Step S3: display board window is recalled by the display board button in the main window of click user interface, is led to
The picture presentation area in impression window, text show area and audio presentation area are crossed, shows dedicated squeeze operation and dedicated to user
The execution state of decompression operation.
Step S4: each operation performed by this system can be output to master with the log information with date-time format
It the running log viewing area of window and is saved in journal file.
The invention adopts the above technical scheme compared with prior art, has following technical effect that
(1) this system is developed based on Python, has good cross-platform characteristic, can be in the operating system of mainstream
It is normally and efficiently run on Windows, Linux and Mac OS;
(2) main window of visual user's operation interface and display board window are all made of Worker module, so that user can
To carry out multiple compression and decompression operations simultaneously, without will lead to, operation interface is stuck, system can be compressed in execution or solution
Operating effect is synchronized when compression and is shown on display panel;
(3) in the PUF key read method proposed, PUF key read module is capturing the sending of PUF key generator circuitry
Ready signal after can initiate multiple PUF key to PUF key generator circuitry and generate request, without every request one
Secondary PUF key generation just allows PUF key generator circuitry to be powered and power off, so as to improve the efficiency for obtaining PUF key and generating;
In PUF key generation process, request input parameter is generated since initial setting up uses default PUF key, so that obtaining for the first time
To PUF key can satisfy most usage scenarios, to improve the execution speed of dedicated compression;PUF key generated
Automatic error-correcting program is arranged in Cheng Zhong, enables Key Acquisition Module defeated according to the automatic adjustment PUF key generation request of bfp value
Enter parameter and carry out new key generation process herein, until getting correct PUF key value.
Detailed description of the invention
A kind of Fig. 1 specific step of the PUF key read method of the dedicated compressibility based on PUF key proposed by the present invention
Rapid figure.
Fig. 2 is a kind of visual user's operation interface of the dedicated compressibility based on PUF key proposed by the present invention
Main window schematic layout pattern.
Fig. 3 is a kind of visual user's operation interface of the dedicated compressibility based on PUF key proposed by the present invention
Display board window layout schematic diagram.
Specific embodiment
Below with reference to attached drawing, technical solution of the present invention is described in detail.
A kind of dedicated compressibility based on PUF key proposed by the present invention, comprising: core function unit, user's operation
Unit and miscellaneous function unit.Core function unit includes: PUF key read module, compression module and decompression module, user
Operating unit includes: user authentication module, GUI operation module and function display module, and miscellaneous function unit includes: Worker mould
Block and log module.
PUF key read module reads PUF key from PUF key generator circuitry.
Compression module includes: Ordinary Compression unit, dedicated compression unit;Wherein, Ordinary Compression unit carries out not file
For the Ordinary Compression of encryption to obtain Ordinary Compression file, dedicated compression unit carries out based on the dedicated of the PUF key file
Ciphered compressed is to obtain dedicated compressed file.
Decompression module includes: common decompression unit, dedicated decompression unit;Wherein, common decompression unit is to text
The common decompression that part is not encrypted is to obtain original;Dedicated decompression unit carries out based on the PUF key file
Dedicated encrypted decompress to obtain original.
Dedicated compression unit executes dedicated compression algorithm, and dedicated decompression unit executes dedicated decompression algorithm.Dedicated pressure
Compression algorithm first calls PUF key read module to obtain PUF key, then PUF key is added in compression algorithm and is executed
Compression.Dedicated decompression algorithm first calls PUF key read module to obtain PUF key, PUF key is then added to solution
In compression algorithm and execute decompression.
A kind of dedicated compressibility based on PUF key proposed by the present invention further includes providing a user a kind of visualization behaviour
The GUI operation module for making interface main window, in whole compression and decompression functions of the user-friendly this system of main window.It should
Visual user's operation interface can in major mainstream operation system efficient operation.
A kind of dedicated compressibility based on PUF key proposed by the present invention further includes providing a user a kind of visualization behaviour
Make the function display module of showing interface plate window.Pass through picture presentation area, text show area and the audio in display board window
Show area shows the execution state of dedicated squeeze operation and dedicated decompression operation to user.
A kind of dedicated compressibility based on PUF key proposed by the present invention further includes based on asynchronous and multi-process technology tune
Spend the Worker module of compression module and decompression module, with improve the response speed of GUI operation module, compression algorithm module and
The execution speed of decompression algorithm module realizes the parallel execution of GUI operation module and function display module.
A kind of dedicated compressibility based on PUF key proposed by the present invention further includes the main window at visualized operation interface
Log when this system operation and the log module of user operation records are exported on mouth, when this system is run with document form
Log and user operation records be saved in local disk.
A kind of dedicated compressibility based on PUF key proposed by the present invention further includes the use for authentication operation this system
The user authentication module of family identity, to protect this system not used by illegal user, and then guarantee the data peace of legitimate user
Entirely.
Specific embodiment 1:
In a kind of dedicated compressibility based on PUF key proposed by the present invention, PUF key read module uses such as lower section
Method reads PUF key, carries out in conjunction with Fig. 1 and is described in detail, the specific steps are as follows:
Step A1:PUF key generator circuitry is connected by UART serial ports with host, automatic seeking after dedicated compressibility starting
Look for and identify the UART serial port of PUF key generator circuitry.
Step A2: the baud rate that UART serial ports is arranged in host is 115200 bauds, and reading delay is 2 seconds, character format totally 10
Position, wherein 1 start bit, 1 stop position and 8 valid data positions, parity check bit is sky, closes software flow control and hard
Part flow control.
Step A3: starting PUF key generator circuitry.
Step A4:PUF Key Acquisition Module is detected by UART serial ports, and PUF key whether is received in 10 seconds and generates electricity
The Ready that road is sent indicates " 0 × 16 ", enters step A5 if received;If do not received, repeatedly step A3,
Restart PUF key generator circuitry.
Step A5: mode is generated to the key of PUF key generator circuitry and generation delay is configured, setting key generates
Mode is that default key generates mode 4, generation delay is 50 seconds, and starts a PUF key generation process.
Step A6: host constantly detects the output stream of PUF key generator circuitry generation, is set as 90 seconds in time-out time
It is interior, if detecting bfp numerical value and key numerical value, currently detected bfp numerical value and key numerical value are cached, and terminate this time
PUF key generation process, enters step A7;If bfp numerical value or key numerical value is not detected, repeatedly step A5.
Step A7: whether the bfp numerical value cached in detecting step A6 is less than 150.If bfp numerical value is less than 150, to PUF
The key of key generator circuitry, which generates mode and generates delay, re-starts setting, and it is raw for default key that setting key generates mode
It is 60 seconds, and repeats step A6 at mode 4, generation delay, when bfp numerical value is not less than 150, enters step A8.
Step A8: whether the bfp numerical value cached in detecting step A7 is less than or equal to 300.If bfp numerical value is greater than 300, right
The key of PUF key generator circuitry generates mode and generation delay re-starts setting, and it is that default is close that setting key, which generates mode,
It is 40 seconds that key, which generates mode 4, generates delay, and repeats step A6, when bfp numerical value is less than or equal to 300, enters step A9.
Step A9: if bfp value is no more than 300 and is not less than 150, then it is assumed that the PUF key key value this time generated is correct
Value, records PUF key of the current key value as dedicated compression unit and dedicated decompression unit.It closes PUF key and generates electricity
Road.
Specific embodiment 2:
A kind of dedicated compressibility based on PUF key proposed by the present invention, provides a user visualized operation interface such as
Shown in Fig. 2, there are five function button in the main window of the user interface, be respectively display board button, Ordinary Compression button,
Common decompression button, dedicated compression button, dedicated decompression button, there are one fortune in the main window of the user interface
Row journal displaying area.
Each function button and the concrete function of running log viewing area are as follows:
Select file dialog box is popped up after clicking Ordinary Compression button, appointing for Ordinary Compression is wanted according to dialog box prompt selection
Anticipate type original after, system backstage execute Ordinary Compression, and running log viewing area export current execution into
Degree.
Select file dialog box is popped up after clicking common decompression button, selection Ordinary Compression file is prompted according to dialog box
Afterwards, system executes common decompression on backstage, and current execution journal is exported in running log viewing area.
Select file dialog box is popped up after clicking dedicated compression button, dedicated compression is wanted according to the prompt of dialog box selection
After any type of original, dedicated compression unit calls PUF Key Acquisition Module to go to obtain PUF key first, then by PUF
Key is added in compression algorithm and executes, and this time operates used PUF key value in the output of running log viewing area
And current execution journal.
Select file dialog box is popped up after clicking dedicated decompression button, should be selected at this time by dedicated compressed text
Part, because only that dedicated decompression can decompress the file through dedicated compression.After selecting files, system calls PUF close first
Key obtains module and goes to obtain PUF key, and then PUF key is added in decompression algorithm and is executed.Running log viewing area
It can show PUF key and system running log used in this decompression procedure.
Display board button is clicked to recall display board window.As shown in figure 3, display board window includes: picture presentation area, text
Word show area and audio presentation area.
Display board button is clicked to recall a kind of display board window at visualized operation interface.The exhibition at visualized operation interface
Show that plate window includes: picture presentation area, text show area and audio presentation area.Main window and display board window can while and be deposited
And do not interfere with each other, the displaying operation that main window is carried out can be immediately reflected to display board window.
After having selected original or dedicated compressed file in main window and having executed dedicated compression or dedicated decompression operation,
By picture presentation area, text show area and the audio presentation area in impression window, dedicated squeeze operation or specially is shown to user
It is specific as follows with the execution state of decompression operation:
If the original selected in main window is picture format, when recalling display board window for the first time, in picture presentation area
Inside intactly show the image content;After carrying out dedicated squeeze operation to the picture format file in main window, picture
Show area is without display content;After carrying out dedicated decompression operation to dedicated compressed picture format file in main window, figure
Piece show area intactly shows image content again.
If the original of main window selection is text formatting, when recalling display board window for the first time, in text show area
Passage content in intact display this document;Dedicated compression is carried out to the text formatting file in main window to grasp
After work, text show area is without display content;Dedicated decompression is carried out to dedicated compressed text formatting file in main window
After operation, text show area intactly shows the passage content in this document again.
It is aobvious in audio presentation area when recalling display board window for the first time if the original of main window selection is audio format
Show the music name and music duration of " music being played on ", and click play button can be with the loop play music file;
Stop playing the music file, and after carrying out dedicated squeeze operation to the audio format file in main window, audio presentation
Click play button can not normal play audio file in area;Dedicated compressed audio format file is carried out in main window
After dedicated decompression operation, audio presentation area shows the music name and music duration of " music being played on ", and point again
Hitting broadcast button can be with the loop play music file.
Further, display board window shows only dedicated compression and dedicated decompression to picture format file, text formatting
The impact effect of file and audio format file, but a kind of dedicated compression based on PUF key proposed by the present invention and dedicated
Decompression can be applied to various types of files, and be not limited to three class files that display board is shown.Pass through display board
Real time demonstration is able to verify that the functional completeness and peace of a kind of dedicated compressibility based on PUF key proposed by the present invention
Quan Xing.
Due to having used Worker module, the various operations that above each function button is triggered execute parallel and
And it will not interfere with each other, and the key operation that user and system execute can all be shown in running log viewing area and be saved to
Log file, it is achieved that the high efficiency of squeeze operation.By PUF key generator circuitry and dedicated compression and dedicated decompression institute
The PUF key used is closely connected, therefore can only be equipped with this PUF key generator circuitry by dedicated compressed file
It is restored on system using dedicated decompression, therefore even if dedicated compressed file is stolen, illegal user can not also obtain correct PUF
Key goes decompression to obtain original, to improve the safety of squeeze operation.
Specific embodiment 3:
Specific step is as follows for a kind of dedicated compressibility based on PUF key proposed by the present invention:
Step S1: legal username and password must be inputted in authentication dialog box before using the system
It is able to carry out subsequent operation;For the legitimate user by certification, it can choose and system is allowed not have to carry out whithin a period of time
User authentication is to save the operating time.
Step S2: by click user interface main window in Ordinary Compression button, commonly decompress button, specially
The operation to be carried out is selected with compression button, dedicated decompression button.
Step S3: display board window is recalled by the display board button in the main window of click user interface, is led to
The picture presentation area in impression window, text show area and audio presentation area are crossed, shows dedicated squeeze operation and dedicated to user
The execution state of decompression operation.
Step S4: each operation performed by this system can be output to master with the log information with date-time format
It the running log viewing area of window and is saved in journal file.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by those familiar with the art, all answers
It is included within the scope of protection of the present invention.