File encryption and decryption processing method, device and equipment and readable storage medium

A processing method and file encryption technology, applied in the field of data processing, can solve problems such as file offset data length granularity, misalignment, and decryption failure

Pending Publication Date: 2020-07-10
SANGFOR TECH INC
View PDF5 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The purpose of the present invention is to provide a file encryption and decryption processing method, which can solve the problem of decryption failure caused by misalignment of the file offset and data length gr

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • File encryption and decryption processing method, device and equipment and readable storage medium
  • File encryption and decryption processing method, device and equipment and readable storage medium
  • File encryption and decryption processing method, device and equipment and readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0061] Please refer to figure 1 , figure 1 A flow chart of a file encryption processing method provided in this embodiment; the method mainly includes:

[0062] Step s110, after the block sending of the file is started, the currently read original data block is obtained;

[0063] First, when the software reads and writes file data for encryption and decryption, the sender of the software sends a file and reads the files to be sent in batches. During the reading process, the original data block is read in blocks. The currently read data block in the process is called the original data block because the data in the data block is original unencrypted data.

[0064] Step s120, determining the data length and data offset of the data block;

[0065] The data length refers to the data length of the currently read original data block. For example, when every 20 bytes is read as a data block, the data length of the data block is 20 bytes.

[0066] Every time a process reads data, t...

Embodiment 2

[0083] In order to deepen the understanding of the file encryption method introduced in the above-mentioned embodiments, in this embodiment, the AES encryption algorithm with a key length of 128 bits and an encryption granularity of 16 bytes is used in this embodiment. The size of the file is 100 bytes, and every 20 characters Take data reading as a data block as an example to introduce the implementation method.

[0084] When reading 20 bytes starting from 0 for the first time, the file offset read for the first time is 0, the length of the read content is 20, the file offset 0 is an integer multiple of 16, no correction is required, and the length is 20 It is not an integer multiple of 16, 20=16+4, the encryption process after reading 20 bytes is: encrypt the first 16 bytes, and keep the remaining 4 bytes unencrypted, but need to be saved.

[0085] The second time read 20 bytes from the file offset of 20, the file offset is 20, not an integer multiple of 16, 20=16+4, you nee...

Embodiment 3

[0089] Based on the above-mentioned embodiments, in order to increase the acquisition speed of the original data block, thereby further increasing the speed of file encryption processing, optionally, after the file block sending is started, the file reading process of the monitoring application can be used to obtain the currently read the original data block.

[0090] By monitoring the read and write file operations of the application, encryption processing can be performed while determining the currently read data block. Compared with passively receiving data, active monitoring to obtain data can significantly increase the speed of data acquisition.

[0091] In this embodiment, only the above data acquisition method is used as an example for introduction, other specific data acquisition methods may refer to the introduction of this embodiment, and will not be repeated here.

[0092] Further, after encrypting the data, in order to strengthen the closeness of the relationship b...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a file encryption and decryption processing method. The method comprises the following steps: judging whether data offset of a currently processed data block is aligned with encryption and decryption granularity or not; determining whether the data block encrypted and decrypted last time has the data less than the encryption and decryption granularity length or not; callingthe data in the subsequent data block to supplement the data left by the last encryption and decryption for the remaining data with the insufficient encryption and decryption granularity length in each current to-be-processed original data block, thereby avoiding the situation of decryption failure caused by different encryption and decryption modes under different data lengths, avoiding the problem that the use of the data blocks by the data receiving end is influenced due to the change of the original data blocks caused by zero filling among the original data blocks, guaranteeing that eachdata block can be subjected to data encryption and decryption processing according to a unified data encryption and decryption mode, and reducing the decryption failure rate. The invention further provides a file encryption and decryption processing device, computer equipment and a readable storage medium, which have the above beneficial effects.

Description

technical field [0001] The invention relates to the technical field of data processing, in particular to a file encryption processing method and device, a file decryption processing method, device, computer equipment and a readable storage medium. Background technique [0002] In the border control security solution, the internal communication software that enterprises need to use, such as mail software such as Notes and Foxmail, IM communication software such as RTX and DingTalk Enterprise Edition, and enterprise business office systems such as OA, will monitor and monitor file transfers. File encryption and decryption, encrypt when sending files, and decrypt when receiving files. [0003] In order to reduce the additional performance overhead caused by encryption and decryption, real-time encryption and decryption is currently used. When the software reads the file to be sent, it reads in blocks, and encrypts as much as it reads. When the software writes the received file ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F21/60G06F21/62H04L9/06
CPCG06F21/602G06F21/6209H04L9/0631Y02D30/50
Inventor 杨峰冯伟东付波
Owner SANGFOR TECH INC
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products